Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display multiple prices of multiple coin pairs #5

Open
nurlan-dzhavadov opened this issue Dec 14, 2022 · 4 comments
Open

Display multiple prices of multiple coin pairs #5

nurlan-dzhavadov opened this issue Dec 14, 2022 · 4 comments

Comments

@nurlan-dzhavadov
Copy link

Hello!

Thank you for your project!

My question is: is there a way to put an array of coin pairs (for example, "BTCUSDT") inside symbol? I might be wrong, but right now you can only put one symbol at a time. My goal is, however, to display multiple coin pairs at the same time.

void startKlineStream() {
    var stream = binanceSpot.klineStream(
      symbol: "BTCUSDT",
      interval: Interval.INTERVAL_5m,
    );
    klineStreamSub = stream.listen(handleNewKline);
  }
@AmauryBuguet
Copy link
Owner

hello !
it is possible to subscribe to mutiple streams at the same time but I haven't implemented it in this package.
You could do it either by modifying the subscribe function in src/binance_spot_api.dart to implement combined streams as specified in Binance API documentation , or instead by using the stream allTickerStream, that pushes price for all pairs.
Have a good day !

@nurlan-dzhavadov
Copy link
Author

Thank you for your answer!

Could you please give an example of how you see it should be implemented?

@samstickkz
Copy link

was looking forward to his response. did yo figure it out @nurlan-dzhavadov ?

@nurlan-dzhavadov
Copy link
Author

Unfortunately I didn't(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants