Public HTTP API V1

Base URL is https://whitebit.com

Endpoint example: https://whitebit.com/api/v1/public/{endpoint}

All endpoints return time in Unix-time format.

All endpoints return either a JSON object or array.

For receiving responses from API calls please use http method GET

If an endpoint requires parameters you should send them as query string


Error messages V1 format

{
  "success": false,
  "message": "ERROR MESSAGE",
  "params": []
}

Market Info

[GET] /api/v1/public/markets

This endpoint retrieves all information about available markets.

Response is cached for: 1 second

Parameters: NONE

❗ Rate limit 1000 requests/10 sec.

Response:

{
  "success": true,
  "message": null,
  "result": [
    {
      "name": "BTC_USDT",   // Name of market pair
      "stock": "BTC",       // Ticker of stock currency
      "money": "USDT",      // Ticker of money currency
      "stockPrec": "6",     // Precision of stock currency
      "moneyPrec": "2",     // Precision of money currency
      "feePrec": "4",       // Precision of fee
      "makerFee": "0.001",  // Default maker fee ratio
      "takerFee": "0.001",  // Default taker fee ratio
      "minAmount": "0.0001" // Minimal amount of stock to trade
    },
    {
      ...
    }
  ]
}

Market Activity

[GET] /api/v1/public/tickers

This endpoint retrieves information about recent trading activity on all markets.

Response is cached for: 1 second

Parameters: NONE

❗ Rate limit 1000 requests/10 sec.

Response:

{
  "success": true,
  "message": null,
  "result": {
    "BTC_USDT": {                     // Name of market pair
      "ticker": {
        "bid": "9412.1",              // Highest bid
        "ask": "9416.33",             // Lowest ask
        "low": "9203.13",             // Lowest price for 24h
        "high": "9469.99",            // Highest price for 24h
        "last": "9414.4",             // Last deal price
        "vol": "27324.819448",        // Volume in stock currency
        "deal": "254587570.43407191", // Volume in money currency
        "change": "1.53"              // Change in percent between open and last prices
      },
      "at": 159423219                 // Timestamp in seconds
    },
    "ETH_BTC": {
      ...
    }
  }
}

Single market activity

[GET] /api/v1/public/ticker?market=ETH_BTC

This endpoint retrieves information about recent trading activity on the requested market.

Response is cached for: 1 second

❗ Rate limit 1000 requests/10 sec.

Parameters:

NameTypeMandatoryDescription
marketStringYesAvailable market. Example: BTC_USDT

Response:

{
  "success": true,
  "message": null,
  "result": {
    "open": "9267.98",            // Open price for day
    "bid": "9417.4",              // The highest bid currently available
    "ask": "9421.64",             // The lowest ask currently available
    "low": "9203.13",             // Lowest price for day
    "high": "9469.99",            // Highest price for day
    "last": "9419.55",            // Latest deal price
    "volume": "27303.824558",     // Volume in stock
    "deal": "254399191.68843464", // Volume in money
    "change": "1.63"              // Change between open and close price in percentage
  }
}

Kline

[GET] /api/v1/public/kline?market=BTC_USDT&interval=1h

This endpoint retrieves information about market kline.

Response is cached for: 1 second

❗ Rate limit 1000 requests/10 sec.

Max numbers of candles cannot exceed: 1440

Parameters:

NameTypeMandatoryDescription
marketStringYesAvailable market. Example: BTC_USDT
startTimestampNoStart time in seconds, default value is one week earlier from the current time. Cannot be greater than end parameter. Example: 1596848400
endTimestampNoEnd time in seconds, default value is current time. Cannot be less than start parameter. Example: 1596927600
intervalStringNOPossible values - 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M. By default in case start and end parameters were not specified, for minutes intervals the server will return candlesticks for a period of 1 day. For hours intervals will return candlesticks for 1 week, for days and week intervals will return candlesticks for 1 month and for month interval will return candlesticks for 1 year. Default value is 1h.
limitIntegerNOPossible values from 1 to 1440. Default value is 1440

Response:

{
  "success": true,
  "message": null,
  "result": [
    [
        1631440800,       // Time in seconds
        "45865.62",       // Open
        "45958.14",       // Close
        "45981.3",        // High
        "45750.23",       // Low
        "15.327634",      // Volume stock
        "703140.24230131" // Volume money
    ],
    [...]
  ]
}

Symbols

[GET] /api/v1/public/symbols

This endpoint retrieves information about all available markets for trading.

Response is cached for: 1 second

❗ Rate limit 1000 requests/10 sec.

Parameters: NONE

Response:

{
  "success": true,
  "message": null,
  "result": [
    "BTC_USDT", // Name of market pair
    "ETH_BTC",  // Name of market pair
    "ETH_USDT", // Name of market pair
    ...
  ]
}

Order depth

[GET] /api/v1/public/depth/result?market=BTC_USDT

This endpoint retrieves the current order book as two arrays (bids / asks)

Response is cached for: 100 ms

❗ Rate limit 1000 requests/10 sec.

Parameters:

NameTypeMandatoryDescription
marketStringYesAvailable market. Example: BTC_USDT
limitintNoLimit of results. Default: 100 Max: 100 Example: 100

Response:

{
  "asks": [
    [
      "9431.9",  // Price of lowest ask
      "0.705088" // Amount of lowest ask
    ],
    [
      "9433.67", // Price of next ask
      "0.324509" // Amount of next ask
    ],
    [...]
  ],
  "bids": [
    [
      "9427.65", // Price of highest bid
      "0.547909" // Amount of highest bid
    ],
    [
      "9427.3",  // Price of next bid
      "0.669249" // Amount of next bid
    ],
    [...]
  ]
}

Trade History

[GET] /api/v1/public/history?market=BTC_USDT&lastId=1

This endpoint retrieves trades that have been executed for the requested market.

Response is cached for: 1 second

❗ Rate limit 1000 requests/10 sec.

Parameters:

NameTypeMandatoryDescription
marketStringYesAvailable market. Example: BTC_USDT
lastIdintYesLargest id of last returned result. Example: request deals starting from id equals to 6
limitintNoLimit of results. Default: 50 Example: 100

Response:

{
  "success": true,
  "message": null,
  "result": [
    {
      "id": 156720314,           // Deal id
      "time": 1594240477.849703, // Deal time in seconds
      "price": "9429.66",        // Deal price
      "amount": "0.002784",      // Deal amount
      "type": "sell"             // Deal type (buy or sell)
    },
    {
      "id": 156720309,
      "time": 1594240476.832347,
      "price": "9429.66",
      "amount": "0.002455",
      "type": "sell"
    },
    {...}
  ]
}