{"openapi":"3.1.0","info":{"title":"CoinGecko over Airnode","version":"1.0.0","description":"CoinGecko is the market data source for crypto prices, market caps and trending coins. This Airnode wraps the read endpoints worth attesting, so a consumer receives the market data with a signature saying this Airnode obtained it from CoinGecko at this time, rather than trusting a scraper's copy.\n\nEvery response carries an EIP-191 signature from the Airnode that served it, so the data can be attributed back to its source rather than trusted on reputation."},"servers":[{"url":"http://airnode-coingecko.fly.dev"}],"paths":{"/":{"get":{"operationId":"getDocumentation","summary":"This document.","description":"Describes the operations this Airnode serves and how to verify what it returns. Free.","responses":{"200":{"description":"An OpenAPI document describing this Airnode.","content":{"application/json":{"schema":{"type":"object"}}}}}},"post":{"operationId":"performRequest","summary":"Perform an operation and attest to the response.","requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"title":"trendingSearch","type":"object","required":["operation","parameters"],"additionalProperties":false,"properties":{"operation":{"const":"trendingSearch","description":"The coins, NFTs and categories trending on CoinGecko right now.","x-airnode-returns":{"coins":"array","nfts":"array","categories":"array"}},"parameters":{"type":"object","additionalProperties":false,"required":[],"properties":{}}}},{"title":"simplePrice","type":"object","required":["operation","parameters"],"additionalProperties":false,"properties":{"operation":{"const":"simplePrice","description":"The current price of one or more coins in one or more currencies."},"parameters":{"type":"object","additionalProperties":false,"required":["ids","vs_currencies"],"properties":{"ids":{"description":"Coin ids, comma separated. A CoinGecko id, not a ticker symbol.","type":"string","examples":["bitcoin","ethereum"]},"vs_currencies":{"description":"Currencies to price in, comma separated.","type":"string","examples":["usd","eur"]},"include_market_cap":{"description":"Include each coin's market cap alongside its price.","type":"boolean"},"include_24hr_change":{"description":"Include each coin's 24 hour price change as a percentage.","type":"boolean"}}}}},{"title":"coinsMarkets","type":"object","required":["operation","parameters"],"additionalProperties":false,"properties":{"operation":{"const":"coinsMarkets","description":"Ranked market data for coins in one currency.","x-airnode-returns":{"id":"string","symbol":"string","name":"string","image":"string","current_price":"number","market_cap":"number","market_cap_rank":"integer","fully_diluted_valuation":"number","total_volume":"number","high_24h":"number","low_24h":"number","price_change_24h":"number","price_change_percentage_24h":"number","market_cap_change_24h":"number","market_cap_change_percentage_24h":"number","circulating_supply":"number","total_supply":"number","max_supply":"number","ath":"number","ath_change_percentage":"number","ath_date":"string","atl":"number","atl_change_percentage":"number","atl_date":"string","roi":"object","last_updated":"string"}},"parameters":{"type":"object","additionalProperties":false,"required":["vs_currency"],"properties":{"vs_currency":{"description":"The single currency to value the market in.","type":"string","examples":["usd"]},"ids":{"description":"Coin ids to limit to, comma separated. A CoinGecko id, not a ticker symbol. Omitted, the whole market is returned ranked.","type":"string"},"order":{"description":"How to rank the result. Defaults to market cap, descending.","type":"string","enum":["market_cap_asc","market_cap_desc","volume_asc","volume_desc","id_asc","id_desc"]},"per_page":{"description":"How many results per page.","type":"integer","minimum":1,"maximum":250,"default":100},"page":{"description":"Which page of results.","type":"integer","minimum":1}}}}}]}}}},"responses":{"200":{"description":"The upstream response and the attestation over it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Attestation"}}}},"400":{"description":"The operation exists but the parameters are missing, unknown or malformed."},"404":{"description":"No such operation."},"502":{"description":"The upstream API could not be reached or refused the request."}}}}},"components":{"schemas":{"Attestation":{"type":"object","required":["airnode","requestHash","timestamp","data","signature"],"properties":{"airnode":{"type":"string","description":"The address whose signature attests to this response."},"requestHash":{"type":"string","description":"Identifies the request this response answers."},"timestamp":{"type":"string","description":"Unix seconds at which the response was signed."},"data":{"description":"The upstream response body: the JSON value when it parses as JSON, the text as received otherwise."},"signature":{"type":"string","description":"The attestation itself."}}}}},"x-airnode":{"address":"0x896B7a7F8872639e45F4Fd5F975b1031Ad57bfba","version":"0.1.0","attestation":{"scheme":"eip191-secp256k1","digest":"keccak256(abi.encodePacked(bytes32 requestHash, uint256 timestamp, bytes dataBytes))","dataBytes":"UTF-8 of data, or of its compact JSON when data is not a string","requestHash":"keccak256(utf8(JSON.stringify([operation, parameterEntriesSortedByName]))), where an object value is itself entries sorted by name, at any depth, and an array keeps its order","verify":"Recover the signer of the signature over the digest and check it equals the address above."}}}