Sha256: 5ce2695a17f5bc5c63f9f9b291ed7cf0b3b0101e8d1019d93cb86632975d3f57

Contents?: true

Size: 952 Bytes

Versions: 6

Compression:

Stored size: 952 Bytes

Contents

# frozen_string_literal: true

module Cryptum
  # This plugin is used to Reload the Bot Conf When the "C" Key is Pressed
  module Event
    module Cancel
      # Supported Method Parameters::
      # Cryptum::Event::Cancel.open_orders(
      # )
      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::Orders.cancel_all_open_orders(
          env: env,
          option_choice: option_choice
        )
      rescue StandardError => e
        raise e
      end

      # Display Usage for this Module
      public_class_method def self.help
        puts "USAGE:
          #{self}.open_orders()
        "
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
cryptum-0.0.386 lib/cryptum/event/cancel.rb
cryptum-0.0.385 lib/cryptum/event/cancel.rb
cryptum-0.0.384 lib/cryptum/event/cancel.rb
cryptum-0.0.383 lib/cryptum/event/cancel.rb
cryptum-0.0.382 lib/cryptum/event/cancel.rb
cryptum-0.0.381 lib/cryptum/event/cancel.rb