sell_token
Sells a token from your managed GDEX wallet for the chain's native token, accepting an absolute amount or a percentage of your balance and returning a requestId to track with wait_for_trade.
Instructions
Sell a token for the chain's native token from the managed GDEX wallet (session-signed sell_v2). Amount is a token amount ('100') or a percentage of the held balance ('50%', '100%'), resolved from the managed holdings. Returns a requestId; follow it with wait_for_trade. To receive USDC use usdc_sell.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dex | No | Not supported: the backend picks the route. Rejected when set. | |
| chain | Yes | Chain identifier | |
| amount | Yes | Amount to sell, e.g. '100' or '50%' | |
| apiKey | No | GDEX API key used to encrypt the signed trade | |
| referrer | No | Not supported by purchase_v2/sell_v2. Rejected when set. | |
| slippage | No | Slippage percent, Solana and Sui only (sent as bps, max 50). Rejected on EVM, where the account's stored slippage applies. Omit to use the stored setting. | |
| accountRef | No | Connected account from gdex_connect. Supplies session key, wallet address, API key and session data so no secret is passed in chat | |
| outputToken | No | Omit, or the chain's native token. Anything else is rejected (use usdc_sell for USDC). | |
| priorityFee | No | Solana priority fee in lamports (integer, max 50000000 = 0.05 SOL). Solana only. | |
| tokenAddress | Yes | Contract address of the token to sell | |
| tokenDecimals | No | Only for an absolute amount of a token missing from the managed holdings | |
| walletAddress | No | Control wallet address (the GDEX userId) | |
| sessionPrivateKey | No | Session private key from sign-in |