Class: OandaAPI::Resource::Order
- Inherits:
-
OandaAPI::ResourceBase
- Object
- OandaAPI::ResourceBase
- OandaAPI::Resource::Order
- Defined in:
- lib/oanda_api/resource/order.rb
Overview
Order value object. See the Oanda Developer Guide for information about Orders.
Defined Under Namespace
Classes: OrderOpened, TradeOpened, TradeReduced
Constant Summary
Constants inherited from OandaAPI::ResourceBase
OandaAPI::ResourceBase::NOT_PLURALIZED
Instance Attribute Summary collapse
-
#expiry ⇒ Object
Returns the value of attribute expiry.
-
#id ⇒ Object
Returns the value of attribute id.
-
#instrument ⇒ Object
Returns the value of attribute instrument.
-
#lower_bound ⇒ Object
Returns the value of attribute lower_bound.
-
#order_opened ⇒ Object
Returns the value of attribute order_opened.
-
#price ⇒ Object
Returns the value of attribute price.
-
#side ⇒ Object
Returns the value of attribute side.
-
#stop_loss ⇒ Object
Returns the value of attribute stop_loss.
-
#take_profit ⇒ Object
Returns the value of attribute take_profit.
-
#time ⇒ Object
Returns the value of attribute time.
-
#trade_opened ⇒ Object
Returns the value of attribute trade_opened.
-
#trade_reduced ⇒ Object
Returns the value of attribute trade_reduced.
-
#trades_closed ⇒ Object
Returns the value of attribute trades_closed.
-
#trailing_stop ⇒ Object
Returns the value of attribute trailing_stop.
-
#type ⇒ Object
Returns the value of attribute type.
-
#units ⇒ Object
Returns the value of attribute units.
-
#upper_bound ⇒ Object
Returns the value of attribute upper_bound.
Attributes inherited from OandaAPI::ResourceBase
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Order
constructor
A new instance of Order.
Methods inherited from OandaAPI::ResourceBase
class_from_symbol, labs_resource?, pluralize, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ Order
Returns a new instance of Order.
24 25 26 27 28 29 30 |
# File 'lib/oanda_api/resource/order.rb', line 24 def initialize(attributes = {}) self.order_opened = {} self.trade_opened = {} self.trade_reduced = {} self.trades_closed = [] super end |
Instance Attribute Details
#expiry ⇒ Object
Returns the value of attribute expiry.
6 7 8 |
# File 'lib/oanda_api/resource/order.rb', line 6 def expiry @expiry end |
#id ⇒ Object
Returns the value of attribute id.
6 7 8 |
# File 'lib/oanda_api/resource/order.rb', line 6 def id @id end |
#instrument ⇒ Object
Returns the value of attribute instrument.
6 7 8 |
# File 'lib/oanda_api/resource/order.rb', line 6 def instrument @instrument end |
#lower_bound ⇒ Object
Returns the value of attribute lower_bound.
6 7 8 |
# File 'lib/oanda_api/resource/order.rb', line 6 def lower_bound @lower_bound end |
#order_opened ⇒ Object
Returns the value of attribute order_opened.
6 7 8 |
# File 'lib/oanda_api/resource/order.rb', line 6 def order_opened @order_opened end |
#price ⇒ Object
Returns the value of attribute price.
6 7 8 |
# File 'lib/oanda_api/resource/order.rb', line 6 def price @price end |
#side ⇒ Object
Returns the value of attribute side.
6 7 8 |
# File 'lib/oanda_api/resource/order.rb', line 6 def side @side end |
#stop_loss ⇒ Object
Returns the value of attribute stop_loss.
6 7 8 |
# File 'lib/oanda_api/resource/order.rb', line 6 def stop_loss @stop_loss end |
#take_profit ⇒ Object
Returns the value of attribute take_profit.
6 7 8 |
# File 'lib/oanda_api/resource/order.rb', line 6 def take_profit @take_profit end |
#time ⇒ Object
Returns the value of attribute time.
6 7 8 |
# File 'lib/oanda_api/resource/order.rb', line 6 def time @time end |
#trade_opened ⇒ Object
Returns the value of attribute trade_opened.
6 7 8 |
# File 'lib/oanda_api/resource/order.rb', line 6 def trade_opened @trade_opened end |
#trade_reduced ⇒ Object
Returns the value of attribute trade_reduced.
6 7 8 |
# File 'lib/oanda_api/resource/order.rb', line 6 def trade_reduced @trade_reduced end |
#trades_closed ⇒ Object
Returns the value of attribute trades_closed.
6 7 8 |
# File 'lib/oanda_api/resource/order.rb', line 6 def trades_closed @trades_closed end |
#trailing_stop ⇒ Object
Returns the value of attribute trailing_stop.
6 7 8 |
# File 'lib/oanda_api/resource/order.rb', line 6 def trailing_stop @trailing_stop end |
#type ⇒ Object
Returns the value of attribute type.
6 7 8 |
# File 'lib/oanda_api/resource/order.rb', line 6 def type @type end |
#units ⇒ Object
Returns the value of attribute units.
6 7 8 |
# File 'lib/oanda_api/resource/order.rb', line 6 def units @units end |
#upper_bound ⇒ Object
Returns the value of attribute upper_bound.
6 7 8 |
# File 'lib/oanda_api/resource/order.rb', line 6 def upper_bound @upper_bound end |