Fix Crypto Query API by Retrying the Inverse Pair

in crypto •  2 years ago 

The Query API ie. (https://price.justyy.workers.dev/) returns INF when API returns failure.

For example,
image.png

And to my surprise, the inverse pair is usually fine:

image.png

Therefore, I've added a workaround by retrying with the inverse pair and do the math by 1.0/rate.

image.png

Steem to the Moon!

  • You can swap the STEEM/SBD to USDT (TRC-20) via Steem2USDT!
  • Register a free STEEM account at SteemYY!
Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE BLURT!