馃殌馃獧鈧縏CGPT馃馃搳
馃殌馃獧鈧縏CGPT馃馃搳 路 Acciones GPT
CoinGecko Public Demo API
CoinGecko API for accessing cryptocurrency market data, including prices, historical data, and exchange information.
GET /pingCheck the API server statusReturns a simple "ping" response to check if the API server is operational.
GET /simple/priceGet price data for one or more coinsFetch current price data for specified coins, converted into specified currencies.
GET /coins/listGet a list of all supported coinsReturns a list of all supported coins with their CoinGecko IDs, names, and symbols.
Esquema original API
{
"openapi": "3.1.0",
"info": {
"title": "CoinGecko Public Demo API",
"description": "CoinGecko API for accessing cryptocurrency market data, including prices, historical data, and exchange information.\n",
"version": "1.0.0"
},
"servers": [
{
"url": "https://api.coingecko.com/api/v3",
"description": "CoinGecko Public Demo API Server"
}
],
"paths": {
"/ping": {
"get": {
"operationId": "pingServer",
"summary": "Check the API server status",
"description": "Returns a simple \"ping\" response to check if the API server is operational.",
"parameters": [
{
"name": "x_cg_demo_api_key",
"in": "query",
"required": false,
"description": "API key for Demo access.",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Server is up",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PingResponse"
}
}
}
}
}
}
},
"/simple/price": {
"get": {
"operationId": "getSimplePrice",
"summary": "Get price data for one or more coins",
"description": "Fetch current price data for specified coins, converted into specified currencies.",
"parameters": [
{
"name": "ids",
"in": "query",
"required": true,
"description": "Comma-separated list of coin IDs (e.g., \"bitcoin,ethereum\").",
"schema": {
"type": "string"
}
},
{
"name": "vs_currencies",
"in": "query",
"required": true,
"description": "Comma-separated list of target currencies (e.g., \"usd,eur\").",
"schema": {
"type": "string"
}
},
{
"name": "include_market_cap",
"in": "query",
"required": false,
"description": "Include market cap data in the response.",
"schema": {
"type": "boolean"
}
},
{
"name": "include_24hr_vol",
"in": "query",
"required": false,
"description": "Include 24-hour volume data in the response.",
"schema": {
"type": "boolean"
}
},
{
"name": "include_24hr_change",
"in": "query",
"required": false,
"description": "Include 24-hour price change in the response.",
"schema": {
"type": "boolean"
}
},
{
"name": "include_last_updated_at",
"in": "query",
"required": false,
"description": "Include timestamp of last data update in the response.",
"schema": {
"type": "boolean"
}
},
{
"name": "x_cg_demo_api_key",
"in": "query",
"required": false,
"description": "API key for Demo access.",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Price data for requested coins",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SimplePriceResponse"
}
}
}
}
}
}
},
"/coins/list": {
"get": {
"operationId": "listCoins",
"summary": "Get a list of all supported coins",
"description": "Returns a list of all supported coins with their CoinGecko IDs, names, and symbols.",
"parameters": [
{
"name": "x_cg_demo_api_key",
"in": "query",
"required": false,
"description": "API key for Demo access.",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "A list of supported coins",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Coin"
}
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"PingResponse": {
"type": "object",
"properties": {
"gecko_says": {
"type": "string",
"example": "(V3) To the Moon!"
}
}
},
"SimplePriceResponse": {
"type": "object",
"properties": {
"data": {
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"usd": {
"type": "number",
"example": 50000.34
},
"eur": {
"type": "number",
"example": 43000.89
},
"market_cap": {
"type": "number",
"example": 1000000000
},
"vol_24h": {
"type": "number",
"example": 200000000
},
"change_24h": {
"type": "number",
"example": -1.5
},
"last_updated_at": {
"type": "integer",
"format": "int64",
"example": 1638316800
}
}
}
}
}
},
"Coin": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "bitcoin"
},
"symbol": {
"type": "string",
"example": "btc"
},
"name": {
"type": "string",
"example": "Bitcoin"
}
}
}
}
}
}