Mosaiq
Mosaiq is an agency broker for perpetual futures. One API gives a strategy access to markets on Hyperliquid, Hyperliquid HIP-3 DEXs, and Lighter, with one account-level view of cash, positions, open orders, and margin.
Mosaiq has no order book and does not trade against users. Every order names its execution venue. Mosaiq validates the order, checks account risk, forwards it to that venue, and settles only confirmed fills.
API at a glance
| Use case | Interface |
|---|---|
| Place, modify, and cancel orders | Write WebSocket or POST /v1/exchange |
| Consume BBO or full L2 books | bbo and l2Book on the market-data WebSocket |
| Track order state and fills | orderUpdates and userFills on the user-data WebSocket |
| Recover after a disconnect | GET /v1/openOrders, GET /v1/userFills, and fresh WebSocket snapshots |
| Read balances, positions, limits, and market constraints | GET /v1/clearinghouseState |
| Read effective trading fees | GET /v1/fees |
| Fund the account | Deposit and withdrawal requests through POST /v1/exchange |
The write WebSocket is the transport for latency-sensitive strategies. REST uses the same order model. See Optimizing latency before building a production order loop.
Execution contract
Orders use Mosaiq canonical asset symbols and an explicit venue code. Venue
codes are opaque strings returned by data.universeData.universe[*].venues.
Codes defined today are hyperliquid, hyperliquid:xyz, hyperliquid:mkts,
hyperliquid:io, hyperliquid:para, and lighter; the live set is whatever
universe returns. Do not hardcode market availability: trade only entries
whose status and constraints allow the intended action.
Limit orders support Ioc and Alo (post-only). Gtc is rejected. Market
orders are bounded IOCs: the request supplies a maximum slippage and Mosaiq
derives a venue-side limit from that venue's reference price. Place, modify,
and cancel requests carry up to 20 homogeneous actions.
Separate write requests may complete out of order. The write response,
orderUpdates, and userFills are independent streams, so a lifecycle event
can arrive before the matching write response.
Account model
Mosaiq exposes one cross-margin account. Cash and risk are evaluated at account level. Positions and funding remain venue-scoped, and margin is charged per venue leg. Positions change only when confirmed venue fills are settled into the Mosaiq ledger.
Integration constraints
- Access is allowlisted per wallet.
- Read endpoints and the user-data WebSocket identify an account by its public
EVM
useraddress and are not authenticated. - Every order selects one venue; Mosaiq never reroutes it.
- The published low-latency path applies to Hyperliquid execution only.
Continue with Getting Started.