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.
-
Compose the order on paper
Section titled “Compose the order on paper”venue,symbol,side,typeandqtyare the only required fields.typeis one ofmarket,limit,stop,stop_limit,take_profit. The route branches on the account kind, sovenue: "paper"against a live account is rejected withpaper_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"'"}'const { intentId, state, syncFill } = await sdk.oms.composeIntent({ venue: 'paper', symbol: 'BTC.HL', side: 'buy', type: 'market', qty: '0.01', accountId },crypto.randomUUID(), // idempotency key — retries replay instead of re-firing) -
Read the fill off the response
Section titled “Read the fill off the response”The paper engine matches synchronously, so the
201already carries the outcome.intentIdis the handle for every call after this one.{ "intentId": "3f2a…", "state": "filled","syncFill": { "qty": "0.01", "avgPrice": "64210.5" } } -
Send the same call to a live venue
Section titled “Send the same call to a live venue”Swap
venuetohyperliquidoraster. Type-specific fields are enforced at compose:limitneedsprice, the trigger types needtriggerPrice, andstop_limitneedsstopLimitPriceon 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"}'const { intentId } = await sdk.oms.composeIntent({ venue: 'hyperliquid', symbol: 'BTC.HL', side: 'buy', type: 'limit',qty: '0.01', price: '60000', timeInForce: 'Gtc' },crypto.randomUUID(),) -
Confirm the live intent reached the venue
Section titled “Confirm the live intent reached the venue”Read the intent back and check
state. Anything terminal (filled,rejected,canceled) is final;dispatchedmeans 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