Script To Check And Update Bitcoin Exchange Rate In Mysql

I need a script that can be triggered via cron job that will check the current bitcoin exchange rate and compare that with the stored exchange rate on my Opencart website.

Variables used:
“A” = inverted price from database: ( 1 / price )
“B” = “Low” price from “markets” feed
“C” = “24h” price from “weighted_prices” feed
“D” = new exchange rate to send to database

***NOTE: Opencart uses “bitcoin per $1” but API gives “$XX per 1 bitcoin”. API prices must be inverted before saving to o…

Leave a Reply

Your email address will not be published. Required fields are marked *