execute_cross_perp
Execute a cross-margin perpetual trade directly with your private key; supports take-profit, stop-loss, and builder fees.
Instructions
Execute a cross-margin perpetual trade directly with a private key (no managed custody). Supports TP/SL and builder fees.
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": {
"coin": "<coin>",
"isLong": "<isLong>",
"price": "<price>",
"positionSize": "<positionSize>"
},
"name": "execute_cross_perp"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| coin | Yes | Asset symbol, e.g. 'BTC' | |
| price | Yes | Price in USD | |
| isLong | Yes | True for long, false for short | |
| isMarket | No | True for market, false for limit | |
| leverage | No | Leverage for cross-margin (calls updateLeverage before placing) | |
| accountRef | No | Connected account from gdex_connect. Supplies session key, wallet address, API key and session data so no secret is passed in chat | |
| privateKey | No | Wallet private key (hex) | |
| reduceOnly | No | ||
| positionSize | Yes | Position size | |
| stopLossPrice | No | Stop-loss price | |
| builderFeeRate | No | Builder fee rate in basis points | |
| stopLossTrigger | No | Stop-loss trigger price | |
| takeProfitPrice | No | Take-profit price | |
| builderFeeAddress | No | Builder fee wallet address | |
| takeProfitTrigger | No | Take-profit trigger price |