Class: QuestradeClient::Client

Inherits:
Object
  • Object
show all
Includes:
Account, Market, Symbol
Defined in:
lib/questrade_client/client.rb

Constant Summary

Constants included from Market

Market::CANDLESTICK_INTERVALS

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Market

#candles, #markets, #quoteoptions, #quotes, #quotestrategies

Methods included from Symbol

#symboloptions, #symbols, #symbolsearch

Methods included from Account

#accounts, #activities, #balances, #executions, #orders, #positions, #time

Constructor Details

#initialize(options = {}) ⇒ Client

Returns a new instance of Client.

Raises:

  • (ArgumentError)


39
40
41
42
43
44
# File 'lib/questrade_client/client.rb', line 39

def initialize(options = {})
  @endpoint = options[:endpoint].to_s
  @token = options[:token].to_s
  raise ArgumentError, ":endpoint can't be blank" if @endpoint.empty?
  raise ArgumentError, ":token can't be blank" if @token.empty?
end

Instance Attribute Details

#endpointObject (readonly)

Returns the value of attribute endpoint.



37
38
39
# File 'lib/questrade_client/client.rb', line 37

def endpoint
  @endpoint
end

#tokenObject (readonly)

Returns the value of attribute token.



37
38
39
# File 'lib/questrade_client/client.rb', line 37

def token
  @token
end