Skip to main content
Five commands: get a key, find a market, orient, place an order, cancel it and check your balance. You need a SOAR account and curl. Nothing to install. Every response below is real output from running these exact commands.

1. Create a key

Sign in to SOAR and create an API key with the read and trade scopes. You need both — scopes do not nest, and a trade-only key cannot read back the order it just placed. The key is shown once. Save it:
Full details, including the 10-key limit and how to revoke: Authentication.

2. Find something to trade

That is one rung of a ladder. To see the whole ladder at once, ask for its event:
Note strike_value and the fee rates are decimal strings, not numbers — at these magnitudes a float would lose precision. And cursor is the empty string because this is the last page; it is never absent.

3. Orient in one call

snapshot returns the market, the book, the last trade, the stats, and your position and resting orders in it — everything a decision needs, in one round trip.
Best bid 76¢, best ask 78¢. positions and resting_orders are empty arrays because this account holds nothing here yet — empty collections are always [], never null. trade_id is opaque: use it to deduplicate, never to sort. Order by created_at.

4. Place an order

A gtc buy at 3¢ — far below the bid, so it rests instead of trading. Exactly what you want the first time.
That status is already the real outcome, not an acknowledgement. Matching happened before the response came back. open means nothing traded and the order is resting; had it crossed, you would have filled or partially_filled here.An ioc order that finds no liquidity comes back canceled — there is nothing to wait for. Order lifecycle →
Two fields to handle carefully:
  • order_id is a string of digits. It exceeds what a JavaScript number represents exactly. Parse it as a number and you will eventually cancel an order that does not exist.
  • client_order_id is yours, unique among your own orders. Re-sending the same one returns the existing order rather than creating a second — which is what makes a retry safe when a write returns 503 result_unknown. Read that before going live →
You can watch that dedup work right here: run this command twice unchanged and the second response is the same order_id as the first, in whatever state that order has reached. Use a fresh client_order_id when you actually want a second order.

5. Cancel it, and check your balance

While the order rests, its collateral is held. Check first:
Four cents reserved for a 1-share buy at 3¢: the 3¢ you bid plus the 1¢ fee that trade would incur. The venue reserves what the order could cost you, not just the price. Now cancel it, using the order_id from your own step 4 response — the one below is from this transcript and is long since canceled:
reduced_by is the quantity the cancel actually pulled off the book — 1, the whole order. Had part of it filled while your request was in flight, this would be smaller, and that number is the truth rather than what you assumed you were canceling.
reserved_cents is back to zero and available_cents is whole again: the collateral is released the moment the cancel is acknowledged. All amounts are integer cents — 5000000 is $50,000.

What next

Survival ladders

Why five rung prices describe a whole valuation distribution.

Binary markets

Why buy no and sell yes are the same order, and why there are no shorts.

Errors

The code vocabulary, what to retry, and result_unknown.

API reference

Every endpoint, with a playground that sends real requests.
Testing against staging instead? Same paths, different host: https://api.staging.trysoar.com/v1. Keys are per-environment.