docs: add SnapTrade setup guide - #95
Conversation
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
📝 WalkthroughWalkthroughAdds a SnapTrade provider documentation page covering setup, supported investment and crypto accounts, synchronization, limitations, and troubleshooting. Updates the integrations guide, provider overview, and documentation navigation to reference SnapTrade. ChangesSnapTrade provider documentation
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@guide.mdx`:
- Line 33: Update the SnapTrade discovery entry in guide.mdx at lines 33-33 to
append “(beta)” after the provider link, and update the SnapTrade
heading/description in providers/overview.mdx at lines 34-39 to identify it as
beta, keeping both discovery pages consistent with the dedicated provider page.
In `@providers/snaptrade.mdx`:
- Around line 12-18: Update the SnapTrade setup documentation around the
user-registration flow to explicitly require a Commercial API key, clarifying
that Personal API keys are unsupported for Register User. If Personal support is
intended, document its separate setup flow instead of implying the same
credentials work for both.
- Around line 46-49: Remove the claim that orphaned SnapTrade registrations
consume connection slots at both providers/snaptrade.mdx lines 46-49 and lines
106-110. Clarify that the free-tier limit applies to brokerage connections, and
direct users to delete unused or stale connections first; do not imply that
registrations alone count toward the limit.
- Around line 80-90: Update the “Activity timing” limitation in the SnapTrade
documentation to avoid promising a one-minute completion window. Describe
activity availability as dependent on SnapTrade’s data timing and the connected
brokerage, without asserting that all activity becomes available within a
specific duration.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: f63c1632-9827-4a19-abec-afe0d12697a2
📒 Files selected for processing (4)
docs.jsonguide.mdxproviders/overview.mdxproviders/snaptrade.mdx
| - [Lunch Flow](/providers/lunchflow) | ||
| - [Plaid](/providers/plaid) | ||
| - [SimpleFIN](/providers/simplefin) | ||
| - [SnapTrade](/providers/snaptrade) for brokerage and investment accounts |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Keep SnapTrade’s beta status consistent across discovery pages. The dedicated provider page says SnapTrade is beta, while both discovery entries present it without that qualification.
guide.mdx#L33-L33: add(beta)after the SnapTrade link.providers/overview.mdx#L34-L39: label SnapTrade as beta in the heading/description.
📍 Affects 2 files
guide.mdx#L33-L33(this comment)providers/overview.mdx#L34-L39
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@guide.mdx` at line 33, Update the SnapTrade discovery entry in guide.mdx at
lines 33-33 to append “(beta)” after the provider link, and update the SnapTrade
heading/description in providers/overview.mdx at lines 34-39 to identify it as
beta, keeping both discovery pages consistent with the dedicated provider page.
| Sure uses your SnapTrade **Client ID** and **Consumer Key** to create a per-family SnapTrade user, open the SnapTrade connection portal, and sync the accounts you authorize. | ||
|
|
||
| The flow looks like this: | ||
|
|
||
| 1. Create a SnapTrade app in the SnapTrade dashboard | ||
| 2. Copy the **Client ID** and **Consumer Key** into Sure | ||
| 3. Sure registers a SnapTrade user for your family |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== locate snaptrade docs/provider files =="
fd -i 'snaptrade' . || true
printf '\n== git diff stat =='
git diff --stat || true
printf '\n== inspect snapshot provider doc if present =='
file="$(fd -i 'snaptrade' . | head -n 1 || true)"
if [ -n "${file:-}" ]; then
echo "FILE=$file"
wc -l "$file"
sed -n '1,120p' "$file"
fi
echo '\n== search for SnapTrade setup/Register User/Consumer Key references =='
rg -n "SnapTrade|Snap trade|Consumer Key|Register User|Create User|Client ID|Commercial|Personal" providers docs README.md . -g '*.mdx' -g '*.md' -g '*.tsx' -g '*.ts' || trueRepository: we-promise/docs
Length of output: 16405
🌐 Web query:
SnapTrade personal API key Register User commercial API Register User documentation
💡 Result:
SnapTrade provides two distinct authentication methods, and the necessity of registering a user depends entirely on which method your application uses [1]. Commercial API Key For applications managing multiple end users, you must use the Commercial API key authentication [2][1]. 1. Registration: You must call the Register User endpoint to create each unique end user in the SnapTrade system [3][2][4]. 2. Credentials: Upon registration, SnapTrade returns a user secret, which you must store securely [3][2][4]. 3. API Usage: For all subsequent user-scoped operations (e.g., connecting brokerage accounts, fetching data), you must provide the user's userId and userSecret [3][1]. Personal API Key If you are using a Personal API key to access your own brokerage accounts, you do not use the Register User endpoint [2][1][5]. 1. Registration: Do not call the Register User endpoint [2][5]. 2. Credentials: Do not generate or store a userSecret [2][1][5]. 3. API Usage: Your Personal API key directly identifies your SnapTrade account context [2][1]. Simply omit the userId and userSecret parameters when making API requests, as SnapTrade resolves your identity automatically from your API key [2][1]. Documentation Reference For detailed implementation, consult the official SnapTrade documentation on Authentication Methods [1] and the distinction between Personal and Commercial integrations [2]. The Register User endpoint is documented at the SnapTrade API reference [3].
Citations:
- 1: https://docs.snaptrade.com/docs/authentication-methods
- 2: https://docs.snaptrade.com/docs/personal-vs-commercial
- 3: https://docs.snaptrade.com/reference/Authentication/Authentication_registerSnapTradeUser
- 4: https://docs.snaptrade.com/demo/getting-started
- 5: https://docs.snaptrade.com/docs/launch-guide
Specify that SnapTrade setup requires a Commercial API key.
Registering a SnapTrade user is Commercial-only; Personal API keys do not call Register User. Require a Commercial API key, or document a separate Personal flow.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@providers/snaptrade.mdx` around lines 12 - 18, Update the SnapTrade setup
documentation around the user-registration flow to explicitly require a
Commercial API key, clarifying that Personal API keys are unsupported for
Register User. If Personal support is intended, document its separate setup flow
instead of implying the same credentials work for both.
| - Clean up orphaned SnapTrade registrations that are still consuming connection slots | ||
|
|
||
| <Warning> | ||
| SnapTrade's free tier covers **5 brokerage connections**. If you hit the limit, remove unused connections from Sure or upgrade your SnapTrade plan. |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== files =="
git ls-files | rg '(^|/)snaptrade\.mdx$|(^|/)guide\.mdx$|(^|/)overview\.mdx$|providers/'
echo "== snaptrade relevant lines =="
if [ -f providers/snaptrade.mdx ]; then
cat -n providers/snaptrade.mdx | sed -n '1,140p'
fi
echo "== overview/guide relevant snaps mentions =="
for f in providers/overview.mdx guide.mdx; do
if [ -f "$f" ]; then
echo "-- $f --"
rg -n -i -C 3 'snaptrade|beta|connection|registration|limit' "$f" || true
fi
doneRepository: we-promise/docs
Length of output: 7959
🌐 Web query:
SnapTrade docs terminology registration connection broker connections free tier 5 connections
💡 Result:
In SnapTrade terminology, a connection is an authorized link between a SnapTrade user and a specific brokerage login, which grants access to that user's brokerage account data and, optionally, trading capabilities [1][2]. The terms connection and brokerage authorization are used interchangeably, though connection is the preferred term [3][4]. Regarding the SnapTrade free tier, the platform offers a free plan specifically designed for testing and personal use [5]. This plan supports up to five (5) brokerage connections for a single connected user [5]. Key related concepts include: - Connection Portal: The hosted UI flow that users complete to securely establish, repair, or upgrade their brokerage connections [1][2][6]. - Registration: In commercial integrations, developers must register their own end users within the SnapTrade system to manage their connections [1][7][8]. Conversely, personal API key integrations for individual users do not require separate user registration [1][7][8]. - Disabled Connections: Connections may become disabled if access tokens expire or require re-authorization; in such cases, the user must use the Connection Portal to repair the connection to resume live data access [2][9][4].
Citations:
- 1: https://docs.snaptrade.com/docs/terminology
- 2: https://docs.snaptrade.com/docs/connections
- 3: https://docs.snaptrade.com/reference/Connections/Connections_listBrokerageAuthorizations
- 4: https://docs.snaptrade.com/reference/Connections/Connections_detailBrokerageAuthorization
- 5: https://snaptrade.com/developer-terms-of-use
- 6: https://docs.snaptrade.com/docs/implement-connection-portal
- 7: https://docs.snaptrade.com/docs/authentication-methods
- 8: https://docs.snaptrade.com/docs/launch-guide
- 9: https://docs.snaptrade.com/docs/trading-with-snaptrade
Remove the orphaned-registration capacity claim. SnapTrade's free tier applies to brokerage connections; a registration/user is not counted against the 5-connection limit unless it also owns removed/stale brokerage connections. Update both providers/snaptrade.mdx#L46-L49 and providers/snaptrade.mdx#L106-L110 so users focus on deleting useless connections first.
📍 Affects 1 file
providers/snaptrade.mdx#L46-L49(this comment)providers/snaptrade.mdx#L106-L110
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@providers/snaptrade.mdx` around lines 46 - 49, Remove the claim that orphaned
SnapTrade registrations consume connection slots at both providers/snaptrade.mdx
lines 46-49 and lines 106-110. Clarify that the free-tier limit applies to
brokerage connections, and direct users to delete unused or stale connections
first; do not imply that registrations alone count toward the limit.
| ### 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. | ||
|
|
||
| ## 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**: A fresh connection can take up to about a minute before all activity is fully available in Sure |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== repository files matching snaptrade =="
fd -i 'snaptrade\.mdx|snaptrade' . || true
echo
echo "== relevant doc lines =="
if [ -f providers/snaptrade.mdx ]; then
nl -ba providers/snaptrade.mdx | sed -n '70,100p'
fi
echo
echo "== search for activity timing / SnapTrade delay language in repo =="
rg -n -i "one minute|about a minute|activity timing|delay|SnapTrade|snapTrade|snap trade|snapshot" providers README.md 2>/dev/null || true
echo
echo "== git diff stat/name =="
git diff --stat || true
git diff -- providers/snaptrade.mdx || trueRepository: we-promise/docs
Length of output: 288
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== provider file outline/size =="
wc -l providers/snaptrade.mdx
printf '\n--- lines 60-100 ---\n'
awk 'NR>=60 && NR<=100' providers/snaptrade.mdx
echo
echo "== search timing/delay/SnapTrade in tracked docs =="
rg -n -i "one minute|about a minute|activity timing|delay|SnapTrade|transaction data|brokerage|activity" README.md providers .github 2>/dev/null || true
echo
echo "== git diff stat and affected snippet =="
git diff --stat || true
git diff -- providers/snaptrade.mdx || trueRepository: we-promise/docs
Length of output: 8835
🌐 Web query:
SnapTrade developer terms of use transaction data one-day delay brokerage activity
💡 Result:
Under the SnapTrade Developer Terms of Use, transaction data is provided with a one-day delay [1]. This delay applies to both Real-time and Daily data plans, as transactions are cached and updated once per day [2][3]. Intraday transaction data is not available through the standard transaction endpoints [2][3]. For users who require intraday visibility into their brokerage activity, SnapTrade documentation provides the following guidance: 1. Trade Detection: Partners can utilize the Trade Detection service, which notifies partners when an executed order is detected [4]. This feature is supported for specific brokerages and runs during market hours (typically 9:00 AM to 4:30 PM ET) [4]. 2. Order Comparison: If intraday trade activity is needed, developers are advised to poll the Recent Orders endpoint during market hours, as orders may be available with less latency than the daily-synced transaction data [2][3][5]. 3. Custom Plans: For specific needs regarding the timing of transaction updates, developers can contact the SnapTrade team to discuss a custom plan [2][3]. In summary, while transaction records themselves are subject to a one-day delay, developers can monitor real-time or near-real-time brokerage activity by subscribing to Trade Detection or polling the Recent Orders endpoint [2][5][4].
Citations:
- 1: https://snaptrade.com/developer-terms-of-use
- 2: https://docs.snaptrade.com/docs/syncing
- 3: https://github.com/passiv/snaptrade-sdks/blob/master/docs/syncing.md
- 4: https://docs.snaptrade.com/docs/trade-detection
- 5: https://docs.snaptrade.com/docs/realtime-data
Avoid promising all SnapTrade activity within one minute.
SnapTrade transaction data is provided with a one-day delay and availability varies by brokerage, so saying a fresh connection can take up to about one minute before all activity is fully available can be misleading. Rewrite this as provider/brokerage-dependent activity timing instead.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@providers/snaptrade.mdx` around lines 80 - 90, Update the “Activity timing”
limitation in the SnapTrade documentation to avoid promising a one-minute
completion window. Describe activity availability as dependent on SnapTrade’s
data timing and the connected brokerage, without asserting that all activity
becomes available within a specific duration.
Summary
Testing
Summary by CodeRabbit