Class: OandaAPI::Resource::Account
- Inherits:
-
OandaAPI::ResourceBase
- Object
- OandaAPI::ResourceBase
- OandaAPI::Resource::Account
- Defined in:
- lib/oanda_api/resource/account.rb
Overview
Account value object. See the Oanda Developer Guide for information about Accounts.
Instance Attribute Summary collapse
-
#account_currency ⇒ Object
(also: #currency)
Returns the value of attribute account_currency.
-
#account_id ⇒ Object
(also: #id)
Returns the value of attribute account_id.
-
#account_name ⇒ Object
(also: #name)
Returns the value of attribute account_name.
-
#balance ⇒ Object
Returns the value of attribute balance.
-
#margin_available ⇒ Object
Returns the value of attribute margin_available.
-
#margin_rate ⇒ Object
Returns the value of attribute margin_rate.
-
#margin_used ⇒ Object
Returns the value of attribute margin_used.
-
#open_orders ⇒ Object
Returns the value of attribute open_orders.
-
#open_trades ⇒ Object
Returns the value of attribute open_trades.
-
#password ⇒ Object
Returns the value of attribute password.
-
#realized_pl ⇒ Object
Returns the value of attribute realized_pl.
-
#unrealized_pl ⇒ Object
Returns the value of attribute unrealized_pl.
-
#username ⇒ Object
Returns the value of attribute username.
Attributes inherited from OandaAPI::ResourceBase
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Account
constructor
A new instance of Account.
Methods inherited from OandaAPI::ResourceBase
Constructor Details
#initialize(attributes = {}) ⇒ Account
Returns a new instance of Account.
30 31 32 33 34 |
# File 'lib/oanda_api/resource/account.rb', line 30 def initialize(attributes = {}) @open_orders = [] @open_trades = [] super end |
Instance Attribute Details
#account_currency ⇒ Object Also known as: currency
Returns the value of attribute account_currency.
7 8 9 |
# File 'lib/oanda_api/resource/account.rb', line 7 def account_currency @account_currency end |
#account_id ⇒ Object Also known as: id
Returns the value of attribute account_id.
7 8 9 |
# File 'lib/oanda_api/resource/account.rb', line 7 def account_id @account_id end |
#account_name ⇒ Object Also known as: name
Returns the value of attribute account_name.
7 8 9 |
# File 'lib/oanda_api/resource/account.rb', line 7 def account_name @account_name end |
#balance ⇒ Object
Returns the value of attribute balance.
7 8 9 |
# File 'lib/oanda_api/resource/account.rb', line 7 def balance @balance end |
#margin_available ⇒ Object
Returns the value of attribute margin_available.
7 8 9 |
# File 'lib/oanda_api/resource/account.rb', line 7 def margin_available @margin_available end |
#margin_rate ⇒ Object
Returns the value of attribute margin_rate.
7 8 9 |
# File 'lib/oanda_api/resource/account.rb', line 7 def margin_rate @margin_rate end |
#margin_used ⇒ Object
Returns the value of attribute margin_used.
7 8 9 |
# File 'lib/oanda_api/resource/account.rb', line 7 def margin_used @margin_used end |
#open_orders ⇒ Object
Returns the value of attribute open_orders.
7 8 9 |
# File 'lib/oanda_api/resource/account.rb', line 7 def open_orders @open_orders end |
#open_trades ⇒ Object
Returns the value of attribute open_trades.
7 8 9 |
# File 'lib/oanda_api/resource/account.rb', line 7 def open_trades @open_trades end |
#password ⇒ Object
Returns the value of attribute password.
7 8 9 |
# File 'lib/oanda_api/resource/account.rb', line 7 def password @password end |
#realized_pl ⇒ Object
Returns the value of attribute realized_pl.
7 8 9 |
# File 'lib/oanda_api/resource/account.rb', line 7 def realized_pl @realized_pl end |
#unrealized_pl ⇒ Object
Returns the value of attribute unrealized_pl.
7 8 9 |
# File 'lib/oanda_api/resource/account.rb', line 7 def unrealized_pl @unrealized_pl end |
#username ⇒ Object
Returns the value of attribute username.
7 8 9 |
# File 'lib/oanda_api/resource/account.rb', line 7 def username @username end |