Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to CoinGecko

Scalekit connector
Open markdown

The CoinGecko connector lets your AI agent act in each user's CoinGecko account. Each user connects their own CoinGecko API key once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 38 tools.

Tools
38
What they doRead · write · destructive
38 · 0 · 038 read0 write0 destructive
Users sign in with

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

    .env
    SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
    SCALEKIT_CLIENT_ID=<your-client-id>
    SCALEKIT_CLIENT_SECRET=<your-client-secret>
  3. Create the CoinGecko connection

    In AgentKit > Connections, create a CoinGecko connection. The name you give it is the connection_name your code passes. See Configure connections.

  4. Authorize a user and make your first call

    quickstart.mts
    import { ScalekitClient } from '@scalekit-sdk/node'
    import 'dotenv/config'
    import { createInterface } from 'node:readline/promises'
    const scalekit = new ScalekitClient(
    process.env.SCALEKIT_ENVIRONMENT_URL,
    process.env.SCALEKIT_CLIENT_ID,
    process.env.SCALEKIT_CLIENT_SECRET,
    )
    const actions = scalekit.actions
    const connector = 'coingecko'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize CoinGecko:', link)
    const rl = createInterface({ input: process.stdin, output: process.stdout })
    await rl.question('Press Enter after authorizing...')
    rl.close()
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'coingecko_get_exchange_rates',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their CoinGecko credentials there. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • coingecko_get_coinGet the full profile of one coin by CoinGecko coin ID: metadata and live market data.Read-only

    Get Coin

    Get the full profile of one coin by CoinGecko coin ID: metadata and live market data. Returns name, symbol, description, links, image, categories, contract addresses per platform, genesis date, market_data (price, market cap and volume in every currency, ATH/ATL, supply, price changes) and up to 100 exchange tickers. Use coingecko_get_coin for everything about one coin. Use coingecko_get_simple_price for price only, coingecko_get_coin_by_contract when you only have a contract address, and coingecko_get_coin_tickers for more than 100 tickers.

    Inputs

    coin_idstringrequired
    CoinGecko coin API ID, for example bitcoin or ethereum. This is the id from coingecko_list_coins or coingecko_search, not the ticker symbol.
    dex_pair_formatstring
    How DEX ticker pairs show base and target: contract_address (default) or symbol, for example WETH/USDC.one of contract_addresssymbol
    include_categories_detailsboolean
    Set to true to add category IDs and names in categories_details. Default false.
    localizationboolean
    Set to false to drop the localized names and descriptions in every language, which shrinks the response a lot. Default true.
    market_databoolean
    Set to false to leave out market_data. Default true.
    sparklineboolean
    Set to true to add 7-day sparkline price data. Default false.
    tickersboolean
    Set to false to leave out exchange tickers. Default true.
  • coingecko_get_coin_by_contractGet the full profile of a token by its blockchain and contract address.Read-only

    Get Coin by Contract

    Get the full profile of a token by its blockchain and contract address. Returns the same coin profile as coingecko_get_coin: metadata, links, categories, contract addresses, market_data and up to 100 tickers. Use coingecko_get_coin_by_contract when you only have a contract address. Use coingecko_get_coin when you have the coin ID, and coingecko_get_token_price for price only.

    Inputs

    asset_platform_idstringrequired
    CoinGecko asset platform (blockchain) ID, for example ethereum, solana or binance-smart-chain. Valid IDs come from coingecko_list_asset_platforms.
    contract_addressstringrequired
    The token's contract address on that platform, for example 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 (WETH on Ethereum).
  • coingecko_get_coin_historyGet a snapshot of one coin's price, market cap and 24-hour volume on a past date, taken at 00:00 UTC.Read-only

    Get Coin History

    Get a snapshot of one coin's price, market cap and 24-hour volume on a past date, taken at 00:00 UTC. Returns the coin's id, symbol, name, image and market_data with current_price, market_cap and total_volume in every currency for that date. Demo keys only reach the past 365 days. Use coingecko_get_coin_history for a single past day. Use coingecko_get_coin_market_chart_range for a series over a period.

    Inputs

    coin_idstringrequired
    CoinGecko coin API ID, for example bitcoin or ethereum. This is the id from coingecko_list_coins or coingecko_search, not the ticker symbol.
    datestringrequired
    The day to snapshot, in dd-mm-yyyy format, for example 30-12-2025. Must be within the past 365 days on Demo keys.
    localizationboolean
    Set to false to drop localized names in every language. Default true.
  • coingecko_get_coin_market_chartGet a coin's historical price, market cap and 24-hour volume for the last N days, by CoinGecko coin ID.Read-only

    Get Coin Market Chart

    Get a coin's historical price, market cap and 24-hour volume for the last N days, by CoinGecko coin ID. Returns arrays prices, market_caps and total_volumes of [UNIX ms, value] points. Granularity is automatic: 5-minutely for 1 day, hourly for 2-90 days, daily beyond, unless interval is set. Demo keys only reach the past 365 days. Use coingecko_get_coin_market_chart for 'last N days'. Use coingecko_get_coin_market_chart_range for exact start and end dates, coingecko_get_coin_ohlc for candles, and coingecko_get_coin_history for a single day's snapshot.

    Inputs

    coin_idstringrequired
    CoinGecko coin API ID, for example bitcoin or ethereum. This is the id from coingecko_list_coins or coingecko_search, not the ticker symbol.
    daysstringrequired
    How many days back from now to return: any whole number such as 1, 30 or 365. Demo keys are limited to 365 days; max (full history) needs a paid plan.
    vs_currencystringrequired
    Currency to express prices and market data in, for example usd, eur or btc. Valid values come from coingecko_list_supported_vs_currencies.
    intervalstring
    Force the data interval: daily (one point per day at 00:00 UTC) or hourly (only for ranges within 100 days). Omit for automatic granularity.one of hourlydaily
    precisionstring
    Number of decimal places for price values, 0 to 18, or full for no rounding. Omit for CoinGecko's default rounding.one of full0123456789101112131415161718
  • coingecko_get_coin_market_chart_rangeGet a coin's historical price, market cap and 24-hour volume between two dates, by CoinGecko coin ID.Read-only

    Get Coin Market Chart Range

    Get a coin's historical price, market cap and 24-hour volume between two dates, by CoinGecko coin ID. Returns arrays prices, market_caps and total_volumes of [UNIX ms, value] points. Granularity is automatic (5-minutely within the last day, hourly up to 90 days, daily beyond) unless interval is set. Demo keys only reach the past 365 days. Use coingecko_get_coin_market_chart_range for a fixed window. Use coingecko_get_coin_market_chart for 'last N days' and coingecko_get_contract_market_chart_range when you only have a contract address.

    Inputs

    coin_idstringrequired
    CoinGecko coin API ID, for example bitcoin or ethereum. This is the id from coingecko_list_coins or coingecko_search, not the ticker symbol.
    fromstringrequired
    Start of the range, as a UNIX timestamp in seconds (for example 1767225600) or an ISO date YYYY-MM-DD or YYYY-MM-DDTHH:MM (for example 2026-01-01). Must be within the past 365 days on Demo keys.
    tostringrequired
    End of the range, as a UNIX timestamp in seconds (for example 1769904000) or an ISO date YYYY-MM-DD or YYYY-MM-DDTHH:MM (for example 2026-02-01).
    vs_currencystringrequired
    Currency to express prices and market data in, for example usd, eur or btc. Valid values come from coingecko_list_supported_vs_currencies.
    intervalstring
    Force the data interval: daily (one point per day at 00:00 UTC) or hourly (only for ranges within 100 days). Omit for automatic granularity.one of hourlydaily
    precisionstring
    Number of decimal places for price values, 0 to 18, or full for no rounding. Omit for CoinGecko's default rounding.one of full0123456789101112131415161718
  • coingecko_get_coin_ohlcGet open, high, low and close price candles for a coin over the last N days, by CoinGecko coin ID.Read-only

    Get Coin OHLC

    Get open, high, low and close price candles for a coin over the last N days, by CoinGecko coin ID. Returns an array of [UNIX ms close time, open, high, low, close]. Candle size is automatic: 30 minutes for 1-2 days, 4 hours for 7-30 days, 4 days beyond. Demo keys only reach the past 365 days. Use coingecko_get_coin_ohlc for candlestick charts. Use coingecko_get_coin_market_chart for finer price points with market cap and volume.

    Inputs

    coin_idstringrequired
    CoinGecko coin API ID, for example bitcoin or ethereum. This is the id from coingecko_list_coins or coingecko_search, not the ticker symbol.
    daysstringrequired
    How many days back from now to return: 1, 7, 14, 30, 90, 180 or 365.one of 17143090180365
    vs_currencystringrequired
    Currency to express prices and market data in, for example usd, eur or btc. Valid values come from coingecko_list_supported_vs_currencies.
    precisionstring
    Number of decimal places for price values, 0 to 18, or full for no rounding. Omit for CoinGecko's default rounding.one of full0123456789101112131415161718
  • coingecko_get_coin_tickersList where a coin trades: its tickers on centralized and decentralized exchanges, 100 per page.Read-only

    Get Coin Tickers

    List where a coin trades: its tickers on centralized and decentralized exchanges, 100 per page. Returns the coin name and a tickers array with exchange, base, target, last price, volume, converted price and volume, spread, trust score, trade URL and optional 2% order-book depth. Use coingecko_get_coin_tickers for one coin across exchanges. Use coingecko_get_exchange_tickers for every pair on one exchange.

    Inputs

    coin_idstringrequired
    CoinGecko coin API ID, for example bitcoin or ethereum. This is the id from coingecko_list_coins or coingecko_search, not the ticker symbol.
    depthboolean
    Set to true to add 2% order-book depth (cost_to_move_up_usd and cost_to_move_down_usd). Default false.
    dex_pair_formatstring
    How DEX ticker pairs show base and target: contract_address (default) or symbol, for example WETH/USDC.one of contract_addresssymbol
    exchange_idsstring
    Only return tickers on these exchanges, by CoinGecko exchange ID, for example binance.
    include_exchange_logoboolean
    Set to true to add each exchange's logo URL. Default false.
    orderstring
    Sort order. Default trust_score_desc. Volume sorts use converted volume.one of trust_score_desctrust_score_ascvolume_descvolume_asc
    pageinteger
    Page number, starting at 1; each page holds 100 tickers.
  • coingecko_get_contract_market_chartGet a token's historical price, market cap and 24-hour volume for the last N days, looked up by blockchain and contract address.Read-only

    Get Contract Market Chart

    Get a token's historical price, market cap and 24-hour volume for the last N days, looked up by blockchain and contract address. Returns arrays prices, market_caps and total_volumes of [UNIX ms, value] points, with the same automatic granularity as coingecko_get_coin_market_chart. Demo keys only reach the past 365 days. Use coingecko_get_contract_market_chart when you only have a contract address. Use coingecko_get_coin_market_chart when you have the coin ID, and coingecko_get_contract_market_chart_range for exact dates.

    Inputs

    asset_platform_idstringrequired
    CoinGecko asset platform (blockchain) ID, for example ethereum, solana or binance-smart-chain. Valid IDs come from coingecko_list_asset_platforms.
    contract_addressstringrequired
    The token's contract address on that platform, for example 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 (USDC on Ethereum).
    daysstringrequired
    How many days back from now to return: any whole number such as 1, 30 or 365. Demo keys are limited to 365 days.
    vs_currencystringrequired
    Currency to express prices and market data in, for example usd, eur or btc. Valid values come from coingecko_list_supported_vs_currencies.
    intervalstring
    Force the data interval: daily (one point per day at 00:00 UTC) or hourly (only for ranges within 100 days). Omit for automatic granularity.one of hourlydaily
    precisionstring
    Number of decimal places for price values, 0 to 18, or full for no rounding. Omit for CoinGecko's default rounding.one of full0123456789101112131415161718