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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"action": "<action>",
"tokenAddress": "<tokenAddress>",
"amount": "<amount>",
"nonce": "<nonce>"
},
"name": "build_trade_payload"
}
}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 |