Sha256: a5d84ca0082614db52a2fd5510f9cc99dfcdcc3a6a3759a9a98c0f864a58f520

Contents?: true

Size: 1.06 KB

Versions: 9

Compression:

Stored size: 1.06 KB

Contents

# frozen_string_literal: true

module Cryptum
  # This plugin is used to Submit a Limit Order
  # to Buy Crypto Currency

  module Event
    module Buy
      # Supported Method Parameters::
      # Cryptum::Event::Buy.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]

        Cryptum::API::Orders.submit_limit(
          option_choice: option_choice,
          env: env,
          price: price,
          size: size,
          buy_or_sell: :buy,
          event_history: event_history,
          bot_conf: bot_conf
        )
      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

9 entries across 9 versions & 1 rubygems

Version Path
cryptum-0.0.397 lib/cryptum/event/buy.rb
cryptum-0.0.396 lib/cryptum/event/buy.rb
cryptum-0.0.395 lib/cryptum/event/buy.rb
cryptum-0.0.394 lib/cryptum/event/buy.rb
cryptum-0.0.393 lib/cryptum/event/buy.rb
cryptum-0.0.392 lib/cryptum/event/buy.rb
cryptum-0.0.389 lib/cryptum/event/buy.rb
cryptum-0.0.388 lib/cryptum/event/buy.rb
cryptum-0.0.387 lib/cryptum/event/buy.rb