Skip to main content
SnapTrade is a third-party provider for brokerage connectivity. In Sure, it is focused on investment and crypto accounts rather than checking or credit card accounts. It is a good fit if you want to import holdings, balances, and brokerage activity from supported brokers such as Fidelity, Vanguard, Schwab, and Robinhood without building a custom brokerage integration yourself. See Transaction history and import limits for initial sync defaults, history limits, and options for older transactions.

How it works

Sure uses your SnapTrade Client ID from an OAuth app to create a per-family SnapTrade user and sync the accounts you authorize. Personal API keys are not supported because they do not use SnapTrade’s Register User flow. Sure supports two ways to authorize a brokerage connection, and the setup steps differ slightly between them.

Device code flow

The device code flow (RFC 8628) requires only a Client ID. When you connect a brokerage, Sure displays a short code that you confirm on the SnapTrade website. No redirect URI registration is needed, so this works on any deployment including those that cannot expose a public callback URL.

Authorization code flow (browser redirect)

The browser redirect flow requires a Client ID and a Client Secret, plus the redirect URI https://<your-host>/snaptrade_items/oauth_callback registered on your OAuth app. When you connect a brokerage, you are sent to SnapTrade in the same browser tab and redirected back after approval. Sure prefers the browser redirect when both flows are available, because it is the shorter path for the user. Both flows produce the same access and refresh tokens and result in the same ongoing sync behavior — holdings, activity, and token rotation all work identically after authorization.

Setting up SnapTrade

To connect your brokerage accounts:
  1. Create an account at dashboard.snaptrade.com
  2. Create or open a SnapTrade OAuth app and copy its Client ID
  3. In Sure, go to Settings > Bank sync > SnapTrade
  4. Paste the credentials and click Save Configuration
  5. Click Connect Brokerage and complete the authorization flow
  6. After authorization, open the account setup screen and choose which discovered brokerage accounts to link
If you are using the browser redirect flow, also:
  • Copy the Client Secret from your SnapTrade OAuth app and paste it into the Sure settings alongside the Client ID
  • Register https://<your-host>/snaptrade_items/oauth_callback as a redirect URI on the OAuth app
If you already have an unlinked investment or crypto account in Sure, you can link the SnapTrade account to that existing account instead of creating a duplicate.

Environment variables

Setting only SNAPTRADE_OAUTH_CLIENT_ID enables the device code flow. Setting both variables enables the browser redirect flow as the default, with the device code flow available as a fallback where shown.

Managing connections

SnapTrade connections are managed per family inside Sure. To open the connections panel, click the menu on a SnapTrade account card and select Manage Connections, or go to Settings > Providers > SnapTrade and expand the connections section directly. After your first successful connection, Sure lets you:
  • Add another brokerage connection
  • Review connected brokerages
  • Remove a brokerage connection
  • Delete unused or stale brokerage connections before adding more
SnapTrade’s free tier covers 5 brokerage connections. If you hit the limit, remove unused connections from Sure or upgrade your SnapTrade plan.

Supported account types

Sure currently uses SnapTrade for:
  • Investment accounts
  • Crypto accounts
Brokerage-specific account subtypes such as IRA, Roth IRA, 401(k), TFSA, RRSP, margin, cash, joint, and Cash Management Account (CMA) are mapped into Sure’s investment account model automatically.

Features

Brokerage syncing

  • Brokerage aggregation: Connect supported brokerages through a single provider
  • Holdings sync: Import securities positions and cash balances
  • Activity sync: Import brokerage activity and trade history
  • Multiple brokerages: Connect more than one brokerage under the same SnapTrade configuration
  • Link existing accounts: Attach a discovered SnapTrade account to an existing Sure investment or crypto account

Account setup flow

After authorization, Sure separates discovered SnapTrade accounts into:
  • Linked accounts: Already attached to a Sure account
  • Unlinked accounts: Ready to be linked or created in Sure
This makes it easier to avoid duplicates when you reconnect a brokerage or add another account later.

