v1
latestOpenAPI 3.0.02026-07-2471143147.5 KBOrders
Place TP/SL order
Create a Take Profit or Stop Loss order. Orders are stored off-chain and executed on-chain when the stop price condition is met.
Order Types:
- TAKE_PROFIT: Triggers when price moves favorably (long: price >= stop_price, short: price <= stop_price)
- STOP_LOSS: Triggers when price moves unfavorably (long: price <= stop_price, short: price >= stop_price)
Stop Price Options:
- MARK_PRICE: Use oracle mark price for trigger
- LAST_TRADED_PRICE: Use last traded price for trigger
Signature (required): Sign EIP-712 typed data (same domain as regular orders) with primaryType PlaceTpslOrder: fields: account(address), marketId(uint64), side(uint8), size(string), stopType(uint8), stopPrice(string), limitPrice(string), orderType(uint8), stopPriceOption(uint8), tif(uint8), deadline(uint32), sizePercentBps(uint32). Use exact same string values in signature and request body.
post/v1/orders/tpsl
Request body
Example request
{
"account": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"market_id": "1",
"size": "1.5",
"stop_price": "70000",
"limit_price": "69500",
"signer": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
}Response
A successful response.
Example response
{
"order_id": "550e8400-e29b-41d4-a716-446655440000"
}