The Mercury Treasury API — investment accounts, transactions, and statements.
Summary
Functions
Returns one page of treasury accounts. GET /treasury
Returns one page of statements for a treasury account.
GET /treasury/{id}/statements
Returns one page of transactions for a treasury account. GET /treasury/{id}/transactions
A lazy, auto-paginating stream of every treasury account.
A lazy, auto-paginating stream of every statement for a treasury account.
A lazy, auto-paginating stream of every transaction for a treasury account.
Functions
@spec list(client :: Mercury.Client.t(), opts :: keyword()) :: {:ok, Mercury.Page.t(Mercury.TreasuryAccount.t())} | {:error, Exception.t()}
Returns one page of treasury accounts. GET /treasury
@spec list!(client :: Mercury.Client.t(), opts :: keyword()) :: Mercury.Page.t(Mercury.TreasuryAccount.t())
@spec list_statements( client :: Mercury.Client.t(), account_id :: String.t(), opts :: keyword() ) :: {:ok, Mercury.Page.t(Mercury.TreasuryStatement.t())} | {:error, Exception.t()}
Returns one page of statements for a treasury account.
GET /treasury/{id}/statements
Accepts a :document_type filter in addition to the common list options.
@spec list_statements!( client :: Mercury.Client.t(), account_id :: String.t(), opts :: keyword() ) :: Mercury.Page.t(Mercury.TreasuryStatement.t())
@spec list_transactions( client :: Mercury.Client.t(), account_id :: String.t(), opts :: keyword() ) :: {:ok, Mercury.Page.t(Mercury.TreasuryTransaction.t())} | {:error, Exception.t()}
Returns one page of transactions for a treasury account. GET /treasury/{id}/transactions
@spec list_transactions!( client :: Mercury.Client.t(), account_id :: String.t(), opts :: keyword() ) :: Mercury.Page.t(Mercury.TreasuryTransaction.t())
@spec stream(client :: Mercury.Client.t(), opts :: keyword()) :: Enumerable.t()
A lazy, auto-paginating stream of every treasury account.
@spec stream_statements( client :: Mercury.Client.t(), account_id :: String.t(), opts :: keyword() ) :: Enumerable.t()
A lazy, auto-paginating stream of every statement for a treasury account.
@spec stream_transactions( client :: Mercury.Client.t(), account_id :: String.t(), opts :: keyword() ) :: Enumerable.t()
A lazy, auto-paginating stream of every transaction for a treasury account.