Skip to main content
POST
/
api
/
v1
/
wallet
/
sell
curl --request POST \
  --url https://mcp.echozero.app/api/v1/wallet/sell \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "amount": 0.5
}'
{
  "success": true,
  "data": {
    "success": true,
    "transactionId": "<string>",
    "amount": 123,
    "tokenSymbol": "<string>",
    "message": "<string>",
    "timestamp": "2023-11-07T05:31:56Z",
    "tradeId": "<string>",
    "openTradeUpdatePending": true
  }
}

Authorizations

x-api-key
string
header
required

Headers

x-signature
string

HMAC-SHA256 signature: HMAC-SHA256(secretKey, timestamp + METHOD + path + body). Optional -- when omitted, HMAC verification is skipped.

x-timestamp
string

Request timestamp in epoch milliseconds. Required when x-signature is provided. Rejected if drift exceeds 5 minutes.

Body

application/json

OpenAPI: McpWalletBuySellBodyDto. GraphQL: WalletBuySellOperationArgs. Sell with SL/TP requires exactly one open BUY for the mint unless using linked manage-trade flows.

amount
number
required

Amount for the operation

tokenMint
string

Token mint address (optional; defaults to SOL)

toAddress
string

Destination address (required for withdraw)

stopLoss
object

Optional stop-loss on the open BUY affected by this operation

takeProfit
object

Optional take-profit on the open BUY for this mint

Response

200 - application/json

Operation result.

success
boolean
required
Example:

true

data
object
required

Endpoint-specific payload