{
  "openapi": "3.0.1",
  "info": {
    "title": "Crypto Price Tracker — Multi-Source Watchlist & Market API",
    "description": "Fetch real-time prices, market cap, 24h/7d/30d changes, ATH/ATL, supply, dominance, and computed analytics for a watchlist of coins (BTC, ETH, SOL...) or the top N by market cap. Multi-source: CoinGecko primary, Binance fallback. PPE: $0.003/coin.",
    "version": "2.0",
    "x-build-id": "LRZvhU3OQ7iG8vU3i"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~crypto-price-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-crypto-price-tracker",
        "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/khadinakbar~crypto-price-tracker/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-crypto-price-tracker",
        "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/khadinakbar~crypto-price-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-crypto-price-tracker",
        "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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "watchlist",
              "market",
              "dex",
              "wallet"
            ],
            "type": "string",
            "description": "Pick one: 'watchlist' (track specific coins by ticker), 'market' (top N by market cap), 'dex' (DexScreener token/pair lookup by address or symbol on any chain), or 'wallet' (GMGN on-chain wallet stats: total value, realized/unrealized PnL, winrate, holdings). Defaults to 'watchlist'.",
            "default": "watchlist"
          },
          "symbols": {
            "title": "Watchlist Symbols (CEX modes)",
            "minItems": 0,
            "maxItems": 100,
            "uniqueItems": true,
            "type": "array",
            "description": "Used by mode='watchlist'. List of coin tickers (case-insensitive). Common: BTC, ETH, SOL, USDC, USDT, XRP, BNB, ADA, DOGE, AVAX, LINK, MATIC. Up to 100 symbols. Ignored in non-watchlist modes. NOT a token contract address — for DEX tokens use mode='dex' with the address.",
            "items": {
              "type": "string"
            }
          },
          "topN": {
            "title": "Top N Coins (Market mode)",
            "minimum": 10,
            "maximum": 1000,
            "type": "integer",
            "description": "Used by mode='market'. How many coins to fetch from CoinGecko, ranked by market cap descending. Page size 250; 1000 takes 4 API calls. Default 100. Range 10-1000. Ignored in non-market modes.",
            "default": 100
          },
          "vsCurrency": {
            "title": "Quote Currency (CEX modes)",
            "enum": [
              "usd",
              "eur",
              "gbp",
              "jpy",
              "cny",
              "btc",
              "eth"
            ],
            "type": "string",
            "description": "Used by mode='watchlist' or 'market'. Fiat or crypto to quote prices in. Lowercase ISO code. Defaults to 'usd'. NOT used for DEX/wallet modes (those quote in USD natively).",
            "default": "usd"
          },
          "useBinanceFallback": {
            "title": "Use Binance Fallback (CEX modes)",
            "type": "boolean",
            "description": "Used by mode='watchlist' or 'market'. When true, enriches CoinGecko data with Binance public ticker (binance.com → binance.us auto-fallback). Adds resilience to CoinGecko rate limits and exposes fresher tick data. Default true. No extra event charged.",
            "default": true
          },
          "dexQueries": {
            "title": "DEX Queries (DEX mode)",
            "minItems": 0,
            "maxItems": 50,
            "uniqueItems": true,
            "type": "array",
            "description": "Used by mode='dex'. List of token contract addresses (e.g. So11111111111111111111111111111111111111112 for SOL on Solana, 0xdAC17F958D2ee523a2206206994597C13D831ec7 for USDT on Ethereum) OR symbol/name searches (e.g. 'PEPE', 'BONK'). Up to 50 queries. Addresses get exact lookups; symbols search across all chains.",
            "items": {
              "type": "string"
            }
          },
          "dexChain": {
            "title": "DEX Chain (DEX mode)",
            "enum": [
              "solana",
              "ethereum",
              "bsc",
              "base",
              "polygon",
              "arbitrum",
              "optimism",
              "avalanche",
              "tron"
            ],
            "type": "string",
            "description": "Used by mode='dex'. Chain to scope EVM-address lookups (sol uses native parsing). Auto-detected when query is a hex address (0x…); explicit when query is a symbol. Default 'solana'. Ignored when dexQueries are all addresses.",
            "default": "solana"
          },
          "dexMaxPairsPerToken": {
            "title": "Max Pairs Per Token (DEX mode)",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Used by mode='dex'. How many trading pairs to return per query, sorted by liquidity descending. Default 3 (the deepest pools). Range 1-20. Each pair counts as one onchain-record event.",
            "default": 3
          },
          "walletAddresses": {
            "title": "Wallet Addresses (Wallet mode)",
            "minItems": 0,
            "maxItems": 50,
            "uniqueItems": true,
            "type": "array",
            "description": "Used by mode='wallet'. List of on-chain wallet addresses to fetch GMGN stats for. Examples: Solana base58 (FRWqMbQpfNvK…) or EVM hex (0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045). Up to 50 addresses. Each address counts as one onchain-record event.",
            "items": {
              "type": "string"
            }
          },
          "walletChain": {
            "title": "Wallet Chain (Wallet mode)",
            "enum": [
              "sol",
              "eth",
              "bsc",
              "base",
              "tron"
            ],
            "type": "string",
            "description": "Used by mode='wallet'. Chain context for the GMGN wallet lookup. Default 'sol'. NOT auto-detected — set explicitly to match your addresses.",
            "default": "eth"
          },
          "walletPeriod": {
            "title": "Wallet Stats Period (Wallet mode)",
            "enum": [
              "1d",
              "7d",
              "30d"
            ],
            "type": "string",
            "description": "Used by mode='wallet'. Time window for PnL and trading-stats aggregation. '7d' is the GMGN default and best balance. '30d' gives longer-term performance; '1d' gives most recent. Default '7d'.",
            "default": "7d"
          },
          "responseFormat": {
            "title": "Response Format",
            "enum": [
              "detailed",
              "concise"
            ],
            "type": "string",
            "description": "'detailed' returns all fields per record (~300-400 tokens/item). 'concise' drops historical fields (ATH, ATL, 7d/30d changes, supply, transaction breakdowns) for compact LLM context (~150 tokens/item). Defaults to 'detailed'.",
            "default": "detailed"
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}