ondoProvider(options) accepts apiUrl (defaults to production; pass ONDO_SANDBOX_API_URL to trade against the sandbox venue) and storage (a StorageAdapter for the session token and API key; defaults to the SDK’s encrypted localStorageAdapter, the same default Hyperliquid uses — not raw browser localStorage).
Topics
- Signing Model — The SIWE session, the HMAC-signed trading relay, and the client-only session steps
- Setup — SIWE login, deposit-address provisioning, terms acceptance, trading-key creation, and referral
- Trading — All trading actions with parameters and Ondo’s order constraints
- WebSocket Protocol — The native WebSocket endpoint and how the SDK discovers it
Defaults & assumptions
- Margin mode: cross only. Passing
marginMode: ISOLATEDonplaceOrder/updateLeverageis rejected. - Order types:
LIMITandMARKETonly.priceis required for a limit order and is validated on the market’s price grid;sizeis validated on the size grid. - Time-in-force:
GTC,IOC, andPOST_ONLY(post-only submits asGTCwith the post-only flag set). - Order expiry: not supported —
expiresAtmust be omitted. - Trigger legs: take-profit / stop-loss execute at market; a
limitPriceon a trigger is rejected. - Quote asset: USDC. The provider advertises a single trading category (
ondo). - Deposits:
getDepositFlow()provisions a per-user Ethereum USDC margin-wallet address behind the SIWE session; route to the returnedtoAddress.
Leverage
Ondo markets are cross-margin only. The maximum leverage is 10x by default, and 20x for index, commodity, and equity markets —US100, US500, XAU, XAG, WTI, and AAPL. The maintenance margin rate is half the initial rate at maximum leverage.
Candle intervals
The provider advertises these OHLCV intervals insupportedIntervals: 1m, 5m, 15m, 1h, 4h, 1d, 1w. Requesting any other interval raises a validation error.
Unsupported operations
The Ondo provider has nowithdraw, sendAsset, modifyOrder, or updatePositionMargin methods, and advertises no account options — there is no post-setup tuning descriptor to run. Deposits are the only funds-movement path, via getDepositFlow().
Account reads
getOrderrequires an active SIWE session. With no session, it throws instead of returning an empty result — runsiweLoginfirst.getRunningTwapsalso reads through the session, but returns an empty array rather than throwing when the session is missing.getActivityreturns onlyFUNDING,LIQUIDATION,DEPOSIT, andWITHDRAWALitems.TRANSFERis Lighter only.
Account figures
PerpsClient.getAccountSummary() builds the AccountSummary totals for Ondo directly from the venue’s account balance:
A logged-out account reads no venue balance and summarizes as zero.
getWithdrawableBalances() reads the venue’s withdrawableMargin figure for the perps route — the only route Ondo advertises.
Related Pages
- Concepts — The action pattern, streaming, and multi-provider support
- SDK / Streaming — Subscribe to live market data and user events via WebSocket
- SDK / Account — Fetch account balances, positions, and fills
- SDK / Trading — Place orders, cancel orders, and query order status
- SDK / Actions — The create -> sign -> execute pattern for all operations