View as Markdown
Alpaca icon

Alpaca ACTION

List Orders

Retrieves a list of orders for the account, filtered by the supplied query parameters, if no filter given all will be returned, See the docs
  • Action
  • Read only
  • OAuth
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Alpaca account once, then configure and run List Orders from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "alpaca-list-orders",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    alpaca: { authProvisionId: "apn_xxxxxxx" },
    isPaperAPI: true,
    symbols: ["Symbols"],
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

List Orders inputs
Property Type Description
isPaperAPI Paper API boolean
Set to true if Paper API is used. Default is false.
Optional
symbols Symbols string[]
A list of symbols to filter by (ex. AAPL,TSLA,MSFT). A currency pair is required for crypto orders (ex. BTC/USD,BCH/USD,LTC/USDT,ETC/USDT).
Optional
side Side string
Filters down to orders that have a matching side field set.
Optional
status Status string
Order status to be queried. open, closed or all. Defaults to open.
Optional
after After string
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
Optional
until Until string
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
Optional
nested Nested string
If true, the result will roll up multi-leg orders under the legs field of primary order.
Optional

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
alpaca-list-orders
Version
0.0.3
App
Alpaca
Authentication
OAuth
Read-only
Yes
Destructive
No
Open world
Yes