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

How to get only BTC pair prices? #68

Closed
anjilite7 opened this issue Jan 8, 2019 · 2 comments
Closed

How to get only BTC pair prices? #68

anjilite7 opened this issue Jan 8, 2019 · 2 comments
Labels

Comments

@anjilite7
Copy link

I try to use https://api.binance.com/api/v3/ticker/price but it retrieve all tickers at once, i need just BTC pair prices.

@tiagosiebler
Copy link
Owner

Store the results in an array then filter elements by your condition - pseudo example:

const allTickers = ...logic to get all tickers from API shown above;
const btcPairs = allTickers.filter(ticker => ticker.symbol.endsWith('BTC'));

@tiagosiebler
Copy link
Owner

Closing as stale/answered. If needed, feel free to reopen.

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

No branches or pull requests

2 participants