# Alpaca India - GIFT City Documentation > Alpaca offers simple, modern API-first solutions to get market data, trade stocks and crypto, build apps and more. ## Guides - [Welcome](https://docs.alpaca.markets/in-giftcity/docs/getting-started.md): This page will help you get started with Alpaca Docs. You'll be up and running in a jiffy! - [About Alpaca](https://docs.alpaca.markets/in-giftcity/docs/about-alpaca.md) - [Alpaca API Platform](https://docs.alpaca.markets/in-giftcity/docs/alpaca-api-platform.md) - [Authentication](https://docs.alpaca.markets/in-giftcity/docs/authentication.md) - [Additional Resources](https://docs.alpaca.markets/in-giftcity/docs/additional-resources.md) - [About Broker API](https://docs.alpaca.markets/in-giftcity/docs/about-broker-api.md): This is the documentation about Broker API that helps you build trading apps and brokerage services for your end users. If you are looking to build your own trading bots and algos, read the Trading API documentation. With Alpaca Broker API, you can build the full brokerage experiences for your end users around account opening, funding and trading. This document describes all you need to know to build your trading app. - [Getting Started with Broker API](https://docs.alpaca.markets/in-giftcity/docs/getting-started-with-broker-api.md): This guide is going to help you set everything up in a sandbox environment to get you up and running with Broker API. - [Credentials Management](https://docs.alpaca.markets/in-giftcity/docs/credential-management.md) - [Use Cases](https://docs.alpaca.markets/in-giftcity/docs/use-cases.md) - [Integration Setup with Alpaca](https://docs.alpaca.markets/in-giftcity/docs/integration-setup-with-alpaca.md): If you are coming to Alpaca for the first time to build something using Broker API, please sign up for the dashboard. In this dashboard, you can acquire your API key for the sandbox environment and gain access to the test data immediately. - [Broker API FAQs](https://docs.alpaca.markets/in-giftcity/docs/broker-api-faq.md): Frequently Asked Questions - [Mandatory Corporate Actions](https://docs.alpaca.markets/in-giftcity/docs/mandatory-corporate-actions.md): Frequently Asked Mandatory Corporate Action Questions - [Voluntary Corporate Actions](https://docs.alpaca.markets/in-giftcity/docs/voluntary-corporate-actions.md): Frequently Asked Voluntary Corporate Action Questions - [FDIC Sweep Program](https://docs.alpaca.markets/in-giftcity/docs/fdic-sweep-program.md) - [Instant Funding](https://docs.alpaca.markets/in-giftcity/docs/instant-funding-1.md): Frequently Asked Instant Funding Questions - [24/5 Trading](https://docs.alpaca.markets/in-giftcity/docs/245-trading.md) - [OmniSub](https://docs.alpaca.markets/in-giftcity/docs/omnisub.md) - [Fixed Income](https://docs.alpaca.markets/in-giftcity/docs/fixed-income.md) - [ACAT API](https://docs.alpaca.markets/in-giftcity/docs/acat-api.md) - [Intraday Margin Rule for Non-Leverage Margin Accounts](https://docs.alpaca.markets/in-giftcity/docs/intraday-margin-rule-for-non-leverage-margin-accounts.md) - [The Intraday Margin Rule](https://docs.alpaca.markets/in-giftcity/docs/the-intraday-margin-rule-1.md) - [Understanding FINRA’s New Intraday Margin Rule and the End of PDT](https://docs.alpaca.markets/in-giftcity/docs/understanding-finras-new-intraday-margin-rule-and-the-end-of-pdt-1.md) - [US IPOs (Initial Public Offerings)](https://docs.alpaca.markets/in-giftcity/docs/us-ipos-initial-public-offerings.md) - [Customer Account Opening](https://docs.alpaca.markets/in-giftcity/docs/account-opening.md): If you are a fully-disclosed broker-dealer, an RIA, or a trading app setup, you can open your end customer’s account using Account API. The POST method allows you to submit all KYC information to Alpaca. There are slight differences between setups. # - [Accounts Statuses](https://docs.alpaca.markets/in-giftcity/docs/accounts-statuses.md) - [International Accounts](https://docs.alpaca.markets/in-giftcity/docs/international-accounts.md) - [Data Validations](https://docs.alpaca.markets/in-giftcity/docs/data-validations.md) - [Funding Accounts](https://docs.alpaca.markets/in-giftcity/docs/funding-accounts.md): The funding process can vary depending on your setup and region and we support many cases, but everyone can do the same in the sandbox environment. - [Journals API](https://docs.alpaca.markets/in-giftcity/docs/funding-via-journals.md) - [Funding Wallets](https://docs.alpaca.markets/in-giftcity/docs/funding-wallets.md) - [Instant Funding](https://docs.alpaca.markets/in-giftcity/docs/instant-funding.md) - [Trading](https://docs.alpaca.markets/in-giftcity/docs/brokerapi-trading.md): All the functionality from Alpaca Trading API for direct users is supported under Broker API. Please read the documentation for more details. There are additional capabilities for Trading API in the broker setup. - [Restricted Crypto Backed Securities](https://docs.alpaca.markets/in-giftcity/docs/restricted-crypto-backed-securities.md) - [Portfolio Rebalancing](https://docs.alpaca.markets/in-giftcity/docs/portfolio-rebalancing.md) - [SSE Events](https://docs.alpaca.markets/in-giftcity/docs/sse-events.md) - [Activities](https://docs.alpaca.markets/in-giftcity/docs/activity-sse.md): Integration Guide & Migration Playbook - [Daily Processes and Reconcilations](https://docs.alpaca.markets/in-giftcity/docs/daily-processes-and-reconcilations.md) - [Banking Holiday Funding Processes](https://docs.alpaca.markets/in-giftcity/docs/holiday-funding-processes.md): This section addresses operational procedures for scenarios where the bank is closed for a holiday, but the stock market remains open for trading (e.g., Columbus Day, Veterans Day). - [Statements and Confirms](https://docs.alpaca.markets/in-giftcity/docs/statements-and-confirms.md) - [Example Trading App (Ribbit)](https://docs.alpaca.markets/in-giftcity/docs/example-trading-app-ribbit.md) - [Fixed Income](https://docs.alpaca.markets/in-giftcity/docs/fixed-income-1.md): This guide provides a comprehensive reference for integrating U.S. Treasuries and U.S. Corporate Bonds into your platform. - [US IPOs (Initial Public Offerings)](https://docs.alpaca.markets/in-giftcity/docs/us-ipos-initial-public-offerings-1.md): This guide provides a comprehensive reference for integrating U.S. IPOs into your platform. - [Custodial accounts](https://docs.alpaca.markets/in-giftcity/docs/custodial-accounts.md) - [Rate Limits](https://docs.alpaca.markets/in-giftcity/docs/broker-api-rate-limits.md) - [About Market Data API](https://docs.alpaca.markets/in-giftcity/docs/about-market-data-api.md): Gain seamless access to a wealth of data with Alpaca Market Data API, offering real-time and historical information for equities, options, crypto and more. - [Getting Started with Market Data API](https://docs.alpaca.markets/in-giftcity/docs/getting-started-with-alpaca-market-data.md): This is a quick guide on how to start consuming market data via APIs. Starting from beginning to end, this section outlines how to install Alpaca’s software development kit (SDK), create a free alpaca account, locate your API keys, and how to request both historical and real-time data. - [Historical API](https://docs.alpaca.markets/in-giftcity/docs/historical-api.md) - [Historical Stock Data](https://docs.alpaca.markets/in-giftcity/docs/historical-stock-data-1.md) - [Historical News Data](https://docs.alpaca.markets/in-giftcity/docs/historical-news-data.md) - [WebSocket Stream](https://docs.alpaca.markets/in-giftcity/docs/streaming-market-data.md) - [Real-time Stock Data](https://docs.alpaca.markets/in-giftcity/docs/real-time-stock-pricing-data.md) - [Real-time News](https://docs.alpaca.markets/in-giftcity/docs/streaming-real-time-news.md) - [Market Data FAQ](https://docs.alpaca.markets/in-giftcity/docs/market-data-faq.md): Frequently Asked Questions ## API Reference - [Retrieve Blocked Symbols](https://docs.alpaca.markets/in-giftcity/reference/getblockedsymbols.md): Returns the list of symbols that are blocked from **buy** orders for India / GIFT City accounts. Sell orders for these symbols are still permitted. Requires a customer `Authorization: Bearer` token. The returned `blocked_symbols` array is sorted alphabetically and de-duplicated. - [Get All Accounts](https://docs.alpaca.markets/in-giftcity/reference/getallaccounts.md): Retrieves the first 1000 accounts that match the query parameters. Sorting is based on creation time. The created_after/created_before query parameters can be used to paginate the results. To further limit the size of the response, the entities query parameter can be used to specify which properties are included in the response. - [Create an Account](https://docs.alpaca.markets/in-giftcity/reference/createaccount.md): Submit an account application with KYC information. This will create a trading account for the end user. The account status may or may not be ACTIVE immediately and you will receive account status updates on the event API. **Multi-Live Accounts (MLA)**: To open an additional account for an existing account holder, supply `primary_account_holder_id` at the top level instead of `contact`/`identity` data. In that case, supplying `contact` or `identity` returns HTTP 400. Only `account_type` of `trading` and `ira` are supported via this flow. - [Get An Account by ID](https://docs.alpaca.markets/in-giftcity/reference/getaccount.md): You can query a specific account that you submitted to Alpaca by passing into the query the account_id associated with the account you're retrieving. - [Update an Account](https://docs.alpaca.markets/in-giftcity/reference/patchaccount.md): This operation updates account information. If all parameters are valid and updates have been made, it returns with status code 200. The response is the account model. **Multi-Live Accounts (MLA)**: The `primary_account_holder_id` field is read-only after the account is created. Omitting it or supplying the value already associated with the account is a no-op; supplying a different value returns HTTP 400. - [Close an Account](https://docs.alpaca.markets/in-giftcity/reference/post-v1-accounts-account_id-actions-close.md): This operation closes an active account. The underlying records and information of the account are not deleted by this operation. **Before closing an account, you are responsible for closing all the positions and withdrawing all the money associated with that account. Learn more in the Positions Documentation.** - [Request options trading for an account (BETA)](https://docs.alpaca.markets/in-giftcity/reference/requestoptionsforaccount.md): This endpoint requests options trading for an account. Following submission, an assigned administrator will review the request. Upon approval, the account's options_approved_level parameter will be modified, granting the account the ability to participate in options trading. Note: This endpoint is only available for partners who have been enabled for Options BETA. - [Retrieve Account Activities](https://docs.alpaca.markets/in-giftcity/reference/getaccountactivities.md): Returns a list of activities Notes: * Pagination is handled using the `page_token` and `page_size` parameters. * `page_token` represents the ID of the last item on your current page of results. For example, if the ID of the last activity in your first response is `20220203000000000::045b3b8d-c566-4bef-b741-2bf598dd6ae7`, you would pass that value as `page_token` to retrieve the next page of results. * If specified with a `direction` of `desc`, for example, the results will end before the activity with the specified ID. * If specified with a `direction` of `asc`, results will begin with the activity immediately after the one specified. * `page_size` is the maximum number of entries to return in the response. * If `date` is not specified, the default and maximum value is 100. * If `date` is specified, the default behavior is to return all results, and there is no maximum page size. - [Retrieve Account Activities of Specific Type](https://docs.alpaca.markets/in-giftcity/reference/getaccountactivitiesbytype.md): Retrieves an array of Activity by type. If {activity_type} is provided as part of the URL, category cannot be provided as query parameter. They are mutually exclusive. Notes: * Pagination is handled using the `page_token` and `page_size` parameters. * `page_token` represents the ID of the end of your current page of results. for example if in your first response the id of the last Activiy item returned in the array was `20220203000000000::045b3b8d-c566-4bef-b741-2bf598dd6ae7`, you'd pass that value as `page_token` to get the next page of results * If specified with a `direction` of `desc`, for example, the results will end before the activity with the specified ID. * If specified with a `direction` of `asc`, results will begin with the activity immediately after the one specified. * `page_size` is the maximum number of entries to return in the response. * If `date` is not specified, the default and maximum value is 100. * If `date` is specified, the default behavior is to return all results, and there is no maximum page size. - [Retrieve options level approval requests (BETA)](https://docs.alpaca.markets/in-giftcity/reference/requestlistoptionsapprovals.md): This endpoint retrieves options trading level approval requests. Query parameters can be specified to filter the results. If multiple query parameters are specified, the results will be filtered to include only those that match all of the specified parameters. Each query parameter can only be specified once. - [Retrieve Trading Details for an Account](https://docs.alpaca.markets/in-giftcity/reference/gettradingaccount.md): As a broker you can view more trading details about your users. The response is a Trading Account model. - [Get a single activity (V2) event by event_id ULID.](https://docs.alpaca.markets/in-giftcity/reference/getaccountactivityevent.md): Returns a single account activity (V2) event for the specified account by ULID `event_id`, delivered as a server-sent event message. This is the single-event counterpart to the `subscribeToActivitiesSSE` streaming endpoint, intended for re-fetching an individual activity that was previously observed on the activities stream. - [Retrieve a List of Account Documents](https://docs.alpaca.markets/in-giftcity/reference/getdocsforaccount.md): This endpoint allows you to query all the account document based on an account ID. You can filter by date, or type of document. These account documents are tax statements, trade confirmations, etc, generated by the Alpaca system. They are distinct from the owner documents you upload and later access via the account object's documents property. - [Download an Account Document](https://docs.alpaca.markets/in-giftcity/reference/downloaddocfromaccount.md): This endpoint downloads an account document based on the document ID. The document will be in PDF format. The operation returns a pre-signed downloadable link as a redirect with HTTP status code 301 if one is found. You can retrieve a JSON version of a monthly statement by passing in the header accept: application/json header. These account documents are tax statements, trade confirmations, etc, generated by the Alpaca system. They are distinct from the owner documents you upload and later access via the account object's documents property. - [Upload Owner Documents for an Existing Account](https://docs.alpaca.markets/in-giftcity/reference/uploaddoctoaccount.md): Upload documents for the primary account owner of an account. Documents are binary objects whose contents are encoded in base64. Each encoded content size is limited to 10MB if you use Alpaca for KYCaaS. If you perform your own KYC there are no document size limitations. As a convenience, documents of type w8ben may be uploaded as a JSON object using the content_data request property. The Alpaca system will then generate a formatted W-8 BEN document for subsequent downloads. Note that these owner documents are distinct from the account documents generated by Alpaca, such as tax statements and trade confirmations. - [Download the W8BEN document for the primary owner of an account](https://docs.alpaca.markets/in-giftcity/reference/get-v1-accounts-account_id-documents-w8ben-document_id-download.md): This endpoint allows you to download a W-8 BEN document for the primary owner of an account based on the document_id passed as a path parameter. The returned document is in PDF format. For certain individuals, a W-8 BEN form should be submitted at onboarding. If the individual is not a registered U.S. taxpayer (not subject to a W-9), the W-8 BEN form may need to be submitted. The IRS explains which individuals this applies to and provides instructions on completing the form. Every three years, in addition to the calendar year it was signed, a new W-8 BEN form must be submitted. The form can be submitted in JSON, JSONC, PNG, JPEG or PDF. If submitting it in JSON, please see the W-8 BEN completed with the corresponding field names for the API here. Note: The dates collected on the form are in a slightly different format than how they need to be submitted via Accounts API. It is requested by the user on the form in MM-DD-YYYY, but should be submitted as YYYY-MM-DD. - [Bulk Fetch All Accounts Positions](https://docs.alpaca.markets/in-giftcity/reference/get-v1-accounts-positions.md): Retrieves a list of the account's open positions. This endpoint is deprecated and will be removed in the future. Please use the [GET /v1/reporting/eod/positions endpoint](https://docs.alpaca.markets/reference/get-v1-reporting-eod-positions) instead. - [Update Trading Configurations for an Account](https://docs.alpaca.markets/in-giftcity/reference/patch-patch-v1-trading-accounts-account_id-account-configurations.md): You can also set the margin settings for your users' account by passing a PATCH request. By default any account with funds under $2,000 is set a margin multiplier of 1.0, and accounts with over $2,000 are set to 2.0. - [Retrieve real-time Trading Limits for an Account](https://docs.alpaca.markets/in-giftcity/reference/get-v1-account-trading-limits.md): This endpoint is only available to accounts with the trading limits feature enabled, and not on JIT. The daily trading limit is set at the correspondent level (or the account level) and is used as the limit for the total amount due to Alpaca on the date of settlement. The limit in use returns the real time usage of this limit, based on the setup it uses the usage is calculated differently. If the limit in use reaches the `daily_net_limit` or `available` is zero, further purchasing activity will be halted, however, the limit can be adjusted by reaching out to Alpaca with the proposed new limit and the reason for the change. - [Cancel all Open Orders For an Account](https://docs.alpaca.markets/in-giftcity/reference/deleteallordersforaccount.md): Attempts to cancel all open orders. A response will be provided for each order that is attempted to be cancelled. - [Retrieve a List of Orders](https://docs.alpaca.markets/in-giftcity/reference/getallordersforaccount.md): Retrieves a list of orders for the account, filtered by the supplied query parameters. Endpoint defaults to open orders if no parameters are provided. - [Create an Order for an Account](https://docs.alpaca.markets/in-giftcity/reference/createorderforaccount.md): Creating an order for your end customer. Each trading request must pass in the account_id in the URL. - Note that when submitting crypto orders, `market`, `limit` and `stop_limit` orders are supported while the supported `time_in_force` values are `gtc`, and `ioc`. - For equities and crypto we accept fractional orders as well with either `notional` or `qty` provided. - Note that submitting an options order is only available for partners who have been enabled for Options BETA. - In case of Fixed Income, only `market` and `limit` order types with `day` `time_in_force` are supported, and order replacement is not supported. Note that submitting Fixed Income orders is only available for partners who have been enabled for Fixed Income. - Note that submitting DMA orders (using `advanced_instructions` with `algorithm: DMA`) is only available for partners/correspondents who have been enabled for DMA. - For IPO indications of interest (`asset_class: "ipo"`), the `symbol` is the offering reference returned by [`GET /v1/ipos`](#operation/listIPOOfferings) (e.g. `FI111225`). IPO orders are notional-only (`notional` required, `qty` must be omitted), buy-side, `market` type, and `gtc` time_in_force. Indications of interest can be replaced or canceled while the offering is open via [`PATCH /v1/trading/accounts/{account_id}/orders/{order_id}`](#operation/replaceOrderForAccount) and [`DELETE /v1/trading/accounts/{account_id}/orders/{order_id}`](#operation/deleteOrderForAccount). - [Cancel an Open Order](https://docs.alpaca.markets/in-giftcity/reference/deleteorderforaccount.md): Attempts to cancel an open order. If the order is no longer cancelable (for example if the status is "filled"), the server will respond with status 422, and reject the request. Upon acceptance of the cancel request, it returns status 204. - [Retrieve an Order by its ID](https://docs.alpaca.markets/in-giftcity/reference/getorderforaccount.md): Retrieves a single order for the given order_id. - [Replace an Order](https://docs.alpaca.markets/in-giftcity/reference/replaceorderforaccount.md): Replaces a single order with updated parameters. Each parameter overrides the corresponding attribute of the existing order. The other attributes remain the same as the existing order. A success return code from a replaced order does NOT guarantee the existing open order has been replaced. If the existing open order is filled before the replacing (new) order reaches the execution venue, the replacing (new) order is rejected, and these events are sent in the trade_updates stream channel found [here](https://docs.alpaca.markets/reference/subscribetotradev2sse). While an order is being replaced, the account's buying power is reduced by the larger of the two orders that have been placed (the old order being replaced, and the newly placed order to replace it). If you are replacing a buy entry order with a higher limit price than the original order, the buying power is calculated based on the newly placed order. If you are replacing it with a lower limit price, the buying power is calculated based on the old order. Note: Order cannot be replaced when the status is `accepted`, `pending_new`, `pending_cancel` or `pending_replace`. Note: Notional orders for non-IPO asset classes cannot be replaced. Any attempt to modify a non-IPO notional order via this endpoint will be rejected; cancel it and submit a new one instead. Note: IPO indications of interest (`asset_class: "ipo"`) **are** notional and **can** be replaced via this endpoint by providing a new `notional` value. `qty` and `notional` are mutually exclusive on a single replace request. Note that submitting DMA orders (using `advanced_instructions` with `algorithm: DMA`) is only available for partners/correspondents who have been enabled for DMA. - [Estimate an Order](https://docs.alpaca.markets/in-giftcity/reference/get-v1-trading-accounts-account_id-orders-estimation.md): Order estimation endpoint will display, based on user's account balance, the estimated quantity and price they will receive for their notional order. For LCT - customer's order will include the Alpaca swap_fee, while correspondent side swap_fee is configurable in the API call. Utilising this API does not result in a real order and after the calculation - the user's buying power reverts to the previous state. Responses and Errors are the same as with the Orders API Please note that the estimation is based on the market condition at the time of submission and a live order will differ. The output should be considered indicative. **Note:** This does not support Crypto or non-market orders at this time. - [Retrieves a single order specified by the client order ID.](https://docs.alpaca.markets/in-giftcity/reference/getorderbyclientorderidforaccount.md): Retrieves a single order specified by the client order ID. - [Close All Positions for an Account](https://docs.alpaca.markets/in-giftcity/reference/closeallpositionsforaccount.md): Closes (liquidates) all of the account's open long and short positions. A response will be provided for each order that is attempted to be cancelled. If an order is no longer cancelable, the server will respond with status 500 and reject the request. - [List Open Positions for an Account](https://docs.alpaca.markets/in-giftcity/reference/getpositionsforaccount.md): List open positions for an account - [Close a Position for an Account](https://docs.alpaca.markets/in-giftcity/reference/closepositionforaccountbysymbol.md): Closes (liquidates) the account's open position for the given symbol. Works for both long and short positions. - [Get an Open Position for account by Symbol or AssetId](https://docs.alpaca.markets/in-giftcity/reference/getpositionsforaccountbysymbol.md): Retrieves the account's open position for the given symbol or asset_id. - [Do Not Exercise an Options Position](https://docs.alpaca.markets/in-giftcity/reference/optiondonotexercise.md): This endpoint enables users to submit a do-not-exercise (DNE) instruction for a held option contract, preventing automatic exercise at expiry. By default, Alpaca will automatically exercise in-the-money (ITM) contracts at expiry. This endpoint allows users to override that behavior. DNE requests will be processed immediately once received. DNE requests submitted between market close and midnight will be rejected to avoid any confusion about when the instruction will take effect. To cancel a DNE request or to submit an exercise instruction, please contact our support team. - [Exercise an Options Position](https://docs.alpaca.markets/in-giftcity/reference/optionexercise.md): This endpoint enables users to exercise a held option contract, converting it into the underlying asset based on the specified terms. All available held shares of this option contract will be exercised. By default, Alpaca will automatically exercise in-the-money (ITM) contracts at expiry. Exercise requests will be processed immediately once received. Exercise requests submitted between market close and midnight will be rejected to avoid any confusion about when the exercise will settle. To cancel an exercise request or to submit a Do-not-exercise (DNE) instruction, you can use the do-not-exercise endpoint or contact our support team. - [Get Account Portfolio History](https://docs.alpaca.markets/in-giftcity/reference/get-v1-trading-accounts-account_id-account-portfolio-history.md): Returns timeseries data about equity and profit/loss (P/L) of the account in requested timespan. - [Retrieve All Assets](https://docs.alpaca.markets/in-giftcity/reference/getassets.md): Returns all assets - [Retrieve an Asset by ID](https://docs.alpaca.markets/in-giftcity/reference/getassetbysymbolorid.md): Returns the requested asset, if found - [Retrieve Entry Requirements for requested assets](https://docs.alpaca.markets/in-giftcity/reference/get-asset-entry-requirements.md): Returns all entry-requirements - [Get US corporates](https://docs.alpaca.markets/in-giftcity/reference/uscorporates.md): Serves the list of US corporates available at Alpaca. The response is sorted by ISIN. - [Get US treasuries](https://docs.alpaca.markets/in-giftcity/reference/ustreasuries.md): Serves the list of US treasuries available at Alpaca. The response is sorted by ISIN. - [Get Option Contracts (BETA)](https://docs.alpaca.markets/in-giftcity/reference/get-options-contracts.md): This endpoint allows you to retrieve a list of option contracts based on various filtering criteria. By default only active contracts that expire before the upcoming weekend are returned. - [Get an option contract by ID or Symbol (BETA)](https://docs.alpaca.markets/in-giftcity/reference/get-option-contract-symbol_or_id.md): Get an option contract by symbol or contract ID. The symbol or id should be passed in as a path parameter. - [Get US Market Calendar](https://docs.alpaca.markets/in-giftcity/reference/legacycalendar.md): The calendar API serves the full list of market days from 1970 to 2029. It can also be queried by specifying a start and/or end time to narrow down the results. In addition to the dates, the response also contains the specific open and close times for the market days, taking into account early closures. - [Get US Market Clock](https://docs.alpaca.markets/in-giftcity/reference/legacyclock.md): The clock API serves the current market timestamp, whether or not the market is currently open, as well as the times of the next market open and close. - [Get Market Calendar](https://docs.alpaca.markets/in-giftcity/reference/calendar-1.md): This endpoint returns the market calendar. - [Get Market Clock](https://docs.alpaca.markets/in-giftcity/reference/clock.md): This API serves information about multiple markets: the current time, if it's a market day, the current phase of the market, etc. - [Subscribe to Account Status Events (SSE)](https://docs.alpaca.markets/in-giftcity/reference/suscribetoaccountstatussse.md): The accounts events API provides streaming of account changes as they occur, via SSE (server sent events). Past events can also be queried. Events are generated for changes to the following account properties: - account_blocked - admin_configurations - cash_interest - crypto_status - kyc_results - options - status - trading_blocked Only the changed properties are included in the event payload. Query Parameter Rules: - `since_id` and `until_id` are deprecated and available only to select broker partners; use `since_ulid` and `until_ulid` instead - `since` is required if `until` specified - `since_id` is required if `until_id` specified - `since_ulid` is required if `until_ulid` specified - `since`, `since_id` and `since_ulid` can't be used at the same time Behavior: This API supports querying a range of events, starting now or in the past. If the end of the range is in the future or not specified, the connection is kept open and future events are pushed. To be specific: - if `since`, `since_id` or `since_ulid` is not specified, this will not return any historic data - if `until`, `until_id` or `until_ulid` is reached, the stream will end with a status of 200 --- Note for people using the clients generated from this OAS spec. Currently OAS-3 doesn't have full support for representing SSE style responses from an API, so if you are using a generated client and don't specify a `since` and `until` there is a good chance the generated clients will hang waiting for the response to end. If you require the streaming capabilities we recommend not using the generated clients for this specific usecase until the OAS-3 standards come to a consensus on how to represent this correctly in OAS-3. - [Subscribe to Journal Events (SSE) (Legacy)](https://docs.alpaca.markets/in-giftcity/reference/subscribetojournalstatussse.md): The Events API provides event push as well as historical queries via SSE (server sent events). You can listen to journal status updates as they get processed by our backoffice. Historical events are streamed immediately if queried, and updates are pushed as events occur. Query Params Rules: - `since_id` and `until_id` are deprecated and available only to select broker partners; use `since_ulid` and `until_ulid` instead - `since` required if `until` specified - `since_id` required if `until_id` specified - `since_ulid` required if `until_ulid` specified - `since`, `since_id` or `since_ulid` can't be used at the same time Behavior: - if `since`, `since_id` or `since_ulid` not specified this will not return any historic data - if `until`, `until_id` or `until_ulid` reached stream will end (status 200) --- There is no compatibility between /v1/events/journals/status and /v2/events/journals/status, the ids (ulid) are always different, and the number of events might also different Please note that the new `/v2` endpoint, is the same as, and was originally available under `/v2beta1`. We encourage all customers to adjust their codebase from that interim beta endpoint to the `/v2` stable endpoint. In the near future we will setup permanent redirect from `/v2beta1` to `/v2` before we completely remove the beta endpoint. --- Note for people using the clients generated from this OAS spec. Currently OAS-3 doesn't have full support for representing SSE style responses from an API, so if you are using a generated client and don't specify a `since` and `until` there is a good chance the generated clients will hang waiting for the response to end. If you require the streaming capabilities we recommend not using the generated clients for this specific usecase until the OAS-3 standards come to a consensus on how to represent this correctly in OAS-3. - [Subscribe to Non-Trading Activities Events (SSE)](https://docs.alpaca.markets/in-giftcity/reference/get-v1-events-nta.md): The Events API provides event push as well as historical queries via SSE (server sent events). You can listen to non-trading activities updates as they get processed by our backoffice, for both end-user and firm accounts. Historical events are streamed immediately if queried, and updates are pushed as events occur. You can listen to when NTAs are pushed such as CSDs, JNLC (journals) or FEEs. Query Params Rules: - `since_id` and `until_id` are deprecated and available only to select broker partners; use `since_ulid` and `until_ulid` instead - `since` required if `until` specified - `since_id` required if `until_id` specified - `since_ulid` required if `until_ulid` specified - `since`, `since_id` or `since_ulid` can't be used at the same time Behavior: - if `since`, `since_id` or `since_ulid` not specified this will not return any historic data - if `until`, `until_id` or `until_ulid` reached stream will end (status 200)' - [Subscribe to Transfer Events (SSE) (Legacy)](https://docs.alpaca.markets/in-giftcity/reference/subscribetotransferstatussse.md): **Deprecation notice** As part of the deprecation process, the legacy transfer events API is now only available for existing broker-partners at `GET /v1/events/transfers/status` and for compatibility reasons. All new broker partners will not have the option to use the legacy transfer events endpoint. They should integrate with the new `/v2/events/funding/status` endpoint instead. Also, all existing broker partners are now recommended to upgrade to the `/v2/events/funding/status` endpoint, which provides faster event delivery times. --- The Events API provides event push as well as historical queries via SSE (server sent events). You can listen to transfer status updates as they get processed by our backoffice, for both end-user and firm accounts. Historical events are streamed immediately if queried, and updates are pushed as events occur. Query Params Rules: - `since_id` and `until_id` are deprecated and available only to select broker partners; use `since_ulid` and `until_ulid` instead - `since` required if `until` specified - `since_id` required if `until_id` specified - `since_ulid` required if `until_ulid` specified - `since`, `since_id` or `since_ulid` can't be used at the same time Behavior: - if `since`, `since_id` or `since_ulid` not specified this will not return any historic data - if `until`, `until_id` or `until_ulid` reached stream will end (status 200) --- Note for people using the clients generated from this OAS spec. Currently OAS-3 doesn't have full support for representing SSE style responses from an API, so if you are using a generated client and don't specify a `since` and `until` there is a good chance the generated clients will hang waiting for the response to end. If you require the streaming capabilities we recommend not using the generated clients for this specific usecase until the OAS-3 standards come to a consensus on how to represent this correctly in OAS-3. - [Subscribe to Activity Events (SSE)](https://docs.alpaca.markets/in-giftcity/reference/subscribetoactivitiessse.md): The Events API sends the real-time events and provides historical queries with SSE (Server Sent Events). This endpoint streams events on account activities. Historical events are streamed immediately if queried, and updates are pushed as events occur. Query parameter rules: - If `until` is specified, `since` is required. - If `until_id` is specified, `since_id` is required. - You cannot use `since` and `since_id` together. Behavior: - If `since` or `since_id` is not specified, this will not return any historic data. - If `until` or `until_id` is specified, stream will end at the specified point with status 200. --- Warning: Currently, OAS-3 does not fully support responses from an SSE API. In case the client code is generated from this OAS spec, please do not specify `since` and `until`, as the generated client may hang forever waiting for the response to end. If you require the streaming capabilities, we recommend not using the generated clients for this specific endpoint until the OAS-3 standards define how to represent this behavior. --- ### Comment messages According to the SSE specification, any line that starts with a colon is a comment which does not contain data. It is typically a free text that does not follow any data schema. A few examples mentioned below for comment messages. ##### Slow client The server sends a comment when the client is not consuming messages fast enough. Example: `: you are reading too slowly, dropped 10000 messages` ##### Internal server error An error message is sent as a comment when the server closes the connection on an internal server error (only sent by the v2 and v2beta1 endpoints). Example: `: internal server error` --- - [Subscribe to Admin Action Events (SSE)](https://docs.alpaca.markets/in-giftcity/reference/subscribetoadminactionsse.md): The Events API provides event push as well as historical queries via SSE (server sent events). This endpoint streams events related to administrative actions performed by our systems. Historical events are streamed immediately if queried, and updates are pushed as events occur. Query Params Rules: - `since` required if `until` specified - `since_id` required if `until_id` specified - `since` and `since_id` can't be used at the same time Behavior: - if `since` or `since_id` not specified this will not return any historic data - if `until` or `until_id` reached stream will end (status 200) --- Warning: Currently OAS-3 doesn't have full support for representing SSE style responses from an API. In case the client code is generated from this OAS spec, don't specify a `since` and `until` there is a good chance the generated clients will hang forever waiting for the response to end. If you require the streaming capabilities we recommend not using the generated clients for this specific endpoint until the OAS-3 standards come to a consensus on how to represent this behavior in OAS-3. --- ### Comment messages According to the SSE specification, any line that starts with a colon is a comment which does not contain data. It is typically a free text that does not follow any data schema. A few examples mentioned below for comment messages. ##### Slow client The server sends a comment when the client is not consuming messages fast enough. Example: `: you are reading too slowly, dropped 10000 messages` ##### Internal server error An error message is sent as a comment when the server closes the connection on an internal server error (only sent by the v2 and v2beta1 endpoints). Example: `: internal server error` --- **Event Types** - **LegacyNote:** Old free text based admin notes - **Liquidation:** Event for a position liquidation which initialized by an admin - **TransactionCancel:** Event for a manually cancelled transaction - [Subscribe to Funding Status Events (SSE)](https://docs.alpaca.markets/in-giftcity/reference/subscribetofundingstatussse.md): The Events API provides event push as well as historical queries via SSE (server sent events). You can listen to funding status updates as they get processed by our backoffice, for both end-user and firm accounts. Historical events are streamed immediately if queried, and updates are pushed as events occur. Query Params Rules: - `since` required if `until` specified - `since_id` required if `until_id` specified - `since` and `since_id` can't be used at the same time - `until` and `until_id` can't be used at the same time Behavior: - if `since` or `since_id` not specified this will not return any historic data - if `until` or `until_id` reached stream will end (status 200) --- Note for people using the clients generated from this OAS spec. Currently OAS-3 doesn't have full support for representing SSE style responses from an API, so if you are using a generated client and don't specify a `since` and `until` there is a good chance the generated clients will hang waiting for the response to end. If you require the streaming capabilities we recommend not using the generated clients for this specific usecase until the OAS-3 standards come to a consensus on how to represent this correctly in OAS-3. - [Subscribe to IPO Events (SSE)](https://docs.alpaca.markets/in-giftcity/reference/subscribetoipoeventssse.md): The Events API provides event push as well as historical queries via SSE (server sent events). You can listen to IPO offering lifecycle updates as they happen - including new offerings, offering updates, prospectus availability, the 60-minute pricing window, account-scoped allocation results, and offering cancellations. Historical events are streamed immediately if queried, and updates are pushed as events occur. --- **Event types** Each event has a `verb` field that determines the shape of `payload`. See the `IPOEvent` schema for the full payload structure for each verb. - `Offering` - initial publication of an offering (system-wide). - `OfferingUpdate` - update to a previously published offering (system-wide). - `Prospectus` - prospectus document is now available (system-wide). - `SixtyMinMail` - 60-minute pricing window has opened, no new orders accepted (system-wide). - `Allocation` - final allocation result for a specific account. **Account-scoped** - `account_id` and `correspondent` are populated. - `OfferingCancellation` - offering was cancelled. **No `payload` field is present.** Use the `offering_reference` field on each event to fetch the full offering metadata via [`GET /v1/ipos/{offering_reference}`](#operation/getIPOOffering). --- Query Params Rules: - `since` required if `until` specified - `since_id` required if `until_id` specified - `since` and `since_id` can't be used at the same time - `until` and `until_id` can't be used at the same time Behavior: - if `since` or `since_id` not specified this will not return any historic data - if `until` or `until_id` reached stream will end (status 200) --- Note for people using the clients generated from this OAS spec. Currently OAS-3 doesn't have full support for representing SSE style responses from an API, so if you are using a generated client and don't specify a `since` and `until` there is a good chance the generated clients will hang waiting for the response to end. If you require the streaming capabilities we recommend not using the generated clients for this specific usecase until the OAS-3 standards come to a consensus on how to represent this correctly in OAS-3. - [Subscribe to Journal Events (SSE)](https://docs.alpaca.markets/in-giftcity/reference/subscribetojournalstatusv2sse.md): The Events API provides event push as well as historical queries via SSE (server sent events). You can listen to journal status updates as they get processed by our backoffice. Historical events are streamed immediately if queried, and updates are pushed as events occur. Query Params Rules: - `since` required if `until` specified - `since_id` required if `until_id` specified - `since` and `since_id` can't be used at the same time - `until` and `until_id` can't be used at the same time Behavior: - if `since` or `since_id` not specified this will not return any historic data - if `until` or `until_id` reached stream will end (status 200) --- There is no compatibility between /v1/events/journals/status and /v2/events/journals/status, the ids (ulid) are always different, and the number of events might also different Please note that the new `/v2` endpoint, is the same as, and was originally available under `/v2beta1`. We encourage all customers to adjust their codebase from that interim beta endpoint to the `/v2` stable endpoint. In the near future we will setup permanent redirect from `/v2beta1` to `/v2` before we completely remove the beta endpoint. --- Note for people using the clients generated from this OAS spec. Currently OAS-3 doesn't have full support for representing SSE style responses from an API, so if you are using a generated client and don't specify a `since` and `until` there is a good chance the generated clients will hang waiting for the response to end. If you require the streaming capabilities we recommend not using the generated clients for this specific usecase until the OAS-3 standards come to a consensus on how to represent this correctly in OAS-3. - [Subscribe to System Events (SSE)](https://docs.alpaca.markets/in-giftcity/reference/subscribetosystemeventv2sse.md): The Events API provides event push as well as historical queries via SSE (server sent events). You can listen to system event updates as they happen in our backend. Historical events are streamed immediately if queried, and updates are pushed as events occur. Query Params Rules: - `since` required if `until` specified - `since_id` required if `until_id` specified - `since` and `since_id` can't be used at the same time - `until` and `until_id` can't be used at the same time Behavior: - if `since` or `since_id` not specified this will not return any historic data - if `until` or `until_id` reached stream will end (status 200) --- Note for people using the clients generated from this OAS spec. Currently OAS-3 doesn't have full support for representing SSE style responses from an API, so if you are using a generated client and don't specify a `since` and `until` there is a good chance the generated clients will hang waiting for the response to end. If you require the streaming capabilities we recommend not using the generated clients for this specific usecase until the OAS-3 standards come to a consensus on how to represent this correctly in OAS-3. - [Subscribe to Trade Events (SSE)](https://docs.alpaca.markets/in-giftcity/reference/subscribetotradev2sse.md): The Events API provides event push as well as historical queries via SSE (server sent events). You can listen to events related to trade updates. Most market trades sent during market hours are filled instantly; you can listen to limit order updates through this endpoint. Historical events are streamed immediately if queried, and updates are pushed as events occur. Query Params Rules: - `since` required if `until` specified - `since_id` required if `until_id` specified - `since` and `since_id` can't be used at the same time Behavior: - if `since` or `since_id` not specified this will not return any historic data - if `until` or `until_id` reached stream will end (status 200) --- Note for people using the clients generated from this OAS spec. Currently OAS-3 doesn't have full support for representing SSE style responses from an API, so if you are using a generated client and don't specify a `since` and `until` there is a good chance the generated clients will hang waiting for the response to end. If you require the streaming capabilities we recommend not using the generated clients for this specific usecase until the OAS-3 standards come to a consensus on how to represent this correctly in OAS-3. --- **Legacy trade events API deprecation** The legacy v1 trade events endpoint has been fully deprecated and is no longer available. Use `/v2/events/trades` for all trade event integrations. --- ### Comment messages According to the SSE specification, any line that starts with a colon is a comment which does not contain data. It is typically a free text that does not follow any data schema. A few examples mentioned below for comment messages. ##### Slow client The server sends a comment when the client is not consuming messages fast enough. Example: `: you are reading too slowly, dropped 10000 messages` ##### Internal server error An error message is sent as a comment when the server closes the connection on an internal server error (only sent by the v2 and v2beta1 endpoints). Example: `: internal server error` --- **Common events** These are the events that are the expected results of actions you may have taken by sending API requests. The meaning of the timestamp field changes for each type; the meanings have been specified here for which types the timestamp field will be present. - `accepted` Sent when an order is received and accepted by Alpaca - `pending_new` Sent when the order has been received by Alpaca and routed to the exchanges, but has not yet been accepted for execution. - `new` Sent when an order has been routed to exchanges for execution. - `fill` Sent when your order has been completely filled. - timestamp: The time at which the order was filled. - `partial_fill` Sent when a number of shares less than the total remaining quantity on your order has been filled. - timestamp: The time at which the shares were filled. - `canceled` Sent when your requested cancellation of an order is processed. - timestamp: The time at which the order was canceled. - `expired` Sent when an order has reached the end of its lifespan, as determined by the order's time in force value. - timestamp: The time at which the order expired. - `done_for_day` Sent when the order is done executing for the day, and will not receive further updates until the next trading day. - `replaced` Sent when your requested replacement of an order is processed. - timestamp: The time at which the order was replaced. **Rarer events** These are events that may rarely be sent due to unexpected circumstances on the exchanges. It is unlikely you will need to design your code around them, but you may still wish to account for the possibility that they will occur. - `rejected` Sent when your order has been rejected. - timestamp: The time at which the rejection occurred. - `held` For multi-leg orders, the secondary orders (stop loss, take profit) will enter this state while waiting to be triggered. - `stopped` Sent when your order has been stopped, and a trade is guaranteed for the order, usually at a stated price or better, but has not yet occurred. - `pending_cancel` Sent when the order is awaiting cancellation. Most cancellations will occur without the order entering this state. - `pending_replace` Sent when the order is awaiting replacement. - `calculated` Sent when the order has been completed for the day - it is either filled or done_for_day - but remaining settlement calculations are still pending. - `suspended` Sent when the order has been suspended and is not eligible for trading. - `order_replace_rejected` Sent when the order replace has been rejected. - `order_cancel_rejected` Sent when the order cancel has been rejected. - `trade_bust`: Sent when a previously reported execution has been canceled ("busted") by the upstream exchange. - `trade_correct`: Sent when a previously reported trade has been corrected. For example, the exchange may have updated the price, quantity, or another execution parameter after the trade was initially reported. - `restated`: Sent when the order is manually modified. - [Retrieve ACH Relationships for an account](https://docs.alpaca.markets/in-giftcity/reference/getaccountachrelationships.md): Returns a list of ACH Relationships for an account - [Create an ACH Relationship](https://docs.alpaca.markets/in-giftcity/reference/createachrelationshipforaccount.md): Create a new ACHRelationship for an account If successful, will return 200 code with a newly created ACH Relationship entity. - [Delete an existing ACH relationship](https://docs.alpaca.markets/in-giftcity/reference/deleteachrelationshipfromaccount.md): Delete an existing ACH relationship for an account - [Retrieve Bank Relationships for an Account](https://docs.alpaca.markets/in-giftcity/reference/getrecipientbanks.md): Retrieves Bank Relationships for an account - [Create a Bank Relationship for an Account](https://docs.alpaca.markets/in-giftcity/reference/createrecipientbank.md): If successful, retrieves Bank Relationships for an account - [Delete a Bank Relationship for an Account](https://docs.alpaca.markets/in-giftcity/reference/deleterecipientbank.md): If successful, deletes Bank Relationship for an account - [Retrieve List of Transfers for an Account.](https://docs.alpaca.markets/in-giftcity/reference/gettransfersforaccount.md): You can query a list of transfers for an account. You can filter requested transfers by values such as direction and status. Returns a list of transfer entities ordered by created_at - [Request a New Transfer](https://docs.alpaca.markets/in-giftcity/reference/createtransferforaccount.md): Create a new transfer to deposit money into or withdraw money from an account. Two `transfer_type` values are accepted, and both are available in sandbox and production: - **`ach`** — supports both `INCOMING` (deposit) and `OUTGOING` (withdrawal) directions. A `relationship_id` from a previously created [ACH Relationship](https://docs.alpaca.markets/reference/createachrelationshipforaccount) is required. - **`wire`** — supports the `OUTGOING` (withdrawal) direction only. Incoming wires cannot be initiated through this endpoint; they are pushed in by the sending bank and recorded automatically. A `bank_id` from a previously created [Bank Relationship](https://docs.alpaca.markets/reference/createrecipientbank) is required, and the bank must be in `APPROVED` status before the transfer will progress past `QUEUED`. In the sandbox environment, ACH deposits and withdrawals settle instantly against virtual funds. Outgoing wire withdrawals are accepted and simulated end-to-end — no funds are transmitted to a bank, but the transfer progresses to `COMPLETE` and the account is debited against virtual funds. Sandbox wire withdrawals are asynchronous (not instant) and auto-complete on weekdays only; transfers submitted on a weekend will not progress until Monday. For more on funding accounts in sandbox, see [this tutorial](https://alpaca.markets/learn/fund-broker-api/). - [Request to Close a Transfer](https://docs.alpaca.markets/in-giftcity/reference/deletetransfer.md): Request to close a transfer - [List all JIT Settlements](https://docs.alpaca.markets/in-giftcity/reference/get-v1-jit-settlements.md): Returns all JIT settlements filtered by status if provided. - [Create a new JIT settlement](https://docs.alpaca.markets/in-giftcity/reference/post-v1-jit-settlements.md): Creates a new JIT settlement, which will trigger the reconciliation process for all included accounts. There is a limit of 150,000 accounts per settlement. If more than 150,000 accounts need to be settled, they should be batched in multiple settlements. - [Get a single JIT settlement](https://docs.alpaca.markets/in-giftcity/reference/get-v1-jit-settlements-single.md): Returns the JIT settlement specified by the path parameter. - [Retrieve JIT Ledger Balances](https://docs.alpaca.markets/in-giftcity/reference/get-v1-transfers-jit-ledger_id-balances.md): Returns an array of objects that correspond to each ledger account. - [Retrieve JIT Ledgers](https://docs.alpaca.markets/in-giftcity/reference/get-v1-transfers-jit-ledgers.md): Returns an array of objects that correspond to each ledger account, each of whichcontain the following attributes. - [Retrieve Daily Trading Limits](https://docs.alpaca.markets/in-giftcity/reference/get-v1-transfers-jit-limits.md): The JIT Securities daily trading limit is set at the correspondent level and is used as the limit for the total amount due to Alpaca on the date of settlement. The limit in use returns the real time usage of this limit and is calculated by taking the net of trade and non-trade activity inflows and outflows. If the limit in use reaches the daily net limit, further purchasing activity will be halted, however, the limit can be adjusted by reaching out to Alpaca with the proposed new limit and the reason for the change. The limit is reset at the start of every trading day at 8.00 PM ET - [Retrieve JIT Reports](https://docs.alpaca.markets/in-giftcity/reference/get-v1-transfers-jit-reports.md): Retrieves a JIT report for the requested report type and system date. By default, the report is returned inline. For large reports, use response_type=download_url to receive a temporary signed download URL. - [Retrieve funding wallet](https://docs.alpaca.markets/in-giftcity/reference/getfundingwallet.md): Returns the funding wallet for the specified account. Responds with 404 if the account has not been onboarded to funding wallets or a wallet has not been created. - [Creates a funding wallet](https://docs.alpaca.markets/in-giftcity/reference/createfundingwallet.md): Creates a funding wallet for the specified account. The request is rejected if the account already has a funding wallet. - [Retrieve funding details](https://docs.alpaca.markets/in-giftcity/reference/listfundingdetails.md): Returns a list of funding details if it exists. Query parameters must be passed to create a new funding details object if none exist. - [Delete a recipient bank](https://docs.alpaca.markets/in-giftcity/reference/deletefundingwalletrecipientbank.md): deletes a recipient bank. - [Retrieve recipient bank](https://docs.alpaca.markets/in-giftcity/reference/getfundingwalletrecipientbank.md): Returns the recipient bank registered against the specified account's funding wallet. Responds with 404 if no recipient bank has been registered for the account. - [Create a recipient bank](https://docs.alpaca.markets/in-giftcity/reference/createfundingwalletrecipientbank.md): Creates a new recipient bank. Returns the new recipient bank entity on success. entity. - [Retrieve funding wallet transfers](https://docs.alpaca.markets/in-giftcity/reference/getfundingwallettransfers.md): Returns all funding wallet transfers (deposits and withdrawals) associated with the specified account. - [Retrieve funding wallet transfer by ID](https://docs.alpaca.markets/in-giftcity/reference/getfundingwallettransferbyid.md): Returns a single funding wallet transfer for the specified account by `transfer_id`. Responds with 404 if no matching transfer exists for the account. - [Create a withdrawal](https://docs.alpaca.markets/in-giftcity/reference/createfundingwalletwithdrawal.md): Creates a withdrawal - [Batch create funding wallets](https://docs.alpaca.markets/in-giftcity/reference/batchcreatefundingwallets.md): Creates funding wallets for a list of accounts in a single request. Every `account_id` in the request must belong to your firm, and the request is rejected if a funding wallet already exists for any of the supplied accounts. - [Create sandbox deposit transfer](https://docs.alpaca.markets/in-giftcity/reference/demodepositfunding.md): Simulates an inbound deposit into an account's funding wallet for end-to-end testing of the deposit flow. The transfer can only credit accounts that belong to your firm. Available in non-production (sandbox) environments only. - [Get Instant Funding List](https://docs.alpaca.markets/in-giftcity/reference/get-v1-instant-funding-list.md): Returns a list of instant funding records based on the query parameters. The results are paginated, sorted, and filtered based on the parameters provided. - [Create an instant funding request](https://docs.alpaca.markets/in-giftcity/reference/post-v1-instant-funding.md): Creates an instant funding request. The request will be processed and the funds will be made available to the account in the form of a Memopost non trade activity. Upon settlement the Memoposted will be corrected to a CSD activity. **Idempotency**: When the `Idempotency-Key` header is supplied, this endpoint is idempotent. Multiple requests with the same key and identical request body will create only one transfer. A subsequent request returns the previously created transfer with the same response (no duplicate is created). If the same key is used with a different request body, the API returns `422 Unprocessable Entity`. **Recommended for production**: Always supply `Idempotency-Key` when creating transfers. This allows safe retries on timeouts, network errors, or 5xx responses without risking duplicate transfers. Use a client-generated unique value (e.g. UUID). - [Cancel an instant funding request](https://docs.alpaca.markets/in-giftcity/reference/delete-v1-instant-funding-single.md): Cancels a single instant funding request based on the ID supplied if possible. - [Get an instant funding request](https://docs.alpaca.markets/in-giftcity/reference/get-v1-instant-funding-single.md): Returns an instant funding transfer based on the ID supplied. - [Get instant funding limits](https://docs.alpaca.markets/in-giftcity/reference/get-v1-instant-funding-correspondent-limits.md): Returns globally configured limits for the correspondent. These limits are used to determine the maximum amount that can be extended to all accounts, and reaching this limit will result in further requests to create instant funding requests being rejected. - [Get instant funding account limits](https://docs.alpaca.markets/in-giftcity/reference/get-v1-instant-funding-account-limits.md): Returns the limits for individual partner accounts. - [Get instant funding report](https://docs.alpaca.markets/in-giftcity/reference/get-v1-instant-funding-reports.md): Returns instant funding reports which are to be used for daily reconciliation reporting. - [List settlements](https://docs.alpaca.markets/in-giftcity/reference/get-v1-instant-funding-settlements.md): Returns all settlements filtered by status if provided. - [Create a new settlement](https://docs.alpaca.markets/in-giftcity/reference/post-v1-instant-funding-settlements.md): Creates a new settlement, which will trigger the reconciliation process for all included transfers and their interests. There is a limit of 50,000 transfers per settlement. If more than 50,000 transfers need to be settled, they should be batched in multiple settlements. - [Get a single settlement](https://docs.alpaca.markets/in-giftcity/reference/get-v1-instant-funding-settlements-single.md): Returns the settlement specified by the path parameter. - [Authorize an OAuth Token](https://docs.alpaca.markets/in-giftcity/reference/authorizeoauthtoken.md): The operation issues an OAuth code which can be used in the OAuth code flow. - [Get an OAuth client](https://docs.alpaca.markets/in-giftcity/reference/getoauthclient.md): The endpoint returns the details of OAuth client to display in the authorization page. - [Issue an OAuth token](https://docs.alpaca.markets/in-giftcity/reference/issueoauthtoken.md): The operation issues an OAuth code which can be used in the OAuth code flow. - [Retrieve a List Journals](https://docs.alpaca.markets/in-giftcity/reference/getalljournals.md): Returns an array of journal objects. - [Create a Journal](https://docs.alpaca.markets/in-giftcity/reference/createjournal.md): A journal can be JNLC (move cash) or JNLS (move shares), dictated by `entry_type`. Generally, journal requests are subject to approval and starts from the `pending` status. The status changes are propagated through the Event API. Under certain conditions agreed for the partner, such journal transactions that meet the criteria are executed right away. **Idempotency**: When the `Idempotency-Key` header is supplied, this endpoint is idempotent. Multiple requests with the same key and identical request body will create only one journal. A subsequent request returns the previously created journal with the same response (no duplicate is created). If the same key is used with a different request body, the API returns `422 Unprocessable Entity`. **Recommended for production**: Always supply `Idempotency-Key` when creating journals. This allows safe retries on timeouts, network errors, or 5xx responses without risking duplicate journals. Use a client-generated unique value (e.g. UUID). - [Cancel a Pending Journal](https://docs.alpaca.markets/in-giftcity/reference/deletejournalbyid.md): You can only delete a journal if the journal is still in a pending state, if a journal is executed you will not be able to delete. The alternative is to create a mirror journal entry to reverse the flow of funds. - [Retrieve a Single Journal Entry](https://docs.alpaca.markets/in-giftcity/reference/get-v1-journals-journal_id.md): You can query a specific journal entry that you submitted to Alpaca by passing into the query the journal_id. Will return a journal entry if a journal entry with journal_id exists, otherwise will throw an error. - [Create a Batch Journal Transaction (One-to-Many)](https://docs.alpaca.markets/in-giftcity/reference/createbatchjournal.md): You can create a batch of journal requests by using this endpoint. This is enabled on JNLC type Journals for now only. Every single request must be valid for the entire batch operation to succeed. In the case of a successful request, the response will contain an array of journal objects with an extra attribute error_message in the case when a specific account fails to receive a journal. **Idempotency**: When the `Idempotency-Key` header is supplied, this endpoint is idempotent. Multiple requests with the same key and identical request body will create only one batch. A subsequent request returns the previously created batch with the same response (no duplicate is created). If the same key is used with a different request body, the API returns `422 Unprocessable Entity`. **Recommended for production**: Always supply `Idempotency-Key` when creating journal batches. This allows safe retries on timeouts, network errors, or 5xx responses without risking duplicate batches. Use a client-generated unique value (e.g. UUID). - [Create a Reverse Batch Journal Transaction (Many-to-One)](https://docs.alpaca.markets/in-giftcity/reference/post-v1-journals-reverse_batch.md): You can also create a batch journal request by using the following endpoint. This is enabled on JNLC for now only. Note that if there is an invalid account_id the whole batch operation will be canceled. Every single request must be valid for the entire batch operation to succeed. In the case of a successful request, the response will contain an array of journal objects with an extra attribute error_message in the case when a specific account fails to submit a journal. - [Retrieve Announcements](https://docs.alpaca.markets/in-giftcity/reference/getcorporateannouncements.md): This endpoint is deprecated, please use [the new corporate actions endpoint](https://docs.alpaca.markets/reference/corporateactions-1) instead. - [Retrieve a Specific Announcement](https://docs.alpaca.markets/in-giftcity/reference/get-get-v1-corporate_actions-announcements-id.md): This endpoint is deprecated, please use [the new corporate actions endpoint](https://docs.alpaca.markets/reference/corporateactions-1) instead. - [Retrieve all Watchlists for an Account](https://docs.alpaca.markets/in-giftcity/reference/getallwatchlistsforaccount.md): Fetch a list of all watchlists currently in an account. - [Create a New Watchlist for an Account](https://docs.alpaca.markets/in-giftcity/reference/createwatchlistforaccount.md): Returns the watchlist object - [Remove a Watchlist](https://docs.alpaca.markets/in-giftcity/reference/deletewatchlistfromaccountbyid.md): Irrevocably delete a watchlist. - [Manage watchlists](https://docs.alpaca.markets/in-giftcity/reference/getwatchlistforaccountbyid.md): Retrieve Watchlist by ID - [Add an Asset to a Watchlist](https://docs.alpaca.markets/in-giftcity/reference/post-v1-trading-accounts-account_id-watchlists-watchlist_id.md): Adds an asset to an existing watchlist. - [Update a Watchlist](https://docs.alpaca.markets/in-giftcity/reference/replacewatchlistforaccountbyid.md): Replace entirely the set of securities contained in the watchlist while optionally renaming it. Destructive operation. - [Remove a Symbol from a Watchlist](https://docs.alpaca.markets/in-giftcity/reference/delete-delete-v1-trading-accounts-account_id-watchlists-watchlist_id-symbol.md): Delete one entry for an asset by symbol name - [Retrieve CIP information](https://docs.alpaca.markets/in-giftcity/reference/get-v1-accounts-account_id-cip.md): You can retrieve the CIP information you've submitted for a given account. - [Upload CIP information](https://docs.alpaca.markets/in-giftcity/reference/post-v1-accounts-account_id-cip.md): The customer identification program (CIP) API allows you to submit the CIP results received from your KYC provider. The minimum requirements to open an individual financial account are delimited and you must verify the true identity of the account holder at account opening: Name Date of birth Address Identification number (for a U.S. citizen, a taxpayer identification number) - [Update the Onfido SDK Outcome](https://docs.alpaca.markets/in-giftcity/reference/patch-v1-accounts-account_id-onfido-sdk.md): This request allows you to send Alpaca the result of the Onfido SDK flow in your app. A notification of a successful outcome is required for Alpaca to continue the KYC process. - [Retrieve an Onfido SDK Token](https://docs.alpaca.markets/in-giftcity/reference/get-v1-accounts-account_id-onfido-sdk-tokens.md): Get an SDK token to activate the Onfido SDK flow within your app. You will have to keep track of the SDK token so you can pass it back when you upload the SDK outcome. We recommend storing the token in memory rather than persistent storage to reduce any unnecessary overhead in your app. - [List Portfolios](https://docs.alpaca.markets/in-giftcity/reference/get-v1-rebalancing-portfolios.md): Lists portfolios. When more than one query parameter is passed, only portfolios meeting all provided values will be returned (logical AND between parameter values). - [Create Portfolio](https://docs.alpaca.markets/in-giftcity/reference/post-v1-rebalancing-portfolios.md): Creates a portfolio allocation containing securities and/or cash. Having no rebalancing conditions is allowed but the rebalance event would need to be triggered manually. Portfolios created with API may have multiple rebalance_conditions, but only one of type calendar. - [Inactivate Portfolio By ID](https://docs.alpaca.markets/in-giftcity/reference/delete-v1-rebalancing-portfolios-portfolio_id.md): Archives a portfolio (soft delete). Only permitted when the portfolio has no active subscriptions. Archived portfolios are hidden from the default list response and cannot be used for new subscriptions. - [Get Portfolio by ID](https://docs.alpaca.markets/in-giftcity/reference/get-v1-rebalancing-portfolios-portfolio_id.md): Get a portfolio by its ID. - [Update Portfolio by ID](https://docs.alpaca.markets/in-giftcity/reference/patch-v1-rebalancing-portfolios-portfolio_id.md): Updates a portfolio. If weights or conditions are changed, all subscribed accounts will be evaluated for rebalancing at the next opportunity (normal market hours). If a cooldown is active on the portfolio, the rebalancing will occur after the cooldown expired. - [List All Runs.](https://docs.alpaca.markets/in-giftcity/reference/get-v1-rebalancing-runs.md): Lists runs. - [Create Run (Manual rebalancing event)](https://docs.alpaca.markets/in-giftcity/reference/post-v1-rebalancing-runs.md): Manually creates a run. The determination of a run's orders and the execution of a run take place during normal market hours Runs can be initiated either by the system (when the system evaluates the rebalance conditions specified at the portfolio level) or by API call (manual run creation using POST /v1/rebalancing/runs). Runs can be initiated manually outside of the normal market hours but will remain in the QUEUED status until normal market hours Only 1 run in a non-terminal status is allowed at any time. Manually executing a run is currently only allowed for accounts who do not have an active subscription. - [Cancel Run by ID](https://docs.alpaca.markets/in-giftcity/reference/delete-v1-rebalancing-runs-run_id.md): Cancels a run. Only runs within certain statuses (QUEUED, CANCELED, SELLS_IN_PROGRESS, BUYS_IN_PROGRESS) are cancelable. If this endpoint is called after orders have been submitted, we'll attempt to cancel the orders. - [Get Run by ID](https://docs.alpaca.markets/in-giftcity/reference/get-v1-rebalancing-runs-run_id.md): Get a run by its ID. - [List All Subscriptions](https://docs.alpaca.markets/in-giftcity/reference/get-v1-rebalancing-subscriptions.md): Lists subscriptions - [Create Subscription](https://docs.alpaca.markets/in-giftcity/reference/post-v1-rebalancing-subscriptions.md): Creates a subscription between an account and a portfolio. - [Unsubscribe Account (Delete Subscription)](https://docs.alpaca.markets/in-giftcity/reference/delete-v1-rebalancing-subscriptions-subscription_id.md): Deletes the subscription which stops the rebalancing of an account. - [Get Subscription by ID](https://docs.alpaca.markets/in-giftcity/reference/get-v1-rebalancing-subscriptions-subscription_id.md): Get a subscription by its ID. - [Get Logo](https://docs.alpaca.markets/in-giftcity/reference/get-v1beta1-logos-symbol.md): Alpaca's Logo API serves uniform logo images for select stock and crypto symbols. Note: For Logo API pricing details, reach out to sales@alpaca.markets The API response will return the raw image as a binary - [Retrieve Aggregate Positions](https://docs.alpaca.markets/in-giftcity/reference/get-v1-reporting-eod-aggregate_positions.md): This API endpoint provides reporting data to partners for aggregate common stock and crypto positions across their account base. Partners can view historical snapshots of their holding across their entire account base. Please note that this API utilizes an 8:00 pm (EST) cutoff which aligns with the end of the Securities extended hours trading session as well as Alpaca's 24 hour Crypto trading window. Additionally, the endpoint supports indexing to help the partner efficiently filter by key information including date and symbol while being able to include or remove firm accounts. - [Retrieve EOD Cash Interest Details](https://docs.alpaca.markets/in-giftcity/reference/get-v1-get-eod-cash-interest-report.md): This API retrieves a list of cash interest details for the given date(s) for a single account or all accounts. End-of-day (EOD) details are typically accessible after 8:00pm Eastern Time (ET) and reflect that day's ending state across cash balances, accrued interest, accrued fees, as well as additional ancillary details. - [Retrieve EOD Positions](https://docs.alpaca.markets/in-giftcity/reference/get-v1-reporting-eod-positions.md): This API retrieves a comprehensive list of end-of-day positions for all accounts. End-of-day (EOD) positions are typically accessible after 4:00 am Eastern Time (ET) on the following day, providing a comprehensive view of the day's closing positions across all accounts. This API currently only supports retrieving EOD positions for the last trading date. - [Retrieve countries information](https://docs.alpaca.markets/in-giftcity/reference/querycountryinfos.md): The Country Info API serves country information for every supported countries including risk ratings and supported crypto states where applicable. - [Retrieve Excess Contributions](https://docs.alpaca.markets/in-giftcity/reference/listiraexcesscontritbutions.md): Returns all overcontributed IRA accounts - [List APR Tiers](https://docs.alpaca.markets/in-giftcity/reference/get-v1-list-apr-tiers.md): List all available APR tiers. These tiers may be assigned to an account, and will be used to determine the interest rate paid on uninvested cash balances. - [Read FPSL Loans Analytics for an Account](https://docs.alpaca.markets/in-giftcity/reference/get-v1-fpsl-analytics-account-loans.md): Returns aggregated FPSL interest and loan-activity counts for one account over a date range. Use this for "earned so far this month" customer UIs and for supervisory spot-checks against your internal accrual model. The `{account_id}` path parameter accepts a account UUID (aggregation for that account). - [List FPSL Loans](https://docs.alpaca.markets/in-giftcity/reference/get-v1-list-fpsl-loans.md): Returns a list of all FPSL loans that match the specified filter criteria, ordered in ascending order by `date`, `account_number`, and `symbol`. Each entry represents a loan of a `symbol` on a given `date`, made on behalf of the specified `account_number`. - [List FPSL Tiers](https://docs.alpaca.markets/in-giftcity/reference/get-v1-list-fpsl-tiers.md): List all available FPSL tiers. These tiers may be assigned to an account. - [List IPO Offerings](https://docs.alpaca.markets/in-giftcity/reference/listipoofferings.md): Returns a paginated list of IPO offerings currently known to Alpaca. Use this endpoint to power IPO discovery surfaces (e.g. an "Upcoming IPOs" list). Real-time lifecycle changes (availability, prospectus, 60-minute mail, allocations, cancellations) are pushed over the [IPO Events Stream](#operation/subscribeToIPOEventsSSE). - [Retrieve an IPO Offering](https://docs.alpaca.markets/in-giftcity/reference/getipooffering.md): Returns a single IPO offering by `offering_reference`. The `offering_reference` value matches the one delivered on the [IPO Events Stream](#operation/subscribeToIPOEventsSSE). - [Issue tokens](https://docs.alpaca.markets/in-giftcity/reference/issuetokens.md): Issue access tokens using various grant types: - `client_credentials`: Exchange client credentials for an access token - `urn:ietf:params:oauth:grant-type:jwt-bearer`: Exchange JWT assertion (Keycloak for brokerdash or Google for admin) - `refresh_token`: Refresh an admin access token using a refresh token - [Historical auctions (single)](https://docs.alpaca.markets/in-giftcity/reference/stockauctionsingle.md): The historical auctions endpoint provides auction prices for the given stock symbol between the specified dates. - [Historical bars (single symbol)](https://docs.alpaca.markets/in-giftcity/reference/stockbarsingle.md): The historical stock bars API provides aggregates for the stock symbol between the specified dates. - [Latest bar (single symbol)](https://docs.alpaca.markets/in-giftcity/reference/stocklatestbarsingle.md): The latest bar endpoint returns the latest minute bar for the given ticker symbol. - [Historical quotes (single symbol)](https://docs.alpaca.markets/in-giftcity/reference/stockquotesingle.md): The historical stock quotes API provides quote data for a stock symbol between the specified dates. - [Latest quote (single symbol)](https://docs.alpaca.markets/in-giftcity/reference/stocklatestquotesingle.md): The latest quote endpoint provides the latest best bid and ask prices for a given ticker symbol. - [Snapshot (single symbol)](https://docs.alpaca.markets/in-giftcity/reference/stocksnapshotsingle.md): The snapshot endpoint provides the latest trade, latest quote, minute bar, daily bar, and previous daily bar data for a given ticker symbol. - [Historical trades (single symbol)](https://docs.alpaca.markets/in-giftcity/reference/stocktradesingle.md): The historical stock trades API provides trade data for a stock symbol between the specified dates. - [Latest trade (single symbol)](https://docs.alpaca.markets/in-giftcity/reference/stocklatesttradesingle.md): The latest trade endpoint provides the latest trade for the given ticker symbol. Trades with any conditions that causes them to not update the bar price are excluded. For example a trade with condition `I` (odd lot) will never appear on this endpoint. You can find the complete list of excluded conditions in [this FAQ](https://docs.alpaca.markets/docs/market-data-faq#how-are-bars-aggregated). - [Historical auctions](https://docs.alpaca.markets/in-giftcity/reference/stockauctions.md): The historical auctions endpoint provides auction prices for a list of stock symbols between the specified dates. - [Historical bars](https://docs.alpaca.markets/in-giftcity/reference/stockbars.md): The historical stock bars API provides aggregates for a list of stock symbols between the specified dates. The returned results are sorted by symbol first, then by bar timestamp. This means that you are likely to see only one symbol in your first response if there are enough bars for that symbol to hit the limit you requested. In these situations, if you keep requesting again with the `next_page_token` from the previous response, you will eventually reach the other symbols if any bars were found for them. - [Latest bars](https://docs.alpaca.markets/in-giftcity/reference/stocklatestbars.md): The latest bars endpoint provides the latest minute bar for the given ticker symbols. - [Condition codes](https://docs.alpaca.markets/in-giftcity/reference/stockmetaconditions.md): Returns the mapping between the condition codes and names. - [Exchange codes](https://docs.alpaca.markets/in-giftcity/reference/stockmetaexchanges.md): Returns the mapping between the stock exchange codes and the corresponding exchange names. - [Historical quotes](https://docs.alpaca.markets/in-giftcity/reference/stockquotes.md): The historical stock quotes API provides quote data for a list of stock symbols between the specified dates. The returned results are sorted by symbol first, then by the quote timestamp. This means that you are likely to see only one symbol in your first response if there are enough quotes for that symbol to hit the limit you requested. In these situations, if you keep requesting again with the `next_page_token` from the previous response, you will eventually reach the other symbols if any quotes were found for them. - [Latest quotes](https://docs.alpaca.markets/in-giftcity/reference/stocklatestquotes.md): The latest quotes endpoint provides the latest best bid and ask prices for the given ticker symbols. - [Snapshots](https://docs.alpaca.markets/in-giftcity/reference/stocksnapshots.md): The snapshot endpoint for multiple tickers provides the latest trade, latest quote, minute bar, daily bar, and previous daily bar data for each given ticker symbol. - [Historical trades](https://docs.alpaca.markets/in-giftcity/reference/stocktrades.md): The historical stock trades API provides trade data for a list of stock symbols between the specified dates. The returned results are sorted by symbol first then by trade timestamp. This means that you are likely to see only one symbol in your first response if there are enough trades for that symbol to hit the limit you requested. In these situations, if you keep requesting again with the `next_page_token` from the previous response, you will eventually reach the other symbols if any trades were found for them. - [Latest trades](https://docs.alpaca.markets/in-giftcity/reference/stocklatesttrades.md): The latest trades endpoint provides the latest trades for the given ticker symbols. Trades with any conditions that causes them to not update the bar price are excluded. For example a trade with condition `I` (odd lot) will never appear on this endpoint. You can find the complete list of excluded conditions in [this FAQ](https://docs.alpaca.markets/docs/market-data-faq#how-are-bars-aggregated). - [Latest prices](https://docs.alpaca.markets/in-giftcity/reference/fixedincomelatestprices.md): This endpoint returns the latest prices for the given fixed income securities. - [Latest quotes](https://docs.alpaca.markets/in-giftcity/reference/fixedincomelatestquotes.md): This endpoint returns the latest quotes for the given fixed income securities. - [Logos](https://docs.alpaca.markets/in-giftcity/reference/logos-2.md): Get the image of the company logo for the given symbol. - [Top market movers](https://docs.alpaca.markets/in-giftcity/reference/movers.md): Returns the top market movers (gainers and losers) based on real time SIP data. The change for each symbol is calculated from the previous closing price and the latest closing price. For stocks, the endpoint resets at market open. Until then, it shows the previous market day's movers. The data is split-adjusted. Only tradable symbols in exchanges are included. For crypto, the endpoint resets at midnight. - [Most active stocks](https://docs.alpaca.markets/in-giftcity/reference/mostactives.md): Returns the most active stocks by volume or trade count based on real time SIP data. By default, returns the top 10 symbols by volume. - [News articles](https://docs.alpaca.markets/in-giftcity/reference/news-1.md): Returns the latest news articles across stocks and crypto. By default, returns the latest 10 news articles. - [Corporate actions](https://docs.alpaca.markets/in-giftcity/reference/corporateactions.md): This endpoint provides data about the corporate actions for each given symbol over a specified time period. By default (`data_quality=complete`), corporate actions that are still incomplete (for example, missing required fields such as ex-date or CUSIP/ISIN) and have not yet been processed are excluded from the response. Pass `data_quality=all` to also receive those early, incomplete records. Already-processed corporate actions are always returned when `data_quality=complete`, even if they would otherwise be considered incomplete. > ⚠️ Warning > > Currently Alpaca has no guarantees on the creation time of corporate actions. There may be delays in receiving corporate actions from our data providers, and there may be delays in processing and making them available via this API. As a result, corporate actions may not be available immediately after they are announced. - [Subscribe to Corporate Actions Events (SSE)](https://docs.alpaca.markets/in-giftcity/reference/subscribetocorporateactionseventssse.md): Server-Sent Events (SSE) stream that delivers every corporate-action mutation (`insert` / `update` / `delete`) across all 15 CA types on a single long-lived `text/event-stream` connection. When `since`, `since_id`, or the `Last-Event-Id` reconnect header is provided, historical events are replayed first; otherwise only live events are pushed. Each event carries an `event_type` discriminator that selects the shape of the `ca` payload -- see the [`corporate_action_event`](#/components/schemas/corporate_action_event) schema for the mapping to each per-type schema. The same underlying data is available on demand via [`GET /v1/corporate-actions`](#operation/CorporateActions). ## Changelog - [Schema examples migrated to standard OpenAPI examples](https://docs.alpaca.markets/in-giftcity/changelog/2026-08-17-examples-b21c8a8.md) - [New "ROC" (Return of Capital) dividend activity sub-type](https://docs.alpaca.markets/in-giftcity/changelog/2026-08-12-roc-42b472e.md) - [New "reason" field on Broker trade events](https://docs.alpaca.markets/in-giftcity/changelog/2026-08-12-reason-e11b7f1.md) - [JIT settlement supports up to 150,000 accounts](https://docs.alpaca.markets/in-giftcity/changelog/2026-08-10-jit-settlement-a5b9174.md) - [New Fixed Income latest prices and quotes endpoints](https://docs.alpaca.markets/in-giftcity/changelog/2026-08-07-fixed-income-78ccc44.md) - [New REO (Reorganization) activity type](https://docs.alpaca.markets/in-giftcity/changelog/2026-08-07-reo-954a46c.md) - [Broker API description upgraded to OpenAPI 3.1.2](https://docs.alpaca.markets/in-giftcity/changelog/2026-08-05-openapi-3-1-f0dd393.md) - ["since_id" and "until_id" on v1 SSE event streams are deprecated](https://docs.alpaca.markets/in-giftcity/changelog/2026-08-05-sse-event-ids-0e97877.md) - [JIT limits response schema corrected to match the API](https://docs.alpaca.markets/in-giftcity/changelog/2026-08-05-jit-limits-a08cc9c.md) - [New fields on the batch journal request schema](https://docs.alpaca.markets/in-giftcity/changelog/2026-08-05-batch-journal-e3d1ec7.md) # Alpaca EU Documentation > Alpaca offers simple, modern API-first solutions to get market data, trade stocks and crypto, build apps and more. ## Guides - [Welcome](https://docs.alpaca.markets/eu/docs/getting-started.md): Please note that this documentation is currently in its Beta version and is subject to change. - [About Alpaca](https://docs.alpaca.markets/eu/docs/about-alpaca.md) - [Alpaca API Platform](https://docs.alpaca.markets/eu/docs/alpaca-api-platform.md) - [About Broker API](https://docs.alpaca.markets/eu/docs/about-broker-api.md) - [Getting Started with Broker API](https://docs.alpaca.markets/eu/docs/getting-started-with-broker-api.md): This guide is going to help you set everything up in a sandbox environment to get you up and running with Broker API. - [Integration Setup with Alpaca](https://docs.alpaca.markets/eu/docs/integration-setup-with-alpaca.md): If you are coming to Alpaca for the first time to build something using Broker API, please sign up for the dashboard. In this dashboard, you can acquire your API key for the sandbox environment and gain access to the test data immediately. - [Broker API FAQs](https://docs.alpaca.markets/eu/docs/broker-api-faq.md): Frequently Asked Questions - [Mandatory Corporate Actions](https://docs.alpaca.markets/eu/docs/mandatory-corporate-actions.md): Frequently Asked Mandatory Corporate Action Questions - [Customer Account Opening](https://docs.alpaca.markets/eu/docs/account-opening.md) - [Accounts Statuses](https://docs.alpaca.markets/eu/docs/accounts-statuses.md) - [European Accounts](https://docs.alpaca.markets/eu/docs/international-accounts.md) - [Data Validations](https://docs.alpaca.markets/eu/docs/data-validations.md) - [Funding Accounts](https://docs.alpaca.markets/eu/docs/funding-accounts.md): The funding process can vary depending on your setup and region and we support many cases, but everyone can do the same in the sandbox environment. - [Direct Funding](https://docs.alpaca.markets/eu/docs/direct-funding.md) - [SSE Events](https://docs.alpaca.markets/eu/docs/sse-events.md) - [Activities](https://docs.alpaca.markets/eu/docs/activities.md): Integration Guide & Migration Playbook - [Daily Processes and Reconcilations](https://docs.alpaca.markets/eu/docs/daily-processes-and-reconcilations.md) - [Banking Holidays](https://docs.alpaca.markets/eu/docs/holiday-funding-processes.md): This section addresses operational procedures for scenarios where the bank is closed for a holiday, but the stock market remains open for trading (e.g., Columbus Day, Veterans Day). - [Statements and Confirms](https://docs.alpaca.markets/eu/docs/statements-and-confirms.md) - [Rate Limits](https://docs.alpaca.markets/eu/docs/broker-api-rate-limits.md) ## API Reference - [Get All Accounts](https://docs.alpaca.markets/eu/reference/getallaccounts.md): Retrieves the first 1000 accounts that match the query parameters. Sorting is based on creation time. The created_after/created_before query parameters can be used to paginate the results. To further limit the size of the response, the entities query parameter can be used to specify which properties are included in the response. - [Create an Account](https://docs.alpaca.markets/eu/reference/createaccount.md): Submit an account application with KYC information. This will create a trading account for the end user. The account status may or may not be ACTIVE immediately and you will receive account status updates on the event API. **Multi-Live Accounts (MLA)**: To open an additional account for an existing account holder, supply `primary_account_holder_id` at the top level instead of `contact`/`identity` data. In that case, supplying `contact` or `identity` returns HTTP 400. Only `account_type` of `trading` and `ira` are supported via this flow. - [Get An Account by ID](https://docs.alpaca.markets/eu/reference/getaccount.md): You can query a specific account that you submitted to Alpaca by passing into the query the account_id associated with the account you're retrieving. - [Update an Account](https://docs.alpaca.markets/eu/reference/patchaccount.md): This operation updates account information. If all parameters are valid and updates have been made, it returns with status code 200. The response is the account model. **Multi-Live Accounts (MLA)**: The `primary_account_holder_id` field is read-only after the account is created. Omitting it or supplying the value already associated with the account is a no-op; supplying a different value returns HTTP 400. - [Close an Account](https://docs.alpaca.markets/eu/reference/post-v1-accounts-account_id-actions-close.md): This operation closes an active account. The underlying records and information of the account are not deleted by this operation. **Before closing an account, you are responsible for closing all the positions and withdrawing all the money associated with that account. Learn more in the Positions Documentation.** - [Retrieve Account Activities](https://docs.alpaca.markets/eu/reference/getaccountactivities.md): Returns a list of activities Notes: * Pagination is handled using the `page_token` and `page_size` parameters. * `page_token` represents the ID of the last item on your current page of results. For example, if the ID of the last activity in your first response is `20220203000000000::045b3b8d-c566-4bef-b741-2bf598dd6ae7`, you would pass that value as `page_token` to retrieve the next page of results. * If specified with a `direction` of `desc`, for example, the results will end before the activity with the specified ID. * If specified with a `direction` of `asc`, results will begin with the activity immediately after the one specified. * `page_size` is the maximum number of entries to return in the response. * If `date` is not specified, the default and maximum value is 100. * If `date` is specified, the default behavior is to return all results, and there is no maximum page size. - [Retrieve Account Activities of Specific Type](https://docs.alpaca.markets/eu/reference/getaccountactivitiesbytype.md): Retrieves an array of Activity by type. If {activity_type} is provided as part of the URL, category cannot be provided as query parameter. They are mutually exclusive. Notes: * Pagination is handled using the `page_token` and `page_size` parameters. * `page_token` represents the ID of the end of your current page of results. for example if in your first response the id of the last Activiy item returned in the array was `20220203000000000::045b3b8d-c566-4bef-b741-2bf598dd6ae7`, you'd pass that value as `page_token` to get the next page of results * If specified with a `direction` of `desc`, for example, the results will end before the activity with the specified ID. * If specified with a `direction` of `asc`, results will begin with the activity immediately after the one specified. * `page_size` is the maximum number of entries to return in the response. * If `date` is not specified, the default and maximum value is 100. * If `date` is specified, the default behavior is to return all results, and there is no maximum page size. - [Retrieve Trading Details for an Account](https://docs.alpaca.markets/eu/reference/gettradingaccount.md): As a broker you can view more trading details about your users. The response is a Trading Account model. - [Get a single activity (V2) event by event_id ULID.](https://docs.alpaca.markets/eu/reference/getaccountactivityevent.md): Returns a single account activity (V2) event for the specified account by ULID `event_id`, delivered as a server-sent event message. This is the single-event counterpart to the `subscribeToActivitiesSSE` streaming endpoint, intended for re-fetching an individual activity that was previously observed on the activities stream. - [Retrieve a List of Account Documents](https://docs.alpaca.markets/eu/reference/getdocsforaccount.md): This endpoint allows you to query all the account document based on an account ID. You can filter by date, or type of document. These account documents are tax statements, trade confirmations, etc, generated by the Alpaca system. They are distinct from the owner documents you upload and later access via the account object's documents property. - [Download an Account Document](https://docs.alpaca.markets/eu/reference/downloaddocfromaccount.md): This endpoint downloads an account document based on the document ID. The document will be in PDF format. The operation returns a pre-signed downloadable link as a redirect with HTTP status code 301 if one is found. You can retrieve a JSON version of a monthly statement by passing in the header accept: application/json header. These account documents are tax statements, trade confirmations, etc, generated by the Alpaca system. They are distinct from the owner documents you upload and later access via the account object's documents property. - [Upload Owner Documents for an Existing Account](https://docs.alpaca.markets/eu/reference/uploaddoctoaccount.md): Upload documents for the primary account owner of an account. Documents are binary objects whose contents are encoded in base64. Each encoded content size is limited to 10MB if you use Alpaca for KYCaaS. If you perform your own KYC there are no document size limitations. As a convenience, documents of type w8ben may be uploaded as a JSON object using the content_data request property. The Alpaca system will then generate a formatted W-8 BEN document for subsequent downloads. Note that these owner documents are distinct from the account documents generated by Alpaca, such as tax statements and trade confirmations. - [Download the W8BEN document for the primary owner of an account](https://docs.alpaca.markets/eu/reference/get-v1-accounts-account_id-documents-w8ben-document_id-download.md): This endpoint allows you to download a W-8 BEN document for the primary owner of an account based on the document_id passed as a path parameter. The returned document is in PDF format. For certain individuals, a W-8 BEN form should be submitted at onboarding. If the individual is not a registered U.S. taxpayer (not subject to a W-9), the W-8 BEN form may need to be submitted. The IRS explains which individuals this applies to and provides instructions on completing the form. Every three years, in addition to the calendar year it was signed, a new W-8 BEN form must be submitted. The form can be submitted in JSON, JSONC, PNG, JPEG or PDF. If submitting it in JSON, please see the W-8 BEN completed with the corresponding field names for the API here. Note: The dates collected on the form are in a slightly different format than how they need to be submitted via Accounts API. It is requested by the user on the form in MM-DD-YYYY, but should be submitted as YYYY-MM-DD. - [Cancel all Open Orders For an Account](https://docs.alpaca.markets/eu/reference/deleteallordersforaccount.md): Attempts to cancel all open orders. A response will be provided for each order that is attempted to be cancelled. - [Retrieve a List of Orders](https://docs.alpaca.markets/eu/reference/getallordersforaccount.md): Retrieves a list of orders for the account, filtered by the supplied query parameters. Endpoint defaults to open orders if no parameters are provided. - [Create an Order for an Account](https://docs.alpaca.markets/eu/reference/createorderforaccount.md): Creating an order for your end customer. Each trading request must pass in the account_id in the URL. - Note that when submitting crypto orders, `market`, `limit` and `stop_limit` orders are supported while the supported `time_in_force` values are `gtc`, and `ioc`. - For equities and crypto we accept fractional orders as well with either `notional` or `qty` provided. - Note that submitting an options order is only available for partners who have been enabled for Options BETA. - In case of Fixed Income, only `market` and `limit` order types with `day` `time_in_force` are supported, and order replacement is not supported. Note that submitting Fixed Income orders is only available for partners who have been enabled for Fixed Income. - Note that submitting DMA orders (using `advanced_instructions` with `algorithm: DMA`) is only available for partners/correspondents who have been enabled for DMA. - For IPO indications of interest (`asset_class: "ipo"`), the `symbol` is the offering reference returned by [`GET /v1/ipos`](#operation/listIPOOfferings) (e.g. `FI111225`). IPO orders are notional-only (`notional` required, `qty` must be omitted), buy-side, `market` type, and `gtc` time_in_force. Indications of interest can be replaced or canceled while the offering is open via [`PATCH /v1/trading/accounts/{account_id}/orders/{order_id}`](#operation/replaceOrderForAccount) and [`DELETE /v1/trading/accounts/{account_id}/orders/{order_id}`](#operation/deleteOrderForAccount). - [Cancel an Open Order](https://docs.alpaca.markets/eu/reference/deleteorderforaccount.md): Attempts to cancel an open order. If the order is no longer cancelable (for example if the status is "filled"), the server will respond with status 422, and reject the request. Upon acceptance of the cancel request, it returns status 204. - [Retrieve an Order by its ID](https://docs.alpaca.markets/eu/reference/getorderforaccount.md): Retrieves a single order for the given order_id. - [Replace an Order](https://docs.alpaca.markets/eu/reference/replaceorderforaccount.md): Replaces a single order with updated parameters. Each parameter overrides the corresponding attribute of the existing order. The other attributes remain the same as the existing order. A success return code from a replaced order does NOT guarantee the existing open order has been replaced. If the existing open order is filled before the replacing (new) order reaches the execution venue, the replacing (new) order is rejected, and these events are sent in the trade_updates stream channel found [here](https://docs.alpaca.markets/eu/reference/subscribetotradev2sse). While an order is being replaced, the account's buying power is reduced by the larger of the two orders that have been placed (the old order being replaced, and the newly placed order to replace it). If you are replacing a buy entry order with a higher limit price than the original order, the buying power is calculated based on the newly placed order. If you are replacing it with a lower limit price, the buying power is calculated based on the old order. Note: Order cannot be replaced when the status is `accepted`, `pending_new`, `pending_cancel` or `pending_replace`. Note: Notional orders for non-IPO asset classes cannot be replaced. Any attempt to modify a non-IPO notional order via this endpoint will be rejected; cancel it and submit a new one instead. Note: IPO indications of interest (`asset_class: "ipo"`) **are** notional and **can** be replaced via this endpoint by providing a new `notional` value. `qty` and `notional` are mutually exclusive on a single replace request. Note that submitting DMA orders (using `advanced_instructions` with `algorithm: DMA`) is only available for partners/correspondents who have been enabled for DMA. - [Retrieves a single order specified by the client order ID.](https://docs.alpaca.markets/eu/reference/getorderbyclientorderidforaccount.md): Retrieves a single order specified by the client order ID. - [Close All Positions for an Account](https://docs.alpaca.markets/eu/reference/closeallpositionsforaccount.md): Closes (liquidates) all of the account's open long and short positions. A response will be provided for each order that is attempted to be cancelled. If an order is no longer cancelable, the server will respond with status 500 and reject the request. - [List Open Positions for an Account](https://docs.alpaca.markets/eu/reference/getpositionsforaccount.md): List open positions for an account - [Close a Position for an Account](https://docs.alpaca.markets/eu/reference/closepositionforaccountbysymbol.md): Closes (liquidates) the account's open position for the given symbol. Works for both long and short positions. - [Get an Open Position for account by Symbol or AssetId](https://docs.alpaca.markets/eu/reference/getpositionsforaccountbysymbol.md): Retrieves the account's open position for the given symbol or asset_id. - [Get Global Assets](https://docs.alpaca.markets/eu/reference/getglobalassets.md): Serves the list of global assets available at Alpaca, including international exchanges. **Note:** This endpoint is currently served under `/v2beta1/`. The path may change when it moves to general availability. - [Get a Global Asset by ID or Symbol](https://docs.alpaca.markets/eu/reference/getglobalassetbysymbolorid.md): Serves a single global asset available at Alpaca, looked up by its symbol or asset ID. **Note:** This endpoint is currently served under `/v2beta1/`. The path may change when it moves to general availability. - [Get Market Calendar](https://docs.alpaca.markets/eu/reference/calendar-1.md): This endpoint returns the market calendar. - [Get Market Clock](https://docs.alpaca.markets/eu/reference/clock.md): This API serves information about multiple markets: the current time, if it's a market day, the current phase of the market, etc. - [Subscribe to Account Status Events (SSE)](https://docs.alpaca.markets/eu/reference/suscribetoaccountstatussse.md): The accounts events API provides streaming of account changes as they occur, via SSE (server sent events). Past events can also be queried. Events are generated for changes to the following account properties: - account_blocked - admin_configurations - cash_interest - crypto_status - kyc_results - options - status - trading_blocked Only the changed properties are included in the event payload. Query Parameter Rules: - `since_id` and `until_id` are deprecated and available only to select broker partners; use `since_ulid` and `until_ulid` instead - `since` is required if `until` specified - `since_id` is required if `until_id` specified - `since_ulid` is required if `until_ulid` specified - `since`, `since_id` and `since_ulid` can't be used at the same time Behavior: This API supports querying a range of events, starting now or in the past. If the end of the range is in the future or not specified, the connection is kept open and future events are pushed. To be specific: - if `since`, `since_id` or `since_ulid` is not specified, this will not return any historic data - if `until`, `until_id` or `until_ulid` is reached, the stream will end with a status of 200 --- Note for people using the clients generated from this OAS spec. Currently OAS-3 doesn't have full support for representing SSE style responses from an API, so if you are using a generated client and don't specify a `since` and `until` there is a good chance the generated clients will hang waiting for the response to end. If you require the streaming capabilities we recommend not using the generated clients for this specific usecase until the OAS-3 standards come to a consensus on how to represent this correctly in OAS-3. - [Subscribe to Admin Action Events (SSE)](https://docs.alpaca.markets/eu/reference/subscribetoadminactionsse.md): The Events API provides event push as well as historical queries via SSE (server sent events). This endpoint streams events related to administrative actions performed by our systems. Historical events are streamed immediately if queried, and updates are pushed as events occur. Query Params Rules: - `since` required if `until` specified - `since_id` required if `until_id` specified - `since` and `since_id` can't be used at the same time Behavior: - if `since` or `since_id` not specified this will not return any historic data - if `until` or `until_id` reached stream will end (status 200) --- Warning: Currently OAS-3 doesn't have full support for representing SSE style responses from an API. In case the client code is generated from this OAS spec, don't specify a `since` and `until` there is a good chance the generated clients will hang forever waiting for the response to end. If you require the streaming capabilities we recommend not using the generated clients for this specific endpoint until the OAS-3 standards come to a consensus on how to represent this behavior in OAS-3. --- ### Comment messages According to the SSE specification, any line that starts with a colon is a comment which does not contain data. It is typically a free text that does not follow any data schema. A few examples mentioned below for comment messages. ##### Slow client The server sends a comment when the client is not consuming messages fast enough. Example: `: you are reading too slowly, dropped 10000 messages` ##### Internal server error An error message is sent as a comment when the server closes the connection on an internal server error (only sent by the v2 and v2beta1 endpoints). Example: `: internal server error` --- **Event Types** - **LegacyNote:** Old free text based admin notes - **Liquidation:** Event for a position liquidation which initialized by an admin - **TransactionCancel:** Event for a manually cancelled transaction - [Subscribe to Funding Status Events (SSE)](https://docs.alpaca.markets/eu/reference/subscribetofundingstatussse.md): The Events API provides event push as well as historical queries via SSE (server sent events). You can listen to funding status updates as they get processed by our backoffice, for both end-user and firm accounts. Historical events are streamed immediately if queried, and updates are pushed as events occur. Query Params Rules: - `since` required if `until` specified - `since_id` required if `until_id` specified - `since` and `since_id` can't be used at the same time - `until` and `until_id` can't be used at the same time Behavior: - if `since` or `since_id` not specified this will not return any historic data - if `until` or `until_id` reached stream will end (status 200) --- Note for people using the clients generated from this OAS spec. Currently OAS-3 doesn't have full support for representing SSE style responses from an API, so if you are using a generated client and don't specify a `since` and `until` there is a good chance the generated clients will hang waiting for the response to end. If you require the streaming capabilities we recommend not using the generated clients for this specific usecase until the OAS-3 standards come to a consensus on how to represent this correctly in OAS-3. - [Subscribe to System Events (SSE)](https://docs.alpaca.markets/eu/reference/subscribetosystemeventv2sse.md): The Events API provides event push as well as historical queries via SSE (server sent events). You can listen to system event updates as they happen in our backend. Historical events are streamed immediately if queried, and updates are pushed as events occur. Query Params Rules: - `since` required if `until` specified - `since_id` required if `until_id` specified - `since` and `since_id` can't be used at the same time - `until` and `until_id` can't be used at the same time Behavior: - if `since` or `since_id` not specified this will not return any historic data - if `until` or `until_id` reached stream will end (status 200) --- Note for people using the clients generated from this OAS spec. Currently OAS-3 doesn't have full support for representing SSE style responses from an API, so if you are using a generated client and don't specify a `since` and `until` there is a good chance the generated clients will hang waiting for the response to end. If you require the streaming capabilities we recommend not using the generated clients for this specific usecase until the OAS-3 standards come to a consensus on how to represent this correctly in OAS-3. - [Subscribe to Trade Events (SSE)](https://docs.alpaca.markets/eu/reference/subscribetotradev2sse.md): The Events API provides event push as well as historical queries via SSE (server sent events). You can listen to events related to trade updates. Most market trades sent during market hours are filled instantly; you can listen to limit order updates through this endpoint. Historical events are streamed immediately if queried, and updates are pushed as events occur. Query Params Rules: - `since` required if `until` specified - `since_id` required if `until_id` specified - `since` and `since_id` can't be used at the same time Behavior: - if `since` or `since_id` not specified this will not return any historic data - if `until` or `until_id` reached stream will end (status 200) --- Note for people using the clients generated from this OAS spec. Currently OAS-3 doesn't have full support for representing SSE style responses from an API, so if you are using a generated client and don't specify a `since` and `until` there is a good chance the generated clients will hang waiting for the response to end. If you require the streaming capabilities we recommend not using the generated clients for this specific usecase until the OAS-3 standards come to a consensus on how to represent this correctly in OAS-3. --- **Legacy trade events API deprecation** The legacy v1 trade events endpoint has been fully deprecated and is no longer available. Use `/v2/events/trades` for all trade event integrations. --- ### Comment messages According to the SSE specification, any line that starts with a colon is a comment which does not contain data. It is typically a free text that does not follow any data schema. A few examples mentioned below for comment messages. ##### Slow client The server sends a comment when the client is not consuming messages fast enough. Example: `: you are reading too slowly, dropped 10000 messages` ##### Internal server error An error message is sent as a comment when the server closes the connection on an internal server error (only sent by the v2 and v2beta1 endpoints). Example: `: internal server error` --- **Common events** These are the events that are the expected results of actions you may have taken by sending API requests. The meaning of the timestamp field changes for each type; the meanings have been specified here for which types the timestamp field will be present. - `accepted` Sent when an order is received and accepted by Alpaca - `pending_new` Sent when the order has been received by Alpaca and routed to the exchanges, but has not yet been accepted for execution. - `new` Sent when an order has been routed to exchanges for execution. - `fill` Sent when your order has been completely filled. - timestamp: The time at which the order was filled. - `partial_fill` Sent when a number of shares less than the total remaining quantity on your order has been filled. - timestamp: The time at which the shares were filled. - `canceled` Sent when your requested cancellation of an order is processed. - timestamp: The time at which the order was canceled. - `expired` Sent when an order has reached the end of its lifespan, as determined by the order's time in force value. - timestamp: The time at which the order expired. - `done_for_day` Sent when the order is done executing for the day, and will not receive further updates until the next trading day. - `replaced` Sent when your requested replacement of an order is processed. - timestamp: The time at which the order was replaced. **Rarer events** These are events that may rarely be sent due to unexpected circumstances on the exchanges. It is unlikely you will need to design your code around them, but you may still wish to account for the possibility that they will occur. - `rejected` Sent when your order has been rejected. - timestamp: The time at which the rejection occurred. - `held` For multi-leg orders, the secondary orders (stop loss, take profit) will enter this state while waiting to be triggered. - `stopped` Sent when your order has been stopped, and a trade is guaranteed for the order, usually at a stated price or better, but has not yet occurred. - `pending_cancel` Sent when the order is awaiting cancellation. Most cancellations will occur without the order entering this state. - `pending_replace` Sent when the order is awaiting replacement. - `calculated` Sent when the order has been completed for the day - it is either filled or done_for_day - but remaining settlement calculations are still pending. - `suspended` Sent when the order has been suspended and is not eligible for trading. - `order_replace_rejected` Sent when the order replace has been rejected. - `order_cancel_rejected` Sent when the order cancel has been rejected. - `trade_bust`: Sent when a previously reported execution has been canceled ("busted") by the upstream exchange. - `trade_correct`: Sent when a previously reported trade has been corrected. For example, the exchange may have updated the price, quantity, or another execution parameter after the trade was initially reported. - `restated`: Sent when the order is manually modified. - [Subscribe to Activity Events (SSE)](https://docs.alpaca.markets/eu/reference/subscribetoactivitiessse.md): The Events API sends the real-time events and provides historical queries with SSE (Server Sent Events). This endpoint streams events on account activities. Historical events are streamed immediately if queried, and updates are pushed as events occur. Query parameter rules: - If `until` is specified, `since` is required. - If `until_id` is specified, `since_id` is required. - You cannot use `since` and `since_id` together. Behavior: - If `since` or `since_id` is not specified, this will not return any historic data. - If `until` or `until_id` is specified, stream will end at the specified point with status 200. --- Warning: Currently, OAS-3 does not fully support responses from an SSE API. In case the client code is generated from this OAS spec, please do not specify `since` and `until`, as the generated client may hang forever waiting for the response to end. If you require the streaming capabilities, we recommend not using the generated clients for this specific endpoint until the OAS-3 standards define how to represent this behavior. --- ### Comment messages According to the SSE specification, any line that starts with a colon is a comment which does not contain data. It is typically a free text that does not follow any data schema. A few examples mentioned below for comment messages. ##### Slow client The server sends a comment when the client is not consuming messages fast enough. Example: `: you are reading too slowly, dropped 10000 messages` ##### Internal server error An error message is sent as a comment when the server closes the connection on an internal server error (only sent by the v2 and v2beta1 endpoints). Example: `: internal server error` --- - [Retrieve Bank Relationships for an Account](https://docs.alpaca.markets/eu/reference/getrecipientbanks.md): Retrieves Bank Relationships for an account - [Create a Bank Relationship for an Account](https://docs.alpaca.markets/eu/reference/createrecipientbank.md): If successful, retrieves Bank Relationships for an account - [Delete a Bank Relationship for an Account](https://docs.alpaca.markets/eu/reference/deleterecipientbank.md): If successful, deletes Bank Relationship for an account - [Retrieve List of Transfers for an Account.](https://docs.alpaca.markets/eu/reference/gettransfersforaccount.md): You can query a list of transfers for an account. You can filter requested transfers by values such as direction and status. Returns a list of transfer entities ordered by created_at - [Request a New Transfer](https://docs.alpaca.markets/eu/reference/createtransferforaccount.md): This endpoint is used only for requesting an outgoing (withdrawal) wire transfer at this moment. For the wire transfer, you need to create a bank resource first using the Bank API. For more on how to fund an account in sandbox see the Transfer simulation API. - [Request to Close a Transfer](https://docs.alpaca.markets/eu/reference/deletetransfer.md): Request to close a transfer - [Simulate an Incoming Wire Transfer](https://docs.alpaca.markets/eu/reference/createincomingwire.md): Simulate an inbound wire transfer arriving at a customer account. This endpoint is **only available in the Sandbox environment** and exists so you can fund an account end-to-end without involving a real counterparty bank. In production, incoming wires originate at the sending bank and cannot be created via the API. The `wire_instructions` field must follow the FFC (For Further Credit) format `FFC -`, where `` is your 4-character correspondent code and `` is the customer's brokerage account number. - [Retrieve CIP information](https://docs.alpaca.markets/eu/reference/get-v1-accounts-account_id-cip.md): You can retrieve the CIP information you've submitted for a given account. - [Upload CIP information](https://docs.alpaca.markets/eu/reference/post-v1-accounts-account_id-cip.md): The customer identification program (CIP) API allows you to submit the CIP results received from your KYC provider. The minimum requirements to open an individual financial account are delimited and you must verify the true identity of the account holder at account opening: Name Date of birth Address Identification number (for a U.S. citizen, a taxpayer identification number) - [Retrieve Aggregate Positions](https://docs.alpaca.markets/eu/reference/get-v1-reporting-eod-aggregate_positions.md): This API endpoint provides reporting data to partners for aggregate common stock and crypto positions across their account base. Partners can view historical snapshots of their holding across their entire account base. Please note that this API utilizes an 8:00 pm (EST) cutoff which aligns with the end of the Securities extended hours trading session as well as Alpaca's 24 hour Crypto trading window. Additionally, the endpoint supports indexing to help the partner efficiently filter by key information including date and symbol while being able to include or remove firm accounts. - [Retrieve EOD Positions](https://docs.alpaca.markets/eu/reference/get-v1-reporting-eod-positions.md): This API retrieves a comprehensive list of end-of-day positions for all accounts. End-of-day (EOD) positions are typically accessible after 4:00 am Eastern Time (ET) on the following day, providing a comprehensive view of the day's closing positions across all accounts. This API currently only supports retrieving EOD positions for the last trading date. - [Issue tokens](https://docs.alpaca.markets/eu/reference/issuetokens.md): Issue access tokens using various grant types: - `client_credentials`: Exchange client credentials for an access token - `urn:ietf:params:oauth:grant-type:jwt-bearer`: Exchange JWT assertion (Keycloak for brokerdash or Google for admin) - `refresh_token`: Refresh an admin access token using a refresh token - [Subscribe to Corporate Actions Events (SSE)](https://docs.alpaca.markets/eu/reference/subscribetocorporateactionseventssse.md): Server-Sent Events (SSE) stream that delivers every corporate-action mutation (`insert` / `update` / `delete`) across all 15 CA types on a single long-lived `text/event-stream` connection. When `since`, `since_id`, or the `Last-Event-Id` reconnect header is provided, historical events are replayed first; otherwise only live events are pushed. Each event carries an `event_type` discriminator that selects the shape of the `ca` payload -- see the [`corporate_action_event`](#/components/schemas/corporate_action_event) schema for the mapping to each per-type schema. The same underlying data is available on demand via [`GET /v1/corporate-actions`](#operation/CorporateActions). - [Corporate actions](https://docs.alpaca.markets/eu/reference/corporateactions.md): Returns corporate action announcements across mergers, dividends, splits, spinoffs, redemptions, name changes, and other supported events. EU partners should pass `region=non_us` for EUR-listed / global corporate actions, or `region=all` when they also need US corporate actions. To page through results, pass the `next_page_token` from one response as `page_token` on the next request. > Warning > > Currently Alpaca has no guarantees on the creation time of corporate actions. There may be delays in receiving corporate actions from our data providers, and there may be delays in processing and making them available via this API. As a result, corporate actions may not be available immediately after they are announced. ## Changelog - [Schema examples now use standard OpenAPI 3.1 examples](https://docs.alpaca.markets/eu/changelog/2026-08-17-examples-b21c8a8.md) - [New ROC (Return of Capital) dividend activity sub-type](https://docs.alpaca.markets/eu/changelog/2026-08-12-roc-42b472e.md) - [New "reason" field on Broker trade events](https://docs.alpaca.markets/eu/changelog/2026-08-12-reason-e11b7f1.md) - [New REO (Reorganization) activity type](https://docs.alpaca.markets/eu/changelog/2026-08-07-reo-954a46c.md) - [Broker API description upgraded to OpenAPI 3.1.2](https://docs.alpaca.markets/eu/changelog/2026-08-05-openapi-3-1-f0dd393.md) - ["since_id" and "until_id" on v1 SSE event streams are deprecated](https://docs.alpaca.markets/eu/changelog/2026-08-05-sse-event-ids-0e97877.md) - [Fixed-income market data endpoints removed](https://docs.alpaca.markets/eu/changelog/2026-08-04-fixed-income-bb350e6.md) - [Legacy v1 trade events endpoint removed](https://docs.alpaca.markets/eu/changelog/2026-08-03-trade-events-adc57be.md) - [Adds "FI" (Fixed Income Interest) activity sub-type](https://docs.alpaca.markets/eu/changelog/2026-08-03-fixed-income-interest-68850f3.md) - [New OCT activity type for on-chain transactions](https://docs.alpaca.markets/eu/changelog/2026-08-01-oct-1b0fa9b.md) # Alpaca US Documentation > Alpaca offers simple, modern API-first solutions to get market data, trade stocks and crypto, build apps and more. ## Guides - [Welcome](https://docs.alpaca.markets/us/docs/getting-started.md): This page will help you get started with Alpaca Docs. You'll be up and running in a jiffy! - [About Alpaca](https://docs.alpaca.markets/us/docs/about-alpaca.md) - [Alpaca API Platform](https://docs.alpaca.markets/us/docs/alpaca-api-platform.md) - [Authentication](https://docs.alpaca.markets/us/docs/authentication.md) - [SDKs and Tools](https://docs.alpaca.markets/us/docs/sdks-and-tools.md) - [Additional Resources](https://docs.alpaca.markets/us/docs/additional-resources.md) - [Trading CLI](https://docs.alpaca.markets/us/docs/alpacas-cli.md) - [Trading MCP Server](https://docs.alpaca.markets/us/docs/alpaca-mcp-server.md): Turn your words into action with Alpaca’s MCP Server - [Broker MCP Server](https://docs.alpaca.markets/us/docs/broker-mcp-server.md): Operate, inspect, and reason over the Alpaca Broker API with AI agents — no local setup, no repo cloning, no partner-run infrastructure. - [About Broker API](https://docs.alpaca.markets/us/docs/about-broker-api.md): This is the documentation about Broker API that helps you build trading apps and brokerage services for your end users. If you are looking to build your own trading bots and algos, read the Trading API documentation. With Alpaca Broker API, you can build the full brokerage experiences for your end users around account opening, funding and trading. This document describes all you need to know to build your trading app. - [Getting Started with Broker API](https://docs.alpaca.markets/us/docs/getting-started-with-broker-api.md): This guide is going to help you set everything up in a sandbox environment to get you up and running with Broker API. - [Credentials Management](https://docs.alpaca.markets/us/docs/credential-management.md) - [Use Cases](https://docs.alpaca.markets/us/docs/use-cases.md) - [Integration Setup with Alpaca](https://docs.alpaca.markets/us/docs/integration-setup-with-alpaca.md): If you are coming to Alpaca for the first time to build something using Broker API, please sign up for the dashboard. In this dashboard, you can acquire your API key for the sandbox environment and gain access to the test data immediately. - [Broker API FAQs](https://docs.alpaca.markets/us/docs/broker-api-faq.md): Frequently Asked Questions - [Mandatory Corporate Actions](https://docs.alpaca.markets/us/docs/mandatory-corporate-actions.md): Frequently Asked Mandatory Corporate Action Questions - [Voluntary Corporate Actions](https://docs.alpaca.markets/us/docs/voluntary-corporate-actions.md): Frequently Asked Voluntary Corporate Action Questions - [FDIC Sweep Program](https://docs.alpaca.markets/us/docs/fdic-sweep-program.md) - [Instant Funding](https://docs.alpaca.markets/us/docs/instant-funding-1.md): Frequently Asked Instant Funding Questions - [Fully Paid Securities Lending](https://docs.alpaca.markets/us/docs/fully-paid-securities-lending.md) - [24/5 Trading](https://docs.alpaca.markets/us/docs/245-trading.md) - [OmniSub](https://docs.alpaca.markets/us/docs/omnisub.md) - [Fixed Income](https://docs.alpaca.markets/us/docs/fixed-income.md) - [ACAT API](https://docs.alpaca.markets/us/docs/acat-api.md) - [Intraday Margin Rule for Non-Leverage Margin Accounts](https://docs.alpaca.markets/us/docs/intraday-margin-rule-for-non-leverage-margin-accounts.md) - [The Intraday Margin Rule](https://docs.alpaca.markets/us/docs/the-intraday-margin-rule-1.md) - [Understanding FINRA’s New Intraday Margin Rule and the End of PDT](https://docs.alpaca.markets/us/docs/understanding-finras-new-intraday-margin-rule-and-the-end-of-pdt-1.md) - [US IPOs (Initial Public Offerings)](https://docs.alpaca.markets/us/docs/us-ipos-initial-public-offerings.md) - [SpaceX Trading Availability and FAQs](https://docs.alpaca.markets/us/docs/spacex-trading-availability-and-faqs.md) - [Customer Account Opening](https://docs.alpaca.markets/us/docs/account-opening.md): If you are a fully-disclosed broker-dealer, an RIA, or a trading app setup, you can open your end customer’s account using Account API. The POST method allows you to submit all KYC information to Alpaca. There are slight differences between setups. # - [Accounts Statuses](https://docs.alpaca.markets/us/docs/accounts-statuses.md) - [International Accounts](https://docs.alpaca.markets/us/docs/international-accounts.md) - [Domestic (USA) Accounts](https://docs.alpaca.markets/us/docs/domestic-usa-accounts.md) - [Data Validations](https://docs.alpaca.markets/us/docs/data-validations.md) - [IRA Accounts Overview](https://docs.alpaca.markets/us/docs/ira-accounts-overview.md): Individual Retirement Arrangement (IRA) accounts are a retirement account type available to US tax residents. Alpaca supports both Roth IRA and Traditional IRA accounts for our Broker API customers. This page serves as a guide to understanding IRA accounts at Alpaca and how to integrate them into your application. Please note IRA accounts have to be enabled for your account to begin creating them. Please reach out to Alpaca support to enable this feature for you in sandbox. - [Crypto Trading](https://docs.alpaca.markets/us/docs/crypto-trading-1.md): Alpaca supports crypto trading 24 hours a day, every day. Crypto is available for testing in sandbox, in case you want to allow your users to trade crypto please reach out to the Sales or Developer Success team. - [Crypto Wallets API](https://docs.alpaca.markets/us/docs/crypto-wallets-api.md) - [Funding Accounts](https://docs.alpaca.markets/us/docs/funding-accounts.md): The funding process can vary depending on your setup and region and we support many cases, but everyone can do the same in the sandbox environment. - [Journals API](https://docs.alpaca.markets/us/docs/funding-via-journals.md) - [Funding Wallets](https://docs.alpaca.markets/us/docs/funding-wallets.md) - [ACH Funding](https://docs.alpaca.markets/us/docs/ach-funding.md) - [Instant Funding](https://docs.alpaca.markets/us/docs/instant-funding.md) - [Trading](https://docs.alpaca.markets/us/docs/brokerapi-trading.md): All the functionality from Alpaca Trading API for direct users is supported under Broker API. Please read the documentation for more details. There are additional capabilities for Trading API in the broker setup. - [Portfolio Rebalancing](https://docs.alpaca.markets/us/docs/portfolio-rebalancing.md) - [SSE Events](https://docs.alpaca.markets/us/docs/sse-events.md) - [Account Status Events for KYCaaS](https://docs.alpaca.markets/us/docs/account-status-events-for-kycaas.md) - [Activities](https://docs.alpaca.markets/us/docs/activity-sse.md): Integration Guide & Migration Playbook - [Daily Processes and Reconcilations](https://docs.alpaca.markets/us/docs/daily-processes-and-reconcilations.md) - [Banking Holiday Funding Processes](https://docs.alpaca.markets/us/docs/holiday-funding-processes.md): This section addresses operational procedures for scenarios where the bank is closed for a holiday, but the stock market remains open for trading (e.g., Columbus Day, Veterans Day). - [Statements and Confirms](https://docs.alpaca.markets/us/docs/statements-and-confirms.md) - [Local Currency Trading (LCT)](https://docs.alpaca.markets/us/docs/local-currency-trading-lct.md): Local Currency Trading allows customers to trade US equities in over 15+ local currencies, with FX conversion done on-the-fly. Customers can place, monitor and sell their positions in their local currency. - [Example Trading App (Ribbit)](https://docs.alpaca.markets/us/docs/example-trading-app-ribbit.md) - [Options Trading Overview](https://docs.alpaca.markets/us/docs/options-trading-overview.md) - [Fixed Income](https://docs.alpaca.markets/us/docs/fixed-income-1.md): This guide provides a comprehensive reference for integrating U.S. Treasuries and U.S. Corporate Bonds into your platform. - [Tokenization Guide for Issuer](https://docs.alpaca.markets/us/docs/tokenization-guide-for-issuer.md): Instant Tokenization Network (ITN) is a platform designed to streamline and accelerate the process of in-kind mint and redemption of tokenized assets. The goal of ITN is to enable efficient, secure, and rapid conversion of real-world and digital assets to and from various tokens issued by partners on the network. The network acts as instant settlement rails for market participants to programmatically rebalance inventory, thereby stitching together fragmented tokenized asset liquidity across the industry. This document will guide the **Issuer** of tokenized assets on how to start using Alpaca’s Instant Tokenization Network. - [Tokenization Guide for Authorized Participant](https://docs.alpaca.markets/us/docs/tokenization-guide-for-authorized-participant.md): The Instant Tokenization Network (ITN) is a platform designed to streamline and accelerate the process of in-kind creation and redemption of tokenized assets. The goal of the ITN is to enable efficient, secure, and rapid conversion of real-world and digital assets to and from various tokens issued by partners on the network. The network acts as instant settlement rails for market participants to programmatically rebalance inventory thereby stitching together fragmented tokenized asset liquidity across the industry. This document will guide the **Authorized Participant** on how to start using Alpaca’s Instant Tokenization Network. - [US IPOs (Initial Public Offerings)](https://docs.alpaca.markets/us/docs/us-ipos-initial-public-offerings-1.md): This guide provides a comprehensive reference for integrating U.S. IPOs into your platform. - [Rate Limits](https://docs.alpaca.markets/us/docs/broker-api-rate-limits.md) - [Custodial accounts](https://docs.alpaca.markets/us/docs/custodial-accounts.md) - [About Trading API](https://docs.alpaca.markets/us/docs/trading-api.md): Trade stocks & crypto with Alpaca’s easy to use Trading API. Up to 4X intraday & 2X overnight buying power. Short selling. Advanced order types. All packaged and delivered through our API. - [Getting Started with Trading API](https://docs.alpaca.markets/us/docs/getting-started-with-trading-api.md): This section outlines how to install Alpaca’s SDKs, create a free alpaca account, locate your API keys, and how to submit orders applicable for both stocks and crypto. - [Working with /account](https://docs.alpaca.markets/us/docs/working-with-account.md): Learn how to use the /account endpoint to learn about the state of your account - [Working with /assets](https://docs.alpaca.markets/us/docs/working-with-assets.md): Learn how to use the `/assets` endpoint to learn more about assets available on Alpaca. Both Securities and Crypto can be retrieved from the `/assets` endpoint. - [Working with /orders](https://docs.alpaca.markets/us/docs/working-with-orders.md): Learn how to submit orders to Alpaca. - [Working with /positions](https://docs.alpaca.markets/us/docs/working-with-positions.md) - [Paper Trading](https://docs.alpaca.markets/us/docs/paper-trading.md): Test your algos in our paper environment. Free and available to all Alpaca users. - [Trading Account](https://docs.alpaca.markets/us/docs/account-plans.md) - [Crypto Spot Trading](https://docs.alpaca.markets/us/docs/crypto-trading.md): Trade crypto through our API and the Alpaca web dashboard! Trade all day, seven days a week, as frequently as you’d like. - [Crypto Orders](https://docs.alpaca.markets/us/docs/crypto-orders.md) - [Crypto Pricing Data](https://docs.alpaca.markets/us/docs/crypto-pricing-data.md): Alpaca provides free limited crypto data and a more advanced unlimited paid plan. - [Crypto Spot Trading Fees](https://docs.alpaca.markets/us/docs/crypto-fees.md) - [Options Trading](https://docs.alpaca.markets/us/docs/options-trading.md): We're excited to support options trading! Use this section to read up on Alpaca's options trading capabilities. - [Options Orders](https://docs.alpaca.markets/us/docs/options-orders.md): This page provides examples of valid order payloads - [Options Level 3 Trading](https://docs.alpaca.markets/us/docs/options-level-3-trading.md): We're excited to support Multi-leg options trading! Use this section to read up on Alpaca's Multi-leg options trading capabilities. - [Non-Trade Activities for Option Events](https://docs.alpaca.markets/us/docs/non-trade-activities-for-option-events.md): This page provides an overview of new NTAs for options-specific events - [Account Activities](https://docs.alpaca.markets/us/docs/account-activities.md): The account activities API provides access to a historical record of transaction activities that have impacted your account. - [Fractional Trading](https://docs.alpaca.markets/us/docs/fractional-trading.md) - [Margin and Short Selling](https://docs.alpaca.markets/us/docs/margin-and-short-selling.md) - [Placing Orders](https://docs.alpaca.markets/us/docs/orders-at-alpaca.md) - [DMA Gateway / Advanced Order Types](https://docs.alpaca.markets/us/docs/alpaca-elite-smart-router.md): Take Control of Your Trades with Direct Market Access Gateway and Advanced Order Types - [User Protection](https://docs.alpaca.markets/us/docs/user-protection.md) - [Websocket Streaming](https://docs.alpaca.markets/us/docs/websocket-streaming.md): Learn how to stream market data using Websockets. - [24/5 Trading](https://docs.alpaca.markets/us/docs/245-trading-for-trading-api.md) - [Position Average Entry Price Calculation](https://docs.alpaca.markets/us/docs/position-average-entry-price-calculation.md): How is the average entry price of a position is calculated? - [Intraday Margin Rule for Non-Leverage Margin Accounts](https://docs.alpaca.markets/us/docs/understanding-the-new-intraday-margin-rule.md) - [The Intraday Margin Rule](https://docs.alpaca.markets/us/docs/the-intraday-margin-rule.md) - [Understanding FINRA’s New Intraday Margin Rule and the End of PDT](https://docs.alpaca.markets/us/docs/understanding-finras-new-intraday-margin-rule-and-the-end-of-pdt.md) - [Regulatory Fees](https://docs.alpaca.markets/us/docs/regulatory-fees.md) - [About Market Data API](https://docs.alpaca.markets/us/docs/about-market-data-api.md): Gain seamless access to a wealth of data with Alpaca Market Data API, offering real-time and historical information for equities, options, crypto and more. - [Getting Started with Market Data API](https://docs.alpaca.markets/us/docs/getting-started-with-alpaca-market-data.md): This is a quick guide on how to start consuming market data via APIs. Starting from beginning to end, this section outlines how to install Alpaca’s software development kit (SDK), create a free alpaca account, locate your API keys, and how to request both historical and real-time data. - [Historical API](https://docs.alpaca.markets/us/docs/historical-api.md) - [Historical Stock Data](https://docs.alpaca.markets/us/docs/historical-stock-data-1.md) - [Historical Crypto Data](https://docs.alpaca.markets/us/docs/historical-crypto-data-1.md) - [Historical Option Data](https://docs.alpaca.markets/us/docs/historical-option-data.md) - [Historical News Data](https://docs.alpaca.markets/us/docs/historical-news-data.md) - [WebSocket Stream](https://docs.alpaca.markets/us/docs/streaming-market-data.md) - [Real-time Stock Data](https://docs.alpaca.markets/us/docs/real-time-stock-pricing-data.md) - [Real-time Crypto Data](https://docs.alpaca.markets/us/docs/real-time-crypto-pricing-data.md) - [Real-time News](https://docs.alpaca.markets/us/docs/streaming-real-time-news.md) - [Real-time Option Data](https://docs.alpaca.markets/us/docs/real-time-option-data.md) - [Market Data FAQ](https://docs.alpaca.markets/us/docs/market-data-faq.md): Frequently Asked Questions - [About Connect API](https://docs.alpaca.markets/us/docs/about-connect-api.md): Develop applications on Alpaca’s platform using OAuth2. Let 10M+ users with an Alpaca brokerage account connect to your app. - [Registering Your App](https://docs.alpaca.markets/us/docs/registering-your-app.md) - [Using OAuth2 and Trading API](https://docs.alpaca.markets/us/docs/using-oauth2-and-trading-api.md): Alpaca implements OAuth 2.0 to allow third party applications to access Alpaca Trading API on behalf of the end-users. This document describes how you can integrate with Alpaca through OAuth. - [About FIX API](https://docs.alpaca.markets/us/docs/5f36ea05-b1b4-5fd1-91b5-ef51db361a4b.md): Alpaca FIX (Financial Information eXchange) API - [FIX Specification](https://docs.alpaca.markets/us/docs/fix-messages.md): This document describes the implementation of the FIX 4.2 protocol used by Alpaca to enable order entry via FIX. ## API Reference - [Issue tokens](https://docs.alpaca.markets/us/reference/issuetokens.md): Issue access tokens using various grant types: - `client_credentials`: Exchange client credentials for an access token - `urn:ietf:params:oauth:grant-type:jwt-bearer`: Exchange JWT assertion (Keycloak for brokerdash or Google for admin) - `refresh_token`: Refresh an admin access token using a refresh token - [Get Account](https://docs.alpaca.markets/us/reference/getaccount-1.md): Returns your account details. - [Get Assets](https://docs.alpaca.markets/us/reference/get-v2-assets-1.md): The assets API serves as the master list of assets available for trade and data consumption from Alpaca. Assets are sorted by asset class, exchange and symbol. - [Get an Asset by ID or Symbol](https://docs.alpaca.markets/us/reference/get-v2-assets-symbol_or_asset_id.md): Get the asset model for a given symbol or asset_id. The symbol or asset_id should be passed in as a path parameter. **Note**: For crypto, the symbol has to follow old symbology, e.g. BTCUSD. **Note**: For coin pairs, the symbol should be separated by a slash (/), e.g. BTC/USDT. Since the slash is a special character in HTTP, use the URL encoded version instead, e.g. /v2/assets/BTC%2FUSDT - [Get Option Contracts](https://docs.alpaca.markets/us/reference/get-options-contracts.md): This endpoint allows you to retrieve a list of option contracts based on various filtering criteria. By default only active contracts that expire before the upcoming weekend are returned. - [Get an option contract by ID or Symbol](https://docs.alpaca.markets/us/reference/get-option-contract-symbol_or_id.md): Get an option contract by symbol or contract ID. The symbol or id should be passed in as a path parameter. - [Retrieve a Specific Announcement](https://docs.alpaca.markets/us/reference/get-v2-corporate_actions-announcements-id-1.md): This endpoint is deprecated, please use [the new corporate actions endpoint](https://docs.alpaca.markets/reference/corporateactions-1) instead. - [Retrieve Announcements](https://docs.alpaca.markets/us/reference/get-v2-corporate_actions-announcements-1.md): This endpoint is deprecated, please use [the new corporate actions endpoint](https://docs.alpaca.markets/reference/corporateactions-1) instead. - [Create an Order](https://docs.alpaca.markets/us/reference/postorder.md): Places a new order for the given account. An order request may be rejected if the account is not authorized for trading, or if the tradable balance is insufficient to fill the order. - [Get All Orders](https://docs.alpaca.markets/us/reference/getallorders-1.md): Retrieves a list of orders for the account, filtered by the supplied query parameters. - [Delete All Orders](https://docs.alpaca.markets/us/reference/deleteallorders-1.md): Attempts to cancel all open orders. A response will be provided for each order that is attempted to be cancelled. If an order is no longer cancelable, the server will respond with status 500 and reject the request. - [Get Order by Client Order ID](https://docs.alpaca.markets/us/reference/getorderbyclientorderid.md): Retrieves a single order specified by the client order ID. - [Get Order by ID](https://docs.alpaca.markets/us/reference/getorderbyorderid-1.md): Retrieves a single order for the given order_id. - [Replace Order by ID](https://docs.alpaca.markets/us/reference/patchorderbyorderid-1.md): Replaces a single order with updated parameters. Each parameter overrides the corresponding attribute of the existing order. The other attributes remain the same as the existing order. A success return code from a replaced order does NOT guarantee the existing open order has been replaced. If the existing open order is filled before the replacing (new) order reaches the execution venue, the replacing (new) order is rejected, and these events are sent in the trade_updates stream channel. While an order is being replaced, buying power is reduced by the larger of the two orders that have been placed (the old order being replaced, and the newly placed order to replace it). If you are replacing a buy entry order with a higher limit price than the original order, the buying power is calculated based on the newly placed order. If you are replacing it with a lower limit price, the buying power is calculated based on the old order. Note: Order cannot be replaced when the status is `accepted`, `pending_new`, `pending_cancel` or `pending_replace`. Note: Notional orders for non-IPO asset classes cannot be replaced. Any attempt to modify a non-IPO notional order via this endpoint will be rejected; cancel it and submit a new one instead. Note: IPO indications of interest (`asset_class: "ipo"`) **are** notional and **can** be replaced via this endpoint by providing a new `notional` value. `qty` and `notional` are mutually exclusive on a single replace request. - [Delete Order by ID](https://docs.alpaca.markets/us/reference/deleteorderbyorderid-1.md): Attempts to cancel an Open Order. If the order is no longer cancelable, the request will be rejected with status 422; otherwise accepted with return status 204. - [All Open Positions](https://docs.alpaca.markets/us/reference/getallopenpositions.md): The positions API provides information about an account's current open positions. The response will include information such as cost basis, shares traded, and market value, which will be updated live as price information is updated. Once a position is closed, it will no longer be queryable through this API Retrieves a list of the account's open positions - [Close All Positions](https://docs.alpaca.markets/us/reference/deleteallopenpositions-1.md): Closes (liquidates) all of the account's open long and short positions. A response will be provided for each order that is attempted to be cancelled. If an order is no longer cancelable, the server will respond with status 500 and reject the request. - [Get an Open Position](https://docs.alpaca.markets/us/reference/getopenposition-1.md): Retrieves the account's open position for the given symbol or assetId. - [Close a Position](https://docs.alpaca.markets/us/reference/deleteopenposition-1.md): Closes (liquidates) the account's open position for the given symbol. Works for both long and short positions. - [Exercise an Options Position](https://docs.alpaca.markets/us/reference/optionexercise.md): This endpoint enables users to exercise a held option contract, converting it into the underlying asset based on the specified terms. All available held shares of this option contract will be exercised. By default, Alpaca will automatically exercise in-the-money (ITM) contracts at expiry. Exercise requests will be processed immediately once received. Exercise requests submitted between market close and midnight will be rejected to avoid any confusion about when the exercise will settle. To cancel an exercise request or to submit a Do-not-exercise (DNE) instruction, you can use the do-not-exercise endpoint or contact our support team. - [Get Account Portfolio History](https://docs.alpaca.markets/us/reference/getaccountportfoliohistory-1.md): Returns timeseries data about equity and profit/loss (P/L) of the account in requested timespan. - [Get All Watchlists](https://docs.alpaca.markets/us/reference/getwatchlists-1.md): Returns the list of watchlists registered under the account. - [Create Watchlist](https://docs.alpaca.markets/us/reference/postwatchlist-1.md): Create a new watchlist with initial set of assets. - [Get Watchlist by ID](https://docs.alpaca.markets/us/reference/getwatchlistbyid-1.md): Returns a watchlist identified by the ID. - [Update Watchlist By Id](https://docs.alpaca.markets/us/reference/updatewatchlistbyid-1.md): Update the name and/or content of watchlist - [Add Asset to Watchlist](https://docs.alpaca.markets/us/reference/addassettowatchlist-1.md): Append an asset for the symbol to the end of watchlist asset list - [Delete Watchlist By Id](https://docs.alpaca.markets/us/reference/deletewatchlistbyid-1.md): Delete a watchlist. This is a permanent deletion. - [Get Watchlist by Name](https://docs.alpaca.markets/us/reference/getwatchlistbyname-1.md): You can also call GET, PUT, POST and DELETE with watchlist name with another endpoint /v2/watchlists:by_name and query parameter name=, instead of /v2/watchlists/{watchlist_id} endpoints Returns a watchlist by name - [Update Watchlist By Name](https://docs.alpaca.markets/us/reference/updatewatchlistbyname-1.md): Update the name and/or content of watchlist - [Add Asset to Watchlist By Name](https://docs.alpaca.markets/us/reference/addassettowatchlistbyname-1.md): Append an asset for the symbol to the end of watchlist asset list - [Delete Watchlist By Name](https://docs.alpaca.markets/us/reference/deletewatchlistbyname-1.md): Delete a watchlist. This is a permanent deletion. - [Delete Symbol from Watchlist](https://docs.alpaca.markets/us/reference/removeassetfromwatchlist-1.md): Delete one entry for an asset by symbol name - [Get Account Configurations](https://docs.alpaca.markets/us/reference/getaccountconfig-1.md): gets the current account configuration values - [Account Configurations](https://docs.alpaca.markets/us/reference/patchaccountconfig-1.md): Updates and returns the current account configuration values - [Retrieve Account Activities](https://docs.alpaca.markets/us/reference/getaccountactivities-2.md): Returns a list of activities Notes: * Pagination is handled using the `page_token` and `page_size` parameters. * `page_token` represents the ID of the last item on your current page of results. For example, if the ID of the last activity in your first response is `20220203000000000::045b3b8d-c566-4bef-b741-2bf598dd6ae7`, you would pass that value as `page_token` to retrieve the next page of results. - [Retrieve Account Activities of Specific Type](https://docs.alpaca.markets/us/reference/getaccountactivitiesbyactivitytype-1.md): Returns account activity entries for a specific type of activity. - [Get US Market Calendar](https://docs.alpaca.markets/us/reference/legacycalendar.md): The calendar API serves the full list of market days from 1970 to 2029. It can also be queried by specifying a start and/or end time to narrow down the results. In addition to the dates, the response also contains the specific open and close times for the market days, taking into account early closures. - [Get US Market Clock](https://docs.alpaca.markets/us/reference/legacyclock.md): The clock API serves the current market timestamp, whether or not the market is currently open, as well as the times of the next market open and close. - [Get Market Calendar](https://docs.alpaca.markets/us/reference/calendar-2.md): This endpoint returns the market calendar. - [Get Market Clock](https://docs.alpaca.markets/us/reference/clock-1.md): This API serves information about multiple markets: the current time, if it's a market day, the current phase of the market, etc. - [Retrieve Crypto Funding Wallets](https://docs.alpaca.markets/us/reference/listcryptofundingwallets.md): Lists wallets for the account given in the path parameter. If an asset is specified and no wallet for the account and asset pair exists one will be created. If no asset is specified only existing wallets will be listed for the account. An account may have at most one wallet per asset. - [Retrieve Crypto Funding Transfers](https://docs.alpaca.markets/us/reference/listcryptofundingtransfers.md): Returns an array of all transfers associated with the given account across all wallets. - [Request a New Withdrawal](https://docs.alpaca.markets/us/reference/createcryptotransferforaccount.md): Creates a withdrawal request. Note that outgoing withdrawals must be sent to a whitelisted address and you must whitelist addresses at least 24 hours in advance. If you attempt to withdraw funds to a non-whitelisted address then the transfer will be rejected. - [Retrieve a Crypto Funding Transfer](https://docs.alpaca.markets/us/reference/getcryptofundingtransfer.md): Returns a specific wallet transfer by passing into the query the transfer_id. - [An array of whitelisted addresses](https://docs.alpaca.markets/us/reference/listwhitelistedaddress.md): Returns the list of whitelisted withdrawal addresses for your account. - [Request a new whitelisted address](https://docs.alpaca.markets/us/reference/createwhitelistedaddress.md): Submits a new whitelisted withdrawal address for your account. The chain is derived from the supplied asset symbol and address, and the same address cannot be whitelisted twice on the same chain. Where travel rule reporting applies to your account, address details are validated against the travel rule provider before being persisted. Note that whitelisted addresses must wait at least 24 hours before they can be used as a withdrawal destination. - [Delete a whitelisted address](https://docs.alpaca.markets/us/reference/deletewhitelistedaddress.md): Deletes a whitelisted withdrawal address by ID. Subsequent withdrawals targeting the deleted address will be rejected. - [Returns the estimated gas fee for a proposed transaction.](https://docs.alpaca.markets/us/reference/getcryptotransferestimate.md): Returns the estimated on-chain network (gas) fee for a proposed crypto withdrawal at current chain conditions. Pass the `asset`, `from_address`, `to_address`, and `amount` you intend to send; the response reports the network fee that would be charged for the corresponding transaction. - [Do Not Exercise an Options Position](https://docs.alpaca.markets/us/reference/optiondonotexercise.md): This endpoint enables users to submit a do-not-exercise (DNE) instruction for a held option contract, preventing automatic exercise at expiry. By default, Alpaca will automatically exercise in-the-money (ITM) contracts at expiry. This endpoint allows users to override that behavior. To override this behavior and submit an exercise instruction, please contact our support team. - [Mint a Tokenized Asset](https://docs.alpaca.markets/us/reference/posttokenizationmint.md): This endpoint is used by an Authorized Participant to request the minting of a tokenized asset. **Idempotency**: When the `Idempotency-Key` header is supplied, this endpoint is idempotent. Multiple requests with the same key and identical request body will create only one mint request. A subsequent request returns the previously created request with the same response (no duplicate is created). If the same key is used with a different request body, the API returns `422 Unprocessable Entity`. **Recommended for production**: Always supply `Idempotency-Key` when requesting a mint. This allows safe retries on timeouts, network errors, or 5xx responses without risking duplicate requests. Use a client-generated unique value (e.g. UUID). - [List Tokenization Requests](https://docs.alpaca.markets/us/reference/gettokenizationrequests.md): An Authorized Participant can use this endpoint to list the tokenization requests performed on the Instant Tokenization Network (ITN). - [Get Tokenization Request by ID](https://docs.alpaca.markets/us/reference/gettokenizationrequest.md): An Authorized Participant can use this endpoint to retrieve a single tokenization request, mint or redeem, by its `tokenization_request_id`. - [Get Tokenization Request by `client_request_id`](https://docs.alpaca.markets/us/reference/gettokenizationrequestbyclientrequestid.md): An Authorized Participant can use this endpoint to retrieve a single mint tokenization request by their own `client_request_id` -- the AP-supplied label originally passed on the mint request. If the AP has reused a `client_request_id` across multiple requests, the most recently created request is returned. - [List Locates](https://docs.alpaca.markets/us/reference/listlocates.md): Returns locates filtered by status, symbol, or date range. Results are sorted by `created_at` descending, with `id` descending as the tie-breaker. - [Create Locate](https://docs.alpaca.markets/us/reference/createlocates.md): Creates a locate request for a short sale. - [Get Locate](https://docs.alpaca.markets/us/reference/getlocate.md): Returns a locate by ID. - [Get Locate Quotes](https://docs.alpaca.markets/us/reference/listlocatequotes.md): Returns locate availability and pricing for one or more symbols. - [Subscribe to Activity Events (SSE)](https://docs.alpaca.markets/us/reference/subscribetoactivitiessse.md): The Events API sends the real-time events and provides historical queries with SSE (Server Sent Events). This endpoint streams events on account activities. Historical events are streamed immediately if queried, and updates are pushed as events occur. Query parameter rules: - If `until` is specified, `since` is required. - If `until_id` is specified, `since_id` is required. - You cannot use `since` and `since_id` together. Behavior: - If `since` or `since_id` is not specified, this will not return any historic data. - If `until` or `until_id` is specified, stream will end at the specified point with status 200. --- Warning: Currently, OAS-3 does not fully support responses from an SSE API. In case the client code is generated from this OAS spec, please do not specify `since` and `until`, as the generated client may hang forever waiting for the response to end. If you require the streaming capabilities, we recommend not using the generated clients for this specific endpoint until the OAS-3 standards define how to represent this behavior. --- ### Comment messages According to the SSE specification, any line that starts with a colon is a comment which does not contain data. It is typically a free text that does not follow any data schema. A few examples mentioned below for comment messages. ##### Slow client The server sends a comment when the client is not consuming messages fast enough. Example: `: you are reading too slowly, dropped 10000 messages` ##### Internal server error An error message is sent as a comment when the server closes the connection on an internal server error (only sent by the v2 and v2beta1 endpoints). Example: `: internal server error` --- - [Historical auctions](https://docs.alpaca.markets/us/reference/stockauctions-1.md): The historical auctions endpoint provides auction prices for a list of stock symbols between the specified dates. - [Historical bars](https://docs.alpaca.markets/us/reference/stockbars.md): The historical stock bars API provides aggregates for a list of stock symbols between the specified dates. The returned results are sorted by symbol first, then by bar timestamp. This means that you are likely to see only one symbol in your first response if there are enough bars for that symbol to hit the limit you requested. In these situations, if you keep requesting again with the `next_page_token` from the previous response, you will eventually reach the other symbols if any bars were found for them. - [Latest bars](https://docs.alpaca.markets/us/reference/stocklatestbars-1.md): The latest bars endpoint provides the latest minute bar for the given ticker symbols. - [Condition codes](https://docs.alpaca.markets/us/reference/stockmetaconditions-1.md): Returns the mapping between the condition codes and names. - [Exchange codes](https://docs.alpaca.markets/us/reference/stockmetaexchanges-1.md): Returns the mapping between the stock exchange codes and the corresponding exchange names. - [Historical quotes](https://docs.alpaca.markets/us/reference/stockquotes-1.md): The historical stock quotes API provides quote data for a list of stock symbols between the specified dates. The returned results are sorted by symbol first, then by the quote timestamp. This means that you are likely to see only one symbol in your first response if there are enough quotes for that symbol to hit the limit you requested. In these situations, if you keep requesting again with the `next_page_token` from the previous response, you will eventually reach the other symbols if any quotes were found for them. - [Latest quotes](https://docs.alpaca.markets/us/reference/stocklatestquotes-1.md): The latest quotes endpoint provides the latest best bid and ask prices for the given ticker symbols. - [Snapshots](https://docs.alpaca.markets/us/reference/stocksnapshots-1.md): The snapshot endpoint for multiple tickers provides the latest trade, latest quote, minute bar, daily bar, and previous daily bar data for each given ticker symbol. - [Historical trades](https://docs.alpaca.markets/us/reference/stocktrades-1.md): The historical stock trades API provides trade data for a list of stock symbols between the specified dates. The returned results are sorted by symbol first then by trade timestamp. This means that you are likely to see only one symbol in your first response if there are enough trades for that symbol to hit the limit you requested. In these situations, if you keep requesting again with the `next_page_token` from the previous response, you will eventually reach the other symbols if any trades were found for them. - [Latest trades](https://docs.alpaca.markets/us/reference/stocklatesttrades-1.md): The latest trades endpoint provides the latest trades for the given ticker symbols. Trades with any conditions that causes them to not update the bar price are excluded. For example a trade with condition `I` (odd lot) will never appear on this endpoint. You can find the complete list of excluded conditions in [this FAQ](https://docs.alpaca.markets/docs/market-data-faq#how-are-bars-aggregated). - [Historical auctions (single)](https://docs.alpaca.markets/us/reference/stockauctionsingle-1.md): The historical auctions endpoint provides auction prices for the given stock symbol between the specified dates. - [Historical bars (single symbol)](https://docs.alpaca.markets/us/reference/stockbarsingle-1.md): The historical stock bars API provides aggregates for the stock symbol between the specified dates. - [Latest bar (single symbol)](https://docs.alpaca.markets/us/reference/stocklatestbarsingle-1.md): The latest bar endpoint returns the latest minute bar for the given ticker symbol. - [Historical quotes (single symbol)](https://docs.alpaca.markets/us/reference/stockquotesingle-1.md): The historical stock quotes API provides quote data for a stock symbol between the specified dates. - [Latest quote (single symbol)](https://docs.alpaca.markets/us/reference/stocklatestquotesingle-1.md): The latest quote endpoint provides the latest best bid and ask prices for a given ticker symbol. - [Snapshot (single symbol)](https://docs.alpaca.markets/us/reference/stocksnapshotsingle.md): The snapshot endpoint provides the latest trade, latest quote, minute bar, daily bar, and previous daily bar data for a given ticker symbol. - [Historical trades (single symbol)](https://docs.alpaca.markets/us/reference/stocktradesingle-1.md): The historical stock trades API provides trade data for a stock symbol between the specified dates. - [Latest trade (single symbol)](https://docs.alpaca.markets/us/reference/stocklatesttradesingle-1.md): The latest trade endpoint provides the latest trade for the given ticker symbol. Trades with any conditions that causes them to not update the bar price are excluded. For example a trade with condition `I` (odd lot) will never appear on this endpoint. You can find the complete list of excluded conditions in [this FAQ](https://docs.alpaca.markets/docs/market-data-faq#how-are-bars-aggregated). - [Historical bars](https://docs.alpaca.markets/us/reference/optionbars.md): The historical option bars API provides aggregates for a list of option symbols between the specified dates. The returned results are sorted by symbol first, then by bar timestamp. This means that you are likely to see only one symbol in your first response if there are enough bars for that symbol to hit the limit you requested. In these situations, if you keep requesting again with the `next_page_token` from the previous response, you will eventually reach the other symbols if any bars were found for them. - [Condition codes](https://docs.alpaca.markets/us/reference/optionmetaconditions.md): Returns the mapping between the condition codes and names. - [Exchange codes](https://docs.alpaca.markets/us/reference/optionmetaexchanges.md): Returns the mapping between the option exchange codes and the corresponding exchange names. - [Latest quotes](https://docs.alpaca.markets/us/reference/optionlatestquotes.md): The latest multi-quotes endpoint provides the latest bid and ask prices for each given contract symbol. - [Snapshots](https://docs.alpaca.markets/us/reference/optionsnapshots.md): The snapshots endpoint provides the latest trade, latest quote and greeks for each given contract symbol. - [Option chain](https://docs.alpaca.markets/us/reference/optionchain.md): The option chain endpoint provides the latest trade, latest quote, and greeks for each contract symbol of the underlying symbol. - [Historical trades](https://docs.alpaca.markets/us/reference/optiontrades.md): The historical option trades API provides trade data for a list of contract symbols between the specified dates. The returned results are sorted by symbol first then by trade timestamp. This means that you are likely to see only one symbol in your first response if there are enough trades for that symbol to hit the limit you requested. In these situations, if you keep requesting again with the `next_page_token` from the previous response, you will eventually reach the other symbols if any trades were found for them. - [Latest trades](https://docs.alpaca.markets/us/reference/optionlatesttrades.md): The latest multi-trades endpoint provides the latest historical trade data for multiple given contract symbols. - [Historical bars](https://docs.alpaca.markets/us/reference/cryptobars-1.md): The crypto bars API provides historical aggregates for a list of crypto symbols between the specified dates. - [Latest bars](https://docs.alpaca.markets/us/reference/cryptolatestbars-1.md): The latest multi-bars endpoint returns the latest minute-aggregated historical bar data for each of the crypto symbols provided. - [Latest orderbook](https://docs.alpaca.markets/us/reference/cryptolatestorderbooks-1.md): The latest orderbook endpoint returns the latest bid and ask orderbook for the crypto symbols provided. - [Latest quotes](https://docs.alpaca.markets/us/reference/cryptolatestquotes-1.md): The latest quotes endpoint returns the latest bid and ask prices for the crypto symbols provided. - [Latest trades](https://docs.alpaca.markets/us/reference/cryptolatesttrades-1.md): The latest trades endpoint returns the latest trade data for the crypto symbols provided. - [Historical quotes](https://docs.alpaca.markets/us/reference/cryptoquotes-1.md): The crypto quotes API provides historical quote data for a list of crypto symbols between the specified dates. The oldest date to retrieve historical quotes of us-1 location is 14th October, 2025 12AM UTC. - [Snapshots](https://docs.alpaca.markets/us/reference/cryptosnapshots-1.md): The snapshots endpoint returns the latest trade, latest quote, latest minute bar, latest daily bar, and previous daily bar data for crypto symbols. - [Historical trades](https://docs.alpaca.markets/us/reference/cryptotrades-1.md): The crypto trades API provides historical trade data for a list of crypto symbols between the specified dates. - [Latest prices](https://docs.alpaca.markets/us/reference/fixedincomelatestprices.md): This endpoint returns the latest prices for the given fixed income securities. - [Latest quotes](https://docs.alpaca.markets/us/reference/fixedincomelatestquotes.md): This endpoint returns the latest quotes for the given fixed income securities. - [Latest rates for currency pairs](https://docs.alpaca.markets/us/reference/latestrates-1.md): Get the latest forex rates for the given currency pairs. - [Historical rates for currency pairs](https://docs.alpaca.markets/us/reference/rates-1.md): Get historical forex rates for the given currency pairs in the given time interval and at the given timeframe (snapshot frequency). - [Logos](https://docs.alpaca.markets/us/reference/logos-5.md): Get the image of the company logo for the given symbol. - [Most active stocks](https://docs.alpaca.markets/us/reference/mostactives-1.md): Returns the most active stocks by volume or trade count based on real time SIP data. By default, returns the top 10 symbols by volume. - [Top market movers](https://docs.alpaca.markets/us/reference/movers-1.md): Returns the top market movers (gainers and losers) based on real time SIP data. The change for each symbol is calculated from the previous closing price and the latest closing price. For stocks, the endpoint resets at market open. Until then, it shows the previous market day's movers. The data is split-adjusted. Only tradable symbols in exchanges are included. For crypto, the endpoint resets at midnight. - [News articles](https://docs.alpaca.markets/us/reference/news-3.md): Returns the latest news articles across stocks and crypto. By default, returns the latest 10 news articles. - [Corporate actions](https://docs.alpaca.markets/us/reference/corporateactions-1.md): This endpoint provides data about the corporate actions for each given symbol over a specified time period. By default (`data_quality=complete`), corporate actions that are still incomplete (for example, missing required fields such as ex-date or CUSIP/ISIN) and have not yet been processed are excluded from the response. Pass `data_quality=all` to also receive those early, incomplete records. Already-processed corporate actions are always returned when `data_quality=complete`, even if they would otherwise be considered incomplete. > ⚠️ Warning > > Currently Alpaca has no guarantees on the creation time of corporate actions. There may be delays in receiving corporate actions from our data providers, and there may be delays in processing and making them available via this API. As a result, corporate actions may not be available immediately after they are announced. - [Subscribe to Corporate Actions Events (SSE)](https://docs.alpaca.markets/us/reference/subscribetocorporateactionseventssse.md): Server-Sent Events (SSE) stream that delivers every corporate-action mutation (`insert` / `update` / `delete`) across all 15 CA types on a single long-lived `text/event-stream` connection. When `since`, `since_id`, or the `Last-Event-Id` reconnect header is provided, historical events are replayed first; otherwise only live events are pushed. Each event carries an `event_type` discriminator that selects the shape of the `ca` payload -- see the [`corporate_action_event`](#/components/schemas/corporate_action_event) schema for the mapping to each per-type schema. The same underlying data is available on demand via [`GET /v1/corporate-actions`](#operation/CorporateActions). - [Get All Accounts](https://docs.alpaca.markets/us/reference/getallaccounts.md): Retrieves the first 1000 accounts that match the query parameters. Sorting is based on creation time. The created_after/created_before query parameters can be used to paginate the results. To further limit the size of the response, the entities query parameter can be used to specify which properties are included in the response. - [Create an Account](https://docs.alpaca.markets/us/reference/createaccount.md): Submit an account application with KYC information. This will create a trading account for the end user. The account status may or may not be ACTIVE immediately and you will receive account status updates on the event API. **Multi-Live Accounts (MLA)**: To open an additional account for an existing account holder, supply `primary_account_holder_id` at the top level instead of `contact`/`identity` data. In that case, supplying `contact` or `identity` returns HTTP 400. Only `account_type` of `trading` and `ira` are supported via this flow. - [Get An Account by ID](https://docs.alpaca.markets/us/reference/getaccount.md): You can query a specific account that you submitted to Alpaca by passing into the query the account_id associated with the account you're retrieving. - [Update an Account](https://docs.alpaca.markets/us/reference/patchaccount.md): This operation updates account information. If all parameters are valid and updates have been made, it returns with status code 200. The response is the account model. **Multi-Live Accounts (MLA)**: The `primary_account_holder_id` field is read-only after the account is created. Omitting it or supplying the value already associated with the account is a no-op; supplying a different value returns HTTP 400. - [Request options trading for an account (BETA)](https://docs.alpaca.markets/us/reference/requestoptionsforaccount.md): This endpoint requests options trading for an account. Following submission, an assigned administrator will review the request. Upon approval, the account's options_approved_level parameter will be modified, granting the account the ability to participate in options trading. Note: This endpoint is only available for partners who have been enabled for Options BETA. - [Retrieve options level approval requests (BETA)](https://docs.alpaca.markets/us/reference/requestlistoptionsapprovals.md): This endpoint retrieves options trading level approval requests. Query parameters can be specified to filter the results. If multiple query parameters are specified, the results will be filtered to include only those that match all of the specified parameters. Each query parameter can only be specified once. - [Retrieve Account Activities](https://docs.alpaca.markets/us/reference/getaccountactivities.md): Returns a list of activities Notes: * Pagination is handled using the `page_token` and `page_size` parameters. * `page_token` represents the ID of the last item on your current page of results. For example, if the ID of the last activity in your first response is `20220203000000000::045b3b8d-c566-4bef-b741-2bf598dd6ae7`, you would pass that value as `page_token` to retrieve the next page of results. * If specified with a `direction` of `desc`, for example, the results will end before the activity with the specified ID. * If specified with a `direction` of `asc`, results will begin with the activity immediately after the one specified. * `page_size` is the maximum number of entries to return in the response. * If `date` is not specified, the default and maximum value is 100. * If `date` is specified, the default behavior is to return all results, and there is no maximum page size. - [Retrieve Account Activities of Specific Type](https://docs.alpaca.markets/us/reference/getaccountactivitiesbytype.md): Retrieves an array of Activity by type. If {activity_type} is provided as part of the URL, category cannot be provided as query parameter. They are mutually exclusive. Notes: * Pagination is handled using the `page_token` and `page_size` parameters. * `page_token` represents the ID of the end of your current page of results. for example if in your first response the id of the last Activiy item returned in the array was `20220203000000000::045b3b8d-c566-4bef-b741-2bf598dd6ae7`, you'd pass that value as `page_token` to get the next page of results * If specified with a `direction` of `desc`, for example, the results will end before the activity with the specified ID. * If specified with a `direction` of `asc`, results will begin with the activity immediately after the one specified. * `page_size` is the maximum number of entries to return in the response. * If `date` is not specified, the default and maximum value is 100. * If `date` is specified, the default behavior is to return all results, and there is no maximum page size. - [Retrieve Trading Details for an Account](https://docs.alpaca.markets/us/reference/gettradingaccount.md): As a broker you can view more trading details about your users. The response is a Trading Account model. - [Close an Account](https://docs.alpaca.markets/us/reference/post-v1-accounts-account_id-actions-close.md): This operation closes an active account. The underlying records and information of the account are not deleted by this operation. **Before closing an account, you are responsible for closing all the positions and withdrawing all the money associated with that account. Learn more in the Positions Documentation.** - [Get a single activity (V2) event by event_id ULID.](https://docs.alpaca.markets/us/reference/getaccountactivityevent.md): Returns a single account activity (V2) event for the specified account by ULID `event_id`, delivered as a server-sent event message. This is the single-event counterpart to the `subscribeToActivitiesSSE` streaming endpoint, intended for re-fetching an individual activity that was previously observed on the activities stream. - [Retrieve a List of Account Documents](https://docs.alpaca.markets/us/reference/getdocsforaccount.md): This endpoint allows you to query all the account document based on an account ID. You can filter by date, or type of document. These account documents are tax statements, trade confirmations, etc, generated by the Alpaca system. They are distinct from the owner documents you upload and later access via the account object's documents property. - [Upload Owner Documents for an Existing Account](https://docs.alpaca.markets/us/reference/uploaddoctoaccount.md): Upload documents for the primary account owner of an account. Documents are binary objects whose contents are encoded in base64. Each encoded content size is limited to 10MB if you use Alpaca for KYCaaS. If you perform your own KYC there are no document size limitations. As a convenience, documents of type w8ben may be uploaded as a JSON object using the content_data request property. The Alpaca system will then generate a formatted W-8 BEN document for subsequent downloads. Note that these owner documents are distinct from the account documents generated by Alpaca, such as tax statements and trade confirmations. - [Download an Account Document](https://docs.alpaca.markets/us/reference/downloaddocfromaccount.md): This endpoint downloads an account document based on the document ID. The document will be in PDF format. The operation returns a pre-signed downloadable link as a redirect with HTTP status code 301 if one is found. You can retrieve a JSON version of a monthly statement by passing in the header accept: application/json header. These account documents are tax statements, trade confirmations, etc, generated by the Alpaca system. They are distinct from the owner documents you upload and later access via the account object's documents property. - [Download the W8BEN document for the primary owner of an account](https://docs.alpaca.markets/us/reference/get-v1-accounts-account_id-documents-w8ben-document_id-download.md): This endpoint allows you to download a W-8 BEN document for the primary owner of an account based on the document_id passed as a path parameter. The returned document is in PDF format. For certain individuals, a W-8 BEN form should be submitted at onboarding. If the individual is not a registered U.S. taxpayer (not subject to a W-9), the W-8 BEN form may need to be submitted. The IRS explains which individuals this applies to and provides instructions on completing the form. Every three years, in addition to the calendar year it was signed, a new W-8 BEN form must be submitted. The form can be submitted in JSON, JSONC, PNG, JPEG or PDF. If submitting it in JSON, please see the W-8 BEN completed with the corresponding field names for the API here. Note: The dates collected on the form are in a slightly different format than how they need to be submitted via Accounts API. It is requested by the user on the form in MM-DD-YYYY, but should be submitted as YYYY-MM-DD. - [List Open Positions for an Account](https://docs.alpaca.markets/us/reference/getpositionsforaccount.md): List open positions for an account - [Close All Positions for an Account](https://docs.alpaca.markets/us/reference/closeallpositionsforaccount.md): Closes (liquidates) all of the account's open long and short positions. A response will be provided for each order that is attempted to be cancelled. If an order is no longer cancelable, the server will respond with status 500 and reject the request. - [Get an Open Position for account by Symbol or AssetId](https://docs.alpaca.markets/us/reference/getpositionsforaccountbysymbol.md): Retrieves the account's open position for the given symbol or asset_id. - [Close a Position for an Account](https://docs.alpaca.markets/us/reference/closepositionforaccountbysymbol.md): Closes (liquidates) the account's open position for the given symbol. Works for both long and short positions. - [Exercise an Options Position](https://docs.alpaca.markets/us/reference/optionexercise-1.md): This endpoint enables users to exercise a held option contract, converting it into the underlying asset based on the specified terms. All available held shares of this option contract will be exercised. By default, Alpaca will automatically exercise in-the-money (ITM) contracts at expiry. Exercise requests will be processed immediately once received. Exercise requests submitted between market close and midnight will be rejected to avoid any confusion about when the exercise will settle. To cancel an exercise request or to submit a Do-not-exercise (DNE) instruction, you can use the do-not-exercise endpoint or contact our support team. - [Do Not Exercise an Options Position](https://docs.alpaca.markets/us/reference/optiondonotexercise-1.md): This endpoint enables users to submit a do-not-exercise (DNE) instruction for a held option contract, preventing automatic exercise at expiry. By default, Alpaca will automatically exercise in-the-money (ITM) contracts at expiry. This endpoint allows users to override that behavior. DNE requests will be processed immediately once received. DNE requests submitted between market close and midnight will be rejected to avoid any confusion about when the instruction will take effect. To cancel a DNE request or to submit an exercise instruction, please contact our support team. - [Retrieve an Order by its ID](https://docs.alpaca.markets/us/reference/getorderforaccount.md): Retrieves a single order for the given order_id. - [Replace an Order](https://docs.alpaca.markets/us/reference/replaceorderforaccount.md): Replaces a single order with updated parameters. Each parameter overrides the corresponding attribute of the existing order. The other attributes remain the same as the existing order. A success return code from a replaced order does NOT guarantee the existing open order has been replaced. If the existing open order is filled before the replacing (new) order reaches the execution venue, the replacing (new) order is rejected, and these events are sent in the trade_updates stream channel found [here](https://docs.alpaca.markets/reference/subscribetotradev2sse). While an order is being replaced, the account's buying power is reduced by the larger of the two orders that have been placed (the old order being replaced, and the newly placed order to replace it). If you are replacing a buy entry order with a higher limit price than the original order, the buying power is calculated based on the newly placed order. If you are replacing it with a lower limit price, the buying power is calculated based on the old order. Note: Order cannot be replaced when the status is `accepted`, `pending_new`, `pending_cancel` or `pending_replace`. Note: Notional orders for non-IPO asset classes cannot be replaced. Any attempt to modify a non-IPO notional order via this endpoint will be rejected; cancel it and submit a new one instead. Note: IPO indications of interest (`asset_class: "ipo"`) **are** notional and **can** be replaced via this endpoint by providing a new `notional` value. `qty` and `notional` are mutually exclusive on a single replace request. Note that submitting DMA orders (using `advanced_instructions` with `algorithm: DMA`) is only available for partners/correspondents who have been enabled for DMA. - [Cancel an Open Order](https://docs.alpaca.markets/us/reference/deleteorderforaccount.md): Attempts to cancel an open order. If the order is no longer cancelable (for example if the status is "filled"), the server will respond with status 422, and reject the request. Upon acceptance of the cancel request, it returns status 204. - [Retrieve a List of Orders](https://docs.alpaca.markets/us/reference/getallordersforaccount.md): Retrieves a list of orders for the account, filtered by the supplied query parameters. Endpoint defaults to open orders if no parameters are provided. - [Retrieves a single order specified by the client order ID.](https://docs.alpaca.markets/us/reference/getorderbyclientorderidforaccount.md): Retrieves a single order specified by the client order ID. - [Create an Order for an Account](https://docs.alpaca.markets/us/reference/createorderforaccount.md): Creating an order for your end customer. Each trading request must pass in the account_id in the URL. - Note that when submitting crypto orders, `market`, `limit` and `stop_limit` orders are supported while the supported `time_in_force` values are `gtc`, and `ioc`. - For equities and crypto we accept fractional orders as well with either `notional` or `qty` provided. - Note that submitting an options order is only available for partners who have been enabled for Options BETA. - In case of Fixed Income, only `market` and `limit` order types with `day` `time_in_force` are supported, and order replacement is not supported. Note that submitting Fixed Income orders is only available for partners who have been enabled for Fixed Income. - Note that submitting DMA orders (using `advanced_instructions` with `algorithm: DMA`) is only available for partners/correspondents who have been enabled for DMA. - For IPO indications of interest (`asset_class: "ipo"`), the `symbol` is the offering reference returned by [`GET /v1/ipos`](#operation/listIPOOfferings) (e.g. `FI111225`). IPO orders are notional-only (`notional` required, `qty` must be omitted), buy-side, `market` type, and `gtc` time_in_force. Indications of interest can be replaced or canceled while the offering is open via [`PATCH /v1/trading/accounts/{account_id}/orders/{order_id}`](#operation/replaceOrderForAccount) and [`DELETE /v1/trading/accounts/{account_id}/orders/{order_id}`](#operation/deleteOrderForAccount). - [Cancel all Open Orders For an Account](https://docs.alpaca.markets/us/reference/deleteallordersforaccount.md): Attempts to cancel all open orders. A response will be provided for each order that is attempted to be cancelled. - [Estimate an Order](https://docs.alpaca.markets/us/reference/get-v1-trading-accounts-account_id-orders-estimation.md): Order estimation endpoint will display, based on user's account balance, the estimated quantity and price they will receive for their notional order. For LCT - customer's order will include the Alpaca swap_fee, while correspondent side swap_fee is configurable in the API call. Utilising this API does not result in a real order and after the calculation - the user's buying power reverts to the previous state. Responses and Errors are the same as with the Orders API Please note that the estimation is based on the market condition at the time of submission and a live order will differ. The output should be considered indicative. **Note:** This does not support Crypto or non-market orders at this time. - [Bulk Fetch All Accounts Positions](https://docs.alpaca.markets/us/reference/get-v1-accounts-positions.md): Retrieves a list of the account's open positions. This endpoint is deprecated and will be removed in the future. Please use the [GET /v1/reporting/eod/positions endpoint](https://docs.alpaca.markets/reference/get-v1-reporting-eod-positions) instead. - [Update Trading Configurations for an Account](https://docs.alpaca.markets/us/reference/patch-patch-v1-trading-accounts-account_id-account-configurations.md): You can also set the margin settings for your users' account by passing a PATCH request. By default any account with funds under $2,000 is set a margin multiplier of 1.0, and accounts with over $2,000 are set to 2.0. - [Retrieve real-time Trading Limits for an Account](https://docs.alpaca.markets/us/reference/get-v1-account-trading-limits.md): This endpoint is only available to accounts with the trading limits feature enabled, and not on JIT. The daily trading limit is set at the correspondent level (or the account level) and is used as the limit for the total amount due to Alpaca on the date of settlement. The limit in use returns the real time usage of this limit, based on the setup it uses the usage is calculated differently. If the limit in use reaches the `daily_net_limit` or `available` is zero, further purchasing activity will be halted, however, the limit can be adjusted by reaching out to Alpaca with the proposed new limit and the reason for the change. - [Get Account Portfolio History](https://docs.alpaca.markets/us/reference/get-v1-trading-accounts-account_id-account-portfolio-history.md): Returns timeseries data about equity and profit/loss (P/L) of the account in requested timespan. - [Retrieve All Assets](https://docs.alpaca.markets/us/reference/getassets.md): Returns all assets - [Retrieve an Asset by ID](https://docs.alpaca.markets/us/reference/getassetbysymbolorid.md): Returns the requested asset, if found - [Retrieve Entry Requirements for requested assets](https://docs.alpaca.markets/us/reference/get-asset-entry-requirements.md): Returns all entry-requirements - [Get Option Contracts (BETA)](https://docs.alpaca.markets/us/reference/get-options-contracts-1.md): This endpoint allows you to retrieve a list of option contracts based on various filtering criteria. By default only active contracts that expire before the upcoming weekend are returned. - [Get an option contract by ID or Symbol (BETA)](https://docs.alpaca.markets/us/reference/get-option-contract-symbol_or_id-1.md): Get an option contract by symbol or contract ID. The symbol or id should be passed in as a path parameter. - [Get US treasuries](https://docs.alpaca.markets/us/reference/ustreasuries-1.md): Serves the list of US treasuries available at Alpaca. The response is sorted by ISIN. - [Get US corporates](https://docs.alpaca.markets/us/reference/uscorporates-1.md): Serves the list of US corporates available at Alpaca. The response is sorted by ISIN. - [Get US Market Calendar](https://docs.alpaca.markets/us/reference/legacycalendar-1.md): The calendar API serves the full list of market days from 1970 to 2029. It can also be queried by specifying a start and/or end time to narrow down the results. In addition to the dates, the response also contains the specific open and close times for the market days, taking into account early closures. - [Get Market Calendar](https://docs.alpaca.markets/us/reference/calendar-6.md): This endpoint returns the market calendar. - [Get US Market Clock](https://docs.alpaca.markets/us/reference/legacyclock-1.md): The clock API serves the current market timestamp, whether or not the market is currently open, as well as the times of the next market open and close. - [Get Market Clock](https://docs.alpaca.markets/us/reference/clock-2.md): This API serves information about multiple markets: the current time, if it's a market day, the current phase of the market, etc. - [Subscribe to Account Status Events (SSE)](https://docs.alpaca.markets/us/reference/suscribetoaccountstatussse.md): The accounts events API provides streaming of account changes as they occur, via SSE (server sent events). Past events can also be queried. Events are generated for changes to the following account properties: - account_blocked - admin_configurations - cash_interest - crypto_status - kyc_results - options - status - trading_blocked Only the changed properties are included in the event payload. Query Parameter Rules: - `since_id` and `until_id` are deprecated and available only to select broker partners; use `since_ulid` and `until_ulid` instead - `since` is required if `until` specified - `since_id` is required if `until_id` specified - `since_ulid` is required if `until_ulid` specified - `since`, `since_id` and `since_ulid` can't be used at the same time Behavior: This API supports querying a range of events, starting now or in the past. If the end of the range is in the future or not specified, the connection is kept open and future events are pushed. To be specific: - if `since`, `since_id` or `since_ulid` is not specified, this will not return any historic data - if `until`, `until_id` or `until_ulid` is reached, the stream will end with a status of 200 --- Note for people using the clients generated from this OAS spec. Currently OAS-3 doesn't have full support for representing SSE style responses from an API, so if you are using a generated client and don't specify a `since` and `until` there is a good chance the generated clients will hang waiting for the response to end. If you require the streaming capabilities we recommend not using the generated clients for this specific usecase until the OAS-3 standards come to a consensus on how to represent this correctly in OAS-3. - [Subscribe to Journal Events (SSE) (Legacy)](https://docs.alpaca.markets/us/reference/subscribetojournalstatussse.md): The Events API provides event push as well as historical queries via SSE (server sent events). You can listen to journal status updates as they get processed by our backoffice. Historical events are streamed immediately if queried, and updates are pushed as events occur. Query Params Rules: - `since_id` and `until_id` are deprecated and available only to select broker partners; use `since_ulid` and `until_ulid` instead - `since` required if `until` specified - `since_id` required if `until_id` specified - `since_ulid` required if `until_ulid` specified - `since`, `since_id` or `since_ulid` can't be used at the same time Behavior: - if `since`, `since_id` or `since_ulid` not specified this will not return any historic data - if `until`, `until_id` or `until_ulid` reached stream will end (status 200) --- There is no compatibility between /v1/events/journals/status and /v2/events/journals/status, the ids (ulid) are always different, and the number of events might also different Please note that the new `/v2` endpoint, is the same as, and was originally available under `/v2beta1`. We encourage all customers to adjust their codebase from that interim beta endpoint to the `/v2` stable endpoint. In the near future we will setup permanent redirect from `/v2beta1` to `/v2` before we completely remove the beta endpoint. --- Note for people using the clients generated from this OAS spec. Currently OAS-3 doesn't have full support for representing SSE style responses from an API, so if you are using a generated client and don't specify a `since` and `until` there is a good chance the generated clients will hang waiting for the response to end. If you require the streaming capabilities we recommend not using the generated clients for this specific usecase until the OAS-3 standards come to a consensus on how to represent this correctly in OAS-3. - [Subscribe to Journal Events (SSE)](https://docs.alpaca.markets/us/reference/subscribetojournalstatusv2sse.md): The Events API provides event push as well as historical queries via SSE (server sent events). You can listen to journal status updates as they get processed by our backoffice. Historical events are streamed immediately if queried, and updates are pushed as events occur. Query Params Rules: - `since` required if `until` specified - `since_id` required if `until_id` specified - `since` and `since_id` can't be used at the same time - `until` and `until_id` can't be used at the same time Behavior: - if `since` or `since_id` not specified this will not return any historic data - if `until` or `until_id` reached stream will end (status 200) --- There is no compatibility between /v1/events/journals/status and /v2/events/journals/status, the ids (ulid) are always different, and the number of events might also different Please note that the new `/v2` endpoint, is the same as, and was originally available under `/v2beta1`. We encourage all customers to adjust their codebase from that interim beta endpoint to the `/v2` stable endpoint. In the near future we will setup permanent redirect from `/v2beta1` to `/v2` before we completely remove the beta endpoint. --- Note for people using the clients generated from this OAS spec. Currently OAS-3 doesn't have full support for representing SSE style responses from an API, so if you are using a generated client and don't specify a `since` and `until` there is a good chance the generated clients will hang waiting for the response to end. If you require the streaming capabilities we recommend not using the generated clients for this specific usecase until the OAS-3 standards come to a consensus on how to represent this correctly in OAS-3. - [Subscribe to Transfer Events (SSE) (Legacy)](https://docs.alpaca.markets/us/reference/subscribetotransferstatussse.md): **Deprecation notice** As part of the deprecation process, the legacy transfer events API is now only available for existing broker-partners at `GET /v1/events/transfers/status` and for compatibility reasons. All new broker partners will not have the option to use the legacy transfer events endpoint. They should integrate with the new `/v2/events/funding/status` endpoint instead. Also, all existing broker partners are now recommended to upgrade to the `/v2/events/funding/status` endpoint, which provides faster event delivery times. --- The Events API provides event push as well as historical queries via SSE (server sent events). You can listen to transfer status updates as they get processed by our backoffice, for both end-user and firm accounts. Historical events are streamed immediately if queried, and updates are pushed as events occur. Query Params Rules: - `since_id` and `until_id` are deprecated and available only to select broker partners; use `since_ulid` and `until_ulid` instead - `since` required if `until` specified - `since_id` required if `until_id` specified - `since_ulid` required if `until_ulid` specified - `since`, `since_id` or `since_ulid` can't be used at the same time Behavior: - if `since`, `since_id` or `since_ulid` not specified this will not return any historic data - if `until`, `until_id` or `until_ulid` reached stream will end (status 200) --- Note for people using the clients generated from this OAS spec. Currently OAS-3 doesn't have full support for representing SSE style responses from an API, so if you are using a generated client and don't specify a `since` and `until` there is a good chance the generated clients will hang waiting for the response to end. If you require the streaming capabilities we recommend not using the generated clients for this specific usecase until the OAS-3 standards come to a consensus on how to represent this correctly in OAS-3. - [Subscribe to Trade Events (SSE)](https://docs.alpaca.markets/us/reference/subscribetotradev2sse.md): The Events API provides event push as well as historical queries via SSE (server sent events). You can listen to events related to trade updates. Most market trades sent during market hours are filled instantly; you can listen to limit order updates through this endpoint. Historical events are streamed immediately if queried, and updates are pushed as events occur. Query Params Rules: - `since` required if `until` specified - `since_id` required if `until_id` specified - `since` and `since_id` can't be used at the same time Behavior: - if `since` or `since_id` not specified this will not return any historic data - if `until` or `until_id` reached stream will end (status 200) --- Note for people using the clients generated from this OAS spec. Currently OAS-3 doesn't have full support for representing SSE style responses from an API, so if you are using a generated client and don't specify a `since` and `until` there is a good chance the generated clients will hang waiting for the response to end. If you require the streaming capabilities we recommend not using the generated clients for this specific usecase until the OAS-3 standards come to a consensus on how to represent this correctly in OAS-3. --- **Legacy trade events API deprecation** The legacy v1 trade events endpoint has been fully deprecated and is no longer available. Use `/v2/events/trades` for all trade event integrations. --- ### Comment messages According to the SSE specification, any line that starts with a colon is a comment which does not contain data. It is typically a free text that does not follow any data schema. A few examples mentioned below for comment messages. ##### Slow client The server sends a comment when the client is not consuming messages fast enough. Example: `: you are reading too slowly, dropped 10000 messages` ##### Internal server error An error message is sent as a comment when the server closes the connection on an internal server error (only sent by the v2 and v2beta1 endpoints). Example: `: internal server error` --- **Common events** These are the events that are the expected results of actions you may have taken by sending API requests. The meaning of the timestamp field changes for each type; the meanings have been specified here for which types the timestamp field will be present. - `accepted` Sent when an order is received and accepted by Alpaca - `pending_new` Sent when the order has been received by Alpaca and routed to the exchanges, but has not yet been accepted for execution. - `new` Sent when an order has been routed to exchanges for execution. - `fill` Sent when your order has been completely filled. - timestamp: The time at which the order was filled. - `partial_fill` Sent when a number of shares less than the total remaining quantity on your order has been filled. - timestamp: The time at which the shares were filled. - `canceled` Sent when your requested cancellation of an order is processed. - timestamp: The time at which the order was canceled. - `expired` Sent when an order has reached the end of its lifespan, as determined by the order's time in force value. - timestamp: The time at which the order expired. - `done_for_day` Sent when the order is done executing for the day, and will not receive further updates until the next trading day. - `replaced` Sent when your requested replacement of an order is processed. - timestamp: The time at which the order was replaced. **Rarer events** These are events that may rarely be sent due to unexpected circumstances on the exchanges. It is unlikely you will need to design your code around them, but you may still wish to account for the possibility that they will occur. - `rejected` Sent when your order has been rejected. - timestamp: The time at which the rejection occurred. - `held` For multi-leg orders, the secondary orders (stop loss, take profit) will enter this state while waiting to be triggered. - `stopped` Sent when your order has been stopped, and a trade is guaranteed for the order, usually at a stated price or better, but has not yet occurred. - `pending_cancel` Sent when the order is awaiting cancellation. Most cancellations will occur without the order entering this state. - `pending_replace` Sent when the order is awaiting replacement. - `calculated` Sent when the order has been completed for the day - it is either filled or done_for_day - but remaining settlement calculations are still pending. - `suspended` Sent when the order has been suspended and is not eligible for trading. - `order_replace_rejected` Sent when the order replace has been rejected. - `order_cancel_rejected` Sent when the order cancel has been rejected. - `trade_bust`: Sent when a previously reported execution has been canceled ("busted") by the upstream exchange. - `trade_correct`: Sent when a previously reported trade has been corrected. For example, the exchange may have updated the price, quantity, or another execution parameter after the trade was initially reported. - `restated`: Sent when the order is manually modified. - [Subscribe to Admin Action Events (SSE)](https://docs.alpaca.markets/us/reference/subscribetoadminactionsse.md): The Events API provides event push as well as historical queries via SSE (server sent events). This endpoint streams events related to administrative actions performed by our systems. Historical events are streamed immediately if queried, and updates are pushed as events occur. Query Params Rules: - `since` required if `until` specified - `since_id` required if `until_id` specified - `since` and `since_id` can't be used at the same time Behavior: - if `since` or `since_id` not specified this will not return any historic data - if `until` or `until_id` reached stream will end (status 200) --- Warning: Currently OAS-3 doesn't have full support for representing SSE style responses from an API. In case the client code is generated from this OAS spec, don't specify a `since` and `until` there is a good chance the generated clients will hang forever waiting for the response to end. If you require the streaming capabilities we recommend not using the generated clients for this specific endpoint until the OAS-3 standards come to a consensus on how to represent this behavior in OAS-3. --- ### Comment messages According to the SSE specification, any line that starts with a colon is a comment which does not contain data. It is typically a free text that does not follow any data schema. A few examples mentioned below for comment messages. ##### Slow client The server sends a comment when the client is not consuming messages fast enough. Example: `: you are reading too slowly, dropped 10000 messages` ##### Internal server error An error message is sent as a comment when the server closes the connection on an internal server error (only sent by the v2 and v2beta1 endpoints). Example: `: internal server error` --- **Event Types** - **LegacyNote:** Old free text based admin notes - **Liquidation:** Event for a position liquidation which initialized by an admin - **TransactionCancel:** Event for a manually cancelled transaction - [Subscribe to Non-Trading Activities Events (SSE)](https://docs.alpaca.markets/us/reference/get-v1-events-nta.md): The Events API provides event push as well as historical queries via SSE (server sent events). You can listen to non-trading activities updates as they get processed by our backoffice, for both end-user and firm accounts. Historical events are streamed immediately if queried, and updates are pushed as events occur. You can listen to when NTAs are pushed such as CSDs, JNLC (journals) or FEEs. Query Params Rules: - `since_id` and `until_id` are deprecated and available only to select broker partners; use `since_ulid` and `until_ulid` instead - `since` required if `until` specified - `since_id` required if `until_id` specified - `since_ulid` required if `until_ulid` specified - `since`, `since_id` or `since_ulid` can't be used at the same time Behavior: - if `since`, `since_id` or `since_ulid` not specified this will not return any historic data - if `until`, `until_id` or `until_ulid` reached stream will end (status 200)' - [Subscribe to Funding Status Events (SSE)](https://docs.alpaca.markets/us/reference/subscribetofundingstatussse.md): The Events API provides event push as well as historical queries via SSE (server sent events). You can listen to funding status updates as they get processed by our backoffice, for both end-user and firm accounts. Historical events are streamed immediately if queried, and updates are pushed as events occur. Query Params Rules: - `since` required if `until` specified - `since_id` required if `until_id` specified - `since` and `since_id` can't be used at the same time - `until` and `until_id` can't be used at the same time Behavior: - if `since` or `since_id` not specified this will not return any historic data - if `until` or `until_id` reached stream will end (status 200) --- Note for people using the clients generated from this OAS spec. Currently OAS-3 doesn't have full support for representing SSE style responses from an API, so if you are using a generated client and don't specify a `since` and `until` there is a good chance the generated clients will hang waiting for the response to end. If you require the streaming capabilities we recommend not using the generated clients for this specific usecase until the OAS-3 standards come to a consensus on how to represent this correctly in OAS-3. - [Subscribe to System Events (SSE)](https://docs.alpaca.markets/us/reference/subscribetosystemeventv2sse.md): The Events API provides event push as well as historical queries via SSE (server sent events). You can listen to system event updates as they happen in our backend. Historical events are streamed immediately if queried, and updates are pushed as events occur. Query Params Rules: - `since` required if `until` specified - `since_id` required if `until_id` specified - `since` and `since_id` can't be used at the same time - `until` and `until_id` can't be used at the same time Behavior: - if `since` or `since_id` not specified this will not return any historic data - if `until` or `until_id` reached stream will end (status 200) --- Note for people using the clients generated from this OAS spec. Currently OAS-3 doesn't have full support for representing SSE style responses from an API, so if you are using a generated client and don't specify a `since` and `until` there is a good chance the generated clients will hang waiting for the response to end. If you require the streaming capabilities we recommend not using the generated clients for this specific usecase until the OAS-3 standards come to a consensus on how to represent this correctly in OAS-3. - [Subscribe to Activity Events (SSE)](https://docs.alpaca.markets/us/reference/subscribetoactivitiessse-1.md): The Events API sends the real-time events and provides historical queries with SSE (Server Sent Events). This endpoint streams events on account activities. Historical events are streamed immediately if queried, and updates are pushed as events occur. Query parameter rules: - If `until` is specified, `since` is required. - If `until_id` is specified, `since_id` is required. - You cannot use `since` and `since_id` together. Behavior: - If `since` or `since_id` is not specified, this will not return any historic data. - If `until` or `until_id` is specified, stream will end at the specified point with status 200. --- Warning: Currently, OAS-3 does not fully support responses from an SSE API. In case the client code is generated from this OAS spec, please do not specify `since` and `until`, as the generated client may hang forever waiting for the response to end. If you require the streaming capabilities, we recommend not using the generated clients for this specific endpoint until the OAS-3 standards define how to represent this behavior. --- ### Comment messages According to the SSE specification, any line that starts with a colon is a comment which does not contain data. It is typically a free text that does not follow any data schema. A few examples mentioned below for comment messages. ##### Slow client The server sends a comment when the client is not consuming messages fast enough. Example: `: you are reading too slowly, dropped 10000 messages` ##### Internal server error An error message is sent as a comment when the server closes the connection on an internal server error (only sent by the v2 and v2beta1 endpoints). Example: `: internal server error` --- - [Subscribe to IPO Events (SSE)](https://docs.alpaca.markets/us/reference/subscribetoipoeventssse.md): The Events API provides event push as well as historical queries via SSE (server sent events). You can listen to IPO offering lifecycle updates as they happen - including new offerings, offering updates, prospectus availability, the 60-minute pricing window, account-scoped allocation results, and offering cancellations. Historical events are streamed immediately if queried, and updates are pushed as events occur. --- **Event types** Each event has a `verb` field that determines the shape of `payload`. See the `IPOEvent` schema for the full payload structure for each verb. - `Offering` - initial publication of an offering (system-wide). - `OfferingUpdate` - update to a previously published offering (system-wide). - `Prospectus` - prospectus document is now available (system-wide). - `SixtyMinMail` - 60-minute pricing window has opened, no new orders accepted (system-wide). - `Allocation` - final allocation result for a specific account. **Account-scoped** - `account_id` and `correspondent` are populated. - `OfferingCancellation` - offering was cancelled. **No `payload` field is present.** Use the `offering_reference` field on each event to fetch the full offering metadata via [`GET /v1/ipos/{offering_reference}`](#operation/getIPOOffering). --- Query Params Rules: - `since` required if `until` specified - `since_id` required if `until_id` specified - `since` and `since_id` can't be used at the same time - `until` and `until_id` can't be used at the same time Behavior: - if `since` or `since_id` not specified this will not return any historic data - if `until` or `until_id` reached stream will end (status 200) --- Note for people using the clients generated from this OAS spec. Currently OAS-3 doesn't have full support for representing SSE style responses from an API, so if you are using a generated client and don't specify a `since` and `until` there is a good chance the generated clients will hang waiting for the response to end. If you require the streaming capabilities we recommend not using the generated clients for this specific usecase until the OAS-3 standards come to a consensus on how to represent this correctly in OAS-3. - [Retrieve Bank Relationships for an Account](https://docs.alpaca.markets/us/reference/getrecipientbanks.md): Retrieves Bank Relationships for an account - [Create a Bank Relationship for an Account](https://docs.alpaca.markets/us/reference/createrecipientbank.md): If successful, retrieves Bank Relationships for an account - [Delete a Bank Relationship for an Account](https://docs.alpaca.markets/us/reference/deleterecipientbank.md): If successful, deletes Bank Relationship for an account - [Retrieve List of Transfers for an Account.](https://docs.alpaca.markets/us/reference/gettransfersforaccount.md): You can query a list of transfers for an account. You can filter requested transfers by values such as direction and status. Returns a list of transfer entities ordered by created_at - [Request a New Transfer](https://docs.alpaca.markets/us/reference/createtransferforaccount.md): Create a new transfer to deposit money into or withdraw money from an account. Two `transfer_type` values are accepted, and both are available in sandbox and production: - **`ach`** — supports both `INCOMING` (deposit) and `OUTGOING` (withdrawal) directions. A `relationship_id` from a previously created [ACH Relationship](https://docs.alpaca.markets/reference/createachrelationshipforaccount) is required. - **`wire`** — supports the `OUTGOING` (withdrawal) direction only. Incoming wires cannot be initiated through this endpoint; they are pushed in by the sending bank and recorded automatically. A `bank_id` from a previously created [Bank Relationship](https://docs.alpaca.markets/reference/createrecipientbank) is required, and the bank must be in `APPROVED` status before the transfer will progress past `QUEUED`. In the sandbox environment, ACH deposits and withdrawals settle instantly against virtual funds. Outgoing wire withdrawals are accepted and simulated end-to-end — no funds are transmitted to a bank, but the transfer progresses to `COMPLETE` and the account is debited against virtual funds. Sandbox wire withdrawals are asynchronous (not instant) and auto-complete on weekdays only; transfers submitted on a weekend will not progress until Monday. For more on funding accounts in sandbox, see [this tutorial](https://alpaca.markets/learn/fund-broker-api/). - [Request to Close a Transfer](https://docs.alpaca.markets/us/reference/deletetransfer.md): Request to close a transfer - [Retrieve ACH Relationships for an account](https://docs.alpaca.markets/us/reference/getaccountachrelationships.md): Returns a list of ACH Relationships for an account - [Create an ACH Relationship](https://docs.alpaca.markets/us/reference/createachrelationshipforaccount.md): Create a new ACHRelationship for an account If successful, will return 200 code with a newly created ACH Relationship entity. - [Delete an existing ACH relationship](https://docs.alpaca.markets/us/reference/deleteachrelationshipfromaccount.md): Delete an existing ACH relationship for an account - [Retrieve JIT Reports](https://docs.alpaca.markets/us/reference/get-v1-transfers-jit-reports.md): Retrieves a JIT report for the requested report type and system date. By default, the report is returned inline. For large reports, use response_type=download_url to receive a temporary signed download URL. - [Retrieve Daily Trading Limits](https://docs.alpaca.markets/us/reference/get-v1-transfers-jit-limits.md): The JIT Securities daily trading limit is set at the correspondent level and is used as the limit for the total amount due to Alpaca on the date of settlement. The limit in use returns the real time usage of this limit and is calculated by taking the net of trade and non-trade activity inflows and outflows. If the limit in use reaches the daily net limit, further purchasing activity will be halted, however, the limit can be adjusted by reaching out to Alpaca with the proposed new limit and the reason for the change. The limit is reset at the start of every trading day at 8.00 PM ET - [Retrieve JIT Ledgers](https://docs.alpaca.markets/us/reference/get-v1-transfers-jit-ledgers.md): Returns an array of objects that correspond to each ledger account, each of whichcontain the following attributes. - [Retrieve JIT Ledger Balances](https://docs.alpaca.markets/us/reference/get-v1-transfers-jit-ledger_id-balances.md): Returns an array of objects that correspond to each ledger account. - [List all JIT Settlements](https://docs.alpaca.markets/us/reference/get-v1-jit-settlements.md): Returns all JIT settlements filtered by status if provided. - [Create a new JIT settlement](https://docs.alpaca.markets/us/reference/post-v1-jit-settlements.md): Creates a new JIT settlement, which will trigger the reconciliation process for all included accounts. There is a limit of 150,000 accounts per settlement. If more than 150,000 accounts need to be settled, they should be batched in multiple settlements. - [Get a single JIT settlement](https://docs.alpaca.markets/us/reference/get-v1-jit-settlements-single.md): Returns the JIT settlement specified by the path parameter. - [Create sandbox deposit transfer](https://docs.alpaca.markets/us/reference/demodepositfunding.md): Simulates an inbound deposit into an account's funding wallet for end-to-end testing of the deposit flow. The transfer can only credit accounts that belong to your firm. Available in non-production (sandbox) environments only. - [Batch create funding wallets](https://docs.alpaca.markets/us/reference/batchcreatefundingwallets.md): Creates funding wallets for a list of accounts in a single request. Every `account_id` in the request must belong to your firm, and the request is rejected if a funding wallet already exists for any of the supplied accounts. - [Retrieve funding wallet](https://docs.alpaca.markets/us/reference/getfundingwallet.md): Returns the funding wallet for the specified account. Responds with 404 if the account has not been onboarded to funding wallets or a wallet has not been created. - [Creates a funding wallet](https://docs.alpaca.markets/us/reference/createfundingwallet.md): Creates a funding wallet for the specified account. The request is rejected if the account already has a funding wallet. - [Retrieve funding details](https://docs.alpaca.markets/us/reference/listfundingdetails.md): Returns a list of funding details if it exists. Query parameters must be passed to create a new funding details object if none exist. - [Retrieve funding wallet transfers](https://docs.alpaca.markets/us/reference/getfundingwallettransfers.md): Returns all funding wallet transfers (deposits and withdrawals) associated with the specified account. - [Retrieve funding wallet transfer by ID](https://docs.alpaca.markets/us/reference/getfundingwallettransferbyid.md): Returns a single funding wallet transfer for the specified account by `transfer_id`. Responds with 404 if no matching transfer exists for the account. - [Retrieve recipient bank](https://docs.alpaca.markets/us/reference/getfundingwalletrecipientbank.md): Returns the recipient bank registered against the specified account's funding wallet. Responds with 404 if no recipient bank has been registered for the account. - [Create a recipient bank](https://docs.alpaca.markets/us/reference/createfundingwalletrecipientbank.md): Creates a new recipient bank. Returns the new recipient bank entity on success. entity. - [Delete a recipient bank](https://docs.alpaca.markets/us/reference/deletefundingwalletrecipientbank.md): deletes a recipient bank. - [Create a withdrawal](https://docs.alpaca.markets/us/reference/createfundingwalletwithdrawal.md): Creates a withdrawal - [Get Instant Funding List](https://docs.alpaca.markets/us/reference/get-v1-instant-funding-list.md): Returns a list of instant funding records based on the query parameters. The results are paginated, sorted, and filtered based on the parameters provided. - [Create an instant funding request](https://docs.alpaca.markets/us/reference/post-v1-instant-funding.md): Creates an instant funding request. The request will be processed and the funds will be made available to the account in the form of a Memopost non trade activity. Upon settlement the Memoposted will be corrected to a CSD activity. **Idempotency**: When the `Idempotency-Key` header is supplied, this endpoint is idempotent. Multiple requests with the same key and identical request body will create only one transfer. A subsequent request returns the previously created transfer with the same response (no duplicate is created). If the same key is used with a different request body, the API returns `422 Unprocessable Entity`. **Recommended for production**: Always supply `Idempotency-Key` when creating transfers. This allows safe retries on timeouts, network errors, or 5xx responses without risking duplicate transfers. Use a client-generated unique value (e.g. UUID). - [Get an instant funding request](https://docs.alpaca.markets/us/reference/get-v1-instant-funding-single.md): Returns an instant funding transfer based on the ID supplied. - [Cancel an instant funding request](https://docs.alpaca.markets/us/reference/delete-v1-instant-funding-single.md): Cancels a single instant funding request based on the ID supplied if possible. - [List settlements](https://docs.alpaca.markets/us/reference/get-v1-instant-funding-settlements.md): Returns all settlements filtered by status if provided. - [Create a new settlement](https://docs.alpaca.markets/us/reference/post-v1-instant-funding-settlements.md): Creates a new settlement, which will trigger the reconciliation process for all included transfers and their interests. There is a limit of 50,000 transfers per settlement. If more than 50,000 transfers need to be settled, they should be batched in multiple settlements. - [Get a single settlement](https://docs.alpaca.markets/us/reference/get-v1-instant-funding-settlements-single.md): Returns the settlement specified by the path parameter. - [Get instant funding limits](https://docs.alpaca.markets/us/reference/get-v1-instant-funding-correspondent-limits.md): Returns globally configured limits for the correspondent. These limits are used to determine the maximum amount that can be extended to all accounts, and reaching this limit will result in further requests to create instant funding requests being rejected. - [Get instant funding account limits](https://docs.alpaca.markets/us/reference/get-v1-instant-funding-account-limits.md): Returns the limits for individual partner accounts. - [Get instant funding report](https://docs.alpaca.markets/us/reference/get-v1-instant-funding-reports.md): Returns instant funding reports which are to be used for daily reconciliation reporting. - [Get an OAuth client](https://docs.alpaca.markets/us/reference/getoauthclient.md): The endpoint returns the details of OAuth client to display in the authorization page. - [Issue an OAuth token](https://docs.alpaca.markets/us/reference/issueoauthtoken.md): The operation issues an OAuth code which can be used in the OAuth code flow. - [Authorize an OAuth Token](https://docs.alpaca.markets/us/reference/authorizeoauthtoken.md): The operation issues an OAuth code which can be used in the OAuth code flow. - [Retrieve a List Journals](https://docs.alpaca.markets/us/reference/getalljournals.md): Returns an array of journal objects. - [Create a Journal](https://docs.alpaca.markets/us/reference/createjournal.md): A journal can be JNLC (move cash) or JNLS (move shares), dictated by `entry_type`. Generally, journal requests are subject to approval and starts from the `pending` status. The status changes are propagated through the Event API. Under certain conditions agreed for the partner, such journal transactions that meet the criteria are executed right away. **Idempotency**: When the `Idempotency-Key` header is supplied, this endpoint is idempotent. Multiple requests with the same key and identical request body will create only one journal. A subsequent request returns the previously created journal with the same response (no duplicate is created). If the same key is used with a different request body, the API returns `422 Unprocessable Entity`. **Recommended for production**: Always supply `Idempotency-Key` when creating journals. This allows safe retries on timeouts, network errors, or 5xx responses without risking duplicate journals. Use a client-generated unique value (e.g. UUID). - [Cancel a Pending Journal](https://docs.alpaca.markets/us/reference/deletejournalbyid.md): You can only delete a journal if the journal is still in a pending state, if a journal is executed you will not be able to delete. The alternative is to create a mirror journal entry to reverse the flow of funds. - [Retrieve a Single Journal Entry](https://docs.alpaca.markets/us/reference/get-v1-journals-journal_id.md): You can query a specific journal entry that you submitted to Alpaca by passing into the query the journal_id. Will return a journal entry if a journal entry with journal_id exists, otherwise will throw an error. - [Create a Batch Journal Transaction (One-to-Many)](https://docs.alpaca.markets/us/reference/createbatchjournal.md): You can create a batch of journal requests by using this endpoint. This is enabled on JNLC type Journals for now only. Every single request must be valid for the entire batch operation to succeed. In the case of a successful request, the response will contain an array of journal objects with an extra attribute error_message in the case when a specific account fails to receive a journal. **Idempotency**: When the `Idempotency-Key` header is supplied, this endpoint is idempotent. Multiple requests with the same key and identical request body will create only one batch. A subsequent request returns the previously created batch with the same response (no duplicate is created). If the same key is used with a different request body, the API returns `422 Unprocessable Entity`. **Recommended for production**: Always supply `Idempotency-Key` when creating journal batches. This allows safe retries on timeouts, network errors, or 5xx responses without risking duplicate batches. Use a client-generated unique value (e.g. UUID). - [Create a Reverse Batch Journal Transaction (Many-to-One)](https://docs.alpaca.markets/us/reference/post-v1-journals-reverse_batch.md): You can also create a batch journal request by using the following endpoint. This is enabled on JNLC for now only. Note that if there is an invalid account_id the whole batch operation will be canceled. Every single request must be valid for the entire batch operation to succeed. In the case of a successful request, the response will contain an array of journal objects with an extra attribute error_message in the case when a specific account fails to submit a journal. - [Retrieve Announcements](https://docs.alpaca.markets/us/reference/getcorporateannouncements.md): This endpoint is deprecated, please use [the new corporate actions endpoint](https://docs.alpaca.markets/reference/corporateactions-1) instead. - [Retrieve a Specific Announcement](https://docs.alpaca.markets/us/reference/get-get-v1-corporate_actions-announcements-id.md): This endpoint is deprecated, please use [the new corporate actions endpoint](https://docs.alpaca.markets/reference/corporateactions-1) instead. - [Retrieve all Watchlists for an Account](https://docs.alpaca.markets/us/reference/getallwatchlistsforaccount.md): Fetch a list of all watchlists currently in an account. - [Create a New Watchlist for an Account](https://docs.alpaca.markets/us/reference/createwatchlistforaccount.md): Returns the watchlist object - [Manage watchlists](https://docs.alpaca.markets/us/reference/getwatchlistforaccountbyid.md): Retrieve Watchlist by ID - [Update a Watchlist](https://docs.alpaca.markets/us/reference/replacewatchlistforaccountbyid.md): Replace entirely the set of securities contained in the watchlist while optionally renaming it. Destructive operation. - [Remove a Watchlist](https://docs.alpaca.markets/us/reference/deletewatchlistfromaccountbyid.md): Irrevocably delete a watchlist. - [Add an Asset to a Watchlist](https://docs.alpaca.markets/us/reference/post-v1-trading-accounts-account_id-watchlists-watchlist_id.md): Adds an asset to an existing watchlist. - [Remove a Symbol from a Watchlist](https://docs.alpaca.markets/us/reference/delete-delete-v1-trading-accounts-account_id-watchlists-watchlist_id-symbol.md): Delete one entry for an asset by symbol name - [Upload CIP information](https://docs.alpaca.markets/us/reference/post-v1-accounts-account_id-cip.md): The customer identification program (CIP) API allows you to submit the CIP results received from your KYC provider. The minimum requirements to open an individual financial account are delimited and you must verify the true identity of the account holder at account opening: Name Date of birth Address Identification number (for a U.S. citizen, a taxpayer identification number) - [Retrieve CIP information](https://docs.alpaca.markets/us/reference/get-v1-accounts-account_id-cip.md): You can retrieve the CIP information you've submitted for a given account. - [Retrieve an Onfido SDK Token](https://docs.alpaca.markets/us/reference/get-v1-accounts-account_id-onfido-sdk-tokens.md): Get an SDK token to activate the Onfido SDK flow within your app. You will have to keep track of the SDK token so you can pass it back when you upload the SDK outcome. We recommend storing the token in memory rather than persistent storage to reduce any unnecessary overhead in your app. - [Update the Onfido SDK Outcome](https://docs.alpaca.markets/us/reference/patch-v1-accounts-account_id-onfido-sdk.md): This request allows you to send Alpaca the result of the Onfido SDK flow in your app. A notification of a successful outcome is required for Alpaca to continue the KYC process. - [List Portfolios](https://docs.alpaca.markets/us/reference/get-v1-rebalancing-portfolios.md): Lists portfolios. When more than one query parameter is passed, only portfolios meeting all provided values will be returned (logical AND between parameter values). - [Create Portfolio](https://docs.alpaca.markets/us/reference/post-v1-rebalancing-portfolios.md): Creates a portfolio allocation containing securities and/or cash. Having no rebalancing conditions is allowed but the rebalance event would need to be triggered manually. Portfolios created with API may have multiple rebalance_conditions, but only one of type calendar. - [Get Portfolio by ID](https://docs.alpaca.markets/us/reference/get-v1-rebalancing-portfolios-portfolio_id.md): Get a portfolio by its ID. - [Update Portfolio by ID](https://docs.alpaca.markets/us/reference/patch-v1-rebalancing-portfolios-portfolio_id.md): Updates a portfolio. If weights or conditions are changed, all subscribed accounts will be evaluated for rebalancing at the next opportunity (normal market hours). If a cooldown is active on the portfolio, the rebalancing will occur after the cooldown expired. - [Inactivate Portfolio By ID](https://docs.alpaca.markets/us/reference/delete-v1-rebalancing-portfolios-portfolio_id.md): Archives a portfolio (soft delete). Only permitted when the portfolio has no active subscriptions. Archived portfolios are hidden from the default list response and cannot be used for new subscriptions. - [List All Subscriptions](https://docs.alpaca.markets/us/reference/get-v1-rebalancing-subscriptions.md): Lists subscriptions - [Create Subscription](https://docs.alpaca.markets/us/reference/post-v1-rebalancing-subscriptions.md): Creates a subscription between an account and a portfolio. - [Get Subscription by ID](https://docs.alpaca.markets/us/reference/get-v1-rebalancing-subscriptions-subscription_id.md): Get a subscription by its ID. - [Unsubscribe Account (Delete Subscription)](https://docs.alpaca.markets/us/reference/delete-v1-rebalancing-subscriptions-subscription_id.md): Deletes the subscription which stops the rebalancing of an account. - [List All Runs.](https://docs.alpaca.markets/us/reference/get-v1-rebalancing-runs.md): Lists runs. - [Create Run (Manual rebalancing event)](https://docs.alpaca.markets/us/reference/post-v1-rebalancing-runs.md): Manually creates a run. The determination of a run's orders and the execution of a run take place during normal market hours Runs can be initiated either by the system (when the system evaluates the rebalance conditions specified at the portfolio level) or by API call (manual run creation using POST /v1/rebalancing/runs). Runs can be initiated manually outside of the normal market hours but will remain in the QUEUED status until normal market hours Only 1 run in a non-terminal status is allowed at any time. Manually executing a run is currently only allowed for accounts who do not have an active subscription. - [Get Run by ID](https://docs.alpaca.markets/us/reference/get-v1-rebalancing-runs-run_id.md): Get a run by its ID. - [Cancel Run by ID](https://docs.alpaca.markets/us/reference/delete-v1-rebalancing-runs-run_id.md): Cancels a run. Only runs within certain statuses (QUEUED, CANCELED, SELLS_IN_PROGRESS, BUYS_IN_PROGRESS) are cancelable. If this endpoint is called after orders have been submitted, we'll attempt to cancel the orders. - [Get Logo](https://docs.alpaca.markets/us/reference/get-v1beta1-logos-symbol.md): Alpaca's Logo API serves uniform logo images for select stock and crypto symbols. Note: For Logo API pricing details, reach out to sales@alpaca.markets The API response will return the raw image as a binary - [Retrieve Aggregate Positions](https://docs.alpaca.markets/us/reference/get-v1-reporting-eod-aggregate_positions.md): This API endpoint provides reporting data to partners for aggregate common stock and crypto positions across their account base. Partners can view historical snapshots of their holding across their entire account base. Please note that this API utilizes an 8:00 pm (EST) cutoff which aligns with the end of the Securities extended hours trading session as well as Alpaca's 24 hour Crypto trading window. Additionally, the endpoint supports indexing to help the partner efficiently filter by key information including date and symbol while being able to include or remove firm accounts. - [Retrieve EOD Positions](https://docs.alpaca.markets/us/reference/get-v1-reporting-eod-positions.md): This API retrieves a comprehensive list of end-of-day positions for all accounts. End-of-day (EOD) positions are typically accessible after 4:00 am Eastern Time (ET) on the following day, providing a comprehensive view of the day's closing positions across all accounts. This API currently only supports retrieving EOD positions for the last trading date. - [Retrieve EOD Cash Interest Details](https://docs.alpaca.markets/us/reference/get-v1-get-eod-cash-interest-report.md): This API retrieves a list of cash interest details for the given date(s) for a single account or all accounts. End-of-day (EOD) details are typically accessible after 8:00pm Eastern Time (ET) and reflect that day's ending state across cash balances, accrued interest, accrued fees, as well as additional ancillary details. - [Retrieve countries information](https://docs.alpaca.markets/us/reference/querycountryinfos.md): The Country Info API serves country information for every supported countries including risk ratings and supported crypto states where applicable. - [Retrieve Crypto Funding Wallets](https://docs.alpaca.markets/us/reference/listcryptofundingwallets-1.md): Lists wallets for the account given in the path parameter. If an asset is specified and no wallet for the account and asset pair exists one will be created. If no asset is specified only existing wallets will be listed for the account. An account may have at most one wallet per asset. - [Retrieve Crypto Funding Transfers](https://docs.alpaca.markets/us/reference/listcryptofundingtransfers-1.md): Returns an array of all transfers associated with the given account across all wallets. - [Request a New Withdrawal](https://docs.alpaca.markets/us/reference/createcryptotransferforaccount-1.md): Creates a withdrawal request. Note that outgoing withdrawals must be sent to a whitelisted address and you must whitelist addresses at least 24 hours in advance. If you attempt to withdraw funds to a non-whitelisted address then the transfer will be rejected. - [Retrieve a Crypto Funding Transfer](https://docs.alpaca.markets/us/reference/getcryptofundingtransfer-1.md): Returns a specific wallet transfer by passing into the query the transfer_id. - [An array of whitelisted addresses](https://docs.alpaca.markets/us/reference/listwhitelistedaddress-1.md): Returns the list of whitelisted withdrawal addresses for the specified account. - [Request a new whitelisted address](https://docs.alpaca.markets/us/reference/createwhitelistedaddress-1.md): Submits a new whitelisted withdrawal address for the specified account. The chain is derived from the supplied asset symbol and address, and the same address cannot be whitelisted twice on the same chain. Where travel rule reporting applies to the account, address details are validated against the travel rule provider before being persisted. Note that whitelisted addresses must wait at least 24 hours before they can be used as a withdrawal destination. - [Delete a whitelisted address](https://docs.alpaca.markets/us/reference/deletewhitelistedaddress-1.md): Deletes a whitelisted withdrawal address from the specified account by ID. Subsequent withdrawals targeting the deleted address will be rejected. - [Returns the estimated gas fee for a proposed transaction.](https://docs.alpaca.markets/us/reference/getcryptotransferestimate-1.md): Returns the estimated on-chain network (gas) fee for a proposed crypto withdrawal at current chain conditions. Pass the `asset`, `from_address`, `to_address`, and `amount` you intend to send; the response reports the network fee that would be charged for the corresponding transaction. - [Retrieve Excess Contributions](https://docs.alpaca.markets/us/reference/listiraexcesscontritbutions.md): Returns all overcontributed IRA accounts - [List APR Tiers](https://docs.alpaca.markets/us/reference/get-v1-list-apr-tiers.md): List all available APR tiers. These tiers may be assigned to an account, and will be used to determine the interest rate paid on uninvested cash balances. - [List FPSL Tiers](https://docs.alpaca.markets/us/reference/get-v1-list-fpsl-tiers.md): List all available FPSL tiers. These tiers may be assigned to an account. - [List FPSL Loans](https://docs.alpaca.markets/us/reference/get-v1-list-fpsl-loans.md): Returns a list of all FPSL loans that match the specified filter criteria, ordered in ascending order by `date`, `account_number`, and `symbol`. Each entry represents a loan of a `symbol` on a given `date`, made on behalf of the specified `account_number`. - [Read FPSL Loans Analytics for an Account](https://docs.alpaca.markets/us/reference/get-v1-fpsl-analytics-account-loans.md): Returns aggregated FPSL interest and loan-activity counts for one account over a date range. Use this for "earned so far this month" customer UIs and for supervisory spot-checks against your internal accrual model. The `{account_id}` path parameter accepts a account UUID (aggregation for that account). - [Mint a Tokenized Asset](https://docs.alpaca.markets/us/reference/posttokenizationmintbroker.md): This endpoint is used by an Authorized Participant to request the minting of a tokenized asset. Alpaca will initiate a journal of the underlying asset from the Authorized Participant's account to the issuer's account. **Idempotency**: When the `Idempotency-Key` header is supplied, this endpoint is idempotent. Multiple requests with the same key and identical request body will create only one mint request. A subsequent request returns the previously created request with the same response (no duplicate is created). If the same key is used with a different request body, the API returns `422 Unprocessable Entity`. **Recommended for production**: Always supply `Idempotency-Key` when requesting a mint. This allows safe retries on timeouts, network errors, or 5xx responses without risking duplicate requests. Use a client-generated unique value (e.g. UUID). - [Redeem a Tokenized Asset](https://docs.alpaca.markets/us/reference/posttokenizationredeem.md): This endpoint is used by the tokenized asset issuer to confirm the redemption of tokens previously held in the Authorized Participant's wallet. When the issuer invokes this endpoint, Alpaca will initiate a journal of the underlying asset into the Authorized Participant's account. **Idempotency**: When the `Idempotency-Key` header is supplied, this endpoint is idempotent. Multiple requests with the same key and identical request body will create only one redeem request. A subsequent request returns the previously created request with the same response (no duplicate is created). If the same key is used with a different request body, the API returns `422 Unprocessable Entity`. **Recommended for production**: Always supply `Idempotency-Key` when requesting a redemption. This allows safe retries on timeouts, network errors, or 5xx responses without risking duplicate requests. Use a client-generated unique value (e.g. UUID). - [List Tokenization Requests](https://docs.alpaca.markets/us/reference/gettokenizationrequestsbroker.md): Retrieve tokenization requests for the account. This endpoint may be used by the tokenized asset issuer or by an Authorized Participant (AP). The list can contain both mint and redeem requests. - [Confirm Tokenized Asset Minted](https://docs.alpaca.markets/us/reference/posttokenizationcallbackmint.md): This endpoint is used by the issuer to confirm the minting of tokenized assets previously requested by the Authorized Participant. - [Get Tokenization Request by ID](https://docs.alpaca.markets/us/reference/gettokenizationrequestbyidbroker.md): Retrieve a single tokenization request by its `tokenization_request_id`. This endpoint may be used by the tokenized asset issuer or by an Authorized Participant (AP), and returns either a mint or a redeem request. - [Get Tokenization Request by `client_request_id`](https://docs.alpaca.markets/us/reference/gettokenizationrequestbyclientrequestidbroker.md): Retrieve a single tokenization request by the Authorized Participant's `client_request_id`, the AP-supplied label originally passed on the mint request. Available to Authorized Participants and to issuers that are affiliated with the AP. Returns the matching mint request. If the AP has reused a `client_request_id` across multiple requests, the most recently created request is returned. - [Get Tokenization Request by `issuer_request_id`](https://docs.alpaca.markets/us/reference/gettokenizationrequestbyissuerrequestidbroker.md): Retrieve a single tokenization request by the `issuer_request_id`. Returns either a mint or a redeem request. Can be called by issuers only. - [List IPO Offerings](https://docs.alpaca.markets/us/reference/listipoofferings.md): Returns a paginated list of IPO offerings currently known to Alpaca. Use this endpoint to power IPO discovery surfaces (e.g. an "Upcoming IPOs" list). Real-time lifecycle changes (availability, prospectus, 60-minute mail, allocations, cancellations) are pushed over the [IPO Events Stream](#operation/subscribeToIPOEventsSSE). - [Retrieve an IPO Offering](https://docs.alpaca.markets/us/reference/getipooffering.md): Returns a single IPO offering by `offering_reference`. The `offering_reference` value matches the one delivered on the [IPO Events Stream](#operation/subscribeToIPOEventsSSE). ## Changelog - [Schema examples migrated to standard OpenAPI 3.1 examples](https://docs.alpaca.markets/us/changelog/2026-08-17-examples-b21c8a8.md) - [New "binance" and "coinbase" tokenization issuers](https://docs.alpaca.markets/us/changelog/2026-08-13-tokenization-issuers-2d0be8b.md) - [New ROC (Return of Capital) dividend activity sub-type](https://docs.alpaca.markets/us/changelog/2026-08-12-roc-42b472e.md) - [New "reason" field on Broker trade events](https://docs.alpaca.markets/us/changelog/2026-08-12-reason-e11b7f1.md) - [JIT settlement supports up to 150,000 accounts](https://docs.alpaca.markets/us/changelog/2026-08-10-jit-settlement-a5b9174.md) - [New Fixed Income latest prices and quotes endpoints](https://docs.alpaca.markets/us/changelog/2026-08-07-fixed-income-78ccc44.md) - [New REO (Reorganization) activity type](https://docs.alpaca.markets/us/changelog/2026-08-07-reo-954a46c.md) - [Cronos and HyperEVM added to the tokenization network enum](https://docs.alpaca.markets/us/changelog/2026-08-06-tokenization-networks-2ae1e81.md) - [Broker API description upgraded to OpenAPI 3.1.2](https://docs.alpaca.markets/us/changelog/2026-08-05-openapi-3-1-f0dd393.md) - [Trading API description upgraded to OpenAPI 3.1](https://docs.alpaca.markets/us/changelog/2026-08-05-openapi-3-1-584790f.md)