Endpoints
Use the base URL supplied by Spire. The standard hostname ishttps://mm.baibai.cx.
spotMeta describes the available markets. The SDK resolves WETH/USDC to its spot asset. WETH-USDC uses a 0.01 USDC price tick and 0.0001 WETH size increment. Off-grid orders are rejected. Settlement remains on Base mainnet, chain ID 8453; see funding and withdrawals.
Supported orders
Batches return a result for each entry. Default modifications require the original order to be open and make a resting GTC replacement post-only. The Hyperliquid
always_place flag (a:true) can place the replacement even if the original has closed. Limits are 1000 open orders per master and 1000 entries per batch. GTC orders survive disconnects and gateway restarts. Use scheduleCancel for a deadman; disconnecting does not cancel orders. Arm the schedule before placing quotes: it also caps their published curve deadline, so expiry still applies if the gateway stops. A schedule change cannot rewrite a curve already on-chain. The minimum scheduling horizon is five seconds and at most ten scheduled cancellations may trigger per UTC day.
This adapter supports resting spot liquidity. Marketable orders, IOC/market orders, triggers, reduce-only, grouped orders, builder fees, perpetuals, and vault delegation are rejected. Hyperliquid funding and withdrawal actions are not supported; use BaiBai’s custody flow.
Integration checklist
Obtain maker approval, fund your master wallet, and wait for available inventory. Then use one nonce allocator per signing key, track order IDs, and persist fills using theirtid. On reconnect, query open orders and fill history; do not replace your entire book. See signing, WebSocket requests, and fills.
An accepted cancellation removes an order from the gateway. Its earlier on-chain curve may still execute until replaced or expired. Those fills retain the original order ID, including after a modification. The general docs explain curves and allocation and settlement timing.