Liquid API
Search…
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
1
/* javascript - using dedicated library */
2
3
const { TapClient } = require("liquid-tap");
4
const tap = new TapClient();
5
const public_channel = tap.subscribe("product_cash_btcsgd_7");
6
public_channel.bind("updated", function(data) {
7
console.log("product_cash_btcsgd_7 has been updated", data);
8
});
9
10
const product_channel = tap.subscribe("product_cash_btcusd_1");
11
const orderbook_channel = tap.subscribe("price_ladders_cash_btcjpy_sell");
12
const executions_channel = tap.subscribe("executions_cash_btcjpy");
13
const executions_detail_channel = tap.subscribe("execution_details_cash_btcusd");
14
15
/* javascript - using raw websockets */
16
const ws = new WebSocket('wss://tap.liquid.com/app/LiquidTapClient');
17
ws.onmessage = (message) => {
18
const wsEvent = JSON.parse(message.data);
19
switch(wsEvent.event){
20
case 'pusher:connection_established':
21
console.log('Connected!');
22
ws.send(JSON.stringify({"event":"pusher:subscribe","data":{"channel":"some_public_channel"}}));
23
break;
24
case 'pusher_internal:subscription_succeeded':
25
console.log('Subscribed: ' + wsEvent.channel);
26
case 'updated':
27
console.log('Updated: ' + wsEvent.data);
28
}
29
}
Copied!
Last modified 9d ago
Copy link