Module: Cryptum::Event::Cancel

Defined in:
lib/cryptum/event/cancel.rb

Class Method Summary collapse

Class Method Details

.helpObject

Display Usage for this Module



28
29
30
31
32
# File 'lib/cryptum/event/cancel.rb', line 28

public_class_method def self.help
  puts "USAGE:
    #{self}.open_orders()
  "
end

.open_orders(opts = {}) ⇒ Object

Supported Method Parameters

Cryptum::Event::Cancel.open_orders( )



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/cryptum/event/cancel.rb', line 10

public_class_method def self.open_orders(opts = {})
  terminal_win = opts[:terminal_win]
  option_choice = opts[:option_choice]
  env = opts[:env]
  # event_history = opts[:event_history]
  # order_type = opts[:order_type]
  # order_action = opts[:order_action]

  terminal_win.key_press_event.key_c = false
  Cryptum::API.cancel_all_open_orders(
    env: env,
    option_choice: option_choice
  )
rescue StandardError => e
  raise e
end