(CoinMarketCap) Different response from API call

165 Views Asked by At

Before the API was working properly but now it does not work well, its response got change and I don't know why

Previous response seems understandable: Which the 2782 read as AUD and its name is properly assigned and does not return object on data property.

{
    "status": {
        "timestamp": "2021-04-20T00:35:36.456Z",
        "error_code": 0,
        "error_message": null,
        "elapsed": 7,
        "credit_count": 1,
        "notice": null
    },
    "data": {
        "id": 2782,
        "symbol": "AUD",
        "name": "Australian Dollar",
        "amount": 88,
        "last_updated": "2019-08-30T18:51:00.000Z",
        "quote": {
            "USDT": {
                "price": 58.995907552127,
                "last_updated": "2019-08-30T18:51:12.000Z"
            }
        }
    }
}

Newer Response: On this response the data property got a result of object which parent is the converted or symbol then its information, notice that the id and name does not match with 2782 (AUD). it became random string or something and also the conversion rate seems like not reasonable at all.

{
    "status": {
        "timestamp": "2021-05-20T08:25:05.561Z",
        "error_code": 0,
        "error_message": null,
        "elapsed": 1,
        "credit_count": 1,
        "notice": null
    },
    "data": {
        "AUD": {
            "symbol": "AUD",
            "id": "kg7up6o9tzp",
            "name": "kz7fw7rlj8",
            "amount": 88,
            "last_updated": "2021-05-20T08:25:05.561Z",
            "quote": {
                "BTC": {
                    "price": 5691,
                    "last_updated": "2021-05-20T08:25:05.561Z"
                }
            }
        }
    }
}

This are the parameters I sent bot previous and newer call

{
"amount": 12,
"convert": "BTC",
"id": 2782 # AUD
}

UPDATE::
At some point when using the production version of API URL the result backs to normal

I don't know yet the explanation regarding on this issue, is there something limit on the sandbox api or so?

0

There are 0 best solutions below