X-API-Key or X-HL-Private-Key header. See Authentication.
All endpoints accept ?network=mainnet (default) or ?network=testnet.
Place a limit order
POST /exchange/order
Response:
Market open
Open a position at market price with slippage protection. Sends an IOC order at mid price +/- slippage.POST /exchange/market-open
Market close
Close an existing position at market price. Automatically detects position direction and size.POST /exchange/market-close
Cancel order
Cancel a single order by order ID.DELETE /exchange/order
Bulk cancel
Cancel multiple orders at once. Supports both order IDs and client order IDs in a single request.DELETE /exchange/orders
Modify order
Modify a single resting order.PATCH /exchange/order
Batch modify
Modify multiple orders in a single request.PATCH /exchange/orders
modifies has the same fields as the single modify endpoint.
Update leverage
Change leverage for an asset. Applies to new and existing positions.POST /exchange/update-leverage
Update isolated margin
Add or remove margin from an isolated position.POST /exchange/update-isolated-margin
Schedule cancel
Dead-man’s switch. All open orders will be cancelled at the specified time unless you reschedule.POST /exchange/schedule-cancel