Module: Cryptum
- Defined in:
- lib/cryptum.rb,
lib/cryptum/ui.rb,
lib/cryptum/api.rb,
lib/cryptum/log.rb,
lib/cryptum/event.rb,
lib/cryptum/option.rb,
lib/cryptum/massage.rb,
lib/cryptum/open_ai.rb,
lib/cryptum/ui/exit.rb,
lib/cryptum/version.rb,
lib/cryptum/api/fees.rb,
lib/cryptum/api/rest.rb,
lib/cryptum/bot_conf.rb,
lib/cryptum/ui/order.rb,
lib/cryptum/web_sock.rb,
lib/cryptum/event/buy.rb,
lib/cryptum/portfolio.rb,
lib/cryptum/ui/matrix.rb,
lib/cryptum/ui/ticker.rb,
lib/cryptum/api/orders.rb,
lib/cryptum/event/exit.rb,
lib/cryptum/event/gtfo.rb,
lib/cryptum/event/pane.rb,
lib/cryptum/event/sell.rb,
lib/cryptum/order_book.rb,
lib/cryptum/ui/command.rb,
lib/cryptum/event/parse.rb,
lib/cryptum/api/products.rb,
lib/cryptum/event/cancel.rb,
lib/cryptum/event/scroll.rb,
lib/cryptum/ui/portfolio.rb,
lib/cryptum/api/portfolio.rb,
lib/cryptum/api/signature.rb,
lib/cryptum/event/history.rb,
lib/cryptum/option/choice.rb,
lib/cryptum/option/parser.rb,
lib/cryptum/ui/order/plan.rb,
lib/cryptum/event/bot_conf.rb,
lib/cryptum/ui/order/timer.rb,
lib/cryptum/event/key_press.rb,
lib/cryptum/ui/market_trend.rb,
lib/cryptum/event/order_book.rb,
lib/cryptum/ui/order/execute.rb,
lib/cryptum/ui/signal_engine.rb,
lib/cryptum/api/order_history.rb,
lib/cryptum/portfolio/balance.rb,
lib/cryptum/web_sock/coinbase.rb,
lib/cryptum/api/exchange_rates.rb,
lib/cryptum/option/environment.rb,
lib/cryptum/ui/key_press_event.rb,
lib/cryptum/ui/terminal_window.rb,
lib/cryptum/order_book/generate.rb,
lib/cryptum/order_book/indicator.rb,
lib/cryptum/ui/order/plan_details.rb,
lib/cryptum/web_sock/event_machine.rb,
lib/cryptum/option/input_validation.rb,
lib/cryptum/order_book/market_trend.rb,
lib/cryptum/order_book/profit_margin.rb,
lib/cryptum/ui/order/execute_details.rb
Overview
Root-Level Namespace for cryptum
Defined Under Namespace
Modules: API, BotConf, Event, Log, Massage, OpenAI, Option, OrderBook, Portfolio, UI, WebSock
Constant Summary
collapse
- VERSION =
'0.0.466'
Class Method Summary
collapse
Class Method Details
.beautify_large_number(opts = {}) ⇒ Object
Add Commas to Large Numbers to Make it Easier to Read
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
# File 'lib/cryptum.rb', line 94
public_class_method def self.beautify_large_number(opts = {})
value = opts[:value].to_s
split_str_num = value.split('.')
whole_num = split_str_num.first
fraction = 0
fraction = split_str_num.last if split_str_num.length > 1
is_negative = false
is_negative = true if whole_num.chars.first == '-'
whole_num = whole_num[1..] if is_negative
beautify_whole = whole_num.reverse.scan(/.{1,3}/).join(',').reverse
beautify_num = "#{beautify_whole}.#{fraction}" unless is_negative
beautify_num = "-#{beautify_whole}.#{fraction}" if is_negative
beautify_num
rescue Interrupt, StandardError => e
Cryptum::Log.append(level: :error, msg: e, which_self: self)
end
|
.bin ⇒ Object
39
40
41
42
43
|
# File 'lib/cryptum.rb', line 39
public_class_method def self.bin
File.join root, 'bin'
rescue Interrupt, StandardError => e
Cryptum::Log.append(level: :error, msg: e, which_self: self)
end
|
.down_arrow ⇒ Object
81
82
83
84
85
|
# File 'lib/cryptum.rb', line 81
public_class_method def self.down_arrow
"\u2193"
rescue Interrupt, StandardError => e
Cryptum::Log.append(level: :error, msg: e, which_self: self)
end
|
.etc ⇒ Object
45
46
47
48
49
|
# File 'lib/cryptum.rb', line 45
public_class_method def self.etc
File.join root, 'etc'
rescue Interrupt, StandardError => e
Cryptum::Log.append(level: :error, msg: e, which_self: self)
end
|
.flat_arrow ⇒ Object
87
88
89
90
91
|
# File 'lib/cryptum.rb', line 87
public_class_method def self.flat_arrow
'_'
rescue Interrupt, StandardError => e
Cryptum::Log.append(level: :error, msg: e, which_self: self)
end
|
.help ⇒ Object
114
115
116
|
# File 'lib/cryptum.rb', line 114
public_class_method def self.help
constants.sort
end
|
.lib ⇒ Object
51
52
53
54
55
|
# File 'lib/cryptum.rb', line 51
public_class_method def self.lib
File.join root, 'lib'
rescue Interrupt, StandardError => e
Cryptum::Log.append(level: :error, msg: e, which_self: self)
end
|
.open_symbol ⇒ Object
69
70
71
72
73
|
# File 'lib/cryptum.rb', line 69
public_class_method def self.open_symbol
"\u00f8"
rescue Interrupt, StandardError => e
Cryptum::Log.append(level: :error, msg: e, which_self: self)
end
|
.order_book ⇒ Object
57
58
59
60
61
|
# File 'lib/cryptum.rb', line 57
public_class_method def self.order_book
File.join root, 'order_book'
rescue Interrupt, StandardError => e
Cryptum::Log.append(level: :error, msg: e, which_self: self)
end
|
.root ⇒ Object
63
64
65
66
67
|
# File 'lib/cryptum.rb', line 63
public_class_method def self.root
File.dirname __dir__
rescue Interrupt, StandardError => e
Cryptum::Log.append(level: :error, msg: e, which_self: self)
end
|
.up_arrow ⇒ Object
75
76
77
78
79
|
# File 'lib/cryptum.rb', line 75
public_class_method def self.up_arrow
"\u2191"
rescue Interrupt, StandardError => e
Cryptum::Log.append(level: :error, msg: e, which_self: self)
end
|