Back to tools

AI Agent Tool

Alpaca logo

Alpaca

Commission-free brokerage API for algorithmic trading of US equities, options, and crypto.

Financial ServicesVerified

alpaca.markets

•

One-click Login

About Alpaca

Alpaca is a developer-first brokerage and API platform enabling algorithmic and automated trading of US-listed stocks, ETFs, and cryptocurrencies. It offers commission-free trading, real-time and historical market data, paper trading for strategy testing, and fractional shares. Official SDKs are available for Python, TypeScript, Go, and C#. It is used by individual algo traders, fintech startups, and wealth-tech developers building automated investment products.

AI Agent Use Cases

- Commission-free US equities and crypto trading via REST and WebSocket API

- Paper trading environment for strategy development and backtesting

- Fractional shares with no account minimum

- Real-time and historical market data feeds

- SDKs for Python, TypeScript, Go, and C#

- Up to 4x intraday and 2x overnight buying power

Available Actions

These are the specific actions that AI agents can perform with this tool

Inputs

isPaperAPI

Set to `true` if Paper API is used. Default is `false`.

Inputs

isPaperAPI

Set to `true` if Paper API is used. Default is `false`.

orderId

Order Id

Inputs

isPaperAPI

Set to `true` if Paper API is used. Default is `false`.

cancelOrders

If `true` is specified, cancel all open orders before liquidating all positions.

Inputs

isPaperAPI

Set to `true` if Paper API is used. Default is `false`.

positionSymbol

Position Id

Inputs

isPaperAPI

Set to `true` if Paper API is used. Default is `false`.

Inputs

isPaperAPI

Set to `true` if Paper API is used. Default is `false`.

side

Filters down to orders that have a matching `side` field set.

status

Order status to be queried. `open`, `closed` or `all`. Defaults to `open`.

after

The response will include only ones submitted after this time, in ISO 8601 format, e.g. `2022-09-07` or `2022-09-07T13:26:53`

until

The response will include only ones submitted until this time, in ISO 8601 format, e.g. `2022-09-07` or `2022-09-07T13:26:53`

nested

If true, the result will roll up multi-leg orders under the `legs` field of primary order.

Inputs

isPaperAPI

Set to `true` if Paper API is used. Default is `false`.

Inputs

isPaperAPI

Set to `true` if Paper API is used. Default is `false`.

symbol

Symbol, asset ID, or currency pair to identify the asset to trade (ex. `AAPL`, `BTC/USD`).

qty

Number of shares to trade. Can be fractionable for only `market` and `day` order types.

notional

Dollar amount to trade. Cannot work with `Qty`. Can only work for `market` order types and `day` for time in force.

side

`buy` or `sell`

type

Type

timeInForce

Please see [this doc](https://alpaca.markets/docs/trading/orders/#time-in-force) for more info on what values are possible for what kind of orders.

limitPrice

Required if type is `limit` or `stop_limit`

stopPrice

Required if type is `stop` or `stop_limit`

trailPrice

This or `trail_percent` is required if type is `trailing_stop`

trailPercent

This or `trail_price` is required if type is `trailing_stop`

extendedHours

If true, order will be eligible to execute in premarket/afterhours. Only works with `Type` **Limit** and `Time in Force` **Day**.