execute_spot
Buy or sell spot assets on HyperLiquid using a private key; supports market or limit orders and account-based signing.
Instructions
Execute a spot trade directly on HyperLiquid with a private key.
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>",
"isBuy": "<isBuy>",
"price": "<price>",
"size": "<size>"
},
"name": "execute_spot"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| coin | Yes | Asset symbol | |
| size | Yes | Trade size | |
| isBuy | Yes | True for buy, false for sell | |
| price | Yes | Price | |
| isMarket | No | ||
| 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) | |
| builderFeeRate | No | ||
| builderFeeAddress | No |