View as Markdown
Troubleshooting

Sandbox

A simulated brokerage for exercising your integration end-to-end — connection flow, accounts, balances, holdings, orders, and transactions — without a real brokerage login. It returns deterministic data and lets you trigger specific success and failure outcomes.

Getting access

  • Sandbox is available on non-production keys — both personal keys and commercial test keys — and is enabled by default, so there's nothing to request.
  • It is not available on commercial production keys, and can't be enabled on them.
  • In the connection portal it's flagged For testing only — pinned to the top of the institution list on commercial test keys, and shown at the bottom on personal keys.

Sandbox in the connection portal, flagged "For testing only"

Connecting

  1. Generate a Connection Portal URL as usual (loginSnapTradeUser) and use a read connection type. Optionally pass broker=SANDBOX to jump straight past the institution list, skipping step 2.
  2. Select Sandbox.
  3. Pick a scenario to simulate → Connect.

Scenarios

Data — connection succeeds:

  • Self-directed (default) → 2 funded accounts with positions, orders, and transaction history
  • Cash only → 1 cash account, no holdings
  • No transactions → accounts with positions but no activity history
  • No accounts → succeeds but returns zero accounts

Errors — connection fails:

  • Invalid credentials → invalid-credentials error
  • Account locked → account-locked error
  • Rate limited → rate-limit error

What the data covers (data scenarios)

  • Accounts, balances (cash + buying power), and positions across a handful of well-known tickers
  • Orders spanning every status — executed, partially filled, accepted, canceled, rejected
  • Transactions spanning trades, cash & fees, dividends & income, corporate actions, and transfers (see the full list of types below)
  • In the default Self-directed scenario these are spread across the two accounts (e.g. splits & dividends on one, transfers & mergers on the other) — iterate all accounts to see the full set
All transaction types

These are the normalized type values SnapTrade maps real brokerage transactions to (the Sandbox exercises most of them across its data scenarios). The list is not exhaustive: when a brokerage transaction doesn't map to one of these, SnapTrade returns the raw type the brokerage uses, so treat type as open-ended and lean on amount, units, price, and symbol where you can.

CategoryTypeDescription
TradesBUYAsset bought.
TradesSELLAsset sold.
Cash & feesCONTRIBUTIONCash contribution (deposit) into the account.
Cash & feesWITHDRAWALCash withdrawal from the account.
Cash & feesINTERESTInterest deposited into the account.
Cash & feesFEEFee withdrawn from the account.
Cash & feesTAXA tax-related fee.
Cash & feesREBATEA rebate credited to the account.
Dividends & incomeDIVIDENDDividend payout.
Dividends & incomeREIDividend reinvestment.
Dividends & incomeSTOCK_DIVIDENDDividend distributed as shares instead of cash.
Dividends & incomeRETURN_OF_CAPITALReturn of capital distribution.
Dividends & incomeDISTRIBUTIONA distribution paid into the account.
OptionsOPTIONEXPIRATIONOption expiration event.
OptionsOPTIONASSIGNMENTOption assignment event.
OptionsOPTIONEXERCISEOption exercise event.
Corporate actionsSPLITA stock share split.
Corporate actionsREVERSE_SPLITA reverse stock share split.
Corporate actionsSPINOFFShares received from a corporate spinoff.
Corporate actionsSTOCK_MERGERShares resulting from a merger.
Corporate actionsADJUSTMENTA one-time adjustment of the account's cash balance or shares of an asset.
TransfersTRANSFERTransfer of asset(s) from one account to another.
TransfersEXTERNAL_ASSET_TRANSFER_INIncoming transfer of an asset from an external account.
TransfersEXTERNAL_ASSET_TRANSFER_OUTOutgoing transfer of an asset to an external account.
TransfersINTERNAL_CASH_TRANSFER_INIncoming cash transfer between your own accounts.
TransfersINTERNAL_CASH_TRANSFER_OUTOutgoing cash transfer between your own accounts.
TransfersINTERNAL_ASSET_TRANSFER_INIncoming asset transfer between your own accounts.
TransfersINTERNAL_ASSET_TRANSFER_OUTOutgoing asset transfer between your own accounts.

Limitations

  • Read-only — placing/canceling trades isn't supported, and Sandbox won't appear in trade-only connection sessions
  • Data is static and simulated (timestamps are relative to the current time)