{
  "service": "alpaca",
  "displayName": "Alpaca",
  "categories": [
    "Finance",
    "Data"
  ],
  "authTypes": [
    "api_key"
  ],
  "auth": [
    {
      "type": "api_key",
      "label": "API Secret Key",
      "placeholder": "APCA_API_SECRET_KEY",
      "description": "Alpaca API secret key sent with the APCA-API-SECRET-KEY header. Generate paper or live API keys from the Alpaca dashboard API Keys page: https://app.alpaca.markets/paper/dashboard/overview",
      "extraFields": [
        {
          "key": "apiKeyId",
          "label": "API Key ID",
          "inputType": "text",
          "required": true,
          "secret": false,
          "placeholder": "APCA_API_KEY_ID",
          "description": "Alpaca API key ID sent with the APCA-API-KEY-ID header. Copy it from the same Alpaca dashboard API Keys page as the secret key: https://app.alpaca.markets/paper/dashboard/overview"
        },
        {
          "key": "environment",
          "label": "Environment",
          "inputType": "text",
          "required": true,
          "secret": false,
          "placeholder": "paper",
          "description": "Alpaca trading environment for this key. Use paper for paper trading keys or live for live trading keys."
        }
      ]
    }
  ],
  "homepageUrl": "https://alpaca.markets/",
  "actions": [
    {
      "id": "alpaca.get_account",
      "service": "alpaca",
      "name": "get_account",
      "description": "Get Alpaca Trading API account details for the connected paper or live account.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {},
        "additionalProperties": false,
        "description": "Input for getting Alpaca account details."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "account": {
            "type": "object",
            "additionalProperties": true,
            "description": "One raw object returned by Alpaca."
          }
        },
        "additionalProperties": false,
        "description": "Alpaca account details response."
      }
    },
    {
      "id": "alpaca.get_account_config",
      "service": "alpaca",
      "name": "get_account_config",
      "description": "Get Alpaca account configuration values.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {},
        "additionalProperties": false,
        "description": "Input for getting Alpaca account configuration."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "configuration": {
            "type": "object",
            "additionalProperties": true,
            "description": "One raw object returned by Alpaca."
          }
        },
        "additionalProperties": false,
        "description": "Alpaca account configuration response."
      }
    },
    {
      "id": "alpaca.get_account_portfolio_history",
      "service": "alpaca",
      "name": "get_account_portfolio_history",
      "description": "Get Alpaca account equity and profit/loss time series.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "period": {
            "type": "string",
            "minLength": 1,
            "description": "Duration such as 1D, 1W, 1M, or 1A.",
            "pattern": "\\S"
          },
          "timeframe": {
            "type": "string",
            "minLength": 1,
            "description": "Time window size such as 1Min, 5Min, 15Min, 1H, or 1D.",
            "pattern": "\\S"
          },
          "intradayReporting": {
            "type": "string",
            "enum": [
              "market_hours",
              "extended_hours",
              "continuous"
            ],
            "description": "Intraday reporting mode."
          },
          "start": {
            "type": "string",
            "minLength": 1,
            "description": "A date or RFC-3339 timestamp accepted by Alpaca.",
            "pattern": "\\S"
          },
          "end": {
            "type": "string",
            "minLength": 1,
            "description": "A date or RFC-3339 timestamp accepted by Alpaca.",
            "pattern": "\\S"
          },
          "pnlReset": {
            "type": "string",
            "enum": [
              "no_reset",
              "per_day"
            ],
            "description": "Profit and loss reset mode."
          },
          "cashflowTypes": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "An Alpaca cashflow type code such as DIV or FEE.",
              "pattern": "\\S"
            },
            "description": "A non-empty list of Alpaca cashflow type codes.",
            "minItems": 1
          }
        },
        "additionalProperties": false,
        "description": "Input for getting Alpaca account portfolio history."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "portfolioHistory": {
            "type": "object",
            "additionalProperties": true,
            "description": "One raw object returned by Alpaca."
          }
        },
        "additionalProperties": false,
        "description": "Alpaca account portfolio history response."
      }
    },
    {
      "id": "alpaca.get_asset",
      "service": "alpaca",
      "name": "get_asset",
      "description": "Get one Alpaca asset by symbol or asset ID.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "symbolOrAssetId": {
            "type": "string",
            "minLength": 1,
            "description": "Asset symbol or asset ID.",
            "pattern": "\\S"
          }
        },
        "additionalProperties": false,
        "description": "Input for getting one Alpaca asset."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "asset": {
            "type": "object",
            "additionalProperties": true,
            "description": "One raw object returned by Alpaca."
          }
        },
        "additionalProperties": false,
        "description": "Alpaca asset response."
      }
    },
    {
      "id": "alpaca.get_crypto_bars",
      "service": "alpaca",
      "name": "get_crypto_bars",
      "description": "Get historical OHLC crypto bars from Alpaca Market Data API.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "symbols": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "A symbol.",
              "pattern": "\\S"
            },
            "description": "A non-empty list of symbols.",
            "minItems": 1
          },
          "timeframe": {
            "type": "string",
            "minLength": 1,
            "description": "Bar aggregation timeframe such as 1Min, 1Hour, or 1Day.",
            "pattern": "\\S"
          },
          "location": {
            "type": "string",
            "enum": [
              "us",
              "us-1",
              "eu-1"
            ],
            "description": "Crypto market-data location."
          },
          "start": {
            "type": "string",
            "minLength": 1,
            "description": "A date or RFC-3339 timestamp accepted by Alpaca.",
            "pattern": "\\S"
          },
          "end": {
            "type": "string",
            "minLength": 1,
            "description": "A date or RFC-3339 timestamp accepted by Alpaca.",
            "pattern": "\\S"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10000,
            "description": "Maximum number of data points to return."
          },
          "sort": {
            "type": "string",
            "enum": [
              "asc",
              "desc"
            ],
            "description": "Sort data in ascending or descending order."
          },
          "pageToken": {
            "type": "string",
            "minLength": 1,
            "description": "Pagination token returned by Alpaca.",
            "pattern": "\\S"
          }
        },
        "additionalProperties": false,
        "required": [
          "symbols",
          "timeframe"
        ],
        "description": "Input for getting Alpaca historical crypto bars."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "bars": {
            "type": "object",
            "additionalProperties": {
              "description": "Raw value."
            },
            "description": "A raw object map returned by Alpaca."
          },
          "nextPageToken": {
            "type": "string",
            "minLength": 1,
            "description": "Pagination token returned by Alpaca.",
            "pattern": "\\S"
          }
        },
        "additionalProperties": false,
        "required": [
          "bars"
        ],
        "description": "Alpaca historical crypto bars response."
      }
    },
    {
      "id": "alpaca.get_crypto_snapshots",
      "service": "alpaca",
      "name": "get_crypto_snapshots",
      "description": "Get latest crypto snapshots from Alpaca Market Data API.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "symbols": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "A symbol.",
              "pattern": "\\S"
            },
            "description": "A non-empty list of symbols.",
            "minItems": 1
          },
          "location": {
            "type": "string",
            "enum": [
              "us",
              "us-1",
              "us-2",
              "eu-1",
              "bs-1"
            ],
            "description": "Crypto latest market-data location."
          }
        },
        "additionalProperties": false,
        "required": [
          "symbols"
        ],
        "description": "Input for getting Alpaca crypto snapshots."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "snapshots": {
            "type": "object",
            "additionalProperties": {
              "description": "Raw value."
            },
            "description": "A raw object map returned by Alpaca."
          }
        },
        "additionalProperties": false,
        "description": "Alpaca crypto snapshots response."
      }
    },
    {
      "id": "alpaca.get_market_calendar",
      "service": "alpaca",
      "name": "get_market_calendar",
      "description": "Get Alpaca Trading API US market calendar days.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "start": {
            "type": "string",
            "minLength": 1,
            "description": "A date or RFC-3339 timestamp accepted by Alpaca.",
            "pattern": "\\S"
          },
          "end": {
            "type": "string",
            "minLength": 1,
            "description": "A date or RFC-3339 timestamp accepted by Alpaca.",
            "pattern": "\\S"
          },
          "dateType": {
            "type": "string",
            "enum": [
              "TRADING",
              "SETTLEMENT"
            ],
            "description": "Meaning of the start and end dates."
          }
        },
        "additionalProperties": false,
        "description": "Input for getting Alpaca US market calendar days."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "calendar": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true,
              "description": "One raw object returned by Alpaca."
            },
            "description": "Market calendar days returned by Alpaca."
          }
        },
        "additionalProperties": false,
        "description": "Alpaca US market calendar response."
      }
    },
    {
      "id": "alpaca.get_market_clock",
      "service": "alpaca",
      "name": "get_market_clock",
      "description": "Get Alpaca Trading API US market clock information.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {},
        "additionalProperties": false,
        "description": "Input for getting Alpaca US market clock information."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "clock": {
            "type": "object",
            "additionalProperties": true,
            "description": "One raw object returned by Alpaca."
          }
        },
        "additionalProperties": false,
        "description": "Alpaca US market clock response."
      }
    },
    {
      "id": "alpaca.get_option_contract",
      "service": "alpaca",
      "name": "get_option_contract",
      "description": "Get one Alpaca option contract by contract symbol or ID.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "symbolOrId": {
            "type": "string",
            "minLength": 1,
            "description": "Option contract symbol or ID.",
            "pattern": "\\S"
          }
        },
        "additionalProperties": false,
        "description": "Input for getting one Alpaca option contract."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "optionContract": {
            "type": "object",
            "additionalProperties": true,
            "description": "One raw object returned by Alpaca."
          }
        },
        "additionalProperties": false,
        "description": "Alpaca option contract response."
      }
    },
    {
      "id": "alpaca.get_order",
      "service": "alpaca",
      "name": "get_order",
      "description": "Get one Alpaca order by order ID or client order ID.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "orderId": {
                "type": "string",
                "minLength": 1,
                "description": "Alpaca order ID.",
                "pattern": "\\S"
              }
            },
            "additionalProperties": false,
            "required": [
              "orderId"
            ],
            "description": "Get one Alpaca order by order ID."
          },
          {
            "type": "object",
            "properties": {
              "clientOrderId": {
                "type": "string",
                "minLength": 1,
                "description": "Client order ID assigned when the order was submitted.",
                "pattern": "\\S"
              }
            },
            "additionalProperties": false,
            "required": [
              "clientOrderId"
            ],
            "description": "Get one Alpaca order by client order ID."
          }
        ],
        "description": "Exactly one of orderId or clientOrderId is required."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "order": {
            "type": "object",
            "additionalProperties": true,
            "description": "One raw object returned by Alpaca."
          }
        },
        "additionalProperties": false,
        "description": "Alpaca order response."
      }
    },
    {
      "id": "alpaca.get_position",
      "service": "alpaca",
      "name": "get_position",
      "description": "Get one open Alpaca position by symbol or asset ID.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "symbolOrAssetId": {
            "type": "string",
            "minLength": 1,
            "description": "Position symbol or asset ID.",
            "pattern": "\\S"
          }
        },
        "additionalProperties": false,
        "description": "Input for getting one Alpaca open position."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "position": {
            "type": "object",
            "additionalProperties": true,
            "description": "One raw object returned by Alpaca."
          }
        },
        "additionalProperties": false,
        "description": "Alpaca open position response."
      }
    },
    {
      "id": "alpaca.get_stock_bars",
      "service": "alpaca",
      "name": "get_stock_bars",
      "description": "Get historical OHLC stock bars from Alpaca Market Data API.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "symbols": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "A symbol.",
              "pattern": "\\S"
            },
            "description": "A non-empty list of symbols.",
            "minItems": 1
          },
          "timeframe": {
            "type": "string",
            "minLength": 1,
            "description": "Bar aggregation timeframe such as 1Min, 1Hour, or 1Day.",
            "pattern": "\\S"
          },
          "start": {
            "type": "string",
            "minLength": 1,
            "description": "A date or RFC-3339 timestamp accepted by Alpaca.",
            "pattern": "\\S"
          },
          "end": {
            "type": "string",
            "minLength": 1,
            "description": "A date or RFC-3339 timestamp accepted by Alpaca.",
            "pattern": "\\S"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10000,
            "description": "Maximum number of data points to return."
          },
          "adjustment": {
            "type": "string",
            "minLength": 1,
            "description": "Stock adjustment mode such as raw, split, dividend, or all.",
            "pattern": "\\S"
          },
          "feed": {
            "type": "string",
            "enum": [
              "iex",
              "sip",
              "boats",
              "otc"
            ],
            "description": "Stock data feed."
          },
          "sort": {
            "type": "string",
            "enum": [
              "asc",
              "desc"
            ],
            "description": "Sort data in ascending or descending order."
          },
          "pageToken": {
            "type": "string",
            "minLength": 1,
            "description": "Pagination token returned by Alpaca.",
            "pattern": "\\S"
          },
          "asof": {
            "type": "string",
            "description": "As-of date used for stock symbol mapping.",
            "format": "date"
          },
          "currency": {
            "type": "string",
            "minLength": 1,
            "description": "Currency for returned prices.",
            "pattern": "\\S"
          }
        },
        "additionalProperties": false,
        "required": [
          "symbols",
          "timeframe"
        ],
        "description": "Input for getting Alpaca historical stock bars."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "bars": {
            "type": "object",
            "additionalProperties": {
              "description": "Raw value."
            },
            "description": "A raw object map returned by Alpaca."
          },
          "nextPageToken": {
            "type": "string",
            "minLength": 1,
            "description": "Pagination token returned by Alpaca.",
            "pattern": "\\S"
          }
        },
        "additionalProperties": false,
        "required": [
          "bars"
        ],
        "description": "Alpaca historical stock bars response."
      }
    },
    {
      "id": "alpaca.get_stock_snapshots",
      "service": "alpaca",
      "name": "get_stock_snapshots",
      "description": "Get latest stock snapshots from Alpaca Market Data API.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "symbols": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "A symbol.",
              "pattern": "\\S"
            },
            "description": "A non-empty list of symbols.",
            "minItems": 1
          },
          "feed": {
            "type": "string",
            "enum": [
              "delayed_sip",
              "iex",
              "otc",
              "sip",
              "boats",
              "overnight"
            ],
            "description": "Stock market-data feed."
          },
          "currency": {
            "type": "string",
            "minLength": 1,
            "description": "Currency for returned prices.",
            "pattern": "\\S"
          }
        },
        "additionalProperties": false,
        "required": [
          "symbols"
        ],
        "description": "Input for getting Alpaca stock snapshots."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "snapshots": {
            "type": "object",
            "additionalProperties": {
              "description": "Raw value."
            },
            "description": "A raw object map returned by Alpaca."
          }
        },
        "additionalProperties": false,
        "description": "Alpaca stock snapshots response."
      }
    },
    {
      "id": "alpaca.get_watchlist",
      "service": "alpaca",
      "name": "get_watchlist",
      "description": "Get one Alpaca watchlist by watchlist ID or user-defined name.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "watchlistId": {
                "type": "string",
                "minLength": 1,
                "description": "Alpaca watchlist ID.",
                "pattern": "\\S"
              }
            },
            "additionalProperties": false,
            "required": [
              "watchlistId"
            ],
            "description": "Get one Alpaca watchlist by watchlist ID."
          },
          {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "description": "User-defined Alpaca watchlist name.",
                "pattern": "\\S"
              }
            },
            "additionalProperties": false,
            "required": [
              "name"
            ],
            "description": "Get one Alpaca watchlist by user-defined name."
          }
        ],
        "description": "Exactly one of watchlistId or name is required."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "watchlist": {
            "type": "object",
            "additionalProperties": true,
            "description": "One raw object returned by Alpaca."
          }
        },
        "additionalProperties": false,
        "description": "Alpaca watchlist response."
      }
    },
    {
      "id": "alpaca.list_account_activities",
      "service": "alpaca",
      "name": "list_account_activities",
      "description": "List Alpaca account activities with optional type, category, date, and pagination filters.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "activityTypes": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "description": "An Alpaca activity type code such as FILL, DIV, or FEE.",
                  "pattern": "\\S"
                },
                "description": "A non-empty list of Alpaca activity type codes.",
                "minItems": 1
              },
              "date": {
                "type": "string",
                "minLength": 1,
                "description": "A date or RFC-3339 timestamp accepted by Alpaca.",
                "pattern": "\\S"
              },
              "after": {
                "type": "string",
                "minLength": 1,
                "description": "A date or RFC-3339 timestamp accepted by Alpaca.",
                "pattern": "\\S"
              },
              "until": {
                "type": "string",
                "minLength": 1,
                "description": "A date or RFC-3339 timestamp accepted by Alpaca.",
                "pattern": "\\S"
              },
              "direction": {
                "type": "string",
                "enum": [
                  "asc",
                  "desc"
                ],
                "description": "Sort data in ascending or descending order."
              },
              "pageSize": {
                "type": "integer",
                "minimum": 1,
                "maximum": 100,
                "description": "Maximum number of account activities to return."
              },
              "pageToken": {
                "type": "string",
                "minLength": 1,
                "description": "Pagination token returned by Alpaca.",
                "pattern": "\\S"
              }
            },
            "additionalProperties": false,
            "description": "List Alpaca account activities by activity type."
          },
          {
            "type": "object",
            "properties": {
              "category": {
                "type": "string",
                "enum": [
                  "trade_activity",
                  "non_trade_activity"
                ],
                "description": "Activity category filter."
              },
              "date": {
                "type": "string",
                "minLength": 1,
                "description": "A date or RFC-3339 timestamp accepted by Alpaca.",
                "pattern": "\\S"
              },
              "after": {
                "type": "string",
                "minLength": 1,
                "description": "A date or RFC-3339 timestamp accepted by Alpaca.",
                "pattern": "\\S"
              },
              "until": {
                "type": "string",
                "minLength": 1,
                "description": "A date or RFC-3339 timestamp accepted by Alpaca.",
                "pattern": "\\S"
              },
              "direction": {
                "type": "string",
                "enum": [
                  "asc",
                  "desc"
                ],
                "description": "Sort data in ascending or descending order."
              },
              "pageSize": {
                "type": "integer",
                "minimum": 1,
                "maximum": 100,
                "description": "Maximum number of account activities to return."
              },
              "pageToken": {
                "type": "string",
                "minLength": 1,
                "description": "Pagination token returned by Alpaca.",
                "pattern": "\\S"
              }
            },
            "additionalProperties": false,
            "description": "List Alpaca account activities by category."
          }
        ],
        "description": "activityTypes and category cannot be used together."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "activities": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true,
              "description": "One raw object returned by Alpaca."
            },
            "description": "Account activities returned by Alpaca."
          }
        },
        "additionalProperties": false,
        "description": "Alpaca account activities response."
      }
    },
    {
      "id": "alpaca.list_assets",
      "service": "alpaca",
      "name": "list_assets",
      "description": "List Alpaca assets with optional status, asset class, and attribute filters.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive"
            ],
            "description": "Asset status filter. Omit this field to include all statuses."
          },
          "assetClass": {
            "type": "string",
            "enum": [
              "us_equity",
              "us_option",
              "crypto",
              "ipo"
            ],
            "description": "Asset class filter."
          },
          "attributes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "ptp_no_exception",
                "ptp_with_exception",
                "ipo",
                "has_options",
                "options_late_close",
                "fractional_eh_enabled",
                "overnight_tradable",
                "overnight_halted"
              ],
              "description": "An Alpaca asset attribute."
            },
            "description": "Asset attributes to include. Assets with any listed attribute are returned.",
            "minItems": 1
          }
        },
        "additionalProperties": false,
        "description": "Input for listing Alpaca assets."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "assets": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true,
              "description": "One raw object returned by Alpaca."
            },
            "description": "Assets returned by Alpaca."
          }
        },
        "additionalProperties": false,
        "description": "Alpaca assets response."
      }
    },
    {
      "id": "alpaca.list_corporate_actions",
      "service": "alpaca",
      "name": "list_corporate_actions",
      "description": "List Alpaca corporate actions for symbols, CUSIPs, types, or IDs.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "description": "An ID.",
                  "pattern": "\\S"
                },
                "description": "A non-empty list of IDs.",
                "minItems": 1
              },
              "limit": {
                "type": "integer",
                "minimum": 1,
                "maximum": 1000,
                "description": "Maximum number of corporate actions to return."
              },
              "pageToken": {
                "type": "string",
                "minLength": 1,
                "description": "Pagination token returned by Alpaca.",
                "pattern": "\\S"
              },
              "sort": {
                "type": "string",
                "enum": [
                  "asc",
                  "desc"
                ],
                "description": "Sort data in ascending or descending order."
              }
            },
            "additionalProperties": false,
            "required": [
              "ids"
            ],
            "description": "List corporate actions by Alpaca corporate action IDs."
          },
          {
            "type": "object",
            "properties": {
              "symbols": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "description": "A symbol.",
                  "pattern": "\\S"
                },
                "description": "A non-empty list of symbols.",
                "minItems": 1
              },
              "cusips": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "description": "A CUSIP.",
                  "pattern": "\\S"
                },
                "description": "A non-empty list of CUSIPs.",
                "minItems": 1
              },
              "types": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "reverse_split",
                    "forward_split",
                    "unit_split",
                    "cash_dividend",
                    "stock_dividend",
                    "spin_off",
                    "cash_merger",
                    "stock_merger",
                    "stock_and_cash_merger",
                    "redemption",
                    "name_change",
                    "worthless_removal",
                    "rights_distribution",
                    "partial_call",
                    "reorganization"
                  ],
                  "description": "A corporate action type."
                },
                "description": "A non-empty list of corporate action types.",
                "minItems": 1
              },
              "region": {
                "type": "string",
                "enum": [
                  "us",
                  "non_us",
                  "all"
                ],
                "description": "Corporate action region filter."
              },
              "start": {
                "type": "string",
                "description": "Inclusive interval start date.",
                "format": "date"
              },
              "end": {
                "type": "string",
                "description": "Inclusive interval end date.",
                "format": "date"
              },
              "limit": {
                "type": "integer",
                "minimum": 1,
                "maximum": 1000,
                "description": "Maximum number of corporate actions to return."
              },
              "pageToken": {
                "type": "string",
                "minLength": 1,
                "description": "Pagination token returned by Alpaca.",
                "pattern": "\\S"
              },
              "sort": {
                "type": "string",
                "enum": [
                  "asc",
                  "desc"
                ],
                "description": "Sort data in ascending or descending order."
              }
            },
            "additionalProperties": false,
            "description": "List corporate actions by symbols, CUSIPs, types, region, or date range."
          }
        ],
        "description": "ids cannot be used with symbols, cusips, types, region, start, or end."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "corporateActions": {
            "type": "object",
            "additionalProperties": true,
            "description": "One raw object returned by Alpaca."
          },
          "nextPageToken": {
            "type": "string",
            "minLength": 1,
            "description": "Pagination token returned by Alpaca.",
            "pattern": "\\S"
          }
        },
        "additionalProperties": false,
        "required": [
          "corporateActions"
        ],
        "description": "Alpaca corporate actions response."
      }
    },
    {
      "id": "alpaca.list_news",
      "service": "alpaca",
      "name": "list_news",
      "description": "List latest Alpaca news articles across stocks and crypto.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "symbols": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "A symbol.",
              "pattern": "\\S"
            },
            "description": "A non-empty list of symbols.",
            "minItems": 1
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 50,
            "description": "Maximum number of news articles to return."
          },
          "includeContent": {
            "type": "boolean",
            "description": "Whether article content should be included when available."
          },
          "excludeContentless": {
            "type": "boolean",
            "description": "Whether articles without content should be excluded."
          },
          "start": {
            "type": "string",
            "minLength": 1,
            "description": "A date or RFC-3339 timestamp accepted by Alpaca.",
            "pattern": "\\S"
          },
          "end": {
            "type": "string",
            "minLength": 1,
            "description": "A date or RFC-3339 timestamp accepted by Alpaca.",
            "pattern": "\\S"
          },
          "sort": {
            "type": "string",
            "enum": [
              "asc",
              "desc"
            ],
            "description": "Sort data in ascending or descending order."
          },
          "pageToken": {
            "type": "string",
            "minLength": 1,
            "description": "Pagination token returned by Alpaca.",
            "pattern": "\\S"
          }
        },
        "additionalProperties": false,
        "description": "Input for listing Alpaca news articles."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "news": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true,
              "description": "One raw object returned by Alpaca."
            },
            "description": "News articles returned by Alpaca."
          },
          "nextPageToken": {
            "type": "string",
            "minLength": 1,
            "description": "Pagination token returned by Alpaca.",
            "pattern": "\\S"
          }
        },
        "additionalProperties": false,
        "required": [
          "news"
        ],
        "description": "Alpaca news articles response."
      }
    },
    {
      "id": "alpaca.list_option_contracts",
      "service": "alpaca",
      "name": "list_option_contracts",
      "description": "List Alpaca option contracts with optional underlying and contract filters.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "underlyingSymbols": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "An underlying symbol.",
              "pattern": "\\S"
            },
            "description": "A non-empty list of underlying symbols.",
            "minItems": 1
          },
          "showDeliverables": {
            "type": "boolean",
            "description": "Whether deliverables should be included in the response."
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive"
            ],
            "description": "Option contract status filter."
          },
          "expirationDate": {
            "type": "string",
            "description": "Exact expiration date filter.",
            "format": "date"
          },
          "expirationDateGte": {
            "type": "string",
            "description": "Minimum expiration date filter.",
            "format": "date"
          },
          "expirationDateLte": {
            "type": "string",
            "description": "Maximum expiration date filter.",
            "format": "date"
          },
          "rootSymbol": {
            "type": "string",
            "minLength": 1,
            "description": "Root symbol filter.",
            "pattern": "\\S"
          },
          "type": {
            "type": "string",
            "enum": [
              "call",
              "put"
            ],
            "description": "Option contract type filter."
          },
          "style": {
            "type": "string",
            "enum": [
              "american",
              "european"
            ],
            "description": "Option contract exercise style filter."
          },
          "strikePriceGte": {
            "type": "number",
            "description": "Minimum strike price filter."
          },
          "strikePriceLte": {
            "type": "number",
            "description": "Maximum strike price filter."
          },
          "pageToken": {
            "type": "string",
            "minLength": 1,
            "description": "Pagination token returned by Alpaca.",
            "pattern": "\\S"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10000,
            "description": "Maximum number of data points to return."
          },
          "ppind": {
            "type": "boolean",
            "description": "Whether to filter by penny price increment eligibility."
          }
        },
        "additionalProperties": false,
        "description": "Input for listing Alpaca option contracts."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "optionContracts": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true,
              "description": "One raw object returned by Alpaca."
            },
            "description": "Option contracts returned by Alpaca."
          },
          "nextPageToken": {
            "type": "string",
            "minLength": 1,
            "description": "Pagination token returned by Alpaca.",
            "pattern": "\\S"
          }
        },
        "additionalProperties": false,
        "required": [
          "optionContracts"
        ],
        "description": "Alpaca option contracts response."
      }
    },
    {
      "id": "alpaca.list_orders",
      "service": "alpaca",
      "name": "list_orders",
      "description": "List Alpaca orders for the connected account with optional filters.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "open",
              "closed",
              "all"
            ],
            "description": "Order status filter."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 500,
            "description": "Maximum number of records to return."
          },
          "after": {
            "type": "string",
            "minLength": 1,
            "description": "A date or RFC-3339 timestamp accepted by Alpaca.",
            "pattern": "\\S"
          },
          "until": {
            "type": "string",
            "minLength": 1,
            "description": "A date or RFC-3339 timestamp accepted by Alpaca.",
            "pattern": "\\S"
          },
          "direction": {
            "type": "string",
            "enum": [
              "asc",
              "desc"
            ],
            "description": "Sort data in ascending or descending order."
          },
          "nested": {
            "type": "boolean",
            "description": "Whether nested multi-leg orders should be included."
          },
          "symbols": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "A symbol.",
              "pattern": "\\S"
            },
            "description": "A non-empty list of symbols.",
            "minItems": 1
          }
        },
        "additionalProperties": false,
        "description": "Input for listing Alpaca orders."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "orders": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true,
              "description": "One raw object returned by Alpaca."
            },
            "description": "Orders returned by Alpaca."
          }
        },
        "additionalProperties": false,
        "description": "Alpaca orders response."
      }
    },
    {
      "id": "alpaca.list_positions",
      "service": "alpaca",
      "name": "list_positions",
      "description": "List open positions for the connected Alpaca trading account.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {},
        "additionalProperties": false,
        "description": "Input for listing Alpaca open positions."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "positions": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true,
              "description": "One raw object returned by Alpaca."
            },
            "description": "Open positions returned by Alpaca."
          }
        },
        "additionalProperties": false,
        "description": "Alpaca open positions response."
      }
    },
    {
      "id": "alpaca.list_watchlists",
      "service": "alpaca",
      "name": "list_watchlists",
      "description": "List Alpaca watchlists registered under the connected trading account.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {},
        "additionalProperties": false,
        "description": "Input for listing Alpaca watchlists."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "watchlists": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true,
              "description": "One raw object returned by Alpaca."
            },
            "description": "Watchlists returned by Alpaca."
          }
        },
        "additionalProperties": false,
        "description": "Alpaca watchlists response."
      }
    }
  ]
}
