Get Order Book

Order book snapshot for a currency pair.

Orderbook

GET https://api.sfox.com/v1/markets/orderbook/:pair

Get the blended L2 orderbook data of our connected exchanges, including the top bids and asks and the location of those bids and asks

Path Parameters

NameTypeDescription

pair

string

The pair or product to trade in the format: (i.e. "btcusd", "ethbtc", "usdteth") Default: "btcusd"

{
  "bids": [
    [
      9458.12,
      1e-08,
      "gemini"
    ],
    [
      9456,
      1,
      "itbit"
    ],
    [
      9453,
      0.73553115,
      "itbit"
    ],
    // truncated
  "asks": [
    [
      9455.55,
      2.03782954,
      "market1"
    ],
    [
      9455.56,
      0.9908,
      "market1"
    ],
    [
      9455.59,
      0.60321264,
      "market1"
    ],
    // truncated
  "market_making": {
    "bids": [
      [
        9447.34,
        2,
        "bitstamp"
      ],
      [
        9452.01,
        0.60321264,
        "market1"
      ],
      [
        9452.31,
        0.47488688,
        "bittrex"
      ],
      [
        9456,
        1,
        "itbit"
      ],
      [
        9458.12,
        1e-08,
        "gemini"
      ]
    ],
    "asks": [
      [
        9458.13,
        2.07196048,
        "gemini"
      ],
      [
        9457.75,
        0.14748797,
        "itbit"
      ],
      [
        9456,
        0.1686167,
        "bittrex"
      ],
      [
        9455.68,
        0.742406,
        "bitstamp"
      ],
      [
        9455.55,
        2.03782954,
        "market1"
      ]
    ]
  },
  "timestamps": {
    "gemini": [
      1572903458537,
      1572903458538
    ],
    "bitstamp": [
      1572903458199,
      1572903458199
    ],
    "itbit": [
      1572903458414,
      1572903458416
    ],
    "bittrex": [
      1572903458517,
      1572903458517
    ],
    "market1": [
      1572903458071,
      1572903458071
    ]
  },
  "lastupdated": 1572903458756,
  "pair": "btcusd",
  "currency": "usd",
  "lastpublished": 1572903458798\}

Response Body

KeyDescription

pair

The trading pair

currency

The quote currency

asks

List of asks, size, and exchange

bids

List of the bids, size, and exchange

market_making

List of the best bid and ask on each exchange

timestamp

A list of exchanges and the latest timestamps of the orderbook

lastupdated

Last update of the blended orderbook

lastpublished

Last time an orderbook update was published

Example Request

curl 'https://api.sfox.com/v1/markets/orderbook/btcusd'

Last updated