Skip to content
This repository was archived by the owner on Sep 9, 2023. It is now read-only.
This repository was archived by the owner on Sep 9, 2023. It is now read-only.

Only Bitcoin works for trade websocket. Gateio alongside other exchanges do not #284

@ephraimd

Description

@ephraimd

Hi, I'm daniel.
Wonderful project you've got here, its just perfect!

One little problem though, when i listen for Binance trades, i get them come in. But on switching that to Gateio or any other exchange for that matter, the trades don't come in.

Steps:

$ mkdir testproject 
$ cd testproject
$ npm init --yes
$ npm install ccxws
$ mkdir src
$ touch test.js

then I had the following code in test.js

const ccxws = require("ccxws");
const binance = new ccxws.Gateio();

// market could be from CCXT or genearted by the user
const market = {
  id: "BTCUSDT", // remote_id used by the exchange
  base: "BTC", // standardized base symbol for Bitcoin
  quote: "USDT", // standardized quote symbol for Tether
};

// handle trade events
binance.on("trade", trade => console.log(trade));

// handle level2 orderbook snapshots
//binance.on("l2snapshot", snapshot => console.log(snapshot));

// subscribe to trades
binance.subscribeTrades(market);

// subscribe to level2 orderbook snapshots
binance.subscribeLevel2Snapshots(market);

then I ran

$ node src/test.js

in running that, i get no console logging for new trades, i waited a long time but got nothing. It just ran and did nothing.

I'll really appreciate your help on resolving this issue.

Much love from my behind my box here

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions