Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to CurrencyBeacon

Scalekit connector
Open markdown

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

Tools
5
What they doRead · write · destructive
5 · 0 · 05 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 CurrencyBeacon connection

    In AgentKit > Connections, create a CurrencyBeacon 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 = 'currencybeacon'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize CurrencyBeacon:', 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: 'currencybeacon_currencies_list',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their CurrencyBeacon 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
  • currencybeacon_convertConvert an amount from one currency to another at the mid-market rate, now or on a past date.Read-only

    Convert Currency

    Convert an amount from one currency to another at the mid-market rate, now or on a past date. Returns meta and response with timestamp, date, from, to, amount and value (the converted amount). Use this instead of multiplying rates yourself.

    Inputs

    amountnumberrequired
    Amount to convert. Example: 100.
    fromstringrequired
    Three-letter code of the currency to convert from. Example: USD.
    tostringrequired
    Three-letter code of the currency to convert to. Example: JPY.
    datestring
    Use rates from this past date (YYYY-MM-DD) instead of today. Example: 2024-03-15.
  • currencybeacon_currencies_listList every currency CurrencyBeacon supports, with names, symbols and ISO codes.Read-only

    List Supported Currencies

    List every currency CurrencyBeacon supports, with names, symbols and ISO codes. Returns meta and response with the supported currencies. Use this to validate currency codes before the rate tools.

    Inputs

    This tool takes no inputs.

  • currencybeacon_rates_historical_getGet exchange rates for a specific past date, back to 1996.Read-only

    Get Historical Exchange Rates

    Get exchange rates for a specific past date, back to 1996. Returns meta and response with date, base and rates. Use this for accounting and audits. Use currencybeacon_timeseries_get for a range of dates.

    Inputs

    datestringrequired
    Date in YYYY-MM-DD format. Example: 2023-12-25.
    basestring
    Three-letter code of the base currency. Defaults to USD. Example: USD.
    symbolsstring
    Comma-separated currency codes to return. Leave empty for all currencies. Example: EUR,GBP,JPY.
  • currencybeacon_rates_latest_getGet real-time exchange rates from a base currency to all or selected fiat currencies and cryptocurrencies.Read-only

    Get Latest Exchange Rates

    Get real-time exchange rates from a base currency to all or selected fiat currencies and cryptocurrencies. Returns meta and response with date, base and rates (currency code to rate). Use this for current rates. Use currencybeacon_rates_historical_get for a past date and currencybeacon_convert to convert an amount.

    Inputs

    basestring
    Three-letter code of the base currency. Defaults to USD. Example: USD.
    symbolsstring
    Comma-separated currency codes to return. Leave empty for all currencies. Example: EUR,GBP,JPY.
  • currencybeacon_timeseries_getGet daily exchange rates between two dates.Read-only

    Get Exchange Rate Time Series

    Get daily exchange rates between two dates. Returns meta and response with rates for each day in the range. Use this for charts and volatility analysis. Available on the Startup and Professional plans only (other plans get 403); the maximum range depends on the plan, typically 365 days.

    Inputs

    end_datestringrequired
    Last date of the range, YYYY-MM-DD. Example: 2024-03-15.
    start_datestringrequired
    First date of the range, YYYY-MM-DD. Example: 2024-01-01.
    basestring
    Three-letter code of the base currency. Defaults to USD. Example: USD.
    symbolsstring
    Comma-separated currency codes to return. Leave empty for all currencies. Example: EUR,GBP,JPY.