Open a new position
Create or update a position using MARKET execution type
x-api-key<token>
In: header
Header Parameters
X-Trade-Account-Id*string
UUID of the trade account the request acts on. Must belong to the authenticated user.
Format
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/trade/open" \ -H "X-Trade-Account-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6" \ -H "Content-Type: application/json" \ -d '{ "type": "MARKET", "legs": [ { "symbol": "BTC", "side": "BUY", "mode": "QUANTITY", "amount": "1250.75" } ] }'{ "execution": { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "connector": "hyperliquid", "intent": "OPEN", "orderType": "MARKET", "status": "IDLE", "error": "string", "createdAt": "string", "updatedAt": "string", "orders": [ { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "connector": "hyperliquid", "status": "PENDING", "error": "string", "errorCode": "string", "createdAt": "string", "updatedAt": "string", "type": "MARKET", "symbol": "BTC", "side": "BUY", "reduceOnly": true, "quantity": "1250.75", "price": "1250.75", "filledQuantity": "1250.75", "filledPrice": "1250.75" } ], "legs": [ { "symbol": "BTC", "side": "BUY", "mode": "QUANTITY", "amount": "1250.75", "reduceOnly": true } ] }}