Class: OrderByTWAPCommand

Inherits:
Object
  • Object
show all
Includes:
HasHTTPClient
Defined in:
lib/bitflyer/cli/command/order_by_twap_command.rb

Instance Method Summary collapse

Methods included from HasHTTPClient

#http_private_client, #http_public_client

Methods included from Authorization

#api_key, #api_secret

Instance Method Details

#run(options) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/bitflyer/cli/command/order_by_twap_command.rb', line 6

def run(options)
  type = options.type
  amount = options.amount
  number = options.number_of_times
  interval = options.interval

  number.to_i.times do |_|
    order(type, amount)
    sleep interval
  end
end