Websocket ⚡️
This endpoints allows you to get live ticker/trades from a given exchange.
Only Binance, Kraken and Bitfinex ATM for testing purposes
wss://tradifull-ws.heroku.com/
- 1.Exchange (Binance, Kraken, Bitfinex)
- 2.Type (Trades, Ticker)
- 3.Base (Base currency)
- 4.Quote (Quote currency)
You can find all the Base/Quote pairs from the
/v1/exchanges/:exchange
returned object.tickersProperties
exchange: string
- the name of the exchangebase: string
- the normalized base symbol for the marketquote: string
- the normalized quote symbol for the markettradeId: string
- the unique trade identifer from the exchanges feedunix: int
- the unix timestamp in milliseconds for when the trade executedside: string
- whether the buyerbuy
or sellersell
was the maker for the matchprice: string
- the price at which the match executedamount: string
- the amount executed in the matchbuyOrderId: string
- the order id of the buy sidesellOrderId: string
- the order id of the sell side
Properties
exchange: string
- the name of the exchangebase: string
- the normalized base symbol for the marketquote: string
- the normalized quote symbol for the markettimestamp: int
- the unix timestamp in millisecondslast: string
- the last price of a match that caused a tickopen: string
- the price 24 hours agolow: string
- the highest price in the last 24 hourshigh: string
- the lowest price in the last 24 hoursvolume: string
- the base volume traded in the last 24 hoursquoteVolume: string
- the quote volume traded in the last 24 hourschange: string
- the price change (last - open)changePercent: string
- the price change in percent (last - open) / open * 100bid: string
- the best bid pricebidVolume: string
- the volume at the best bid priceask: string
- the best ask priceaskVolume: string
- the volume at the best ask price
# In an empty folder
npm init -y
npm install ws
client.js
const WebSocket = require('ws');
const ws = new WebSocket('wss://tradifull-ws.herokuapp.com/?exchange=binance&base=BTC"e=USDT&type=trades');
ws.on('message', function incoming(data) {
console.log(data);
});
# In the same folder from "Install"
node client.js
Last modified 2yr ago