Activity type coverage

Sure maps the full range of SnapTrade activity types to trades or cash entries: Trade activities (always imported as investment trades): BUY, SELL, REI, REINVEST, OPTION_BUY, OPTION_SELL, OPTIONASSIGNMENT, ASSIGNED, OPTIONEXERCISE, EXERCISED, OPTIONEXPIRATION, EXPIRED, STOCK_DIVIDEND, SPLIT, REVERSE_SPLIT, SPINOFF, and asset transfer variants (EXTERNAL_ASSET_TRANSFER_IN/OUT, INTERNAL_ASSET_TRANSFER_IN/OUT). When SnapTrade supplies an option_symbol object with a ticker, Sure prefers that option ticker (for example, TQQQ 260220C00051000) over the regular symbol, which may identify the underlying equity. OPTION_BUY and OPTION_SELL are imported as trades, but the activity type alone does not supply an option ticker; without one, Sure falls back to the regular symbol data. Fees on option trades are stored separately and factored into realized gain/loss the same way as equity trades. Unit-dependent activities (ADJUSTMENT, STOCK_MERGER, MERGER, CORP_ACTION): imported as trades when SnapTrade reports a non-zero share quantity, and as cash entries when the quantity is absent or zero. This lets zero-cash corporate actions (splits, mergers with no cash consideration) record correctly as unit-only trades while still capturing any cash component when it is present. Cash activities: DIVIDEND, DIV, CONTRIBUTION, WITHDRAWAL, TRANSFER, TRANSFER_IN/OUT, INTERNAL_CASH_TRANSFER_IN/OUT, INTEREST, FEE, TAX, CASH, REBATE, RETURN_OF_CAPITAL, DISTRIBUTION, SUBSTITUTE_DIVIDEND, JOURNAL, OTHER.

Security row disambiguation

A ticker can have more than one security row in Sure’s database when it trades on multiple exchanges. Sure selects a security row in a fixed, deterministic order:
  1. The row from a matching SnapTrade or providerless holding in the account, preserving user remaps and locked cost basis. Holdings from another provider are excluded.
  2. The row matching the exchange SnapTrade reports for the ticker.
  3. Online rows first, then rows with a price provider, then the oldest row.
If the fallback (step 3) applies and more than one candidate exists, Sure records a warning entry in the debug log at Settings > Debug with the ticker, the reported exchange, the chosen row, and each candidate. A single candidate at step 3 does not generate a log entry. This fallback does not establish the correct exchange: it can consistently retain a wrong match that requires manual correction.

Resync reclassification

If a later sync determines an activity should be classified differently (for example, a CORP_ACTION that previously had units is re-fetched without units), Sure reclassifies the entry automatically. Entries that have been manually edited or locked by an import are protected and will not be reclassified; these cases are recorded in the debug log at Settings > Debug.

Option contract support

Sure imports option trades from SnapTrade, including standard and mini-option contracts. When SnapTrade reports an option_symbol alongside a plain symbol, Sure uses the option symbol. This prevents brokerages such as Robinhood, which populate symbol with the underlying equity even on options activity, from importing option trades as common stock. Option contracts are displayed with a formatted name that includes the underlying ticker, strike price, option type, and expiration date. For example: AAPL $150 CALL (2026-01-20). SnapTrade reports option quantity in contracts but quotes price per underlying share. Sure converts the per-share price to a per-contract price by applying the contract multiplier (100 for standard options, 10 for mini-options) so that quantity × price correctly represents total contract value.

Trade amount and fee accuracy

Sure uses SnapTrade’s reported trade amount directly rather than computing it as quantity × price. Brokerage-reported prices are often rounded or estimated, so the computed value can drift by a few cents from the cash that actually moved — most visibly for reinvestments that should match their dividend exactly. When SnapTrade reports a fee for the trade, Sure stores it on the trade record. If a resync omits the fee (SnapTrade only reports it “if provided by the brokerage”), the previously stored value is preserved rather than overwritten. If SnapTrade reports an amount but no price, Sure derives the price from the reported amount, fee, and quantity so the trade can still be imported. These derived-price trades are recorded in the debug log at Settings > Debug so you can inspect them. When a trade cannot be imported — for example because SnapTrade omitted both quantity and amount — it is also recorded in the debug log with the reason, so support can identify the gap without requiring a full sync replay.

