Module: Cryptum::Event::Buy

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

Overview

This Module is used to Submit Limit Buy Orders

Class Method Summary collapse

Class Method Details

.crypto(opts = {}) ⇒ Object

Supported Method Parameters

Cryptum::Event::Buy.crypto( )



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/cryptum/event/buy.rb', line 11

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

.helpObject

Display Usage for this Module



33
34
35
36
37
# File 'lib/cryptum/event/buy.rb', line 33

public_class_method def self.help
  puts "USAGE:
   event_history = #{self}.crypto()
  "
end