openapi: 3.0.0 info: description: | Connect brokerage accounts to your app for live positions and trading. ## Rate limiting Two limits apply to requests signed with your `clientId`. The stricter one wins, and exceeding either returns `429 Too Many Requests`. - **Customer-level** — 250 requests/minute by default, scoped to your `clientId` and applied across all endpoints. Reported in `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`. - **Account-level** — 10 requests/minute per account, scoped to (`clientId`, `accountId`). All covered operations for one account draw on the same bucket — reading balances and reading positions share it — and enforcement does not depend on the HTTP method, so updating an account consumes the same bucket as reading it. Only enforced for Personal users, and only for integrations it has been rolled out to — it is not yet in force for every Personal integration. It also does not apply on every operation that documents a 429 below. Where it applies it is reported in `X-RateLimit-Account-Limit`, `X-RateLimit-Account-Remaining` and `X-RateLimit-Account-Reset`. Do not read the absence of those headers as proof the limit is off — some configurations omit the rate limit headers while still enforcing the limit, so header absence tells you nothing about your allowance. On a 429, `X-RateLimit-Remaining: 0` means you hit the customer-level limit and `X-RateLimit-Account-Remaining: 0` means the account-level one. Wait for the corresponding `*-Reset` value (seconds) before retrying, or fall back to exponential backoff with jitter. Not every 429 is explained by those headers. A separate per-authenticated-user limit, reported in no `X-RateLimit-*` header, covers OAuth-authenticated requests and signed requests in configurations where the customer-level limit is not in effect — on the operations that use the default throttles. A few operations override those and are governed by the customer-level limit alone. The two do not stack: a signed request governed by the customer-level limit above is not additionally subject to the per-user one. If a 429 arrives with no header at zero — or with no `X-RateLimit-*` headers at all — honour `Retry-After` and back off. Treat the remaining counts as a hint, not a guarantee that the next request will succeed. Because the customer-level limit applies everywhere, any signed request can return 429. **OAuth-authenticated requests are an exception.** They are not subject to the customer-level limit and do not receive `X-RateLimit-Limit`, `X-RateLimit-Remaining` or `X-RateLimit-Reset` — do not wait on those headers or design around a customer-level allowance on this path. The account-level limit still applies to them on the account-data endpoints above, reported in the `X-RateLimit-Account-*` headers. On operations using the default throttles the per-user limit above applies to them as well, so an OAuth request can be rejected while the account headers still show capacity; on the few operations that override those throttles, OAuth callers have no per-user ceiling at all. Drive retries from `Retry-After` and exponential backoff with jitter rather than from the headers. See https://docs.snaptrade.com/docs/ratelimiting. 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: 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: Management description: Retrieve usage information about your SnapTrade Client ID. - name: Webhooks description: Reach out directly to SnapTrade to enable webhooks in order to be notified when certain events occur. - 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" "403": description: Forbidden. The user's secret is managed by a first-party app and cannot be reset here content: application/json: schema: $ref: "#/components/schemas/403FailedRequestResponse" "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 /snapTrade/stats: get: tags: - Management summary: Get usage stats description: | Returns user, connection, and connected asset totals for your SnapTrade Client ID. These are the same numbers shown on the Users & Connections page of the SnapTrade Dashboard. User and connection counts are cached for up to 5 minutes. Connected asset values come from a snapshot calculated once a day; `assets_under_management_calculated_at` indicates when it was last calculated. operationId: Management_getStats parameters: - in: query required: false name: currency description: ISO 4217 currency code to express connected asset values in. Defaults to `USD`. schema: type: string example: USD responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/PartnerStats" "400": description: Unsupported currency content: application/json: schema: $ref: "#/components/schemas/400FailedRequestResponse" "401": description: Unauthorized content: application/json: schema: $ref: "#/components/schemas/401FailedRequestResponse" "429": description: Rate limit exceeded content: application/json: schema: $ref: "#/components/schemas/429TooManyRequestsResponse" "500": description: Unexpected Error content: application/json: schema: $ref: "#/components/schemas/500UnexpectedExceptionResponse" "503": description: Exchange rates for the requested currency are temporarily unavailable content: application/json: schema: $ref: "#/components/schemas/503CurrencyConversionUnavailableResponse" /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. Concurrent live holdings requests for the same account fail immediately with HTTP 409 and error code `1166`. Wait for the in-flight request to complete before retrying. 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" "409": description: A holdings request for this account is already in flight. Wait for it to complete before retrying. content: application/json: schema: type: object properties: detail: type: string example: A holdings request for this account is already in flight. Please wait for it to complete before retrying. status_code: type: integer example: 409 code: type: string example: "1166" "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" "429": $ref: "#/components/responses/TooManyRequests" /accounts: get: tags: - Account Information summary: List user accounts deprecated: true description: | **Deprecated.** Use the [list all user accounts](/reference/Account%20Information/AccountInformation_listAllUserAccounts) endpoint instead, which returns all account types in a single response, including investment, deposit, and line of credit accounts. 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/all: get: tags: - Account Information summary: List all user accounts description: | Returns all accounts across all connections known to SnapTrade for the authenticated user. The `results` list can contain multiple account types in the same response, including investment, deposit, and line of credit accounts. Use the `kind` discriminator to determine the schema for each account. 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 institution. To get real-time data on Pay as you Go / Real-time, use the [list accounts for a connection endpoint](/reference/Connections/Connections_listConnectionAccounts). Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). operationId: AccountInformation_listAllUserAccounts 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: $ref: "#/components/schemas/AllUserAccountsResponse" "401": description: Unauthorized, invalid credentials for this resource content: application/json: schema: $ref: "#/components/schemas/401FailedRequestResponse" "/accounts/{accountId}": get: tags: - Account Information summary: Get account detail deprecated: true description: | **Deprecated.** Use the [get account details](/reference/Account%20Information/AccountInformation_getAccountDetails) endpoint instead, which supports all account types, including investment, deposit, and line of credit accounts. 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 "429": $ref: "#/components/responses/TooManyRequests" 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 "429": $ref: "#/components/responses/TooManyRequests" /accounts/{accountId}/details: get: tags: - Account Information summary: Get account details description: | Returns the specified account for the authenticated user. The account can be an investment, deposit, or line of credit account. Use the `kind` discriminator to determine the schema for the account. On Pay as you Go / Real-time, this endpoint refreshes the account's opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. 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 institution. 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. If the connection has become disabled, it can no longer access the latest data from the institution, 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_getAccountDetails 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/ConnectionAccount" "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" "429": $ref: "#/components/responses/TooManyRequests" /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" "429": $ref: "#/components/responses/TooManyRequests" /accounts/{accountId}/balances/v2: get: tags: - Account Information summary: Get account balances operationId: AccountInformation_getAccountBalancesV2 description: | Returns the account's balances in a single snapshot: total net value, cash per currency, buying power, and margin details for margin accounts. Every field is always present and is `null` when the institution doesn't report it. **Beta:** this endpoint is only available for partners it has been enabled for. Please contact the SnapTrade team to enable it. The response schema may change. 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 institution. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. `data_freshness.as_of` is the time the returned data was fetched from the institution. If the connection has become disabled, it can no longer access the latest data from the institution, 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/AccountBalancesV2Response" "401": description: Unauthorized, invalid credentials for this resource content: application/json: schema: $ref: "#/components/schemas/401FailedRequestResponse" "403": description: Feature not enabled content: application/json: schema: $ref: "#/components/schemas/403FeatureNotEnabledResponse" "404": description: The requested resource does not exist. content: application/json: schema: $ref: "#/components/schemas/404FailedRequestResponse" "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" "429": $ref: "#/components/responses/TooManyRequests" /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, bonds, crypto, futures, option positions, future option positions, CFD positions, and tokenized asset positions. Use the `instrument.kind` discriminator to determine the schema for each position's `instrument`. **Beta:** future option positions (`instrument.kind: future_option`) are in beta. They are currently returned only for tastytrade and Interactive Brokers connections, and only for partners they have been enabled for — please contact the SnapTrade team to enable them. The `FutureOptionInstrument` schema may change. Positions counted in account cash balance or buying power include `cash_equivalent: true`. `stock`, `adr`, `etf`, `mutualfund`, and `crypto` positions may include `tax_lots` when tax lot data is enabled for the account. To see which institutions support tax lot data, please see our [supported institutions doc](https://support.snaptrade.com/brokerages). 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" "429": $ref: "#/components/responses/TooManyRequests" /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" "429": $ref: "#/components/responses/TooManyRequests" /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" "429": $ref: "#/components/responses/TooManyRequests" /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. Because the data is dynamically generated, we recommend replacing your dataset with each request as opposed to combining data from multiple requests. Enable this feature for free in the [Add-on page of the Customer Dashboard](https://dashboard.snaptrade.com/add-ons) The data may contain gaps and is best used for charting account value trends. It should not be relied on as a complete or exact record of historical account values. 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" "429": $ref: "#/components/responses/TooManyRequests" /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" "429": $ref: "#/components/responses/TooManyRequests" /accounts/{accountId}/returnRates: get: tags: - Account Information summary: List account rate of returns operationId: AccountInformation_getUserAccountReturnRates description: | DEPRECATED. 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 "429": $ref: "#/components/responses/TooManyRequests" /authorizations/{authorizationId}/returnRates: get: tags: - Connections summary: List connection rate of returns operationId: Connections_returnRates description: | DEPRECATED. 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" "429": $ref: "#/components/responses/TooManyRequests" "/accounts/{accountId}/quotes/options": get: tags: - Trading summary: Get option quote deprecated: true description: | **Deprecated.** This endpoint was sunset on October 1, 2026 and now always returns `410 Gone`. 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" "410": description: Endpoint is no longer available content: application/json: schema: type: object properties: detail: type: string example: This endpoint is no longer available. "429": description: Rate limit exceeded 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 "/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. "/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 "403": description: OAuth applications cannot delete personal connections. "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 SnapTrade uses delayed data for the connection. Real-time connections do not benefit from this feature since data is refreshed when calls are made. Refer to `data_freshness_mode.snaptrade` 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" "/connections/{connectionId}/accounts": get: tags: - Connections summary: List accounts description: | Returns all accounts that belong to the specified connection for the authenticated user. The `results` list can contain multiple account types in the same response, including investment, deposit, and line of credit accounts. Use the `kind` discriminator to determine the schema for each account. On Pay as you Go / Real-time, this endpoint refreshes each account's opening date and total net value (`net_value`) live from the institution on each call, along with funding date for `investment` accounts. 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 institution. 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_listConnectionAccounts 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/ConnectionAccountsResponse" "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" "/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. "/institutions": get: tags: - Reference Data summary: List institutions description: | Returns the public catalog of institutions SnapTrade supports and what each one supports. The response is the same for every caller and needs no authentication. To list the brokerages a specific Client ID can connect to right now, use `GET /brokerages` instead. A `null` field means the information is not documented yet, never that the institution lacks it. New fields and new enum values may be added over time, so ignore any you don't recognize. operationId: ReferenceData_listInstitutions security: [] responses: "200": description: Enabled institutions that are generally available, in beta or in alpha, sorted by display name, including paper-trading and simulated-trading variants (`is_paper`). content: application/json: schema: type: array items: $ref: "#/components/schemas/Institution" 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. /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" /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. Share classes and preferred series use SnapTrade's canonical dotted form: use `HBND.U.TO` (not Yahoo's `HBND-U.TO`), `FTN.PR.A.TO` (not `FTN-PA.TO`), and `ECF.PRA` (not `ECF-P-A`). Please use the ticker with the proper suffix and canonical share-class notation 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/simple: post: tags: - Experimental endpoints summary: Place a simple order (beta) description: | **Beta.** Places a single-leg or multi-leg order using a common request format for equities, equity options, futures, and future options. This endpoint is experimental; breaking changes are possible during the experimental phase. Equity and equity-option orders use the existing brokerage trading capabilities. Futures and future options are currently supported only on tastytrade. Order types, time in force, optional fields, and strategy combinations remain subject to brokerage support. See the [brokerage trading support page](https://support.snaptrade.com/brokerages). An order may contain equity/option legs or future/future_option legs, but cannot mix those two families. Equity/option strategies must share the same underlying symbol. Each strategy is submitted as one brokerage order; unsupported strategies are never split into independent orders. Tastytrade supports single-leg outright futures and up to four future-option legs, and does not support multi-leg market orders. All string choices use lower snake_case and are case-sensitive. Symbols retain their native format: equity tickers, OCC equity-option symbols, or the exact tastytrade BrokerageInstrument ticker for futures and future options, including any spaces. A successful response contains only the brokerage order ID. Use the existing order endpoints to retrieve order details. operationId: Trading_placeSimpleOrder 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 name: userId required: true schema: $ref: "#/components/schemas/UserID" - in: query name: userSecret required: true schema: $ref: "#/components/schemas/UserSecret" requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/SimpleTradeForm" examples: futureStopLimit: summary: Single-leg future stop-limit order value: order_type: stop_limit time_in_force: day client_order_id: "3e8b682d-c901-4b2d-a67f-70f73b04a29e" stop_price: "6000.00" limit_price: "6000.25" legs: - instrument: kind: future symbol: /ESZ6 action: buy units: "1" optionSpread: summary: Equity-option debit spread value: order_type: limit time_in_force: day limit_price: "1.25" price_effect: debit legs: - instrument: kind: option symbol: "AAPL 261218C00200000" action: buy_to_open units: "1" - instrument: kind: option symbol: "AAPL 261218C00210000" action: sell_to_open units: "1" notionalEquity: summary: Equity market order by dollar value value: order_type: market time_in_force: day notional_value: "100.00" legs: - instrument: kind: equity symbol: AAPL action: buy responses: "200": description: Order placed content: application/json: schema: $ref: "#/components/schemas/SimpleTradeResponse" "400": description: Invalid request, unsupported trading feature, or brokerage rejection 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" "404": description: Account not found content: application/json: schema: $ref: "#/components/schemas/404FailedRequestResponse" "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. Option OCO peers must trade the same OCC option symbol with the same closing action and positive whole-contract quantity. On tastytrade, option OCO supports closing an existing long or short option position with one `Limit` order and one `Stop` or `StopLimit` order. Both `PEER` orders must use `SELL_TO_CLOSE` or both must use `BUY_TO_CLOSE`, with `Day` or `GTC` time in force. Opening option OCOs are not supported. On enabled Webull US v3 accounts, option OCO supports closing an existing long option position with one `Limit` take-profit order and one `Stop` stop-loss order. Both `PEER` orders must use `SELL_TO_CLOSE`, `Day`, the same OCC option symbol, and the same positive whole-contract quantity. Webull receives these as `STOP_PROFIT` and `STOP_LOSS` orders sharing a combo ID, without a MASTER order. Opening option OCOs, `BUY_TO_CLOSE`, `StopLimit`, and other option order pairs are not supported on Webull. Equity complex-order behavior is unchanged. 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" "429": $ref: "#/components/responses/TooManyRequests" /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" "429": $ref: "#/components/responses/TooManyRequests" /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 /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: headers: X-RateLimit-Limit: description: Customer-level request allowance for the current window. schema: type: integer example: 250 X-RateLimit-Remaining: description: Customer-level requests left in the current window. 0 on a 429 means this is the limit you hit. schema: type: integer example: 249 X-RateLimit-Reset: description: Seconds until the customer-level window resets. schema: type: integer example: 60 X-RateLimit-Account-Limit: description: Per-account request allowance for the current window. Only sent on account-data endpoints where the account-level limit applies. schema: type: integer example: 10 X-RateLimit-Account-Remaining: description: Per-account requests left in the current window. 0 on a 429 means this is the limit you hit. schema: type: integer example: 9 X-RateLimit-Account-Reset: description: Seconds until the per-account window resets. schema: type: integer example: 60 responses: TooManyRequests: description: | Rate limit exceeded. Check `X-RateLimit-Remaining` (customer-level) and `X-RateLimit-Account-Remaining` (account-level) to see which limit you hit, then wait for the matching `*-Reset` value before retrying. Not every header listed below appears on every operation. The `X-RateLimit-Account-*` headers are sent only where the per-account limit is enforced, and OAuth-authenticated requests never receive the customer-level `X-RateLimit-Limit`, `X-RateLimit-Remaining` or `X-RateLimit-Reset`. A separate per-authenticated-user limit, reported in no `X-RateLimit-*` header, covers OAuth-authenticated requests and signed requests not governed by the customer-level limit; it does not stack on top of that limit. So a 429 can arrive with every reported counter above zero — or with no `X-RateLimit-*` headers at all. Honour `Retry-After` in that case. headers: Retry-After: description: Seconds to wait before retrying. schema: type: integer example: 7 X-RateLimit-Limit: $ref: "#/components/headers/X-RateLimit-Limit" X-RateLimit-Remaining: $ref: "#/components/headers/X-RateLimit-Remaining" X-RateLimit-Reset: $ref: "#/components/headers/X-RateLimit-Reset" X-RateLimit-Account-Limit: $ref: "#/components/headers/X-RateLimit-Account-Limit" X-RateLimit-Account-Remaining: $ref: "#/components/headers/X-RateLimit-Account-Remaining" X-RateLimit-Account-Reset: $ref: "#/components/headers/X-RateLimit-Account-Reset" content: application/json: schema: $ref: "#/components/schemas/429TooManyRequestsResponse" 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 503CurrencyConversionUnavailableResponse: description: Example for a response that failed because exchange rates for the requested currency are unavailable type: object properties: detail: example: Exchange rates for the requested currency are temporarily unavailable. Please try again later. status_code: example: 503 code: example: 1167 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. Only populated for brokerages that expose this data (Tastytrade, eToro, moomoo, Public, and Unlok); `null` for all other brokerages. 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. Only populated for brokerages that expose this data (Tastytrade, eToro, moomoo, Public, and Unlok); `null` for all other brokerages. 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 ConnectionAccountsResponse: description: Accounts under the specified connection. type: object properties: results: type: array description: Accounts returned for the request. items: $ref: "#/components/schemas/ConnectionAccount" required: - results AllUserAccountsResponse: description: Accounts across all of the user's connections. type: object properties: results: type: array description: Accounts returned for the request. items: $ref: "#/components/schemas/ConnectionAccount" required: - results ConnectionAccount: description: | A single account under a connection, from the `kind`-discriminated union used by `Connections_listConnectionAccounts` and `AccountInformation_listAllUserAccounts`. Use `kind` to determine which schema is present. `investment`, `deposit`, and `line_of_credit` are implemented today. oneOf: - $ref: "#/components/schemas/InvestmentAccount" - $ref: "#/components/schemas/DepositAccount" - $ref: "#/components/schemas/LineOfCreditAccount" discriminator: propertyName: kind mapping: investment: "#/components/schemas/InvestmentAccount" deposit: "#/components/schemas/DepositAccount" line_of_credit: "#/components/schemas/LineOfCreditAccount" InvestmentAccount: description: | An investment account under a connection. `opening_date`, `funding_date`, and `net_value` are real-time or cached depending on the caller's plan -- see `Connections_listConnectionAccounts` -- and always cached on `AccountInformation_listAllUserAccounts`. type: object required: - kind - id - connection_id - masked_account_number - sync_status - is_paper properties: kind: type: string description: Discriminator for the account kind. enum: - investment example: investment id: description: Unique identifier for the connected institution account. This is the UUID used to reference the account in SnapTrade. allOf: - $ref: "#/components/schemas/AccountID" connection_id: $ref: "#/components/schemas/BrokerageAuthID" display_name: type: string nullable: true description: A display name for the account. Either assigned by the user or by the institution itself. example: Robinhood Individual masked_account_number: type: string example: "****8443" description: The account number assigned by the institution, masked to the last 4 characters (e.g. `****8443`). institution_account_id: type: string nullable: true example: "54953432" 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 institution account across multiple connections. institution_id: type: string format: uuid description: Unique identifier for the institution that holds the account. example: b6e1a9f0-6e2a-4c37-9b0a-6f1e2d3c4b5a opening_date: type: string format: date-time nullable: true description: Timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format indicating when the account was opened at the institution. Only populated for institutions that expose this data; `null` for all other institutions. See [supported institutions](https://support.snaptrade.com/brokerages) for the full list. example: 2024-07-20T09:30:00.000000Z funding_date: type: string format: date-time nullable: true description: Timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format indicating when the account was funded. Only populated for institutions that expose this data; `null` for all other institutions. See [supported institutions](https://support.snaptrade.com/brokerages) for the full list. example: 2024-07-25T12:00:00.000000Z sync_status: $ref: "#/components/schemas/ConnectionAccountSyncStatus" raw_type: type: string nullable: true description: The account type as provided by the institution. example: Margin cash_or_margin: type: string description: | Whether the account is a cash or margin account, normalized across institutions. - `cash`: The account cannot borrow on margin. Includes registered, retirement and employer plan accounts that can't use margin (for example TFSA, RRSP, 401(k) or ISA). - `margin`: A margin account, including portfolio margin accounts. Some institutions also report retirement accounts with limited margin (for example, trading before funds settle) as margin accounts. - `unknown`: SnapTrade doesn't have enough information to tell, or the distinction doesn't apply to the account (for example crypto accounts). Coverage is limited for Fidelity because its API doesn't report it for every account; Fidelity accounts default to `unknown` where it can't be determined. enum: - cash - margin - unknown example: margin is_paper: type: boolean description: Indicates whether the account is a paper (simulated) trading account. example: false net_value: type: object nullable: true description: Net value of the account -- total market value for investment accounts. Shared across all account kinds -- negative for `line_of_credit` accounts, representing money owed. Null when unknown (e.g. a real-time fetch failed and no cached value exists). properties: amount: type: number nullable: true currency: type: string nullable: true example: amount: 84213.55 currency: USD DepositAccount: description: | A deposit account (checking, savings) under a connection. type: object required: - kind - id - connection_id - masked_account_number - sync_status properties: kind: type: string description: Discriminator for the account kind. enum: - deposit example: deposit id: description: Unique identifier for the connected institution account. This is the UUID used to reference the account in SnapTrade. allOf: - $ref: "#/components/schemas/AccountID" connection_id: $ref: "#/components/schemas/BrokerageAuthID" display_name: type: string nullable: true description: A display name for the account. Either assigned by the user or by the institution itself. example: Chase Total Checking masked_account_number: type: string example: "****4821" description: The account number assigned by the institution, masked to the last 4 characters (e.g. `****4821`). institution_account_id: type: string nullable: true example: "88213092" 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 institution account across multiple connections. institution_id: type: string format: uuid description: Unique identifier for the institution that holds the account. example: a7f0c9d1-2b3e-4f5a-8c6d-9e0f1a2b3c4d opening_date: type: string format: date-time nullable: true description: Timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format indicating when the account was opened at the institution. Only populated for institutions that expose this data; `null` for all other institutions. example: 2018-06-04T00:00:00.000000Z sync_status: $ref: "#/components/schemas/DepositAccountSyncStatus" raw_type: type: string nullable: true description: The account type as provided by the institution. example: CHECKING net_value: type: object nullable: true description: Net value of the account -- cash balance for deposit accounts. Shared across all account kinds -- negative for `line_of_credit` accounts, representing money owed. Null when unknown (e.g. a real-time fetch failed and no cached value exists). properties: amount: type: number nullable: true currency: type: string nullable: true example: amount: 3120.44 currency: USD LineOfCreditAccount: description: | A line-of-credit account (e.g. a credit card) under a connection. type: object required: - kind - id - connection_id - masked_account_number - sync_status properties: kind: type: string description: Discriminator for the account kind. enum: - line_of_credit example: line_of_credit id: description: Unique identifier for the connected institution account. This is the UUID used to reference the account in SnapTrade. allOf: - $ref: "#/components/schemas/AccountID" connection_id: $ref: "#/components/schemas/BrokerageAuthID" display_name: type: string nullable: true description: A display name for the account. Either assigned by the user or by the institution itself. example: Chase Sapphire Preferred masked_account_number: type: string example: "****1881" description: The account number assigned by the institution, masked to the last 4 characters (e.g. `****1881`). institution_account_id: type: string nullable: true example: "77102934" 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 institution account across multiple connections. institution_id: type: string format: uuid description: Unique identifier for the institution that holds the account. example: c8f1d0e2-3c4f-5a6b-9d7e-0f2a3b4c5d6e opening_date: type: string format: date-time nullable: true description: Timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format indicating when the account was opened at the institution. Only populated for institutions that expose this data; `null` for all other institutions. example: 2019-11-15T00:00:00.000000Z sync_status: $ref: "#/components/schemas/LineOfCreditAccountSyncStatus" raw_type: type: string nullable: true description: The account type as provided by the institution. example: CREDIT_CARD net_value: type: object nullable: true description: Net value of the account -- negative, representing money owed. Shared across all account kinds. Null when unknown (e.g. a real-time fetch failed and no cached value exists). properties: amount: type: number nullable: true currency: type: string nullable: true example: amount: -842.17 currency: USD minimum_payment_amount: type: object nullable: true description: The minimum payment due on the account's next statement. Omitted when no such data is available. properties: amount: type: number nullable: true currency: type: string nullable: true example: amount: 40.00 currency: USD available_credit: type: object nullable: true description: The remaining credit available to spend on the account (credit limit less the current balance). Omitted when no such data is available. properties: amount: type: number nullable: true currency: type: string nullable: true example: amount: 4157.83 currency: USD next_payment_date: type: string format: date nullable: true description: The date the account's next payment is due, in `YYYY-MM-DD` format. Omitted when no such data is available. example: "2026-09-25" ConnectionAccountSyncStatus: description: | Contains status updates for the account sync process between SnapTrade and the institution, used by `InvestmentAccount` in `Connections_listConnectionAccounts`. Each property is optional -- an institution may not report sync status for every data type. `orders`/`positions`/`balances` are the timestamp of the last successful sync of that data type (null if never synced). See `DepositAccountSyncStatus`/`LineOfCreditAccountSyncStatus` for the deposit/line-of-credit counterparts, which omit `orders`/`positions` since those account kinds don't place orders or hold positions. type: object properties: transactions: $ref: "#/components/schemas/TransactionsStatus" orders: description: The last time orders were successfully synced by SnapTrade. nullable: true allOf: - $ref: "#/components/schemas/HoldingsSyncStatusDate" positions: description: The last time positions were successfully synced by SnapTrade. nullable: true allOf: - $ref: "#/components/schemas/HoldingsSyncStatusDate" balances: description: The last time balances were successfully synced by SnapTrade. nullable: true allOf: - $ref: "#/components/schemas/HoldingsSyncStatusDate" DepositAccountSyncStatus: description: | Contains status updates for the account sync process between SnapTrade and the institution, used by `DepositAccount` in `Connections_listConnectionAccounts`. Each property is optional -- an institution may not report sync status for every data type. Deposit accounts don't place orders or hold positions, so unlike `ConnectionAccountSyncStatus` this type has no `orders` or `positions` field. `balances` is the timestamp of the last successful sync of that data type (null if never synced). type: object properties: transactions: $ref: "#/components/schemas/TransactionsStatus" balances: description: The last time balances were successfully synced by SnapTrade. nullable: true allOf: - $ref: "#/components/schemas/HoldingsSyncStatusDate" LineOfCreditAccountSyncStatus: description: | Contains status updates for the account sync process between SnapTrade and the institution, used by `LineOfCreditAccount` in `Connections_listConnectionAccounts`. Each property is optional -- an institution may not report sync status for every data type. Line-of-credit accounts don't place orders or hold positions, so like `DepositAccountSyncStatus` this type has no `orders` or `positions` field. `balances` is the timestamp of the last successful sync of that data type (null if never synced). type: object properties: transactions: $ref: "#/components/schemas/TransactionsStatus" balances: description: The last time balances were successfully synced by SnapTrade. nullable: true allOf: - $ref: "#/components/schemas/HoldingsSyncStatusDate" 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. The data may contain gaps and is best used for charting trends, rather than as a complete or exact record of historical account values. 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 required: - price_effect 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. # Konfig drops nullability for inline enums; keep this as a nullable schema reference. nullable: true allOf: - $ref: "#/components/schemas/AccountOrderRecordV2OrderRole" 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 price_currency: description: Price currency code for the order. type: string example: USD price_effect: description: Direction of the net order price. CREDIT means cash is received, DEBIT means cash is paid, EVEN means the net price is zero, and UNKNOWN means the direction could not be determined. type: string enum: - CREDIT - DEBIT - EVEN - UNKNOWN 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" AccountOrderRecordV2OrderRole: description: The role of an order within a complex order group (OCO, OTO, OTOCO). type: string enum: - TRIGGER - CONDITIONAL - PEER example: TRIGGER 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 PartnerStats: description: User, connection, and connected asset totals for your SnapTrade Client ID. type: object required: - total_users - total_connected_users - total_active_connections - total_disabled_connections - oauth_total_users - oauth_total_connected_users - oauth_total_active_connections - oauth_total_disabled_connections - assets_under_management - disabled_assets_under_management - oauth_assets_under_management - oauth_disabled_assets_under_management - assets_under_management_currency - assets_under_management_calculated_at properties: total_users: type: integer description: Number of users registered with your Client ID. example: 19528 total_connected_users: type: integer description: Number of users registered with your Client ID that have at least one connection, active or disabled. example: 2681 total_active_connections: type: integer description: Number of active connections across users registered with your Client ID. example: 2265 total_disabled_connections: type: integer description: Number of disabled connections across users registered with your Client ID. example: 708 oauth_total_users: type: integer nullable: true description: Number of users who have authorized your OAuth application. `null` if your Client ID has no OAuth application. example: null oauth_total_connected_users: type: integer nullable: true description: Number of users who have authorized your OAuth application and have at least one connection, active or disabled. `null` if your Client ID has no OAuth application. example: null oauth_total_active_connections: type: integer nullable: true description: Number of active connections across users who have authorized your OAuth application. `null` if your Client ID has no OAuth application. example: null oauth_total_disabled_connections: type: integer nullable: true description: Number of disabled connections across users who have authorized your OAuth application. `null` if your Client ID has no OAuth application. example: null assets_under_management: type: number format: double nullable: true description: Total latest account value across active connections of users registered with your Client ID, in `assets_under_management_currency`. `null` until the first daily snapshot has been calculated. example: 104900000.0 disabled_assets_under_management: type: number format: double nullable: true description: Total account value across disabled connections of users registered with your Client ID, as of each connection's last sync, in `assets_under_management_currency`. `null` until the first daily snapshot has been calculated. example: 159300000.0 oauth_assets_under_management: type: number format: double nullable: true description: Total latest account value across active connections of users who have authorized your OAuth application, in `assets_under_management_currency`. `null` if your Client ID has no OAuth application, or until the first daily snapshot after it was added. example: null oauth_disabled_assets_under_management: type: number format: double nullable: true description: Total account value across disabled connections of users who have authorized your OAuth application, as of each connection's last sync, in `assets_under_management_currency`. `null` if your Client ID has no OAuth application, or until the first daily snapshot after it was added. example: null assets_under_management_currency: type: string description: ISO 4217 currency code the asset values are expressed in. example: USD assets_under_management_calculated_at: type: string format: date-time nullable: true description: Timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format indicating when the connected asset values were last calculated. `null` until the first daily snapshot has been calculated. example: 2026-10-08T02:47:00.000000Z 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, enable this feature in the [Add-on page of the Customer Dashboard](https://dashboard.snaptrade.com/add-ons) 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" BalanceV2Money: type: object nullable: true description: A monetary amount. Null when the institution doesn't report it. required: - amount - currency properties: amount: type: string format: decimal example: "520692.19" currency: type: string description: ISO-4217 currency code. example: CAD BalanceV2CurrencyAmount: type: object required: - currency - amount properties: currency: type: string description: ISO-4217 currency code. example: USD amount: type: string format: decimal example: "72658.27" AccountBalancesV2Response: description: Balances for a single account, fetched together as one snapshot. type: object required: - account_id - cash_or_margin - net_value - cash - buying_power - margin - data_freshness properties: account_id: $ref: "#/components/schemas/AccountID" cash_or_margin: type: string description: Whether the account is a cash or margin account. Same values as `cash_or_margin` on the [get account details](/reference/Account%20Information/AccountInformation_getAccountDetails) endpoint. enum: - cash - margin - unknown example: margin net_value: allOf: - $ref: "#/components/schemas/BalanceV2Money" description: Total value of the account as reported by the institution, in the account's currency. cash: type: array description: Cash held in the account, one entry per currency. Some institutions allow holding multiple currencies in the same account. items: allOf: - $ref: "#/components/schemas/BalanceV2CurrencyAmount" description: Cash balance in this currency as reported by the institution. May include proceeds from trades that haven't settled yet. Can be negative, for example on a margin account that is borrowing in this currency. buying_power: type: array nullable: true description: | How much the account can spend on new purchases, one entry per currency. Amounts are in different currencies and shouldn't be added together. Null when it can't be determined. - **Cash accounts:** one entry per currency held, never more than the cash in that currency. Each entry is the settled cash available to spend in that currency where the institution reports it; otherwise it's the institution's buying power or cash, which may include proceeds from trades that haven't settled. Check `basis`. - **Margin accounts:** usually a single entry: the institution's buying power for positions held overnight, based on the account's total equity. Buying power for trades opened and closed on the same day can be higher and isn't included. items: type: object required: - currency - amount - basis properties: currency: type: string description: ISO-4217 currency code. example: CAD amount: type: string format: decimal description: Buying power in this currency. Can be negative, for example on a margin account that has exceeded its margin requirement. example: "1208463.36" basis: type: string description: | What the amount may include. - `settled`: settled cash only. Excludes proceeds from sales that haven't settled and cash already committed to purchases that haven't settled, so spending it won't cause a good-faith violation. - `cash`: may include proceeds from trades that haven't settled. - `margin`: may include money borrowed on margin. To avoid good-faith violations on cash accounts, only treat the amount as safe to spend when `basis` is `settled`. enum: - settled - cash - margin example: margin margin: type: object nullable: true description: Margin details. Null when `cash_or_margin` is `cash`; present for `margin` and `unknown` accounts. required: - loan_balances properties: loan_balances: type: array nullable: true description: | The margin debit the institution is charging interest on, one entry per currency owed, as positive amounts. Debits in different currencies are listed separately and are never netted against cash in another currency, because institutions charge interest on each currency's debit. An empty list means the account isn't borrowing. Null when the institution doesn't report it. items: $ref: "#/components/schemas/BalanceV2CurrencyAmount" data_freshness: type: object description: Metadata describing freshness of the returned balances. required: - as_of properties: as_of: type: string format: date-time description: The time the returned data was fetched from the institution. example: 2026-10-15T11:03:35Z example: account_id: 378eb9a5-448b-4fbc-ab61-29d2bcf0ec09 cash_or_margin: margin net_value: amount: "520692.19" currency: CAD cash: - currency: CAD amount: "121610.45" - currency: USD amount: "-72658.27" buying_power: - currency: CAD amount: "1208463.36" basis: margin margin: loan_balances: - currency: USD amount: "72658.27" data_freshness: as_of: 2026-10-15T11:03:35Z 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 and for other instrument kinds when true. A true value means the position is 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; enable via the Customer Dashboard Add-ons page. When enabled, this field is included only for stocks, ADRs, ETFs, mutual funds, and crypto positions. For these positions, an empty list means no tax lot data is available. Availability varies by brokerage and position. This field is omitted for all other instrument kinds or when the feature is disabled. 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/FutureOptionInstrument" - $ref: "#/components/schemas/EtfInstrument" - $ref: "#/components/schemas/MutualFundInstrument" - $ref: "#/components/schemas/CefInstrument" - $ref: "#/components/schemas/AdrInstrument" - $ref: "#/components/schemas/CfdInstrument" - $ref: "#/components/schemas/TokenizedAssetInstrument" - $ref: "#/components/schemas/OtherInstrument" discriminator: propertyName: kind mapping: stock: "#/components/schemas/StockInstrument" option: "#/components/schemas/OptionInstrument" crypto: "#/components/schemas/CryptoInstrument" future: "#/components/schemas/FutureInstrument" future_option: "#/components/schemas/FutureOptionInstrument" etf: "#/components/schemas/EtfInstrument" mutualfund: "#/components/schemas/MutualFundInstrument" cef: "#/components/schemas/CefInstrument" adr: "#/components/schemas/AdrInstrument" cfd: "#/components/schemas/CfdInstrument" tokenized_asset: "#/components/schemas/TokenizedAssetInstrument" bond: "#/components/schemas/OtherInstrument" 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" bond: "#/components/schemas/OtherInstrument" 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" bond: "#/components/schemas/OtherInstrument" other: "#/components/schemas/OtherInstrument" UnderlyingTokenizedAssetInstrument: description: The listed stock or ETF underlying a tokenized asset. oneOf: - $ref: "#/components/schemas/StockInstrument" - $ref: "#/components/schemas/EtfInstrument" discriminator: propertyName: kind mapping: stock: "#/components/schemas/StockInstrument" etf: "#/components/schemas/EtfInstrument" 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: 8cbb2a60-236e-4b67-9e25-a8cf299839f5 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 TokenizedAssetInstrument: description: | Canonical tokenized asset wrapper for a V2 position. Symbol and description duplicate the listed underlying's display metadata for convenience; they are not token-specific identifiers or labels. Currency and exchange metadata are provided only in underlying_instrument. type: object properties: kind: type: string description: Type of security instrument. enum: - tokenized_asset example: tokenized_asset id: type: string format: uuid description: Unique identifier for the canonical tokenized asset wrapper. example: 95a57747-46c6-4c9a-a6cc-b79a491fb95a symbol: type: string description: Display symbol of the underlying stock or ETF, not a token-specific ticker. example: AAPL description: type: string description: Display name of the underlying stock or ETF, when available. example: Apple Inc. underlying_instrument: $ref: "#/components/schemas/UnderlyingTokenizedAssetInstrument" required: - kind - id - 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 deprecated: true description: Deprecated. Crypto instruments are not tied to a listing exchange, so this field is no longer populated and is omitted from responses. It will be removed in a future version. figi_instrument: nullable: true allOf: - $ref: "#/components/schemas/FigiInstrument" required: - kind - id - symbol - raw_symbol OtherInstrument: description: Security instrument metadata for bonds and other mapped security positions. type: object properties: kind: type: string description: Type of security instrument. enum: - bond - 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 FutureOptionInstrument: description: | Future option (option on a futures contract) instrument metadata for a V2 position. **Beta:** currently returned only for tastytrade and Interactive Brokers connections, and only for partners it has been enabled for. This schema may change. type: object properties: kind: type: string description: Type of security instrument. enum: - future_option example: future_option id: type: string format: uuid description: Unique identifier for the future option instrument. example: 5f1c9a76-2c1e-4bfb-9d18-3a2f0f5b6c41 symbol: type: string description: Display symbol for the future option contract. example: ZBZ25 P105 option_type: type: string description: Whether the contract is a call or put. enum: - CALL - PUT example: PUT strike_price: type: string format: decimal description: Strike price for the option contract. example: "105" expiration_date: type: string format: date description: Expiration date of the option contract. example: "2025-11-21" multiplier: type: string format: decimal nullable: true description: Notional multiplier for the option contract. example: "1000" description: type: string nullable: true description: Human-readable description of the option contract. example: 30 Year U.S. Treasury Bond Dec 2025 105 PUT 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: XCBT underlying: $ref: "#/components/schemas/FutureInstrument" required: - kind - id - symbol - option_type - strike_price - expiration_date - underlying 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 locale: description: > Language the connection portal renders in. `en` and `pt-BR` are the languages we ship; any other language is rejected with a 400. Matching is case- and separator-insensitive, so `pt-br`, `pt-BR` and `pt_BR` are equivalent, and a regional tag resolves to the language when we ship it, so `en-US` renders `en`. Deliberately not an enum: those equivalent spellings are all accepted by the API, and an enum would have generated SDKs reject them before the request is sent. Screens without translated copy fall back to English individually. Defaults to `en`. type: string example: pt-BR default: en 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. Share classes and preferred series use SnapTrade's canonical dotted form, for example `HBND.U.TO`, `FTN.PR.A.TO`, and `ECF.PRA`. 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 Institution: description: An institution in SnapTrade's public catalog and what it supports. A `null` field means the information is not documented yet. type: object required: - slug - name - display_name - description - website - logo_url - square_logo_url - release_stage - is_paper - regions - connection properties: slug: description: A short, unique identifier for the institution. It is usually the name in capital letters and will never change. It matches the `slug` of the same brokerage in `GET /brokerages`. type: string example: ALPACA name: description: Full name of the institution. type: string example: Alpaca display_name: description: A display-friendly name of the institution. type: string example: Alpaca description: description: A brief description of the institution. type: string nullable: true example: Alpaca is a commission-free API-first brokerage servicing the USA and beyond. website: description: URL of the institution's website. type: string format: url nullable: true example: https://alpaca.markets/ logo_url: description: URL of the institution's rectangular logo. type: string format: url example: https://passiv-brokerage-logos.s3.ca-central-1.amazonaws.com/alpaca-logo.png square_logo_url: description: URL of the institution's square logo. type: string format: url nullable: true example: https://passiv-brokerage-logos.s3.ca-central-1.amazonaws.com/alpaca-logo-square.png release_stage: description: | How mature the integration is. - `GENERALLY_AVAILABLE`: fully supported and validated for production use. - `BETA`: production-ready, with ongoing validation and improvements. - `ALPHA`: early access with limited validation. Expect issues and incomplete functionality. type: string enum: - GENERALLY_AVAILABLE - BETA - ALPHA example: GENERALLY_AVAILABLE is_paper: description: Whether this is a paper-trading, practice or simulated-trading variant of a brokerage rather than real accounts. Filter these out to list real brokerages only. type: boolean example: false regions: description: | Regions where end users can connect to this institution. - `US`: United States - `CA`: Canada - `EUROPE`: Europe, including the United Kingdom - `AU`: Australia - `IN`: India type: array nullable: true items: type: string enum: - US - CA - EUROPE - AU - IN example: - US connection: nullable: true allOf: - $ref: "#/components/schemas/InstitutionConnection" InstitutionConnection: description: How end users connect to the institution and what the connection allows. type: object required: - methods - scopes properties: methods: description: | Ways an end user can connect. - `OAUTH`: the user signs in on the institution's own site and approves access. - `CREDENTIALS`: the user enters their login details in the SnapTrade Connection Portal. - `API_KEY`: the user creates an API key at the institution and pastes it in. type: array items: type: string enum: - OAUTH - CREDENTIALS - API_KEY example: - OAUTH scopes: description: | What a connection can do. `READ` is always present. - `READ`: read accounts, balances, positions and activity. - `TRADE`: place orders. type: array items: type: string enum: - READ - TRADE example: - READ - TRADE 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: | Indicates the data freshness provided by the institution and by SnapTrade for this connection. The two values are independent; the connection's data is effectively delayed if either value is `delayed`. The "Data freshness" column on the [SnapTrade Institution Support](https://support.snaptrade.com/brokerages) page (Positions & recent orders tab) identifies institutions whose connections are considered delayed on a Real-time plan because either `institution` or `snaptrade` is `delayed`. type: object required: - institution - snaptrade properties: institution: description: | Indicates the freshness of the data provided by the institution. `realtime` means the institution provides current data; `delayed` means the institution itself does not allow intra-day data updates. type: string enum: - realtime - delayed snaptrade: description: | Indicates how SnapTrade retrieves data for this connection. `realtime` means SnapTrade retrieves current data from the institution during API calls. `delayed` means SnapTrade serves cached data, either because the customer's plan uses Daily data or because retrieving live data from the institution is too latency-intensive. When this value is `delayed`, you can request updated data using the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). type: string enum: - realtime - delayed additionalProperties: false example: institution: realtime snaptrade: delayed 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" SimpleTradeDecimal: description: A finite decimal, supplied as a decimal string to preserve precision. type: string format: decimal nullable: true example: "1.25" SimpleTradeInstrument: type: object additionalProperties: false required: - kind - symbol properties: kind: type: string enum: [equity, option, future, future_option] example: future symbol: type: string minLength: 1 description: Equity ticker, OCC equity-option symbol, or exact tastytrade BrokerageInstrument ticker for a future or future option. Future tickers begin with `/`; future-option tickers begin with `./`. Preserve spaces and punctuation. Universal symbol IDs are not accepted. example: /ESZ6 SimpleTradeLeg: type: object additionalProperties: false required: - instrument - action properties: instrument: $ref: "#/components/schemas/SimpleTradeInstrument" action: type: string enum: [buy, sell, buy_to_open, buy_to_close, sell_to_open, sell_to_close] description: Equities and futures require buy or sell. Equity options and future options require buy_to_open, buy_to_close, sell_to_open, or sell_to_close. example: buy units: description: Positive shares or contracts for this leg. Required unless the order is a single-equity market order using notional_value, in which case omit or set to null. Fractional units are supported only for single-equity orders on eligible brokerages; all other legs require whole units. Quantities are absolute units per leg, not strategy ratios. allOf: - $ref: "#/components/schemas/SimpleTradeDecimal" SimpleTradeForm: type: object additionalProperties: false required: - order_type - time_in_force - legs properties: order_type: type: string enum: [limit, market, stop, stop_limit] example: stop_limit time_in_force: type: string enum: [day, gtc, gtd, fok, ioc] description: Order duration, subject to brokerage and execution-path support. gtd requires expiry_date and a non-market single-leg equity/option order. Existing single-leg option routing does not support ioc. Futures and multi-leg orders do not support gtd through this endpoint. example: day legs: type: array minItems: 1 description: Legs of one brokerage order. Use equity/option legs or future/future_option legs, without mixing the two families. Brokerage strategy and leg-count limits apply. items: $ref: "#/components/schemas/SimpleTradeLeg" limit_price: description: Required for limit and stop_limit orders, except that multi-leg price_effect even implies zero. Must be omitted or null for market and stop orders. For multi-leg orders this is the net strategy price. Negative prices are accepted only for futures-family orders, subject to brokerage support. allOf: - $ref: "#/components/schemas/SimpleTradeDecimal" stop_price: description: Required for stop and stop_limit orders. Must be omitted or null for market and limit orders. Must be positive for equity/option orders; futures-family trigger prices are subject to brokerage support. allOf: - $ref: "#/components/schemas/SimpleTradeDecimal" price_effect: type: string nullable: true enum: [credit, debit, even] description: Only applicable to multi-leg limit and stop_limit orders. Requirements and supported values depend on the brokerage; tastytrade requires credit or debit. even implies a zero limit_price, which may be omitted and must be zero if supplied. Single-leg price effects are derived from the action. example: debit client_order_id: allOf: - $ref: "#/components/schemas/ClientOrderID" description: Optional canonical UUID, forwarded where the existing execution path supports it and for tastytrade futures orders. Requires the existing client-order-ID enablement; when disabled the value is ignored. Brokerage behavior on duplicates varies; SnapTrade does not enforce uniqueness. Tastytrade uses this as external-identifier for correlation and does not deduplicate submissions. expiry_date: type: string format: date-time nullable: true description: ISO 8601 expiry timestamp, required for gtd and invalid with other durations. A missing timezone is treated as UTC. Supported only through existing single-leg Public and Sandbox execution paths. example: "2026-12-18T20:00:00Z" notional_value: description: Positive order value, supported only for a single-equity market order on eligible brokerages and partners. Mutually exclusive with leg units. Omit or set units to null when supplied. allOf: - $ref: "#/components/schemas/SimpleTradeDecimal" trading_session: type: string enum: [regular, extended] default: regular description: extended uses existing single-leg equity/option brokerage support and requires extended-hours enablement. Futures and multi-leg orders only accept regular. example: regular SimpleTradeResponse: type: object additionalProperties: false required: - brokerage_order_id properties: brokerage_order_id: type: string description: The brokerage-assigned ID of the submitted order. example: "123456" 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`, unless `price_effect` is `EVEN` - a net-even order is implicitly priced at 0, so the field may be omitted and must be `0` if sent. 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/ActionStrictWithOptions" 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. Use the OCC symbol to replace an option order. 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 order within a complex group. For option OCOs, each peer trades one option contract type. 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/ActionStrictWithOptions" instrument: $ref: "#/components/schemas/TradingInstrument" order_type: $ref: "#/components/schemas/OrderTypeStrict" units: description: A positive whole number of shares or option contracts. Option OCO peers must use the same quantity. type: integer minimum: 1 example: 1 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. When a transaction has an otherwise unresolved brokerage symbol with a long name, SnapTrade appends that name to make the activity identifiable. 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. Share classes and preferred series use SnapTrade's canonical dotted form, for example `HBND.U.TO`, `FTN.PR.A.TO`, and `ECF.PRA`. 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 API-key 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 OAuthWebhookBase: description: The versioned webhook content sent to an authorized OAuth application. type: object additionalProperties: false required: - schemaVersion - webhookId - oauthClientId - eventTimestamp - userId - eventType properties: schemaVersion: type: string enum: - oauth_v1 webhookId: type: string format: uuid example: 06fe1fd7-fc50-43a7-b564-8a2c5f3bab44 oauthClientId: description: The OAuth client ID of the application receiving the webhook. type: string example: portfolio-app eventTimestamp: type: string format: date-time example: 2026-08-18T14:31:55.858820+00:00 userId: description: The SnapTrade Personal user UUID, matching the `sub` claim of the OIDC `id_token` (issued when the `openid` scope is requested) and the deprecated top-level `sub.snaptrade_user_id` field in the OAuth token response. type: string format: uuid example: b5980c55-0071-4b1d-b275-fefc2a497408 eventType: type: string example: CONNECTION_ADDED accountId: type: string format: uuid example: 83d70abb-3d5f-40bb-98b3-d56300f1281b connectionId: type: string format: uuid example: 868470ff-c2df-41de-b082-9d6f1f207daa brokerageId: type: string format: uuid example: 9e0fb25b-4cdd-4841-9507-c8aa19f59d63 connectionAttemptedResult: type: string example: SUCCESS details: type: object additionalProperties: true 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`.