Class: QuestradeClient::Client
- Inherits:
-
Object
- Object
- QuestradeClient::Client
- Defined in:
- lib/questrade_client/client.rb
Constant Summary
Constants included from Market
Instance Attribute Summary collapse
-
#endpoint ⇒ Object
readonly
Returns the value of attribute endpoint.
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Client
constructor
A new instance of Client.
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.
39 40 41 42 43 44 |
# File 'lib/questrade_client/client.rb', line 39 def initialize( = {}) @endpoint = [:endpoint].to_s @token = [: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
#endpoint ⇒ Object (readonly)
Returns the value of attribute endpoint.
37 38 39 |
# File 'lib/questrade_client/client.rb', line 37 def endpoint @endpoint end |
#token ⇒ Object (readonly)
Returns the value of attribute token.
37 38 39 |
# File 'lib/questrade_client/client.rb', line 37 def token @token end |