Market Streams

List of streams available in market

General market stream information

All streams currently available for working with the market are described here

Order Book

General information: The depth of the order book refers to the number of outstanding buy and sell orders at different price levels. There are two types of order book depth streams: the partial order book depth stream and the full order book depth stream.

The partial order book depth stream provides updates on a subset of the order book, typically only the top bid and ask prices and their corresponding quantities. It is useful for traders who want to get a quick snapshot of the market without having to process the entire order book.

On the other hand, the full order book depth stream provides updates on the entire order book, including all bid and ask prices and their corresponding quantities. It is useful for traders who want to analyze the market in more detail and make more informed trading decisions based on a more comprehensive view of the order book.

Depth Stream (Disabled)

Stream Name: <symbol>@depth<level>

Levels: [5, 10, 25]

Update Speed: 1000ms

Description: Partial order book depth stream. The <symbol> refers to the trading pair, such as BTC/USDT, ETH/BTC, etc., and the <level> parameter specifies the number of price levels to include in the order book. The @depth keyword indicates that the stream provides order book depth updates.

For example, if we want to receive real-time updates on the top five buy and sell orders for the BTC/USDT trading pair with a depth of 10 levels, we can subscribe to the BTCUSDT@depth5 stream.

Type:

type Depth = {
    pair: string;
    bids: [price: string, volume: string][];
    asks: [price: string, volume: string][];
}

Payload:

{
    "pair": "BTC_USDT",
    "asks": [
        [
            "8000",
            "1.006899"
        ]
    ],
    "bids": [
        [
            "8000",
            "0"
        ]
    ]
}

Diff. Depth Stream

Stream Name: <symbol>@depth

Update Speed: 1000ms

Description: This is full order book depth stream.

Type:

type Depth = {
    pair: string;
    bids: [price: string, volume: string][];
    asks: [price: string, volume: string][];
}

Payload:

{
    "pair": "BTC_USDT",
    "asks": [
        [
            "8000",
            "1.006899"
        ]
    ],
    "bids": [
        [
            "8000",
            "0"
        ]
    ]
}

Fast diff. Depth Stream

Stream Name: <symbol>@depth100ms

Update Speed: 100ms

Description: This is faster full order book depth stream (update time 100ms).

Type:

type Depth = {
    pair: string;
    bids: [price: string, volume: string][];
    asks: [price: string, volume: string][];
}

Payload:

{
    "pair": "BTC_USDT",
    "asks": [
        [
            "8000",
            "1.006899"
        ]
    ],
    "bids": [
        [
            "8000",
            "0"
        ]
    ]
}

Ticker

General information: Ticker is a real-time display of the current trading price and other market data for a specific trading pair, such as BTC/UAH or ETH/BTC. The ticker shows the latest trading price, the highest and lowest prices of the day, the trading volume, and the percentage change in price over the last 24 hours.

The ticker provides quick snapshot of the market and allows to monitor the price movements of a specific trading pair in real-time. You can use the ticker to identify trends, track volatility, and make informed trading decisions based on the latest market data.

BookTicker is a real-time data stream that provides updates on the best bid and ask prices for a specific trading pair.

MiniTicker stream provides a compact format of market data for all trading pairs, making it lightweight and suitable for low-bandwidth applications

Book Ticker (Disabled)

Stream Name: <symbol>@bookTicker

Update Speed: Real-time

Description: The bookTicker provides an efficient way to access real-time market data for a specific trading pair without having to process the entire order book. When you subscribes to the bookTicker for a specific trading pair, the stream sends continuous updates containing the current best bid and ask prices, along with their corresponding quantities.

As the best bid and ask prices change, the bookTicker updates in real-time, it is useful if you want to monitor the latest price movements for a specific trading pair without having to process the entire order book.

It's important to note that the bookTicker may not provide the full picture of the market, as it only shows the best bid and ask prices and their corresponding quantities. If you require a more in-depth view of the market you may need to use other data streams, such as the depth stream or the trade stream.

Type:

type BookTicker = {
    p: string; // pair
    bbp: string; // best bid price
    bbq: string; // best bid qty
    bap: string; // best ask price
    baq: string; // best ask qty
};

Payload:

{
    "p": "ETH_UAH",
    "bbp": "6600",
    "bbq": "1",
    "bap": "8000",
    "baq": "0.006799",
};

Individual Symbol Ticker Stream

Stream Name: <symbol>@ticker

Update Speed: 1000ms

