Class: Xtb::Http::TradesHistory

Inherits:
Command
  • Object
show all
Defined in:
lib/xtb/http/trades_history.rb

Overview

Instance Method Summary collapse

Methods inherited from Command

call

Constructor Details

#initialize(end_time, start_time) ⇒ TradesHistory

Returns a new instance of TradesHistory.

Parameters:

  • end_time (Time)
  • start_time (Time)


9
10
11
12
13
14
# File 'lib/xtb/http/trades_history.rb', line 9

def initialize(end_time, start_time)
  @end_time = end_time
  @start_time = start_time

  super()
end

Instance Method Details

#callObject



16
17
18
# File 'lib/xtb/http/trades_history.rb', line 16

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