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. The route branches on the account kind, so venue: "paper" against a live account is rejected with paper_venue_requires_paper_account.

    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. Swap venue to hyperliquid or aster. Type-specific fields are enforced at compose: limit needs price, the trigger types need triggerPrice, and stop_limit needs stopLimitPrice on top of that.

    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":"hyperliquid","symbol":"BTC.HL","side":"buy","type":"limit",
    "qty":"0.01","price":"60000","timeInForce":"Gtc"}'
  4. Read the intent back and check state. Anything terminal (filled, rejected, canceled) is final; dispatched means it is resting at the exchange.

    Terminal window
    curl -s https://api.troncharts.xyz/api/v1/oms/intents/$INTENT_ID \
    -H "authorization: Bearer $TOKEN" \
    -H "x-tenant-slug: $TC_TENANT_SLUG"

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