Public endpoints use live exchange adapters. Supported private reads use native Rust adapters and require an owned, verified connection. Trading, transfers, withdrawals and account-setting changes remain locked pending certification and execution safeguards. Examples use your local services.
01 / GET STARTED
One request. A familiar response.
Start with public data, then use the same conventions for every family. Exchange support is checked separately for each operation.
1. Start Ordien locally
Install frontend dependencies and the Rust toolchain from the repository setup. The exchange backend runs directly in Rust. Public routes need no database.
Switch venue to use another exchange. Browse markets to discover valid symbols. For Coinbase and Kraken, try BTC/USD.
No hosted production URL is advertised. Private endpoints additionally require the trading API, migrations through 0008, OIDC and encrypted connection storage described in the repository setup.
02 / API REFERENCE
Explore every function.
51 operations
9 functions
Get a ticker
Public read
GET/api/v1/market-data/ticker
Best bid / ask, last price and rolling exchange statistics for one market. Missing exchange fields are null.
Capability details load from the running service.
Response
Run a request to inspect the real normalized response.
Unified market symbol. Perpetual example: BTC/USDT:USDT; listings differ by venue.
market_typeoptional
string
Account / market category. Use a settled symbol for derivatives.spot · swap · future · option
allow_emulatedoptional
boolean
Explicitly opt in to adapter emulation. Default false. Composed operations may differ from native exchange behavior; Ordien never substitutes linked or atomic order guarantees.
Response model Ticker
Responses include version, operation, venue, market_type, received_at, transport, implementation and data. Monetary values are decimal strings. Missing exchange fields may be null or omitted.
Data field
Type
Meaning
symbol
string
Unified market identifier.
bid
decimal
Best bid, or null if unavailable.
ask
decimal
Best ask, or null if unavailable.
last
decimal
Last traded price.
open
decimal
Optional rolling 24-hour opening price; a display may derive percentage change from this and last.
percentage
decimal
Rolling 24-hour percentage change, already multiplied by 100; null if unavailable.
base_volume
decimal
Rolling base volume where available.
quote_volume
decimal
Rolling quote volume where available.
timestamp
timestamp
Exchange observation time; null if absent.
statistics_timestamp
timestamp
Optional native observation time for rolling statistics, independent of price updates; never advance it on BBO-only updates.
mark_price
decimal
Optional perpetual mark price carried by the native ticker.
index_price
decimal
Optional index price carried by the native ticker.
funding_rate
decimal
Optional current funding rate as a fraction, not percent.
next_funding_timestamp
timestamp
Optional next funding settlement time; not a predicted rate.
open_interest_amount
decimal
Optional open interest in native market units.
open_interest_value
decimal
Optional quote notional open interest.
funding_interval_hours
decimal
Funding interval in hours only where explicitly supplied.
Additional normalized fields can be returned. Raw exchange payloads and credential fields are excluded.
03 / AUTHENTICATION
One Ordien key for your application.
Public market data and public streams need no key. Private reads require a scoped Ordien bearer key or an approved browser session, plus an owned, verified connection ID. Check capabilities for each venue and account context. Exchange secrets stay in encrypted backend storage.
Private orders & fills reads on connections owned by the key’s user.
accounts:read
Private accounts reads on connections owned by the key’s user.
derivatives:read
Private derivatives reads on connections owned by the key’s user.
funding:read
Private funding & withdrawals reads on connections owned by the key’s user.
streams:read
Private streaming reads on connections owned by the key’s user.
family:write
Authorizes a mutation request. The execution lock still applies.
Create and manage application keys
Sign in through the configured OIDC provider. The key-management routes accept the approved browser session; application keys cannot mint other keys.
Browser console · approved local session
const response = await fetch("/api/v1/api-keys", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
label: "Local integration",
scopes: ["accounts:read", "trading:read", "funding:read", "derivatives:read", "streams:read"],
expires_in_days: 30
})
});
if (!response.ok) throw new Error(await response.text());
const key = await response.json(); // token is shown only once
// Save key.token in your server secret store.
GET /api/v1/api-keys lists key metadata. DELETE /api/v1/api-keys/{id} revokes an owned key. Mutations require a matching Origin and JSON content type. Keys expire in 1–90 days, are stored as hashes, and must have at least five minutes remaining to authenticate.
POST /api/v1/connections stores exchange credentials encrypted, in pending-verification status. Private reads reject unverified connections. This release does not offer automatic permission verification; approved operational verification is still required.
04 / SHARED CONVENTIONS
Common fields. Explicit differences.
01
Market identity
Use BTC/USDT for spot and BTC/USDT:USDT for a settled perpetual, with market_type=swap. Discover expiry and option symbols through markets. Symbols do not imply identical listings.
02
Money as strings
Prices, quantities and fees use decimal strings. Precision already lost in upstream numeric data cannot be recovered. Contract amounts may count contracts; inspect contract_size and market limits. Use decimal arithmetic in your application.
03
Time and missing data
Times use Unix milliseconds. received_at is Ordien receipt time; timestamp is exchange time. Missing fields are null or omitted, never fabricated.
History reads return bounded exchange-supported windows. Use since and limit, advance from returned timestamps, and deduplicate by ID. A short page does not prove history is complete; exchange retention and timestamp-boundary behavior vary. History has no universal cursor. Complete balance/account snapshots drain bounded native pagination or fail.
The original /api/markets/quote remains available with its original base / quote schema and 750 ms cache. New integrations should use the family endpoints documented here.
05 / EXCHANGE CAPABILITIES
One API. Explicit differences.
Check three things separately: what the exchange documents, what Ordien implements, and what access a request requires. Missing adapter coverage never proves that an exchange lacks a feature.
Get a ticker · spot
Exchange
Exchange evidence
Ordien implementation
Access & availability
Binance
Not loaded
Not loaded
Not loaded
Bybit
Not loaded
Not loaded
Not loaded
Bitget
Not loaded
Not loaded
Not loaded
Coinbase
Not loaded
Not loaded
Not loaded
Kraken
Not loaded
Not loaded
Not loaded
OKX
Not loaded
Not loaded
Not loaded
KuCoin
Not loaded
Not loaded
Not loaded
01
Common operations
Shared names and schemas where behavior matches. Product listings, networks, depth and history still depend on the exchange.
02
Optional capabilities
Discover support before calling. Emulated operations require allow_emulated=true; their responses identify the implementation.
03
Native extensions
Exchange-specific semantics stay visible. Linked orders, collateral rules and atomic spread execution are never silently replaced.
GET/api/v1/capabilities?market_type=spot
Schema v2 covers 51 operations across seven adapters. exchange_support, nexus_support and account_access are separate fields. “Not independently verified” means we have adapter metadata, without separate exchange documentation for that operation.
This public registry does not inspect your connection, account mode, location or network permissions. A verified connection can still be denied access by the exchange. “Outside this extension” describes its named scope; it makes no claim about equivalent features elsewhere.
06 / EXCHANGE EXTENSIONS
Keep the features that make a venue different.
Typed Ordien endpoints preserve native product rules. Public reads are available now; authenticated reads require a verified connection. Private mutation contracts remain locked.
OKXPublic read
OKX spread instruments
Discover OKX Nitro Spreads, their legs and sizing rules. Spread IDs and size currencies retain their exchange meaning.
Contract for an OKX Nitro Spreads limit order. Linked legs fill in matching quantities or neither; partial spread fills remain possible. Execution remains locked.
These are the first five explicit extensions, not an exhaustive inventory of exchange-specific APIs. Each publishes its source, review date, requirements and supported subset in /api/v1/catalog and OpenAPI.
PUBLIC MARKET DELIVERY
One connection for visible markets.
GET /api/v1/public/multiplex combines native ticker, order-book and recent-trade streams. Its request query parameter contains URL-encoded JSON. This public transport is separate from the exchange operation catalogue.
Public delivery request · encode as the request query parameter
Subscribe to at most 15 unique feeds, including at most 13 tickers. The Markets page reserves 12 ticker rows for the visible picker. Unknown fields, private context and mutations are rejected. Optional ticker seeds arrive as labelled snapshot events; native values arrive as update events. Both carry version: 1, subscription_id and the original envelope. A row’s error terminates that row without changing its last receipt.
Connection sequences reset on renewal. The preserved stream_origin identifies the original ingestion stream and ordinal across relays. Trade subscriptions can request checkpoint: true to receive one control cursor before data. It contains no trade or fresh timestamp. An equal retained cursor proves a quiet handover; an ahead cursor waits for actual delivery of the missing trades. Retained recent trades use a bounded handover, deduplicate overlap and explicitly reconcile an origin or ownership change or gap. No durable history replay is implied. Source timestamps and receipt times are never rewritten.
A trade subscription needs its own validated checkpoint or first trade before connection activity can establish liveness. After admission, an exact standalone : keep-alive comment or validated native event keeps that transport healthy during a quiet market. This does not prove new trading activity or change the age of any displayed trade. Book and ticker freshness still require native data; arbitrary comments and REST snapshots do not refresh transport health.
Deployment and browser integration
Build the frontend with NEXT_PUBLIC_NEXUS_PUBLIC_DELIVERY=multiplex to enable shared delivery. This value is fixed at build time. Production reverse proxies must route the same-origin /api/v1/public/multiplex path directly to Rust. The Next.js route is a local byte-relay fallback. Browser requests omit credentials; private reads retain their separate authenticated routes.
The client uses one steady-state connection and at most two during a ten-second trade handover. Subscription changes are batched; quiet rows recover independently, and reconnects use jitter. These bounds and local tests do not certify a million concurrent viewers. Execution remains locked.
Ordien delivers supported public WebSocket updates as Server-Sent Events over HTTP. Supported private streams poll authenticated REST reads with explicit emulation opt-in. Use the streaming family in the explorer to start and stop subscriptions.
SSE framing · illustrative
event: update
data: {"operation":"streams.ticker","sequence":1,"transport":"sse","data":{"symbol":"BTC/USDT","bid":"62480.10"}}
event: error
data: {"code":"stream_closed","message":"Reconnect and reconcile via REST.","retryable":true}
01
Connection-local sequence
sequence counts Ordien events on this connection. It is not an exchange sequence or a resumable cursor. Last-Event-ID replay is not supported.
02
Reconcile after reconnect
Connections last at most five minutes, with 15-second keepalives after the first update. Reconnect with jittered backoff and fetch a REST snapshot. Deduplicate trades and fills by exchange ID.
03
Understand event semantics
Check capabilities before subscribing. Native Bybit books and Binance candles preserve exact decimal text. Other public stream mappings depend on venue capabilities. Available candle updates may revise an open interval. Trade batches can overlap. Quiet public streams end after 60 seconds without an update. Private streams poll five seconds after each completed read; orders are open-order snapshots and fills are bounded pages.
Private streams recheck current authentication, ownership and verified connection state before and after every upstream read. Revocation ends delivery before another request. Private data is never shared through public caches.
08 / ERRORS & LIMITS
Failures you can handle.
Normalized error
{
"error": {
"code": "nexus_not_implemented",
"message": "The installed Ordien adapter does not implement this operation. Exchange support is a separate question.",
"retryable": false
}
}
Status
Meaning
Action
400
Invalid parameters or missing idempotency key
Fix the request before retrying.
401 / 403
Authentication, scope or connection verification
Check the Ordien key and verified connection.
404
Unknown operation or connection
Use the catalogue and an owned connection.
409
Emulation opt-in or exchange nonce rejection
For emulation, review capabilities before opting in. For exchange_nonce_rejected, check clock synchronization and nonce ordering.
422
Adapter gap, extension scope or unsupported request context
Distinguish nexus_not_implemented, extension_not_applicable and adapter_context_unsupported.
403
Exchange access denied
Check product and account permissions; region eligibility is not inferred.
423
Execution locked or authentication not ready
No mutation was sent. For authentication_not_ready, inspect the capability blocker before retrying.
429
Shared concurrency or exchange rate limit
Back off with jitter; Retry-After is not guaranteed.
502
Invalid exchange data or adapter response
Reject the response and investigate the normalization or adapter failure.
503 / 504
Unavailable service or request timeout
Retry bounded read failures; never blindly retry a mutation.
32concurrent native private reads
15 snative exchange read deadline
5 minmaximum stream lifetime
The private gateway also bounds authentication and storage waits within a 20-second read deadline. These are development implementation limits, not an SLA or published per-user quota. Malformed transport bodies, legacy routes and reverse proxies may return a different error format. Check status and content type before decoding.
Take the complete contract with you.
All six families, schemas, scopes and execution availability.