Liquid API
Search
K

Public Channels

The following channels do not require authentication, however benefit from optimisations allowing a faster and lower latency data feed.
Data
Channel
Event
Event Details
product_cash_{currency_pair_code}_{product_id}
updated
  • Last Traded Price Updated
price_ladders_cash_{currency_pair_code}
updated
  • Price levels
One-sided Order Book
price_ladders_cash_{currency_pair_code}_{side}
updated
  • Price levels
executions_cash_{currency_pair_code}
created
  • New execution created
executions_details_cash_{currency_pair_code}
created
  • New execution created
Loan Book
marketdata_irmarketdepth_{currency}_bid
updated
  • New Loan bids
/* javascript - using dedicated library */
const { TapClient } = require("liquid-tap");
const tap = new TapClient();
const public_channel = tap.subscribe("product_cash_btcsgd_7");
public_channel.bind("updated", function(data) {
console.log("product_cash_btcsgd_7 has been updated", data);
});
const product_channel = tap.subscribe("product_cash_btcusd_1");
const orderbook_channel = tap.subscribe("price_ladders_cash_btcjpy_sell");
const executions_channel = tap.subscribe("executions_cash_btcjpy");
const executions_detail_channel = tap.subscribe("execution_details_cash_btcusd");
/* javascript - using raw websockets */
const ws = new WebSocket('wss://tap.liquid.com/app/LiquidTapClient');
ws.onmessage = (message) => {
const wsEvent = JSON.parse(message.data);
switch(wsEvent.event){
case 'pusher:connection_established':
console.log('Connected!');
ws.send(JSON.stringify({"event":"pusher:subscribe","data":{"channel":"some_public_channel"}}));
break;
case 'pusher_internal:subscription_succeeded':
console.log('Subscribed: ' + wsEvent.channel);
case 'updated':
console.log('Updated: ' + wsEvent.data);
}
}