Mango Markets · AsyncAPI Specification
Mango Markets v4 Feeds API
Version 1.0.0
AsyncAPI definition for the two public Mango Markets v4 WebSocket feed services operated by Blockworks Foundation: the Fills Feed (service-mango-fills) and the Orderbook Feed (service-mango-orderbook). Both services consume gRPC streams from a Solana validator running the mango-feeds geyser plugin and expose lowest-latency, bandwidth-conserving JSON over WebSocket for Mango V4 Perp markets and Openbook spot markets. Channels, command shapes, and message payloads are sourced from the service-mango-fills/README.md, service-mango-orderbook/README.md, and the TypeScript client (mango-feeds/ts/client/src/fills.ts and orderbook.ts).
View Spec
View on GitHub
CryptocurrencyDeFiDecentralized ExchangePerpetual FuturesSpotMarginOrderbookFillsMarket DataWebSocketSolanaMango v4AsyncAPIWebhooksEvents
Channels
/fills
Send a command to the Fills Feed server
Fills feed channel. Clients send command frames (getMarkets, subscribe, unsubscribe) and receive market lists, subscription acks, fill events, and (optionally) head updates for Mango V4 Perp and Openbook markets.
/orderbook
Send a command to the Orderbook Feed server
Orderbook feed channel. Clients send command frames (getMarkets, subscribe with subscriptionType=level or book, unsubscribe) and receive L2 / L3 checkpoints and per-side delta updates for Mango V4 Perp and Openbook spot markets.
Messages
GetMarketsCommand
Get Markets Command
Request the list of markets the server currently supports.
FillsSubscribeCommand
Fills Subscribe Command
Subscribe to fill events. Per the service-mango-fills README a client can subscribe by marketIds or by Mango account. The TypeScript client additionally documents marketId, accountIds, and a headUpdates flag.
FillsUnsubscribeCommand
Fills Unsubscribe Command
Unsubscribe from fill events for a given marketId.
OrderbookSubscribeCommand
Orderbook Subscribe Command
Subscribe to orderbook updates for a market. subscriptionType=level yields L2 checkpoint plus per-side L2 deltas; subscriptionType=book yields L3 checkpoint plus per-side L3 additions/removals.
OrderbookUnsubscribeCommand
Orderbook Unsubscribe Command
Unsubscribe from orderbook updates for a given marketId.
MarketsList
Markets List Response
Map of market pubkey -> market name returned in response to getMarkets.
SubscriptionAck
Subscription Acknowledgement
Server acknowledgement of a subscribe/unsubscribe command.
FillEventUpdate
Fill Event Update
Individual fill event for a Mango V4 Perp or Openbook market. status is 'new' for confirmed fills and 'revoke' when a fill that previously occurred on a fork is rolled back.
HeadUpdate
Head Update
Event-queue head pointer update, emitted when the client subscribed with headUpdates=true.
OrderbookL2Checkpoint
Orderbook L2 Checkpoint
Initial L2 snapshot delivered immediately after an L2 subscription is accepted. Contains both sides of the book as [price, quantity] pairs.
OrderbookL2Update
Orderbook L2 Update
Per-side L2 delta. Each entry in `update` is [price, quantity] where a quantity of 0 indicates a level removal.
OrderbookL3Checkpoint
Orderbook L3 Checkpoint
Initial L3 snapshot delivered immediately after an L3 subscription is accepted. ownerPubkey is a Mango account for perp markets and an open orders account for spot markets.
OrderbookL3Update
Orderbook L3 Update
Per-side L3 delta containing arrays of added and removed orders for a single side of the book.
Servers
wss
fills
fills.mngo.cloud
Public Mango v4 Fills Feed WebSocket server (service-mango-fills). Public API entrypoint: https://api.mngo.cloud/fills/v1/
wss
orderbook
orderbook.mngo.cloud
Public Mango v4 Orderbook Feed WebSocket server (service-mango-orderbook). Public API entrypoint: https://api.mngo.cloud/orderbook/v1/