Sha256: 25bea4a3cc883e14c4f9998b4c02b6a7023293fd9f0e1f493c69b88f2e7d493a

Contents?: true

Size: 1.15 KB

Versions: 69

Compression:

Stored size: 1.15 KB

Contents

# frozen_string_literal: true

module Cryptum
  # Crytpum::Event Namespace
  module Event
    # This Module is used to Submit Limit Sell Orders
    module Sell
      # Supported Method Parameters::
      # Cryptum::Event::Sell.crypto(
      # )
      public_class_method def self.crypto(opts = {})
        option_choice = opts[:option_choice]
        env = opts[:env]
        price = opts[:price]
        size = opts[:size]
        event_history = opts[:event_history]
        bot_conf = opts[:bot_conf]
        buy_order_id = opts[:buy_order_id]

        Cryptum::API::Orders.submit_limit(
          option_choice: option_choice,
          env: env,
          price: price,
          size: size,
          buy_or_sell: :sell,
          event_history: event_history,
          bot_conf: bot_conf,
          buy_order_id: buy_order_id
        )
      rescue Interrupt, StandardError => e
        Cryptum::Log.append(level: :error, msg: e, which_self: self, event_history: event_history)
      end

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

Version data entries

69 entries across 69 versions & 1 rubygems

Version Path
cryptum-0.0.466 lib/cryptum/event/sell.rb
cryptum-0.0.465 lib/cryptum/event/sell.rb
cryptum-0.0.464 lib/cryptum/event/sell.rb
cryptum-0.0.463 lib/cryptum/event/sell.rb
cryptum-0.0.462 lib/cryptum/event/sell.rb
cryptum-0.0.461 lib/cryptum/event/sell.rb
cryptum-0.0.460 lib/cryptum/event/sell.rb
cryptum-0.0.459 lib/cryptum/event/sell.rb
cryptum-0.0.458 lib/cryptum/event/sell.rb
cryptum-0.0.457 lib/cryptum/event/sell.rb
cryptum-0.0.456 lib/cryptum/event/sell.rb
cryptum-0.0.455 lib/cryptum/event/sell.rb
cryptum-0.0.454 lib/cryptum/event/sell.rb
cryptum-0.0.453 lib/cryptum/event/sell.rb
cryptum-0.0.452 lib/cryptum/event/sell.rb
cryptum-0.0.451 lib/cryptum/event/sell.rb
cryptum-0.0.450 lib/cryptum/event/sell.rb
cryptum-0.0.449 lib/cryptum/event/sell.rb
cryptum-0.0.448 lib/cryptum/event/sell.rb
cryptum-0.0.447 lib/cryptum/event/sell.rb