generated: '2026-10-21' method: derived generator: derive-data-model.py source: - openapi/snaptrade-openapi.yml notation: has_one = property $ref; has_many = array of $ref; belongs_to = _id field summary: entities: 153 entities_in_spec: 153 relationships: 137 entities: - name: 400FailedRequestResponse fields: 2 description: Example for failed request response - name: 401FailedRequestResponse fields: 2 description: Example for failed request response - name: 402BrokerageAuthAlreadyDisabledException fields: 2 description: This connection is already disabled. - name: 402BrokerageAuthDisabledResponse fields: 2 description: Cannot perform action because connection is disabled - name: 403FailedRequestResponse fields: 2 description: Example for failed request response - name: 403FeatureNotEnabledResponse fields: 2 description: Example for failed request response - name: 404FailedRequestResponse fields: 2 description: Example for failed request response - name: 425FailedRequestResponse fields: 2 description: Example for failed request response - name: 429TooManyRequestsResponse fields: 3 description: Example for a rate-limited request response - name: 500UnexpectedExceptionResponse fields: 3 description: Example for a response that failed for unexpected reasons - name: 501NotImplementedResponse fields: 1 description: Example for a response where the endpoint is not implemented for the brokerage - name: 503BrokerageRequestResponse fields: 3 description: Example for a response that failed because of an upstream brokerage API failure - name: 503CurrencyConversionUnavailableResponse fields: 3 description: Example for a response that failed because exchange rates for the requested currency are unavailable - name: Account fields: 18 description: A single account at a brokerage. - name: AccountBalance fields: 1 description: Contains balance related information for the account. - name: AccountBalancesV2Response fields: 7 description: Balances for a single account, fetched together as one snapshot. - name: AccountHoldings fields: 4 description: Account Holdings - name: AccountHoldingsAccount fields: 6 description: A wrapper object containing holdings information for a single account. - name: AccountOrderRecord fields: 25 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. - name: AccountOrderRecordLeg fields: 8 description: Describes an individual leg that makes up an order in the V2 format. - name: AccountOrderRecordLegInstrument fields: 5 description: Instrument metadata for an order leg. - name: AccountOrderRecordV2 fields: 15 description: Describes a single order in the standardized V2 format. - name: AccountOrdersV2Response fields: 1 description: Contains a standardized list of account orders in the V2 format. - name: AccountPosition fields: 7 description: Describes a single position. - name: AccountSimple fields: 5 description: A single account at a brokerage. - name: AccountSyncStatus fields: 2 description: Contains status update for the account sync process between SnapTrade and the brokerage. - name: AccountUniversalActivity fields: 17 description: A transaction or activity from an institution - name: AccountValueHistoryItem fields: 2 description: The estimated account value at a specific point in time. - name: AccountValueHistoryResponse fields: 2 description: The response to the account value history endpoint, containing a list of estimated account values at different points in time. - name: AdrInstrument fields: 8 description: Security instrument metadata for ADR positions. - name: AllAccountPositionsResponse fields: 2 description: Information about all account positions. - name: AllUserAccountsResponse fields: 1 description: Accounts across all of the user's connections. - name: Balance fields: 3 description: Holds balance information for a single currency in an account. - name: BalanceV2CurrencyAmount fields: 2 - name: BalanceV2Money fields: 2 description: A monetary amount. Null when the institution doesn't report it. - name: Brokerage fields: 18 description: Describes a brokerage that SnapTrade supports. - name: BrokerageAuthorization fields: 11 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. - name: BrokerageAuthorizationDisabledConfirmation fields: 1 description: Confirmation that the connection has been disabled. - name: BrokerageAuthorizationRefreshConfirmation fields: 1 description: Confirmation that the syncs have been scheduled. - name: BrokerageAuthorizationTransactionsSyncConfirmation fields: 1 description: Confirmation that the transaction syncs have been scheduled. - name: BrokerageAuthorizationTypeReadOnly fields: 4 - name: BrokerageInstrument fields: 5 - name: BrokerageInstrumentsResponse fields: 1 - name: BrokerageType fields: 2 description: Type of brokerage. Currently supports traditional brokerages and crypto exchanges. - name: CancelOrderResponse fields: 2 - name: CefInstrument fields: 8 description: Security instrument metadata for closed-end fund positions. - name: CfdInstrument fields: 8 description: Canonical CFD wrapper instrument metadata for a V2 position. - name: ChildBrokerageOrderIDs fields: 2 - name: ComplexOrderLeg fields: 8 description: A single order within a complex group. For option OCOs, each peer trades one option contract type. - name: ComplexOrderResponse fields: 2 description: Response returned after successfully placing a complex order. AccountOrderRecord rows - name: ConnectedAssetPartnerStats fields: 14 description: User, connection, and connected asset totals for your SnapTrade Client ID. - name: ConnectionAccountSyncStatus fields: 4 description: Contains status updates for the account sync process between SnapTrade and the institution, - name: ConnectionAccountsResponse fields: 1 description: Accounts under the specified connection. - name: CryptoInstrument fields: 8 description: Security instrument metadata for crypto positions. - name: CryptoOrderForm fields: 9 - name: CryptoOrderPreview fields: 1 description: Preview of an order. - name: CryptoTradingInstrument fields: 2 - name: CryptocurrencyPair fields: 4 description: A cryptocurrency pair instrument. - name: CryptocurrencyPairQuote fields: 4 - name: Currency fields: 3 description: Describes a currency object. - name: DeleteConnectionConfirmation fields: 2 description: Confirmation that a task has been scheduled to delete the connection. - name: DeleteUserResponse fields: 3 - name: DepositAccount fields: 11 description: A deposit account (checking, savings) under a connection. - name: DepositAccountSyncStatus fields: 2 description: Contains status updates for the account sync process between SnapTrade and the institution, - name: DividendAtDate fields: 3 - name: EtfInstrument fields: 8 description: Security instrument metadata for ETF positions. - name: Exchange fields: 8 description: Describes a single stock or crypto exchange. - name: ExchangeRatePairs fields: 3 description: The exchange rate of a pair of currencies - name: FigiInstrument fields: 2 description: Financial Instrument Global Identifier (FIGI) information for the security. See [OpenFIGI](https://www.openfigi.com/) for more information. - name: FutureInstrument fields: 9 description: Future instrument metadata for a V2 position. - name: FutureOptionInstrument fields: 11 description: Future option (option on a futures contract) instrument metadata for a V2 position. - name: HoldingsStatus fields: 3 description: 'Status of account holdings sync. SnapTrade syncs holdings from the brokerage under the following conditions:' - name: Institution fields: 11 description: An institution in SnapTrade's public catalog and what it supports. A `null` field means the information is not documented yet. - name: InstitutionConnection fields: 2 description: How end users connect to the institution and what the connection allows. - name: InvestmentAccount fields: 14 description: An investment account under a connection. `opening_date`, - name: LineOfCreditAccount fields: 14 description: A line-of-credit account (e.g. a credit card) under a connection. - name: LineOfCreditAccountSyncStatus fields: 2 description: Contains status updates for the account sync process between SnapTrade and the institution, - name: LoginRedirectURI fields: 2 description: Redirect uri upon successful login - name: ManualTrade fields: 8 description: Contains the details of a submitted order. - name: ManualTradeAndImpact fields: 3 - name: ManualTradeBalance fields: 3 description: Estimated remaining balance of the account after the trade is executed. - name: ManualTradeForm fields: 9 description: Inputs for placing an order with the brokerage. - name: ManualTradeFormBracket fields: 9 description: Inputs for placing an order with the brokerage. - name: ManualTradeFormComplex fields: 3 description: Request body for placing a complex conditional order (OCO, OTO, or OTOCO). - name: ManualTradeFormWithOptions fields: 13 description: Inputs for placing an order with the brokerage. - name: ManualTradeImpact fields: 5 - name: ManualTradeReplaceForm fields: 8 description: Inputs for replacing an order with the brokerage. - name: ManualTradeSymbol fields: 6 description: Information about the security for the order. - name: MlegLeg fields: 3 - name: MlegOrderResponse fields: 2 - name: MlegTradeForm fields: 6 description: Inputs for placing a multi-leg order with the brokerage. - name: MlegTradingInstrument fields: 2 - name: MonthlyDividends fields: 2 - name: MutualFundInstrument fields: 8 description: Security instrument metadata for mutual fund positions. - name: NetContributions fields: 3 - name: NetDividend fields: 3 description: Object representing total dividends received during a timeframe - name: OAuthWebhookBase fields: 11 description: The versioned webhook content sent to an authorized OAuth application. - name: OptionBrokerageSymbol fields: 3 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 acc - name: OptionImpact fields: 3 description: Estimated cash change and fees for an option order before it is placed. - name: OptionInstrument fields: 9 description: Option instrument metadata for a V2 position. - name: OptionLeg fields: 3 description: Option Leg - name: OptionQuote fields: 5 description: Real-time quote for a single option contract. - name: OptionStrategy fields: 5 - name: OptionsPosition fields: 5 description: Describes a single option position in an account. - name: OptionsSymbol fields: 7 description: Uniquely describes an option security + exchange combination across all brokerages. - name: OrderUpdatedResponse fields: 2 - name: OtherInstrument fields: 8 description: Security instrument metadata for bonds and other mapped security positions. - name: PaginatedUniversalActivity fields: 2 description: A paginated list of UniversalActivity objects. - name: PaginationDetails fields: 3 description: Details about the pagination of the results. - name: PartnerData fields: 12 description: Configurations for your SnapTrade Client ID, including allowed brokerages and data access. - name: PartnerStats fields: 14 description: User, connection, and connected asset totals for your SnapTrade Client ID. - name: PastValue fields: 3 - name: PerformanceCustom fields: 19 description: Performance Custom Response Object - name: Position fields: 9 description: Describes a single stock/ETF/crypto/mutual fund position in an account. - name: PositionSymbol fields: 6 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 th - name: RateOfReturnObject fields: 3 description: Individual rate of return object with return percent and timeframe - name: RateOfReturnResponse fields: 1 description: List of return rates with their timeframe - name: RecentOrdersResponse fields: 1 description: List of orders executed within the last 24 hours - name: SecurityType fields: 4 description: The type of security. For example, "Common Stock" or "ETF". - name: SessionEvent fields: 7 - name: SimpleOrderForm fields: 9 - name: SimpleTradeForm fields: 10 - name: SimpleTradeInstrument fields: 2 - name: SimpleTradeLeg fields: 3 - name: SimpleTradeResponse fields: 1 - name: SnapTradeHoldingsAccount fields: 8 description: SnapTradeUser Investment Account - name: SnapTradeHoldingsTotalValue fields: 2 description: This field is deprecated. To get the brokerage reported total market value of the account, please refer to `account.balance.total`. - name: SnapTradeLoginUserRequestBody fields: 9 description: Data to login a user via SnapTrade Partner - name: SnapTradeRegisterUserRequestBody fields: 1 description: Data required to register a user via SnapTrade Partner - name: Status fields: 3 description: Status of API - name: StockInstrument fields: 8 description: Security instrument metadata for stock positions. - name: StopLoss fields: 2 description: Takes in string value for stop_price and limit_price. stop_price is required, limit_price is optional - name: StrategyOrderRecord fields: 11 description: Strategy order record - name: StrategyQuotes fields: 6 - name: SubPeriodReturnRate fields: 3 - name: Symbol fields: 9 description: Uniquely describes a single security + exchange combination across all brokerages. - name: SymbolQuery fields: 1 - name: TakeProfit fields: 1 description: Takes in a string value for limit_price - name: TaxLot fields: 7 description: Describes a single tax lot for a position. - name: TokenizedAssetInstrument fields: 5 description: Canonical tokenized asset wrapper for a V2 position. Symbol and description - name: TradeDetectionCancelSubscriptionResponse fields: 1 - name: TradeDetectionSubscription fields: 3 description: An active Trade Detection subscription for a brokerage account. - name: TradingInstrument fields: 2 - name: TrailingStop fields: 2 description: Trail configuration for trailing stop orders. - name: TransactionsStatus fields: 3 description: 'Status of account transaction sync. SnapTrade syncs transactions from the brokerage under the following conditions:' - name: USExchange fields: 9 description: US Stock Exchange - name: UnderlyingSymbol fields: 10 description: Symbol object for the underlying security of an option. - name: UniversalActivity fields: 18 description: A transaction or activity from an institution - name: UniversalSymbol fields: 10 description: Uniquely describes a single security + exchange combination across all brokerages. - name: UserIDandSecret fields: 2 - name: ValidatedTradeBody fields: 1 - name: WebhookBase fields: 4 description: The API-key webhook content. - name: encryptedResponse fields: 2 description: This response consists of 2 different components that must be decrypted to obtain the decrypted message relationships: - from: AccountSyncStatus to: TransactionsStatus type: has_one via: transactions - from: AccountSyncStatus to: HoldingsStatus type: has_one via: holdings - from: Account to: AccountSyncStatus type: has_one via: sync_status - from: Account to: AccountBalance type: has_one via: balance - from: InvestmentAccount to: Institution type: belongs_to via: institution_id - from: InvestmentAccount to: ConnectionAccountSyncStatus type: has_one via: sync_status - from: DepositAccount to: Institution type: belongs_to via: institution_id - from: DepositAccount to: DepositAccountSyncStatus type: has_one via: sync_status - from: LineOfCreditAccount to: Institution type: belongs_to via: institution_id - from: LineOfCreditAccount to: LineOfCreditAccountSyncStatus type: has_one via: sync_status - from: ConnectionAccountSyncStatus to: TransactionsStatus type: has_one via: transactions - from: DepositAccountSyncStatus to: TransactionsStatus type: has_one via: transactions - from: LineOfCreditAccountSyncStatus to: TransactionsStatus type: has_one via: transactions - from: AccountSimple to: AccountSyncStatus type: has_one via: sync_status - from: TradeDetectionSubscription to: Account type: belongs_to via: account_id - from: AccountHoldings to: SnapTradeHoldingsAccount type: has_one via: account - from: AccountHoldings to: Balance type: has_many via: balances - from: AccountHoldings to: Position type: has_many via: positions - from: AccountHoldings to: SnapTradeHoldingsTotalValue type: has_one via: total_value - from: AccountHoldingsAccount to: Account type: has_one via: account - from: AccountHoldingsAccount to: Balance type: has_many via: balances - from: AccountHoldingsAccount to: Position type: has_many via: positions - from: AccountHoldingsAccount to: OptionsPosition type: has_many via: option_positions - from: AccountHoldingsAccount to: AccountOrderRecord type: has_many via: orders - from: AccountHoldingsAccount to: SnapTradeHoldingsTotalValue type: has_one via: total_value - from: RecentOrdersResponse to: AccountOrderRecord type: has_many via: orders - from: RateOfReturnResponse to: RateOfReturnObject type: has_many via: data - from: AccountOrderRecord to: UniversalSymbol type: has_one via: universal_symbol - from: AccountOrderRecord to: OptionsSymbol type: has_one via: option_symbol - from: AccountOrderRecord to: UniversalSymbol type: has_one via: quote_universal_symbol - from: AccountOrderRecord to: Currency type: has_one via: quote_currency - from: AccountOrderRecord to: TrailingStop type: has_one via: trailing_stop - from: AccountOrderRecord to: ChildBrokerageOrderIDs type: has_one via: child_brokerage_order_ids - from: AccountValueHistoryResponse to: AccountValueHistoryItem type: has_many via: history - from: AccountOrdersV2Response to: AccountOrderRecordV2 type: has_many via: orders - from: AccountOrderRecordV2 to: TrailingStop type: has_one via: trailing_stop - from: AccountOrderRecordV2 to: AccountOrderRecordLeg type: has_many via: legs - from: AccountOrderRecordLeg to: AccountOrderRecordLegInstrument type: has_one via: instrument - from: OptionsPosition to: OptionBrokerageSymbol type: has_one via: symbol - from: OptionsPosition to: Currency type: has_one via: currency - from: OptionStrategy to: UniversalSymbol type: has_one via: underlying_symbol_id - from: OptionStrategy to: UnderlyingSymbol type: belongs_to via: underlying_symbol_id - from: StrategyQuotes to: OptionStrategy type: has_one via: strategy - from: StrategyOrderRecord to: OptionStrategy type: has_one via: strategy - from: SnapTradeHoldingsAccount to: BrokerageAuthorization type: has_one via: brokerage_authorization - from: SnapTradeHoldingsAccount to: AccountSyncStatus type: has_one via: sync_status - from: Balance to: Currency type: has_one via: currency - from: PerformanceCustom to: PastValue type: has_many via: totalEquityTimeframe - from: PerformanceCustom to: NetContributions type: has_one via: contributions - from: PerformanceCustom to: PastValue type: has_many via: contributionTimeframe - from: PerformanceCustom to: PastValue type: has_many via: contributionTimeframeCumulative - from: PerformanceCustom to: PastValue type: has_many via: withdrawalTimeframe - from: PerformanceCustom to: NetDividend type: has_many via: dividends - from: PerformanceCustom to: MonthlyDividends type: has_many via: dividendTimeline - from: PerformanceCustom to: SubPeriodReturnRate type: has_many via: returnRateTimeframe - from: PartnerData to: Brokerage type: has_many via: allowed_brokerages - from: Position to: PositionSymbol type: has_one via: symbol - from: Position to: Currency type: has_one via: currency - from: Position to: TaxLot type: has_many via: tax_lots - from: AccountBalancesV2Response to: Account type: belongs_to via: account_id - from: AccountBalancesV2Response to: BalanceV2Money type: has_one via: net_value - from: AccountBalancesV2Response to: BalanceV2CurrencyAmount type: has_many via: cash - from: AllAccountPositionsResponse to: AccountPosition type: has_many via: results - from: AccountPosition to: TaxLot type: has_many via: tax_lots - from: StockInstrument to: FigiInstrument type: has_one via: figi_instrument - from: AdrInstrument to: FigiInstrument type: has_one via: figi_instrument - from: EtfInstrument to: FigiInstrument type: has_one via: figi_instrument - from: MutualFundInstrument to: FigiInstrument type: has_one via: figi_instrument - from: CefInstrument to: FigiInstrument type: has_one via: figi_instrument - from: CryptoInstrument to: FigiInstrument type: has_one via: figi_instrument - from: OtherInstrument to: FigiInstrument type: has_one via: figi_instrument - from: FutureOptionInstrument to: FutureInstrument type: has_one via: underlying - from: Symbol to: Currency type: has_one via: currency - from: Symbol to: Exchange type: has_one via: exchange - from: Symbol to: SecurityType type: has_one via: type - from: Symbol to: FigiInstrument type: has_one via: figi_instrument - from: Brokerage to: BrokerageType type: has_one via: brokerage_type - from: Institution to: InstitutionConnection type: has_one via: connection - from: BrokerageAuthorization to: Brokerage type: has_one via: brokerage - from: SessionEvent to: BrokerageAuthorization type: belongs_to via: brokerage_authorization_id - from: OptionBrokerageSymbol to: OptionsSymbol type: has_one via: option_symbol - from: PositionSymbol to: UniversalSymbol type: has_one via: symbol - from: ExchangeRatePairs to: Currency type: has_one via: src - from: ExchangeRatePairs to: Currency type: has_one via: dst - from: MonthlyDividends to: DividendAtDate type: has_many via: dividends - from: NetDividend to: UniversalSymbol type: has_one via: symbol - from: ManualTrade to: ManualTradeSymbol type: has_one via: symbol - from: ManualTradeSymbol to: UniversalSymbol type: belongs_to via: universal_symbol_id - from: ManualTradeSymbol to: Currency type: has_one via: currency - from: ManualTradeBalance to: AccountSimple type: has_one via: account - from: ManualTradeBalance to: Currency type: has_one via: currency - from: ManualTradeAndImpact to: ManualTrade type: has_one via: trade - from: ManualTradeAndImpact to: ManualTradeImpact type: has_many via: trade_impacts - from: ManualTradeAndImpact to: ManualTradeBalance type: has_one via: combined_remaining_balance - from: ManualTradeForm to: Account type: belongs_to via: account_id - from: ManualTradeForm to: UniversalSymbol type: belongs_to via: universal_symbol_id - from: SimpleTradeLeg to: SimpleTradeInstrument type: has_one via: instrument - from: SimpleTradeForm to: SimpleTradeLeg type: has_many via: legs - from: MlegTradeForm to: MlegLeg type: has_many via: legs - from: ManualTradeFormWithOptions to: Account type: belongs_to via: account_id - from: ManualTradeFormWithOptions to: UniversalSymbol type: belongs_to via: universal_symbol_id - from: ComplexOrderLeg to: TradingInstrument type: has_one via: instrument - from: ManualTradeFormComplex to: ComplexOrderLeg type: has_many via: orders - from: ManualTradeFormBracket to: TradingInstrument type: has_one via: instrument - from: ManualTradeFormBracket to: StopLoss type: has_one via: stop_loss - from: ManualTradeFormBracket to: TakeProfit type: has_one via: take_profit - from: BrokerageInstrumentsResponse to: BrokerageInstrument type: has_many via: instruments - from: BrokerageInstrument to: UniversalSymbol type: belongs_to via: universal_symbol_id - from: OrderUpdatedResponse to: AccountOrderRecord type: has_one via: order - from: MlegOrderResponse to: AccountOrderRecord type: has_many via: orders - from: PaginatedUniversalActivity to: AccountUniversalActivity type: has_many via: data - from: PaginatedUniversalActivity to: PaginationDetails type: has_one via: pagination - from: AccountUniversalActivity to: Symbol type: has_one via: symbol - from: AccountUniversalActivity to: Symbol type: has_one via: currency_universal_symbol - from: AccountUniversalActivity to: OptionsSymbol type: has_one via: option_symbol - from: AccountUniversalActivity to: Currency type: has_one via: currency - from: UniversalActivity to: AccountSimple type: has_one via: account - from: UniversalActivity to: Symbol type: has_one via: symbol - from: UniversalActivity to: Symbol type: has_one via: currency_universal_symbol - from: UniversalActivity to: OptionsSymbol type: has_one via: option_symbol - from: UniversalActivity to: Currency type: has_one via: currency - from: UniversalSymbol to: Currency type: has_one via: currency - from: UniversalSymbol to: Exchange type: has_one via: exchange - from: UniversalSymbol to: SecurityType type: has_one via: type - from: UniversalSymbol to: FigiInstrument type: has_one via: figi_instrument - from: UniversalSymbol to: Currency type: has_many via: currencies - from: UnderlyingSymbol to: Currency type: has_one via: currency - from: UnderlyingSymbol to: USExchange type: has_one via: exchange - from: UnderlyingSymbol to: SecurityType type: has_one via: type - from: UnderlyingSymbol to: FigiInstrument type: has_one via: figi_instrument - from: UnderlyingSymbol to: Currency type: has_many via: currencies - from: OptionsSymbol to: UnderlyingSymbol type: has_one via: underlying_symbol - from: OAuthWebhookBase to: Account type: belongs_to via: accountId - from: OAuthWebhookBase to: Brokerage type: belongs_to via: brokerageId - from: MlegLeg to: MlegTradingInstrument type: has_one via: instrument - from: SimpleOrderForm to: TradingInstrument type: has_one via: instrument - from: CryptoOrderForm to: CryptoTradingInstrument type: has_one via: instrument