As you might know, the coinmarketcap doesn’t provide the free APIs anymore.. and recently I found out the pricefeed throws exception due to this:
1 | 40|feed | Sun Jun 21 2020 09:58:22 GMT+0000 (Coordinated Universal Time) - Error loading STEEM price from Bittrex: TypeError: Cannot read property 'price_usd' of undefined |
I took a look, and found out it is because of the following code:
https://github.com/MattyIce/pricefeed/blob/master/feed.js#L89
1 | function loadPriceBittrex(callback, retries) { |
One easy fix is to use a different API end point to get the BTC ticker, like this: https://bittrex.com/api/v1.1/public/getticker?market=USDT-BTC
And thus, I am creating a PR: https://github.com/MattyIce/pricefeed/pull/5/files
The STEEM price is calculated based on two prices: BTC-USDT and BTC-STEEM (Simple Math isn’t it?)
Every little helps! I hope this helps!
Steem On!~
If you like my work, please consider voting for me, thanks!
https://steemit.com/~witnesses type in justyy and click VOTE
Alternatively, you could proxy to me if you are too lazy to vote!
Also: you can vote me at the tool I made: https://steemyy.com/witness-voting/?witness=justyy
Visit me at: https://steemyy.com
This page is synchronized from the post: ‘Fixing the Price Feed by Replacing the Coinmarketcap API’