coingecko-rs
coingecko-rs copied to clipboard
Fix contract item
The contract call threw a decode error when I ran it for coin information:
reqwest::Error {
kind: Decode,
source: Error("invalid type: null, expected f64", line: 1, column: 1272),
}
As a quick check, I found that developer_score should be float and market_cap_rank can be null sometimes.
You can use
curl -X 'GET' \
'https://api.coingecko.com/api/v3/coins/ethereum/contract/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48' \
-H 'accept: application/json'
to verify the scenario where developer_score returns a floating point number, and use
curl -X 'GET' \
'https://api.coingecko.com/api/v3/coins/ethereum/contract/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2' \
-H 'accept: application/json'
to verify the scenario where market_cap_rank is null.