Sha256: 27b11682bb66bf620c7d965860865a4c9acfc894f44b082e3b4caa395dcd4fb3

Contents?: true

Size: 991 Bytes

Versions: 3

Compression:

Stored size: 991 Bytes

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 StandardError => e
        raise e
      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

3 entries across 3 versions & 1 rubygems

Version Path
cryptum-0.0.386 lib/cryptum/event/buy.rb
cryptum-0.0.385 lib/cryptum/event/buy.rb
cryptum-0.0.384 lib/cryptum/event/buy.rb