limit_buy
Place a limit buy order to purchase a token automatically when its USD price drops to your target, with optional stop-loss and take-profit.
Instructions
Create a limit buy order — buy a token when price drops to target. Uses ABI-encoded + AES-encrypted computedData.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | Native token to spend in raw units (wei/lamports), a positive integer string | |
| apiKey | No | API key for AES encryption | |
| userId | No | Control wallet address (NOT managed wallet) | |
| chainId | Yes | Numeric chain ID (e.g. 622112261 for Solana) | |
| accountRef | No | Connected account from gdex_connect. Supplies session key, wallet address, API key and session data so no secret is passed in chat | |
| lossPercent | No | Stop-loss % below trigger, whole number under 100 (e.g. '25'), '0' to skip | 0 |
| tokenAddress | Yes | Token address to buy | |
| triggerPrice | Yes | USD price at which to trigger the buy (plain decimal) | |
| profitPercent | No | Take-profit % above trigger, whole number (e.g. '50'), '0' to skip | 0 |
| sessionPrivateKey | No | Session private key from sign-in |