usdc_get_trade_quote
Get an executable quote for buying a token with USDC or native currency, or selling a token for USDC. Returns amountOutRaw so you can apply slippage and set minimum output.
Instructions
Executable quote for a USDC- or native-paid buy, or a sell to USDC. Returns amountOutRaw; apply slippage to get the minimum out for usdc_buy / usdc_sell.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| side | No | Default buy | |
| apiKey | No | GDEX API key for AES encryption | |
| chainId | Yes | Chain ID: 1, 10, 56, 146, 8453, 42161 or 622112261 (Solana). No USDC on Robinhood 4663 or Fraxtal 252 | |
| payAsset | Yes | What the buy is paid with | |
| accountRef | No | Connected account from gdex_connect. Supplies session key, wallet address, API key and session data so no secret is passed in chat | |
| amountInRaw | Yes | Amount in: USDC/native on a buy, token on a sell, raw integer units | |
| tokenAddress | Yes | Token to buy or sell | |
| walletAddress | No | Control wallet address | |
| sessionPrivateKey | No | Session private key from sign-in |