Class: Xtb::Http::TradeTransaction
- Defined in:
- lib/xtb/http/trade_transaction.rb
Overview
Constant Summary collapse
- TradeTransactionResponse =
Data.define(:order)
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(cmd:, custom_comment:, expiration:, offset:, order:, price:, stop_loss:, symbol:, take_profit:, type:, volume:) ⇒ TradeTransaction
constructor
A new instance of TradeTransaction.
Methods inherited from Command
Constructor Details
#initialize(cmd:, custom_comment:, expiration:, offset:, order:, price:, stop_loss:, symbol:, take_profit:, type:, volume:) ⇒ TradeTransaction
Returns a new instance of TradeTransaction.
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/xtb/http/trade_transaction.rb', line 20 def initialize(cmd:, custom_comment:, expiration:, offset:, order:, price:, stop_loss:, symbol:, take_profit:, type:, volume:) @cmd = cmd @custom_comment = custom_comment @expiration = expiration @offset = offset @order = order @price = price @stop_loss = stop_loss @symbol = symbol @take_profit = take_profit @type = type @volume = volume super() end |
Instance Method Details
#call ⇒ Object
37 38 39 |
# File 'lib/xtb/http/trade_transaction.rb', line 37 def call TradeTransactionResponse.new(**super.return_data) end |