在Linux和Mac OS X Qt上,钱包构建完美且有效。在Windows上,Qt wallet构建,但Coinbase API调用(提取btc_gbp
价格数据)不起作用。
完整资源here。
//Coinbase API
const QString apiCoinbasePrice = "https://api.coinbase.com/v1/currencies/exchange_rates";
// THE CALL
void PoolBrowser::coinbasePrice(QNetworkReply* response)
{
mValue jsonResponse = new mValue();
QString apiResponse = response->readAll();
//Make sure the response is valid
if(!read_string(apiResponse.toStdString(), jsonResponse)) { return; }
mObject jsonObject = jsonResponse.get_obj();
_dBtcPriceCurrent = QString::fromStdString(getPairValue(jsonObject, "btc_to_gbp").get_str()).toDouble();
updateLabel(ui->lblOverviewBtcGbpPrice,
_dBtcPriceCurrent,
_dBtcPriceLast,
QString::fromUtf8("£"),
2);
_dBtcPriceLast = _dBtcPriceCurrent;
_dScPriceLast = _dBtcPriceCurrent * _bittrexMarketSummary->getLastCurrent(double());