curl --request POST \
--url https://mcp.echozero.app/api/v1/wallet/sell \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-signature: <x-signature>' \
--header 'x-timestamp: <x-timestamp>' \
--data '{
"amount": 25
}'{
"success": true,
"data": {
"success": true,
"transactionId": "<string>",
"amount": 123,
"tokenSymbol": "<string>",
"message": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"tradeId": "<string>",
"openTradeUpdatePending": true
}
}Wallet
Sell tokens
Mirrors GraphQL sellTokens. Requires HMAC signing. Only reduces the user’s own manual open BUY lots after on-chain finality — agent-created positions are closed via the trade close / manage endpoints, and a sell larger than the manual lots is rejected with SELL_EXCEEDS_MANUAL_POSITION before any swap. Failed swaps leave lots unchanged. Real buy/sell/withdraw share one wallet spend reservation. Redis down returns WALLET_LOCK_UNAVAILABLE. Frozen wallets return WALLET_FROZEN / HTTP 403.
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>' \
--header 'x-signature: <x-signature>' \
--header 'x-timestamp: <x-timestamp>' \
--data '{
"amount": 25
}'{
"success": true,
"data": {
"success": true,
"transactionId": "<string>",
"amount": 123,
"tokenSymbol": "<string>",
"message": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"tradeId": "<string>",
"openTradeUpdatePending": true
}
}Headers
Body
application/json
OpenAPI: McpWalletBuySellBodyDto. GraphQL: WalletBuySellOperationArgs. Sell with SL/TP requires exactly one open manual BUY for the mint unless using linked manage-trade flows.