Skip to main content
OpenTools cleanly integrates with Alpaca, covering a range of tooling from current market trading times to portfolio performance. This provider is designed for agentic flows - using framework or model adapater - so that consumers alike are able to find their information quickly and accurately. The next plan for this provider will be to attach trading capabilities to ensure a seamless experience.
Alpaca support is read-only for now. Order placement and trade execution are not yet exposed but are currently on the roadmap

What are the exposed tools?

The following tools are available when using the Alpaca provider:
ToolDescription
alpaca_get_accountAccount balances, equity, and buying power
alpaca_list_positionsAll open positions
alpaca_get_positionA single position by symbol or asset ID
alpaca_get_clockMarket open / close status
alpaca_list_assetsTradable assets with optional filters
alpaca_get_assetA single asset by symbol or ID
alpaca_list_ordersOrders with optional filtering
alpaca_get_orderA single order by ID
alpaca_get_portfolio_historyEquity and P&L time series

Quick example

Below is a quick way to construct an Alpaca trading service which exposes all the avaiable tools:
import os
from opentools import trading

tools = trading.alpaca(
    api_key=os.environ["ALPACA_KEY"],
    api_secret=os.environ["ALPACA_SECRET"],
    model="openai",
    paper=True,
    minimal=True,
)
Once constructed, tools can be passed into a tool loop using run_with_tool or connect to an agentic framework.
If you want to include certain tools or exclude others, use include or exclude when needed with a boolean flag. Ensure to use one of the tool names listed above.

What are all the configuration options?

Alpaca supports all shared Trading features:
  • Paper/live
    Use paper=True to target Alpaca’s paper trading environment.
  • Minimal
    Set minimal=True to omit provider metadata and reduce token usage.
  • Include/Exclude
    Control which tools are exposed to the model using include and exclude.
These options behave consistently across all trading providers.

Next steps