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.
What you’re looking at
This section documents OpenTools trading tools, exposed as virtual API
endpoints for clarity and discoverability.
These are not traditional REST APIs.
Each “endpoint” represents an Remote Procedure Call (RPC) tool call that is executed by the
OpenTools runtime and relayed to an underlying provider such as Alpaca.
The API reference exists to describe:
- What tools are available
- What data they return
- How they behave
- How they are invoked through the SDK
Why these look like HTTP endpoints
For readability and developer familiarity, tools are presented as
HTTP-style endpoints.
Although some tools are executed internally using POST request, given its use of RPC, read-only operations are documented as GET requests still to match developer expectations and avoid
confusion.
Think of these endpoints as descriptive interfaces, not raw network calls to providers. Documentation for each endpoint is specifically laid out under each provider!
When a trading tool is called, your application initialises a provider-backed toolset. Your choice of LLM selects the appropriate tool where the request is relayed to the provider. The responses are then normalised into our schemas
and result is returned to your model.
This way OpenTools can support an SDK-first usecase whilst allowing to connec through standardised passageways with multiple providers configured into select domains.
Authentication is handled when a toolset is initialized.
API keys are provided once and are not passed per request.
The OpenTools runtime securely injects credentials when communicating with the
underlying provider.
An example
Below is a minimal example showing how Alpaca trading tools are initialized
without filtering individual tools.
import os
from opentools import trading
tools = trading.alpaca(
api_key=os.environ["ALPACA_KEY"],
api_secret=os.environ["ALPACA_SECRET"],
paper=True,
minimal=True,
)