DriveWealth API v0.4.0 DriveWealth.Report View Source

Documentation for DriveWealth Reports, see http://developer.drivewealth.com “REPORTS” section for more documentation.

Link to this section Summary

Functions

Get a financial transaction in JSON format (http://developer.drivewealth.com/docs/financial-transaction)

Link to this section Functions

Link to this function financial_transaction(session_key, account_number, date_start, date_end, opts \\ %{"ReportFormat" => "JSON"}) View Source
financial_transaction(String.t(), String.t(), String.t(), String.t(), Map.t()) ::
  {:ok, Map.t()} |
  {:ok, String.t()} |
  {:error, String.t()} |
  {:error, Map.t()}

Get a financial transaction in JSON format (http://developer.drivewealth.com/docs/financial-transaction)

Parameters

  • session_key: String that represents the name username.
  • account_number: String that represents the name password
  • date_start: String representing the beginning of the data range in UTC format.
  • date_end: String representing the end of the data range in UTC format.
  • opts: Map with options, look http://developer.drivewealth.com/docs/financial-transaction

Examples

iex> DriveWealth.Report.financial_transaction("session_id", "account_number", "date_start", "date_end")
{:ok, %{"accountID" => "52284319-70d5-45DD-a154-ba6c285c85dd.1501649806183",
         "accountNo" => "DWT100000", "accountType" => "2",
         "dateRange" => "2017-12-10T23:59:59.999Z,2017-12-30T23:59:59.999Z",
         "transaction" => [
           %{"accountAmount" => 1639, "accountBalance" => 1777.13,
            "comment" => "WIRE DEPOSIT", "currencyID" => "USD", "dnb" => false,
            "finTranID" => "EL.a28ae64d-fb9b-4d31-a71c-2a1edc251cb0",
            "finTranTypeID" => "CSR", "systemAmount" => 0, "tranAmount" => 1639,
            "tranWhen" => "2017-12-12T14:23:42.568Z", "wlpAmount" => 0,
            "wlpFinTranTypeID" => "5f2a5b20-4de3-43a8-94b2-b7e341003d19"}
             ]
           }
         }

iex> DriveWealth.Report.financial_transaction("session_id_invalid", "account_number", "date_start", "date_end")
{:error, "Invalid Session."}
Link to this function financial_transaction!(session_key, account_number, date_start, date_end, opts \\ %{"ReportFormat" => "JSON"}) View Source

Get the financial_transaction or return an :error