Market Data Channels

Ticker

Topic: ticker.*

Note: Only the wildcard topic ticker.* is supported. Subscribing to individual pair topics (e.g., ticker.BTC_USDT) will not receive any data. Use ticker.* to receive updates for all pairs.

Ticker Fields

  • Type: The type of the message is set to "tk," indicating that it's a ticker message.
  • Timestamp: The Unix timestamp of the ticker data.
  • Ticker 1: Ticker array.
  • Ticker 2. Ticker array.
  • Ticker n. Ticker array.

Each ticker array includes following fields:

  • Trading Pair Symbol
  • Close Price
  • Base Volume
  • Quote Volume
  • Change Percent
  • High Price
  • Low Price
  • Bid Price
  • Ask Price

Ticker Example

[
  "tk",
  1694003337,
  ["XRP_USDT", "0.50057000", "2036106.67737645", "1024194.48541761", "-0.28287417", "0.50677000", "0.49872000", "0.50057000", "0.50117000"],
  ["BTC_USDT", "25725.53000000", "6074.90520117", "156489295.23543299", "0.09369121", "25889.00000000", "25629.43000000", "25717.69000000", "25747.69000000"],
  ["LTC_USDT", "63.06000000", "19800.19751964", "1248404.62483421", "0.39802579", "63.63000000", "62.60000000", "63.03000000", "63.06000000"],
  ["DOGE_USDT", "0.06389400", "26360317.66603325", "1686644.45381961", "0.03131164", "0.06466200", "0.06354300", "0.06384708", "0.06396200"],
  ["ETH_USDT", "1632.69000000", "7379.92830702", "12057736.03072529", "0.10791388", "1648.02000000", "1625.16000000", "1632.69000000", "1635.28000000"],
  ["TRX_USDT", "0.07827864", "17930244.99331608", "1392304.80058763", "1.44319315", "0.07857449", "0.07710881", "0.07832800", "0.07842434"],
  ["USDC_USDT", "1.00130000", "2135117.29179469", "2136330.76840695", "0.08996401", "1.00190090", "0.99929970", "1.00160060", "1.00140000"]
]
from alpcom_api import ws
await client.subscribe(ws.tps.tickers_all)

Trade

Topics: trade.*, trade.XXX_YYY

Trade Fields

  • Type: The type of the message is set to "t," indicating that it's a trade event.
  • Timestamp: The Unix timestamp of the trade event.
  • Trade ID: A unique identifier for the trade event.
  • Trading Pair Symbol: The symbol representing the trading pair associated with the trade.
  • Trade Amount: The amount of the trade, converted to a string.
  • Trade Price: The price of the trade, converted to a string.
  • Trade Direction: The direction of the trade, either "buy" or "sell.

Trade Example

[
  "t",
  1694003848,
  293107798,
  "BTC_USDT",
  "0.20285052",
  "25705.02000000",
  "buy"
]
from alpcom_api import ws
await client.subscribe(ws.tps.trades_all)
await client.subscribe(ws.tps.trades_of('BTC_USDT'))