build_trade_payload
Create an encrypted managed-custody trade computedData payload from raw credentials and trade details, ready for GDEX swap execution.
Instructions
Build an encrypted managed-custody trade computedData payload from raw credentials.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nonce | Yes | Unique nonce | |
| action | Yes | Trade action | |
| amount | Yes | Trade amount | |
| apiKey | No | API key for AES encryption | |
| userId | No | Control wallet address | |
| accountRef | No | Connected account from gdex_connect. Supplies session key, wallet address, API key and session data so no secret is passed in chat | |
| tokenAddress | Yes | Token contract address | |
| sessionPrivateKey | No | Session private key |