openapi: 3.0.0 info: description: Connect brokerage accounts to your app for live positions and trading version: 1.0.0 title: SnapTrade termsOfService: N/A contact: email: api@snaptrade.com x-konfig-ignore: potential-incorrect-type: true x-readme: explorer-enabled: false servers: - description: SnapTrade Production API url: https://api.snaptrade.com security: - PartnerSignature: [] PartnerClientId: [] PartnerTimestamp: [] tags: - name: API Status description: Check whether the API is operational and verify timestamps. - name: Authentication description: Register and authenticate users with SnapTrade. - name: Connections description: Retrieve and manage user connections. - name: Account Information description: Retrieve account information, such as positions, balances, etc. - name: Transactions And Reporting description: Retrieve information on account transactions, performance, dividends, contributions, etc. - name: Trading description: Manage orders on user accounts. - name: Reference Data description: Retrieve basic information for API use, such as supported brokerages, exchanges, currencies, etc. - name: Webhooks description: Reach out directly to SnapTrade to enable webhooks in order to be notified when certain events occur. - name: Options description: Endpoints to search for options prices and chains as well as place options trades if supported. - name: Experimental endpoints description: Endpoints that are experimental and may have breaking changes in the future. Use with caution. paths: /: get: tags: - API Status summary: Get API Status description: Check whether the API is operational and verify timestamps. operationId: ApiStatus_check security: [] responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/Status" default: description: Unexpected Error /snapTrade/listUsers: get: tags: - Authentication summary: List all users operationId: Authentication_listSnapTradeUsers description: Returns a list of all registered user IDs. Please note that the response is not currently paginated. responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/UserList" "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/400FailedRequestResponse" "404": description: Not Found content: application/json: schema: $ref: "#/components/schemas/404FailedRequestResponse" "500": description: Unexpected Error content: application/json: schema: $ref: "#/components/schemas/500UnexpectedExceptionResponse" /snapTrade/registerUser: post: tags: - Authentication summary: Register user description: | Registers a new SnapTrade user under your Client ID. A user secret will be automatically generated for you and must be properly stored in your system. Most SnapTrade operations require a user ID and user secret to be passed in as parameters. operationId: Authentication_registerSnapTradeUser requestBody: $ref: "#/components/requestBodies/RegisterUserRequestBody" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/UserIDandSecret" "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/400FailedRequestResponse" "404": description: Not Found content: application/json: schema: $ref: "#/components/schemas/404FailedRequestResponse" "500": description: Unexpected Error content: application/json: schema: $ref: "#/components/schemas/500UnexpectedExceptionResponse" /snapTrade/deleteUser: delete: tags: - Authentication summary: Delete user operationId: Authentication_deleteSnapTradeUser description: Deletes a registered user and all associated data. This action is irreversible. This API is asynchronous and will return a 200 status code if the request is accepted. The user and all associated data will be queued for deletion. Once deleted, a `USER_DELETED` webhook will be sent. parameters: - in: query required: true name: userId schema: $ref: "#/components/schemas/UserID" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/DeleteUserResponse" "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/400FailedRequestResponse" "403": description: Forbidden content: application/json: schema: $ref: "#/components/schemas/403FailedRequestResponse" "404": description: Not Found content: application/json: schema: $ref: "#/components/schemas/404FailedRequestResponse" "500": description: Unexpected Error /snapTrade/login: post: tags: - Authentication summary: Generate Connection Portal URL operationId: Authentication_loginSnapTradeUser description: | Authenticates a SnapTrade user and returns the Connection Portal URL used for connecting brokerage accounts. Please check [this guide](/docs/implement-connection-portal) for how to integrate the Connection Portal into your app. Please note that the returned URL expires in 5 minutes. parameters: - in: query required: true name: userId schema: $ref: "#/components/schemas/UserID" - in: query required: true name: userSecret schema: $ref: "#/components/schemas/UserSecret" requestBody: $ref: "#/components/requestBodies/SnapTradeLoginUserRequestBody" responses: "200": description: OK content: application/json: schema: oneOf: - $ref: "#/components/schemas/LoginRedirectURI" - $ref: "#/components/schemas/encryptedResponse" "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/400FailedRequestResponse" "403": description: Forbidden content: application/json: schema: $ref: "#/components/schemas/403FailedRequestResponse" "404": description: Not Found content: application/json: schema: $ref: "#/components/schemas/404FailedRequestResponse" "500": description: Unexpected Error /snapTrade/resetUserSecret: post: tags: - Authentication summary: Rotate user secret description: | Rotates the secret for a SnapTrade user. You might use this if `userSecret` is compromised. Please note that if you call this endpoint and fail to save the new secret, you'll no longer be able to access any data for this user, and your only option will be to delete and recreate the user, then ask them to reconnect. operationId: Authentication_resetSnapTradeUserSecret requestBody: $ref: "#/components/requestBodies/ResetUserSecretRequestBody" responses: "200": description: New user secret is generated content: application/json: schema: $ref: "#/components/schemas/UserIDandSecret" "400": description: Bad Request. Could be caused by various reasons. Error message is provided in response content: application/json: schema: $ref: "#/components/schemas/400FailedRequestResponse" "401": description: Failed authentication. Wrong clientId, userId or userSecret provided content: application/json: schema: $ref: "#/components/schemas/401FailedRequestResponse" "500": description: Unexpected error content: application/json: schema: $ref: "#/components/schemas/500UnexpectedExceptionResponse" /snapTrade/partners: get: tags: - Reference Data summary: Get Client Info description: Returns configurations for your SnapTrade Client ID, including allowed brokerages and data access. operationId: ReferenceData_getPartnerInfo parameters: [] responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/PartnerData" "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/400FailedRequestResponse" "401": description: Unauthorized content: application/json: schema: $ref: "#/components/schemas/401FailedRequestResponse" "404": description: Not Found content: application/json: schema: $ref: "#/components/schemas/404FailedRequestResponse" "500": description: Unexpected Error /snapTrade/tradeDetection/subscriptions: get: tags: - Experimental endpoints summary: List active Trade Detection subscriptions description: Returns active Trade Detection subscriptions for your Client ID. Cancelled subscriptions are not returned. operationId: TradeDetection_listSubscriptions responses: "200": description: Active Trade Detection subscriptions content: application/json: schema: type: array items: $ref: "#/components/schemas/TradeDetectionSubscription" "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/400FailedRequestResponse" "401": description: Unauthorized content: application/json: schema: $ref: "#/components/schemas/401FailedRequestResponse" "403": description: Feature not enabled content: application/json: schema: $ref: "#/components/schemas/403FeatureNotEnabledResponse" "404": description: Not Found content: application/json: schema: $ref: "#/components/schemas/404FailedRequestResponse" "500": description: Unexpected Error post: tags: - Experimental endpoints summary: Add a Trade Detection subscription description: | Adds or restores a Trade Detection subscription for a connected brokerage account. This endpoint requires `userId` and `userSecret` in addition to the partner signature. operationId: TradeDetection_addSubscription parameters: - in: query required: true name: userId schema: $ref: "#/components/schemas/UserID" - in: query required: true name: userSecret schema: $ref: "#/components/schemas/UserSecret" requestBody: $ref: "#/components/requestBodies/CreateTradeDetectionSubscriptionRequestBody" responses: "200": description: Restored an existing cancelled Trade Detection subscription content: application/json: schema: $ref: "#/components/schemas/TradeDetectionSubscription" "201": description: Created a new Trade Detection subscription content: application/json: schema: $ref: "#/components/schemas/TradeDetectionSubscription" "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/400FailedRequestResponse" "401": description: Unauthorized content: application/json: schema: $ref: "#/components/schemas/401FailedRequestResponse" "403": description: Feature not enabled content: application/json: schema: $ref: "#/components/schemas/403FeatureNotEnabledResponse" "404": description: Not Found content: application/json: schema: $ref: "#/components/schemas/404FailedRequestResponse" "500": description: Unexpected Error /snapTrade/tradeDetection/subscriptions/cancel: post: tags: - Experimental endpoints summary: Cancel a Trade Detection subscription description: | Cancels a Trade Detection subscription for a connected brokerage account. This endpoint requires partner signature authentication only and does not require `userId` or `userSecret`. operationId: TradeDetection_cancelSubscription requestBody: $ref: "#/components/requestBodies/CancelTradeDetectionSubscriptionRequestBody" responses: "200": description: Cancelled the Trade Detection subscription, or it was already cancelled content: application/json: schema: $ref: "#/components/schemas/TradeDetectionCancelSubscriptionResponse" "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/400FailedRequestResponse" "401": description: Unauthorized content: application/json: schema: $ref: "#/components/schemas/401FailedRequestResponse" "403": description: Feature not enabled content: application/json: schema: $ref: "#/components/schemas/403FeatureNotEnabledResponse" "404": description: Not Found content: application/json: schema: $ref: "#/components/schemas/404FailedRequestResponse" "500": description: Unexpected Error /holdings: get: deprecated: true tags: - Account Information summary: List all accounts for the user, plus balances, positions, and orders for each account. description: | **Deprecated.** Use the account-specific holdings endpoint instead. This endpoint will return HTTP 410 Gone for all customers that sign up after April 25, 2026. List all accounts for the user, plus balances, positions, and orders for each account. operationId: AccountInformation_getAllUserHoldings parameters: - in: query required: true name: userId schema: $ref: "#/components/schemas/UserID" - in: query required: true name: userSecret schema: $ref: "#/components/schemas/UserSecret" - in: query required: false name: brokerage_authorizations description: Optional. Comma separated list of authorization IDs (only use if filtering is needed on one or more authorizations). schema: type: string format: uuid example: 917c8734-8470-4a3e-a18f-57c3f2ee6631 responses: "200": description: Returns list of accounts and holdings content: application/json: schema: type: array items: $ref: "#/components/schemas/AccountHoldings" "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/400FailedRequestResponse" "403": description: Forbidden content: application/json: schema: $ref: "#/components/schemas/403FailedRequestResponse" "425": description: Too Early content: application/json: schema: $ref: "#/components/schemas/425FailedRequestResponse" "500": description: Unexpected Error /accounts/{accountId}/holdings: get: tags: - Account Information summary: List account holdings deprecated: true description: | **Deprecated.** Use the finer-grained account data endpoints instead: [balances](/reference/Account%20Information/AccountInformation_getUserAccountBalance), [positions](/reference/Account%20Information/AccountInformation_getAllAccountPositions), and [orders](/reference/Account%20Information/AccountInformation_getUserAccountOrders). This endpoint will return HTTP 410 Gone for all customers that sign up after May 11, 2026. Returns a list of balances, positions, and recent orders for the specified account. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don't, Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection. operationId: AccountInformation_getUserHoldings parameters: - in: path required: true name: accountId schema: $ref: "#/components/schemas/AccountID" - in: query required: true name: userId schema: $ref: "#/components/schemas/UserID" - in: query required: true name: userSecret schema: $ref: "#/components/schemas/UserSecret" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/AccountHoldingsAccount" "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/400FailedRequestResponse" "403": description: Forbidden content: application/json: schema: $ref: "#/components/schemas/403FailedRequestResponse" "425": description: Too Early content: application/json: schema: $ref: "#/components/schemas/425FailedRequestResponse" "500": description: Unexpected Error "503": description: Service Unavailable - the brokerage connection is busy syncing (sync lock held) or the brokerage API is temporarily unavailable, and no cached fallback was available. Safe to retry. content: application/json: schema: $ref: "#/components/schemas/503BrokerageRequestResponse" /accounts: get: tags: - Account Information summary: List accounts description: | Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. This endpoint returns Daily data regardless of the customer's plan. Daily data is cached and refreshed once a day, which makes this endpoint fast and well-suited to listing accounts across all of a user's connections in a single call. Exact refresh timing may vary by brokerage. To get real-time data on Pay as you Go / Real-time, use the [list accounts for a connection endpoint](/reference/Connections/Connections_listBrokerageAuthorizationAccounts). Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). operationId: AccountInformation_listUserAccounts parameters: - in: query required: true name: userId schema: $ref: "#/components/schemas/UserID" - in: query required: true name: userSecret schema: $ref: "#/components/schemas/UserSecret" responses: "200": description: OK content: application/json: schema: description: List of brokerage accounts across all connections. type: array items: $ref: "#/components/schemas/Account" default: description: Unexpected error. "/accounts/{accountId}": get: tags: - Account Information summary: Get account detail description: | Returns account detail known to SnapTrade for the specified account. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don't, Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection. operationId: AccountInformation_getUserAccountDetails parameters: - in: query required: true name: userId schema: $ref: "#/components/schemas/UserID" - in: query required: true name: userSecret schema: $ref: "#/components/schemas/UserSecret" - in: path required: true name: accountId schema: $ref: "#/components/schemas/AccountID" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/Account" default: description: Unexpected error put: tags: - Account Information summary: Update details of an investment account description: Updates various properties of a specified account. operationId: AccountInformation_updateUserAccount parameters: - in: query required: true name: userId schema: $ref: "#/components/schemas/UserID" - in: query required: true name: userSecret schema: $ref: "#/components/schemas/UserSecret" - in: path name: accountId required: true description: The ID of the account to update. schema: type: string format: uuid responses: "200": description: Successfully updated details of an investment account content: application/json: schema: type: array items: $ref: "#/components/schemas/Account" default: description: Unexpected error /accounts/{accountId}/balances: get: tags: - Account Information summary: List account balances operationId: AccountInformation_getUserAccountBalance description: | Returns a list of balances for the account. Each element of the list has a distinct currency. Some brokerages like Questrade [allows holding multiple currencies in the same account](https://www.questrade.com/learning/questrade-basics/balances-and-reports/understanding-your-account-balances). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don't, Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection. parameters: - in: query required: true name: userId schema: $ref: "#/components/schemas/UserID" - in: query required: true name: userSecret schema: $ref: "#/components/schemas/UserSecret" - in: path name: accountId required: true schema: $ref: "#/components/schemas/AccountID" responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/Balance" default: description: Unexpected error "503": description: Service Unavailable - the brokerage connection is busy syncing (sync lock held) or the brokerage API is temporarily unavailable, and no cached fallback was available. Safe to retry. content: application/json: schema: $ref: "#/components/schemas/503BrokerageRequestResponse" /accounts/{accountId}/positions: get: deprecated: true tags: - Account Information summary: List account positions description: | **Deprecated.** Use the newer [unified positions endpoint](/reference/Account%20Information/AccountInformation_getAllAccountPositions) instead. This will allow you to get both equity and option positions in a single call, as well as additional asset classes such as futures. Returns a list of stock/ETF/crypto/mutual fund positions in the specified account. For option positions, please use the [options endpoint](/reference/Options/Options_listOptionHoldings). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don't, Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection. operationId: AccountInformation_getUserAccountPositions parameters: - in: query required: true name: userId schema: $ref: "#/components/schemas/UserID" - in: query required: true name: userSecret schema: $ref: "#/components/schemas/UserSecret" - in: path name: accountId required: true schema: $ref: "#/components/schemas/AccountID" responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/Position" default: description: Unexpected error "503": description: Service Unavailable - the brokerage connection is busy syncing (sync lock held) or the brokerage API is temporarily unavailable, and no cached fallback was available. Safe to retry. content: application/json: schema: $ref: "#/components/schemas/503BrokerageRequestResponse" /accounts/{accountId}/positions/all: get: tags: - Account Information summary: List all account positions operationId: AccountInformation_getAllAccountPositions description: | Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position's `instrument`. `mutualfund` positions may also include `cash_equivalent`. `stock`, `etf`, and `mutualfund` positions may include `tax_lots` when tax lot data is enabled for the account. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection. parameters: - in: query required: true name: userId schema: $ref: "#/components/schemas/UserID" - in: query required: true name: userSecret schema: $ref: "#/components/schemas/UserSecret" - in: path name: accountId required: true schema: $ref: "#/components/schemas/AccountID" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/AllAccountPositionsResponse" default: description: Unexpected error "503": description: Service Unavailable - the brokerage connection is busy syncing (sync lock held) or the brokerage API is temporarily unavailable, and no cached fallback was available. Safe to retry. content: application/json: schema: $ref: "#/components/schemas/503BrokerageRequestResponse" /accounts/{accountId}/orders: get: tags: - Account Information summary: List account orders operationId: AccountInformation_getUserAccountOrders description: | Returns a list of recent orders in the specified account. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don't, Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection. parameters: - in: query required: true name: userId schema: $ref: "#/components/schemas/UserID" - in: query required: true name: userSecret schema: $ref: "#/components/schemas/UserSecret" - in: query name: state description: defaults to "all" schema: type: string enum: - all - open - executed - in: query name: days description: Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in. Values greater than 90 will be capped at 90. schema: type: integer format: int32 minimum: 1 maximum: 90 example: 30 - in: path name: accountId required: true schema: $ref: "#/components/schemas/AccountID" responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/AccountOrderRecord" "500": description: Unexpected error content: application/json: schema: $ref: "#/components/schemas/500UnexpectedExceptionResponse" "501": description: Not Implemented - orders are not supported for this brokerage content: application/json: schema: $ref: "#/components/schemas/501NotImplementedResponse" "503": description: Service Unavailable - the brokerage connection is busy syncing (sync lock held) or the brokerage API is temporarily unavailable. Safe to retry. content: application/json: schema: $ref: "#/components/schemas/503BrokerageRequestResponse" /accounts/{accountId}/orders/v2: get: tags: - Experimental endpoints summary: List account orders v2 operationId: AccountInformation_getUserAccountOrdersV2 description: | Returns a list of recent orders in the specified account. The V2 order response format will include all legs of each order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection. parameters: - in: query required: true name: userId schema: $ref: "#/components/schemas/UserID" - in: query required: true name: userSecret schema: $ref: "#/components/schemas/UserSecret" - in: query name: state description: defaults to "all" schema: type: string enum: - all - open - executed - in: query name: days description: Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in. Values greater than 90 will be capped at 90. schema: type: integer format: int32 minimum: 1 maximum: 90 example: 30 - in: path name: accountId required: true schema: $ref: "#/components/schemas/AccountID" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/AccountOrdersV2Response" "500": description: Unexpected error content: application/json: schema: $ref: "#/components/schemas/500UnexpectedExceptionResponse" "503": description: Service Unavailable - the brokerage connection is busy syncing (sync lock held) or the brokerage API is temporarily unavailable. Safe to retry. content: application/json: schema: $ref: "#/components/schemas/503BrokerageRequestResponse" /accounts/{accountId}/balanceHistory: get: tags: - Account Information summary: List historical account total value operationId: AccountInformation_getAccountBalanceHistory description: | An experimental endpoint that returns estimated historical total account value for the specified account. Total account value is the sum of the market value of all positions and cash in the account at a given time. This endpoint is experimental, disabled by default, and has a maximum lookback of 1 year. parameters: - in: query required: true name: userId schema: $ref: "#/components/schemas/UserID" - in: query required: true name: userSecret schema: $ref: "#/components/schemas/UserSecret" - in: path name: accountId required: true schema: $ref: "#/components/schemas/AccountID" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/AccountValueHistoryResponse" "403": description: Forbidden content: application/json: schema: $ref: "#/components/schemas/403FeatureNotEnabledResponse" /accounts/{accountId}/recentOrders: get: tags: - Account Information summary: List account recent orders (last 24 hours only) operationId: AccountInformation_getUserAccountRecentOrders description: | A lightweight endpoint that returns the latest page of orders placed in the last 24 hours in the specified account. For most brokerages, the default page size is 100 meaning the endpoint will return a max of 100 orders. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders Differs from /orders in that it is always realtime, and only checks the last 24 hours By default only returns executed orders, but that can be changed by setting *only_executed* to false parameters: - in: query required: true name: userId schema: $ref: "#/components/schemas/UserID" - in: query required: true name: userSecret schema: $ref: "#/components/schemas/UserSecret" - in: query name: only_executed description: Defaults to true. Indicates if request should fetch only executed orders. Set to false to retrieve non executed orders as well schema: type: boolean - in: path name: accountId required: true schema: $ref: "#/components/schemas/AccountID" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/RecentOrdersResponse" "403": description: Forbidden content: application/json: schema: $ref: "#/components/schemas/403FeatureNotEnabledResponse" "500": description: Unexpected error content: application/json: schema: $ref: "#/components/schemas/500UnexpectedExceptionResponse" "501": description: Not Implemented - recent orders are not supported for this brokerage content: application/json: schema: $ref: "#/components/schemas/501NotImplementedResponse" "503": description: Service Unavailable - the brokerage connection is busy syncing (sync lock held) or the brokerage API is temporarily unavailable. Safe to retry. content: application/json: schema: $ref: "#/components/schemas/503BrokerageRequestResponse" /accounts/{accountId}/recentOrders/v2: get: tags: - Experimental endpoints summary: List account recent orders (V2, last 24 hours only) operationId: AccountInformation_getUserAccountRecentOrdersV2 description: | A lightweight endpoint that returns a list of orders executed in the last 24 hours in the specified account using the V2 order format. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders. Differs from /orders in that it is realtime, and only checks the last 24 hours as opposed to the last 30 days. By default only returns executed orders, but that can be changed by setting *only_executed* to false. **Because of the cost of realtime requests, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)** parameters: - in: query required: true name: userId schema: $ref: "#/components/schemas/UserID" - in: query required: true name: userSecret schema: $ref: "#/components/schemas/UserSecret" - in: query name: only_executed description: Defaults to true. Indicates if request should fetch only executed orders. Set to false to retrieve non executed orders as well schema: type: boolean - in: path name: accountId required: true schema: $ref: "#/components/schemas/AccountID" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/AccountOrdersV2Response" "403": description: Forbidden content: application/json: schema: $ref: "#/components/schemas/403FeatureNotEnabledResponse" "500": description: Unexpected error content: application/json: schema: $ref: "#/components/schemas/500UnexpectedExceptionResponse" "503": description: Service Unavailable - the brokerage connection is busy syncing (sync lock held) or the brokerage API is temporarily unavailable. Safe to retry. content: application/json: schema: $ref: "#/components/schemas/503BrokerageRequestResponse" /accounts/{accountId}/returnRates: get: tags: - Account Information summary: List account rate of returns operationId: AccountInformation_getUserAccountReturnRates description: | Returns a list of rate of return percents for a given account. parameters: - in: query required: true name: userId schema: $ref: "#/components/schemas/UserID" - in: query required: true name: userSecret schema: $ref: "#/components/schemas/UserSecret" - in: path name: accountId required: true schema: $ref: "#/components/schemas/AccountID" - in: query required: false name: timeframes description: Optional comma separated list of rate-of-return timeframes to return. Supported values are `ALL`, `1Y`, `YTD`, `1M`, `1W`, and `1D`. If omitted, SnapTrade returns all six supported timeframes. schema: type: string example: ALL,1Y responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/RateOfReturnResponse" "403": description: Forbidden content: application/json: schema: $ref: "#/components/schemas/403FeatureNotEnabledResponse" "500": description: Unexpected error content: application/json: schema: $ref: "#/components/schemas/500UnexpectedExceptionResponse" "501": description: Not Implemented - return rates are not supported for this brokerage content: application/json: schema: $ref: "#/components/schemas/501NotImplementedResponse" "503": description: Brokerage API failure content: application/json: schema: $ref: "#/components/schemas/503BrokerageRequestResponse" /accounts/{accountId}/activities: get: tags: - Account Information summary: List account activities operationId: AccountInformation_getAccountActivities description: | This endpoint is not deprecated and has no planned sunset. Responses to requests using the legacy `/api/v1` path prefix include `Deprecation: @1781222400` (June 12, 2026); that header applies only to the path prefix. Use the canonical root path `/accounts/{accountId}/activities`. Returns all historical transactions for the specified account. This endpoint is paginated with a default page size of 1000. The endpoint will return a maximum of 1000 transactions per request. See the query parameters for pagination options. Transaction are returned in reverse chronological order, using the `trade_date` field. This endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection. parameters: - in: path name: accountId required: true schema: $ref: "#/components/schemas/AccountID" - in: query required: false name: startDate description: The start date (inclusive) of the transaction history to retrieve. If not provided, the default is the first transaction known to SnapTrade based on `trade_date`. schema: $ref: "#/components/schemas/ReportingDate" - in: query required: false name: endDate description: The end date (inclusive) of the transaction history to retrieve. If not provided, the default is the last transaction known to SnapTrade based on `trade_date`. schema: $ref: "#/components/schemas/ReportingDate" - in: query required: false name: offset description: An integer that specifies the starting point of the paginated results. Default is 0. schema: type: integer format: int32 minimum: 0 - in: query required: false name: limit description: An integer that specifies the maximum number of transactions to return. Default of 1000. schema: type: integer format: int32 minimum: 1 - in: query required: false name: type description: | Optional comma separated list of transaction types to filter by. SnapTrade does a best effort to categorize brokerage transaction types into a common set of values. Here are some of the most popular values: - `BUY` - Asset bought. - `SELL` - Asset sold. - `DIVIDEND` - Dividend payout. - `SUBSTITUTE_DIVIDEND` - Payment in lieu of a dividend. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `STOCK_DIVIDEND` - A type of dividend where a company distributes shares instead of cash - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `TAX` - A tax related fee. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` - Transfer of assets from one account to another. - `SPLIT` - A stock share split. schema: type: string example: BUY,SELL,DIVIDEND - in: query required: true name: userId schema: $ref: "#/components/schemas/UserID" - in: query required: true name: userSecret schema: $ref: "#/components/schemas/UserSecret" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/PaginatedUniversalActivity" default: description: Unexpected error /authorizations/{authorizationId}/returnRates: get: tags: - Connections summary: List connection rate of returns operationId: Connections_returnRates description: | Returns a list of rate of return percents for a given connection. parameters: - in: query required: true name: userId schema: $ref: "#/components/schemas/UserID" - in: query required: true name: userSecret schema: $ref: "#/components/schemas/UserSecret" - in: path name: authorizationId required: true schema: $ref: "#/components/schemas/BrokerageAuthID" - in: query required: false name: timeframes description: Optional comma separated list of rate-of-return timeframes to return. Supported values are `ALL`, `1Y`, `YTD`, `1M`, `1W`, and `1D`. If omitted, SnapTrade returns all six supported timeframes. schema: type: string example: ALL,1Y responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/RateOfReturnResponse" "403": description: Forbidden content: application/json: schema: $ref: "#/components/schemas/403FeatureNotEnabledResponse" "500": description: Unexpected error content: application/json: schema: $ref: "#/components/schemas/500UnexpectedExceptionResponse" "501": description: Not Implemented - return rates are not supported for this brokerage content: application/json: schema: $ref: "#/components/schemas/501NotImplementedResponse" "503": description: Brokerage API failure content: application/json: schema: $ref: "#/components/schemas/503BrokerageRequestResponse" "/accounts/{accountId}/quotes": get: tags: - Trading summary: Get equity symbol quotes description: | Returns a maximum of 10 quotes from the brokerage for the specified symbols and account. The quotes returned can be delayed depending on the brokerage the account belongs to. It is highly recommended that you use your own market data provider for real-time quotes instead of relying on this endpoint. **This endpoint is not a substitute for a market data provider. Frequent polling of this endpoint may result in the disabling of your keys** This endpoint does not work for options quotes. operationId: Trading_getUserAccountQuotes parameters: - in: query required: true name: userId schema: $ref: "#/components/schemas/UserID" - in: query required: true name: userSecret schema: $ref: "#/components/schemas/UserSecret" - in: query name: symbols required: true description: List of Universal Symbol IDs or tickers to get quotes for. When providing multiple values, use a comma as separator. Maximum of 10 values allowed schema: type: string - in: query name: use_ticker description: Should be set to `True` if `symbols` are comprised of tickers. Defaults to `False` if not provided. schema: type: boolean - in: path name: accountId required: true schema: $ref: "#/components/schemas/AccountID" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/SymbolsQuotes" "500": description: Unexpected error content: application/json: schema: $ref: "#/components/schemas/500UnexpectedExceptionResponse" "/accounts/{accountId}/quotes/options": get: tags: - Trading summary: Get option quote description: | Returns a quote for a single option contract. The option contract is specified using in the 21 character OCC format. For example `AAPL 251114C00240000` represents a call option on AAPL expiring on 2025-11-14 with a strike price of $240. For more information on the OCC format, see [here](https://en.wikipedia.org/wiki/Option_symbol#OCC_format) **Note:** These are derived values and are not suitable for trading purposes. operationId: Trading_getUserAccountOptionQuotes parameters: - in: query required: true name: userId schema: $ref: "#/components/schemas/UserID" - in: query required: true name: userSecret schema: $ref: "#/components/schemas/UserSecret" - in: path name: accountId required: true schema: $ref: "#/components/schemas/AccountID" - in: query name: symbol required: true description: The OCC-formatted option symbol. schema: type: string example: "AAPL 251219C00150000" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/OptionQuote" "404": description: Option contract not found content: application/json: schema: $ref: "#/components/schemas/404FailedRequestResponse" "429": description: Rate limit exceeded content: application/json: schema: $ref: "#/components/schemas/500UnexpectedExceptionResponse" "/accounts/{accountId}/orders/cancel": post: deprecated: true tags: - Trading summary: Cancel equity order description: | **Deprecated.** Use [the new cancel order endpoint](/reference/Trading/Trading_cancelOrder) instead. Attempts to cancel an open order with the brokerage. If the order is no longer cancellable, the request will be rejected. operationId: Trading_cancelUserAccountOrder parameters: - in: query required: true name: userId schema: $ref: "#/components/schemas/UserID" - in: query required: true name: userSecret schema: $ref: "#/components/schemas/UserSecret" - in: path name: accountId required: true schema: $ref: "#/components/schemas/AccountID" requestBody: $ref: "#/components/requestBodies/CancelOrderRequestBody" responses: "200": description: Order Record of canceled order content: application/json: schema: $ref: "#/components/schemas/AccountOrderRecord" "400": description: Unable to cancel open order. Please verify status in brokerage account content: application/json: schema: $ref: "#/components/schemas/400FailedRequestResponse" "500": description: Unexpected error content: application/json: schema: $ref: "#/components/schemas/500UnexpectedExceptionResponse" "/accounts/{accountId}/symbols": post: tags: - Reference Data summary: Search account symbols description: | Returns a list of Universal Symbol objects that match the given query. The matching takes into consideration both the ticker and the name of the symbol. Only the first 20 results are returned. The search results are further limited to the symbols supported by the brokerage for which the account is under. operationId: ReferenceData_symbolSearchUserAccount parameters: - in: query required: true name: userId schema: $ref: "#/components/schemas/UserID" - in: query required: true name: userSecret schema: $ref: "#/components/schemas/UserSecret" - in: path name: accountId required: true schema: $ref: "#/components/schemas/AccountID" requestBody: content: application/json: schema: $ref: "#/components/schemas/SymbolQuery" responses: "200": description: OK content: application/json: schema: type: array description: A list of Universal Symbol objects that match the given query. items: $ref: "#/components/schemas/UniversalSymbol" default: description: Unexpected Error "/accounts/{accountId}/options": get: deprecated: true tags: - Options summary: List account option positions description: | **Deprecated.** Use the newer [unified positions endpoint](/reference/Account%20Information/AccountInformation_getAllAccountPositions) instead. This will allow you to get both equity and option positions in a single call, as well as additional asset classes such as futures. Returns a list of option positions in the specified account. For stock/ETF/crypto/mutual fund positions, please use the [positions endpoint](/reference/Account%20Information/AccountInformation_getUserAccountPositions). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don't, Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. operationId: Options_listOptionHoldings parameters: - in: query required: true name: userId schema: $ref: "#/components/schemas/UserID" - in: query required: true name: userSecret schema: $ref: "#/components/schemas/UserSecret" - in: path name: accountId required: true schema: $ref: "#/components/schemas/AccountID" responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/OptionsPosition" "400": description: Invalid request, or option positions are not supported for this brokerage content: application/json: schema: $ref: "#/components/schemas/400FailedRequestResponse" "500": description: Unexpected error content: application/json: schema: $ref: "#/components/schemas/500UnexpectedExceptionResponse" "/authorizations": get: tags: - Connections summary: List all connections description: | Returns a list of all connections for the specified user. Note that `Connection` and `Brokerage Authorization` are interchangeable, but the term `Connection` is preferred and used in the doc for consistency. A connection is usually tied to a single login at a brokerage. A single connection can contain multiple brokerage accounts. SnapTrade performs de-duping on connections for a given user. If the user has an existing connection with the brokerage, when connecting the brokerage with the same credentials, SnapTrade will return the existing connection instead of creating a new one. operationId: Connections_listBrokerageAuthorizations parameters: - in: query required: true name: userId schema: $ref: "#/components/schemas/UserID" - in: query required: true name: userSecret schema: $ref: "#/components/schemas/UserSecret" responses: "200": description: OK content: application/json: schema: description: A list of all connections for the specified user. type: array items: $ref: "#/components/schemas/BrokerageAuthorization" default: description: Unexpected error. "/authorizations/{authorizationId}": get: tags: - Connections summary: Get connection detail description: Returns a single connection for the specified ID. operationId: Connections_detailBrokerageAuthorization parameters: - in: path name: authorizationId required: true schema: $ref: "#/components/schemas/BrokerageAuthID" - in: query required: true name: userId schema: $ref: "#/components/schemas/UserID" - in: query required: true name: userSecret schema: $ref: "#/components/schemas/UserSecret" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/BrokerageAuthorization" default: description: Unexpected error. delete: tags: - Connections summary: Delete connection description: Deletes the SnapTrade connection specified by the ID. This will also remove the accounts and holdings data associated with the connection from SnapTrade. This action is irreversible. This endpoint is synchronous, a 204 response indicates that the data has been successfully deleted. operationId: Connections_removeBrokerageAuthorization parameters: - in: path name: authorizationId required: true schema: $ref: "#/components/schemas/BrokerageAuthID" - in: query required: true name: userId schema: $ref: "#/components/schemas/UserID" - in: query required: true name: userSecret schema: $ref: "#/components/schemas/UserSecret" responses: "204": description: OK "400": description: Bad Request "404": description: Not Found default: description: Unexpected error "/connection/{connectionId}": delete: tags: - Connections summary: Delete connection description: Deletes the SnapTrade connection specified by the ID. This will also remove the accounts and holdings data associated with the connection from SnapTrade. This action is irreversible. This endpoint is asynchronous, a 200 response indicates that a task has been queued to delete the connection. Listen for the [`CONNECTION_DELETED` webhook](https://docs.snaptrade.com/docs/webhooks#webhooks-connection_deleted) webhook to know when the deletion has been completed and the data has been removed. operationId: Connections_deleteConnection parameters: - in: path name: connectionId required: true schema: $ref: "#/components/schemas/BrokerageAuthID" - in: query required: true name: userId schema: $ref: "#/components/schemas/UserID" - in: query required: true name: userSecret schema: $ref: "#/components/schemas/UserSecret" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/DeleteConnectionConfirmation" "400": description: Bad Request "404": description: Not Found default: description: Unexpected error "/authorizations/{authorizationId}/refresh": post: tags: - Connections summary: Refresh holdings for a connection description: | Trigger a holdings update for all accounts under this connection. Updates will be queued asynchronously. [`ACCOUNT_HOLDINGS_UPDATED` webhook](/docs/webhooks#webhooks-account_holdings_updated) will be sent once the sync completes for each account under the connection. This endpoint will also trigger a transaction sync for the past day if one has not yet occurred. **Because of the cost of refreshing a connection, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)** **Please note this endpoint is disabled for Real-time plans (Personal and Pay as you go) unless the connection is delayed. Real-time connections do not benefit from this feature since data is refreshed when calls are made. Refer to the `data_freshness_mode` field on a connection to determine this.** operationId: Connections_refreshBrokerageAuthorization parameters: - in: path name: authorizationId required: true schema: $ref: "#/components/schemas/BrokerageAuthID" - in: query required: true name: userId schema: $ref: "#/components/schemas/UserID" - in: query required: true name: userSecret schema: $ref: "#/components/schemas/UserSecret" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/BrokerageAuthorizationRefreshConfirmation" "401": description: Unauthorized, invalid credentials for this resource content: application/json: schema: $ref: "#/components/schemas/401FailedRequestResponse" "402": description: Unable to sync with brokerage account because the connection is disabled. content: application/json: schema: $ref: "#/components/schemas/402BrokerageAuthDisabledResponse" "403": description: Customer or user does not have access to this feature content: application/json: schema: $ref: "#/components/schemas/403FeatureNotEnabledResponse" "404": description: The requested resource does not exist. content: application/json: schema: $ref: "#/components/schemas/404FailedRequestResponse" "429": description: The connection was refreshed too recently. Please wait before calling this endpoint again. content: application/json: schema: $ref: "#/components/schemas/429TooManyRequestsResponse" "/authorizations/{authorizationId}/transactions/sync": post: tags: - Connections summary: Sync transactions for a connection description: | Trigger a transactions sync for all accounts under this connection. Updates will be queued asynchronously. Transactions are not updated intra-day, but calling this endpoint can ensure that the previous day's transactions have been synced. For more information on sync behaviour, see: https://docs.snaptrade.com/docs/syncing operationId: Connections_syncBrokerageAuthorizationTransactions parameters: - in: path name: authorizationId required: true schema: $ref: "#/components/schemas/BrokerageAuthID" - in: query required: true name: userId schema: $ref: "#/components/schemas/UserID" - in: query required: true name: userSecret schema: $ref: "#/components/schemas/UserSecret" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/BrokerageAuthorizationTransactionsSyncConfirmation" "401": description: Unauthorized, invalid credentials for this resource content: application/json: schema: $ref: "#/components/schemas/401FailedRequestResponse" "402": description: Unable to sync with brokerage account because the connection is disabled. content: application/json: schema: $ref: "#/components/schemas/402BrokerageAuthDisabledResponse" "/authorizations/{authorizationId}/disable": post: tags: - Connections summary: Force disable connection description: | Manually force the specified connection to become disabled. This should only be used for testing a reconnect flow, and never used on production connections. Will trigger a disconnect as if it happened naturally, and send a [`CONNECTION_BROKEN` webhook](/docs/webhooks#webhooks-connection_broken) for the connection. This endpoint is available on test keys. If you would like it enabled on production keys as well, please contact support as it is disabled by default. operationId: Connections_disableBrokerageAuthorization parameters: - in: path name: authorizationId required: true schema: $ref: "#/components/schemas/BrokerageAuthID" - in: query required: true name: userId schema: $ref: "#/components/schemas/UserID" - in: query required: true name: userSecret schema: $ref: "#/components/schemas/UserSecret" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/BrokerageAuthorizationDisabledConfirmation" "401": description: Unauthorized, invalid credentials for this resource content: application/json: schema: $ref: "#/components/schemas/401FailedRequestResponse" "402": description: Unable to sync with brokerage account because the connection is disabled. content: application/json: schema: $ref: "#/components/schemas/402BrokerageAuthAlreadyDisabledException" "403": description: Customer or user does not have access to this feature content: application/json: schema: $ref: "#/components/schemas/403FeatureNotEnabledResponse" "404": description: The requested resource does not exist. content: application/json: schema: $ref: "#/components/schemas/404FailedRequestResponse" "/authorizations/{authorizationId}/accounts": get: tags: - Connections summary: List accounts for a connection description: | Returns all brokerage accounts that belong to the specified connection for the authenticated user. On Pay as you Go / Real-time, this endpoint refreshes each account's opening date, funding date, and total value live from the brokerage on each call. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data. operationId: Connections_listBrokerageAuthorizationAccounts parameters: - in: path name: authorizationId required: true schema: $ref: "#/components/schemas/BrokerageAuthID" - in: query required: true name: userId schema: $ref: "#/components/schemas/UserID" - in: query required: true name: userSecret schema: $ref: "#/components/schemas/UserSecret" responses: "200": description: OK content: application/json: schema: description: List of brokerage accounts under the specified connection. type: array items: $ref: "#/components/schemas/Account" "401": description: Unauthorized, invalid credentials for this resource content: application/json: schema: $ref: "#/components/schemas/401FailedRequestResponse" "404": description: The requested resource does not exist. content: application/json: schema: $ref: "#/components/schemas/404FailedRequestResponse" "/sessionEvents": get: tags: - Connections summary: Get all session events for a user description: Returns a list of session events associated with a user. operationId: Connections_sessionEvents parameters: - in: query required: true name: PartnerClientId schema: $ref: "#/components/schemas/ClientID" - in: query required: false name: userId description: Optional comma separated list of user IDs used to filter the request on specific users schema: $ref: "#/components/schemas/AccountIDs" - in: query required: false name: sessionId description: Optional comma separated list of session IDs used to filter the request on specific users schema: $ref: "#/components/schemas/AccountIDs" responses: "200": description: A list of all Session Events for the Partner. content: application/json: schema: type: array items: anyOf: - $ref: "#/components/schemas/SessionEvent" default: description: Unexpected error. "/brokerages": get: tags: - Reference Data summary: Get brokerages description: Returns a list of all defined Brokerage objects. operationId: ReferenceData_listAllBrokerages parameters: [] responses: "200": description: A list of all defined Brokerage objects. content: application/json: schema: type: array items: $ref: "#/components/schemas/Brokerage" default: description: Unexpected error. "/brokerages/{slug}/instruments": get: tags: - Reference Data summary: Get brokerage instruments description: Returns a list of all brokerage instruments available for a given brokerage. Not all brokerages support this. The ones that don't will return an empty list. operationId: ReferenceData_listAllBrokerageInstruments parameters: - in: path name: slug required: true description: A short, unique identifier for the brokerage. It is usually the name of the brokerage in capital letters and will never change. schema: type: string example: QUESTRADE responses: "200": description: A list of brokerage instruments. content: application/json: schema: $ref: "#/components/schemas/BrokerageInstrumentsResponse" default: description: Unexpected error. "/brokerageAuthorizationTypes": get: tags: - Reference Data summary: Get all brokerage authorization types description: Returns a list of all defined Brokerage authorization Type objects. operationId: ReferenceData_listAllBrokerageAuthorizationType parameters: - in: query required: false name: brokerage schema: type: string example: QUESTRADE,ALPACA description: Comma separated value of brokerage slugs responses: "200": description: A list of all defined Brokerage Authorization Type objects. content: application/json: schema: type: array items: $ref: "#/components/schemas/BrokerageAuthorizationTypeReadOnly" default: description: Unexpected error. /currencies: get: tags: - Reference Data summary: Get currencies description: Returns a list of all defined Currency objects. operationId: ReferenceData_listAllCurrencies parameters: [] responses: "200": description: A list of all currencies. content: application/json: schema: type: array items: $ref: "#/components/schemas/Currency" default: description: Unexpected error. /currencies/rates: get: tags: - Reference Data summary: Get currency exchange rates description: Returns a list of all Exchange Rate Pairs for all supported Currencies. operationId: ReferenceData_listAllCurrenciesRates parameters: [] responses: "200": description: A list of all exchange rates pairs for supported currencies content: application/json: schema: type: array items: $ref: "#/components/schemas/ExchangeRatePairs" /currencies/rates/{currencyPair}: get: tags: - Reference Data summary: Get exchange rate of a currency pair description: Returns an Exchange Rate Pair object for the specified Currency Pair. operationId: ReferenceData_getCurrencyExchangeRatePair parameters: - in: path name: currencyPair required: true description: A currency pair based on currency code for example, {CAD-USD} schema: type: string responses: "200": description: A list of all exchange rates pairs for supported currencies content: application/json: schema: $ref: "#/components/schemas/ExchangeRatePairs" /exchanges: get: tags: - Reference Data summary: Get exchanges description: Returns a list of all supported Exchanges. operationId: ReferenceData_getStockExchanges parameters: [] responses: "200": description: A list of all supported stock exchanges content: application/json: schema: type: array items: $ref: "#/components/schemas/Exchange" /securityTypes: get: tags: - Reference Data summary: List security types operationId: ReferenceData_getSecurityTypes description: Return all available security types supported by SnapTrade. parameters: [] responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/SecurityType" default: description: Unexpected Error /symbols: post: tags: - Reference Data summary: Search symbols description: | Returns a list of Universal Symbol objects that match the given query. The matching takes into consideration both the ticker and the name of the symbol. Only the first 20 results are returned. operationId: ReferenceData_getSymbols parameters: [] responses: "200": description: OK content: application/json: schema: type: array description: A list of Universal Symbol objects that match the given query. items: $ref: "#/components/schemas/UniversalSymbol" default: description: Unexpected Error requestBody: content: application/json: schema: $ref: "#/components/schemas/SymbolQuery" /symbols/{query}: get: tags: - Reference Data summary: Get symbol detail description: | Returns the Universal Symbol object specified by the ticker or the Universal Symbol ID. When a ticker is specified, the first matching result is returned. We largely follow the [Yahoo Finance ticker format](https://help.yahoo.com/kb/SLN2310.html)(click on "Yahoo Finance Market Coverage and Data Delays"). For example, for securities traded on the Toronto Stock Exchange, the symbol has a '.TO' suffix. For securities traded on NASDAQ or NYSE, the symbol does not have a suffix. Please use the ticker with the proper suffix for the best results. operationId: ReferenceData_getSymbolsByTicker parameters: - in: path name: query required: true description: The ticker or Universal Symbol ID to look up the symbol with. schema: type: string responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/UniversalSymbol" "404": description: Not Found content: application/json: schema: $ref: "#/components/schemas/404FailedRequestResponse" default: description: Unexpected Error /trade/place: post: tags: - Trading summary: Place equity order description: | Places a brokerage order in the specified account. The order could be rejected by the brokerage if it is invalid or if the account does not have sufficient funds. This endpoint does not compute the impact to the account balance from the order and any potential commissions before submitting the order to the brokerage. If that is desired, you can use the [check order impact endpoint](/reference/Trading/Trading_getOrderImpact). It's recommended to trigger a manual refresh of the account after placing an order to ensure the account is up to date. You can use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint for this. operationId: Trading_placeForceOrder parameters: - in: query required: true name: userId schema: $ref: "#/components/schemas/UserID" - in: query required: true name: userSecret schema: $ref: "#/components/schemas/UserSecret" requestBody: $ref: "#/components/requestBodies/ManualTradeFormRequestBodyWithOptions" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/AccountOrderRecord" "400": description: Trade could not be placed content: application/json: schema: $ref: "#/components/schemas/400FailedRequestResponse" "403": description: User does not have permissions to place trades content: application/json: schema: $ref: "#/components/schemas/403FailedRequestResponse" "500": description: Unexpected Error /accounts/{accountId}/trading/bracket: post: deprecated: true tags: - Trading summary: Place bracket order description: | **Deprecated.** Use [the new complex order endpoint](/reference/Trading/Trading_placeComplexOrder) instead. Places a bracket order (entry order + OCO of stop loss and take profit). Disabled by default please contact support for use. Only supported on certain brokerages operationId: Trading_placeBracketOrder parameters: - in: path name: accountId required: true description: The ID of the account to execute the trade on. schema: $ref: "#/components/schemas/AccountID" - in: query required: true name: userId schema: $ref: "#/components/schemas/UserID" - in: query required: true name: userSecret schema: $ref: "#/components/schemas/UserSecret" requestBody: $ref: "#/components/requestBodies/ManualTradeFormRequestBodyBracket" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/AccountOrderRecord" "400": description: Trade could not be placed content: application/json: schema: $ref: "#/components/schemas/400FailedRequestResponse" "403": description: User does not have permissions to place trades content: application/json: schema: $ref: "#/components/schemas/403FailedRequestResponse" "500": description: Unexpected Error /accounts/{accountId}/trading/complex: post: tags: - Trading summary: Place complex order description: | Places a complex conditional order (OCO, OTO, or OTOCO). Only supported on certain brokerages. Please refer to the [brokerage trading support page](https://support.snaptrade.com/brokerages) for details on which brokerages support complex orders and which types they support. - **OCO** (One Cancels the Other): Two peer orders; when one fills the other is cancelled. - **OTO** (One Triggers the Other): A trigger order that, when filled, activates a conditional order. - **OTOCO** (One Triggers a One Cancels the Other): A trigger order that, when filled, activates an OCO pair of two peer orders. operationId: Trading_placeComplexOrder parameters: - in: path name: accountId required: true description: The ID of the account to execute the trade on. schema: $ref: "#/components/schemas/AccountID" - in: query required: true name: userId schema: $ref: "#/components/schemas/UserID" - in: query required: true name: userSecret schema: $ref: "#/components/schemas/UserSecret" requestBody: $ref: "#/components/requestBodies/ManualTradeFormComplexRequestBody" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/ComplexOrderResponse" "400": description: Trade could not be placed content: application/json: schema: $ref: "#/components/schemas/400FailedRequestResponse" "403": description: User does not have permissions to place trades content: application/json: schema: $ref: "#/components/schemas/403FailedRequestResponse" "500": description: Unexpected Error /accounts/{accountId}/trading/replace: post: tags: - Trading summary: Replace order description: | Replaces an existing pending order with a new one. The way this works is brokerage dependent, but usually involves cancelling the existing order and placing a new one. The order's brokerage_order_id may or may not change, be sure to use the one returned in the response going forward. Only supported on some brokerages operationId: Trading_replaceOrder parameters: - in: path name: accountId required: true description: The ID of the account to execute the trade on. schema: $ref: "#/components/schemas/Id" - in: query required: true name: userId schema: $ref: "#/components/schemas/UserID" - in: query required: true name: userSecret schema: $ref: "#/components/schemas/UserSecret" requestBody: $ref: "#/components/requestBodies/ManualTradeReplaceFormRequestBody" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/AccountOrderRecord" "400": description: Trade could not be placed content: application/json: schema: $ref: "#/components/schemas/400FailedRequestResponse" "403": description: User does not have permissions to place trades content: application/json: schema: $ref: "#/components/schemas/403FailedRequestResponse" "500": description: Unexpected Error /trade/impact: post: tags: - Trading summary: Check equity order impact description: Simulates an order and its impact on the account. This endpoint does not place the order with the brokerage. If successful, it returns a `Trade` object and the ID of the object can be used to place the order with the brokerage using the [place checked order endpoint](/reference/Trading/Trading_placeOrder). Please note that the `Trade` object returned expires after 5 minutes. Any order placed using an expired `Trade` will be rejected. operationId: Trading_getOrderImpact parameters: - in: query required: true name: userId schema: $ref: "#/components/schemas/UserID" - in: query required: true name: userSecret schema: $ref: "#/components/schemas/UserSecret" requestBody: $ref: "#/components/requestBodies/ManualTradeFormRequestBody" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/ManualTradeAndImpact" "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/400FailedRequestResponse" "403": description: Forbidden content: application/json: schema: $ref: "#/components/schemas/403FailedRequestResponse" "500": description: Unexpected Error /trade/{tradeId}: post: tags: - Trading summary: Place checked equity order description: | Places the previously checked order with the brokerage. The `tradeId` is obtained from the [check order impact endpoint](/reference/Trading/Trading_getOrderImpact). If you prefer to place the order without checking for impact first, you can use the [place order endpoint](/reference/Trading/Trading_placeForceOrder). It's recommended to trigger a manual refresh of the account after placing an order to ensure the account is up to date. You can use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint for this. operationId: Trading_placeOrder parameters: - in: path name: tradeId required: true description: Obtained from calling the [check order impact endpoint](/reference/Trading/Trading_getOrderImpact) schema: $ref: "#/components/schemas/TradeID" - in: query required: true name: userId schema: $ref: "#/components/schemas/UserID" - in: query required: true name: userSecret schema: $ref: "#/components/schemas/UserSecret" requestBody: $ref: "#/components/requestBodies/ValidatedTradeRequestBody" responses: "200": description: Status of order placed content: application/json: schema: $ref: "#/components/schemas/AccountOrderRecord" "400": description: Failed to submit order to broker content: application/json: schema: $ref: "#/components/schemas/400FailedRequestResponse" "500": description: Unexpected Error /accounts/{accountId}/orders/details: post: tags: - Account Information summary: Get account order detail operationId: AccountInformation_getUserAccountOrderDetail description: | Returns the detail of a single order using the external order ID provided in the request body. This endpoint only works for single-leg orders at this time. Support for multi-leg orders will be added in the future. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint. parameters: - in: path name: accountId required: true schema: $ref: "#/components/schemas/AccountID" - in: query required: true name: userId schema: $ref: "#/components/schemas/UserID" - in: query required: true name: userSecret schema: $ref: "#/components/schemas/UserSecret" requestBody: $ref: "#/components/requestBodies/OrderDetailRequestBody" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/AccountOrderRecord" "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/400FailedRequestResponse" "404": description: Not Found content: application/json: schema: $ref: "#/components/schemas/404FailedRequestResponse" "500": description: Unexpected error content: application/json: schema: $ref: "#/components/schemas/500UnexpectedExceptionResponse" "503": description: Service Unavailable - the brokerage connection is busy syncing (sync lock held) or the brokerage API is temporarily unavailable. Safe to retry. content: application/json: schema: $ref: "#/components/schemas/503BrokerageRequestResponse" /accounts/{accountId}/orders/details/v2/{brokerageOrderId}: get: tags: - Experimental endpoints summary: Get account order detail (V2) operationId: AccountInformation_getUserAccountOrderDetailV2 description: | Returns the detail of a single order using the brokerage order ID provided as a path parameter. The V2 order response format includes all legs of the order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint. parameters: - in: path name: accountId required: true schema: $ref: "#/components/schemas/AccountID" - in: path name: brokerageOrderId required: true schema: $ref: "#/components/schemas/BrokerageOrderID" - in: query required: true name: userId schema: $ref: "#/components/schemas/UserID" - in: query required: true name: userSecret schema: $ref: "#/components/schemas/UserSecret" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/AccountOrderRecordV2" "404": description: Not Found content: application/json: schema: $ref: "#/components/schemas/404FailedRequestResponse" "500": description: Unexpected error content: application/json: schema: $ref: "#/components/schemas/500UnexpectedExceptionResponse" "503": description: Service Unavailable - the brokerage connection is busy syncing (sync lock held) or the brokerage API is temporarily unavailable. Safe to retry. content: application/json: schema: $ref: "#/components/schemas/503BrokerageRequestResponse" /accounts/{accountId}/trading/crypto: post: tags: - Trading summary: Place crypto order description: | Places an order in the specified account. This endpoint does not compute the impact to the account balance from the order before submitting the order. operationId: Trading_placeCryptoOrder parameters: - in: query required: true name: userId schema: $ref: "#/components/schemas/UserID" - in: query required: true name: userSecret schema: $ref: "#/components/schemas/UserSecret" - in: path required: true name: accountId schema: $ref: "#/components/schemas/AccountID" requestBody: $ref: "#/components/requestBodies/CryptoOrderRequestBody" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/OrderUpdatedResponse" "400": description: Invalid request content: application/json: schema: $ref: "#/components/schemas/400FailedRequestResponse" "500": description: Unexpected Error /accounts/{accountId}/trading/cancel: post: tags: - Trading summary: Cancel order description: | Cancels an order in the specified account. Accepts order IDs for all asset types. operationId: Trading_cancelOrder parameters: - in: query required: true name: userId schema: $ref: "#/components/schemas/UserID" - in: query required: true name: userSecret schema: $ref: "#/components/schemas/UserSecret" - in: path required: true name: accountId schema: $ref: "#/components/schemas/AccountID" requestBody: $ref: "#/components/requestBodies/CancelOrderRequestBody" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/CancelOrderResponse" "400": description: Invalid request content: application/json: schema: $ref: "#/components/schemas/400FailedRequestResponse" "500": description: Unexpected Error /accounts/{accountId}/trading/crypto/preview: post: tags: - Trading summary: Preview crypto order description: | Previews an order using the specified account. operationId: Trading_previewCryptoOrder parameters: - in: query required: true name: userId schema: $ref: "#/components/schemas/UserID" - in: query required: true name: userSecret schema: $ref: "#/components/schemas/UserSecret" - in: path required: true name: accountId schema: $ref: "#/components/schemas/AccountID" requestBody: $ref: "#/components/requestBodies/CryptoOrderRequestBody" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/CryptoOrderPreview" "400": description: Invalid request content: application/json: schema: $ref: "#/components/schemas/400FailedRequestResponse" "500": description: Unexpected Error /accounts/{accountId}/trading/instruments/cryptocurrencyPairs: get: tags: - Trading summary: Get crypto pairs description: | Searches cryptocurrency pairs instruments accessible to the specified account. Both `base` and `quote` are optional. Omit both for a full list of cryptocurrency pairs. operationId: Trading_searchCryptocurrencyPairInstruments parameters: - in: query required: true name: userId schema: $ref: "#/components/schemas/UserID" - in: query required: true name: userSecret schema: $ref: "#/components/schemas/UserSecret" - in: path required: true name: accountId schema: $ref: "#/components/schemas/AccountID" - in: query required: false name: base schema: $ref: "#/components/schemas/CryptocurrencyBaseSymbol" - in: query required: false name: quote schema: $ref: "#/components/schemas/CryptocurrencyQuoteSymbol" responses: "200": description: OK content: application/json: schema: type: object required: ["items"] description: The instruments properties: items: type: array items: $ref: "#/components/schemas/CryptocurrencyPair" "400": description: Invalid request content: application/json: schema: $ref: "#/components/schemas/400FailedRequestResponse" "500": description: Unexpected Error /accounts/{accountId}/trading/instruments/cryptocurrencyPairs/{instrumentSymbol}/quote: get: tags: - Trading summary: Get crypto pair quote description: | Gets a quote for the specified account. operationId: Trading_getCryptocurrencyPairQuote parameters: - in: query required: true name: userId schema: $ref: "#/components/schemas/UserID" - in: query required: true name: userSecret schema: $ref: "#/components/schemas/UserSecret" - in: path required: true name: accountId schema: $ref: "#/components/schemas/AccountID" - in: path required: true name: instrumentSymbol schema: $ref: "#/components/schemas/CryptocurrencyPairSymbol" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/CryptocurrencyPairQuote" "400": description: Invalid request content: application/json: schema: $ref: "#/components/schemas/400FailedRequestResponse" "500": description: Unexpected Error /accounts/{accountId}/trading/options/impact: post: tags: - Trading summary: Get option order impact description: | Simulates an option order with up to 4 legs and returns the estimated cost and transaction fees without placing it. Only supported for certain enabled brokerages. Please refer to the [brokerage trading support page](https://support.snaptrade.com/brokerages) for more information on which brokerages support this endpoint. operationId: Trading_getOptionImpact parameters: - in: query required: true name: userId schema: $ref: "#/components/schemas/UserID" - in: query required: true name: userSecret schema: $ref: "#/components/schemas/UserSecret" - in: path required: true name: accountId schema: $ref: "#/components/schemas/AccountID" requestBody: $ref: "#/components/requestBodies/MlegOrderRequestBody" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/OptionImpact" "400": description: Invalid request, or option impact is not supported for this brokerage content: application/json: schema: $ref: "#/components/schemas/400FailedRequestResponse" "403": description: Forbidden content: application/json: schema: $ref: "#/components/schemas/403FailedRequestResponse" "501": # Deprecated: unsupported brokerages now return 400 (see the 400 response above). # Retained for backward compatibility — removing a documented response code is a # breaking change to the public API contract (konfig detect-breaking-change). description: Deprecated. Previously returned when option impact was not supported for this brokerage; such requests now return 400. /accounts/{accountId}/trading/options: post: tags: - Trading summary: Place option order description: | Places a multi-leg option order. Only supported on certain option trading brokerages. https://support.snaptrade.com/brokerages has information on brokerage trading support operationId: Trading_placeMlegOrder parameters: - in: query required: true name: userId schema: $ref: "#/components/schemas/UserID" - in: query required: true name: userSecret schema: $ref: "#/components/schemas/UserSecret" - in: path required: true name: accountId schema: $ref: "#/components/schemas/AccountID" requestBody: $ref: "#/components/requestBodies/MlegOrderRequestBody" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/MlegOrderResponse" "400": description: Invalid request content: application/json: schema: $ref: "#/components/schemas/400FailedRequestResponse" "500": description: Unexpected Error /activities: get: deprecated: true tags: - Transactions And Reporting summary: Get transaction history for a user operationId: TransactionsAndReporting_getActivities description: | **Deprecated.** Use [the account level endpoint](/reference/Account%20Information/AccountInformation_getAccountActivities) instead, if possible. This endpoint will return HTTP 410 Gone for all customers that sign up after April 25, 2026. Returns all historical transactions for the specified user and filtering criteria. It's recommended to use `startDate` and `endDate` to paginate through the data, as the response may be very large for accounts with a long history and/or a lot of activity. There's a max number of 10000 transactions returned per request. There is no guarantee to the ordering of the transactions returned. Please sort the transactions based on the `trade_date` field if you need them in a specific order. This endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. parameters: - in: query required: false name: startDate description: The start date (inclusive) of the transaction history to retrieve. If not provided, the default is the first transaction known to SnapTrade based on `trade_date`. schema: $ref: "#/components/schemas/ReportingDate" - in: query required: false name: endDate description: The end date (inclusive) of the transaction history to retrieve. If not provided, the default is the last transaction known to SnapTrade based on `trade_date`. schema: $ref: "#/components/schemas/ReportingDate" - in: query required: false name: accounts description: Optional comma separated list of SnapTrade Account IDs used to filter the request to specific accounts. If not provided, the default is all known brokerage accounts for the user. The `brokerageAuthorizations` parameter takes precedence over this parameter. schema: $ref: "#/components/schemas/AccountIDs" - in: query required: false name: brokerageAuthorizations description: Optional comma separated list of SnapTrade Connection (Brokerage Authorization) IDs used to filter the request to only accounts that belong to those connections. If not provided, the default is all connections for the user. This parameter takes precedence over the `accounts` parameter. schema: $ref: "#/components/schemas/BrokerageAuthIDs" - in: query required: false name: type description: | Optional comma separated list of transaction types to filter by. SnapTrade does a best effort to categorize brokerage transaction types into a common set of values. Here are some of the most popular values: - `BUY` - Asset bought. - `SELL` - Asset sold. - `DIVIDEND` - Dividend payout. - `SUBSTITUTE_DIVIDEND` - Payment in lieu of a dividend. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` - Transfer of assets from one account to another schema: type: string example: BUY,SELL,DIVIDEND - in: query required: true name: userId schema: $ref: "#/components/schemas/UserID" - in: query required: true name: userSecret schema: $ref: "#/components/schemas/UserSecret" responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/UniversalActivity" default: description: Unexpected error /performance/custom: get: deprecated: true tags: - Transactions And Reporting summary: Get performance information for a specific timeframe operationId: TransactionsAndReporting_getReportingCustomRange description: | **Deprecated.** Returns performance information (contributions, dividends, rate of return, etc) for a specific timeframe. Please note that Total Equity Timeframe and Rate of Returns are experimental features. Please contact support@snaptrade.com if you notice any inconsistencies. parameters: - in: query required: true name: startDate schema: $ref: "#/components/schemas/ReportingDate" - in: query required: true name: endDate schema: $ref: "#/components/schemas/ReportingDate" - in: query required: false name: accounts description: Optional comma separated list of account IDs used to filter the request on specific accounts schema: $ref: "#/components/schemas/AccountIDs" - in: query required: false name: detailed description: Optional, increases frequency of data points for the total value and contribution charts if set to true schema: type: boolean example: true - in: query required: false name: frequency description: Optional frequency for the rate of return chart (defaults to monthly). Possible values are daily, weekly, monthly, quarterly, yearly. schema: $ref: "#/components/schemas/ReportingFrequency" - in: query required: true name: userId schema: $ref: "#/components/schemas/UserID" - in: query required: true name: userSecret schema: $ref: "#/components/schemas/UserSecret" responses: "200": description: Successfully retrieved performance data content: application/json: schema: $ref: "#/components/schemas/PerformanceCustom" default: description: Unexpected error /connectionAdded: post: tags: - Webhooks operationId: Webhooks_connectionAdded description: A webhook that is sent whenever a new connection is added. requestBody: description: Information about a new connection in the system content: application/json: schema: $ref: "#/components/schemas/WebhookBase" responses: "200": description: Return a 200 status to indicate that the connection was successful "201": description: Return a 201 status to indicate that the connection was successful /connectionDeleted: post: tags: - Webhooks operationId: Webhooks_connectionDeleted description: A webhook that is sent whenever an existing connection is deleted. requestBody: description: Information about the deleted connection content: application/json: schema: $ref: "#/components/schemas/WebhookBase" responses: "200": description: Return a 200 status to indicate that the connection was deleted successfully "201": description: Return a 201 status to indicate that the connection was deleted /userRegistered: post: tags: - Webhooks operationId: Webhooks_userRegistered description: A webhook that is sent whenever a user is newly registered. requestBody: description: Information about the newly registered user content: application/json: schema: $ref: "#/components/schemas/WebhookBase" responses: "200": description: Return a 200 status to indicate that the user was registered successfully "201": description: Return a 201 status to indicate that user was registered successfully /userDeleted: post: tags: - Webhooks operationId: Webhooks_userDeleted description: A webhook that is sent whenever an existing user is deleted. requestBody: description: Information about the deleted user content: application/json: schema: $ref: "#/components/schemas/WebhookBase" responses: "200": description: Return a 200 status to indicate that the user was deleted successfully "201": description: Return a 201 status to indicate that the connection was successful /accountAdded: post: tags: - Webhooks operationId: Webhooks_accountAdded description: A webhook that is sent whenever a new account is added to an existing brokerage authorization. requestBody: description: Information about the newly added account content: application/json: schema: $ref: "#/components/schemas/WebhookBase" responses: "200": description: Return a 200 status to indicate that the account was added successfully "201": description: Return a 201 status to indicate that the account was added successfully /accountDeleted: post: tags: - Webhooks operationId: Webhooks_accountDeleted description: A webhook that is sent whenever an existing account under a brokerage authorization is deleted. requestBody: description: Information about the deleted account content: application/json: schema: $ref: "#/components/schemas/WebhookBase" responses: "200": description: Return a 200 status to indicate that the account was deleted successfully "201": description: Return a 201 status to indicate that the account was deleted successfully /transactionsUpdated: post: tags: - Webhooks operationId: Webhooks_updatedTransactions description: A webhook that is sent whenever transactions have been updated for an account. requestBody: description: Information about the account for which transactions have been updated content: application/json: schema: $ref: "#/components/schemas/WebhookBase" responses: "200": description: Return a 200 status to indicate that the update was successful "201": description: Return a 201 status to indicate the update was successful /accountBalanceHistoryUpdated: post: tags: - Webhooks operationId: Webhooks_accountBalanceHistoryUpdated description: Notifies when account balance history has been updated for an account. requestBody: description: Information about the account for which account value history has been updated content: application/json: schema: $ref: "#/components/schemas/WebhookBase" responses: "200": description: Return a 200 status to indicate that the update was successful "201": description: Return a 201 status to indicate the update was successful components: securitySchemes: PartnerSignature: type: apiKey in: header name: Signature PartnerClientId: type: apiKey in: query name: clientId PartnerTimestamp: type: apiKey in: query name: timestamp requestBodies: RegisterUserRequestBody: required: true content: application/json: schema: $ref: "#/components/schemas/SnapTradeRegisterUserRequestBody" ResetUserSecretRequestBody: required: true content: application/json: schema: $ref: "#/components/schemas/UserIDandSecret" CreateTradeDetectionSubscriptionRequestBody: required: true content: application/json: schema: type: object required: ["account_id", "check_interval_seconds"] properties: account_id: $ref: "#/components/schemas/AccountID" check_interval_seconds: type: integer minimum: 1 description: How often the subscribed account should be checked for new trades. Must match an active Trade Detection plan. example: 300 CancelTradeDetectionSubscriptionRequestBody: required: true content: application/json: schema: type: object required: ["account_id"] properties: account_id: $ref: "#/components/schemas/AccountID" SnapTradeLoginUserRequestBody: content: application/json: schema: $ref: "#/components/schemas/SnapTradeLoginUserRequestBody" ManualTradeFormRequestBody: required: true content: application/json: schema: $ref: "#/components/schemas/ManualTradeForm" ManualTradeFormRequestBodyWithOptions: required: true content: application/json: schema: $ref: "#/components/schemas/ManualTradeFormWithOptions" ManualTradeFormRequestBodyBracket: required: true content: application/json: schema: $ref: "#/components/schemas/ManualTradeFormBracket" ManualTradeFormComplexRequestBody: required: true content: application/json: schema: $ref: "#/components/schemas/ManualTradeFormComplex" ManualTradeReplaceFormRequestBody: required: true content: application/json: schema: $ref: "#/components/schemas/ManualTradeReplaceForm" ValidatedTradeRequestBody: required: false content: application/json: schema: $ref: "#/components/schemas/ValidatedTradeBody" CancelOrderRequestBody: required: true content: application/json: schema: type: object required: ["brokerage_order_id"] properties: brokerage_order_id: $ref: "#/components/schemas/BrokerageOrderID" OrderDetailRequestBody: required: true content: application/json: schema: type: object required: ["brokerage_order_id"] properties: brokerage_order_id: $ref: "#/components/schemas/BrokerageOrderID" OptionStrategyRequestBody: required: true content: application/json: schema: type: object required: ["underlying_symbol_id", "legs", "strategy_type"] properties: underlying_symbol_id: $ref: "#/components/schemas/Id" legs: type: array items: $ref: "#/components/schemas/OptionLeg" strategy_type: type: string enum: - CUSTOM OrderStrategyExecuteBody: required: true content: application/json: schema: type: object required: ["order_type", "time_in_force"] properties: order_type: $ref: "#/components/schemas/OrderTypeStrict" time_in_force: $ref: "#/components/schemas/TimeInForceStrict" price: $ref: "#/components/schemas/Price" SimpleOrderRequestBody: required: true content: application/json: schema: $ref: "#/components/schemas/SimpleOrderForm" CryptoOrderRequestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CryptoOrderForm" MlegOrderRequestBody: required: true content: application/json: schema: $ref: "#/components/schemas/MlegTradeForm" schemas: 400FailedRequestResponse: description: Example for failed request response type: object properties: default_detail: example: Unable to verify data sent default_code: example: 1076 401FailedRequestResponse: description: Example for failed request response type: object properties: default_detail: example: Unable to verify signature sent default_code: example: 1076 402BrokerageAuthDisabledResponse: description: Cannot perform action because connection is disabled type: object properties: detail: example: Unable to sync with brokerage account because the connection is disabled. code: example: 3003 402BrokerageAuthAlreadyDisabledException: description: This connection is already disabled. type: object properties: detail: example: This connection is already disabled. code: example: 3011 403FailedRequestResponse: description: Example for failed request response type: object properties: default_detail: example: User does not have permission to access this resource default_code: example: 1066 403FeatureNotEnabledResponse: description: Example for failed request response type: object properties: detail: example: Feature is not enabled for this customer or this connection default_code: example: 1141 404FailedRequestResponse: description: Example for failed request response type: object properties: default_detail: example: The requested resource does not exist. default_code: example: 1011 425FailedRequestResponse: description: Example for failed request response type: object properties: detail: example: The resource is currently being populated. Please try again later. code: example: 3012 429TooManyRequestsResponse: description: Example for a rate-limited request response type: object properties: detail: example: Connection refreshed too recently. Please try again later. status_code: example: 429 code: example: throttled 500UnexpectedExceptionResponse: description: Example for a response that failed for unexpected reasons type: object properties: detail: example: Encountered an unexpected exception. status_code: example: 500 code: example: 1000 501NotImplementedResponse: description: Example for a response where the endpoint is not implemented for the brokerage type: object properties: error: example: The orders endpoint is not yet implemented for brokerage some-brokerage 503BrokerageRequestResponse: description: Example for a response that failed because of an upstream brokerage API failure type: object properties: detail: example: Unable to sync with brokerage account. Invalid response from Brokerage API. status_code: example: 503 code: example: 3002 AccountSyncStatus: description: Contains status update for the account sync process between SnapTrade and the brokerage. properties: transactions: $ref: "#/components/schemas/TransactionsStatus" holdings: $ref: "#/components/schemas/HoldingsStatus" TransactionsStatus: description: | Status of account transaction sync. SnapTrade syncs transactions from the brokerage under the following conditions: 1. Initial connection - SnapTrade syncs all transactions from the brokerage account as far back as the brokerage allows. Check [our integrations doc](https://support.snaptrade.com/brokerages-table?v=6fab8012ade6441fa0c6d9af9c55ce3a) for details on how far back we sync for each brokerage. 2. Daily sync - Once a day SnapTrade syncs new transactions from the brokerage. 3. Manual sync - You can trigger an incremental sync of transactions with the [transactions sync](/reference/Experimental%20endpoints/Connections_syncBrokerageAuthorizationTransactions) endpoint. properties: initial_sync_completed: description: Indicates if the initial sync of transactions has been completed. For accounts with a large number of transactions, the initial sync may take a while to complete. type: boolean example: true last_successful_sync: description: All transactions up to this date have been successfully synced. Please note that this is not the date of the last transaction, nor the last time SnapTrade attempted to sync transactions. nullable: true allOf: - $ref: "#/components/schemas/SyncStatusDate" first_transaction_date: description: The date of the first transaction in the account known to SnapTrade. It's possible that the account has transactions before this date, but they are not known to SnapTrade. nullable: true allOf: - $ref: "#/components/schemas/SyncStatusDate" HoldingsStatus: description: | Status of account holdings sync. SnapTrade syncs holdings from the brokerage under the following conditions: 1. Initial connection - SnapTrade syncs all holdings (positions, balances, recent orders, and transactions) immediately after the connection is established. 2. Daily sync - Once a day SnapTrade refreshes all holdings from the brokerage. 3. Manual sync - You can trigger a refresh of holdings with the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. properties: initial_sync_completed: description: Indicates if the initial sync of holdings has been completed. For accounts with a large number of positions/orders/transactions, the initial sync may take a while to complete. type: boolean example: true last_successful_sync: description: The last time holdings were successfully synced by SnapTrade. nullable: true allOf: - $ref: "#/components/schemas/HoldingsSyncStatusDate" holdings_unavailable: description: | Indicates that the brokerage does not expose this account's holdings to SnapTrade, so the empty positions and balances reported for it do not mean the account is empty. This is set for accounts served by a separate brokerage system that we cannot read, such as Vanguard employer-sponsored retirement plans. When this is `true`, prefer the account's total value over the sum of its positions and cash, and note that `initial_sync_completed` and `last_successful_sync` may still reflect an earlier sync. type: boolean example: true AccountBalance: description: Contains balance related information for the account. properties: total: description: Total market value of this account (includes cash, equity, fixed income, etc). This value is directly obtained from the brokerage and should reflect the most accurate value of the account. nullable: true properties: amount: type: number description: Total value denominated in the currency of the `currency` field. example: 15363.23 currency: type: string description: The ISO-4217 currency code for the amount. example: USD Account: description: A single account at a brokerage. type: object required: - id - brokerage_authorization - name - number - institution_name - created_date - sync_status - balance - is_paper properties: id: description: Unique identifier for the connected brokerage account. This is the UUID used to reference the account in SnapTrade. This ID should not change for as long as the connection stays active. If the connection is deleted and re-added, a new account ID will be generated. allOf: - $ref: "#/components/schemas/AccountID" brokerage_authorization: $ref: "#/components/schemas/BrokerageAuthID" name: type: string description: A display name for the account. Either assigned by the user or by the brokerage itself. For certain brokerages, SnapTrade appends the brokerage name to the account name for clarity. example: Robinhood Individual nullable: true number: type: string example: Q6542138443 description: The account number assigned by the brokerage. For some brokerages, this field may be masked for security reasons. institution_account_id: type: string example: "54953432" nullable: true description: A stable and unique account identifier provided by the institution. Will be set to null if not provided. When present, can be used to check if a user has connected the same brokerage account across multiple connections. institution_name: type: string description: The name of the brokerage that holds the account. example: Robinhood created_date: description: Timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format indicating when the account was created in SnapTrade. This is _not_ the account opening date at the brokerage. type: string format: date-time example: 2024-07-23T22:50:22.761390Z funding_date: description: Timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format indicating when the account was funded. type: string format: date-time nullable: true example: 2024-07-25T12:00:00.000000Z opening_date: description: Timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format indicating when the account was opened at the brokerage. type: string format: date-time nullable: true example: 2024-07-20T09:30:00.000000Z sync_status: $ref: "#/components/schemas/AccountSyncStatus" balance: $ref: "#/components/schemas/AccountBalance" status: type: string description: The current status of the account. Can be either "open", "closed", "archived" or null if the status is unknown or not provided by the brokerage. enum: [open, closed, archived, unavailable] nullable: true example: 'open' raw_type: type: string description: The account type as provided by the brokerage example: Margin nullable: true account_category: type: string description: | The category of the account, normalized across institutions. Returns `null` if the category could not be determined. Use this field to filter out non-investment accounts if your integration only supports trading / holdings flows. See [Filtering Accounts by Category](https://docs.snaptrade.com/docs/filtering-accounts-by-category) for more information. - `INVESTMENT`: A brokerage / investment account (equities, options, crypto, etc.). - `DEPOSIT`: A bank deposit account (checking, savings). - `LOC`: A line of credit account. enum: [INVESTMENT, DEPOSIT, LOC] nullable: true example: 'INVESTMENT' meta: type: object deprecated: true description: Additional information about the account, such as account type, status, etc. This information is specific to the brokerage and there's no standard format for this data. This field is deprecated and subject to removal in a future version. example: type: Margin status: ACTIVE institution_name: Robinhood portfolio_group: $ref: "#/components/schemas/PortfolioGroupID" cash_restrictions: deprecated: true description: This field is deprecated. type: array items: type: string example: [] is_paper: type: boolean description: Indicates whether the account is a paper (simulated) trading account. example: false AccountSimple: description: A single account at a brokerage. type: object properties: id: $ref: "#/components/schemas/AccountID" name: type: string description: A display name for the account. Either assigned by the user or by the brokerage itself. For certain brokerages, SnapTrade appends the brokerage name to the account name for clarity. example: Robinhood Individual number: type: string example: Q6542138443 description: The account number assigned by the brokerage. For some brokerages, this field may be masked for security reasons. institution_account_id: type: string example: "54953432" nullable: true description: A stable and unique account identifier provided by the institution. Will be set to null if not provided. When present, can be used to check if a user has connected the same brokerage account across multiple connections. sync_status: $ref: "#/components/schemas/AccountSyncStatus" AccountID: description: Unique identifier for the connected brokerage account. This is the UUID used to reference the account in SnapTrade. type: string format: uuid example: 917c8734-8470-4a3e-a18f-57c3f2ee6631 AccountIDs: description: Comma separated list of account IDs type: string example: 917c8734-8470-4a3e-a18f-57c3f2ee6631,65e839a3-9103-4cfb-9b72-2071ef80c5f2 TradeDetectionSubscription: description: An active Trade Detection subscription for a brokerage account. type: object required: - account_id - cost - check_interval_seconds properties: account_id: $ref: "#/components/schemas/AccountID" cost: type: string description: Monthly subscription cost as a decimal string. example: "100.00" check_interval_seconds: type: integer description: How often the subscribed account is checked for new trades. example: 300 TradeDetectionCancelSubscriptionResponse: type: object required: - success properties: success: type: boolean example: true BrokerageID: description: Unique identifier for the brokerage. type: string format: uuid example: 87b24961-b51e-4db8-9226-f198f6518a89 BrokerageAuthID: description: Unique identifier for the connection (brokerage_authorization_id). This is the UUID used to reference the connection in SnapTrade. type: string format: uuid example: 87b24961-b51e-4db8-9226-f198f6518a89 BrokerageAuthIDs: description: Comma separated list of brokerage authorization IDs type: string example: 917c8734-8470-4a3e-a18f-57c3f2ee6631,65e839a3-9103-4cfb-9b72-2071ef80c5f2 AccountHoldings: description: Account Holdings type: object properties: account: $ref: "#/components/schemas/SnapTradeHoldingsAccount" balances: type: array nullable: true items: $ref: "#/components/schemas/Balance" positions: type: array nullable: true items: $ref: "#/components/schemas/Position" total_value: $ref: "#/components/schemas/SnapTradeHoldingsTotalValue" AccountHoldingsAccount: description: A wrapper object containing holdings information for a single account. type: object properties: account: $ref: "#/components/schemas/Account" balances: type: array nullable: true description: List of balances for the account. Each element of the list has a distinct currency. Some brokerages like Questrade [allows holding multiple currencies in the same account](https://www.questrade.com/learning/questrade-basics/balances-and-reports/understanding-your-account-balances). items: $ref: "#/components/schemas/Balance" positions: type: array nullable: true description: List of stock/ETF/crypto/mutual fund positions in the account. items: $ref: "#/components/schemas/Position" option_positions: type: array nullable: true description: List of option positions in the account. items: $ref: "#/components/schemas/OptionsPosition" orders: type: array nullable: true description: List of recent orders in the account, including both pending and executed orders. Note that option orders are included in this list. Option orders will have a null `universal_symbol` field and a non-null `option_symbol` field. items: $ref: "#/components/schemas/AccountOrderRecord" total_value: $ref: "#/components/schemas/SnapTradeHoldingsTotalValue" RecentOrdersResponse: description: List of orders executed within the last 24 hours type: object properties: orders: type: array description: List of orders executed in the last 24 hours items: $ref: "#/components/schemas/AccountOrderRecord" RateOfReturnResponse: description: List of return rates with their timeframe type: object properties: data: type: array description: List of return percentages items: $ref: "#/components/schemas/RateOfReturnObject" RateOfReturnObject: description: Individual rate of return object with return percent and timeframe type: object properties: timeframe: type: string enum: - ALL - 1Y - YTD - 1M - 1W - 1D description: The timeframe this return percent is reflecting example: ALL return_percent: type: number description: The percent return of the portfolio, directly from the brokerage. 5.97 indicates a 5.97% return over the timeframe example: 5.97 created_date: type: string description: The date this was fetched format: date-time example: 2024-07-30T22:51:49.746270Z AccountOrderRecord: description: Describes a single recent order in an account. Each record here represents a single order leg. For multi-leg orders, there will be multiple records. type: object properties: brokerage_order_id: $ref: "#/components/schemas/BrokerageOrderID" brokerage_group_order_id: description: | The brokerage-assigned identifier that links all orders within a complex order (OCO, OTO, OTOCO) together. Null for non-complex orders or when the brokerage does not return a group identifier. nullable: true type: string example: "1234567890" order_role: description: | The role of this order within a complex order group (OCO, OTO, OTOCO). Null for non-complex orders. nullable: true type: string enum: - TRIGGER - CONDITIONAL - PEER example: TRIGGER status: $ref: "#/components/schemas/AccountOrderRecordStatus" universal_symbol: description: Contains information about the security that the order is for. This field is only present for stock/ETF/crypto/mutual fund orders. For option orders, this field will be null and the `option_symbol` field will be populated. nullable: true allOf: - $ref: "#/components/schemas/UniversalSymbol" option_symbol: description: Contains information about the option contract that the order is for. This field is only present for option orders. For stock/ETF/crypto/mutual fund orders, this field will be null and the `universal_symbol` field will be populated. nullable: true allOf: - $ref: "#/components/schemas/OptionsSymbol" quote_universal_symbol: description: Quote cryptocurrency. This field is only present for cryptocurrency pair orders with a cryptocurrency as quote. nullable: true allOf: - $ref: "#/components/schemas/UniversalSymbol" quote_currency: description: Quote currency. This field is only present for cryptocurrency pair orders with a fiat currency as quote. nullable: true allOf: - $ref: "#/components/schemas/Currency" action: $ref: "#/components/schemas/Action" total_quantity: description: The total number of shares or contracts of the order. This should be the sum of the filled, canceled, and open quantities. Can be a decimal number for fractional shares. nullable: true type: string example: "100" open_quantity: description: The number of shares or contracts that are still open (waiting for execution). Can be a decimal number for fractional shares. nullable: true type: string example: "10" canceled_quantity: description: The number of shares or contracts that have been canceled. Can be a decimal number for fractional shares. nullable: true type: string example: "10" filled_quantity: description: The number of shares or contracts that have been filled. Can be a decimal number for fractional shares. nullable: true type: string example: "80" execution_price: description: The price at which the order was executed. For option orders, this represents the price per share. nullable: true type: string format: decimal example: "12.34" limit_price: description: The limit price is maximum price one is willing to pay for a buy order or the minimum price one is willing to accept for a sell order. Should only apply to `Limit` and `StopLimit` orders. For option orders, this represents the price per share. nullable: true type: string format: decimal example: "12.34" stop_price: description: The stop price is the price at which a stop order is triggered. Should only apply to `Stop` and `StopLimit` orders. For option orders, this represents the price per share. nullable: true type: string format: decimal example: "12.50" trailing_stop: description: For trailing stop orders, contains the trail configuration. Null for all other order types. nullable: true allOf: - $ref: "#/components/schemas/TrailingStop" order_type: description: The type of order placed. The most common values are `Market`, `Limit`, `Stop`, and `StopLimit`. We try our best to map brokerage order types to these values. When mapping fails, we will return the brokerage's order type value. nullable: true type: string example: Market time_in_force: description: > The Time in Force type for the order. This field indicates how long the order will remain active before it is executed or expires. We try our best to map brokerage time in force values to the following. When mapping fails, we will return the brokerage's time in force value. - `Day` - Day. The order is valid only for the trading day on which it is placed. - `GTC` - Good Til Canceled. The order is valid until it is executed or canceled. - `FOK` - Fill Or Kill. The order must be executed in its entirety immediately or be canceled completely. - `IOC` - Immediate Or Cancel. The order must be executed immediately. Any portion of the order that cannot be filled immediately will be canceled. - `GTD` - Good Til Date. The order is valid until the specified date. - `MOO` - Market On Open. The order is to be executed at the day's opening price. - `EHP` - Extended Hours P.M. The order is to be placed during extended hour trading, after markets close. type: string time_placed: description: The time the order was placed. This is the time the order was submitted to the brokerage. type: string format: date-time example: 2024-07-30T22:51:49.746270Z time_updated: description: The time the order was last updated in the brokerage system. This value is not always available from the brokerage. nullable: true type: string format: date-time example: 2024-08-05T00:05:57.409000Z time_executed: description: The time the order was executed in the brokerage system. This value is not always available from the brokerage. nullable: true type: string format: date-time example: 2024-08-05T00:05:57.409000Z expiry_date: description: The time the order expires. This value is not always available from the brokerage. nullable: true type: string format: date-time example: 2024-08-05T00:05:57.409000Z symbol: $ref: "#/components/schemas/BrokerageSymbolID" child_brokerage_order_ids: nullable: true allOf: - $ref: "#/components/schemas/ChildBrokerageOrderIDs" AccountValueHistoryResponse: description: The response to the account value history endpoint, containing a list of estimated account values at different points in time. type: object properties: history: type: array description: List of estimated account values over time returned by the endpoint. items: $ref: "#/components/schemas/AccountValueHistoryItem" currency: type: string description: The ISO-4217 currency code for the account values. example: "USD" AccountValueHistoryItem: description: The estimated account value at a specific point in time. type: object properties: date: description: The date of the estimated account value type: string format: date example: "2026-01-01" total_value: description: Estimate of the total market value of this account (includes cash, equity, fixed income, etc) at the given date. type: string example: "15363.23" AccountOrdersV2Response: description: Contains a standardized list of account orders in the V2 format. type: object properties: orders: type: array description: List of orders returned by the endpoint. items: $ref: "#/components/schemas/AccountOrderRecordV2" required: - orders AccountOrderRecordV2: description: Describes a single order in the standardized V2 format. type: object properties: brokerage_order_id: $ref: "#/components/schemas/BrokerageOrderID" brokerage_group_order_id: description: | The brokerage-assigned identifier that links all orders within a complex order (OCO, OTO, OTOCO) together. Null for non-complex orders or when the brokerage does not return a group identifier. nullable: true type: string example: "1234567890" order_role: description: | The role of this order within a complex order group (OCO, OTO, OTOCO). Null for non-complex orders. nullable: true type: string enum: - TRIGGER - CONDITIONAL - PEER example: TRIGGER status: $ref: "#/components/schemas/AccountOrderRecordStatus" order_type: description: | The type of order placed. - `MARKET` - `LIMIT` - `STOP` - `STOP_LIMIT` nullable: true type: string example: MARKET time_in_force: description: | The Time in Force type for the order. This field indicates how long the order will remain active before it is executed or expires. We try our best to map brokerage time in force values to the following. When mapping fails, we will return the brokerage's time in force value. - `DAY` - Day. The order is valid only for the trading day on which it is placed. - `GTC` - Good Til Canceled. The order is valid until it is executed or canceled. - `FOK` - Fill Or Kill. The order must be executed in its entirety immediately or be canceled completely. - `IOC` - Immediate Or Cancel. The order must be executed immediately. Any portion of the order that cannot be filled immediately will be canceled. - `GTD` - Good Til Date. The order is valid until the specified date. - `MOO` - Market On Open. The order is to be executed at the day's opening price. - `EHP` - Extended Hours P.M. The order is to be placed during extended hour trading, after markets close. type: string example: DAY time_placed: description: The time the order was placed. This is the time the order was submitted to the brokerage. type: string format: date-time example: 2024-07-30T22:51:49.746270Z time_executed: description: The time the order was executed in the brokerage system. This value is not always available from the brokerage. nullable: true type: string format: date-time example: 2024-08-05T00:05:57.409000Z quote_currency: description: Quote currency code for the order. type: string example: USD execution_price: description: The price at which the order was executed. nullable: true type: string format: decimal example: "12.34" limit_price: description: The limit price is maximum price one is willing to pay for a buy order or the minimum price one is willing to accept for a sell order. Should only apply to `Limit` and `StopLimit` orders. nullable: true type: string format: decimal example: "12.34" stop_price: description: The stop price is the price at which a stop order is triggered. Should only apply to `Stop` and `StopLimit` orders. nullable: true type: string format: decimal example: "12.50" trailing_stop: description: For trailing stop orders, contains the trail configuration. Null for all other order types. nullable: true allOf: - $ref: "#/components/schemas/TrailingStop" legs: type: array description: List of legs that make up the order. items: $ref: "#/components/schemas/AccountOrderRecordLeg" TrailingStop: description: Trail configuration for trailing stop orders. type: object required: - amount - type properties: amount: description: The trail amount. Interpreted as dollars if `type` is `DOLLAR`, or a percentage if `type` is `PERCENT`. type: string example: "0.60" type: description: Whether the trail `amount` is a dollar amount (`DOLLAR`) or a percentage (`PERCENT`). For example, if `amount` is "0.60" and `type` is `DOLLAR`, the stop price will trail the market price by $0.60. If `amount` is "5" and `type` is `PERCENT`, the stop price will trail the market price by 5%. type: string enum: - DOLLAR - PERCENT AccountOrderRecordLeg: description: Describes an individual leg that makes up an order in the V2 format. type: object properties: leg_id: description: Brokerage order identifier for this leg, if available. nullable: true type: string instrument: $ref: "#/components/schemas/AccountOrderRecordLegInstrument" action: $ref: "#/components/schemas/ActionStrictV2" execution_price: description: Execution price for this leg, if available. nullable: true type: string format: decimal example: "12.34" total_quantity: description: The total number of shares or contracts associated with this leg. Can be a decimal number for fractional shares. nullable: true type: string example: "10" canceled_quantity: description: The number of shares or contracts that have been canceled for this leg. nullable: true type: string example: "1" filled_quantity: description: The number of shares or contracts that have been filled for this leg. nullable: true type: string example: "9" status: nullable: true allOf: - $ref: "#/components/schemas/AccountOrderRecordStatusV2" AccountOrderRecordLegInstrument: description: Instrument metadata for an order leg. type: object properties: symbol: description: The symbol or ticker for the security. type: string example: AAPL description: description: Human-readable description of the security. type: string example: Apple Inc. asset_type: description: | Type of instrument for the leg. - EQUITY - OPTION - CRYPTO type: string example: EQUITY exchange_mic_code: description: | Market Identifier Code (MIC) for the exchange on which the instrument trades. Omitted for instruments with no listing exchange, such as index options (VIX, SPX). type: string example: XNAS figi_code: description: Financial Instrument Global Identifier (FIGI) if available. nullable: true type: string example: BBG000B9XRY4 AccountOrderRecordStatus: description: | Indicates the status of an order. SnapTrade does a best effort to map brokerage statuses to statuses in this enum. Possible values include: - NONE - PENDING - ACCEPTED - FAILED - REJECTED - CANCELED - PARTIAL_CANCELED - CANCEL_PENDING - EXECUTED - PARTIAL - REPLACE_PENDING - REPLACED - EXPIRED - QUEUED - TRIGGERED - ACTIVATED type: string enum: - NONE - PENDING - ACCEPTED - FAILED - REJECTED - CANCELED - PARTIAL_CANCELED - CANCEL_PENDING - EXECUTED - PARTIAL - REPLACE_PENDING - REPLACED - STOPPED - SUSPENDED - EXPIRED - QUEUED - TRIGGERED - ACTIVATED - PENDING_RISK_REVIEW - CONTINGENT_ORDER AccountOrderRecordStatusV2: description: Indicates the status of an order. SnapTrade does a best effort to map brokerage statuses to statuses in this enum. type: string enum: - PENDING - REJECTED - CANCELED - CANCEL_PENDING - PARTIAL_CANCELED - EXECUTED - PARTIALLY_EXECUTED - REPLACED - REPLACE_PENDING - EXPIRED OptionQuote: description: Real-time quote for a single option contract. type: object properties: symbol: type: string description: The OCC-formatted option symbol. example: "AAPL 251219C00150000" synthetic_price: type: number description: The derived synthetic price of the contract. example: 150.25 implied_volatility: type: number description: The implied volatility of the option contract. example: 0.32145678 timestamp: type: string format: date-time nullable: true description: The timestamp of the last update for the option quote. example: "2026-01-15T14:30:00Z" greeks: type: object description: The Greeks for the option contract. properties: delta: type: number description: Delta represents the rate of change between the option's price and a $1 change in the underlying asset's price. example: 0.5 gamma: type: number description: Gamma represents the rate of change between an option's delta and the underlying asset's price. example: 0.1 theta: type: number description: Theta represents the rate of change between the option price and time, or time sensitivity - sometimes known as an option's time decay. example: -0.05 vega: type: number description: Vega represents the rate of change between an option's value and the underlying asset's implied volatility. example: 0.2 OptionsPosition: description: Describes a single option position in an account. type: object properties: symbol: $ref: "#/components/schemas/OptionBrokerageSymbol" price: type: number example: 38.4 description: Last known market price _per share_ of the option contract. The freshness of this price depends on the brokerage. Some brokerages provide real-time prices, while others provide delayed prices. It is recommended that you rely on your own third-party market data provider for most up to date prices. nullable: true units: type: number description: The number of contracts for this option position. A positive number indicates a long position, while a negative number indicates a short position. example: -50 average_purchase_price: type: number nullable: true example: 4126 description: Cost basis _per contract_ of this option position. To get the cost basis _per share_, divide this value by the number of shares per contract (usually 100). currency: deprecated: true description: The currency of the price. This field is deprecated and will be removed in a future version. The currency of the price is determined by the currency of the underlying security. nullable: true allOf: - $ref: "#/components/schemas/Currency" OptionStrategy: type: object properties: id: $ref: "#/components/schemas/Id" underlying_symbol_id: $ref: "#/components/schemas/UniversalSymbol" strategy_type: type: string example: BUTTERFLY number_of_legs: type: number example: 2 legs: type: array items: properties: option_symbol_id: type: string example: AAPLC20221111 index: type: number example: 1 action: type: string example: BUY_TO_OPEN quantity: type: number example: 10 StrategyQuotes: type: object properties: strategy: $ref: "#/components/schemas/OptionStrategy" open_price: $ref: "#/components/schemas/Price" bid_price: $ref: "#/components/schemas/Price" ask_price: $ref: "#/components/schemas/Price" volatility: type: number example: 0.141 greek: type: object properties: delta: type: number example: 0.1 gamma: type: number example: 0.1 theta: type: number example: 0.1 vega: type: number example: 0.1 rho: type: number example: 0.1 StrategyOrderRecord: description: Strategy order record type: object properties: strategy: $ref: "#/components/schemas/OptionStrategy" status: type: string enum: - PENDING - ACCEPTED - FAILED - REJECTED - CANCELED - PARTIAL_CANCELED - CANCEL_PENDING - EXECUTED - PARTIAL - REPLACE_PENDING - REPLACED - STOPPED - SUSPENDED - EXPIRED - QUEUED - TRIGGERED - ACTIVATED - PENDING_RISK_REVIEW - CONTINGENT_ORDER filled_quantity: type: number example: 10 open_quantity: type: number example: 10 closed_quantity: type: number example: 10 order_type: $ref: "#/components/schemas/OrderType" time_in_force: $ref: "#/components/schemas/TimeInForce" limit_price: $ref: "#/components/schemas/Price" execution_price: $ref: "#/components/schemas/Price" time_placed: $ref: "#/components/schemas/Time" time_updated: $ref: "#/components/schemas/Time" SnapTradeHoldingsAccount: description: SnapTradeUser Investment Account type: object properties: id: $ref: "#/components/schemas/Id" brokerage_authorization: $ref: "#/components/schemas/BrokerageAuthorization" portfolio_group: $ref: "#/components/schemas/Id" name: type: string example: Registered Retirement Savings Account nullable: true number: type: string example: Q6542138443 institution_name: type: string example: Alpaca sync_status: $ref: "#/components/schemas/AccountSyncStatus" meta: type: object example: type: Margin status: ACTIVE institution_name: Alpaca SnapTradeHoldingsTotalValue: deprecated: true description: | This field is deprecated. To get the brokerage reported total market value of the account, please refer to `account.balance.total`. The total market value of the account. Note that this field is calculated based on the sum of the values of account positions and cash balances known to SnapTrade. It may not be accurate if the brokerage account has holdings that SnapTrade is not aware of. For example, if the brokerage account holds assets that SnapTrade does not support, the total value may be underreported. In certain cases, this value may also be double-counting cash-equivalent assets if those assets are represented as both cash and positions in the account. type: object properties: value: type: number example: 32600.71 description: Total value denominated in the currency of the `currency` field. nullable: true currency: type: string nullable: true description: The ISO-4217 currency code for the amount. example: USD Balance: description: Holds balance information for a single currency in an account. type: object properties: currency: description: The currency of the balance. This applies to both `cash` and `buying_power`. allOf: - $ref: "#/components/schemas/Currency" cash: type: number description: The amount of available cash in the account denominated in the currency of the `currency` field. This value can be negative in a margin account with a margin balance. Money market funds will be included in this field, and also returned in positions endpoints with `cash_equivalent` = true example: 300.71 nullable: true buying_power: type: number description: Buying power only applies to margin accounts. For non-margin accounts, buying power should be the same as cash. Please note that this field is not always available for all brokerages. example: 410.71 nullable: true CurrencyID: type: string format: uuid description: Unique identifier for the currency. This is the UUID used to reference the currency in SnapTrade. example: 87b24961-b51e-4db8-9226-f198f6518a89 Currency: description: Describes a currency object. type: object properties: id: $ref: "#/components/schemas/CurrencyID" code: type: string description: The ISO-4217 currency code for the currency. example: USD name: type: string description: A human-friendly name of the currency. example: US Dollar Exchange: description: Describes a single stock or crypto exchange. type: object properties: id: $ref: "#/components/schemas/ExchangeID" code: description: A short name for the exchange. For standardized exchange code, please use the `mic_code` field. type: string example: TSX mic_code: description: The [Market Identifier Code](https://en.wikipedia.org/wiki/Market_Identifier_Code) (MIC) for the exchange. type: string example: XTSE nullable: true name: description: The full name of the exchange. type: string example: Toronto Stock Exchange timezone: description: The timezone for the trading hours (`start_time` and `close_time`) of the exchange. type: string example: America/New_York start_time: description: The time when the exchange opens for trading. type: string example: 09:30:00 close_time: description: The time when the exchange closes for trading. type: string example: 16:00:00 suffix: description: The suffix to be appended to the symbol when trading on this exchange. For example, the suffix for the Toronto Stock Exchange is `.TO`. See `UniversalSymbol->symbol` and `UniversalSymbol->raw_symbol` for more detail. type: string example: .TO nullable: true USExchange: # FIXME Why did we create a separate schema for USExchange instead of using Exchange? description: US Stock Exchange type: object properties: id: $ref: "#/components/schemas/Id" code: type: string example: ARCX mic_code: type: string example: ARCA nullable: true name: type: string example: NYSE ARCA timezone: type: string example: America/New_York start_time: type: string example: 09:30:00 close_time: type: string example: 16:00:00 suffix: type: string example: None nullable: true allows_cryptocurrency_symbols: type: boolean example: false LoginRedirectURI: description: Redirect uri upon successful login type: object properties: redirectURI: description: Connection Portal link to redirect user to connect a brokerage account. type: string example: https://app.snaptrade.com/snapTrade/redeemToken?token=npVKchZrL0MYIHTusGfADT74r4xXpHkmbxbQDmt0RINLXbQ5cWsvGkPSgMQRxz8/cnxjzL9T2NWLuHuDyidHiCNeXXTb/tVhzC2olSyfxWW6DRrkUppArGCdmkIHyBMzog6C55P8yoqzcGer5Hml0Q%3D%3D&clientId=WEALTHLY&broker=ROBINHOOD&connectionPortalVersion=v4&sessionId=cf371bb4-a475-4f17-ab94-d0fee699960d sessionId: description: ID to identify the connection portal session. type: string example: cf371bb4-a475-4f17-ab94-d0fee699960d ClientID: description: SnapTrade Client ID (generated and provided to partner by SnapTrade) type: string example: SNAPTRADETEST UserID: description: SnapTrade User ID. This is chosen by the API partner and can be any string that is a) unique to the user, and b) immutable for the user. It is recommended to NOT use email addresses for this property because they are usually not immutable. type: string example: snaptrade-user-123 UserSecret: description: SnapTrade User Secret. This is a randomly generated string and should be stored securely. If compromised, please rotate it via the [rotate user secret endpoint](/reference/Authentication/Authentication_resetSnapTradeUserSecret). type: string example: adf2aa34-8219-40f7-a6b3-60156985cc61 PerformanceCustom: description: Performance Custom Response Object type: object properties: totalEquityTimeframe: type: array items: $ref: "#/components/schemas/PastValue" contributions: $ref: "#/components/schemas/NetContributions" contributionTimeframe: type: array items: $ref: "#/components/schemas/PastValue" contributionTimeframeCumulative: type: array items: $ref: "#/components/schemas/PastValue" withdrawalTimeframe: type: array items: $ref: "#/components/schemas/PastValue" contributionStreak: type: number example: 5 description: Current streak of consecutive months where contributions were made nullable: true contributionMonthsContributed: type: number example: 10 description: Number of months in the timeframe with contributions nullable: true contributionTotalMonths: type: number example: 13 description: Total months in timeframe nullable: true dividends: type: array items: $ref: "#/components/schemas/NetDividend" dividendIncome: type: number description: Total dividends received over the timeframe example: 135.97 nullable: true monthlyDividends: type: number description: Average dividends received per month over the timeframe example: 26.37 nullable: true badTickers: type: array items: type: string example: MAW105 nullable: true description: list of tickers which may not be supported or may not have accurate price data dividendTimeline: type: array items: $ref: "#/components/schemas/MonthlyDividends" commissions: type: number example: 3.26 description: commissions incurred during the timeframe nullable: true forexFees: type: number example: 5.26 description: forex fees incurred during the timeframe nullable: true fees: type: number example: 2.72 description: other fees incurred during the timeframe nullable: true rateOfReturn: type: number example: 0.082312367452 description: The return rate over the timeframe. Annualized if timeframe is longer than 1 year nullable: true returnRateTimeframe: type: array items: $ref: "#/components/schemas/SubPeriodReturnRate" detailedMode: type: boolean description: Whether the user has detailed mode enabled (more frequent data points for totalEquity and contribution timeframes) SubPeriodReturnRate: type: object properties: periodStart: $ref: "#/components/schemas/ReportingDate" periodEnd: $ref: "#/components/schemas/ReportingDate" rateOfReturn: type: number example: 0.012312367452 description: The return rate for the given period nullable: true DividendAtDate: type: object properties: symbol: type: string example: AAPL description: The ticker of the symbol that the dividend came from nullable: true amount: type: number example: 6.82 description: The amount received from the dividend nullable: true currency: type: string example: CAD description: The currency of the amount PartnerData: description: Configurations for your SnapTrade Client ID, including allowed brokerages and data access. type: object properties: slug: type: string description: A short, unique identifier for your company or product. example: WEALTHLY name: type: string description: Your company or product name. example: Wealthly logo_url: type: string description: URL to your company or product logo. Returns null if no logo has been configured (always the case for personal access clients). example: https://example.com/logo.png nullable: true allowed_brokerages: type: array description: Brokerages that can be accessed by your Client ID. items: $ref: "#/components/schemas/Brokerage" can_access_trades: type: boolean description: Whether trading is enabled for your SnapTrade Client ID. example: true can_access_holdings: type: boolean description: Whether holdings data is enabled for your SnapTrade Client ID. example: true can_access_account_history: type: boolean description: Whether account historical transactions is enabled for your SnapTrade Client ID. example: true can_access_reference_data: type: boolean description: Whether reference data is enabled for your SnapTrade Client ID. example: true can_access_portfolio_management: type: boolean description: Whether portfolio management is enabled for your SnapTrade Client ID. example: true can_access_orders: type: boolean description: Whether recent order history is enabled for your SnapTrade Client ID. example: true redirect_uri: type: string description: URI to redirect user back to after user is done adding brokerage connections. Returns null if no redirect URI has been configured (always the case for personal access clients). example: https://example.com/oauth/snaptrade nullable: true pin_required: deprecated: true type: boolean description: Shows if pin is required by users to access connection page. This field has been deprecated. example: false Position: description: Describes a single stock/ETF/crypto/mutual fund position in an account. type: object properties: symbol: $ref: "#/components/schemas/PositionSymbol" units: description: The number of shares of the position. This can be fractional or integer units. A positive number indicates a long position, while a negative number indicates a short position. type: number example: 40 nullable: true price: type: number example: 113.15 description: Last known market price for the symbol. The freshness of this price depends on the brokerage. Some brokerages provide real-time prices, while others provide delayed prices. It is recommended that you rely on your own third-party market data provider for most up to date prices. nullable: true open_pnl: type: number description: The profit or loss on the position since it was opened. This is calculated as the difference between the current market value of the position and the total cost of the position. It is recommended to calculate this value using the average purchase price and the current market price yourself, instead of relying on this field. example: 0.44 nullable: true average_purchase_price: type: number nullable: true example: 108.3353 description: Cost basis _per share_ of this position. fractional_units: deprecated: true description: Deprecated, use the `units` field for both fractional and integer units going forward type: number nullable: true example: 1.44 currency: description: | The 'position currency' (`price` and `average_purchase_price`). This currency can potentially be different from the 'listing currency' of the security. The 'listing currency' is what's quoted on the listing exchange, while the 'position currency' is what the brokerage uses to hold and value your position. allOf: - $ref: "#/components/schemas/Currency" cash_equivalent: type: boolean example: false nullable: true description: If the position is a cash equivalent (usually a money market fund) that is also counted in account cash balance and buying power tax_lots: type: array description: List of tax lots for the given position (disabled by default, only available on paid plans, contact support if needed) items: $ref: "#/components/schemas/TaxLot" TaxLot: description: Describes a single tax lot for a position. type: object properties: original_purchase_date: nullable: true type: string format: date-time description: The date and time of the purchase. example: "2022-01-15T10:30:00Z" quantity: nullable: true type: string description: The number of shares in the tax lot. This can be fractional or integer units. example: "10" purchased_price: nullable: true type: string description: The purchase price per share for the tax lot. example: "100.50" cost_basis: nullable: true type: string description: The cost basis of the entire lot. example: "1005.00" current_value: nullable: true type: string description: The current market value of the entire lot. example: "1200.00" position_type: nullable: true type: string description: The type of position for the tax lot (e.g., LONG, SHORT). example: LONG lot_id: nullable: true type: string description: The unique id for this specific tax lot example: "12345678" AllAccountPositionsResponse: description: Information about all account positions. type: object properties: results: type: array description: Positions returned for the request. items: $ref: "#/components/schemas/AccountPosition" data_freshness: type: object description: Metadata describing freshness of the returned positions data. properties: as_of: type: string format: date-time description: The time the returned positions data was fetched from the brokerage. example: 2026-06-02T14:30:00Z required: - as_of required: - results - data_freshness AccountPosition: description: Describes a single position. type: object properties: instrument: $ref: "#/components/schemas/Instrument" units: type: string format: decimal nullable: true description: The number of units held in the position. Positive numbers indicate long positions and negative numbers indicate short positions. example: "10.5" price: type: string format: decimal nullable: true description: Last known market price _per share_. The freshness of this price depends on the brokerage. Some brokerages provide real-time prices, while others provide delayed prices. It is recommended that you rely on your own third-party market data provider for most up to date prices. example: "123.45" cost_basis: type: string format: decimal nullable: true description: Book price or average purchase price for the position. For options, this is per-share. example: "118.2" currency: type: string nullable: true description: ISO-4217 currency code for the position `price` and `cost_basis`. example: USD cash_equivalent: type: boolean description: Present for mutual fund positions that are also counted in cash balance or buying power. example: false tax_lots: type: array description: List of tax lots for the given position (disabled by default, only available on paid plans, contact support if needed) items: $ref: "#/components/schemas/TaxLot" required: - instrument Instrument: description: Instrument metadata for a V2 position. Use `kind` to determine which schema is present. oneOf: - $ref: "#/components/schemas/StockInstrument" - $ref: "#/components/schemas/OptionInstrument" - $ref: "#/components/schemas/CryptoInstrument" - $ref: "#/components/schemas/FutureInstrument" - $ref: "#/components/schemas/EtfInstrument" - $ref: "#/components/schemas/MutualFundInstrument" - $ref: "#/components/schemas/CefInstrument" - $ref: "#/components/schemas/AdrInstrument" - $ref: "#/components/schemas/CfdInstrument" - $ref: "#/components/schemas/OtherInstrument" discriminator: propertyName: kind mapping: stock: "#/components/schemas/StockInstrument" option: "#/components/schemas/OptionInstrument" crypto: "#/components/schemas/CryptoInstrument" future: "#/components/schemas/FutureInstrument" etf: "#/components/schemas/EtfInstrument" mutualfund: "#/components/schemas/MutualFundInstrument" cef: "#/components/schemas/CefInstrument" adr: "#/components/schemas/AdrInstrument" cfd: "#/components/schemas/CfdInstrument" other: "#/components/schemas/OtherInstrument" UnderlyingOptionInstrument: description: The underlying instrument for an option. oneOf: - $ref: "#/components/schemas/StockInstrument" - $ref: "#/components/schemas/CryptoInstrument" - $ref: "#/components/schemas/EtfInstrument" - $ref: "#/components/schemas/MutualFundInstrument" - $ref: "#/components/schemas/CefInstrument" - $ref: "#/components/schemas/AdrInstrument" - $ref: "#/components/schemas/OtherInstrument" discriminator: propertyName: kind mapping: stock: "#/components/schemas/StockInstrument" crypto: "#/components/schemas/CryptoInstrument" etf: "#/components/schemas/EtfInstrument" mutualfund: "#/components/schemas/MutualFundInstrument" cef: "#/components/schemas/CefInstrument" adr: "#/components/schemas/AdrInstrument" other: "#/components/schemas/OtherInstrument" UnderlyingCfdInstrument: description: The underlying instrument referenced by a CFD contract. oneOf: - $ref: "#/components/schemas/StockInstrument" - $ref: "#/components/schemas/CryptoInstrument" - $ref: "#/components/schemas/EtfInstrument" - $ref: "#/components/schemas/MutualFundInstrument" - $ref: "#/components/schemas/CefInstrument" - $ref: "#/components/schemas/AdrInstrument" - $ref: "#/components/schemas/OtherInstrument" discriminator: propertyName: kind mapping: stock: "#/components/schemas/StockInstrument" crypto: "#/components/schemas/CryptoInstrument" etf: "#/components/schemas/EtfInstrument" mutualfund: "#/components/schemas/MutualFundInstrument" cef: "#/components/schemas/CefInstrument" adr: "#/components/schemas/AdrInstrument" other: "#/components/schemas/OtherInstrument" StockInstrument: description: Security instrument metadata for stock positions. type: object properties: kind: type: string description: Type of security instrument. enum: - stock example: stock id: type: string format: uuid description: Unique identifier for the instrument. example: 1ef3a5d3-4a9b-40b2-b8d1-cc35f74d6324 symbol: type: string description: The formatted trading symbol for the security. example: AAPL raw_symbol: type: string description: The raw symbol without any exchange suffix. example: AAPL description: type: string nullable: true description: Human-readable description of the security. example: Apple Inc. currency: type: string nullable: true description: ISO-4217 currency code for the security listing. example: USD exchange: type: string nullable: true description: Exchange MIC code or exchange code for the security. example: XNAS figi_instrument: nullable: true allOf: - $ref: "#/components/schemas/FigiInstrument" required: - kind - id - symbol - raw_symbol CfdInstrument: description: Canonical CFD wrapper instrument metadata for a V2 position. type: object properties: kind: type: string description: Type of security instrument. enum: - cfd example: cfd id: type: string format: uuid description: Unique identifier for the canonical CFD instrument wrapper. example: 1ef3a5d3-4a9b-40b2-b8d1-cc35f74d6324 symbol: type: string description: Formatted symbol of the instrument underlying the CFD wrapper. example: AAPL raw_symbol: type: string description: Raw symbol of the instrument underlying the CFD wrapper. example: AAPL description: type: string nullable: true description: Human-readable description of the instrument underlying the CFD wrapper. example: Apple Inc. currency: type: string nullable: true description: ISO-4217 currency code for the instrument underlying the CFD wrapper. example: USD exchange: type: string nullable: true description: Exchange MIC code or exchange code for the instrument underlying the CFD wrapper. example: XNAS underlying_instrument: $ref: "#/components/schemas/UnderlyingCfdInstrument" required: - kind - id - symbol - raw_symbol - underlying_instrument AdrInstrument: description: Security instrument metadata for ADR positions. type: object properties: kind: type: string description: Type of security instrument. enum: - adr example: adr id: type: string format: uuid description: Unique identifier for the instrument. example: 1ef3a5d3-4a9b-40b2-b8d1-cc35f74d6324 symbol: type: string description: The formatted trading symbol for the security. example: BABA raw_symbol: type: string description: The raw symbol without any exchange suffix. example: BABA description: type: string nullable: true description: Human-readable description of the security. example: Alibaba Group Holding Ltd ADR currency: type: string nullable: true description: ISO-4217 currency code for the security listing. example: USD exchange: type: string nullable: true description: Exchange MIC code or exchange code for the security. example: XNYS figi_instrument: nullable: true allOf: - $ref: "#/components/schemas/FigiInstrument" required: - kind - id - symbol - raw_symbol EtfInstrument: description: Security instrument metadata for ETF positions. type: object properties: kind: type: string description: Type of security instrument. enum: - etf example: etf id: type: string format: uuid description: Unique identifier for the instrument. example: 1ef3a5d3-4a9b-40b2-b8d1-cc35f74d6324 symbol: type: string description: The formatted trading symbol for the security. example: AAPL raw_symbol: type: string description: The raw symbol without any exchange suffix. example: AAPL description: type: string nullable: true description: Human-readable description of the security. example: Apple Inc. currency: type: string nullable: true description: ISO-4217 currency code for the security listing. example: USD exchange: type: string nullable: true description: Exchange MIC code or exchange code for the security. example: XNAS figi_instrument: nullable: true allOf: - $ref: "#/components/schemas/FigiInstrument" required: - kind - id - symbol - raw_symbol MutualFundInstrument: description: Security instrument metadata for mutual fund positions. type: object properties: kind: type: string description: Type of security instrument. enum: - mutualfund example: mutualfund id: type: string format: uuid description: Unique identifier for the instrument. example: 1ef3a5d3-4a9b-40b2-b8d1-cc35f74d6324 symbol: type: string description: The formatted trading symbol for the security. example: VFIAX raw_symbol: type: string description: The raw symbol without any exchange suffix. example: VFIAX description: type: string nullable: true description: Human-readable description of the security. example: Vanguard 500 Index Fund Admiral Shares currency: type: string nullable: true description: ISO-4217 currency code for the security listing. example: USD exchange: type: string nullable: true description: Exchange MIC code or exchange code for the security. example: XNAS figi_instrument: nullable: true allOf: - $ref: "#/components/schemas/FigiInstrument" required: - kind - id - symbol - raw_symbol CefInstrument: description: Security instrument metadata for closed-end fund positions. type: object properties: kind: type: string description: Type of security instrument. enum: - cef example: cef id: type: string format: uuid description: Unique identifier for the instrument. example: 1ef3a5d3-4a9b-40b2-b8d1-cc35f74d6324 symbol: type: string description: The formatted trading symbol for the security. example: BST raw_symbol: type: string description: The raw symbol without any exchange suffix. example: BST description: type: string nullable: true description: Human-readable description of the security. example: BlackRock Science and Technology Trust currency: type: string nullable: true description: ISO-4217 currency code for the security listing. example: USD exchange: type: string nullable: true description: Exchange MIC code or exchange code for the security. example: XNYS figi_instrument: nullable: true allOf: - $ref: "#/components/schemas/FigiInstrument" required: - kind - id - symbol - raw_symbol CryptoInstrument: description: Security instrument metadata for crypto positions. type: object properties: kind: type: string description: Type of security instrument. enum: - crypto example: crypto id: type: string format: uuid description: Unique identifier for the instrument. example: 1ef3a5d3-4a9b-40b2-b8d1-cc35f74d6324 symbol: type: string description: The formatted trading symbol for the security. example: AAPL raw_symbol: type: string description: The raw symbol without any exchange suffix. example: AAPL description: type: string nullable: true description: Human-readable description of the security. example: Apple Inc. currency: type: string nullable: true description: ISO-4217 currency code for the security listing. example: USD exchange: type: string nullable: true description: Exchange MIC code or exchange code for the security. example: XNAS figi_instrument: nullable: true allOf: - $ref: "#/components/schemas/FigiInstrument" required: - kind - id - symbol - raw_symbol OtherInstrument: description: Security instrument metadata for other mapped security positions. type: object properties: kind: type: string description: Type of security instrument. enum: - other example: other id: type: string format: uuid description: Unique identifier for the instrument. example: 1ef3a5d3-4a9b-40b2-b8d1-cc35f74d6324 symbol: type: string description: The formatted trading symbol for the security. example: AAPL raw_symbol: type: string description: The raw symbol without any exchange suffix. example: AAPL description: type: string nullable: true description: Human-readable description of the security. example: Apple Inc. currency: type: string nullable: true description: ISO-4217 currency code for the security listing. example: USD exchange: type: string nullable: true description: Exchange MIC code or exchange code for the security. example: XNAS figi_instrument: nullable: true allOf: - $ref: "#/components/schemas/FigiInstrument" required: - kind - id - symbol - raw_symbol FutureInstrument: description: Future instrument metadata for a V2 position. type: object properties: kind: type: string description: Type of security instrument. enum: - future example: future id: type: string format: uuid description: Unique identifier for the future instrument. example: 2fef6a3c-4d3f-4a0a-b1fe-8c45a9c7da7f symbol: type: string description: Display symbol for the future contract. example: ESM26 root_symbol: type: string description: Root symbol for the future contract. example: ES expiration_code: type: string description: Exchange expiration code for the contract. example: M26 expiration_date: type: string format: date nullable: true description: Expiration date of the contract. example: "2024-09-20" multiplier: type: string format: decimal nullable: true description: Multiplier for the future contract. example: "50" currency: type: string nullable: true description: ISO-4217 currency code for the contract. example: USD exchange: type: string nullable: true description: Exchange MIC code or exchange code for the contract. example: XCME required: - kind - id - symbol - root_symbol - expiration_code OptionInstrument: description: Option instrument metadata for a V2 position. type: object properties: kind: type: string description: Type of security instrument. enum: - option example: option id: type: string format: uuid description: Unique identifier for the option instrument. example: 899e2697-1d38-4c07-91ee-c16a2b1ce5c9 symbol: type: string description: OCC symbol for the option contract. example: AAPL 261218C00240000 option_type: type: string description: Whether the contract is a call or put. enum: - CALL - PUT example: CALL strike_price: type: string format: decimal description: Strike price for the option contract. example: "240" expiration_date: type: string format: date description: Expiration date of the option contract. example: "2026-12-18" multiplier: type: string format: decimal description: Number of underlying shares per contract. Standard options are 100, mini options are 10. example: "100" description: type: string nullable: true description: Human-readable description of the option contract. example: AAPL Dec 18 2026 240 CALL underlying: $ref: "#/components/schemas/UnderlyingOptionInstrument" required: - kind - id - symbol - option_type - strike_price - expiration_date - multiplier - underlying SnapTradeRegisterUserRequestBody: description: Data required to register a user via SnapTrade Partner type: object required: - userId properties: userId: $ref: "#/components/schemas/UserID" SnapTradeLoginUserRequestBody: description: Data to login a user via SnapTrade Partner type: object properties: broker: description: Slug of the brokerage to connect the user to. See [the integrations page](https://support.snaptrade.com/brokerages) for a list of supported brokerages and their slugs. type: string example: ALPACA immediateRedirect: description: When set to `true`, user will be redirected back to the partner's site instead of the connection portal. This parameter is ignored if the connection portal is loaded inside an iframe. See the [guide on ways to integrate the connection portal](/docs/implement-connection-portal) for more information. type: boolean example: true customRedirect: description: URL to redirect the user to after the user connects their brokerage account. This parameter is ignored if the connection portal is loaded inside an iframe. See the [guide on ways to integrate the connection portal](/docs/implement-connection-portal) for more information. type: string example: https://snaptrade.com reconnect: description: The UUID of the brokerage connection to be reconnected. This parameter should be left empty unless you are reconnecting a disabled connection. See the [guide on fixing broken connections](/docs/fix-broken-connections) for more information. type: string example: 8b5f262d-4bb9-365d-888a-202bd3b15fa1 connectionType: description: > Determines connection permissions (default: read) - `read`: Data access only. - `trade`: Data and trading access. - `trade-if-available`: Attempts to establish a trading connection if the brokerage supports it, otherwise falls back to read-only access automatically. type: string enum: - read - trade - trade-if-available default: read showCloseButton: description: Controls whether the close (X) button is displayed in the connection portal. When false, you control closing behavior from your app. Defaults to true. type: boolean example: true darkMode: description: Enable dark mode for the connection portal. Defaults to false. type: boolean example: true connectionPortalVersion: description: Sets the connection portal version to render. Currently only `v4` is supported and is the default. All other versions are deprecated and will automatically be set to v4. type: string example: v4 enum: - v4 - v3 - v2 default: v4 Symbol: # FIXME Merge this with UniversalSymbol description: Uniquely describes a single security + exchange combination across all brokerages. type: object properties: id: $ref: "#/components/schemas/UniversalSymbolID" symbol: description: The security's trading ticker symbol. For example "AAPL" for Apple Inc. We largely follow the [Yahoo Finance ticker format](https://help.yahoo.com/kb/SLN2310.html)(click on "Yahoo Finance Market Coverage and Data Delays"). For example, for securities traded on the Toronto Stock Exchange, the symbol has a '.TO' suffix. For securities traded on NASDAQ or NYSE, the symbol does not have a suffix. type: string example: VAB.TO raw_symbol: description: The raw symbol is `symbol` with the exchange suffix removed. For example, if `symbol` is "VAB.TO", then `raw_symbol` is "VAB". type: string example: VAB description: description: A human-readable description of the security. This is usually the company name or ETF name. type: string example: VANGUARD CDN AGGREGATE BOND INDEX ETF nullable: true currency: description: The currency in which the security is traded. allOf: - $ref: "#/components/schemas/Currency" exchange: description: The exchange on which the security is listed and traded. allOf: - $ref: "#/components/schemas/Exchange" type: $ref: "#/components/schemas/SecurityType" figi_code: description: This identifier is unique per security per trading venue. See section 1.4.1 of the [FIGI Standard](https://www.openfigi.com/assets/local/figi-allocation-rules.pdf) for more information. This value should be the same as the `figi_code` in the `figi_instrument` child property. type: string example: BBG000B9XRY4 nullable: true figi_instrument: nullable: true allOf: - $ref: "#/components/schemas/FigiInstrument" UserIDandSecret: type: object properties: userId: $ref: "#/components/schemas/UserID" userSecret: $ref: "#/components/schemas/UserSecret" UserList: description: List of registered SnapTrade user IDs type: array items: $ref: "#/components/schemas/UserID" example: - user1 - user2 - user3 DeleteUserResponse: type: object properties: status: description: This is always `deleted` when a user is queued for deletion. type: string example: deleted detail: description: Human friendly message about the deletion status. type: string example: User queued for deletion; please wait for webhook for confirmation. userId: $ref: "#/components/schemas/UserID" BrokerageAuthorizationTypeReadOnly: type: object properties: id: $ref: "#/components/schemas/Id" type: type: string enum: - read - trade auth_type: type: string enum: - OAUTH - SCRAPE - UNOFFICIAL_API - TOKEN brokerage: type: object properties: id: $ref: "#/components/schemas/Id" name: type: string example: Questrade description: Full name of the brokerage. slug: type: string example: QUESTRADE description: A unique identifier for that brokerage. It is usually the name of the brokerage in capital letters and will never change. Brokerage: description: Describes a brokerage that SnapTrade supports. type: object properties: id: description: Unique identifier for the brokerage firm. This is the UUID used to reference the brokerage in SnapTrade. type: string format: uuid example: ebf91a5b-0920-4266-9e36-f6cfe8c40946 slug: description: A short, unique identifier for the brokerage. It is usually the name of the brokerage in capital letters and will never change. type: string example: ROBINHOOD name: description: Full name of the brokerage. type: string example: Robinhood display_name: description: A display-friendly name of the brokerage. type: string example: Robinhood description: description: A brief description of the brokerage. type: string example: Robinhood is an American multinational financial services corporation based in Menlo Park, California. aws_s3_logo_url: description: URL to the brokerage's logo. type: string format: url example: https://passiv-brokerage-logos.s3.ca-central-1.amazonaws.com/robinhood-logo.png aws_s3_square_logo_url: description: URL to the brokerage's logo in square format. type: string format: url example: https://passiv-brokerage-logos.s3.ca-central-1.amazonaws.com/robinhood-logo-square.png nullable: true url: description: URL to the brokerage's website. Returns null if the brokerage has no website on record. type: string format: url example: https://robinhood.com nullable: true enabled: description: Whether the brokerage is enabled in SnapTrade. A disabled brokerage will not be available for new connections. type: boolean example: true maintenance_mode: description: Whether the brokerage is currently in maintenance mode. A brokerage in maintenance mode will not be available for new connections. type: boolean example: true is_degraded: description: Whether the brokerage is currently degraded. A degraded brokerage may have reduced functionality or be experiencing technical issues. type: boolean example: true allows_trading: description: Whether the brokerage allows trading through SnapTrade. type: boolean nullable: true example: true allows_fractional_units: deprecated: true description: This field is deprecated. Please contact us if you have a valid use case for it. type: boolean nullable: true example: true has_reporting: deprecated: true description: This field is deprecated. Please contact us if you have a valid use case for it. type: boolean nullable: true example: true is_real_time_connection: deprecated: true description: This field is deprecated. Please contact us if you have a valid use case for it. type: boolean example: true brokerage_type: $ref: "#/components/schemas/BrokerageType" exchanges: deprecated: true description: This field is deprecated. Please contact us if you have a valid use case for it. type: array items: {} example: - 2bcd7cc3-e922-4976-bce1-9858296801c3 - 4bcd8cc3-c122-4974-dc21-1858296801f4 open_url: deprecated: true description: This field is deprecated. type: string format: url nullable: true BrokerageAuthorization: description: | A single connection with a brokerage. Note that `Connection` and `Brokerage Authorization` are interchangeable, but the term `Connection` is preferred and used in the doc for consistency. A connection is usually tied to a single login at a brokerage. A single connection can contain multiple brokerage accounts. SnapTrade performs de-duping on connections for a given user. If the user has an existing connection with the brokerage, when connecting the brokerage with the same credentials, SnapTrade will return the existing connection instead of creating a new one. type: object properties: id: $ref: "#/components/schemas/BrokerageAuthID" created_date: description: Timestamp of when the connection was established in SnapTrade. type: string format: date-time example: 2024-08-20T21:56:19.123935Z brokerage: $ref: "#/components/schemas/Brokerage" name: description: A short, human-readable name for the connection. type: string example: Connection-1 type: description: Whether the connection is read-only or trade-enabled. A read-only connection can only be used to fetch data, while a trade-enabled connection can be used to place trades. Valid values are `read` and `trade`. type: string example: trade disabled: description: | Whether the connection is disabled. A disabled connection can no longer access the latest data from the brokerage, but will continue to return the last cached state. A connection can become disabled for many reasons and differs by brokerage. Here are some common scenarios: - The user has changed their username or password at the brokerage. - The user has explicitly removed the access grant at the brokerage. - The session has expired at the brokerage and now requires explicit user re-authentication. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection. type: boolean example: false disabled_date: description: Timestamp of when the connection was disabled in SnapTrade. type: string format: date-time nullable: true example: 2022-01-21T15:11:19.217000-05:00 meta: deprecated: true description: Additional data about the connection. This information is specific to the brokerage and there's no standard format for this data. This field is deprecated and subject to removal in a future version. type: object example: identifier: 123456 updated_date: deprecated: true description: Timestamp of when the connection was last updated in SnapTrade. This field is deprecated. Please let us know if you have a valid use case for this field. type: string format: date-time example: 2024-08-20T21:56:20.057224Z is_eligible_for_payout: description: Whether the connection is eligible for a payout. This is an experimental field that is NOT generally available for all partners. Do not use in production without speaking to the SnapTrade team. type: boolean example: true data_freshness_mode: description: | Possible values include: - realtime - delayed Indicates whether SnapTrade will provide delayed or realtime data for this connection. `delayed` means SnapTrade uses cached data for the connection because of the customer's plan, or because of brokerage limitations. `realtime` means SnapTrade retrieves current data from the brokerage during API calls. See the "Data freshness" column on the "Positions & recent orders" tab at https://support.snaptrade.com/brokerages. type: string example: realtime BrokerageAuthorizationRefreshConfirmation: description: Confirmation that the syncs have been scheduled. type: object properties: detail: description: Refresh confirmation details type: string example: Connection 0b3ebefb-ed47-43df-cd8f-729a4420b5cf scheduled for refresh BrokerageAuthorizationTransactionsSyncConfirmation: description: Confirmation that the transaction syncs have been scheduled. type: object properties: detail: description: Transactions sync confirmation details type: string example: Connection 0b3ebefb-ed47-43df-cd8f-729a4420b5cf scheduled for transactions sync DeleteConnectionConfirmation: description: Confirmation that a task has been scheduled to delete the connection. type: object properties: detail: description: Connection queued for deletion; please wait for webhook for confirmation. type: string example: Connection queued for deletion; please wait for webhook for confirmation. connection_id: description: The ID of the connection (brokerage authorization) that was scheduled for deletion. type: string example: 0b3ebefb-ed47-43df-cd8f-729a4420b5cf BrokerageAuthorizationDisabledConfirmation: description: Confirmation that the connection has been disabled. type: object properties: detail: description: Connection disabled confirmation type: string example: Connection 0b3ebefb-ed47-43df-cd8f-729a4420b5cf has been disabled SessionEvent: type: object properties: id: $ref: "#/components/schemas/Id" session_event_type: type: string enum: - OAUTH_REDIRECT - DISCLAIMER_ACCEPTED - BROKERAGE_CONNECTION_INITIATED - BROKERAGE_RECONNECT_INITIATED - BROKERAGE_AUTHENTICATION - OAUTH_BROKERAGE_AUTHENTICATION - MFA_REQUESTED - MFA_SUBMITTED - MFA_CHOICE_REQUESTED - MFA_CHOICE_SUBMITTED - CONNECTION_SUCCESSFUL - CONNECTION_FAILED - PARTNER_REDIRECT - CONNECTION_ABORTED - SESSION_STARTED session_id: $ref: "#/components/schemas/Id" user_id: $ref: "#/components/schemas/UserID" created_date: $ref: "#/components/schemas/Time" brokerage_status_code: type: integer nullable: true example: 400 brokerage_authorization_id: $ref: "#/components/schemas/Id" OptionBrokerageSymbol: description: Uniquely describes a security for the option position within an account. The distinction between this and the `option_symbol` child property is that this object is specific to a position within an account, while the `option_symbol` child property is universal across all brokerage accounts. The caller should rely on the `option_symbol` child property for most use cases. type: object properties: option_symbol: $ref: "#/components/schemas/OptionsSymbol" id: $ref: "#/components/schemas/BrokerageSymbolID" description: deprecated: true description: This field is deprecated and the caller should use the `option_symbol` child property's `description` instead. type: string example: SPY CALL 7/17 200 PositionSymbol: description: Uniquely describes a security for the position within an account. The distinction between this and the `symbol` child property is that this object is specific to a position within an account, while the `symbol` child property is universal across all brokerage accounts. The caller should rely on the `symbol` child property for most use cases. type: object properties: symbol: $ref: "#/components/schemas/UniversalSymbol" id: $ref: "#/components/schemas/BrokerageSymbolID" description: deprecated: true description: This field is deprecated and the caller should use the `symbol` child property's `description` instead. type: string example: VANGUARD CDN AGGREGATE BOND INDEX ETF local_id: deprecated: true description: This field is deprecated and should not be used. Please reach out to SnapTrade support if you have a valid use case for this. type: string example: "3291231" nullable: true is_quotable: deprecated: true description: This field is deprecated and should not be used. Please reach out to SnapTrade support if you have a valid use case for this. type: boolean example: true is_tradable: deprecated: true description: This field is deprecated and should not be used. Please reach out to SnapTrade support if you have a valid use case for this. type: boolean example: true OptionChain: description: chain of options type: array items: type: object properties: expiryDate: type: string example: 2022-07-08T00:00:00.000000-04:00 description: type: string example: APPLE INC listingExchange: type: string example: OPRA optionExerciseType: type: string example: American chainPerRoot: type: array items: type: object properties: optionRoot: type: string example: AAPL chainPerStrikePrice: type: array items: type: object properties: strikePrice: type: integer format: int32 example: 70 nullable: true callSymbolId: type: integer format: int32 example: 42816081 nullable: true putSymbolId: type: integer format: int32 example: 42816129 nullable: true multiplier: type: integer format: int32 example: 100 ExchangeRatePairs: description: The exchange rate of a pair of currencies type: object properties: src: $ref: "#/components/schemas/Currency" dst: $ref: "#/components/schemas/Currency" exchange_rate: type: number example: 1.32 Id: type: string format: uuid example: 2bcd7cc3-e922-4976-bce1-9858296801c3 BrokerageSymbolID: deprecated: true description: A unique ID for the security within SnapTrade, scoped to the brokerage account that the security belongs to. This is a legacy field and should not be used. Do not rely on this being a stable ID as it can change. type: string format: uuid example: 2bcd7cc3-e922-4976-bce1-9858296801c3 ChildBrokerageOrderIDs: type: object properties: take_profit_order_id: type: string description: The brokerage order ID for the take profit leg of the bracket order example: "12345678" stop_loss_order_id: type: string description: The brokerage order ID for the stop loss leg of the bracket order example: "12345678" BrokerageOrderID: description: Order ID returned by brokerage. This is the unique identifier for the order in the brokerage system. type: string example: 66a033fa-da74-4fcf-b527-feefdec9257e TradeID: description: Unique identifier for the submitted order through SnapTrade. type: string format: uuid example: 139e307a-82f7-4402-b39e-4da7baa87758 UniversalSymbolID: description: Unique identifier for the symbol within SnapTrade. This is the ID used to reference the symbol in SnapTrade API calls. type: string format: uuid example: 2bcd7cc3-e922-4976-bce1-9858296801c3 OptionSymbolID: description: Unique identifier for the option symbol within SnapTrade. This is the ID used to reference the symbol in SnapTrade API calls. type: string format: uuid example: 2bcd7cc3-e922-4976-bce1-9858296801c3 ExchangeID: description: Unique ID for the exchange in SnapTrade. type: string format: uuid example: 2bcd7cc3-e922-4976-bce1-9858296801c3 SecurityTypeID: description: Unique identifier for the security type within SnapTrade. This is the ID used to reference the security type in SnapTrade API calls. type: string format: uuid example: 2bcd7cc3-e922-4976-bce1-9858296801c3 MonthlyDividends: type: object properties: date: $ref: "#/components/schemas/ReportingDate" dividends: type: array items: $ref: "#/components/schemas/DividendAtDate" NetContributions: type: object properties: date: $ref: "#/components/schemas/ReportingDate" contributions: type: number example: 524.74 nullable: true currency: type: string example: CAD NetDividend: description: Object representing total dividends received during a timeframe type: object properties: symbol: $ref: "#/components/schemas/UniversalSymbol" amount: type: number example: 165.05 nullable: true currency: type: string example: USD PastValue: type: object properties: date: $ref: "#/components/schemas/ReportingDate" value: type: number example: 52.74 currency: type: string example: CAD PortfolioGroupID: description: Portfolio Group ID. Portfolio Groups have been deprecated. Please contact support if you have a use case for it. deprecated: true type: string format: uuid nullable: true example: 2bcd7cc3-e922-4976-bce1-9858296801c3 ReportingDate: description: Date used to specify timeframe for a reporting call (in YYYY-MM-DD format). These dates are inclusive. type: string example: "2022-01-24" format: date ReportingFrequency: description: Optional frequency for the rate of return chart (defaults to monthly). Possible values are weekly, monthly, quarterly, yearly. type: string example: monthly Status: description: Status of API type: object properties: version: type: integer example: 153 timestamp: type: string example: 2022-11-04T01:47:00.377969Z online: type: boolean example: true SymbolQuery: type: object properties: substring: description: The search query for symbols. type: string example: AAPL SyncStatusDate: description: Date in YYYY-MM-DD format or null type: string example: "2022-01-24" format: date nullable: true HoldingsSyncStatusDate: description: Date in ISO 8601 format or null (YYYY-MM-DD HH:MM:SS.mmmmmmTZ) type: string example: "2024-06-28 18:42:46.561408+00:00" format: date-time nullable: true ManualTrade: description: Contains the details of a submitted order. type: object properties: id: $ref: "#/components/schemas/TradeID" account: $ref: "#/components/schemas/AccountID" order_type: $ref: "#/components/schemas/OrderTypeStrict" time_in_force: $ref: "#/components/schemas/TimeInForceStrict" symbol: $ref: "#/components/schemas/ManualTradeSymbol" action: $ref: "#/components/schemas/ActionStrict" units: nullable: true allOf: - $ref: "#/components/schemas/Units" price: $ref: "#/components/schemas/Price" ManualTradeImpact: type: object properties: account: $ref: "#/components/schemas/AccountID" currency: $ref: "#/components/schemas/CurrencyID" remaining_cash: description: Estimated amount of cash remaining in the account after the trade. type: number example: 1.11 nullable: true estimated_commission: description: Estimated commission for the trade. type: number example: 3.26 nullable: true forex_fees: description: Estimated foreign transaction fees for the trade. type: number example: 5.26 nullable: true ManualTradeSymbol: description: Information about the security for the order. type: object properties: universal_symbol_id: $ref: "#/components/schemas/UniversalSymbolID" currency: $ref: "#/components/schemas/Currency" local_id: deprecated: true description: This field is deprecated and should not be used. type: string example: "1048101" description: deprecated: true description: This field is deprecated and should not be used. type: string example: Metaverse Global ETF nullable: true symbol: deprecated: true description: This field is deprecated and should not be used. type: string example: MVGP.U.TO brokerage_symbol_id: $ref: "#/components/schemas/BrokerageSymbolID" ManualTradeBalance: description: Estimated remaining balance of the account after the trade is executed. type: object properties: account: $ref: "#/components/schemas/AccountSimple" currency: $ref: "#/components/schemas/Currency" cash: description: Estimated amount of cash remaining in the account after the trade. At the moment this is the same as `remaining_cash` under `trade_impacts`. type: number example: 1.11 nullable: true ManualTradeAndImpact: type: object properties: trade: $ref: "#/components/schemas/ManualTrade" trade_impacts: description: List of impacts of the trade on the account. The list always contains one value at the moment. type: array items: $ref: "#/components/schemas/ManualTradeImpact" combined_remaining_balance: $ref: "#/components/schemas/ManualTradeBalance" SymbolsQuotes: description: List of symbols with the latest quotes from the brokerage. type: array items: properties: symbol: $ref: "#/components/schemas/UniversalSymbol" last_trade_price: description: The most recent trade price from the brokerage. type: number example: 8.74 bid_price: description: The most recent bid price from the brokerage. type: number example: 8.43 ask_price: description: The most recent price from the brokerage. type: number example: 8.43 bid_size: description: The most recent bid size from the brokerage. type: number example: 260 ask_size: description: The most recent ask size from the brokerage. type: number example: 344 ManualTradeForm: description: Inputs for placing an order with the brokerage. type: object required: - account_id - action - order_type - time_in_force - universal_symbol_id properties: account_id: $ref: "#/components/schemas/AccountID" action: $ref: "#/components/schemas/ActionStrict" universal_symbol_id: $ref: "#/components/schemas/UniversalSymbolID" order_type: $ref: "#/components/schemas/OrderTypeStrict" time_in_force: $ref: "#/components/schemas/TimeInForceStrict" price: description: The limit price for `Limit` and `StopLimit` orders. type: number example: 31.33 nullable: true stop: description: The price at which a stop order is triggered for `Stop` and `StopLimit` orders. type: number example: 31.33 nullable: true units: nullable: true allOf: - $ref: "#/components/schemas/Units" notional_value: nullable: true allOf: - $ref: "#/components/schemas/NotionalValue" OptionImpact: description: Estimated cash change and fees for an option order before it is placed. type: object properties: estimated_cash_change: description: Estimated cash change for the order, before fees. type: string example: "1.97" cash_change_direction: description: Direction of the cash change. CREDIT means cash is received, DEBIT means cash is paid out, EVEN means no cash changes hands. UNKNOWN if the direction cannot be determined from the request. type: string nullable: true enum: [CREDIT, DEBIT, EVEN, UNKNOWN] estimated_fee_total: description: Estimated total transaction fees and commissions for the order. type: string example: "0.50" MlegTradeForm: description: Inputs for placing a multi-leg order with the brokerage. type: object required: - "order_type" - "time_in_force" - "legs" properties: order_type: $ref: "#/components/schemas/MlegOrderTypeStrict" time_in_force: $ref: "#/components/schemas/TimeInForceStrict" limit_price: description: The limit price. Required if the order type is `LIMIT`, `STOP_LOSS_LIMIT`. type: string format: decimal example: "" nullable: true stop_price: description: The stop price. Required if the order type is `STOP_LOSS_MARKET`, `STOP_LOSS_LIMIT`. type: string format: decimal example: "" nullable: true price_effect: nullable: true example: DEBIT allOf: - $ref: "#/components/schemas/MlegPriceEffectStrict" legs: type: array items: $ref: "#/components/schemas/MlegLeg" ManualTradeReplaceForm: description: Inputs for replacing an order with the brokerage. type: object required: - brokerage_order_id - action - order_type - time_in_force properties: brokerage_order_id: $ref: "#/components/schemas/BrokerageOrderID" action: $ref: "#/components/schemas/ActionStrict" order_type: $ref: "#/components/schemas/OrderTypeStrict" time_in_force: $ref: "#/components/schemas/TimeInForceStrict" price: description: The limit price for `Limit` and `StopLimit` orders. type: number example: 31.33 nullable: true symbol: description: The security's trading ticker symbol type: string example: AAPL stop: description: The price at which a stop order is triggered for `Stop` and `StopLimit` orders. type: number example: 31.33 nullable: true units: nullable: true allOf: - $ref: "#/components/schemas/Units" ManualTradeFormWithOptions: description: Inputs for placing an order with the brokerage. type: object required: - account_id - action - order_type - time_in_force properties: account_id: $ref: "#/components/schemas/AccountID" action: $ref: "#/components/schemas/ActionStrictWithOptions" universal_symbol_id: description: The universal symbol ID of the security to trade. Must be 'null' if `symbol` is provided, otherwise must be provided. nullable: true allOf: - $ref: "#/components/schemas/UniversalSymbolID" symbol: description: The security's trading ticker symbol. If 'symbol' is provided, then 'universal_symbol_id' must be 'null'. type: string example: AAPL nullable: true order_type: $ref: "#/components/schemas/OrderTypeStrict" time_in_force: $ref: "#/components/schemas/ManualTradePlaceTimeInForceStrict" trading_session: $ref: "#/components/schemas/TradingSession" expiry_date: description: Timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format indicating when the order expires. Required when `time_in_force` is `GTD`. Include a timezone offset or `Z` for UTC; if no timezone is provided, UTC is assumed. GTD orders are only available on certain brokerages. Visit https://support.snaptrade.com/brokerages for brokerage support. type: string format: date-time example: 2026-08-21T23:27:55.027Z nullable: true price: description: The limit price for `Limit` and `StopLimit` orders. type: number example: 31.33 nullable: true stop: description: The price at which a stop order is triggered for `Stop` and `StopLimit` orders. type: number example: 31.33 nullable: true units: description: For Equity orders, this represents the number of shares for the order. This can be a decimal for fractional orders. Must be `null` if `notional_value` is provided. If placing an Option order, this field represents the number of contracts to buy or sell. (e.g., 1 contract = 100 shares). nullable: true allOf: - $ref: "#/components/schemas/Units" notional_value: nullable: true allOf: - $ref: "#/components/schemas/NotionalValue" client_order_id: nullable: true allOf: - $ref: "#/components/schemas/ClientOrderID" ComplexOrderLeg: description: A single leg within a complex order. type: object required: - order_role - action - instrument - order_type - units - time_in_force properties: order_role: description: The role of this leg within the complex order. type: string enum: - TRIGGER - CONDITIONAL - PEER example: TRIGGER action: $ref: "#/components/schemas/ActionStrict" instrument: $ref: "#/components/schemas/TradingInstrument" order_type: $ref: "#/components/schemas/OrderTypeStrict" units: $ref: "#/components/schemas/Units" time_in_force: $ref: "#/components/schemas/TimeInForceStrict" price: description: The limit price. Required when `order_type` is `Limit` or `StopLimit`. type: number example: 31.33 nullable: true stop: description: The stop trigger price. Required when `order_type` is `Stop` or `StopLimit`. type: number example: 29.50 nullable: true ManualTradeFormComplex: description: Request body for placing a complex conditional order (OCO, OTO, or OTOCO). type: object required: - type - orders properties: type: description: | The complex order type. - `OCO`: One Cancels the Other — two peer orders. - `OTO`: One Triggers the Other — a trigger order and a conditional order. - `OTOCO`: One Triggers a One Cancels the Other — a trigger order and two peer orders. type: string enum: - OCO - OTO - OTOCO example: OTO orders: description: | The orders that make up the complex order. Required counts and roles per type: - `OCO`: exactly 2 orders, both `PEER` - `OTO`: exactly 2 orders, one `TRIGGER` and one `CONDITIONAL` - `OTOCO`: exactly 3 orders, one `TRIGGER` and two `PEER` type: array items: $ref: "#/components/schemas/ComplexOrderLeg" client_order_id: nullable: true allOf: - $ref: "#/components/schemas/ClientOrderID" ComplexOrderResponse: description: | Response returned after successfully placing a complex order. AccountOrderRecord rows for the legs are not created synchronously — they're hydrated by the next brokerage sync, and can be queried later using the returned `brokerage_group_order_id`. type: object properties: type: description: The complex order type that was placed. type: string enum: - OCO - OTO - OTOCO example: OTO brokerage_group_order_id: description: | The brokerage-assigned identifier that links all legs of this complex order together. Each leg will eventually appear as a separate AccountOrderRecord sharing this value. May be null if the brokerage does not return a group identifier. type: string nullable: true example: "1234567890" ManualTradeFormBracket: description: Inputs for placing an order with the brokerage. type: object required: - action - order_type - time_in_force - stop_loss - take_profit - instrument properties: action: $ref: "#/components/schemas/ActionStrictWithOptions" instrument: $ref: "#/components/schemas/TradingInstrument" order_type: $ref: "#/components/schemas/OrderTypeStrict" time_in_force: $ref: "#/components/schemas/TimeInForceStrict" price: description: The limit price for `Limit` and `StopLimit` orders. type: number example: 31.33 nullable: true stop: description: The price at which a stop order is triggered for `Stop` and `StopLimit` orders. type: number example: 31.33 nullable: true units: $ref: "#/components/schemas/Units" stop_loss: $ref: "#/components/schemas/StopLoss" take_profit: $ref: "#/components/schemas/TakeProfit" ValidatedTradeBody: type: object properties: wait_to_confirm: nullable: true example: true type: boolean description: Optional, defaults to true. Determines if a wait is performed to check on order status. If false, latency will be reduced but orders returned will be more likely to be of status `PENDING` as we will not wait to check on the status before responding to the request. CryptoTradingInstrument: type: object required: - symbol - type properties: symbol: description: The instrument's trading ticker symbol type: string example: BTC type: description: The instrument's type type: string enum: - CRYPTOCURRENCY - CRYPTOCURRENCY_PAIR TradingInstrument: type: object required: - symbol - type properties: symbol: description: The instrument's trading ticker symbol. This currently supports stock symbols and Options symbols in the 21 character OCC format. For example `AAPL 251114C00240000` represents a call option on AAPL expiring on 2025-11-14 with a strike price of $240. For more information on the OCC format, see [here](https://en.wikipedia.org/wiki/Option_symbol#OCC_format) type: string example: AAPL type: description: The instrument's type type: string enum: - EQUITY - OPTION - CRYPTOCURRENCY - CRYPTOCURRENCY_PAIR BrokerageInstrumentsResponse: type: object properties: instruments: type: array items: $ref: "#/components/schemas/BrokerageInstrument" BrokerageInstrument: type: object required: - symbol properties: symbol: description: The instrument's trading symbol / ticker. type: string example: AAPL exchange_mic: description: The MIC code of the exchange where the instrument is traded. type: string example: XNAS nullable: true tradeable: description: Whether the instrument is tradeable through the brokerage. `null` if the tradeability is unknown. type: boolean example: true nullable: true fractionable: description: Whether the instrument allows fractional units. `null` if the fractionability is unknown. type: boolean example: true nullable: true universal_symbol_id: description: The universal symbol ID of the instrument. This is the ID used to reference the instrument in SnapTrade API calls. type: string format: uuid example: 2bcd7cc3-e922-4976-bce1-9858296801c3 nullable: true MlegTradingInstrument: type: object required: - symbol - instrument_type properties: symbol: description: The security's trading ticker symbol. This currently supports stock symbols and Options symbols in the 21 character OCC format. For example `AAPL 251114C00240000` represents a call option on AAPL expiring on 2025-11-14 with a strike price of $240. For more information on the OCC format, see [here](https://en.wikipedia.org/wiki/Option_symbol#OCC_format) type: string example: PBI 250718C00006000 instrument_type: $ref: "#/components/schemas/MlegInstrumentType" OrderTypeStrict: description: | The type of order to place. - For `Limit` and `StopLimit` orders, the `price` field is required. - For `Stop` and `StopLimit` orders, the `stop` field is required. example: Market type: string enum: - Limit - Market - StopLimit - Stop OrderType: type: string nullable: true description: Order Type potential values include (but are not limited to) - Limit - Market - StopLimit - Stop TimeInForceStrict: description: > The Time in Force type for the order. This field indicates how long the order will remain active before it is executed or expires. Here are the supported values: - `Day` - Day. The order is valid only for the trading day on which it is placed. - `GTC` - Good Til Canceled. The order is valid until it is executed or canceled. - `FOK` - Fill Or Kill. The order must be executed in its entirety immediately or be canceled completely. - `IOC` - Immediate Or Cancel. The order must be executed immediately. Any portion of the order that cannot be filled immediately will be canceled. type: string enum: - FOK - Day - GTC - IOC example: Day ManualTradePlaceTimeInForceStrict: description: > The Time in Force type for the order. This field indicates how long the order will remain active before it is executed or expires. Here are the supported values: - `Day` - Day. The order is valid only for the trading day on which it is placed. - `GTC` - Good Til Canceled. The order is valid until it is executed or canceled. - `FOK` - Fill Or Kill. The order must be executed in its entirety immediately or be canceled completely. - `IOC` - Immediate Or Cancel. The order must be executed immediately. Any portion of the order that cannot be filled immediately will be canceled. - `GTD` - Good Til Date. The order is valid until `expiry_date`, which is required. Not available for market orders. GTD orders are only available on certain brokerages. Visit https://support.snaptrade.com/brokerages for brokerage support. type: string enum: - FOK - Day - GTC - IOC - GTD example: Day TradingSession: description: > The trading session for the order. This field indicates which market session the order will be placed in. This is only available for certain brokerages. Defaults to REGULAR. Here are the supported values: - `REGULAR` - Regular trading hours. - `EXTENDED` - Extended trading hours. type: string enum: - REGULAR - EXTENDED example: REGULAR default: REGULAR MlegPriceEffectStrict: type: string description: The desired price_effect for `LIMIT` and `STOP_LOSS_LIMIT` orders. Values are `CREDIT`, `DEBIT`, `EVEN` enum: - CREDIT - DEBIT - EVEN example: DEBIT MlegOrderTypeStrict: example: MARKET type: string enum: - MARKET - LIMIT - STOP_LOSS_MARKET - STOP_LOSS_LIMIT description: The type of order to place. MlegInstrumentType: description: The instrument's type type: string enum: - OPTION - EQUITY TimeInForce: description: | Trade time in force examples: * FOK - Fill Or Kill * Day - Day * GTC - Good Til Canceled * GTD - Good Til Date type: string ActionStrict: description: The action describes the intent or side of a trade. This is either `BUY` or `SELL`. type: string enum: - BUY - SELL MlegActionStrict: description: The action describes the intent and side of a trade. For equities, this is either `BUY` or `SELL`. For options, this is one of `BUY_TO_OPEN`, `BUY_TO_CLOSE`, `SELL_TO_OPEN`, `SELL_TO_CLOSE`. type: string enum: - BUY - SELL - BUY_TO_OPEN - BUY_TO_CLOSE - SELL_TO_OPEN - SELL_TO_CLOSE example: BUY_TO_OPEN ActionStrictWithOptions: description: The action describes the intent or side of a trade. This is either `BUY` or `SELL` for Equity symbols or `BUY_TO_OPEN`, `BUY_TO_CLOSE`, `SELL_TO_OPEN` or `SELL_TO_CLOSE` for Options. type: string enum: - BUY - SELL - BUY_TO_OPEN - BUY_TO_CLOSE - SELL_TO_OPEN - SELL_TO_CLOSE Action: type: string description: > The action describes the intent or side of a trade. This is usually `BUY` or `SELL` but can include other potential values like the following depending on the specific brokerage. - BUY - SELL - BUY_COVER - SELL_SHORT - BUY_OPEN - BUY_CLOSE - SELL_OPEN - SELL_CLOSE ActionStrictV2: type: string description: > The action describes the intent or side of a trade. - BUY - SELL - BUY_COVER - SELL_SHORT - BUY_TO_OPEN - BUY_TO_CLOSE - SELL_TO_OPEN - SELL_TO_CLOSE Units: description: Number of shares for the order. This can be a decimal for fractional orders. Must be `null` if `notional_value` is provided. type: number example: 10.5 Price: description: Trade Price if limit or stop limit order type: number nullable: true example: 31.33 NotionalValue: description: Total notional amount for the order. Must be `null` if `units` is provided. Can only work with `Market` for `order_type` and `Day` for `time_in_force`. This is only available for certain brokerages. Please check the [integrations doc](https://support.snaptrade.com/brokerages-table?v=e7bbcbf9f272441593f93decde660687) for more information. oneOf: - type: string - type: number example: 100.00 StopLoss: description: Takes in string value for stop_price and limit_price. stop_price is required, limit_price is optional type: object properties: stop_price: type: string example: "48.55" limit_price: type: string nullable: true example: "48.50" TakeProfit: description: Takes in a string value for limit_price type: object properties: limit_price: type: string example: "49.95" ClientOrderID: description: | Optional caller-supplied identifier passed through to the brokerage for idempotent order placement. Must be a canonical 36-character UUID. Idempotency enforcement is brokerage-specific - SnapTrade forwards this value to the broker but does not enforce uniqueness server-side. Refer to per-brokerage documentation for behavior on duplicate submission. nullable: true type: string format: uuid example: "550e8400-e29b-41d4-a716-446655440000" CryptocurrencySymbol: description: Symbol to identify a cryptocurrency or fiat currency on a crypto exchange. Fiat currencies symbols are ISO-4217 codes. type: string example: BTC CryptocurrencyBaseSymbol: description: > The base currency of a pair (e.g., "BTC" in BTC/USD). Either fiat or cryptocurrency symbol, for fiat use ISO-4217 codes. type: string example: BTC CryptocurrencyQuoteSymbol: description: > The quote currency of a pair (e.g., "USD" in BTC/USD). Either fiat or cryptocurrency symbol, for fiat use ISO-4217 codes. type: string example: USD CryptocurrencyIncrement: description: > The precision or smallest price incremental step available for this cryptocurrency pair type: string example: "0.001" CryptocurrencyPairSymbol: description: Cryptocurrency pair instrument symbol type: string example: BTC-USD CryptocurrencyPair: description: A cryptocurrency pair instrument. type: object required: ["base", "quote"] properties: symbol: $ref: "#/components/schemas/CryptocurrencyPairSymbol" base: $ref: "#/components/schemas/CryptocurrencyBaseSymbol" quote: $ref: "#/components/schemas/CryptocurrencyQuoteSymbol" increment: nullable: true allOf: - $ref: "#/components/schemas/CryptocurrencyIncrement" CryptocurrencyPairQuote: type: object required: ["bid", "ask"] properties: bid: description: The highest price a buyer is willing to pay. type: string format: decimal example: "123.45" ask: description: The lowest price a seller is willing to accept. type: string format: decimal example: "123.45" mid: description: The market mid price. type: string format: decimal example: "123.45" timestamp: description: The timestamp of the quote. type: string format: date-time example: 2024-01-24T15:00:00Z CryptoOrderPreview: description: Preview of an order. type: object properties: estimated_fee: type: object required: ["currency", "amount"] description: The estimated order fee. properties: currency: $ref: "#/components/schemas/CryptocurrencySymbol" amount: type: string format: decimal example: "123.45" OrderUpdatedResponse: type: object required: - brokerage_order_id properties: brokerage_order_id: $ref: "#/components/schemas/BrokerageOrderID" order: nullable: true allOf: - $ref: "#/components/schemas/AccountOrderRecord" CancelOrderResponse: type: object required: - brokerage_order_id properties: brokerage_order_id: $ref: "#/components/schemas/BrokerageOrderID" raw_response: type: object nullable: true description: The raw response from the brokerage. example: { "order_id": "1234567890", "status": "CANCELLED" } MlegOrderResponse: type: object required: - brokerage_order_id - orders properties: brokerage_order_id: $ref: "#/components/schemas/BrokerageOrderID" orders: type: array items: $ref: "#/components/schemas/AccountOrderRecord" PaginationDetails: description: Details about the pagination of the results. type: object properties: offset: type: integer example: 0 description: The starting point of the paginated results. limit: type: integer example: 100 description: The maximum number of items to return in the response. total: type: integer example: 1000 description: The total number of items available to be returned over the API. PaginatedUniversalActivity: description: A paginated list of UniversalActivity objects. type: object properties: data: type: array items: $ref: "#/components/schemas/AccountUniversalActivity" pagination: $ref: "#/components/schemas/PaginationDetails" AccountUniversalActivity: description: A transaction or activity from an institution type: object properties: id: description: | Unique identifier for the transaction. This is the ID used to reference the transaction in SnapTrade. Please note that this ID _can_ change if the transaction is deleted and re-added. Under normal circumstances, SnapTrade does not delete transactions. The only time this would happen is if SnapTrade re-fetches and reprocesses the data from the brokerage, which is rare. If you require a stable ID, please let us know and we can work with you to provide one. type: string example: 2f7dc9b3-5c33-4668-3440-2b31e056ebe6 symbol: description: The security for the transaction. The field is `null` if the transaction is not related to a security (like a deposit, withdrawal, fee, etc). SnapTrade does a best effort to map the brokerage's symbol. In cases where the brokerage symbol is not recognized, the field will be set to `null`. nullable: true allOf: - $ref: "#/components/schemas/Symbol" currency_universal_symbol: description: The quote security for the transaction when `price`, `amount`, and `fee` are denominated in a security instead of a fiat currency. This is most common for cryptocurrency trades. The field is `null` when the transaction is denominated in `currency`. nullable: true allOf: - $ref: "#/components/schemas/Symbol" option_symbol: description: The option security for the transaction. The field is `null` if the transaction is not related to an option security (like a deposit, withdrawal, fee, etc). SnapTrade does a best effort to map the brokerage's option symbol. In cases where the brokerage option symbol is not recognized, the field will be set to `null`. nullable: true allOf: - $ref: "#/components/schemas/OptionsSymbol" price: description: The price of the security for the transaction. This is mostly applicable to `BUY`, `SELL`, and `DIVIDEND` transactions. For option transactions, this represents the price per share of the option contract. type: number example: 0.4 units: description: The number of units of the security for the transaction. This is mostly applicable to `BUY`, `SELL`, and `DIVIDEND` transactions. type: number example: 5.2 amount: description: The amount of the transaction denominated in `currency`. This can be positive or negative. In general, transactions that positively affect the account balance (like sell, deposits, dividends, etc) will have a positive amount, while transactions that negatively affect the account balance (like buy, withdrawals, fees, etc) will have a negative amount. type: number example: 263.82 nullable: true currency: description: The currency in which the transaction `price`, `amount`, and `fee` are denominated. This is `null` when those values are denominated in `currency_universal_symbol`. nullable: true allOf: - $ref: "#/components/schemas/Currency" type: type: string description: | A string representing the type of transaction. SnapTrade does a best effort to categorize the brokerage transaction types into a common set of values. Here are some of the most popular values: - `BUY` - Asset bought. - `SELL` - Asset sold. - `DIVIDEND` - Dividend payout. - `SUBSTITUTE_DIVIDEND` - Payment in lieu of a dividend. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `STOCK_DIVIDEND` - A type of dividend where a company distributes shares instead of cash - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `TAX` - A tax related fee. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` - Transfer of asset(s) from one account to another. - `EXTERNAL_ASSET_TRANSFER_IN` - Incoming transfer of an asset from an external account to this account. - `EXTERNAL_ASSET_TRANSFER_OUT` - Outgoing transfer of an asset from this account to an external account. - `SPLIT` - A stock share split. - `ADJUSTMENT` - A one time adjustment of the account's cash balance or shares of an asset example: BUY option_type: type: string example: BUY_TO_OPEN description: | If an option `BUY` or `SELL` transaction, this further specifies the type of action. The possible values are: - BUY_TO_OPEN - BUY_TO_CLOSE - SELL_TO_OPEN - SELL_TO_CLOSE description: description: A human-readable description of the transaction. This is usually the brokerage's description of the transaction. type: string example: WALT DISNEY UNIT DIST ON 21 SHS REC 12/31/21 PAY 01/06/22 trade_date: description: The recorded time for the transaction. The granularity of this timestamp depends on the brokerage. Some brokerages provide the exact time of the transaction, while others provide only the date. Please check the [integrations page](https://support.snaptrade.com/brokerages-table?v=6fab8012ade6441fa0c6d9af9c55ce3a) for the specific brokerage to see the granularity of the timestamps. Note that even though the field is named `trade_date`, it can represent any type of transaction, not just trades. type: string format: date-time example: 2024-03-22T16:27:55Z nullable: true settlement_date: description: The date on which the transaction is settled. type: string format: date-time example: 2024-03-26T00:00:00Z fee: description: Any fee associated with the transaction if provided by the brokerage. type: number example: 0 fx_rate: type: number example: 1.032 nullable: true description: The forex conversion rate involved in the transaction if provided by the brokerage. Used in cases where securities of one currency are purchased in a different currency, and the forex conversion is automatic. In those cases, price, amount and fee will be in the top level currency (activity -> currency) institution: description: The institution that the transaction is associated with. This is usually the brokerage name. type: string example: Robinhood external_reference_id: type: string nullable: true description: Reference ID from brokerage used to identify related transactions. For example if an order comprises of several transactions (buy, fee, fx), they can be grouped if they share the same `external_reference_id` example: 2f7dc9b3-5c33-4668-3440-2b31e056ebe6 UniversalActivity: description: A transaction or activity from an institution type: object properties: id: description: | Unique identifier for the transaction. This is the ID used to reference the transaction in SnapTrade. Please note that this ID _can_ change if the transaction is deleted and re-added. Under normal circumstances, SnapTrade does not delete transactions. The only time this would happen is if SnapTrade re-fetches and reprocesses the data from the brokerage, which is rare. If you require a stable ID, please let us know and we can work with you to provide one. type: string example: 2f7dc9b3-5c33-4668-3440-2b31e056ebe6 account: $ref: "#/components/schemas/AccountSimple" symbol: description: The security for the transaction. The field is `null` if the transaction is not related to a security (like a deposit, withdrawal, fee, etc). SnapTrade does a best effort to map the brokerage's symbol. In cases where the brokerage symbol is not recognized, the field will be set to `null`. nullable: true allOf: - $ref: "#/components/schemas/Symbol" currency_universal_symbol: description: The quote security for the transaction when `price`, `amount`, and `fee` are denominated in a security instead of a fiat currency. This is most common for cryptocurrency trades. The field is `null` when the transaction is denominated in `currency`. nullable: true allOf: - $ref: "#/components/schemas/Symbol" option_symbol: description: The option security for the transaction. The field is `null` if the transaction is not related to an option security (like a deposit, withdrawal, fee, etc). SnapTrade does a best effort to map the brokerage's option symbol. In cases where the brokerage option symbol is not recognized, the field will be set to `null`. nullable: true allOf: - $ref: "#/components/schemas/OptionsSymbol" price: description: The price of the security for the transaction. This is mostly applicable to `BUY`, `SELL`, and `DIVIDEND` transactions. type: number example: 0.4 units: description: The number of units of the security for the transaction. This is mostly applicable to `BUY`, `SELL`, and `DIVIDEND` transactions. type: number example: 5.2 amount: description: The amount of the transaction denominated in `currency`. This can be positive or negative. In general, transactions that positively affect the account balance (like sell, deposits, dividends, etc) will have a positive amount, while transactions that negatively affect the account balance (like buy, withdrawals, fees, etc) will have a negative amount. type: number example: 263.82 nullable: true currency: description: The currency in which the transaction `price`, `amount`, and `fee` are denominated. This is `null` when those values are denominated in `currency_universal_symbol`. nullable: true allOf: - $ref: "#/components/schemas/Currency" type: type: string description: | A string representing the type of transaction. SnapTrade does a best effort to categorize the brokerage transaction types into a common set of values. Here are some of the most popular values: - `BUY` - Asset bought. - `SELL` - Asset sold. - `DIVIDEND` - Dividend payout. - `SUBSTITUTE_DIVIDEND` - Payment in lieu of a dividend. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `OPTIONEXPIRATION` - Option expiration event. `option_symbol` contains the related option contract info. - `OPTIONASSIGNMENT` - Option assignment event. `option_symbol` contains the related option contract info. - `OPTIONEXERCISE` - Option exercise event. `option_symbol` contains the related option contract info. example: BUY option_type: type: string example: BUY_TO_OPEN description: | If an option `BUY` or `SELL` transaction, this further specifies the type of action. The possible values are: - BUY_TO_OPEN - BUY_TO_CLOSE - SELL_TO_OPEN - SELL_TO_CLOSE description: description: A human-readable description of the transaction. This is usually the brokerage's description of the transaction. type: string example: WALT DISNEY UNIT DIST ON 21 SHS REC 12/31/21 PAY 01/06/22 trade_date: description: The recorded time for the transaction. The granularity of this timestamp depends on the brokerage. Some brokerages provide the exact time of the transaction, while others provide only the date. Please check the [integrations page](https://support.snaptrade.com/brokerages-table?v=6fab8012ade6441fa0c6d9af9c55ce3a) for the specific brokerage to see the granularity of the timestamps. Note that even though the field is named `trade_date`, it can represent any type of transaction, not just trades. type: string format: date-time example: 2024-03-22T16:27:55Z nullable: true settlement_date: description: The date on which the transaction is settled. type: string format: date-time example: 2024-03-26T00:00:00Z fee: description: Any fee associated with the transaction if provided by the brokerage. type: number example: 0 fx_rate: type: number example: 1.032 nullable: true description: The forex conversion rate involved in the transaction if provided by the brokerage. Used in cases where securities of one currency are purchased in a different currency, and the forex conversion is automatic. In those cases, price, amount and fee will be in the top level currency (activity -> currency) institution: description: The institution that the transaction is associated with. This is usually the brokerage name. type: string example: Robinhood external_reference_id: type: string nullable: true description: Reference ID from brokerage used to identify related transactions. For example if an order comprises of several transactions (buy, fee, fx), they can be grouped if they share the same `external_reference_id` example: 2f7dc9b3-5c33-4668-3440-2b31e056ebe6 FigiInstrument: description: Financial Instrument Global Identifier (FIGI) information for the security. See [OpenFIGI](https://www.openfigi.com/) for more information. type: object properties: figi_code: description: This identifier is unique per security per trading venue. See section 1.4.1 of the [FIGI Standard](https://www.openfigi.com/assets/local/figi-allocation-rules.pdf) for more information. type: string example: BBG000B9Y5X2 nullable: true figi_share_class: description: This enables users to link multiple FIGIs for the same security in order to obtain an aggregated view across all countries and all exchanges. For example, `AAPL` has a different FIGI for each exchange/trading venue it is traded on. The `figi_share_class` is the same for all of these FIGIs. See section 1.4.3 of the [FIGI Standard](https://www.openfigi.com/assets/local/figi-allocation-rules.pdf) for more information. type: string example: BBG001S5N8V8 nullable: true UniversalSymbol: description: Uniquely describes a single security + exchange combination across all brokerages. type: object properties: id: $ref: "#/components/schemas/UniversalSymbolID" symbol: description: The security's trading ticker symbol. For example "AAPL" for Apple Inc. We largely follow the [Yahoo Finance ticker format](https://help.yahoo.com/kb/SLN2310.html)(click on "Yahoo Finance Market Coverage and Data Delays"). For example, for securities traded on the Toronto Stock Exchange, the symbol has a '.TO' suffix. For securities traded on NASDAQ or NYSE, the symbol does not have a suffix. type: string example: VAB.TO raw_symbol: description: The raw symbol is `symbol` with the exchange suffix removed. For example, if `symbol` is "VAB.TO", then `raw_symbol` is "VAB". type: string example: VAB description: description: A human-readable description of the security. This is usually the company name or ETF name. type: string example: VANGUARD CDN AGGREGATE BOND INDEX ETF nullable: true currency: description: The currency in which the security is traded. allOf: - $ref: "#/components/schemas/Currency" exchange: description: The exchange on which the security is listed and traded. allOf: - $ref: "#/components/schemas/Exchange" type: $ref: "#/components/schemas/SecurityType" figi_code: description: This identifier is unique per security per trading venue. See section 1.4.1 of the [FIGI Standard](https://www.openfigi.com/assets/local/figi-allocation-rules.pdf) for more information. This value should be the same as the `figi_code` in the `figi_instrument` child property. type: string example: BBG000B9XRY4 nullable: true figi_instrument: nullable: true allOf: - $ref: "#/components/schemas/FigiInstrument" currencies: deprecated: true description: This field is deprecated and should not be used. Please reach out to SnapTrade support if you have a valid use case for this. type: array items: $ref: "#/components/schemas/Currency" required: - id - symbol - raw_symbol - currency - type - currencies UnderlyingSymbol: # FIXME: Why is this different from UniversalSymbol description: Symbol object for the underlying security of an option. type: object properties: id: $ref: "#/components/schemas/UniversalSymbolID" symbol: description: The security's trading ticker symbol. For example "AAPL" for Apple Inc. We largely follow the [Yahoo Finance ticker format](https://help.yahoo.com/kb/SLN2310.html)(click on "Yahoo Finance Market Coverage and Data Delays"). For example, for securities traded on the Toronto Stock Exchange, the symbol has a '.TO' suffix. For securities traded on NASDAQ or NYSE, the symbol does not have a suffix. type: string example: SPY raw_symbol: description: The raw symbol is `symbol` with the exchange suffix removed. For example, if `symbol` is "VAB.TO", then `raw_symbol` is "VAB". type: string example: VAB description: description: A human-readable description of the security. This is usually the company name or ETF name. type: string example: SPDR S&P 500 ETF Trust nullable: true currency: description: The currency in which the security is traded. allOf: - $ref: "#/components/schemas/Currency" exchange: description: The exchange on which the security is listed and traded. allOf: - $ref: "#/components/schemas/USExchange" type: description: The type of security. For example, "Common Stock" or "ETF". allOf: - $ref: "#/components/schemas/SecurityType" figi_code: description: This identifier is unique per security per trading venue. See section 1.4.1 of the [FIGI Standard](https://www.openfigi.com/assets/local/figi-allocation-rules.pdf) for more information. This value should be the same as the `figi_code` in the `figi_instrument` child property. type: string example: BBG000B9XRY4 nullable: true figi_instrument: nullable: true allOf: - $ref: "#/components/schemas/FigiInstrument" currencies: deprecated: true description: This field is deprecated and should not be used. Please reach out to SnapTrade support if you have a valid use case for this. type: array items: $ref: "#/components/schemas/Currency" OptionsSymbol: description: Uniquely describes an option security + exchange combination across all brokerages. type: object required: - id - ticker - option_type - strike_price - expiration_date - underlying_symbol properties: id: $ref: "#/components/schemas/OptionSymbolID" ticker: description: The [OCC symbol](https://en.wikipedia.org/wiki/Option_symbol) for the option. type: string example: AAPL 261218C00240000 option_type: description: The type of option. Either "CALL" or "PUT". type: string enum: - CALL - PUT example: CALL strike_price: description: The option strike price. type: number example: 240 expiration_date: description: The option expiration date. type: string format: date example: "2026-12-18" is_mini_option: description: Whether the option is a mini option. Mini options have 10 underlying shares per contract instead of the standard 100. type: boolean example: false underlying_symbol: $ref: "#/components/schemas/UnderlyingSymbol" OptionLeg: description: Option Leg type: object properties: action: type: string enum: - BUY_TO_OPEN - BUY_TO_CLOSE - SELL_TO_OPEN - SELL_TO_CLOSE option_symbol_id: type: string description: Obtained from calling options chain endpoint (option_id) example: SPY220819P00200000 quantity: type: number example: 1 SecurityType: type: object description: The type of security. For example, "Common Stock" or "ETF". properties: id: $ref: "#/components/schemas/SecurityTypeID" code: description: | A short code representing the security type. For example, "cs" for Common Stock. Here are some common values: - `ad` - ADR - `bnd` - Bond - `cs` - Common Stock - `cef` - Closed End Fund - `crypto` - Cryptocurrency - `et` - ETF - `oef` - Open Ended Fund - `pm` - Precious Metals - `ps` - Preferred Stock - `rt` - Right - `struct` - Structured Product - `ut` - Unit - `wi` - When Issued - `wt` - Warrant type: string example: cs description: description: A human-readable description of the security type. For example, "Common Stock" or "ETF". type: string example: Common Stock is_supported: deprecated: true description: This field is deprecated and should not be used. Please reach out to SnapTrade support if you have a valid use case for this. type: boolean example: true Time: description: Time type: string example: 2022-01-21T15:11:19.217000-05:00 BrokerageType: description: Type of brokerage. Currently supports traditional brokerages and crypto exchanges. type: object properties: id: $ref: "#/components/schemas/Id" name: type: string example: Traditional Brokerage WebhookBase: description: The base webhook content type: object properties: webookId: type: string example: 06fe1fd7-fc50-43a7-b564-8a2c5f3bab44 clientId: type: string example: WEALTHYCHIPMUNK eventTimestamp: type: string example: 2022-01-21T15:11:19.217000-05:00 userId: type: string example: external_user@test.com encryptedResponse: description: > This response consists of 2 different components that must be decrypted to obtain the decrypted message * Decrypting the encryptedSharedKey The encrypted shared key is a shared key that was randomly generated by SnapTrade and encrypted using the users SSH public key provided when registering the user It is needed to decrypt the message in step 2. To decrypt the shared key, the user should have access to their SSH private key stored locally in their device An example Python code on how to decrypt the shared key is shown below ``` def decrypt_rsa_message(self, encrypted_message): from Crypto.Cipher import PKCS1_OAEP from Crypto.PublicKey import RSA from base64 import b64decode f = open('private.pem', 'r') private_key = RSA.import_key(f.read()) cipher = PKCS1_OAEP.new(private_key) return cipher.decrypt(b64decode(encrypted_message.encode())).decode() ``` * Decrypting the encryptedMessageData The data meant to be returned by an endpoint can be obtained by decrypting the encrypted message An encrypted message is a message that is encrypted using AES - MODE OCB with the shared key obtained in step one An example code to decrypt the encrypted message is shown below ``` def decrypt_aes_message(self, shared_key, encrypted_message): from Crypto.Cipher import AES from base64 import b64decode encrypted_msg = b64decode(encrypted_message["encryptedMessage"].encode()) tag = b64decode(encrypted_message["tag"].encode()) nonce = b64decode(encrypted_message["nonce"].encode()) cipher = AES.new(shared_key.encode(), AES.MODE_OCB, nonce=nonce) return cipher.decrypt_and_verify(encrypted_msg, tag).decode() ``` type: object additionalProperties: false properties: encryptedSharedKey: type: string example: 5UEaY9QGzcNTr8y2jGDUI79jY1OdfK9x encryptedMessageData: type: object properties: encryptedMessage: type: string example: 9Xy05vqZOfp0OpW5fLAaDw== tag: type: string example: mWZPkpQh5ktbcz6N7cTRmQ== nonce: type: string example: None MlegLeg: type: object required: - "instrument" - "action" - "units" properties: instrument: $ref: "#/components/schemas/MlegTradingInstrument" action: $ref: "#/components/schemas/MlegActionStrict" units: description: The quantity to trade. For options this represents the number of contracts. For equity this represents the number of shares. type: integer example: 1 SimpleOrderForm: type: object required: - "instrument" - "side" - "type" - "time_in_force" - "amount" properties: instrument: $ref: "#/components/schemas/TradingInstrument" side: $ref: "#/components/schemas/ActionStrict" type: type: string enum: - MARKET - LIMIT - STOP_LOSS_MARKET - STOP_LOSS_LIMIT - TAKE_PROFIT_MARKET - TAKE_PROFIT_LIMIT description: The type of order to place. time_in_force: description: > The Time in Force type for the order. This field indicates how long the order will remain active before it is executed or expires. - `GTC` - Good Til Canceled. The order is valid until it is executed or canceled. - `FOK` - Fill Or Kill. The order must be executed in its entirety immediately or be canceled completely. - `IOC` - Immediate Or Cancel. The order must be executed immediately. Any portion of the order that cannot be filled immediately will be canceled. - `GTD` - Good Til Date. The order is valid until the specified date. type: string enum: - GTC - FOK - IOC - GTD amount: description: The amount of the base currency to buy or sell. type: string format: decimal example: "123.45" limit_price: description: The limit price. Required if the order type is `LIMIT`, `STOP_LOSS_LIMIT` or `TAKE_PROFIT_LIMIT`. type: string format: decimal example: "123.45" stop_price: description: The stop price. Required if the order type is `STOP_LOSS_MARKET`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT_MARKET` or `TAKE_PROFIT_LIMIT`. type: string format: decimal example: "123.45" post_only: type: boolean example: false description: > Valid and required only for order type `LIMIT`. If true orders that would be filled immediately are rejected to avoid incurring TAKER fees. expiration_date: type: string format: date-time example: "2024-01-01T00:00:00Z" description: The expiration date of the order. Required if the time_in_force is `GTD`. CryptoOrderForm: type: object required: - "instrument" - "side" - "type" - "time_in_force" - "amount" properties: instrument: $ref: "#/components/schemas/CryptoTradingInstrument" side: $ref: "#/components/schemas/ActionStrict" type: type: string enum: - MARKET - LIMIT - STOP_LOSS_MARKET - STOP_LOSS_LIMIT - TAKE_PROFIT_MARKET - TAKE_PROFIT_LIMIT description: The type of order to place. time_in_force: description: > The Time in Force type for the order. This field indicates how long the order will remain active before it is executed or expires. - `GTC` - Good Til Canceled. The order is valid until it is executed or canceled. - `FOK` - Fill Or Kill. The order must be executed in its entirety immediately or be canceled completely. - `IOC` - Immediate Or Cancel. The order must be executed immediately. Any portion of the order that cannot be filled immediately will be canceled. - `GTD` - Good Til Date. The order is valid until the specified date. type: string enum: - GTC - FOK - IOC - GTD amount: description: The amount of the base currency to buy or sell. type: string format: decimal example: "123.45" limit_price: description: The limit price. Required if the order type is `LIMIT`, `STOP_LOSS_LIMIT` or `TAKE_PROFIT_LIMIT`. type: string format: decimal example: "123.45" stop_price: description: The stop price. Required if the order type is `STOP_LOSS_MARKET`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT_MARKET` or `TAKE_PROFIT_LIMIT`. type: string format: decimal example: "123.45" post_only: type: boolean example: false description: > Valid and required only for order type `LIMIT`. If true orders that would be filled immediately are rejected to avoid incurring TAKER fees. expiration_date: type: string format: date-time example: "2024-01-01T00:00:00Z" description: The expiration date of the order. Required if the time_in_force is `GTD`.