Description: The <symbol>@ticker is a real-time data stream that provides updates on the latest trading price and other market data for a specific trading pair.

The <symbol> refers to the trading pair, such as BTC/USDT or ETH/BTC, and the @ticker keyword indicates that the stream provides updates on the ticker for that specific trading pair.

The data in the <symbol>@ticker stream includes the latest trading price, high and low prices, trading volume, and the percentage change in price, etc. (see type Ticker above). As the trading price changes, the <symbol>@ticker stream updates, providing up-to-date market information.

The <symbol>@ticker stream is useful to stay informed about the latest price movements for a specific trading pair and make informed trading decisions based on the latest market data.

Type:

type Ticker = {
    p: string; // pair
    pc: string; // Price change
    pcp: string; // Price change percent
    ftbp: string; // First trade(F)-1 price (first trade before the 24hr rolling window)
    lp: string; // Last price
    lq: string; // Last quantity
    bbp: string; // Best bid price
    bbq: string; // Best bid quantity
    bap: string; // Best ask price
    baq: string; // Best ask quantity
    o: string; // Open price
    h: string; // High price
    l: string; // Low price
    ot: Date; // Statistics open time
    ct: Date; // Statistics close time
    n: number; // Total number of trades
    // TODO not implemented
    // wap: string; // Weighted average price
    // fti: string // First trade ID
    // lti: string; // Last trade Id
    ttbav: string; // Total traded base asset volume
    ttqav: string; // Total traded quote asset volume
};

Payload:

{
    "p": "ETH_UAH",
    "pc": "8000",
    "pcp": "1",
    "ftbp": "0",
    "lp": "8000",
    "lq": "0.0001",
    "bbp": "6600",
    "bbq": "1",
    "bap": "8000",
    "baq": "0.006799",
    "o": "8000",
    "h": "8000",
    "l": "8000",
    "ot": "2022-07-04T09:10:52.966+00:00",
    "ct": "2022-07-04T10:10:52.966+00:00",
    "n": 4,
    "ttbav": "0.001201",
    "ttqav": "9.608"
}

Individual Symbol Mini Ticker Stream

Stream Name: <symbol>@miniTicker

Update Speed: 1000ms

Description: The <symbol>@miniTicker is a real-time data stream that provides updates on the latest trading price and other market data for a specific trading pair in a compact format.

The <symbol>@miniTicker stream is designed to be more lightweight than the <symbol>@ticker stream, making it ideal for applications that require a lower network bandwidth or data usage. You can use the <symbol>@miniTicker stream to quickly check the latest market data for a specific trading pair without consuming excessive network resources.

Type:

type MiniTicker = {
    p: string; // pair
    o: string; // Open price
    h: string; // High price
    l: string; // Low price
    c: string; // Last price
    n: number; // Total number of trades
    ttbav: string; // Total traded base asset volume
    ttqav: string; // Total traded quote asset volume
}

Payload:

{
    "p": "ETH_UAH",
    "o": "8000",
    "h": "8000",
    "l": "8000",
    "c": "8000"
    "n": 4,
    "ttbav": "0.001201",
    "ttqav": "9.608"
}

All Market Tickers Stream

Stream Name: arrTicker

Update Speed: 1000ms

Description: The arrTicker stream contains an array of Ticker objects, each representing a different trading pair on the exchange.

Type:

type ArrTicker = Ticker[];

Payload:

[
    {
        "p": "BTC_UAH",
        "pc": "1213",
        "pcp": "1",
        "ftbp": "0",
        "lp": "1213",
        "lq": "0.876544",
        "bbp": "1115",
        "bbq": "0.123456",
        "bap": "5454",
        "baq": "0.00548371",
        "o": "1213",
        "h": "1213",
        "l": "1213",
        "ot": "2022-07-04T10:06:30.462+00:00",
        "ct": "2022-07-04T11:06:30.462+00:00",
        "n": 1,
        "ttbav": "0.876544",
        "ttqav": "1063.247872"
    },
    {
        "p": "ETH_UAH",
        "pc": "8000",
        "pcp": "1",
        "ftbp": "0",
        "lp": "8000",
        "lq": "0.0001",
        "bbp": "6600",
        "bbq": "1",
        "bap": "8000",
        "baq": "0.006799",
        "o": "8000",
        "h": "8000",
        "l": "8000",
        "ot": "2022-07-04T09:10:52.966+00:00",
        "ct": "2022-07-04T10:10:52.966+00:00",
        "n": 4,
        "ttbav": "0.001201",
        "ttqav": "9.608"
    },
  ...
]

