Skip to main content
This section covers Ondo-specific behavior that goes beyond the generic SDK documentation. For general concepts, see the Concepts section. Ondo Perps authenticates trading with a Sign-In-With-Ethereum (SIWE) session. After a one-time wallet sign-in the SDK holds a venue session credential and a venue API key, both kept client-side. Trading actions are unsigned venue requests the SDK HMAC-signs with that API key before the backend relays them to the venue (see Signing Model).

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: ISOLATED on placeOrder / updateLeverage is rejected.
  • Order types: LIMIT and MARKET only. price is required for a limit order and is validated on the market’s price grid; size is validated on the size grid.
  • Time-in-force: GTC, IOC, and POST_ONLY (post-only submits as GTC with the post-only flag set).
  • Order expiry: not supported — expiresAt must be omitted.
  • Trigger legs: take-profit / stop-loss execute at market; a limitPrice on 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 returned toAddress.

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 in supportedIntervals: 1m, 5m, 15m, 1h, 4h, 1d, 1w. Requesting any other interval raises a validation error.
  • 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