Sell a token
trnch_sellBuild a sell for USDG by token or token ID and percent or exact amount; quotes six routers and returns the best route as a signable transaction, with the 0.5% fee already deducted.
Instructions
Build a sell for USDG in one call: give tokenId or token, and percent of the wallet balance (read on chain) or an exact amount. Quotes six routers and returns the best route as a transaction to sign. The TRNCH fee (0.5%) is already deducted from the quote. Returns { router, quote, approval, tx, chainId, from }: if approval is not null, send it first, then sign and send tx from the same wallet (chainId 4663). Nothing is sent by TRNCH. Errors: 409 token not tradable through TRNCH (kept out by TIA), 429 rate or build limit (retry-after). Requires the API key from trnch_register, sent as Authorization: Bearer .
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| token | No | Token to sell, as an address. Use this or tokenId. | |
| amount | No | Exact amount in token units, e.g. 1234.5. Capped at the balance. Use this or percent. | |
| percent | No | Share of the wallet balance to sell, 100 = all. Use this or amount. | |
| tokenId | No | Opaque token id from trnch_heat (field id). Use this or token. | |
| slippageBps | No | Max slippage in basis points (100 = 1%). Default 100. |