Script Usage Script-mode skill — read this file, then invoke from a block: Read for the full list of available functions. Common ones: , , , , , , , , , , , , , , , . CoinGecko Skill Function Reference (signatures) All public functions are in . is the CoinGecko id (e.g. , ) — use first if unsure. defaults to . Prices & Charts | Function | Description | |---|---| | | Current or historical price. = comma-string like . = list of unix ts for historical (default: now). | | | OHLC bars for last N days. Returns list of . Granularity auto-selected: 1d=30min, 7-30d=4h, 30d+=4h. | | | Price + market ca…

, # YYYY-MM-DD\n r'^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}

Script Usage Script-mode skill — read this file, then invoke from a block: Read for the full list of available functions. Common ones: , , , , , , , , , , , , , , , . CoinGecko Skill Function Reference (signatures) All public functions are in . is the CoinGecko id (e.g. , ) — use first if unsure. defaults to . Prices & Charts | Function | Description | |---|---| | | Current or historical price. = comma-string like . = list of unix ts for historical (default: now). | | | OHLC bars for last N days. Returns list of . Granularity auto-selected: 1d=30min, 7-30d=4h, 30d+=4h. | | | Price + market ca…

, # YYYY-MM-DD HH:MM:SS\n r'^\\d{4}/\\d{2}/\\d{2}

Script Usage Script-mode skill — read this file, then invoke from a block: Read for the full list of available functions. Common ones: , , , , , , , , , , , , , , , . CoinGecko Skill Function Reference (signatures) All public functions are in . is the CoinGecko id (e.g. , ) — use first if unsure. defaults to . Prices & Charts | Function | Description | |---|---| | | Current or historical price. = comma-string like . = list of unix ts for historical (default: now). | | | OHLC bars for last N days. Returns list of . Granularity auto-selected: 1d=30min, 7-30d=4h, 30d+=4h. | | | Price + market ca…

, # YYYY/MM/DD\n r'^\\d{2}/\\d{2}/\\d{4}

Script Usage Script-mode skill — read this file, then invoke from a block: Read for the full list of available functions. Common ones: , , , , , , , , , , , , , , , . CoinGecko Skill Function Reference (signatures) All public functions are in . is the CoinGecko id (e.g. , ) — use first if unsure. defaults to . Prices & Charts | Function | Description | |---|---| | | Current or historical price. = comma-string like . = list of unix ts for historical (default: now). | | | OHLC bars for last N days. Returns list of . Granularity auto-selected: 1d=30min, 7-30d=4h, 30d+=4h. | | | Price + market ca…

, # MM/DD/YYYY\n r'^\\d{2}-\\d{2}-\\d{4}

Script Usage Script-mode skill — read this file, then invoke from a block: Read for the full list of available functions. Common ones: , , , , , , , , , , , , , , , . CoinGecko Skill Function Reference (signatures) All public functions are in . is the CoinGecko id (e.g. , ) — use first if unsure. defaults to . Prices & Charts | Function | Description | |---|---| | | Current or historical price. = comma-string like . = list of unix ts for historical (default: now). | | | OHLC bars for last N days. Returns list of . Granularity auto-selected: 1d=30min, 7-30d=4h, 30d+=4h. | | | Price + market ca…