Background activity import

Fresh brokerage connections may take a little longer to finish importing activity history. Sure continues fetching account activity in the background after the initial connection when needed.

Security

Sure encrypts sensitive SnapTrade data at rest using ActiveRecord Encryption when encryption keys are configured in your deployment. Configure ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY, ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY, and ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT, or the corresponding Rails encryption credentials, before connecting a SnapTrade integration in a production environment. Without encryption configuration, the fields below are stored in plaintext. The following fields on each SnapTrade account record are encrypted:
  • Account number — encrypted with non-deterministic encryption; never looked up by value, so it does not need to be deterministic
  • Raw API payloads — the raw account, transaction, holdings, activities, and balance payloads returned by SnapTrade
The SnapTrade item credentials (Client ID, Consumer Key, OAuth access token, and OAuth refresh token) are encrypted on the item record separately.

Encrypting existing records

If you configured encryption keys after your initial setup, use the security:backfill_encryption rake task to backfill the supported fields: The backfill covers account_number and raw account, transaction, holdings, and activities payloads. It currently does not backfill raw_balances_payload or SnapTrade item credentials; it is not a complete migration of all existing SnapTrade data.
The task is idempotent and defaults to a dry run. Pass dry_run=false to apply changes:
The task processes records in batches and prints a JSON summary of results when it finishes. See the task description for full argument details.

Limitations

  • Investment-focused: SnapTrade is not the right provider for checking, savings, or credit card syncing
  • Connection caps: Free-tier SnapTrade accounts have limited brokerage connection slots
  • Provider coverage: Only brokerages supported by SnapTrade can be connected
  • Beta maturity: SnapTrade support in Sure is still marked beta in the app
  • Activity timing: Activity availability depends on SnapTrade’s data timing and the connected brokerage
  • Options in holdings: Option positions are not shown in the holdings view; only options activity (trades) is imported

Troubleshooting

Credentials save, but brokerage connection does not start

  • Verify the Client ID was copied from the correct SnapTrade OAuth app
  • If using the browser redirect flow, confirm the Client Secret is also set and the redirect URI is registered
  • Re-open Settings > Bank sync > SnapTrade and save the credentials again
  • Try the Connect Brokerage button again so Sure can re-register the SnapTrade user if needed

Holdings show as empty after connecting a brokerage

SnapTrade deprecated the /positions endpoint for apps registered after their 2026 cutoff. Sure now uses the /positions/all replacement endpoint, so holdings should import correctly for all new and existing connections. If you connected a brokerage before this fix and see no holdings, run a manual sync from the account card to refresh.

No accounts appear after connecting a brokerage

  • Wait for the initial sync to finish and refresh the setup page
  • Check whether the brokerage was connected successfully in Manage Connections
  • Try running another sync from the SnapTrade account card in Sure

Hit the free-tier connection limit

  • Open Manage Connections in Sure and delete old brokerage connections you no longer use
  • Delete unused or stale brokerage connections first; the limit applies to brokerage connections, not registrations alone
  • Upgrade your SnapTrade plan if you need more simultaneous brokerage connections

Device code expires before confirmation

The device code has a limited validity window. If Sure shows “This device code expired. Start the authorization again.”, click the start button to request a fresh code. If Sure shows “SnapTrade hasn’t seen your confirmation yet. Approve the code in SnapTrade, then try again.”, the confirmation is still pending. Approve the code in the SnapTrade app and click the complete button again. If Sure shows “SnapTrade authorization was declined.”, the authorization was rejected. Start a new connection attempt if you want to try again.

API reference

For SnapTrade API details and broker coverage, see the official SnapTrade documentation.