Skip to content
Mosaiq

Mosaiq

Mosaiq is execution and margin infrastructure for systematic perpetual futures trading. One API gives a strategy access to supported markets on Hyperliquid, Hyperliquid HIP-3 DEXs, and Lighter, with one account-level view of cash, positions, open orders, and margin.

Mosaiq is an agency broker. It 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 caseInterface
Place, modify, and cancel ordersAuthenticated write WebSocket or POST /v1/exchange
Track order state and fillsorderUpdates and userFills on the read WebSocket
Recover after a disconnectGET /v1/openOrders plus fresh WebSocket snapshots
Read balances, positions, limits, and market constraintsGET /v1/clearinghouseState
Read effective trading feesGET /v1/fees
Fund the accountTracked deposit and withdrawal requests through POST /v1/exchange

The write WebSocket is the primary transport for latency-sensitive strategies. REST uses the same order model and is useful for simpler integrations and operations. See Optimizing latency before building a production order loop.

Execution contract

Orders use Mosaiq canonical asset symbols and an explicit venue code. The currently recognized venue codes are:

  • hyperliquid
  • hyperliquid:xyz
  • hyperliquid:mkts
  • lighter

Do not hardcode market availability. Read clearinghouseState.universe[*].venues and trade only entries whose status and constraints allow the intended action.

Limit orders support Ioc and Alo (post-only). 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 can contain up to 20 homogeneous actions.

Separate write requests may complete out of order. The write response, orderUpdates, and userFills are also 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, while positions and funding remain venue-scoped. An order is never treated as a position: positions change only when confirmed venue fills are settled into the Mosaiq ledger.

Venue collateral and rebalancing are operated by Mosaiq during the beta. The trader chooses execution; Mosaiq manages the venue accounts and collateral needed to support that execution.

Beta constraints

  • Access is allowlisted.
  • Read endpoints and the read WebSocket currently identify an account by its public EVM-style user address and are not authenticated.
  • User-order smart routing, Gtc, public SDKs, and the target non-custodial custody model are not live.
  • The published low-latency path and measurements currently apply to Hyperliquid execution only.

Continue with Getting Started.