Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Alpaca

Scalekit connector
Open markdown

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

Tools
30
What they doRead · write · destructive
19 · 5 · 619 read5 write6 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 Alpaca connection

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

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • alpaca_account_activities_listList account activities such as order fills, dividends, fees, interest and cash transfers, newest first.Read-only

    List Account Activities

    List account activities such as order fills, dividends, fees, interest and cash transfers, newest first. Returns an array of activities with id, activity_type, date or transaction_time, symbol, qty, price, net_amount and order_id. Use this to reconcile trades and cash movements. Use alpaca_orders_list for order status and alpaca_portfolio_history_get for equity over time.

    Inputs

    activity_typesstring
    Comma-separated activity types to include, such as FILL (order fills), DIV (dividends), TRANS (cash transactions), FEE, INT (interest), JNLC (cash journals) or CSD (cash deposits). Cannot be used with category. Example: FILL,DIV
    afterstring
    Only return activities created after this time. Format YYYY-MM-DD or RFC 3339. Example: 2026-10-01T00:00:00Z
    categorystring
    Activity category: trade_activity (fills) or non_trade_activity (cash, dividends, fees and other entries). Cannot be used with activity_types. Example: trade_activityone of trade_activitynon_trade_activity
    datestring
    Only return activities created on this date (creation date, not settlement date). Format YYYY-MM-DD or RFC 3339. Example: 2026-11-02
    directionstring
    Sort order by activity time: asc or desc. Default: desc. Example: descone of ascdesc
    order_idstring
    Only return activities for this order ID, for example the fills that make up an order. Example: 61e69015-8549-4bfd-b9c3-01e75843f47d
    page_sizeinteger
    Maximum activities to return, 1 to 100. Default: 100. Example: 50
    page_tokenstring
    Pagination token: the ID of the last activity on the previous page. Example: 20261102093000000::8e2b3c3f-6a37-4c6f-9d1c-0d9b5c9a1f00
    untilstring
    Only return activities created before this time. Format YYYY-MM-DD or RFC 3339. Example: 2026-11-01T00:00:00Z
  • alpaca_account_configurations_getGet the account's trading configuration.Read-only

    Get Account Configurations

    Get the account's trading configuration. Returns settings such as dtbp_check, no_shorting, suspend_trade, trade_confirm_email, fractional_trading, max_margin_multiplier and max_options_trading_level. Use this to see why an order type or margin level is blocked. Use alpaca_account_get for balances.

    Inputs

    This tool takes no inputs.

  • alpaca_account_getGet the trading account the connection belongs to.Read-only

    Get Account

    Get the trading account the connection belongs to. Returns account id, number, status, currency, cash, buying power, equity, portfolio value, pattern day trader flag and trading restrictions. Use this to check funds and buying power before placing an order. Use alpaca_positions_list for holdings.

    Inputs

    This tool takes no inputs.

  • alpaca_asset_getGet one asset by symbol, asset ID or CUSIP.Read-only

    Get Asset

    Get one asset by symbol, asset ID or CUSIP. Returns id, symbol, name, class, exchange, status, tradable, marginable, shortable, easy_to_borrow and fractionable. Use this to check whether a symbol can be traded before placing an order. Use alpaca_assets_list to browse.

    Inputs

    symbol_or_asset_idstringrequired
    Ticker symbol, asset ID (UUID) or CUSIP of the asset. Example: AAPL
  • alpaca_assets_listList tradable and non-tradable assets, filtered by status, class, exchange or attributes.Read-only

    List Assets

    List tradable and non-tradable assets, filtered by status, class, exchange or attributes. Returns an array of assets with id, symbol, name, class, exchange, status, tradable, fractionable and shortable. The list can be very large; filter it. Use this to browse the universe. Use alpaca_asset_get when you know the symbol.

    Inputs

    asset_classstring
    Asset class: us_equity (the default), us_option, crypto, crypto_perp or us_index. Example: us_equity
    attributesstring
    Comma-separated asset attributes to filter by, such as ptp_no_exception, ptp_with_exception, ipo, has_options or options_late_close. Example: has_options
    exchangestring
    Comma-separated exchanges for us_equity and us_index assets: AMEX, ARCA, BATS, NYSE, NASDAQ, NYSEARCA, OTC, TXSE or INDEX. Example: NASDAQ
    statusstring
    Asset status to include, for example active or inactive. All statuses by default. Example: active
  • alpaca_calendar_getGet a market's trading calendar between two dates.Read-only

    Get Market Calendar

    Get a market's trading calendar between two dates. Returns each trading day with its date, sessions, and open and close times. Use this to plan around holidays and early closes. Use alpaca_clock_get for the current session.

    Inputs

    marketstringrequired
    Market identifier (MIC, BIC or acronym), such as NYSE, NASDAQ, OPRA, BOATS, SIFMA or XLON. Example: NYSE
    endstring
    Last date to return, YYYY-MM-DD. Default: one week after start. Example: 2026-12-31
    startstring
    First date to return, YYYY-MM-DD. Default: today. Example: 2026-11-16
    timezonestring
    Timezone for the returned times. Only UTC is accepted; default is the market's own timezone. Example: UTCone of UTC
  • alpaca_clock_getGet whether markets are open now and when they next open and close.Read-only

    Get Market Clock

    Get whether markets are open now and when they next open and close. Returns, per market, is_market_day, phase, the current session and the next market open and close times. Use this before trading to check the session. Use alpaca_calendar_get for future trading days.

    Inputs

    marketsstring
    Comma-separated market codes, such as NYSE, NASDAQ, OPRA, IEX, BOATS or XLON. Example: NYSE,NASDAQ
    timestring
    Use this time instead of now, RFC 3339. Example: 2026-11-16T14:30:00Z
  • alpaca_news_listList market news articles, newest first, optionally for specific symbols.Read-only

    List News

    List market news articles, newest first, optionally for specific symbols. Returns news with id, headline, author, summary, url, symbols, source, created_at and optional content, plus next_page_token. Use this to research a stock before trading.

    Inputs

    endstring
    Inclusive end, RFC 3339 or YYYY-MM-DD. Default: now. Example: 2026-11-15
    exclude_contentlessboolean
    If true, leave out articles that have no content. Example: false
    include_contentboolean
    If true, include the article content when available. Example: false
    limitinteger
    Articles per page, 1 to 50. Example: 10
    page_tokenstring
    Token from next_page_token of the previous response. Example: MTcwMDAwMDAwMDAwMDAwMDAwMHwzNTk5MTYwNg==
    sortstring
    Sort by updated date: asc or desc. Default: desc. Example: descone of ascdesc
    startstring
    Inclusive start, RFC 3339 or YYYY-MM-DD. Default: start of today. Example: 2026-11-10
    symbolsstring
    Comma-separated symbols to get news for. Example: AAPL,TSLA