Place Order
POST
https://api.unhedged.gg /api/v1/ordersCreates a Limit, Market, StopLoss, or TakeProfit order on an ORDER_BOOK market. On acceptance, cost moves from available balance to lockedEngine.
Configure requestRequest
Security · Bearer token
Send your API key in the Authorization header. Required scope order:place.
Rate limit · 120 req/min · 60 per market
Request body
- Required
marketIdstring - Market ID. Must be type ORDER_BOOK and status ACTIVE.
- Required
outcomestring - Outcome label or engine ID. Ambiguous label/engine ID collisions return 400.
- Required
sidestring - "bid" (buy outcome) or "ask" (sell outcome).
- Required
typestring - Limit | Market | StopLoss | TakeProfit
- Optional
pricestring - Price decimal string with exactly 2 decimals. Required for Limit orders in (0,1). Optional for Market orders in [0,1]: maximum buy price or minimum sell price per fill; any unfilled remainder is cancelled. Omitted for Stop/TP.
- Optional
triggerPricestring - Trigger price decimal string in (0,1) with exactly 2 decimals. Required for StopLoss/TakeProfit.
- Optional
quantitystring | integer - Size in human shares: string with 0–2 decimals (e.g. "10", "1.2", "1.25"; min 0.01) or a legacy positive integer in whole contracts (10 = 10.00). Mutually exclusive with quoteQuantity.
- Optional
quoteQuantitystring - Cost cap decimal string in USD (> 0) with exactly 2 decimals. Notional-only by default; set budgetIncludesFees for an all-in Market/Limit buy budget. Mutually exclusive with quantity.
- Optional
budgetIncludesFeesboolean - Defaults to false. For Market/Limit bids with quoteQuantity, includes actual execution fees and any resting maker-fee reserve in the USD cap. Fee rates are selected automatically; do not pass a rate.
- Optional
clientOrderIdstring - Client id for later cancel/replace (1–64 chars, [A-Za-z0-9._:-], case preserved); returned as client_order_id. Unique among open orders for this balance in this market (all outcomes/API keys). Reusable after the order closes — not a placement retry receipt.
- Optional
postOnlyboolean - Defaults to false. Limit only: reject with 400 if postOnly is true and the order would immediately take direct or cross liquidity. Setting true on Market / StopLoss / TakeProfit is rejected. Supported on placement and replacement; quotes estimate execution without postOnly.
Authorization
Bearer token
Authorization: Bearer ak_your_key_hereBody application/json
curl -X POST https://api.unhedged.gg/api/v1/orders \
-H "Authorization: Bearer ak_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"marketId": "clx...",
"outcome": "YES",
"side": "bid",
"type": "Limit",
"price": "0.62",
"quantity": "100.00",
"clientOrderId": "bot-42",
"postOnly": true
}' {
"order": {
"id": "213",
"market_id": "clx...",
"outcome": "YES",
"side": "bid",
"type": "Limit",
"price": "0.62",
"quantity": "100.00",
"client_order_id": "bot-42",
"exec_id": "42",
"cum_quantity": "0.00",