All Market Mini Tickers Stream

Stream Name: arrMiniTicker

Update Speed: 1000ms

Description: The arrMiniTicker stream contains an array of MiniTicker objects, each representing a different trading pair on the exchange.

Type:

type ArrMiniTicker = MiniTicker[];

Payload:

[
    {
        "p": "BTC_UAH",
        "o": "1213",
        "h": "1213",
        "l": "1213",
        "c": "1213",
        "n": 1,
        "ttbav": "0.876544",
        "ttqav": "1063.247872"
    },
    {
        "p": "ETH_UAH",
        "o": "8000",
        "h": "8000",
        "l": "8000",
        "c": "8000"
        "n": 4,
        "ttbav": "0.001201",
        "ttqav": "9.608"
    },
  ...
]

OHLCV

General information: OHLCV is an acronym that stands for Open, High, Low, Close, and Volume and refers to a type of chart used to represent the price movement of a financial asset.

Each element of the acronym represents a different data point that is plotted on the chart:

Open: The opening price of the asset during a specific time period (e.g., day, hour, minute).

High: The highest price that the asset reached during the time period.

Low: The lowest price that the asset reached during the time period.

Close: The closing price of the asset at the end of the time period.

Volume: The total trading volume of the asset during the time period.

OHLCV

Stream Name: <symbol>@ohlcv

Update Speed: 2000ms

Description: The <symbol>@ohlcv stream provides a continuous feed of the most recent OHLCV data for the specified trading pair. This data can be used to track the price movement of the trading pair over time and identify trends or patterns in the data and build charts for visualisation.

Type:

type Ohlcv = {
    ot: Date; // open time
    ct: Date; // close time
    t: number; // trades
    o: string; // open
    h: string; // high
    l: string; // low
    c: string; // close
    v: string; // volume
};

Payload:

{
    "ot": 1656938160000,
    "ct": 1656938219999,
    "t": 1,
    "o": "8000",
    "h": "8000",
    "l": "8000",
    "c": "8000",
    "v": "0.0001"
}

Trades

General information: Trade occurs when a buyer and a seller agree to exchange one financial asset for another. The trade is executed at a specific price, which is agreed upon by the buyer and the seller.

Individual Symbol Trade Stream

Stream Name: <symbol>@trade

Update Speed: Real-time

Description: The <symbol>@trade stream provides real-time updates for the latest trades executed for a specific trading pair. Each trade update includes information such as the trade ID, the price at which the trade was executed, the quantity of the asset traded, the timestamp of the trade, etc.

Type:

type Trade = {
    id: string;
    sn: string;
    pair: string;
    matchPrice: string;
    matchQuantity: string;
    quoteQuantity: string;
    type: TradeType;
    createdAt: Date;
}

enum TradeType {
  Sell = 'Sell',
  Buy = 'Buy'
}

Payload:

{
    "id": "a749fb57-bdd7-4fb9-b5ca-f3c2dab0c12e",
    "sn": "";
    "pair": "ETH_UAH",
    "matchPrice": "8000",
    "matchQuantity": "0.0001",
    "quoteQuantity": "0.0001";
    "type": "Buy",
    "createdAt": "2022-07-04T12:36:55.183Z",
}

Individual Symbol Aggregated Trade Stream

Stream Name: <symbol>@aggTrade

Update Speed: Real-time

Description: The aggregated trade stream differs from the regular trade stream in that it provides summarized information for multiple trades executed at the same price and time, instead of individual updates for each trade. The stream also includes a trade ID representing the first and last trade executed in the aggregation, which can be used to reference the aggregated trades.

Type:

type AggTrade = {
    id: string;
    pair: string;
    matchPrice: string;
    matchQuantity: string;
    type: TradeType;
    createdAt: Date;
    firstTradeId: string;
    lastTradeId: string;
}

enum TradeType {
  Sell = 'Sell',
  Buy = 'Buy'
}

Payload:

{
    id: '8c9d4ee3-eadb-4ce0-9d0a-ceb349f90065',
    pair: 'ETH_UAH',
    matchPrice: '100',
    matchQuantity: '0.001',
    type: 'Sell',
    createdAt: '2022-07-26T13:16:58.701Z',
    firstTradeId: '8c9d4ee3-eadb-4ce0-9d0a-ceb349f90065',
    lastTradeId: '8c9d4ee3-eadb-4ce0-9d0a-ceb349f90065',
}