vertoe
Three of Nine
This might be a bit off topic, but as I'm writing a mobile app to display darkcoin prices I'm currently stuck to read the (awful!) cryptsy json api. Did anyone try that before?
This: http://pubapi.cryptsy.com/api.php?method=singleorderdata&marketid=155
Any idea? Exactly the same code works for the mintpal api (jsonObject["status"] == "success") and I don't really see where the difference is...
That: https://api.mintpal.com/v2/market/stats/DRK/BTC
This: http://pubapi.cryptsy.com/api.php?method=singleorderdata&marketid=155
Code:
double Cryptsy::doStuff(QNetworkReply* reply)
{
double pair = -1.0f;
if (reply->error() != QNetworkReply::NoError)
{
pair = 0.0f;
}
else
{
QString data = QString(reply->readAll()); // <--- contains the whole JSON as string
QJsonDocument jsonResponse = QJsonDocument::fromJson(data.toUtf8());
QJsonObject jsonObject = jsonResponse.object();
qDebug() << jsonObject["success"]; // <--- is always empty ""
if (jsonObject["success"] == 1)
{
// do stuff ...
}
}
return pair;
}
That: https://api.mintpal.com/v2/market/stats/DRK/BTC