Orders API Reference
Complete reference documentation for order management endpoints.
Authentication Required: All order write operations (place, cancel) require L2 authentication. See the Getting Started Guide to learn how to set up L2 authentication.
Place Order
Create a new order.
Endpoint: POST /public/api/v1/order/{chainId}
Path Parameters
chainId(required, number) - Chain ID
Headers (L2 Authentication Required)
prob_address- User addressprob_signature- HMAC signatureprob_timestamp- Unix timestampprob_api_key- API keyprob_passphrase- API passphrase
Request Body
{
"deferExec": true,
"order": {
"salt": "1234567890",
"maker": "0xPROXY_WALLET...",
"signer": "0xEOA_ADDRESS...",
"taker": "0x0000...",
"tokenId": "0xabc123...",
"makerAmount": "1000000000000000000",
"takerAmount": "500000000000000000",
"side": "BUY",
"expiration": "1735689600",
"nonce": "0",
"feeRateBps": "175",
"signatureType": 0,
"signature": "0xdef456..."
},
"owner": "0xPROXY_WALLET...",
"orderType": "GTC"
}Address Usage:
maker: Use your proxy wallet addresssigner: Use your EOA address (signs the order)owner: Use your proxy wallet address
Parameters
deferExec(required, boolean) - Defer executionorder(required, object) - Order detailssalt(required, string) - Random saltmaker(required, string) - Proxy wallet address (the wallet that will hold the position)signer(required, string) - EOA address (the address that signs the order)taker(required, string) - Taker address (0x0000... for open orders)tokenId(required, string) - CTF token IDmakerAmount(required, string) - Maker amount in weitakerAmount(required, string) - Taker amount in weiside(required, string) - "BUY" or "SELL"expiration(required, string) - Expiration timestampnonce(required, string) - NoncefeeRateBps(required, string) - Max taker fee in basis points (must be 175-1000)signatureType(required, number) - Signature typesignature(required, string) - Order signature
owner(required, string) - Proxy wallet address (owner of the order)orderType(required, string) - Order type: "GTC" or "IOC"
Order Types
- GTC (Good Till Cancel) - Order remains active until canceled
- IOC (Immediate Or Cancel) - Execute immediately or cancel
Example Request
curl -X POST "https://api.probable.markets/public/api/v1/order/56" \
-H "Content-Type: application/json" \
-H "prob_address: 0xEOA_ADDRESS..." \
-H "prob_signature: 0xabc123..." \
-H "prob_timestamp: 1705312200" \
-H "prob_api_key: pk_live_abc123xyz" \
-H "prob_passphrase: my-passphrase" \
-d '{
"deferExec": true,
"order": {
"salt": "1234567890",
"maker": "0xPROXY_WALLET...",
"signer": "0xEOA_ADDRESS...",
"taker": "0x0000...",
"tokenId": "0xabc123...",
"makerAmount": "1000000000000000000",
"takerAmount": "500000000000000000",
"side": "BUY",
"expiration": "1735689600",
"nonce": "0",
"feeRateBps": "175",
"signatureType": 0,
"signature": "0xdef456..."
},
"owner": "0xPROXY_WALLET...",
"orderType": "GTC"
}'Example Response
{
"orderId": 12345,
"clientOrderId": "my-order-123",
"symbol": "BTC-USD",
"side": "BUY",
"type": "LIMIT",
"timeInForce": "GTC",
"price": "0.5",
"origQty": "1.0",
"executedQty": "0.0",
"cumQuote": "0.0",
"status": "NEW",
"time": 1705312200000,
"updateTime": 1705312200000,
"avgPrice": "0.0",
"origType": "LIMIT",
"tokenId": "0xabc123...",
"ctfTokenId": "0xabc123...",
"stopPrice": "0.0",
"orderListId": -1,
"cumQty": "0.0"
}Get Order
Retrieve order details by order ID.
Endpoint: GET /public/api/v1/orders/{chainId}/{orderId}
Path Parameters
chainId(required, number) - Chain IDorderId(required, string) - Order ID
Query Parameters
tokenId(required, string) - CTF token ID (symbol)origClientOrderId(optional, string) - Client order IDneedOrigParam(optional, boolean) - Need original request parameter
Headers (L2 Authentication Required)
prob_address- EOA address (signed by EOA)prob_signature- HMAC signatureprob_timestamp- Unix timestampprob_api_key- API keyprob_passphrase- API passphrase
Example Request
curl "https://api.probable.markets/public/api/v1/orders/56/12345?tokenId=0xabc123..." \
-H "prob_address: 0xEOA_ADDRESS..." \
-H "prob_signature: 0xabc123..." \
-H "prob_timestamp: 1705312200" \
-H "prob_api_key: pk_live_abc123xyz" \
-H "prob_passphrase: my-passphrase"Example Response
Same structure as Place Order response.
Cancel Order
Cancel an order by order ID.
Endpoint: DELETE /public/api/v1/order/{chainId}/{orderId}
Path Parameters
chainId(required, number) - Chain IDorderId(required, string) - Order ID
Query Parameters
tokenId(required, string) - CTF token ID (symbol)origClientOrderId(optional, string) - Client order IDneedOrigParam(optional, boolean) - Need original request parameter
Headers (L2 Authentication Required)
prob_address- EOA address (signed by EOA)prob_signature- HMAC signatureprob_timestamp- Unix timestampprob_api_key- API keyprob_passphrase- API passphrase
Example Request
curl -X DELETE "https://api.probable.markets/public/api/v1/order/56/12345?tokenId=0xabc123..." \
-H "prob_address: 0xEOA_ADDRESS..." \
-H "prob_signature: 0xabc123..." \
-H "prob_timestamp: 1705312200" \
-H "prob_api_key: pk_live_abc123xyz" \
-H "prob_passphrase: my-passphrase"Example Response
Same structure as Place Order response, with status: "CANCELED".
Get Open Orders
Retrieve all open orders for a user.
Endpoint: GET /public/api/v1/orders/{chainId}/open
Path Parameters
chainId(required, number) - Chain ID
Query Parameters
eventId(optional, string) - Filter by event IDtoken_ids(optional, array) - Filter by token IDspage(optional, number) - Page numberlimit(optional, number) - Results per page
Headers (L2 Authentication Required)
prob_address- EOA address (signed by EOA)prob_signature- HMAC signatureprob_timestamp- Unix timestampprob_api_key- API keyprob_passphrase- API passphrase
Example Request
curl "https://api.probable.markets/public/api/v1/orders/56/open?page=1&limit=20" \
-H "prob_address: 0xEOA_ADDRESS..." \
-H "prob_signature: 0xabc123..." \
-H "prob_timestamp: 1705312200" \
-H "prob_api_key: pk_live_abc123xyz" \
-H "prob_passphrase: my-passphrase"Example Response
{
"orders": [
{
"orderId": 12345,
"symbol": "BTC-USD",
"side": "BUY",
"status": "NEW",
...
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 50
}
}