module QuestradeApi::AccountCall
Public Instance Methods
accounts()
click to toggle source
Fetch all accounts associated with user.
@return [Array<QuestradeApi::REST::Account>]
# File lib/questrade_api/modules/account_call.rb, line 23 def accounts QuestradeApi::REST::Account.fetch(authorization) end
activities(account_id, params = {})
click to toggle source
# File lib/questrade_api/modules/account_call.rb, line 49 def activities(account_id, params = {}) QuestradeApi::REST::Activity.fetch(authorization, account_id, params) end
balances(account_id)
click to toggle source
Fetch all balances associated with account.
@param account_id [String] to which balances will be fetched.
@return [OpenStruct(per_currency_balances)]
# File lib/questrade_api/modules/account_call.rb, line 41 def balances(account_id) QuestradeApi::REST::Balance.fetch(authorization, account_id) end
executions(account_id, params = {})
click to toggle source
# File lib/questrade_api/modules/account_call.rb, line 45 def executions(account_id, params = {}) QuestradeApi::REST::Execution.fetch(authorization, account_id, params) end
orders(account_id, params = {})
click to toggle source
# File lib/questrade_api/modules/account_call.rb, line 53 def orders(account_id, params = {}) QuestradeApi::REST::Order.fetch(authorization, account_id, params) end
positions(account_id)
click to toggle source
Fetch all positions associated with account.
@param account_id [String] to which positions will be fetched.
@return [OpenStruct(accounts: Array<QuestradeApi::REST::Position>)]
# File lib/questrade_api/modules/account_call.rb, line 32 def positions(account_id) QuestradeApi::REST::Position.fetch(authorization, account_id) end
time()
click to toggle source
Fetch current server time.
@return [DateTime] if no issues to call /time endpoint occurs. @return [Faraday::Response] if current server time cannot be fetched.
# File lib/questrade_api/modules/account_call.rb, line 15 def time time = QuestradeApi::REST::Time.new(authorization) time.fetch end