sFOX WebSocket API

Real-time streaming API for market data (order book, trades, ticker) and private account data (open orders, trades, balances, post-trade settlement). Authenticate then subscribe to feeds.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/sfox-websocket-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

AsyncAPI Specification

sfox-websocket-asyncapi.yml Raw ↑
asyncapi: 2.6.0
info:
  title: sFOX WebSocket API
  version: '1.0.0'
  description: >-
    Real-time streaming API for sFOX. Clients connect over WSS, authenticate with
    their API key (for private feeds), then subscribe/unsubscribe to feeds via a
    JSON control message: { "type": "subscribe", "feeds": ["<feed>", ...] }.
    This AsyncAPI document is GENERATED by the API Evangelist enrichment pipeline
    from the public sFOX WebSocket documentation (not published by sFOX).
  x-provenance:
    generated: '2026-07-21'
    method: generated
    source: https://docs.sfox.com/websocket-api/introduction
servers:
  production:
    url: ws.sfox.com/ws
    protocol: wss
    description: Production WebSocket endpoint (wss://ws.sfox.com/ws).
  sandbox:
    url: ws.staging.sfox.com/ws
    protocol: wss
    description: Sandbox WebSocket endpoint (access on request via support).
defaultContentType: application/json
channels:
  orderbook.net.{basequote}:
    description: Real-time net order book for a currency pair.
    parameters:
      basequote:
        description: Currency pair, e.g. btcusd.
        schema:
          type: string
    subscribe:
      operationId: subOrderbookNet
      message:
        $ref: '#/components/messages/OrderBookUpdate'
  orderbook.sfox.{basequote}:
    description: Real-time sFOX order book for a currency pair.
    parameters:
      basequote:
        schema:
          type: string
    subscribe:
      operationId: subOrderbookSfox
      message:
        $ref: '#/components/messages/OrderBookUpdate'
  trades.sfox.{basequote}:
    description: Real-time tick data of publicly executed trades.
    parameters:
      basequote:
        schema:
          type: string
    subscribe:
      operationId: subTrades
      message:
        $ref: '#/components/messages/TradeTick'
  ticker.sfox.{basequote}:
    description: Real-time day OHLCV and last-trade ticker.
    parameters:
      basequote:
        schema:
          type: string
    subscribe:
      operationId: subTicker
      message:
        $ref: '#/components/messages/Ticker'
  private.user.open-orders:
    description: Real-time updates to your open orders (auth required).
    subscribe:
      operationId: subUserOpenOrders
      message:
        $ref: '#/components/messages/UserOrderUpdate'
  private.user.trades:
    description: Real-time updates of your completed trades (auth required).
    subscribe:
      operationId: subUserTrades
      message:
        $ref: '#/components/messages/UserTradeUpdate'
  private.user.balances:
    description: Real-time updates to your account balances (auth required).
    subscribe:
      operationId: subUserBalances
      message:
        $ref: '#/components/messages/BalanceUpdate'
  private.user.post-trade-settlement:
    description: Real-time post-trade-settlement credit and risk updates (auth required).
    subscribe:
      operationId: subUserPTS
      message:
        $ref: '#/components/messages/PostTradeSettlementUpdate'
components:
  messages:
    OrderBookUpdate:
      name: orderBookUpdate
      title: Order book update
      payload:
        type: object
        properties:
          recipient:
            type: string
          sequence:
            type: integer
          timestamp:
            type: integer
          payload:
            type: object
    TradeTick:
      name: tradeTick
      title: Public trade tick
      payload:
        type: object
    Ticker:
      name: ticker
      title: Ticker (day OHLCV + last trade)
      payload:
        type: object
    UserOrderUpdate:
      name: userOrderUpdate
      title: Private open-order update
      payload:
        type: object
    UserTradeUpdate:
      name: userTradeUpdate
      title: Private trade update
      payload:
        type: object
    BalanceUpdate:
      name: balanceUpdate
      title: Private balance update
      payload:
        type: object
    PostTradeSettlementUpdate:
      name: postTradeSettlementUpdate
      title: Post-trade-settlement credit/risk update
      payload:
        type: object
  securitySchemes:
    apiKey:
      type: httpApiKey
      in: user
      name: authenticate
      description: >-
        Private feeds require an `authenticate` control message carrying the sFOX
        API key before subscribing.