TinkoffInvest (tinkoff_invest v0.1.5) View Source
Convenient functions for frequent use-cases
Link to this section Summary
Functions
Change broker account id. Useful when wanna switch between accounts dynamically.
Change token dynamically without restarting app. Useful when using multiple broker accounts on different clients
Returns API endpoint for current mode
Returns boolean indicating whether logs are enabled or not
Returns current mode
Takes payload from response and returns it, useful for piping
Change mode dynamically.
Enables or disables logging API response via Logger.debug/1
Link to this section Types
Specs
mode() :: :sandbox | :production
Link to this section Functions
Specs
change_account_id(String.t()) :: :ok
Change broker account id. Useful when wanna switch between accounts dynamically.
Specs
change_token(String.t()) :: :ok
Change token dynamically without restarting app. Useful when using multiple broker accounts on different clients
Specs
endpoint() :: String.t()
Returns API endpoint for current mode
Specs
logs_enabled?() :: boolean()
Returns boolean indicating whether logs are enabled or not
Specs
mode() :: mode()
Returns current mode
Specs
payload(TinkoffInvest.Model.Api.Response.t()) :: term()
Takes payload from response and returns it, useful for piping
Specs
Change mode dynamically.
Specs
toggle_logs(boolean()) :: :ok
Enables or disables logging API response via Logger.debug/1
false
by default