Subscribes to Decentralized exchange market VWAP, optionally filtered by exchange or pair.

Make sure you're connected.


All pairs:


Specific pair or exchange:

exchangestringThe exchange address to filter by. (OPTIONAL)
pairstringThe asset pair by which to filter. DEX pairs are most accurate using pair contract address rather than symbols (OPTIONAL)


"result": {
delistedPairbooltrue if pair has been delisted. false otherwise.
deltanumberThe dollar value change in price since last update.
isNewPairbooltrue if pair is new. false otherwise.
pairstringThe pair, using both base addresses of the pair underlying assets.
previousPricetimestampThe price at time of last update.
previousTimestamptimestampThe time of the last update.
pricenumberThe quote price of the asset pair.
vwapnumberThe VWAP value.
timestampnumberThe time at which the price change took place.
unchangedPricebooltrue if price hasn't changed since last update. false otherwise.


const WebSocket = require('ws');
const ws = new WebSocket('wss://', {headers: {x-api-key:'<api_key>'}});

ws.on('open', () => {
      jsonrpc: '2.0',
      method: 'subscribe',
      params: ["market:dex:vwap"],
      id: 1,

ws.on('message', data => {
  console.log(JSON.stringify(JSON.parse(data), null, 2));