Answer the question
In order to leave comments, you need to log in
How to display stock prices?
There was an idea to create a simple application with real-time display of the prices of some stocks on the main page. Maybe someone has already written something like this and can tell where you can get a free api for all this? In my head it looks like this - I get a json request and parse it on the page, updating every second
Answer the question
In order to leave comments, you need to log in
It turned out only if iterate over the records like this:
What if there are too many records?
.limit()
limits the number of records returned by the SQL database, sorted by primary ID unless otherwise specified. So there shouldn't be any scalability issues here. .select()
for selected fields in order to speed up the query a little more.
Sorting at the application level is VERY bad, you should strive to delegate the maximum of such work to the database. Try like this:
I may have made a mistake somewhere, but dig this way in the docks .
['BTC','DASH','DOGE','DCR','DAI', 'EOS','ETH','ETC',
'XLM','XMR', 'ZRX', 'TRX'];
//ADA,BAT,BCH,BSV,BTC,BTG,DASH,DOGE
//,IOTA,LTC,QTUM,LINK,LSK,XEM,NEO,USDC
//,USDT ,XRP,XTZ,ZEC available tickers
` https: //production.api.coindesk.com/v2/price/ticke... insert available tickers separated by commas"`
I took from here. After digging into the api, you can find many other interesting things
ps and change the tag to api, it will be more convenient thanks to all.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question