# Alpaca API Docs Documentation ## Guides - [About Broker API](https://docs.alpaca.markets/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. - [Accounts Statuses](https://docs.alpaca.markets/docs/accounts-statuses.md) - [Data Validations](https://docs.alpaca.markets/docs/data-validations.md) - [Domestic (USA) Accounts](https://docs.alpaca.markets/docs/domestic-usa-accounts.md) - [Customer Account Opening](https://docs.alpaca.markets/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. # - [International Accounts](https://docs.alpaca.markets/docs/international-accounts.md) - [IRA Accounts Overview](https://docs.alpaca.markets/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. - [24/5 Trading](https://docs.alpaca.markets/docs/245-trading.md) - [ACAT API](https://docs.alpaca.markets/docs/acat-api.md) - [FDIC Sweep Program](https://docs.alpaca.markets/docs/fdic-sweep-program.md) - [Fixed Income](https://docs.alpaca.markets/docs/fixed-income.md) - [Fully Paid Securities Lending](https://docs.alpaca.markets/docs/fully-paid-securities-lending.md) - [Broker API FAQs](https://docs.alpaca.markets/docs/broker-api-faq.md): Frequently Asked Questions - [Instant Funding](https://docs.alpaca.markets/docs/instant-funding-1.md): Frequently Asked Instant Funding Questions - [Mandatory Corporate Actions](https://docs.alpaca.markets/docs/mandatory-corporate-actions.md): Frequently Asked Mandatory Corporate Action Questions - [OmniSub](https://docs.alpaca.markets/docs/omnisub.md) - [Voluntary Corporate Actions](https://docs.alpaca.markets/docs/voluntary-corporate-actions.md): Frequently Asked Voluntary Corporate Action Questions - [Trading](https://docs.alpaca.markets/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. - [Credentials Management](https://docs.alpaca.markets/docs/credential-management.md) - [Crypto Wallets API](https://docs.alpaca.markets/docs/crypto-wallets-api.md) - [Crypto Trading](https://docs.alpaca.markets/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. - [Custodial accounts](https://docs.alpaca.markets/docs/custodial-accounts.md) - [Banking Holiday Funding Processes](https://docs.alpaca.markets/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). - [Daily Processes and Reconcilations](https://docs.alpaca.markets/docs/daily-processes-and-reconcilations.md) - [Example Trading App (Ribbit)](https://docs.alpaca.markets/docs/example-trading-app-ribbit.md) - [Fixed Income](https://docs.alpaca.markets/docs/fixed-income-1.md): This guide provides a comprehensive reference for integrating U.S. Treasuries and U.S. Corporate Bonds into your platform. - [ACH Funding](https://docs.alpaca.markets/docs/ach-funding.md) - [Journals API](https://docs.alpaca.markets/docs/funding-via-journals.md) - [Funding Wallets](https://docs.alpaca.markets/docs/funding-wallets.md) - [Funding Accounts](https://docs.alpaca.markets/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. - [Instant Funding](https://docs.alpaca.markets/docs/instant-funding.md) - [Getting Started with Broker API](https://docs.alpaca.markets/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/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. - [Local Currency Trading (LCT)](https://docs.alpaca.markets/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. - [Options Trading Overview](https://docs.alpaca.markets/docs/options-trading-overview.md) - [Portfolio Rebalancing](https://docs.alpaca.markets/docs/portfolio-rebalancing.md) - [Account Status Events for KYCaaS](https://docs.alpaca.markets/docs/account-status-events-for-kycaas.md) - [SSE Events](https://docs.alpaca.markets/docs/sse-events.md) - [Statements and Confirms](https://docs.alpaca.markets/docs/statements-and-confirms.md) - [Tokenization Guide for Authorized Participant](https://docs.alpaca.markets/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. - [Tokenization Guide for Issuer](https://docs.alpaca.markets/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. - [Use Cases](https://docs.alpaca.markets/docs/use-cases.md) - [About Connect API](https://docs.alpaca.markets/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/docs/registering-your-app.md) - [Using OAuth2 and Trading API](https://docs.alpaca.markets/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. - [FIX Specification](https://docs.alpaca.markets/docs/fix-messages.md): This document describes the implementation of the FIX 4.2 protocol used by Alpaca to enable order entry via FIX. - [About FIX API](https://docs.alpaca.markets/docs/5f36ea05-b1b4-5fd1-91b5-ef51db361a4b.md): Alpaca FIX (Financial Information eXchange) API - [About Alpaca](https://docs.alpaca.markets/docs/about-alpaca.md) - [Additional Resources](https://docs.alpaca.markets/docs/additional-resources.md) - [Alpaca API Platform](https://docs.alpaca.markets/docs/alpaca-api-platform.md) - [Authentication](https://docs.alpaca.markets/docs/authentication.md) - [Welcome](https://docs.alpaca.markets/docs/getting-started.md): This page will help you get started with Alpaca Docs. You'll be up and running in a jiffy! - [SDKs and Tools](https://docs.alpaca.markets/docs/sdks-and-tools.md) - [About Market Data API](https://docs.alpaca.markets/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/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 Crypto Data](https://docs.alpaca.markets/docs/historical-crypto-data-1.md) - [Historical News Data](https://docs.alpaca.markets/docs/historical-news-data.md) - [Historical Option Data](https://docs.alpaca.markets/docs/historical-option-data.md) - [Historical Stock Data](https://docs.alpaca.markets/docs/historical-stock-data-1.md) - [Historical API](https://docs.alpaca.markets/docs/historical-api.md) - [Market Data FAQ](https://docs.alpaca.markets/docs/market-data-faq.md): Frequently Asked Questions - [WebSocket Stream](https://docs.alpaca.markets/docs/streaming-market-data.md) - [Real-time Crypto Data](https://docs.alpaca.markets/docs/real-time-crypto-pricing-data.md) - [Real-time Option Data](https://docs.alpaca.markets/docs/real-time-option-data.md) - [Real-time Stock Data](https://docs.alpaca.markets/docs/real-time-stock-pricing-data.md) - [Real-time News](https://docs.alpaca.markets/docs/streaming-real-time-news.md) - [Account Activities](https://docs.alpaca.markets/docs/account-activities.md): The account activities API provides access to a historical record of transaction activities that have impacted your account. - [Trading Account](https://docs.alpaca.markets/docs/account-plans.md) - [DMA Gateway / Advanced Order Types](https://docs.alpaca.markets/docs/alpaca-elite-smart-router.md): Take Control of Your Trades with Direct Market Access Gateway and Advanced Order Types - [Alpaca's MCP Server](https://docs.alpaca.markets/docs/alpaca-mcp-server.md): Turn your words into action with Alpaca’s MCP Server - [Crypto Spot Trading Fees](https://docs.alpaca.markets/docs/crypto-fees.md) - [Crypto Orders](https://docs.alpaca.markets/docs/crypto-orders.md) - [Crypto Pricing Data](https://docs.alpaca.markets/docs/crypto-pricing-data.md): Alpaca provides free limited crypto data and a more advanced unlimited paid plan. - [Crypto Spot Trading](https://docs.alpaca.markets/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. - [Fractional Trading](https://docs.alpaca.markets/docs/fractional-trading.md) - [Getting Started with Trading API](https://docs.alpaca.markets/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/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/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/docs/working-with-orders.md): Learn how to submit orders to Alpaca. - [Working with /positions](https://docs.alpaca.markets/docs/working-with-positions.md) - [Margin and Short Selling](https://docs.alpaca.markets/docs/margin-and-short-selling.md) - [Options Trading](https://docs.alpaca.markets/docs/options-trading.md): We're excited to support options trading! Use this section to read up on Alpaca's options trading capabilities. - [Non-Trade Activities for Option Events](https://docs.alpaca.markets/docs/non-trade-activities-for-option-events.md): This page provides an overview of new NTAs for options-specific events - [Options Level 3 Trading](https://docs.alpaca.markets/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. - [Options Orders](https://docs.alpaca.markets/docs/options-orders.md): This page provides examples of valid order payloads - [Placing Orders](https://docs.alpaca.markets/docs/orders-at-alpaca.md) - [Paper Trading](https://docs.alpaca.markets/docs/paper-trading.md): Test your algos in our paper environment. Free and available to all Alpaca users. - [Regulatory Fees](https://docs.alpaca.markets/docs/regulatory-fees.md) - [24/5 Trading](https://docs.alpaca.markets/docs/245-trading-for-trading-api.md) - [Position Average Entry Price Calculation](https://docs.alpaca.markets/docs/position-average-entry-price-calculation.md): How is the average entry price of a position is calculated? - [About Trading API](https://docs.alpaca.markets/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. - [User Protection](https://docs.alpaca.markets/docs/user-protection.md) - [Websocket Streaming](https://docs.alpaca.markets/docs/websocket-streaming.md): Learn how to stream market data using Websockets. ## API Reference - [About Alpaca-py](https://docs.alpaca.markets/reference/api-references.md) - [Issue tokens](https://docs.alpaca.markets/reference/issuetokens.md): Exchange client credentials for an access token - [Create an Account](https://docs.alpaca.markets/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. - [Get An Account by ID](https://docs.alpaca.markets/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. - [Retrieve Account Activities](https://docs.alpaca.markets/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/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. - [Get All Accounts](https://docs.alpaca.markets/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. - [Retrieve Trading Details for an Account](https://docs.alpaca.markets/reference/gettradingaccount.md): As a broker you can view more trading details about your users. The response is a Trading Account model. - [Update an Account](https://docs.alpaca.markets/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. - [Get Pattern Day Trader Status for account](https://docs.alpaca.markets/reference/pdtgetstatus.md): Retrieves the account’s pattern day trader status - [Exercise PDT one time removal](https://docs.alpaca.markets/reference/pdtonetimeremoval.md): Requests the exercise of pattern day trader one time removal for given account - [Close an Account](https://docs.alpaca.markets/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 options level approval requests (BETA)](https://docs.alpaca.markets/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. - [Request options trading for an account (BETA)](https://docs.alpaca.markets/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 Entry Requirements for requested assets](https://docs.alpaca.markets/reference/get-asset-entry-requirements.md): Returns all entry-requirements - [Get an option contract by ID or Symbol (BETA)](https://docs.alpaca.markets/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 Option Contracts (BETA)](https://docs.alpaca.markets/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. - [Retrieve an Asset by ID](https://docs.alpaca.markets/reference/getassetbysymbolorid.md): Returns the requested asset, if found - [Retrieve All Assets](https://docs.alpaca.markets/reference/getassets.md): Returns all assets - [Get US corporates](https://docs.alpaca.markets/reference/uscorporates-1.md): Serves the list of US corporates available at Alpaca. The response is sorted by ISIN. - [Get US treasuries](https://docs.alpaca.markets/reference/ustreasuries-1.md): Serves the list of US treasuries available at Alpaca. The response is sorted by ISIN. - [Get Market Calendar](https://docs.alpaca.markets/reference/calendar-6.md): This endpoint returns the market calendar. - [Get Market Clock](https://docs.alpaca.markets/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. - [Get US Market Calendar](https://docs.alpaca.markets/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 US Market Clock](https://docs.alpaca.markets/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. - [List APR Tiers](https://docs.alpaca.markets/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. - [Retrieve a Specific Announcement](https://docs.alpaca.markets/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 Announcements](https://docs.alpaca.markets/reference/getcorporateannouncements.md): This endpoint is deprecated, please use [the new corporate actions endpoint](https://docs.alpaca.markets/reference/corporateactions-1) instead. - [Retrieve countries information](https://docs.alpaca.markets/reference/querycountryinfos.md): The Country Info API serves country information for every supported countries including risk ratings and supported crypto states where applicable. - [Request a New Withdrawal](https://docs.alpaca.markets/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. - [Request a new whitelisted address](https://docs.alpaca.markets/reference/createwhitelistedaddress-1.md) - [Delete a whitelisted address](https://docs.alpaca.markets/reference/deletewhitelistedaddress-1.md) - [Retrieve a Crypto Funding Transfer](https://docs.alpaca.markets/reference/getcryptofundingtransfer-1.md): Returns a specific wallet transfer by passing into the query the transfer_id. - [Returns the estimated gas fee for a proposed transaction.](https://docs.alpaca.markets/reference/getcryptotransferestimate-1.md) - [Retrieve Crypto Funding Transfers](https://docs.alpaca.markets/reference/listcryptofundingtransfers-1.md): Returns an array of all transfers associated with the given account across all wallets. - [Retrieve Crypto Funding Wallets](https://docs.alpaca.markets/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. - [An array of whitelisted addresses](https://docs.alpaca.markets/reference/listwhitelistedaddress-1.md) - [Download an Account Document](https://docs.alpaca.markets/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/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. - [Retrieve a List of Account Documents](https://docs.alpaca.markets/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/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. - [Subscribe to Non-Trading Activities Events (SSE)](https://docs.alpaca.markets/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` 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 Admin Action Events (SSE)](https://docs.alpaca.markets/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/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_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 Journal Events (SSE) (Legacy)](https://docs.alpaca.markets/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` 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/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_ulid` 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/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_ulid` 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) (Legacy)](https://docs.alpaca.markets/reference/subscribetotradesse.md): **Deprecation notice** As part of the deprecation process, the legacy trade events API is now only available for existing broker-partners at: `GET /v1/events/trades` only for compatibility reasons. All new broker partners will not have the option for the legacy trade event endpoint. All new broker partners will have to integrate with the new `/v2/events/trades` endpoint. Also, all existing broker partners are now recommended to upgrade to the `/v2/events/trades` endpoint, which provides faster event delivery times. For trade events of MLeg (multi-leg) order, please use the `/v2/events/trades` endpoint. 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. --- 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_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. --- **Deprecation note** Legacy event id (integer based) is unavailable for new broker partners, and it will be deprecated for existing brokers as well. This deprecation is includes the `since_id` and `until_id` query parameter and the `event_id` field in the response. --- **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. - `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. - [Subscribe to Trade Events (SSE)](https://docs.alpaca.markets/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 notice** As part of the deprecation process, the legacy trade events API is now only available for existing broker-partners at: `GET /v1/events/trades` only for compatibility reasons. All new broker partners will not have the option for the legacy trade event endpoint. All new broker partners will have to integrate with the new `/v2/events/trades` endpoint. Also, all existing broker partners are now recommended to upgrade to the `/v2/events/trades` endpoint, which provides faster event delivery times. The legacy trade events api works the same way as the new one with the exception of the event_id which is an integer except of an ULID. This results in the request’s since_id and until_id are also being integers. This integer is monotonically increasing over time for events. 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. --- ### 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 Transfer Events (SSE) (Legacy)](https://docs.alpaca.markets/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` 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 Account Status Events (SSE)](https://docs.alpaca.markets/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 - pattern_day_trader - status - trading_blocked Only the changed properties are included in the event payload. Query Parameter Rules: - `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. - [List FPSL Loans](https://docs.alpaca.markets/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/reference/get-v1-list-fpsl-tiers.md): List all available FPSL tiers. These tiers may be assigned to an account. - [Batch create funding wallets](https://docs.alpaca.markets/reference/batchcreatefundingwallets.md) - [Creates a funding wallet](https://docs.alpaca.markets/reference/createfundingwallet.md) - [Create a recipient bank](https://docs.alpaca.markets/reference/createfundingwalletrecipientbank.md): Creates a new recipient bank. Returns the new recipient bank entity on success. entity. - [Create a withdrawal](https://docs.alpaca.markets/reference/createfundingwalletwithdrawal.md): Creates a withdrawal - [Delete a recipient bank](https://docs.alpaca.markets/reference/deletefundingwalletrecipientbank.md): deletes a recipient bank. - [Create sandbox deposit transfer](https://docs.alpaca.markets/reference/demodepositfunding.md) - [Retrieve funding wallet](https://docs.alpaca.markets/reference/getfundingwallet.md) - [Retrieve recipient bank](https://docs.alpaca.markets/reference/getfundingwalletrecipientbank.md) - [Retrieve funding wallet transfer by ID](https://docs.alpaca.markets/reference/getfundingwallettransferbyid.md) - [Retrieve funding wallet transfers](https://docs.alpaca.markets/reference/getfundingwallettransfers.md) - [Retrieve funding details](https://docs.alpaca.markets/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. - [Create an ACH Relationship](https://docs.alpaca.markets/reference/createachrelationshipforaccount.md): Create a new ACHRelationship for an account If successful, will return 200 code with a newly created ACH Relationship entity. - [Create a Bank Relationship for an Account](https://docs.alpaca.markets/reference/createrecipientbank.md): If successful, retrieves Bank Relationships for an account - [Request a New Transfer](https://docs.alpaca.markets/reference/createtransferforaccount.md): Create a new transfer to an account to fund it. In the sandbox environment, you can instantly deposit to or withdraw from an account with a virtual money amount. In the production environment, this endpoint is used only for requesting an outgoing (withdrawal) wire transfer at this moment. For the wire transfer (in production), you need to create a bank resource first using the Bank API. For more on how to fund an account in sandbox please check out this tutorial [here](https://alpaca.markets/learn/fund-broker-api/). - [Delete an existing ACH relationship](https://docs.alpaca.markets/reference/deleteachrelationshipfromaccount.md): Delete an existing ACH relationship for an account - [Delete a Bank Relationship for an Account](https://docs.alpaca.markets/reference/deleterecipientbank.md): If successful, deletes Bank Relationship for an account - [Request to Close a Transfer](https://docs.alpaca.markets/reference/deletetransfer.md): Request to close a transfer - [Get a single JIT settlement](https://docs.alpaca.markets/reference/get-v1-jit-settlements-single.md): Returns the JIT settlement specified by the path parameter. - [List all JIT Settlements](https://docs.alpaca.markets/reference/get-v1-jit-settlements.md): Returns all JIT settlements filtered by status if provided. - [Retrieve JIT Ledger Balances](https://docs.alpaca.markets/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/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/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. - [Retrieve JIT Reports](https://docs.alpaca.markets/reference/get-v1-transfers-jit-reports.md): Returns all JIT reports - [Retrieve ACH Relationships for an account](https://docs.alpaca.markets/reference/getaccountachrelationships.md): Returns a list of ACH Relationships for an account - [Retrieve Bank Relationships for an Account](https://docs.alpaca.markets/reference/getrecipientbanks.md): Retrieves Bank Relationships for an account - [Retrieve List of Transfers for an Account.](https://docs.alpaca.markets/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 - [Create a new JIT settlement](https://docs.alpaca.markets/reference/post-v1-jit-settlements.md): Creates a new JIT settlement, which will trigger the reconciliation process for all included accounts. - [Cancel an instant funding request](https://docs.alpaca.markets/reference/delete-v1-instant-funding-single.md): Cancels a single instant funding request based on the ID supplied if possible. - [Get instant funding account limits](https://docs.alpaca.markets/reference/get-v1-instant-funding-account-limits.md): Returns the limits for individual partner accounts. - [Get instant funding limits](https://docs.alpaca.markets/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 List](https://docs.alpaca.markets/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. - [Get instant funding report](https://docs.alpaca.markets/reference/get-v1-instant-funding-reports.md): Returns instant funding reports which are to be used for daily reconciliation reporting. - [Get a single settlement](https://docs.alpaca.markets/reference/get-v1-instant-funding-settlements-single.md): Returns the settlement specified by the path parameter. - [List settlements](https://docs.alpaca.markets/reference/get-v1-instant-funding-settlements.md): Returns all settlements filtered by status if provided. - [Get an instant funding request](https://docs.alpaca.markets/reference/get-v1-instant-funding-single.md): Returns an instant funding transfer based on the ID supplied. - [Create a new settlement](https://docs.alpaca.markets/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. - [Create an instant funding request](https://docs.alpaca.markets/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). - [Retrieve Excess Contributions](https://docs.alpaca.markets/reference/listiraexcesscontritbutions.md): Returns all overcontributed IRA accounts - [Create a Batch Journal Transaction (One-to-Many)](https://docs.alpaca.markets/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 Journal](https://docs.alpaca.markets/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/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/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. - [Retrieve a List Journals](https://docs.alpaca.markets/reference/getalljournals.md): Returns an array of journal objects. - [Create a Reverse Batch Journal Transaction (Many-to-One)](https://docs.alpaca.markets/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 CIP information](https://docs.alpaca.markets/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/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/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. - [Upload CIP information](https://docs.alpaca.markets/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) - [Get Logo](https://docs.alpaca.markets/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 - [Authorize an OAuth Token](https://docs.alpaca.markets/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/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/reference/issueoauthtoken.md): The operation issues an OAuth code which can be used in the OAuth code flow. - [Get Account Portfolio History](https://docs.alpaca.markets/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. - [Inactivate Portfolio By ID](https://docs.alpaca.markets/reference/delete-v1-rebalancing-portfolios-portfolio_id.md): Sets a portfolio to “inactive”, so it can be filtered out of the list request. Only permitted if there are no active subscriptions to this portfolio and this portfolio is not a listed in the weights of any active portfolios. Inactive portfolios cannot be linked in new subscriptions or added as weights to new portfolios. - [Cancel Run by ID](https://docs.alpaca.markets/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. - [Unsubscribe Account (Delete Subscription)](https://docs.alpaca.markets/reference/delete-v1-rebalancing-subscriptions-subscription_id.md): Deletes the subscription which stops the rebalancing of an account. - [Get Portfolio by ID](https://docs.alpaca.markets/reference/get-v1-rebalancing-portfolios-portfolio_id.md): Get a portfolio by its ID. - [List Portfolios](https://docs.alpaca.markets/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). - [Get Run by ID](https://docs.alpaca.markets/reference/get-v1-rebalancing-runs-run_id.md): Get a run by its ID. - [List All Runs](https://docs.alpaca.markets/reference/get-v1-rebalancing-runs.md): Lists runs. - [Get Subscription by ID](https://docs.alpaca.markets/reference/get-v1-rebalancing-subscriptions-subscription_id.md): Get a subscription by its ID. - [List All Subscriptions](https://docs.alpaca.markets/reference/get-v1-rebalancing-subscriptions.md): Lists subscriptions - [Update Portfolio by ID](https://docs.alpaca.markets/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. - [Create Portfolio](https://docs.alpaca.markets/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. - [Create Run (Manual rebalancing event)](https://docs.alpaca.markets/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. - [Create Subscription](https://docs.alpaca.markets/reference/post-v1-rebalancing-subscriptions.md): Creates a subscription between an account and a portfolio. - [Retrieve EOD Cash Interest Details](https://docs.alpaca.markets/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 Aggregate Positions](https://docs.alpaca.markets/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/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. - [List Tokenization Requests](https://docs.alpaca.markets/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/reference/posttokenizationcallbackmint.md): This endpoint is used by the issuer to confirm the minting of tokenized assets previously requested by the Authorized Participant. - [Mint a Tokenized Asset](https://docs.alpaca.markets/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. - [Redeem a Tokenized Asset](https://docs.alpaca.markets/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. - [Close All Positions for an Account](https://docs.alpaca.markets/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. - [Close a Position for an Account](https://docs.alpaca.markets/reference/closepositionforaccountbysymbol.md): Closes (liquidates) the account’s open position for the given symbol. Works for both long and short positions. - [Create an Order for an Account](https://docs.alpaca.markets/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. - [Cancel all Open Orders For an Account](https://docs.alpaca.markets/reference/deleteallordersforaccount.md): Attempts to cancel all open orders. A response will be provided for each order that is attempted to be cancelled. - [Cancel an Open Order](https://docs.alpaca.markets/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 real-time Trading Limits for an Account](https://docs.alpaca.markets/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. - [Bulk Fetch All Accounts Positions](https://docs.alpaca.markets/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-1) instead. - [Estimate an Order](https://docs.alpaca.markets/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. - [Retrieve a List of Orders](https://docs.alpaca.markets/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/reference/getorderbyclientorderidforaccount.md): Retrieves a single order specified by the client order ID. - [Retrieve an Order by its ID](https://docs.alpaca.markets/reference/getorderforaccount.md): Retrieves a single order for the given order_id. - [List Open Positions for an Account](https://docs.alpaca.markets/reference/getpositionsforaccount.md): List open positions for an account - [Get an Open Position for account by Symbol or AssetId](https://docs.alpaca.markets/reference/getpositionsforaccountbysymbol.md): Retrieves the account’s open position for the given symbol or asset_id. - [Do Not Exercise an Options Position (BETA)](https://docs.alpaca.markets/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. - [Exercise an Options Position (BETA)](https://docs.alpaca.markets/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. - [Update Trading Configurations for an Account](https://docs.alpaca.markets/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. - [Replace an Order](https://docs.alpaca.markets/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 cannot be replaced. Any attempt to modify a notional order via this endpoint will be rejected. To change a notional order, cancel it and submit a new one. - [Create a New Watchlist for an Account](https://docs.alpaca.markets/reference/createwatchlistforaccount.md): Returns the watchlist object - [Remove a Symbol from a Watchlist](https://docs.alpaca.markets/reference/delete-delete-v1-trading-accounts-account_id-watchlists-watchlist_id-symbol.md): Delete one entry for an asset by symbol name - [Remove a Watchlist](https://docs.alpaca.markets/reference/deletewatchlistfromaccountbyid.md): Irrevocably delete a watchlist. - [Retrieve all Watchlists for an Account](https://docs.alpaca.markets/reference/getallwatchlistsforaccount.md): Fetch a list of all watchlists currently in an account. - [Manage watchlists](https://docs.alpaca.markets/reference/getwatchlistforaccountbyid.md): Retrieve Watchlist by ID - [Add an Asset to a Watchlist](https://docs.alpaca.markets/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/reference/replacewatchlistforaccountbyid.md): Replace entirely the set of securities contained in the watchlist while optionally renaming it. Destructive operation. - [Corporate actions](https://docs.alpaca.markets/reference/corporateactions-1.md): This endpoint provides data about the corporate actions for each given symbol over a specified time period. > ⚠️ 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. - [Historical bars](https://docs.alpaca.markets/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/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/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/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/reference/cryptolatesttrades-1.md): The latest trades endpoint returns the latest trade data for the crypto symbols provided. - [Historical quotes](https://docs.alpaca.markets/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/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/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/reference/fixedincomelatestprices.md): This endpoint returns the latest prices for the given fixed income securities. - [Latest rates for currency pairs](https://docs.alpaca.markets/reference/latestrates-1.md): Get the latest forex rates for the given currency pairs. - [Historical rates for currency pairs](https://docs.alpaca.markets/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/reference/logos-5.md): Get the image of the company logo for the given symbol. - [News articles](https://docs.alpaca.markets/reference/news-3.md): Returns the latest news articles across stocks and crypto. By default, returns the latest 10 news articles. - [Historical bars](https://docs.alpaca.markets/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. - [Option chain](https://docs.alpaca.markets/reference/optionchain.md): The option chain endpoint provides the latest trade, latest quote, and greeks for each contract symbol of the underlying symbol. - [Latest quotes](https://docs.alpaca.markets/reference/optionlatestquotes.md): The latest multi-quotes endpoint provides the latest bid and ask prices for each given contract symbol. - [Latest trades](https://docs.alpaca.markets/reference/optionlatesttrades.md): The latest multi-trades endpoint provides the latest historical trade data for multiple given contract symbols. - [Condition codes](https://docs.alpaca.markets/reference/optionmetaconditions.md): Returns the mapping between the condition codes and names. - [Exchange codes](https://docs.alpaca.markets/reference/optionmetaexchanges.md): Returns the mapping between the option exchange codes and the corresponding exchange names. - [Snapshots](https://docs.alpaca.markets/reference/optionsnapshots.md): The snapshots endpoint provides the latest trade, latest quote and greeks for each given contract symbol. - [Historical trades](https://docs.alpaca.markets/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. - [Most active stocks](https://docs.alpaca.markets/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/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. - [Historical auctions](https://docs.alpaca.markets/reference/stockauctions-1.md): The historical auctions endpoint provides auction prices for a list of stock symbols between the specified dates. - [Historical auctions (single)](https://docs.alpaca.markets/reference/stockauctionsingle-1.md): The historical auctions endpoint provides auction prices for the given stock symbol between the specified dates. - [Historical bars](https://docs.alpaca.markets/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. - [Historical bars (single symbol)](https://docs.alpaca.markets/reference/stockbarsingle-1.md): The historical stock bars API provides aggregates for the stock symbol between the specified dates. - [Latest bars](https://docs.alpaca.markets/reference/stocklatestbars-1.md): The latest bars endpoint provides the latest minute bar for the given ticker symbols. - [Latest bar (single symbol)](https://docs.alpaca.markets/reference/stocklatestbarsingle-1.md): The latest bar endpoint returns the latest minute bar for the given ticker symbol. - [Latest quotes](https://docs.alpaca.markets/reference/stocklatestquotes-1.md): The latest quotes endpoint provides the latest best bid and ask prices for the given ticker symbols. - [Latest quote (single symbol)](https://docs.alpaca.markets/reference/stocklatestquotesingle-1.md): The latest quote endpoint provides the latest best bid and ask prices for a given ticker symbol. - [Latest trades](https://docs.alpaca.markets/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). - [Latest trade (single symbol)](https://docs.alpaca.markets/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). - [Condition codes](https://docs.alpaca.markets/reference/stockmetaconditions-1.md): Returns the mapping between the condition codes and names. - [Exchange codes](https://docs.alpaca.markets/reference/stockmetaexchanges-1.md): Returns the mapping between the stock exchange codes and the corresponding exchange names. - [Historical quotes](https://docs.alpaca.markets/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. - [Historical quotes (single symbol)](https://docs.alpaca.markets/reference/stockquotesingle-1.md): The historical stock quotes API provides quote data for a stock symbol between the specified dates. - [Snapshots](https://docs.alpaca.markets/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. - [Snapshot (single symbol)](https://docs.alpaca.markets/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](https://docs.alpaca.markets/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. - [Historical trades (single symbol)](https://docs.alpaca.markets/reference/stocktradesingle-1.md): The historical stock trades API provides trade data for a stock symbol between the specified dates. - [Retrieve Account Activities](https://docs.alpaca.markets/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/reference/getaccountactivitiesbyactivitytype-1.md): Returns account activity entries for a specific type of activity. - [Get Account Configurations](https://docs.alpaca.markets/reference/getaccountconfig-1.md): gets the current account configuration values - [Account Configurations](https://docs.alpaca.markets/reference/patchaccountconfig-1.md): Updates and returns the current account configuration values - [Get Account](https://docs.alpaca.markets/reference/getaccount-1.md): Returns your account details. - [Get an option contract by ID or Symbol](https://docs.alpaca.markets/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 Option Contracts](https://docs.alpaca.markets/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 Assets](https://docs.alpaca.markets/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/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 US corporates](https://docs.alpaca.markets/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/reference/ustreasuries.md): Serves the list of US treasuries available at Alpaca. The response is sorted by ISIN. - [Get Market Calendar](https://docs.alpaca.markets/reference/calendar-2.md): This endpoint returns the market calendar. - [Get Market Clock](https://docs.alpaca.markets/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. - [Get US Market Calendar](https://docs.alpaca.markets/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/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. - [Retrieve Announcements](https://docs.alpaca.markets/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. - [Retrieve a Specific Announcement](https://docs.alpaca.markets/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. - [Request a New Withdrawal](https://docs.alpaca.markets/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. - [Request a new whitelisted address](https://docs.alpaca.markets/reference/createwhitelistedaddress.md) - [Delete a whitelisted address](https://docs.alpaca.markets/reference/deletewhitelistedaddress.md) - [Retrieve a Crypto Funding Transfer](https://docs.alpaca.markets/reference/getcryptofundingtransfer.md): Returns a specific wallet transfer by passing into the query the transfer_id. - [Returns the estimated gas fee for a proposed transaction.](https://docs.alpaca.markets/reference/getcryptotransferestimate.md) - [Retrieve Crypto Funding Transfers](https://docs.alpaca.markets/reference/listcryptofundingtransfers.md): Returns an array of all transfers associated with the given account across all wallets. - [Retrieve Crypto Funding Wallets](https://docs.alpaca.markets/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. - [An array of whitelisted addresses](https://docs.alpaca.markets/reference/listwhitelistedaddress.md) - [Delete All Orders](https://docs.alpaca.markets/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. - [Delete Order by ID](https://docs.alpaca.markets/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. - [Get All Orders](https://docs.alpaca.markets/reference/getallorders-1.md): Retrieves a list of orders for the account, filtered by the supplied query parameters. - [Get Order by Client Order ID](https://docs.alpaca.markets/reference/getorderbyclientorderid.md): Retrieves a single order specified by the client order ID. - [Get Order by ID](https://docs.alpaca.markets/reference/getorderbyorderid-1.md): Retrieves a single order for the given order_id. - [Replace Order by ID](https://docs.alpaca.markets/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 cannot be replaced. Any attempt to modify a notional order via this endpoint will be rejected. To change a notional order, cancel it and submit a new one. - [Create an Order](https://docs.alpaca.markets/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 Account Portfolio History](https://docs.alpaca.markets/reference/getaccountportfoliohistory-1.md): Returns timeseries data about equity and profit/loss (P/L) of the account in requested timespan. - [Do Not Exercise an Options Position](https://docs.alpaca.markets/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. - [Close All Positions](https://docs.alpaca.markets/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. - [Close a Position](https://docs.alpaca.markets/reference/deleteopenposition-1.md): Closes (liquidates) the account’s open position for the given symbol. Works for both long and short positions. - [All Open Positions](https://docs.alpaca.markets/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 - [Get an Open Position](https://docs.alpaca.markets/reference/getopenposition-1.md): Retrieves the account’s open position for the given symbol or assetId. - [Exercise an Options Position](https://docs.alpaca.markets/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. - [List Tokenization Requests](https://docs.alpaca.markets/reference/gettokenizationrequests.md): An Authorized Participant can use this endpoint to list the tokenization requests performed on the Instant Tokenization Network (ITN). - [Mint a Tokenized Asset](https://docs.alpaca.markets/reference/posttokenizationmint.md): This endpoint is used by an Authorized Participant to request the minting of a tokenized asset. - [Add Asset to Watchlist](https://docs.alpaca.markets/reference/addassettowatchlist-1.md): Append an asset for the symbol to the end of watchlist asset list - [Add Asset to Watchlist By Name](https://docs.alpaca.markets/reference/addassettowatchlistbyname-1.md): Append an asset for the symbol to the end of watchlist asset list - [Delete Watchlist By Id](https://docs.alpaca.markets/reference/deletewatchlistbyid-1.md): Delete a watchlist. This is a permanent deletion. - [Delete Watchlist By Name](https://docs.alpaca.markets/reference/deletewatchlistbyname-1.md): Delete a watchlist. This is a permanent deletion. - [Get Watchlist by ID](https://docs.alpaca.markets/reference/getwatchlistbyid-1.md): Returns a watchlist identified by the ID. - [Get Watchlist by Name](https://docs.alpaca.markets/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 - [Get All Watchlists](https://docs.alpaca.markets/reference/getwatchlists-1.md): Returns the list of watchlists registered under the account. - [Create Watchlist](https://docs.alpaca.markets/reference/postwatchlist-1.md): Create a new watchlist with initial set of assets. - [Delete Symbol from Watchlist](https://docs.alpaca.markets/reference/removeassetfromwatchlist-1.md): Delete one entry for an asset by symbol name - [Update Watchlist By Id](https://docs.alpaca.markets/reference/updatewatchlistbyid-1.md): Update the name and/or content of watchlist - [Update Watchlist By Name](https://docs.alpaca.markets/reference/updatewatchlistbyname-1.md): Update the name and/or content of watchlist