> ## Documentation Index
> Fetch the complete documentation index at: https://opentools.page/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Alpaca

> Integrating with Alpaca

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.

<Note>
  Alpaca support is **read-only** for now. Order placement and trade execution are not yet exposed but are currently on the [roadmap](https://www.opentools.page/roadmap)
</Note>

***

## What are the exposed tools?

The following tools are available when using the Alpaca provider:

| Tool                           | Description                                |
| ------------------------------ | ------------------------------------------ |
| `alpaca_get_account`           | Account balances, equity, and buying power |
| `alpaca_list_positions`        | All open positions                         |
| `alpaca_get_position`          | A single position by symbol or asset ID    |
| `alpaca_get_clock`             | Market open / close status                 |
| `alpaca_list_assets`           | Tradable assets with optional filters      |
| `alpaca_get_asset`             | A single asset by symbol or ID             |
| `alpaca_list_orders`           | Orders with optional filtering             |
| `alpaca_get_order`             | A single order by ID                       |
| `alpaca_get_portfolio_history` | Equity and P\&L time series                |

***

## Quick example

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

```python theme={null}
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.

<Tip>
  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.
</Tip>

***

## 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

<Columns cols={2}>
  <Card title="Coinbase" icon="coin" href="/trading/coinbase">
    Explore crypto trading tools powered by Coinbase
  </Card>

  <Card title="Tools" icon="wrench" href="/concepts/tools">
    Learn how tools are defined and exposed in OpenTools
  </Card>
</Columns>
