cryptum 0.0.322 → 0.0.324
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +4 -4
- data/lib/cryptum/event/history.rb +7 -0
- data/lib/cryptum/option.rb +0 -1
- data/lib/cryptum/order_book.rb +0 -101
- data/lib/cryptum/ui/order_timer.rb +1 -1
- data/lib/cryptum/version.rb +1 -1
- data/lib/cryptum/web_sock/event_machine.rb +7 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c774da7badbde7fb89a23ba8a814b0768da0dcf1dd228d55d2374468ee34d4fd
|
4
|
+
data.tar.gz: ec3b10b645e5ba30218bff23422c2f5865c348c07f6750c8e70e5d3530051add
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 667ce8246ffef0626d6f9a791baf6043a400bfb797c2d1769260426528d8b06eff638dbeffdbfe89961b8e3bbd20fa1e9643d3676aa65fe2f1e8b1f627927a6d
|
7
|
+
data.tar.gz: 4eb2a28dec69b4c57d2c9c44211e1b599ef4bf7e9e955243ae55c59ab204cd916243808df1e2242e95a9c6b433b9045d99f4776817ed6bf1dae33a94dc6498f8
|
data/README.md
CHANGED
@@ -9,7 +9,7 @@ The goal of cryptum is three-fold:
|
|
9
9
|
- Grow asset portfolios.
|
10
10
|
|
11
11
|
#### How ####
|
12
|
-
Leveraging
|
12
|
+
Leveraging multiple algorithms based upon portfolio balances, market trends / % margins of change, and a duration of time, cryptum determines order size amounts to trickle-buy crytpo. Once a given buy order is filled, a limit sell order is submitted at a specific, fixed profit margin which can be defined by the user.
|
13
13
|
|
14
14
|
### **Installation** ###
|
15
15
|
Tested on Linux, & OSX leveraging Ruby via RVM.
|
@@ -22,17 +22,17 @@ $ gem install --verbose cryptum
|
|
22
22
|
$ cryptum --help
|
23
23
|
```
|
24
24
|
|
25
|
-
- Create a Local Cryptum
|
25
|
+
- Create a Local Cryptum Session Folder
|
26
26
|
```
|
27
27
|
$ mkdir -p ~/cryptum/order_books
|
28
28
|
```
|
29
29
|
|
30
|
-
- Copy the Gem etc to the Local
|
30
|
+
- Copy the cryptum Gem's etc Folder to the Local Session Folder
|
31
31
|
```
|
32
32
|
$ cp -a $(ruby -r cryptum -e 'puts "#{Gem.path.first}/gems/cryptum-#{Cryptum::VERSION}/etc"') ~/cryptum
|
33
33
|
```
|
34
34
|
|
35
|
-
- Copy coinbase_pro.yaml.EXAMPLE to the Local
|
35
|
+
- Copy coinbase_pro.yaml.EXAMPLE to the Local Session Folder
|
36
36
|
```
|
37
37
|
$ cp ~/cryptum/etc/coinbase_pro.yaml.EXAMPLE \
|
38
38
|
~/cryptum/etc/coinbase_pro.yaml
|
@@ -77,6 +77,12 @@ module Cryptum
|
|
77
77
|
self.recalculate_order_plan = false
|
78
78
|
self.start_time = start_time
|
79
79
|
|
80
|
+
# -------------------------------------------------- #
|
81
|
+
# SAUCE 4
|
82
|
+
# TODO: develop algorithm to calculate
|
83
|
+
# FAST BUY && SLOW BUY values taking
|
84
|
+
# market_trend_reset values into account
|
85
|
+
|
80
86
|
# FAST BUY = 10 minutes
|
81
87
|
self.time_between_orders = 600
|
82
88
|
self.time_between_orders_reset = time_between_orders
|
@@ -86,6 +92,7 @@ module Cryptum
|
|
86
92
|
|
87
93
|
# 5 seconds
|
88
94
|
self.time_between_orders_min = 5
|
95
|
+
# -------------------------------------------------- #
|
89
96
|
end
|
90
97
|
rescue Interrupt
|
91
98
|
# Exit Gracefully if CTRL+C is Pressed During Session
|
data/lib/cryptum/option.rb
CHANGED
@@ -148,7 +148,6 @@ module Cryptum
|
|
148
148
|
option_choice = opts[:option_choice]
|
149
149
|
env = opts[:env]
|
150
150
|
|
151
|
-
puts `#{option_choice.driver_name} --help`
|
152
151
|
puts "\n#{option_choice.driver_name} Supports the Following Products:"
|
153
152
|
products = Cryptum::API.get_products(
|
154
153
|
option_choice: option_choice,
|
data/lib/cryptum/order_book.rb
CHANGED
@@ -11,107 +11,6 @@ module Cryptum
|
|
11
11
|
autoload :MarketTrend, 'cryptum/order_book/market_trend'
|
12
12
|
autoload :ProfitMargin, 'cryptum/order_book/profit_margin'
|
13
13
|
|
14
|
-
# Supported Method Parameters::
|
15
|
-
# Cryptum::OrderBook.get_populated_indicators(
|
16
|
-
# indicator_status: 'required - indicator_status object instantiated via Cryptum::OrderBook::Indicators'
|
17
|
-
# )
|
18
|
-
public_class_method def self.get_populated_indicators(opts = {})
|
19
|
-
indicator_status = opts[:indicator_status]
|
20
|
-
|
21
|
-
indicator_type_hash = {}
|
22
|
-
indicator_type_hash[:trend_indicator_arr] = []
|
23
|
-
trend_indicator_arr = indicator_type_hash[:trend_indicator_arr]
|
24
|
-
|
25
|
-
indicator_type_hash[:health_indicator_arr] = []
|
26
|
-
health_indicator_arr = indicator_type_hash[:health_indicator_arr]
|
27
|
-
|
28
|
-
if indicator_status.order_trend
|
29
|
-
trend_indicator_arr.push(
|
30
|
-
indicator_status.order_trend
|
31
|
-
)
|
32
|
-
end
|
33
|
-
|
34
|
-
if indicator_status.weighted_avg
|
35
|
-
health_indicator_arr.push(
|
36
|
-
indicator_status.weighted_avg
|
37
|
-
)
|
38
|
-
end
|
39
|
-
|
40
|
-
if indicator_status.profit_margin
|
41
|
-
health_indicator_arr.push(
|
42
|
-
indicator_status.profit_margin
|
43
|
-
)
|
44
|
-
end
|
45
|
-
|
46
|
-
indicator_type_hash
|
47
|
-
rescue StandardError => e
|
48
|
-
raise e
|
49
|
-
end
|
50
|
-
|
51
|
-
# Supported Method Parameters::
|
52
|
-
# base_currency_overrides = Cryptum::OrderBook.base_currency_overrides
|
53
|
-
public_class_method def self.base_currency_overrides
|
54
|
-
%i[
|
55
|
-
1inch
|
56
|
-
aave
|
57
|
-
ada
|
58
|
-
amp
|
59
|
-
ankr
|
60
|
-
bal
|
61
|
-
band
|
62
|
-
bat
|
63
|
-
bnt
|
64
|
-
bond
|
65
|
-
cgld
|
66
|
-
chz
|
67
|
-
clv
|
68
|
-
comp
|
69
|
-
crv
|
70
|
-
ctsi
|
71
|
-
dot
|
72
|
-
enj
|
73
|
-
farm
|
74
|
-
fet
|
75
|
-
fil
|
76
|
-
forth
|
77
|
-
grt
|
78
|
-
gtc
|
79
|
-
icp
|
80
|
-
keep
|
81
|
-
lpt
|
82
|
-
lrc
|
83
|
-
mana
|
84
|
-
mask
|
85
|
-
matic
|
86
|
-
mir
|
87
|
-
mkr
|
88
|
-
mln
|
89
|
-
nkn
|
90
|
-
nmr
|
91
|
-
nu
|
92
|
-
ogn
|
93
|
-
poly
|
94
|
-
qnt
|
95
|
-
ren
|
96
|
-
rly
|
97
|
-
shib
|
98
|
-
skl
|
99
|
-
snx
|
100
|
-
sol
|
101
|
-
storj
|
102
|
-
sushi
|
103
|
-
trb
|
104
|
-
tribe
|
105
|
-
uma
|
106
|
-
uni
|
107
|
-
wbtc
|
108
|
-
yfi
|
109
|
-
zrx
|
110
|
-
]
|
111
|
-
rescue StandardError => e
|
112
|
-
raise e
|
113
|
-
end
|
114
|
-
|
115
14
|
# Display Usage for this Module
|
116
15
|
public_class_method def self.help
|
117
16
|
constants.sort
|
@@ -72,7 +72,7 @@ module Cryptum
|
|
72
72
|
ui_win: order_timer_win,
|
73
73
|
color: :white,
|
74
74
|
style: :bold,
|
75
|
-
string: "#{option_choice.market_trend_reset_label}
|
75
|
+
string: "#{option_choice.market_trend_reset_label} M. Trend Rst: #{trend_countdown}"
|
76
76
|
)
|
77
77
|
|
78
78
|
# COLUMN 2
|
data/lib/cryptum/version.rb
CHANGED
@@ -216,7 +216,13 @@ module Cryptum
|
|
216
216
|
end
|
217
217
|
|
218
218
|
EM.add_periodic_timer(option_choice.market_trend_reset) do
|
219
|
-
|
219
|
+
# NOTE: To ensure the integrity of event_history is maintained,
|
220
|
+
# changes to its contenta _MUST_ stay in thos block.
|
221
|
+
event_history.order_book[:market_trend][:buy] = 0
|
222
|
+
event_history.order_book[:market_trend][:sell] = 0
|
223
|
+
event_history.order_book[:last_trend_reset] = Time.now.strftime(
|
224
|
+
'%Y-%m-%d %H:%M:%S.%N%z'
|
225
|
+
)
|
220
226
|
|
221
227
|
# Reload Bot Conf (i.e. Risk Allocation)
|
222
228
|
# Recalculate Order Plan, and Write to File
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cryptum
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.324
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 0day Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-12-
|
11
|
+
date: 2022-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|