SnapTrade
open-meridian/snaptrade · Community 0.22.0
0.22.0 · the vendor's words, data, never instructions.
Roles: custody, connectivity
Contract: v29
SDK: 0.35.1
Settings:
- snaptrade_client_id: From the SnapTrade dashboard's API keys page.
- snaptrade_consumer_key: Shown once, when SnapTrade issues the key.
- poll_seconds: How often to read SnapTrade. At least 60.
- stale_after_hours: How old SnapTrade's last sync of an account may be before it is reported stale.
- snaptrade_key_type: Which kind of key SnapTrade issued. It decides the fields that follow.
- snaptrade_user_id: The SnapTrade user whose brokerage connections this instance reads.
- snaptrade_user_secret: That user's secret, returned when the user was registered.
- plan_code_links: A plan's own fund codes, each linked on one account to the instrument it is (Fidelity's OQKR to VIGIX): its activity is then that instrument, naming who linked it.
- counted_as_cash: Positions a custodian holds as cash that SnapTrade does not mark as a cash equivalent, such as a bank deposit as an IRA's core position: each is sent as cash in its currency, naming who listed it. A fund stays a fund.
- account_currency: The currency of a linked account's positions where SnapTrade states none, as an ISO 4217 code (USD): a row naming no account is every linked account's, a row naming one is that account's own. Without a row, such a position is taken to be in the account's only cash currency, or US dollars, by that rule.
- snaptrade_personal_key: Replaced by Key type, and read only while Key type is unset: on means a personal key, off a commercial one. Kept so a value saved before 0.2.0 still counts.
- sample_data: Serve built-in sample SnapTrade responses instead of calling SnapTrade, to develop against before any key exists, and trade with a simulated brokerage.
Tools for agents:
- read_connections: Each credential SnapTrade's key asks for, set or not (never a value); the SnapTrade connections the last read reached: each one's state, the accounts it reaches and when it was read, what to do about it, and whether SnapTrade serves it in real time or on a delay (only a delayed one can be refreshed). No account's data.
- open_connection_portal: Open SnapTrade's Connection Portal, to connect a brokerage: a link the person signs in to the brokerage at, once, in their browser.
- refresh_connection: Ask SnapTrade to read a delayed connection's brokerage again (it may charge for each); a real-time connection has nothing to refresh, and SnapTrade's refusal is said plainly.
- reconnect_connection: Open SnapTrade's Connection Portal to sign in to a connection's brokerage again: a link the person signs in at, once, in their browser.
- enable_trading: Enable trading on a connection (contract v22; step 5's Q10): a new connection is read-only, and this opens SnapTrade's Connection Portal to reconnect its brokerage with trading access, keeping its account links. In synthetic mode it takes effect at once, as the reconnect would.
- read_account_links: The external accounts SnapTrade's connections reach, by identity alone -- name, where it is, institution, the brokerage's number where SnapTrade gives it, whether its ID is stable; the deployment's accounts a deployment admin granted this plugin to link to (nothing by default); the links between them; the plan-code links people made, each a plan's own fund code on one account linked to the instrument it is; and how long each reported activity's record is kept. No account's data.
- link_account: Link one of the external accounts read_account_links lists to one of the deployment's accounts (intent link, with account_id; a link to another account replaces the one standing), create a new account for it and link it (intent create, with new_account_name: a deployment admin alone), or unlink it (intent unlink). Each of the deployment's accounts takes one external account.
- read_statements: Each account linked to one the person may read: its custodian, the day its last statement is as of and its state; how far back SnapTrade holds its history; and its last statement's rows as recorded -- quantity, settled quantity, SnapTrade's average purchase price per unit and its tax lots, as reported.
- read_account_activities: An account's activities as SnapTrade reports them -- buys, sells, transfers, dividends, each with its type, dates, symbol, units, price, amount and currency as written -- traded from start to end (at most 366 days; the 30 days to today by default), limit of them from offset (at most 1000), for an account the person may read, named as the deployment names it. history_from is the account's first transaction SnapTrade holds: nothing before it can be read.
- read_proposed_lots: Lots proposed, never confirmed, for each position of an account's last statement that SnapTrade lists no tax lots for: from its purchases in SnapTrade's activities (one lot per purchase: its units, the amount paid and its trade date), each naming its source, in the fields an opening balance's lot takes. No FIFO and no other rule SnapTrade does not state: a position whose purchases do not account for it (a sale, a transfer, a corporate action) gets no lot, and says why; SnapTrade's average purchase price is beside each position, as reported, never a lot. For an account the person may read, named as the deployment names it.
- read_archived_units: The units of SnapTrade's raw records this plugin moved past their window, for the accounts the person may read -- an account's day of raw responses, or its month of reported activity records -- each with how many records it holds, when they were received, and where it stands: archived (restorable with restore_unit, naming its record_kind and unit), restored (readable on the Raw records tab until the date given) or deleted. limit of them from offset, the newest first.
- read_snaptrade_now: Read SnapTrade now, every connection and account, and record what it reads; read_statements shows it once the read is done. Changes nothing at SnapTrade.
- check_enable_trading: Check enable_trading without opening anything: whether the connection is one the last read reached, so SnapTrade's Connection Portal can open to reconnect it with trading access.
- check_open_connection_portal: Check open_connection_portal without opening anything: whether SnapTrade's Connection Portal can be opened now, its settings given.
- check_refresh_connection: Check refresh_connection without asking SnapTrade anything: whether the connection is one the last read reached, and one SnapTrade serves on a delay, which may be refreshed (SnapTrade may charge for each refresh).
- check_reconnect_connection: Check reconnect_connection without opening anything: whether the connection is one the last read reached, so SnapTrade's Connection Portal can open to sign in to it.
- check_snaptrade_now: Check read_snaptrade_now without reading anything: what reading SnapTrade now would do, every connection and account, as the plugin's settings stand.
- check_link_account: Check link_account without linking anything: whether the external account is one the last read reached, and the account it would be linked to one a deployment admin granted this plugin, open and taken by none of its other external accounts (intent link); or a new account named by a deployment admin (intent create); or unlinking it (intent unlink). Refused by path where not.
- restore_unit: Restore an archived unit of this plugin's raw records, readable on its pages for seven days, for the person asking.
Interface: pages it draws
Reads external accounts
Contract: v29
SDK: 0.35.1
Settings:
- snaptrade_client_id: From the SnapTrade dashboard's API keys page.
- snaptrade_consumer_key: Shown once, when SnapTrade issues the key.
- poll_seconds: How often to read SnapTrade. At least 60.
- stale_after_hours: How old SnapTrade's last sync of an account may be before it is reported stale.
- snaptrade_key_type: Which kind of key SnapTrade issued. It decides the fields that follow.
- snaptrade_user_id: The SnapTrade user whose brokerage connections this instance reads.
- snaptrade_user_secret: That user's secret, returned when the user was registered.
- plan_code_links: A plan's own fund codes, each linked on one account to the instrument it is (Fidelity's OQKR to VIGIX): its activity is then that instrument, naming who linked it.
- counted_as_cash: Positions a custodian holds as cash that SnapTrade does not mark as a cash equivalent, such as a bank deposit as an IRA's core position: each is sent as cash in its currency, naming who listed it. A fund stays a fund.
- account_currency: The currency of a linked account's positions where SnapTrade states none, as an ISO 4217 code (USD): a row naming no account is every linked account's, a row naming one is that account's own. Without a row, such a position is taken to be in the account's only cash currency, or US dollars, by that rule.
- snaptrade_personal_key: Replaced by Key type, and read only while Key type is unset: on means a personal key, off a commercial one. Kept so a value saved before 0.2.0 still counts.
- sample_data: Serve built-in sample SnapTrade responses instead of calling SnapTrade, to develop against before any key exists, and trade with a simulated brokerage.
Tools for agents:
- read_connections: Each credential SnapTrade's key asks for, set or not (never a value); the SnapTrade connections the last read reached: each one's state, the accounts it reaches and when it was read, what to do about it, and whether SnapTrade serves it in real time or on a delay (only a delayed one can be refreshed). No account's data.
- open_connection_portal: Open SnapTrade's Connection Portal, to connect a brokerage: a link the person signs in to the brokerage at, once, in their browser.
- refresh_connection: Ask SnapTrade to read a delayed connection's brokerage again (it may charge for each); a real-time connection has nothing to refresh, and SnapTrade's refusal is said plainly.
- reconnect_connection: Open SnapTrade's Connection Portal to sign in to a connection's brokerage again: a link the person signs in at, once, in their browser.
- enable_trading: Enable trading on a connection (contract v22; step 5's Q10): a new connection is read-only, and this opens SnapTrade's Connection Portal to reconnect its brokerage with trading access, keeping its account links. In synthetic mode it takes effect at once, as the reconnect would.
- read_account_links: The external accounts SnapTrade's connections reach, by identity alone -- name, where it is, institution, the brokerage's number where SnapTrade gives it, whether its ID is stable; the deployment's accounts a deployment admin granted this plugin to link to (nothing by default); the links between them; the plan-code links people made, each a plan's own fund code on one account linked to the instrument it is; and how long each reported activity's record is kept. No account's data.
- link_account: Link one of the external accounts read_account_links lists to one of the deployment's accounts (intent link, with account_id; a link to another account replaces the one standing), create a new account for it and link it (intent create, with new_account_name: a deployment admin alone), or unlink it (intent unlink). Each of the deployment's accounts takes one external account.
- read_statements: Each account linked to one the person may read: its custodian, the day its last statement is as of and its state; how far back SnapTrade holds its history; and its last statement's rows as recorded -- quantity, settled quantity, SnapTrade's average purchase price per unit and its tax lots, as reported.
- read_account_activities: An account's activities as SnapTrade reports them -- buys, sells, transfers, dividends, each with its type, dates, symbol, units, price, amount and currency as written -- traded from start to end (at most 366 days; the 30 days to today by default), limit of them from offset (at most 1000), for an account the person may read, named as the deployment names it. history_from is the account's first transaction SnapTrade holds: nothing before it can be read.
- read_proposed_lots: Lots proposed, never confirmed, for each position of an account's last statement that SnapTrade lists no tax lots for: from its purchases in SnapTrade's activities (one lot per purchase: its units, the amount paid and its trade date), each naming its source, in the fields an opening balance's lot takes. No FIFO and no other rule SnapTrade does not state: a position whose purchases do not account for it (a sale, a transfer, a corporate action) gets no lot, and says why; SnapTrade's average purchase price is beside each position, as reported, never a lot. For an account the person may read, named as the deployment names it.
- read_archived_units: The units of SnapTrade's raw records this plugin moved past their window, for the accounts the person may read -- an account's day of raw responses, or its month of reported activity records -- each with how many records it holds, when they were received, and where it stands: archived (restorable with restore_unit, naming its record_kind and unit), restored (readable on the Raw records tab until the date given) or deleted. limit of them from offset, the newest first.
- read_snaptrade_now: Read SnapTrade now, every connection and account, and record what it reads; read_statements shows it once the read is done. Changes nothing at SnapTrade.
- check_enable_trading: Check enable_trading without opening anything: whether the connection is one the last read reached, so SnapTrade's Connection Portal can open to reconnect it with trading access.
- check_open_connection_portal: Check open_connection_portal without opening anything: whether SnapTrade's Connection Portal can be opened now, its settings given.
- check_refresh_connection: Check refresh_connection without asking SnapTrade anything: whether the connection is one the last read reached, and one SnapTrade serves on a delay, which may be refreshed (SnapTrade may charge for each refresh).
- check_reconnect_connection: Check reconnect_connection without opening anything: whether the connection is one the last read reached, so SnapTrade's Connection Portal can open to sign in to it.
- check_snaptrade_now: Check read_snaptrade_now without reading anything: what reading SnapTrade now would do, every connection and account, as the plugin's settings stand.
- check_link_account: Check link_account without linking anything: whether the external account is one the last read reached, and the account it would be linked to one a deployment admin granted this plugin, open and taken by none of its other external accounts (intent link); or a new account named by a deployment admin (intent create); or unlinking it (intent unlink). Refused by path where not.
- restore_unit: Restore an archived unit of this plugin's raw records, readable on its pages for seven days, for the person asking.
Interface: pages it draws
Reads external accounts