Skip to content
Mosaiq

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 caseInterface
Place, modify, and cancel ordersWrite WebSocket or POST /v1/exchange
Consume BBO, full L2 books, or Hyperliquid tradesbbo, l2Book, and trades on the market-data WebSocket
Track order state and fillsorderUpdates and userFills on the user-data WebSocket
Learn when a liquidation of the account starts and endsuserEvents on the user-data WebSocket
Recover after a disconnectGET /v1/openOrders, GET /v1/userFills, and fresh WebSocket snapshots
Read balances, positions, limits, and market constraintsGET /v1/clearinghouseState
Chart account value, PnL, and returnGET /v1/portfolioHistory
Compare the reserves with what Mosaiq owes its clientsGET /v1/liabilities
Read the venue points that you earnedGET /v1/points
Read effective trading feesGET /v1/fees
Fund the accountDeposit and withdrawal requests through POST /v1/exchange
Trade from several accountsSub-accounts
Learn of a Mosaiq stop or a venue maintenance in advanceGET /v1/maintenance, or maintenance on any WebSocket

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 in data.assetData.universe[*].venues[*].venue of clearinghouseState. Do not hardcode venue codes or market availability. Trade only on entries whose lifecycle and constraints allow the intended action.

Limit orders support Ioc and Alo (post-only). Mosaiq rejects Gtc. A market order is a bounded IOC. The request gives a maximum slippage, and Mosaiq derives a limit price from the venue's reference price. One place, modify, or cancel request carries up to 20 actions of the same type.

Separate write requests can 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

Each account is cross-margined. One USDC balance backs every position and open order of the account, on every venue. Positions and funding stay per venue, and margin is charged per venue leg.

A position changes only by a fill that userFills shows:

  • A confirmed venue fill of one of your orders, or of a liquidation order.
  • A House takeover of a liquidation remainder that is too small for the venue (Liquidation).
  • The close of a position on a market that its venue settled (GET /v1/userFills).

An accepted order alone never changes a position.

An owner wallet has one master account and can open sub-accounts. Each sub-account has its own cash, positions, margin, and API key.

Integration constraints

  • Access is allowlisted per wallet.
  • Read endpoints and the user-data WebSocket take the public EVM user address of an account, with no authentication.
  • Every order names one venue. Mosaiq never sends it to another venue.
  • Mosaiq validated the low-latency path on Hyperliquid venues only.