Skip to content
UNHEDGED / DOCS

Search documentation

Browse docs or start typing to find a topic

↑ ↓ to navigate Enter to open Esc to close

Place Order

POST https://api.unhedged.gg/api/v1/orders

Creates a Limit, Market, StopLoss, or TakeProfit order on an ORDER_BOOK market. On acceptance, cost moves from available balance to lockedEngine.

Configure request

Request

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

marketId string
Required
Market ID. Must be type ORDER_BOOK and status ACTIVE.
outcome string
Required
Outcome label or engine ID. Ambiguous label/engine ID collisions return 400.
side string
Required
"bid" (buy outcome) or "ask" (sell outcome).
type string
Required
Limit | Market | StopLoss | TakeProfit
price string
Optional
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.
triggerPrice string
Optional
Trigger price decimal string in (0,1) with exactly 2 decimals. Required for StopLoss/TakeProfit.
quantity string | integer
Optional
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.
quoteQuantity string
Optional
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.
budgetIncludesFees boolean
Optional
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.
clientOrderId string
Optional
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.
postOnly boolean
Optional
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_here
Body 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
}'
Response
{
  "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",