Kuntai
Kuntai · GPT-Aktionen
CoinGecko Cryptocurrency API
Fetches cryptocurrency data, including historical prices and market metrics, using CoinGecko's API.
GET /coins/{id}/historyGet historical price and market data for a cryptocurrencyFetches historical market data for a specified cryptocurrency on a given date.
Ursprüngliches API-Schema
{
"openapi": "3.1.0",
"info": {
"title": "CoinGecko Cryptocurrency API",
"description": "Fetches cryptocurrency data, including historical prices and market metrics, using CoinGecko's API.",
"version": "1.0.0"
},
"servers": [
{
"url": "https://api.coingecko.com/api/v3",
"description": "CoinGecko API Endpoint"
}
],
"paths": {
"/coins/{id}/history": {
"get": {
"operationId": "getHistoricalPrice",
"summary": "Get historical price and market data for a cryptocurrency",
"description": "Fetches historical market data for a specified cryptocurrency on a given date.",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"description": "The ID of the cryptocurrency (e.g., 'bitcoin', 'ethereum').",
"schema": {
"type": "string",
"example": "bitcoin"
}
},
{
"name": "date",
"in": "query",
"required": true,
"description": "The historical date in DD-MM-YYYY format. Must be within the last 365 days.",
"schema": {
"type": "string",
"example": "30-11-2023"
}
},
{
"name": "localization",
"in": "query",
"required": false,
"description": "Whether to include localized strings (true/false). Defaults to true.",
"schema": {
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "Successful response with historical market data.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HistoricalPriceResponse"
}
}
}
},
"400": {
"description": "Invalid request, such as missing or malformed parameters."
},
"403": {
"description": "Unauthorized access or invalid API key."
},
"404": {
"description": "Data not found for the specified cryptocurrency or date."
},
"500": {
"description": "Server error or CoinGecko API issue."
}
},
"security": [
{
"apiKeyAuth": []
}
]
}
}
},
"components": {
"securitySchemes": {
"apiKeyAuth": {
"type": "apiKey",
"in": "header",
"name": "x-cg-demo-api-key"
}
},
"schemas": {
"HistoricalPriceResponse": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Cryptocurrency ID.",
"example": "bitcoin"
},
"symbol": {
"type": "string",
"description": "Cryptocurrency symbol.",
"example": "btc"
},
"name": {
"type": "string",
"description": "Cryptocurrency name.",
"example": "Bitcoin"
},
"image": {
"type": "object",
"properties": {
"thumb": {
"type": "string",
"format": "uri",
"description": "Thumbnail image URL for the cryptocurrency.",
"example": "https://coin-images.coingecko.com/coins/images/1/thumb/bitcoin.png"
},
"small": {
"type": "string",
"format": "uri",
"description": "Small image URL for the cryptocurrency.",
"example": "https://coin-images.coingecko.com/coins/images/1/small/bitcoin.png"
}
}
},
"market_data": {
"type": "object",
"properties": {
"current_price": {
"type": "object",
"additionalProperties": {
"type": "number"
},
"description": "Historical price in various currencies.",
"example": {
"usd": 37810.35,
"eur": 34456.04
}
},
"market_cap": {
"type": "object",
"additionalProperties": {
"type": "number"
},
"description": "Market capitalization in various currencies.",
"example": {
"usd": 740494537382.59,
"eur": 674865987523.45
}
},
"total_volume": {
"type": "object",
"additionalProperties": {
"type": "number"
},
"description": "24-hour trading volume in various currencies.",
"example": {
"usd": 20964545194.8,
"eur": 19104696532.39
}
}
}
}
}
}
}
}
}CoinMarketCap Cryptocurrency API
Fetches cryptocurrency data, including real-time quotes and prices, using CoinMarketCap's API.
GET /cryptocurrency/quotes/latestGet the latest market quote for a cryptocurrencyFetches the latest market price, market cap, and other metrics for specified cryptocurrencies.
Ursprüngliches API-Schema
{
"openapi": "3.1.0",
"info": {
"title": "CoinMarketCap Cryptocurrency API",
"description": "Fetches cryptocurrency data, including real-time quotes and prices, using CoinMarketCap's API.",
"version": "1.0.0"
},
"servers": [
{
"url": "https://pro-api.coinmarketcap.com/v1",
"description": "CoinMarketCap API Endpoint"
}
],
"paths": {
"/cryptocurrency/quotes/latest": {
"get": {
"operationId": "getCryptocurrencyQuote",
"summary": "Get the latest market quote for a cryptocurrency",
"description": "Fetches the latest market price, market cap, and other metrics for specified cryptocurrencies.",
"parameters": [
{
"name": "symbol",
"in": "query",
"required": false,
"description": "Cryptocurrency symbol(s) (e.g., BTC for Bitcoin). Multiple symbols can be separated by commas.",
"schema": {
"type": "string",
"example": "BTC,ETH"
}
},
{
"name": "id",
"in": "query",
"required": false,
"description": "Unique CoinMarketCap ID(s) for cryptocurrencies. Multiple IDs can be separated by commas.",
"schema": {
"type": "string",
"example": "1,1027"
}
},
{
"name": "slug",
"in": "query",
"required": false,
"description": "Slug(s) of the cryptocurrency (URL-friendly names like \"bitcoin\" or \"ethereum\"). Multiple slugs can be separated by commas.",
"schema": {
"type": "string",
"example": "bitcoin,ethereum"
}
},
{
"name": "convert",
"in": "query",
"required": true,
"description": "The fiat or cryptocurrency to convert the price into (e.g., USD, BTC).",
"schema": {
"type": "string",
"example": "USD"
}
}
],
"responses": {
"200": {
"description": "Successful response with cryptocurrency quote data.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CryptocurrencyQuoteResponse"
}
}
}
}
},
"security": [
{
"apiKeyAuth": []
}
]
}
}
},
"components": {
"securitySchemes": {
"apiKeyAuth": {
"type": "apiKey",
"in": "header",
"name": "X-CMC_PRO_API_KEY"
}
},
"schemas": {
"CryptocurrencyQuoteResponse": {
"type": "object",
"properties": {
"status": {
"type": "object",
"properties": {
"timestamp": {
"type": "string",
"format": "date-time"
},
"error_code": {
"type": "integer",
"example": 0
},
"error_message": {
"type": "string",
"nullable": true
}
}
},
"data": {
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "CoinMarketCap's unique cryptocurrency ID."
},
"name": {
"type": "string",
"description": "Name of the cryptocurrency."
},
"symbol": {
"type": "string",
"description": "Symbol of the cryptocurrency."
},
"slug": {
"type": "string",
"description": "Slug of the cryptocurrency."
},
"quote": {
"type": "object",
"properties": {
"USD": {
"type": "object",
"properties": {
"price": {
"type": "number",
"format": "float",
"description": "Current price of the cryptocurrency in the requested currency.",
"example": 57234.56
},
"market_cap": {
"type": "number",
"format": "float",
"description": "Market capitalization of the cryptocurrency.",
"example": 1072345600.34
},
"volume_24h": {
"type": "number",
"format": "float",
"description": "24-hour trading volume.",
"example": 1234567890.12
}
}
}
}
}
}
}
}
}
}
}
}
}