Class: Xtb::Http::Trades

Inherits:
Command show all
Defined in:
lib/xtb/http/trades.rb

Overview

Instance Method Summary collapse

Methods inherited from Command

call

Constructor Details

#initialize(opened_only) ⇒ Trades



8
9
10
11
12
# File 'lib/xtb/http/trades.rb', line 8

def initialize(opened_only)
  @opened_only = opened_only

  super()
end

Instance Method Details

#callObject



14
15
16
# File 'lib/xtb/http/trades.rb', line 14

def call
  super.return_data.map { |record| Xtb::TradeRecord.new(**record) }
end