How it works
One socket carries all of it. There is no subscription step: once the session is open, it receives every update for your account. The reads of orders, mints, burns, cash and your redemption balance are also served as signed
GET requests, for when you only need to ask: see Reads over HTTP.
The whole picture
- Connect to the socket and open a session with a signed
hello.get_symbolslists what you can trade, and on which chains. - Buy:
place_orderwith sideB. Theackmeans the order was taken; the fills arrive asorder_updatedandtrade_updated. CETs are minted to your wallet as the order fills, often in more than one mint, and each mint is pushed asmint_updated. - Sell: send the CETs to the redemption wallet, then
place_orderwith sideSand aquantity. The CETs are burned as the order fills, and each burn is pushed asburn_updated. - Reconcile:
get_order,get_mintsandget_burnssay what happened, whatever the stream delivered.
Sandbox and authentication
Connect, sign, open a session.
Buy shares and receive CETs
Place a buy and reconcile the CETs minted.
Sell shares and redeem CETs
Return the CETs, place the sell, reconcile the burns.
Track, cancel and reconcile orders
The stream, disconnects,
UNKNOWN, cancels and executions.Cash
Your own cash, its movements, and what a buy is checked against.
Go-live checklist
What to check in sandbox before production.
Before you start
- An agreement with Securitize. It sets the symbols you can trade and the CET each one maps to, which
get_symbolslists with their chains.get_redemption_addressanswers the redemption wallet of each CET. - Two registrations with Securitize: your Ed25519 public key, and the wallet that receives your CETs.
- Sandbox is where you build and test. See Sandbox and authentication.
- Production uses the same messages at a production endpoint, arranged with Securitize once your integration passes the go-live checklist.
What makes this API different
- An
ackis not a fill. It says the order was taken. Fills arrive afterwards, pushed. - The stream is a convenience, not a record. Updates are delivered at most once and nothing is queued while you are disconnected. After any gap, the reads say where things stand.
- A sell needs its CETs first. A sell is refused unless CETs you transferred to the redemption wallet, and that are not held by your other sells, cover it (
get_redemption_balance). It must be placed byquantity. - A buy is paid from your own cash. It is a
LIMITorder byquantity, and its cost at the limit, plus fees, is held against youravailable(get_cash_balance_v2) before it reaches the broker. A buy that cash does not cover is refused. externalRefis your idempotency key. A reference an order already uses is refused, never duplicated, so resending after a timeout is safe. An order Securitize refuses before sending it leaves its reference usable; one the broker refused keeps it for the rest of the day, so send the order again under a new reference.- Every amount is a decimal string, in both directions. Compare amounts as decimals, never as strings.