Class: Xtb::Http::TickPrices

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

Overview

Constant Summary collapse

TickRecord =
Data.define(:ask, :ask_volume, :bid, :bid_volume, :high, :level, :low, :spread_raw, :spread_table,
:symbol, :timestamp)

Instance Method Summary collapse

Methods inherited from Command

call

Constructor Details

#initialize(level, symbols, timestamp) ⇒ TickPrices

Returns a new instance of TickPrices.



10
11
12
13
14
15
16
# File 'lib/xtb/http/tick_prices.rb', line 10

def initialize(level, symbols, timestamp)
  @level = level
  @symbols = symbols
  @timestamp = timestamp

  super()
end

Instance Method Details

#callObject



18
19
20
# File 'lib/xtb/http/tick_prices.rb', line 18

def call
  super.return_data[:quotations].map { |record| TickRecord.new(**record) }
end