Skip to content

Place your first order

Every order is an intent: you compose it, the OMS risk-gates it, then it dispatches. Placing on a paper account runs that entire pipeline with no venue key, so you end up with a filled order and a position you can read back.

  1. venue, symbol, side, type and qty are the only required fields. type is one of market, limit, stop, stop_limit, take_profit. Every account trades paper today, so venue is always "paper"; any other venue answers 403 {"error":"live_accounts_disabled"}. See Paper-only mode.

    Terminal window
    curl -s https://api.troncharts.xyz/api/v1/oms/intents \
    -H "authorization: Bearer $TOKEN" \
    -H "x-tenant-slug: $TC_TENANT_SLUG" \
    -H 'content-type: application/json' \
    -H "idempotency-key: $(uuidgen)" \
    -d '{"venue":"paper","symbol":"BTC.HL","side":"buy","type":"market",
    "qty":"0.01","accountId":"'"$ACCOUNT_ID"'"}'
  2. The paper engine matches synchronously, so the 201 already carries the outcome. intentId is the handle for every call after this one.

    { "intentId": "3f2a…", "state": "filled",
    "syncFill": { "qty": "0.01", "avgPrice": "64210.5" } }
  3. Type-specific fields are enforced at compose: limit needs price, the trigger types need triggerPrice. On paper a stop_limit takes its resting limit from price and ignores stopLimitPrice. A limit away from the market comes back without syncFill and stays working.

    Terminal window
    curl -s https://api.troncharts.xyz/api/v1/oms/intents \
    -H "authorization: Bearer $TOKEN" \
    -H 'content-type: application/json' \
    -H "idempotency-key: $(uuidgen)" \
    -d '{"venue":"paper","symbol":"BTC.HL","side":"buy","type":"limit",
    "qty":"0.01","price":"60000","timeInForce":"Gtc"}'
  4. Subscribe to Order-Intent-Changed on /ws/risk before you place, and match Order-Intent-Update frames on the intentId: they carry every state change up to the terminal one (filled, rejected, canceled). To read the working book over REST, list the account’s open orders; the venueOrderId there is what POST /api/v1/oms/cancel takes.

    Terminal window
    curl -s https://api.troncharts.xyz/api/v1/accounts/$ACCOUNT_ID/orders \
    -H "authorization: Bearer $TOKEN"

Next: Attach a take-profit and stop-loss · Cancel an order or close a position · Orders & OMS