Skip to main content
GET
/
tools
/
alpaca
/
list_orders
[
  {
    "provider": "<string>",
    "id": "<string>",
    "client_order_id": "<string>",
    "symbol": "<string>",
    "side": "buy",
    "type": "<string>",
    "time_in_force": "<string>",
    "status": "<string>",
    "qty": "<string>",
    "notional": "<string>",
    "filled_qty": "<string>",
    "filled_avg_price": "<string>",
    "limit_price": "<string>",
    "stop_price": "<string>",
    "submitted_at": "2023-11-07T05:31:56Z",
    "filled_at": "2023-11-07T05:31:56Z",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "provider_fields": {}
  }
]

alpaca_list_orders

tools = trading.alpaca(
    api_key=os.environ["ALPACA_KEY"],
    api_secret=os.environ["ALPACA_SECRET"],
    model="openai",
    paper=True,
    minimal=True,
    include=["alpaca_list_orders"],
)
Options
  • include / exclude: filter which tools are exposed (use full names like alpaca_list_orders).
  • minimal: omit provider and provider_fields when True.
  • paper: use Alpaca paper trading instead of live trading.
Request body (optional)
  • status: filter orders (commonly open, closed, all).
  • limit: maximum number of orders to return.

Body

application/json

This is a request to obtain information. Your API keys are required.

status
string | null

Order status filter. Common values: 'open', 'closed', 'all'. Provider-dependent.

limit
integer | null

Maximum number of orders to return.

Required range: 1 <= x <= 500

Response

Orders (OpenTools trading schema).

provider
string | null

Trading provider identifier. Omitted when minimal=True.

id
string | null

Provider order ID.

client_order_id
string | null

Client-supplied order ID when supported.

symbol
string | null

Instrument symbol (e.g. 'AAPL', 'BTC/USD').

side
enum<string> | null

Order side.

Available options:
buy,
sell
type
string | null

Order type (e.g. market, limit, stop, stop_limit). Provider-dependent.

time_in_force
string | null

Time in force (e.g. day, gtc, ioc, fok). Provider-dependent.

status
string | null

Order status as reported by the provider (e.g. accepted, filled, canceled).

qty
string | null

Requested quantity. String to preserve exact precision.

notional
string | null

Requested notional amount. String to preserve exact precision.

filled_qty
string | null

Filled quantity. String to preserve exact precision.

filled_avg_price
string | null

Average fill price. String to preserve exact precision.

limit_price
string | null

Limit price when applicable. String to preserve exact precision.

stop_price
string | null

Stop price when applicable. String to preserve exact precision.

submitted_at
string<date-time> | null

Submitted timestamp.

filled_at
string<date-time> | null

Filled timestamp when applicable.

created_at
string<date-time> | null

Created timestamp.

updated_at
string<date-time> | null

Last update timestamp.

provider_fields
object

Provider-specific fields. Omitted when minimal=True.