cryptum 0.0.400 → 0.0.401
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +20 -20
- data/lib/cryptum/log.rb +1 -0
- data/lib/cryptum/option/input_validation.rb +26 -20
- data/lib/cryptum/option/parser.rb +6 -6
- data/lib/cryptum/ui/order/execute.rb +1 -1
- data/lib/cryptum/version.rb +1 -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: 0e8b9a02dddfb1118d13518d0ebf16703f0a988f563ff6556090a055b67f82d0
|
4
|
+
data.tar.gz: ba8469969bd9f73d0df3abe8c233bcdf7aa128b8cc1442d94daaca15c8adbf91
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dac3148c7e98d46d05581021fb6d0df376fcc738913ec329f3511ab3e4ca5f8afe02387e2b42ccc21598734ecf01919e36722bc74f101d2de6adf1babc141692
|
7
|
+
data.tar.gz: 806f4873cdc8e57262f62c3ad8bd54568434222848f0905b7431ca3d1dacef00555d683c6d6ff1ef60f0856678dde6089c836c6d8ca02d9aa38c3bbabad332dc
|
data/README.md
CHANGED
@@ -68,38 +68,38 @@ USAGE: cryptum [opts]
|
|
68
68
|
-R, --[no-]reset-trend-countdown <Optional - Reset Market Trend Countdown at Session Init (Defaults to false)>
|
69
69
|
-r, --session-root=PATH <Optional - Directory with etc && order_books (Defaults to ~/cryptum)>
|
70
70
|
-S, --[no-]sandbox <Optional - Use Coinbase Sandbox Environment for Testing Ideas>
|
71
|
-
-t, --trend-reset-time=
|
71
|
+
-t, --trend-reset-time=TIME <Optional - Time Between Market Trend Reset (Default 1D)>
|
72
72
|
```
|
73
73
|
|
74
74
|
Example usage to trade on weekly instead of default daily:
|
75
75
|
```
|
76
76
|
$ cryptum --symbol btc-usd \
|
77
77
|
--session-root ~/cryptum \
|
78
|
-
--trend-reset-time
|
78
|
+
--trend-reset-time 1W
|
79
79
|
```
|
80
80
|
|
81
81
|
By default, cryptum resets the market trend (i.e. number of buys vs number of sells) every day (i.e. 86400 seconds). As Maker & Taker fees drop in value, it may be useful to change the market trend reset value to something lower (e.g. 4 hours):
|
82
82
|
```
|
83
83
|
$ cryptum --symbol btc-usd \
|
84
84
|
--session-root ~/cryptum \
|
85
|
-
--trend-reset-time
|
86
|
-
```
|
87
|
-
|
88
|
-
Possible values for `--trend-reset-time` reside in the
|
89
|
-
|
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
85
|
+
--trend-reset-time 4h
|
86
|
+
```
|
87
|
+
|
88
|
+
Possible values for `--trend-reset-time` reside in the UI Label column:
|
89
|
+
|Description|UI Label |
|
90
|
+
|-----------|----------|
|
91
|
+
|1 week |`1W` |
|
92
|
+
|1 day |`1D` |
|
93
|
+
|4 hours |`4h` |
|
94
|
+
|3 hours |`3h` |
|
95
|
+
|2 hours |`2h` |
|
96
|
+
|1 hour |`1h` |
|
97
|
+
|5 minutes |`45m` |
|
98
|
+
|30 minutes |`30m` |
|
99
|
+
|15 minutes |`15m` |
|
100
|
+
|5 minutes |`5m` |
|
101
|
+
|3 minutes |`3m` |
|
102
|
+
|1 minute |`1m` |
|
103
103
|
|
104
104
|
If you choose a lower value than the default, the target profit margin's (i.e. TPM) will also be reduced (assuming the TPM is still higher than Maker + Taker fees). This may be desireable - although TPM is reduced, trading volume should increase resulting in better Maker & Taker fee tiers (i.e. lower cost / trade).
|
105
105
|
|
data/lib/cryptum/log.rb
CHANGED
@@ -22,38 +22,44 @@ module Cryptum
|
|
22
22
|
reason = :session_root
|
23
23
|
end
|
24
24
|
|
25
|
-
option_choice.market_trend_reset =
|
26
|
-
unless option_choice.market_trend_reset.to_i >= 60 &&
|
27
|
-
option_choice.market_trend_reset <= 604_800
|
28
|
-
usage = true
|
29
|
-
reason = :market_trend_reset
|
30
|
-
end
|
31
|
-
|
25
|
+
option_choice.market_trend_reset = '1D' if option_choice.market_trend_reset.nil?
|
32
26
|
case option_choice.market_trend_reset
|
33
|
-
when
|
27
|
+
when '1W'
|
34
28
|
option_choice.market_trend_reset_label = '1W'
|
35
|
-
|
29
|
+
option_choice.market_trend_reset = 604_800
|
30
|
+
when '1D'
|
36
31
|
option_choice.market_trend_reset_label = '1D'
|
37
|
-
|
32
|
+
option_choice.market_trend_reset = 86_400
|
33
|
+
when '4h'
|
38
34
|
option_choice.market_trend_reset_label = '4h'
|
39
|
-
|
35
|
+
option_choice.market_trend_reset = 14_400
|
36
|
+
when '3h'
|
40
37
|
option_choice.market_trend_reset_label = '3h'
|
41
|
-
|
38
|
+
option_choice.market_trend_reset = 10_800
|
39
|
+
when '2h'
|
42
40
|
option_choice.market_trend_reset_label = '2h'
|
43
|
-
|
41
|
+
option_choice.market_trend_reset = 7_200
|
42
|
+
when '1h'
|
44
43
|
option_choice.market_trend_reset_label = '1h'
|
45
|
-
|
44
|
+
option_choice.market_trend_reset = 3_600
|
45
|
+
when '45m'
|
46
46
|
option_choice.market_trend_reset_label = '45m'
|
47
|
-
|
47
|
+
option_choice.market_trend_reset = 2_700
|
48
|
+
when '30m'
|
48
49
|
option_choice.market_trend_reset_label = '30m'
|
49
|
-
|
50
|
+
option_choice.market_trend_reset = 1_800
|
51
|
+
when '15m'
|
50
52
|
option_choice.market_trend_reset_label = '15m'
|
51
|
-
|
53
|
+
option_choice.market_trend_reset = 900
|
54
|
+
when '5m'
|
52
55
|
option_choice.market_trend_reset_label = '5m'
|
53
|
-
|
56
|
+
option_choice.market_trend_reset = 300
|
57
|
+
when '3m'
|
54
58
|
option_choice.market_trend_reset_label = '3m'
|
55
|
-
|
59
|
+
option_choice.market_trend_reset = 180
|
60
|
+
when '1m'
|
56
61
|
option_choice.market_trend_reset_label = '1m'
|
62
|
+
option_choice.market_trend_reset = 60
|
57
63
|
else
|
58
64
|
usage = true
|
59
65
|
reason = :market_trend_reset
|
@@ -66,7 +72,7 @@ module Cryptum
|
|
66
72
|
when :session_root
|
67
73
|
puts "ERROR: #{option_choice.session_root} does not exist.\n\n"
|
68
74
|
when :market_trend_reset
|
69
|
-
puts "ERROR: #{option_choice.market_trend_reset} - Possible values are:
|
75
|
+
puts "ERROR: #{option_choice.market_trend_reset} - Possible values are: 1W, 1D, 4h, 3h, 2h, 1h, 45m, 30m, 15m, 5m, 3m, 1m\n\n"
|
70
76
|
end
|
71
77
|
|
72
78
|
puts `#{option_choice.driver_name} --help`
|
@@ -35,7 +35,7 @@ module Cryptum
|
|
35
35
|
'-R',
|
36
36
|
'--[no-]reset-trend-countdown',
|
37
37
|
'<Optional - Reset Market Trend Countdown at Session Init (Defaults to false)>'
|
38
|
-
) { |
|
38
|
+
) { |r| option_choice.reset_session_countdown = r }
|
39
39
|
|
40
40
|
options.on(
|
41
41
|
'-rPATH',
|
@@ -47,13 +47,13 @@ module Cryptum
|
|
47
47
|
'-S',
|
48
48
|
'--[no-]sandbox',
|
49
49
|
'<Optional - Use Coinbase Sandbox Environment for Testing Ideas>'
|
50
|
-
) { |
|
50
|
+
) { |s| option_choice.sandbox = s }
|
51
51
|
|
52
52
|
options.on(
|
53
|
-
'-
|
54
|
-
'--trend-reset-time=
|
55
|
-
'<Optional -
|
56
|
-
) { |t| option_choice.market_trend_reset = t
|
53
|
+
'-tTIME',
|
54
|
+
'--trend-reset-time=TIME',
|
55
|
+
'<Optional - Time Between Market Trend Reset (Default 1D)>'
|
56
|
+
) { |t| option_choice.market_trend_reset = t }
|
57
57
|
end.parse!
|
58
58
|
|
59
59
|
Cryptum::Option::InputValidation.check(option_choice: option_choice)
|
@@ -376,8 +376,8 @@ module Cryptum
|
|
376
376
|
|
377
377
|
# ROWS 3-10
|
378
378
|
remaining_blank_rows = 0
|
379
|
-
remaining_blank_rows = max_rows_to_display if order_history_meta.empty?
|
380
379
|
max_rows_to_display = event_history.order_execute_max_rows_to_display
|
380
|
+
remaining_blank_rows = max_rows_to_display if order_history_meta.empty?
|
381
381
|
first_row = event_history.order_execute_index_offset
|
382
382
|
last_row = first_row + max_rows_to_display
|
383
383
|
if last_row >= order_history_meta.length
|
data/lib/cryptum/version.rb
CHANGED
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.401
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 0day Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-04-
|
11
|
+
date: 2023-04-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|