{
  "openapi": "3.0.1",
  "info": {
    "title": "Crypto Price API - CoinGecko OHLC, DEX Pools, NFTs, Treasuries",
    "description": "Pull crypto prices, coin markets, OHLC and historical charts, exchange and derivatives tickers, trending coins, NFT floor prices, public treasury holdings and GeckoTerminal DEX pools, tokens, OHLCV and trades from the CoinGecko API into a dataset. Bring your own Demo or Pro API key.",
    "version": "0.1",
    "x-build-id": "lA4Yymjw33kVenDQV"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~crypto-price-ohlc-dex-pools-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-crypto-price-ohlc-dex-pools-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/nabeelbaghoor~crypto-price-ohlc-dex-pools-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-crypto-price-ohlc-dex-pools-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/nabeelbaghoor~crypto-price-ohlc-dex-pools-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-crypto-price-ohlc-dex-pools-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "mode": {
            "title": "What to read",
            "enum": [
              "simplePrice",
              "tokenPrice",
              "coinMarkets",
              "coinDetails",
              "coinHistory",
              "coinTickers",
              "marketChart",
              "ohlc",
              "topGainersLosers",
              "newCoins",
              "trending",
              "search",
              "categories",
              "globalMarket",
              "defiMarket",
              "exchanges",
              "exchangeTickers",
              "derivatives",
              "publicTreasury",
              "nftMarkets",
              "nftDetails",
              "news",
              "trendingPools",
              "newPools",
              "topPools",
              "tokenPools",
              "searchPools",
              "poolScreener",
              "poolDetails",
              "tokenData",
              "poolOhlcv",
              "poolTrades"
            ],
            "type": "string",
            "description": "Pick one dataset. Coin modes use CoinGecko coin IDs (bitcoin, ethereum); onchain DEX modes use a GeckoTerminal network (eth, solana, base) and pool or token addresses. Modes marked paid plan need a CoinGecko Pro API key; everything else works on the free Demo key.",
            "default": "coinMarkets"
          },
          "coinIds": {
            "title": "Coin IDs",
            "type": "array",
            "description": "CoinGecko API IDs such as bitcoin, ethereum, solana or tether, one per line (the search mode finds the ID of any coin). Read by coin prices, coin markets, coin details, snapshots, tickers, charts, OHLC and public treasury, each coin separately; filters exchange tickers and news.",
            "items": {
              "type": "string"
            }
          },
          "symbols": {
            "title": "Symbols",
            "type": "array",
            "description": "Coin prices and coin markets only, used when no coin IDs are set: ticker symbols such as btc, eth or sol. A symbol can match several coins; the provider returns the top ranked one.",
            "items": {
              "type": "string"
            }
          },
          "vsCurrency": {
            "title": "Quote currency",
            "type": "string",
            "description": "Currency to price in, such as usd, eur, gbp, jpy, btc or eth. Coin prices and token prices accept several, comma separated (usd,eur).",
            "default": "usd"
          },
          "category": {
            "title": "Category",
            "type": "string",
            "description": "Coin markets only. A CoinGecko category ID such as layer-1, meme-token, artificial-intelligence or decentralized-finance-defi (the categories mode lists them)."
          },
          "marketOrder": {
            "title": "Market order",
            "enum": [
              "market_cap_desc",
              "market_cap_asc",
              "volume_desc",
              "volume_asc",
              "id_asc",
              "id_desc"
            ],
            "type": "string",
            "description": "Coin markets only. How to sort the coin list.",
            "default": "market_cap_desc"
          },
          "priceChangeWindows": {
            "title": "Price change windows",
            "type": "array",
            "description": "Coin markets and top gainers and losers. Extra price change percentages to add to each row.",
            "items": {
              "type": "string",
              "enum": [
                "1h",
                "24h",
                "7d",
                "14d",
                "30d",
                "60d",
                "200d",
                "1y"
              ],
              "enumTitles": [
                "1 hour",
                "24 hours",
                "7 days",
                "14 days",
                "30 days",
                "60 days (gainers only)",
                "200 days",
                "1 year"
              ]
            }
          },
          "days": {
            "title": "Days back",
            "type": "string",
            "description": "Price chart: any whole number of days, or max. OHLC: 1, 7, 14, 30, 90, 180, 365 or max. Ignored when From and To are set.",
            "default": "30"
          },
          "from": {
            "title": "From",
            "type": "string",
            "description": "Price chart and OHLC: start of a time range, as a date (2025-12-01), a date and time (2025-12-01T14:30) or a unix time in seconds. Set both From and To. OHLC ranges need a paid plan."
          },
          "to": {
            "title": "To",
            "type": "string",
            "description": "Price chart and OHLC: end of the time range. DEX pool OHLCV: read candles before this time."
          },
          "interval": {
            "title": "Interval",
            "enum": [
              "auto",
              "daily",
              "hourly",
              "5m",
              "1m"
            ],
            "type": "string",
            "description": "Price chart: daily or hourly (5 minute and 1 minute are Enterprise only); auto picks 5 minutes for 1 day, hourly up to 90 days and daily beyond. OHLC: daily or hourly need a paid plan.",
            "default": "auto"
          },
          "date": {
            "title": "Snapshot date",
            "type": "string",
            "description": "Coin snapshot only. The date of the 00:00 UTC snapshot, such as 2025-12-30."
          },
          "assetPlatform": {
            "title": "Asset platform",
            "type": "string",
            "description": "Token prices: the chain of the contract addresses, as a CoinGecko asset platform ID such as ethereum, solana, binance-smart-chain or base. NFT markets: optional chain filter."
          },
          "contractAddresses": {
            "title": "Token contract addresses",
            "type": "array",
            "description": "Token prices only. Contract addresses on the asset platform, one per line.",
            "items": {
              "type": "string"
            }
          },
          "exchangeIds": {
            "title": "Exchange IDs",
            "type": "array",
            "description": "Exchange tickers: CoinGecko exchange IDs such as binance, gdax (Coinbase) or kraken, one per line. Coin tickers: optional filter to these exchanges.",
            "items": {
              "type": "string"
            }
          },
          "treasuryEntity": {
            "title": "Treasury holders",
            "enum": [
              "companies",
              "governments"
            ],
            "type": "string",
            "description": "Public treasury only. Public companies or governments.",
            "default": "companies"
          },
          "nftIds": {
            "title": "NFT collection IDs",
            "type": "array",
            "description": "NFT collection details only. CoinGecko NFT IDs such as pudgy-penguins or cryptopunks, one per line.",
            "items": {
              "type": "string"
            }
          },
          "searchQuery": {
            "title": "Search query",
            "type": "string",
            "description": "Search: a coin, exchange, category or NFT name or symbol. DEX pool search: a pool address, token name, symbol or contract address."
          },
          "duration": {
            "title": "Duration",
            "enum": [
              "5m",
              "1h",
              "6h",
              "24h",
              "7d",
              "14d",
              "30d",
              "60d",
              "1y"
            ],
            "type": "string",
            "description": "Top gainers and losers: 1h, 24h, 7d, 14d, 30d, 60d or 1y. Trending DEX pools: 5m, 1h, 6h or 24h.",
            "default": "24h"
          },
          "topCoins": {
            "title": "Gainers universe",
            "enum": [
              "300",
              "500",
              "1000",
              "all"
            ],
            "type": "string",
            "description": "Top gainers and losers only. Rank the top 300, 500 or 1000 coins by market cap, or all coins.",
            "default": "1000"
          },
          "network": {
            "title": "Network",
            "type": "string",
            "description": "GeckoTerminal network ID such as eth, solana, base, bsc, arbitrum or polygon_pos. Needed by top pools, pools and tokens by address, OHLCV and trades; optional for trending, new pools, pool search and the screener."
          },
          "poolAddresses": {
            "title": "Pool addresses",
            "type": "array",
            "description": "DEX pools by address, pool OHLCV and pool trades. Pool contract addresses on the network, one per line.",
            "items": {
              "type": "string"
            }
          },
          "tokenAddresses": {
            "title": "Token addresses",
            "type": "array",
            "description": "Onchain tokens by address and top pools of a token. Token contract addresses on the network, one per line.",
            "items": {
              "type": "string"
            }
          },
          "timeframe": {
            "title": "Candle timeframe",
            "enum": [
              "day",
              "hour",
              "minute",
              "second"
            ],
            "type": "string",
            "description": "DEX pool OHLCV only. Second candles need a paid plan.",
            "default": "day"
          },
          "aggregate": {
            "title": "Candle size",
            "enum": [
              "1",
              "4",
              "5",
              "12",
              "15",
              "30"
            ],
            "type": "string",
            "description": "DEX pool OHLCV only. Units per candle: day 1; hour 1, 4 or 12; minute 1, 5 or 15; second 1, 15 or 30.",
            "default": "1"
          },
          "minTradeUsd": {
            "title": "Minimum trade size (USD)",
            "type": "number",
            "description": "DEX pool trades only. Leave out trades smaller than this many US dollars."
          },
          "poolSort": {
            "title": "Pool sort",
            "type": "string",
            "description": "Top pools: h24_tx_count_desc or h24_volume_usd_desc. Top pools of a token: h24_volume_usd_liquidity_desc, h24_tx_count_desc or h24_volume_usd_desc. Screener: h6_trending, h24_volume_usd_desc, reserve_in_usd_desc, pool_created_at_desc and the other documented sorts."
          },
          "includeRelated": {
            "title": "Include token and DEX details",
            "type": "boolean",
            "description": "Onchain pool and token modes. Adds the base and quote token and DEX details to each pool, and the top pools to each token.",
            "default": true
          },
          "minLiquidityUsd": {
            "title": "Minimum liquidity (USD)",
            "type": "number",
            "description": "DEX pool screener only. Minimum pool reserve in US dollars."
          },
          "minVolumeUsd": {
            "title": "Minimum 24h volume (USD)",
            "type": "number",
            "description": "DEX pool screener only. Minimum 24 hour volume in US dollars."
          },
          "maxPoolAgeHours": {
            "title": "Maximum pool age (hours)",
            "type": "number",
            "description": "DEX pool screener only. Only pools created within this many hours."
          },
          "safetyChecks": {
            "title": "Safety checks",
            "type": "array",
            "description": "DEX pool screener only. Keep pools that pass these GeckoTerminal checks.",
            "items": {
              "type": "string",
              "enum": [
                "no_honeypot",
                "good_gt_score",
                "on_coingecko",
                "has_social"
              ],
              "enumTitles": [
                "Not a honeypot",
                "Good GT score",
                "Listed on CoinGecko",
                "Has social links"
              ]
            }
          },
          "newsLanguage": {
            "title": "News language",
            "enum": [
              "en",
              "ru",
              "de",
              "pl",
              "es",
              "vi",
              "fr",
              "pt",
              "ar",
              "bg",
              "cs",
              "da",
              "el",
              "fi",
              "he",
              "hi",
              "hr",
              "hu",
              "id",
              "it",
              "ja",
              "ko",
              "lt",
              "nl",
              "no",
              "ro",
              "sk",
              "sl",
              "sv",
              "th",
              "tr",
              "uk",
              "zh",
              "zh-tw"
            ],
            "type": "string",
            "description": "Crypto news only.",
            "default": "en"
          },
          "newsType": {
            "title": "News type",
            "enum": [
              "all",
              "news",
              "guides"
            ],
            "type": "string",
            "description": "Crypto news only. Guides need one coin ID.",
            "default": "all"
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Row ceiling for the run. Each list page is one API call against your plan.",
            "default": 100
          },
          "requestsPerMinute": {
            "title": "Requests per minute",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Pacing ceiling. The Demo plan allows about 30 to 100 calls a minute; paid plans allow more.",
            "default": 30
          },
          "apiPlan": {
            "title": "API plan",
            "enum": [
              "auto",
              "demo",
              "pro"
            ],
            "type": "string",
            "description": "Which CoinGecko API the key belongs to. Auto tries the Pro API first and then the Demo API with one /ping each.",
            "default": "auto"
          },
          "apiKey": {
            "title": "CoinGecko API key",
            "type": "string",
            "description": "Bring your own API key: your CoinGecko Demo or Pro key from the Developer Dashboard (it starts with CG-). Or set the DATA_API_KEY environment secret."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}