View Source Plaid.Investments (elixir_plaid v1.2.1)
Link to this section Summary
Functions
Get user-authorized stock position data for investment-type accounts.
Get information about all available investment transactions.
Link to this section Functions
Specs
get_holdings(String.t(), options, Plaid.config()) :: {:ok, Plaid.Investments.GetHoldingsResponse.t()} | {:error, Plaid.Error.t()} when options: %{optional(:account_ids) => [String.t()]}
Get user-authorized stock position data for investment-type accounts.
Does a POST /investments/holdings/get
call to retrieve
invesment holdings associated with an access_token's item.
Params:
access_token
- Token to fetch investment holdings for.
Options:
:account_ids
- Specific account ids to fetch investment holdings for.
examples
Examples
Investments.get_holdings("access-sandbox-123xxx", client_id: "123", secret: "abc")
{:ok, %Investments.GetHoldingsResponse{}}
Link to this function
get_transactions(access_token, start_date, end_date, options \\ %{}, config)
View SourceSpecs
get_transactions(String.t(), String.t(), String.t(), options, Plaid.config()) :: {:ok, Plaid.Investments.GetTransactionsResponse.t()} | {:error, Plaid.Error.t()} when options: %{ optional(:account_ids) => [String.t()], optional(:count) => integer(), optional(:offset) => integer() }
Get information about all available investment transactions.
Does a POST /investments/transactions/get
call which gives you high level
account data along with investment transactions and associated securities
from all investment accounts contained in the access_token's item.
Params:
access_token
- Token to fetch investment holdings for.start_date
- Start of query for investment transactions.end_date
- End of query for investment transactions.
Options:
:account_ids
- Specific account ids to fetch investment holdings for.:count
- Amount of investment transactions to pull (optional).:offset
- Offset to start pulling investment transactions (optional).
examples
Examples
Investments.get_transactions("access-sandbox-123xxx", "2020-01-01", "2020-01-31", client_id: "123", secret: "abc")
{:ok, %Investments.GetTransactionsResponse{}}