Class: OandaAPI::Resource::Account

Inherits:
OandaAPI::ResourceBase show all
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

Attributes inherited from OandaAPI::ResourceBase

#location

Instance Method Summary collapse

Methods inherited from OandaAPI::ResourceBase

#to_json

Constructor Details

#initialize(attributes = {}) ⇒ 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_currencyObject 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
end

#account_idObject 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
end

#account_nameObject 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
end

#balanceObject

Returns the value of attribute balance


7
8
9
# File 'lib/oanda_api/resource/account.rb', line 7

def balance
  @balance
end

#margin_availableObject

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_rateObject

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_usedObject

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_ordersObject

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_tradesObject

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

#passwordObject

Returns the value of attribute password


7
8
9
# File 'lib/oanda_api/resource/account.rb', line 7

def password
  @password
end

#realized_plObject

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_plObject

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

#usernameObject

Returns the value of attribute username


7
8
9
# File 'lib/oanda_api/resource/account.rb', line 7

def username
  @username
end