Ticker

The ticker endpoint provides a high level overview of the state of the market for a specified pair. It shows the current best bid and ask, the last traded price, as well as information on the daily volume and price movement over the last day.

const ws = require('ws')
const w = new ws('wss://api-pub.bitfinex.com/ws/2')

w.on('message', (msg) => console.log(msg))

let msg = JSON.stringify({ 
  event: 'subscribe', 
  channel: 'ticker', 
  symbol: 'tBTCUSD' 
})

w.on('open', () => w.send(msg))
wscat -c wss://api-pub.bitfinex.com/ws/2
{ "event": "subscribe",  "channel": "ticker",  "symbol": "tBTCUSD" }
ws = websocket.WebSocketApp('wss://api-pub.bitfinex.com/ws/2')

ws.on_open = lambda self: self.send('{ "event": "subscribe", "channel": "ticker", "symbol": "tBTCUSD"}')

ws.on_message = lambda self, evt:  print (evt)
// request
{ 
  event: "subscribe", 
  channel: "ticker", 
  symbol: SYMBOL
}

// response - trading
{
   event: "subscribed",
   channel: "ticker",
   chanId: CHANNEL_ID,
   symbol: SYMBOL,
   pair: PAIR
}

{"event":"subscribed","channel":"ticker","chanId":224555,"symbol":"tBTCUSD","pair":"BTCUSD"}

// response - funding
{
  event: "subscribed",
  channel: "fticker",
  chanId: CHANNEL_ID,
  symbol: SYMBOL,
  currency: CURRENCY
}

{"event":"subscribed","channel":"ticker","chanId":232591,"symbol":"fUSD","currency":"USD"}
// Trading pairs
[
  CHANNEL_ID,
  [
    BID,
    BID_SIZE,
    ASK,
    ASK_SIZE,
    DAILY_CHANGE,
    DAILY_CHANGE_RELATIVE,
    LAST_PRICE,
    VOLUME,
    HIGH,
    LOW
  ]
]

[443378,[7616.5,31.89055171,7617.5,43.358118629999986,-550.8,-0.0674,7617.1,8314.71200815,8257.8,7500]]

// Funding pairs
[
  CHANNEL_ID,
  [
    FRR,
    BID,
    BID_PERIOD,
    BID_SIZE,
    ASK,
    ASK_PERIOD,
    ASK_SIZE,
    DAILY_CHANGE,
    DAILY_CHANGE_RELATIVE,
    LAST_PRICE,
    VOLUME,
    HIGH,
    LOW
    _PLACEHOLDER,
    _PLACEHOLDER,
    FRR_AMOUNT_AVAILABLE
  ]
]

[234509,[0.0003193369863013699,0.0002401,30,3939629.6177260396,0.00019012,2,307776.1592138799,-0.00005823,-0.2344,0.00019016,122156333.45260866,0.00027397,6.8e-7,null,null,3441851.73330503]]
// Trading pairs
[
  CHANNEL_ID,
  [
    BID,
    BID_SIZE,
    ASK,
    ASK_SIZE,
    DAILY_CHANGE,
    DAILY_CHANGE_RELATIVE,
    LAST_PRICE,
    VOLUME,
    HIGH,
    LOW
  ]
]

[443378,[7617,52.98726298,7617.1,53.601795929999994,-550.9,-0.0674,7617,8318.92961981,8257.8,7500]]

// Funding pairs
[
  CHANNEL_ID,
  [
    FRR,
    BID,
    BID_PERIOD,
    BID_SIZE,
    ASK,
    ASK_PERIOD,
    ASK_SIZE,
    DAILY_CHANGE,
    DAILY_CHANGE_RELATIVE,
    LAST_PRICE,
    VOLUME,
    HIGH,
    LOW
  ]
]

[234509,[0.0003193315068493151,0.0002401,30,4037829.0804227195,0.000189,4,384507.7314462898,-0.00005939,-0.2391,0.000189,122159083.98991197,0.00027397,6.8e-7,null,null,3441851.73330503]]

Request Fields

FieldsTypeDescription
SYMBOLStringTrading pair or funding currency

Stream Fields

FieldsTypeDescription
CHANNEL_IDintIdentification number assigned to the channel for the duration of this connection.
FRRfloatFlash Return Rate - average of all fixed rate funding over the last hour (funding tickers only)
BIDfloatPrice of last highest bid
BID_PERIODintBid period covered in days (funding tickers only)
BID_SIZEfloatSum of the 25 highest bid sizes
ASKfloatPrice of last lowest ask
ASK_PERIODintAsk period covered in days (funding tickers only)
ASK_SIZEfloatSum of the 25 lowest ask sizes
DAILY_CHANGEfloatAmount that the last price has changed since yesterday
DAILY_CHANGE_RELATIVEfloatRelative price change since yesterday (*100 for percentage change)
LAST_PRICEfloatPrice of the last trade.
VOLUMEfloatDaily volume
HIGHfloatDaily high
LOWfloatDaily low
FRR_AMOUNT_AVAILABLEfloatThe amount of funding that is available at the Flash Return Rate (funding tickers only)