# DD-MM-YYYY (for historical data format)\n ]\n \n for pattern in iso_patterns:\n if re.match(pattern, time_str):\n return _parse_date_string(time_str)\n \n # Parse natural language\n return _parse_natural_language(time_str)\n\n\ndef _parse_date_string(date_str: str) -> int:\n \"\"\"Parse various date string formats to Unix timestamp.\"\"\"\n formats = [\n '%Y-%m-%d',\n '%Y-%m-%d %H:%M:%S',\n '%Y/%m/%d',\n '%m/%d/%Y',\n '%d-%m-%Y'\n ]\n \n for fmt in formats:\n try:\n dt = datetime.strptime(date_str, fmt)\n return int(dt.timestamp())\n except ValueError:\n continue\n \n raise ValueError(f\"Unable to parse date string: {date_str}\")\n\n\ndef _parse_natural_language(text: str) -> int:\n \"\"\"Parse natural language time expressions to Unix timestamp.\"\"\"\n now = datetime.now()\n \n # Handle \"today\", \"yesterday\", etc.\n if text in ['today', 'now']:\n return int(now.timestamp())\n elif text == 'yesterday':\n return int((now - timedelta(days=1)).timestamp())\n elif text == 'tomorrow':\n return int((now + timedelta(days=1)).timestamp())\n \n # Handle relative time expressions\n relative_patterns = [\n (r'(\\d+)\\s*(second|sec)s?\\s*ago', 'seconds'),\n (r'(\\d+)\\s*(minute|min)s?\\s*ago', 'minutes'),\n (r'(\\d+)\\s*(hour|hr)s?\\s*ago', 'hours'),\n (r'(\\d+)\\s*(day)s?\\s*ago', 'days'),\n (r'(\\d+)\\s*(week)s?\\s*ago', 'weeks'),\n (r'(\\d+)\\s*(month)s?\\s*ago', 'months'),\n (r'(\\d+)\\s*(year)s?\\s*ago', 'years'),\n (r'last\\s*(week)', 'weeks'),\n (r'last\\s*(month)', 'months'),\n (r'last\\s*(year)', 'years')\n ]\n \n for pattern, unit in relative_patterns:\n match = re.search(pattern, text)\n if match:\n if match.group(1).isdigit():\n amount = int(match.group(1))\n else:\n amount = 1 # for \"last week\", etc.\n \n if unit == 'seconds':\n delta = timedelta(seconds=amount)\n elif unit == 'minutes':\n delta = timedelta(minutes=amount)\n elif unit == 'hours':\n delta = timedelta(hours=amount)\n elif unit == 'days':\n delta = timedelta(days=amount)\n elif unit == 'weeks':\n delta = timedelta(weeks=amount)\n elif unit == 'months':\n # Approximate months as 30 days\n delta = timedelta(days=amount * 30)\n elif unit == 'years':\n # Approximate years as 365 days\n delta = timedelta(days=amount * 365)\n else:\n continue\n \n return int((now - delta).timestamp())\n \n raise ValueError(f\"Unable to parse natural language time: {text}\")\n\n\ndef split_time_range(from_timestamp: int, to_timestamp: int, max_days: int = 180) -> List[Tuple[int, int]]:\n \"\"\"\n Split a time range into chunks that don't exceed the maximum days limit.\n \n Args:\n from_timestamp: Start timestamp\n to_timestamp: End timestamp\n max_days: Maximum days per chunk (default 180 for CoinGecko)\n \n Returns:\n List of (start, end) timestamp tuples\n \n Example:\n >>> splits = split_time_range(1640995200, 1672531200, 180) # 1 year range\n >>> len(splits)\n 3 # Split into 3 chunks\n \"\"\"\n if from_timestamp >= to_timestamp:\n raise ValueError(\"from_timestamp must be less than to_timestamp\")\n \n total_seconds = to_timestamp - from_timestamp\n max_seconds = max_days * 24 * 60 * 60 # Convert days to seconds\n \n if total_seconds \u003c= max_seconds:\n return [(from_timestamp, to_timestamp)]\n \n chunks = []\n current_start = from_timestamp\n \n while current_start \u003c to_timestamp:\n current_end = min(current_start + max_seconds, to_timestamp)\n chunks.append((current_start, current_end))\n current_start = current_end\n \n return chunks\n\n\ndef validate_coin_input(coin_input: str) -> str:\n \"\"\"\n Validate and normalize coin input (ID or symbol).\n \n Args:\n coin_input: Coin ID or symbol\n \n Returns:\n str: Normalized coin input\n \n Raises:\n ValueError: If input is invalid\n \"\"\"\n if not coin_input or not isinstance(coin_input, str):\n raise ValueError(\"Coin input must be a non-empty string\")\n \n return coin_input.strip().lower()\n\n\ndef format_dd_mm_yyyy_date(timestamp: int) -> str:\n \"\"\"\n Convert Unix timestamp to dd-mm-yyyy format for CoinGecko historical API.\n \n Args:\n timestamp: Unix timestamp\n \n Returns:\n str: Date in dd-mm-yyyy format\n \"\"\"\n dt = datetime.utcfromtimestamp(timestamp)\n return dt.strftime('%d-%m-%Y')\n\n\ndef get_days_difference(from_timestamp: int, to_timestamp: int) -> int:\n \"\"\"\n Calculate the number of days between two timestamps.\n \n Args:\n from_timestamp: Start timestamp\n to_timestamp: End timestamp\n \n Returns:\n int: Number of days\n \"\"\"\n return int((to_timestamp - from_timestamp) / (24 * 60 * 60))\n\n\ndef merge_ohlc_data(data_chunks: List[List]) -> List:\n \"\"\"\n Merge multiple OHLC data chunks into a single list.\n \n Args:\n data_chunks: List of OHLC data chunks\n \n Returns:\n List: Merged OHLC data sorted by timestamp\n \"\"\"\n merged = []\n for chunk in data_chunks:\n merged.extend(chunk)\n \n # Sort by timestamp (first element in each OHLC array)\n merged.sort(key=lambda x: x[0])\n \n # Remove duplicates (same timestamp)\n seen_timestamps = set()\n unique_data = []\n for item in merged:\n timestamp = item[0]\n if timestamp not in seen_timestamps:\n seen_timestamps.add(timestamp)\n unique_data.append(item)\n \n return unique_data\n\n\ndef merge_market_chart_data(data_chunks: List[dict]) -> dict:\n \"\"\"\n Merge multiple market chart data chunks into a single dictionary.\n \n Args:\n data_chunks: List of market chart data dictionaries\n \n Returns:\n dict: Merged market chart data with sorted timestamps\n \"\"\"\n merged = {\n 'prices': [],\n 'market_caps': [],\n 'total_volumes': []\n }\n \n for chunk in data_chunks:\n if 'prices' in chunk:\n merged['prices'].extend(chunk['prices'])\n if 'market_caps' in chunk:\n merged['market_caps'].extend(chunk['market_caps'])\n if 'total_volumes' in chunk:\n merged['total_volumes'].extend(chunk['total_volumes'])\n \n # Sort all arrays by timestamp\n for key in merged:\n merged[key].sort(key=lambda x: x[0])\n \n # Remove duplicates\n seen_timestamps = set()\n unique_data = []\n for item in merged[key]:\n timestamp = item[0]\n if timestamp not in seen_timestamps:\n seen_timestamps.add(timestamp)\n unique_data.append(item)\n merged[key] = unique_data\n \n return merged\n\n\ndef search_coin_by_name(query: str) -> Optional[Dict[str, str]]:\n \"\"\"\n Search for a cryptocurrency by name or symbol with intelligent input detection.\n \n - All uppercase input (e.g., \"BTC\") is treated as symbol search\n - Input with ≤3 letters (e.g., \"btc\", \"eth\", \"sol\") is treated as symbol search\n - Other mixed/lowercase input (e.g., \"bitcoin\", \"Bitcoin\") is treated as name search\n - Symbol search: prioritizes exact symbol match, then market cap ranking\n - Name search: prioritizes exact name match, then market cap ranking\n \n Special cases handled:\n - ORDER/order/Order -> Orderly Network (orderly-network)\n - orderly-network -> Returns directly as valid CoinGecko ID\n \n Args:\n query (str): Search query - uppercase or ≤3 letters for symbol, otherwise name search\n \n Returns:\n Optional[Dict[str, str]]: Dictionary with symbol, name, and id of the best match, or None if not found\n \n Example:\n >>> search_coin_by_name(\"BTC\") # Symbol search (uppercase)\n {'symbol': 'BTC', 'name': 'Bitcoin', 'id': 'bitcoin'}\n >>> search_coin_by_name(\"btc\") # Symbol search (≤3 letters)\n {'symbol': 'BTC', 'name': 'Bitcoin', 'id': 'bitcoin'}\n >>> search_coin_by_name(\"bitcoin\") # Name search (>3 letters, mixed case)\n {'symbol': 'BTC', 'name': 'Bitcoin', 'id': 'bitcoin'}\n >>> search_coin_by_name(\"order\") # Special case for Orderly Network\n {'symbol': 'ORDER', 'name': 'Orderly Network', 'id': 'orderly-network'}\n \n Raises:\n ValueError: If API key is missing or query is invalid\n requests.RequestException: If API request fails\n \"\"\"\n if not query or not isinstance(query, str):\n raise ValueError(\"Query must be a non-empty string\")\n \n # Special case mappings for ambiguous tokens and direct CoinGecko IDs\n # When users say \"ORDER\", they almost always mean Orderly Network\n # When users say \"WOO\", they mean WOO Network (id: woo-network, not woo)\n special_mappings = {\n 'order': {'symbol': 'ORDER', 'name': 'Orderly Network', 'id': 'orderly-network'},\n 'ORDER': {'symbol': 'ORDER', 'name': 'Orderly Network', 'id': 'orderly-network'},\n 'Order': {'symbol': 'ORDER', 'name': 'Orderly Network', 'id': 'orderly-network'},\n 'orderly-network': {'symbol': 'ORDER', 'name': 'Orderly Network', 'id': 'orderly-network'}, # Handle direct ID\n 'woo': {'symbol': 'WOO', 'name': 'WOO', 'id': 'woo-network'},\n 'WOO': {'symbol': 'WOO', 'name': 'WOO', 'id': 'woo-network'},\n 'Woo': {'symbol': 'WOO', 'name': 'WOO', 'id': 'woo-network'},\n 'woo-network': {'symbol': 'WOO', 'name': 'WOO', 'id': 'woo-network'}, # Handle direct ID\n }\n \n # Check for special cases first\n query_stripped = query.strip()\n if query_stripped in special_mappings:\n return special_mappings[query_stripped]\n \n # Get API key\n api_key = os.getenv(\"COINGECKO_API_KEY\")\n if not api_key:\n raise ValueError(\n \"COINGECKO_API_KEY environment variable is required. \"\n \"Get your API key from https://coingecko.com/en/api\"\n )\n \n # Prepare API request\n url = \"https://pro-api.coingecko.com/api/v3/search\"\n headers = {\n \"x-cg-pro-api-key\": api_key,\n \"accept\": \"application/json\"\n }\n params = {\n \"query\": query.strip()\n }\n \n try:\n # Make single API request (no retry logic)\n response = proxied_get(url, headers=headers, params=params, timeout=15)\n response.raise_for_status()\n \n data = response.json()\n \n # Extract coins from search results\n coins = data.get(\"coins\", [])\n \n if not coins:\n return None\n \n # Determine if input is symbol or name based on case and length\n query_stripped = query.strip()\n is_symbol_search = query_stripped.isupper() or len(query_stripped) \u003c= 3\n \n if is_symbol_search:\n # Symbol search: check for exact symbol OR exact name match in order of relevance\n # This ensures \"SOLANA\" matches the real Solana (name match at index 0)\n # rather than a meme coin with symbol \"SOLANA\" at index 18\n for coin in coins:\n coin_symbol = coin.get(\"symbol\", \"\")\n coin_name = coin.get(\"name\", \"\")\n if coin_symbol.upper() == query_stripped.upper() or coin_name.upper() == query_stripped.upper():\n return {\n \"symbol\": coin.get(\"symbol\", \"\").upper(),\n \"name\": coin.get(\"name\", \"\"),\n \"id\": coin.get(\"id\", \"\")\n }\n\n # No exact symbol or name match, return highest market cap\n best_coin = coins[0]\n return {\n \"symbol\": best_coin.get(\"symbol\", \"\").upper(),\n \"name\": best_coin.get(\"name\", \"\"),\n \"id\": best_coin.get(\"id\", \"\")\n }\n else:\n # Name search: prioritize exact name match, then market cap\n for coin in coins:\n coin_name = coin.get(\"name\", \"\")\n if coin_name.lower() == query_stripped.lower():\n return {\n \"symbol\": coin.get(\"symbol\", \"\").upper(),\n \"name\": coin.get(\"name\", \"\"),\n \"id\": coin.get(\"id\", \"\")\n }\n \n # No exact name match, return highest market cap\n best_coin = coins[0]\n return {\n \"symbol\": best_coin.get(\"symbol\", \"\").upper(),\n \"name\": best_coin.get(\"name\", \"\"),\n \"id\": best_coin.get(\"id\", \"\")\n }\n \n except requests.exceptions.Timeout:\n raise requests.RequestException(\"Request timeout - CoinGecko API may be slow\")\n except requests.exceptions.ConnectionError:\n raise requests.RequestException(\"Connection error - check internet connection\")\n except requests.exceptions.RequestException as e:\n raise requests.RequestException(f\"API request failed: {e}\")\n \n return None\n\n\n","content_type":"text/x-python; charset=utf-8","language":"python","size":17258,"content_sha256":"3706fb5d1e53726f91636567df6a5f3a11029aff6b0776e5ca0fe78d8a2bb8c5"}],"content_json":{"type":"doc","content":[{"type":"heading","attrs":{"level":2},"content":[{"text":"Script Usage","type":"text"}]},{"type":"paragraph","content":[{"text":"Script-mode skill — read this file, then invoke from a ","type":"text"},{"text":"bash","type":"text","marks":[{"type":"code_inline"}]},{"text":" block:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"python3 - \u003c\u003c'EOF'\nimport sys, json\nsys.path.insert(0, \"/data/workspace/skills/coingecko\")\nfrom exports import coin_price, cg_trending, cg_global\n\nprint(coin_price(coin_ids=\"bitcoin,ethereum\"))\nprint(cg_trending())\nEOF","type":"text"}]},{"type":"paragraph","content":[{"text":"Read ","type":"text"},{"text":"exports.py","type":"text","marks":[{"type":"code_inline"}]},{"text":" for the full list of available functions. Common ones: ","type":"text"},{"text":"coin_price","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"coin_ohlc","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"coin_chart","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"cg_trending","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"cg_top_gainers_losers","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"cg_new_coins","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"cg_global","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"cg_global_defi","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"cg_categories","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"cg_derivatives","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"cg_coins_markets","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"cg_coin_data","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"cg_coin_tickers","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"cg_search","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"cg_token_price","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"cg_coin_by_contract","type":"text","marks":[{"type":"code_inline"}]},{"text":".","type":"text"}]},{"type":"heading","attrs":{"level":1},"content":[{"text":"CoinGecko Skill","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Function Reference (signatures)","type":"text"}]},{"type":"paragraph","content":[{"text":"All public functions are in ","type":"text"},{"text":"exports.py","type":"text","marks":[{"type":"code_inline"}]},{"text":". ","type":"text"},{"text":"coin_id","type":"text","marks":[{"type":"code_inline"}]},{"text":" is the CoinGecko id (e.g. ","type":"text"},{"text":"bitcoin","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"ethereum","type":"text","marks":[{"type":"code_inline"}]},{"text":") — use ","type":"text"},{"text":"cg_search(query)","type":"text","marks":[{"type":"code_inline"}]},{"text":" first if unsure. ","type":"text"},{"text":"vs_currency","type":"text","marks":[{"type":"code_inline"}]},{"text":" defaults to ","type":"text"},{"text":"usd","type":"text","marks":[{"type":"code_inline"}]},{"text":".","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Prices & Charts","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Function","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Description","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"coin_price(coin_ids, timestamps=None, vs_currency='usd')","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Current or historical price. ","type":"text"},{"text":"coin_ids","type":"text","marks":[{"type":"code_inline"}]},{"text":" = comma-string like ","type":"text"},{"text":"\"bitcoin,ethereum\"","type":"text","marks":[{"type":"code_inline"}]},{"text":". ","type":"text"},{"text":"timestamps","type":"text","marks":[{"type":"code_inline"}]},{"text":" = list of unix ts for historical (default: now).","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"coin_ohlc(coin_id, days=30, vs_currency='usd')","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"OHLC bars for last N days. Returns list of ","type":"text"},{"text":"[ts, o, h, l, c]","type":"text","marks":[{"type":"code_inline"}]},{"text":". Granularity auto-selected: 1d=30min, 7-30d=4h, 30d+=4h.","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"coin_chart(coin_id, days=30, vs_currency='usd')","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Price + market_cap + total_volume timeseries. Returns ","type":"text"},{"text":"{prices, market_caps, total_volumes}","type":"text","marks":[{"type":"code_inline"}]},{"text":" (each list of ","type":"text"},{"text":"[ts, val]","type":"text","marks":[{"type":"code_inline"}]},{"text":").","type":"text"}]}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Discovery","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Function","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Description","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_trending()","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Trending coins, NFTs, categories (last 24h).","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_top_gainers_losers(vs_currency='usd', duration='24h')","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Top gainers/losers. ","type":"text"},{"text":"duration","type":"text","marks":[{"type":"code_inline"}]},{"text":" = ","type":"text"},{"text":"1h","type":"text","marks":[{"type":"code_inline"}]},{"text":"/","type":"text"},{"text":"24h","type":"text","marks":[{"type":"code_inline"}]},{"text":"/","type":"text"},{"text":"7d","type":"text","marks":[{"type":"code_inline"}]},{"text":"/","type":"text"},{"text":"14d","type":"text","marks":[{"type":"code_inline"}]},{"text":"/","type":"text"},{"text":"30d","type":"text","marks":[{"type":"code_inline"}]},{"text":"/","type":"text"},{"text":"60d","type":"text","marks":[{"type":"code_inline"}]},{"text":"/","type":"text"},{"text":"1y","type":"text","marks":[{"type":"code_inline"}]},{"text":".","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_new_coins()","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Recently listed coins.","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_search(query)","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Search coins/exchanges/categories by name.","type":"text"}]}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Market Data","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Function","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Description","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_global()","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Global crypto market: total market_cap, volume, dominance.","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_global_defi()","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Global DeFi: TVL, dominance, top protocols.","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_coins_markets(vs_currency='usd', order='market_cap_desc', per_page=100, page=1, sparkline=False, price_change_percentage='24h', category=None, ids=None)","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Top coins with full market data.","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_coin_data(coin_id, localization=False, tickers=False, market_data=True, community_data=False, developer_data=False, sparkline=False)","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Detailed data for one coin.","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_coin_tickers(coin_id, exchange_ids=None, include_exchange_logo=False, page=1, order='volume_desc', depth=False)","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Where a coin trades + volumes.","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_coins_list(include_platform=False)","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"All coin ids/symbols (for resolving).","type":"text"}]}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Categories / Derivatives / NFTs","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Function","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Description","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_categories(order='market_cap_desc')","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Top categories with market_cap and volume.","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_categories_list()","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Just category ids/names.","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_derivatives(include_tickers='unexpired')","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Derivatives tickers across exchanges.","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_derivatives_exchanges(order='open_interest_btc_desc', per_page=50)","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Derivatives exchange rankings.","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_nfts_list(order='market_cap_usd_desc', per_page=100, page=1)","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Top NFT collections.","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_nft(nft_id)","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"NFT collection detail.","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_nft_by_contract(asset_platform, contract_address)","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"NFT by contract address.","type":"text"}]}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Exchanges","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Function","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Description","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_exchanges(per_page=100, page=1)","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Exchange rankings.","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_exchange(exchange_id)","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"One exchange's detail.","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_exchange_tickers(exchange_id, ...)","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Tickers on an exchange.","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_exchange_volume_chart(exchange_id, days=30)","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Exchange volume history.","type":"text"}]}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Contracts / Tokens (by platform)","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Function","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Description","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_token_price(platform, contract_addresses, vs_currencies='usd', include_market_cap=False, include_24hr_vol=False, include_24hr_change=False, include_last_updated_at=False)","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Price by contract address on a platform.","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_coin_by_contract(platform, contract_address)","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Coin metadata by contract.","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_asset_platforms(filter=None)","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Supported chains.","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_vs_currencies()","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Supported quote currencies.","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_exchange_rates()","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"BTC-denominated rates for fiat/major coins.","type":"text"}]}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"🚫 CRITICAL: STOP — READ THIS BEFORE CALLING ANY TOOL","type":"text"}]},{"type":"paragraph","content":[{"text":"The #1 error is calling Coinglass tools instead of CoinGecko tools.","type":"text","marks":[{"type":"strong"}]},{"text":" They have similar names but are COMPLETELY DIFFERENT systems.","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"WRONG → RIGHT Tool Substitution Table","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"❌ NEVER call this","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"✅ Call this instead","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"How to tell them apart","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_coins_market_data","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_coins_markets","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"market_data=Coinglass derivatives. markets=CoinGecko spot.","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_ohlc_history","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"coin_ohlc","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"ohlc_history=Coinglass futures candles. coin_ohlc=CoinGecko spot candles.","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_pair_market_data","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_coin_tickers","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"pair_market_data=Coinglass futures pair. coin_tickers=CoinGecko spot pairs.","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_supported_exchanges","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_exchanges","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"supported_exchanges=Coinglass futures. exchanges=CoinGecko spot.","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_taker_exchanges","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_exchange","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"taker=Coinglass volume. exchange=CoinGecko exchange info.","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_aggregated_taker_volume","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_coin_tickers","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"taker_volume=Coinglass. coin_tickers=CoinGecko volume across exchanges.","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"defillama_chains","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_global_defi","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"For DeFi stats from CoinGecko, use cg_global_defi().","type":"text"}]}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Also FORBIDDEN:","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"❌ ","type":"text"},{"text":"web_search","type":"text","marks":[{"type":"code_inline"}]},{"text":" / ","type":"text"},{"text":"web_fetch","type":"text","marks":[{"type":"code_inline"}]},{"text":" — ALL data is available via native CoinGecko tools above. NEVER use web_search for crypto market data.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"❌ ","type":"text"},{"text":"bash","type":"text","marks":[{"type":"code_inline"}]},{"text":" for data processing — CoinGecko tools return clean data. No bash needed.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"❌ ","type":"text"},{"text":"NEVER answer with training data","type":"text","marks":[{"type":"strong"}]},{"text":" — all prices, rankings, OHLC are stale. CALL THE TOOL.","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"⚠️ MANDATORY TOOL CALLS — You MUST call a tool before answering these","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Request type","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"You MUST call","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Why","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"K线 / OHLC / candlestick / open high low close","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"coin_ohlc(coin_id, days)","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Price data is real-time; training data is stale","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"走势图 / price chart / 价格趋势","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"coin_chart(coin_id, days)","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Same reason","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"当前价格 / price right now","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"coin_price(coin_ids)","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Training data has no live prices","type":"text"}]}]}]}]},{"type":"paragraph","content":[{"text":"DO NOT return any numeric market data (prices, OHLC values, percentages) without calling a tool first.","type":"text","marks":[{"type":"strong"}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"⚡ Question → Tool Map (match first keyword, call immediately)","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Question keyword","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Tool to call","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Example","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"价格 / price / 多少钱 (single coin)","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"coin_price(coin_id)","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"coin_price(coin_ids=\"bitcoin\")","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"K线 / OHLC / candlestick / 蜡烛图","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"coin_ohlc(coin_id, days)","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"coin_ohlc(coin_id=\"ethereum\", days=7)","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"走势 / trend / price chart / 价格历史","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"coin_chart(coin_id, days)","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"coin_chart(coin_id=\"solana\", days=30)","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"热门 / trending / 趋势币","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_trending()","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_trending()","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"涨幅最大 / 跌幅最大 / gainers / losers","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_top_gainers_losers()","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_top_gainers_losers()","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"新币 / 新上线 / new coins / recently added","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_new_coins()","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_new_coins()","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"总市值 / BTC市占率 / global / 晨报 / 市场概况","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_global()","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_global()","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"DeFi总市值 / DeFi TVL / DeFi dominance","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_global_defi()","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_global_defi()","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"板块 / sector / category / L1 / L2 / Meme / AI coins","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_categories()","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_categories()","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"板块内个币 / Meme前10 / AI币排名 / DeFi币排名","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_coins_markets(category=X)","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_coins_markets(category=\"meme-token\", per_page=10)","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"市值排名 / top 10 / ranking / 前10币","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_coins_markets(per_page=N)","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_coins_markets(per_page=10)","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"ATH / 历史最高 / 社区 / dev / 研究 / fundamentals","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_coin_data(coin_id)","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_coin_data(coin_id=\"solana\", community_data=True)","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"对比两个币 / compare / XX vs YY","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_coin_data()","type":"text","marks":[{"type":"code_inline"}]},{"text":" × 2","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"call once per coin","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"NFT排名 / NFT市场 / floor price / top NFTs","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_nfts_list()","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_nfts_list()","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"某个NFT (BAYC/Punks/Azuki)","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_nft(nft_id)","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_nft(nft_id=\"bored-ape-yacht-club\")","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"交易所详情 / Binance详情 / exchange data","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_exchange(exchange_id)","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_exchange(exchange_id=\"binance\")","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"交易所列表 / exchange ranking","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_exchanges()","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_exchanges()","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"交易对 / trading pairs / 流动性分布","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_coin_tickers(coin_id)","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_coin_tickers(coin_id=\"bitcoin\")","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"交易所交易量趋势 / volume chart","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_exchange_volume_chart(exchange_id)","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_exchange_volume_chart(exchange_id=\"binance\", days=30)","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"合约地址价格 / token price on-chain","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_token_price(platform, contract)","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_token_price(platform=\"ethereum\", contract_addresses=\"0xa0b...\")","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"搜索币 / 找币 / coin lookup / search","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_search(query)","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_search(query=\"pepe\")","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"永续合约交易所 / derivatives exchange / OI排名","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_derivatives_exchanges()","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_derivatives_exchanges()","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"合约ticker / perpetual / funding / basis","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_derivatives()","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_derivatives()","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"交易所对比 + 永续交易所","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cg_exchanges()","type":"text","marks":[{"type":"code_inline"}]},{"text":" + ","type":"text"},{"text":"cg_derivatives_exchanges()","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"both calls","type":"text"}]}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"🌳 Decision Tree","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":""},"content":[{"text":"How many coins?\n├─ ONE coin\n│ ├─ Just price? → coin_price()\n│ ├─ ATH/community/dev/deep? → cg_coin_data()\n│ ├─ OHLC candles? → coin_ohlc()\n│ ├─ Price trend? → coin_chart()\n│ └─ Unknown ID? → cg_search() first\n├─ MULTIPLE coins / ranking\n│ ├─ Sector aggregate (板块总市值)? → cg_categories()\n│ ├─ Sector individual (Meme前10)? → cg_coins_markets(category=X)\n│ └─ General ranking? → cg_coins_markets(per_page=N)\n├─ NFTs → cg_nfts_list() or cg_nft(nft_id)\n├─ Exchange → cg_exchange(id) or cg_exchanges()\n├─ Global → cg_global() or cg_global_defi()\n└─ Token by contract → cg_token_price()","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Common Category IDs","type":"text"}]},{"type":"paragraph","content":[{"text":"meme-token","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"artificial-intelligence","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"layer-1","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"layer-2","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"decentralized-finance-defi","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"gaming","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"real-world-assets-rwa","type":"text","marks":[{"type":"code_inline"}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Output Formatting","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Prices: always use ","type":"text"},{"text":"$","type":"text","marks":[{"type":"code_inline"}]},{"text":" sign → ","type":"text"},{"text":"$66,697","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Percentages: always use ","type":"text"},{"text":"%","type":"text","marks":[{"type":"code_inline"}]},{"text":" → ","type":"text"},{"text":"+4.2%","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"NFT floor in ETH: show USD too → ","type":"text"},{"text":"5.17 ETH ($10,534)","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Important Notes","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"CoinGecko uses slug IDs: \"bitcoin\", \"ethereum\", \"solana\". Symbols (BTC, ETH, SOL) auto-resolve.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"If unsure about a coin ID → ","type":"text"},{"text":"cg_search(query=\"coin name\")","type":"text","marks":[{"type":"code_inline"}]},{"text":" first.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Most questions need only 1-2 tool calls. Do NOT chain 3+ calls.","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Common Issues","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"coin_price failed with invalid ID","type":"text"}]},{"type":"paragraph","content":[{"text":"Solution:","type":"text","marks":[{"type":"strong"}]},{"text":" Use ","type":"text"},{"text":"cg_search(query=\"coin name\")","type":"text","marks":[{"type":"code_inline"}]},{"text":" to find the correct CoinGecko ID first, or use the symbol directly (e.g., 'COMP').","type":"text"}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"hr","attrs":{"markup":"---"}}]},"metadata":{"date":"2026-06-05","name":"coingecko","author":"@skillopedia","source":{"stars":13,"repo_name":"official-skills","origin_url":"https://github.com/starchild-ai-agent/official-skills/blob/HEAD/coingecko/SKILL.md","repo_owner":"starchild-ai-agent","body_sha256":"3a72aa6fde844fcb3800f6c8529d5a27db62aefc2e6ac8b23ef938c9cdea71e4","cluster_key":"1be517e67662379b93fe49d0a0873cec88b8241b41bd91ceb5e8484148cb8283","clean_bundle":{"format":"clean-skill-bundle-v1","source":"starchild-ai-agent/official-skills/coingecko/SKILL.md","attachments":[{"id":"05772186-7231-56ea-a1d5-9076f7704f2b","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/05772186-7231-56ea-a1d5-9076f7704f2b/attachment.py","path":"__init__.py","size":6861,"sha256":"43b6ff20672300f0501c1e2b99c3888c505a31aea338dca5357f85fc7723db9f","contentType":"text/x-python; charset=utf-8"},{"id":"eafdf9e1-4518-5519-be98-9e6d5e8724c0","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/eafdf9e1-4518-5519-be98-9e6d5e8724c0/attachment.py","path":"coingecko.py","size":52386,"sha256":"1643aded7a7f015745e8ddc0304a093e1b020c230a74ef98899965b1cad2f394","contentType":"text/x-python; charset=utf-8"},{"id":"b9274f36-ab8c-57b8-8748-2ba53fd51a64","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/b9274f36-ab8c-57b8-8748-2ba53fd51a64/attachment.py","path":"exports.py","size":7433,"sha256":"c36ff7965b15b0f5414392cebf66f24959a2df4cddc2c2294810bd634ac4c882","contentType":"text/x-python; charset=utf-8"},{"id":"24ecf48e-9cd7-5774-bd0f-3a9dbfe2e8fa","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/24ecf48e-9cd7-5774-bd0f-3a9dbfe2e8fa/attachment.png","path":"logo.png","size":11317,"sha256":"7d562c7c04ae192d791b6fdde86fbe827b26772320cbfa2a7384c83b0a256c58","contentType":"image/png"},{"id":"f8fc3885-f65b-5bbe-883a-361bb0537acc","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/f8fc3885-f65b-5bbe-883a-361bb0537acc/attachment.py","path":"tools/__init__.py","size":19,"sha256":"d088d4ca1cd00f8039c9f28ba85ab3282f137b5d02381ad4bf0472a4b52e792a","contentType":"text/x-python; charset=utf-8"},{"id":"e3ad2262-3d1f-5fbc-9747-f0abda38a3c1","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/e3ad2262-3d1f-5fbc-9747-f0abda38a3c1/attachment.py","path":"tools/coin_historical_chart_range_by_id.py","size":14270,"sha256":"0521624634961eb7885539b7af1fc38a11fcc981f2121abb20c6683b32df2b0b","contentType":"text/x-python; charset=utf-8"},{"id":"1bab5909-4ba8-5775-8786-3ad7928d69b1","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/1bab5909-4ba8-5775-8786-3ad7928d69b1/attachment.py","path":"tools/coin_ohlc_range_by_id.py","size":12786,"sha256":"c21da5d7ae6cb1a523ed16e4b78c95d9b56b3375780fac45a882ac5c3451961f","contentType":"text/x-python; charset=utf-8"},{"id":"793cfc6e-13e4-580a-8e54-6744a9e354f5","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/793cfc6e-13e4-580a-8e54-6744a9e354f5/attachment.py","path":"tools/coin_prices.py","size":20766,"sha256":"c66fb7224b68d3aa2f03fc4056bba5861cbaf491db19847fa3365583bd017d60","contentType":"text/x-python; charset=utf-8"},{"id":"0060fe98-3faf-5960-93a4-0f4346f90734","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/0060fe98-3faf-5960-93a4-0f4346f90734/attachment.py","path":"tools/coins.py","size":16878,"sha256":"1210343bd101a0b7335b1d6c5419213dcba8a780083a611938062212e2482891","contentType":"text/x-python; charset=utf-8"},{"id":"1eb4f499-ec1a-5e28-9157-903b29db9880","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/1eb4f499-ec1a-5e28-9157-903b29db9880/attachment.py","path":"tools/contracts.py","size":8522,"sha256":"a45d5ba5e874d1499ec7480622276bc00915efc214b72828c297720aa2eea2d5","contentType":"text/x-python; charset=utf-8"},{"id":"4e69795a-baab-50cc-8f61-d03913edc855","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/4e69795a-baab-50cc-8f61-d03913edc855/attachment.py","path":"tools/derivatives.py","size":8517,"sha256":"a8790b5cd3fc42eded87deef3f33f56168ed1c9b1bb98f12bd16a5b088047746","contentType":"text/x-python; charset=utf-8"},{"id":"d3617b4e-b1f2-5762-98e1-00c8d1a1de29","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/d3617b4e-b1f2-5762-98e1-00c8d1a1de29/attachment.py","path":"tools/exchanges.py","size":10066,"sha256":"1e367fd00d6b99d39607c9760c25d6aa769d4d68a9f19ca77c6122feadaab0d8","contentType":"text/x-python; charset=utf-8"},{"id":"0fae5f37-aba6-5852-b20c-9577b4e05c9a","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/0fae5f37-aba6-5852-b20c-9577b4e05c9a/attachment.py","path":"tools/global_data.py","size":4380,"sha256":"2d70ef99f18de620ce8be86a5ce761e75a297da3cd26c1d6d1068945beb8eee4","contentType":"text/x-python; charset=utf-8"},{"id":"624f2638-e85e-5b10-886a-0a842df93b29","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/624f2638-e85e-5b10-886a-0a842df93b29/attachment.py","path":"tools/infrastructure.py","size":5387,"sha256":"932f8249190db9aa63f361aee8c76d9285fc540bf453ea7b8ec1ac5723496bf6","contentType":"text/x-python; charset=utf-8"},{"id":"c959b3f9-b046-5e1a-8e56-037235be7ff0","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/c959b3f9-b046-5e1a-8e56-037235be7ff0/attachment.py","path":"tools/market_discovery.py","size":8123,"sha256":"732232a0694885580d00a403b49562df326b1996bb1575989ceaa6bc3f158980","contentType":"text/x-python; charset=utf-8"},{"id":"95c8a4d6-4d73-58d9-8bec-68859e967df3","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/95c8a4d6-4d73-58d9-8bec-68859e967df3/attachment.py","path":"tools/nfts.py","size":9111,"sha256":"d6e23918707639b6bdca326cb8e81fd77e71b7a65642d5e8fd10003c16b6761b","contentType":"text/x-python; charset=utf-8"},{"id":"dd9c65f8-d8e3-51f3-8043-5fc7a3ac782a","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/dd9c65f8-d8e3-51f3-8043-5fc7a3ac782a/attachment.py","path":"tools/search.py","size":3342,"sha256":"27f705fda0c2ecaf18ff4f0051c810991554cd29fa0c6e0be8dc58f42f051c18","contentType":"text/x-python; charset=utf-8"},{"id":"0374bdfb-5fab-5cd2-b943-40137833bb79","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/0374bdfb-5fab-5cd2-b943-40137833bb79/attachment.py","path":"tools/utils.py","size":17258,"sha256":"3706fb5d1e53726f91636567df6a5f3a11029aff6b0776e5ca0fe78d8a2bb8c5","contentType":"text/x-python; charset=utf-8"}],"bundle_sha256":"7a33dba2db4bc7b6f06cec5d2747aebace4fee4352130d482413a2a177e2d941","attachment_count":18,"text_attachments":17,"attachment_storage":"skillopedia-attachments-v1","binary_attachments":1,"excluded_attachments":[]},"cluster_size":1,"skill_md_path":"coingecko/SKILL.md","import_metadata":{"date":"2026-06-05","author":"@skillopedia","version":"v1","category":"data-analytics","category_label":"Data"},"exact_dupes_collapsed_into_this":0},"version":"v1","category":"data-analytics","delivery":"script","metadata":{"starchild":{"emoji":"🦎","requires":{"env":["COINGECKO_API_KEY"]},"skillKey":"coingecko"}},"import_tag":"clean-skills-v1","description":"Crypto spot prices, OHLC charts, market discovery, and global stats.\n\nUse when looking up coin prices, market caps, trending coins, sector rankings, or comparing tokens (e.g. BTC price, ETH chart, top gainers).\n","user-invocable":false,"disable-model-invocation":false}},"renderedAt":1782982109693}

Script Usage Script-mode skill — read this file, then invoke from a block: Read for the full list of available functions. Common ones: , , , , , , , , , , , , , , , . CoinGecko Skill Function Reference (signatures) All public functions are in . is the CoinGecko id (e.g. , ) — use first if unsure. defaults to . Prices & Charts | Function | Description | |---|---| | | Current or historical price. = comma-string like . = list of unix ts for historical (default: now). | | | OHLC bars for last N days. Returns list of . Granularity auto-selected: 1d=30min, 7-30d=4h, 30d+=4h. | | | Price + market ca…