SimBot 0.1.21 → 0.1.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.idea/workspace.xml +74 -78
- data/Gemfile.lock +1 -1
- data/lib/Deamons/simple_mm.rb +4 -4
- data/lib/Deamons/wash_trade.rb +1 -1
- data/lib/SimBot/version.rb +1 -1
- data/lib/utils.rb +11 -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: 6a441c0eab14bf41e786f9f56d917ee5eb743a8d8936514d072260447a005d8e
|
4
|
+
data.tar.gz: 56486b83294eff1eed4754333ca0c9a0624aa1ef4917bc570e1d3246c912ebd2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3e6399e96be872d07380377c4e850568351289d2c8d05b5cda421702963ea0bb0382e26d67302066d9354f409502c7ffafe521c5c2dbc8ab660182ad86880d7
|
7
|
+
data.tar.gz: 5afef96b3af1a147472744b9834e93cb94a6ab3fbd0c4cb79bb58807fa13979952f8a4e2133bdf07e2311eaff3e4177428c844f5e0f03d7c7d05bb4353fd6e4d
|
data/.idea/workspace.xml
CHANGED
@@ -38,8 +38,8 @@
|
|
38
38
|
<file leaf-file-name="SimBot.rb" pinned="false" current-in-tab="true">
|
39
39
|
<entry file="file://$PROJECT_DIR$/lib/SimBot.rb">
|
40
40
|
<provider selected="true" editor-type-id="text-editor">
|
41
|
-
<state relative-caret-position="
|
42
|
-
<caret line="
|
41
|
+
<state relative-caret-position="460">
|
42
|
+
<caret line="70" column="27" selection-start-line="70" selection-start-column="27" selection-end-line="70" selection-end-column="27" />
|
43
43
|
</state>
|
44
44
|
</provider>
|
45
45
|
</entry>
|
@@ -56,17 +56,22 @@
|
|
56
56
|
<file leaf-file-name="wash_trade.rb" pinned="false" current-in-tab="false">
|
57
57
|
<entry file="file://$PROJECT_DIR$/lib/Deamons/wash_trade.rb">
|
58
58
|
<provider selected="true" editor-type-id="text-editor">
|
59
|
-
<state relative-caret-position="
|
60
|
-
<caret line="
|
59
|
+
<state relative-caret-position="287">
|
60
|
+
<caret line="32" column="32" lean-forward="true" selection-start-line="32" selection-start-column="32" selection-end-line="32" selection-end-column="32" />
|
61
61
|
</state>
|
62
62
|
</provider>
|
63
63
|
</entry>
|
64
64
|
</file>
|
65
|
+
<file leaf-file-name="1974.errfile" pinned="false" current-in-tab="false">
|
66
|
+
<entry file="file://$PROJECT_DIR$/1974.errfile">
|
67
|
+
<provider selected="true" editor-type-id="text-editor" />
|
68
|
+
</entry>
|
69
|
+
</file>
|
65
70
|
<file leaf-file-name="utils.rb" pinned="false" current-in-tab="false">
|
66
71
|
<entry file="file://$PROJECT_DIR$/lib/utils.rb">
|
67
72
|
<provider selected="true" editor-type-id="text-editor">
|
68
|
-
<state relative-caret-position="
|
69
|
-
<caret line="108" column="
|
73
|
+
<state relative-caret-position="92">
|
74
|
+
<caret line="108" column="82" selection-start-line="108" selection-start-column="82" selection-end-line="108" selection-end-column="82" />
|
70
75
|
</state>
|
71
76
|
</provider>
|
72
77
|
</entry>
|
@@ -96,8 +101,8 @@
|
|
96
101
|
<file leaf-file-name="simple_mm.rb" pinned="false" current-in-tab="false">
|
97
102
|
<entry file="file://$PROJECT_DIR$/lib/Deamons/simple_mm.rb">
|
98
103
|
<provider selected="true" editor-type-id="text-editor">
|
99
|
-
<state relative-caret-position="
|
100
|
-
<caret line="
|
104
|
+
<state relative-caret-position="224">
|
105
|
+
<caret line="45" column="88" selection-start-line="45" selection-start-column="88" selection-end-line="45" selection-end-column="88" />
|
101
106
|
</state>
|
102
107
|
</provider>
|
103
108
|
</entry>
|
@@ -170,10 +175,11 @@
|
|
170
175
|
<option value="$PROJECT_DIR$/93964.outfile" />
|
171
176
|
<option value="$PROJECT_DIR$/lib/ApiController/barong.rb" />
|
172
177
|
<option value="$PROJECT_DIR$/lib/SimBot.rb" />
|
173
|
-
<option value="$PROJECT_DIR$/lib/Deamons/wash_trade.rb" />
|
174
178
|
<option value="$PROJECT_DIR$/lib/ApiController/peatio.rb" />
|
175
|
-
<option value="$PROJECT_DIR$/lib/utils.rb" />
|
176
179
|
<option value="$PROJECT_DIR$/99700.errfile" />
|
180
|
+
<option value="$PROJECT_DIR$/lib/Deamons/wash_trade.rb" />
|
181
|
+
<option value="$PROJECT_DIR$/2002.outfile" />
|
182
|
+
<option value="$PROJECT_DIR$/lib/utils.rb" />
|
177
183
|
<option value="$PROJECT_DIR$/lib/Deamons/simple_mm.rb" />
|
178
184
|
<option value="$PROJECT_DIR$/lib/SimBot/version.rb" />
|
179
185
|
</list>
|
@@ -303,12 +309,12 @@
|
|
303
309
|
<workItem from="1531747087172" duration="4944000" />
|
304
310
|
<workItem from="1531824473237" duration="2590000" />
|
305
311
|
<workItem from="1532528275009" duration="12558000" />
|
306
|
-
<workItem from="1532961242324" duration="
|
312
|
+
<workItem from="1532961242324" duration="22537000" />
|
307
313
|
</task>
|
308
314
|
<servers />
|
309
315
|
</component>
|
310
316
|
<component name="TimeTrackingManager">
|
311
|
-
<option name="totallyTimeSpent" value="
|
317
|
+
<option name="totallyTimeSpent" value="150165000" />
|
312
318
|
</component>
|
313
319
|
<component name="ToolWindowManager">
|
314
320
|
<frame x="1443" y="22" width="1645" height="1028" extended-state="0" />
|
@@ -320,10 +326,10 @@
|
|
320
326
|
<window_info anchor="bottom" id="Event Log" order="7" sideWeight="0.50904554" side_tool="true" weight="0.3457207" />
|
321
327
|
<window_info anchor="right" id="Database" order="3" />
|
322
328
|
<window_info anchor="bottom" id="Database Changes" order="7" show_stripe_button="false" />
|
323
|
-
<window_info anchor="bottom" id="Run" order="2" sideWeight="0.48658764"
|
329
|
+
<window_info anchor="bottom" id="Run" order="2" sideWeight="0.48658764" weight="0.3536036" />
|
324
330
|
<window_info anchor="bottom" id="Version Control" order="7" weight="0.3292683" />
|
325
331
|
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
|
326
|
-
<window_info anchor="bottom" id="Terminal" order="7" sideWeight="0.49095446" weight="0.33896396" />
|
332
|
+
<window_info anchor="bottom" id="Terminal" order="7" sideWeight="0.49095446" visible="true" weight="0.33896396" />
|
327
333
|
<window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
|
328
334
|
<window_info id="Favorites" order="2" side_tool="true" />
|
329
335
|
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
|
@@ -373,52 +379,6 @@
|
|
373
379
|
</breakpoint-manager>
|
374
380
|
</component>
|
375
381
|
<component name="editorHistoryManager">
|
376
|
-
<entry file="file://$PROJECT_DIR$/98101.errfile">
|
377
|
-
<provider selected="true" editor-type-id="text-editor">
|
378
|
-
<state relative-caret-position="-2075" />
|
379
|
-
</provider>
|
380
|
-
</entry>
|
381
|
-
<entry file="file://$PROJECT_DIR$/98101.outfile">
|
382
|
-
<provider selected="true" editor-type-id="text-editor" />
|
383
|
-
</entry>
|
384
|
-
<entry file="file://$PROJECT_DIR$/98147.errfile">
|
385
|
-
<provider selected="true" editor-type-id="text-editor" />
|
386
|
-
</entry>
|
387
|
-
<entry file="file://$PROJECT_DIR$/98147.outfile">
|
388
|
-
<provider selected="true" editor-type-id="text-editor" />
|
389
|
-
</entry>
|
390
|
-
<entry file="file://$PROJECT_DIR$/98242.outfile">
|
391
|
-
<provider selected="true" editor-type-id="text-editor" />
|
392
|
-
</entry>
|
393
|
-
<entry file="file://$PROJECT_DIR$/98242.errfile">
|
394
|
-
<provider selected="true" editor-type-id="text-editor" />
|
395
|
-
</entry>
|
396
|
-
<entry file="file://$PROJECT_DIR$/98287.errfile">
|
397
|
-
<provider selected="true" editor-type-id="text-editor" />
|
398
|
-
</entry>
|
399
|
-
<entry file="file://$PROJECT_DIR$/98287.outfile">
|
400
|
-
<provider selected="true" editor-type-id="text-editor">
|
401
|
-
<state>
|
402
|
-
<caret column="22" lean-forward="true" selection-start-column="22" selection-end-column="22" />
|
403
|
-
</state>
|
404
|
-
</provider>
|
405
|
-
</entry>
|
406
|
-
<entry file="file://$PROJECT_DIR$/98346.errfile">
|
407
|
-
<provider selected="true" editor-type-id="text-editor" />
|
408
|
-
</entry>
|
409
|
-
<entry file="file://$PROJECT_DIR$/98346.outfile">
|
410
|
-
<provider selected="true" editor-type-id="text-editor" />
|
411
|
-
</entry>
|
412
|
-
<entry file="file://$PROJECT_DIR$/98402.outfile">
|
413
|
-
<provider selected="true" editor-type-id="text-editor">
|
414
|
-
<state relative-caret-position="23">
|
415
|
-
<caret line="1" column="9" selection-start-line="1" selection-start-column="9" selection-end-line="1" selection-end-column="41" />
|
416
|
-
</state>
|
417
|
-
</provider>
|
418
|
-
</entry>
|
419
|
-
<entry file="file://$PROJECT_DIR$/98498.outfile">
|
420
|
-
<provider selected="true" editor-type-id="text-editor" />
|
421
|
-
</entry>
|
422
382
|
<entry file="file://$PROJECT_DIR$/98498.errfile">
|
423
383
|
<provider selected="true" editor-type-id="text-editor" />
|
424
384
|
</entry>
|
@@ -493,13 +453,6 @@
|
|
493
453
|
</state>
|
494
454
|
</provider>
|
495
455
|
</entry>
|
496
|
-
<entry file="file://$PROJECT_DIR$/lib/Deamons/wash_trade.rb">
|
497
|
-
<provider selected="true" editor-type-id="text-editor">
|
498
|
-
<state relative-caret-position="-596">
|
499
|
-
<caret line="35" column="28" lean-forward="true" selection-start-line="35" selection-start-column="13" selection-end-line="35" selection-end-column="28" />
|
500
|
-
</state>
|
501
|
-
</provider>
|
502
|
-
</entry>
|
503
456
|
<entry file="file://$PROJECT_DIR$/99238.errfile">
|
504
457
|
<provider selected="true" editor-type-id="text-editor" />
|
505
458
|
</entry>
|
@@ -553,13 +506,6 @@
|
|
553
506
|
</state>
|
554
507
|
</provider>
|
555
508
|
</entry>
|
556
|
-
<entry file="file://$PROJECT_DIR$/lib/utils.rb">
|
557
|
-
<provider selected="true" editor-type-id="text-editor">
|
558
|
-
<state relative-caret-position="236">
|
559
|
-
<caret line="108" column="91" selection-start-line="108" selection-start-column="91" selection-end-line="108" selection-end-column="91" />
|
560
|
-
</state>
|
561
|
-
</provider>
|
562
|
-
</entry>
|
563
509
|
<entry file="file://$PROJECT_DIR$/99647.outfile">
|
564
510
|
<provider selected="true" editor-type-id="text-editor" />
|
565
511
|
</entry>
|
@@ -589,17 +535,67 @@
|
|
589
535
|
</state>
|
590
536
|
</provider>
|
591
537
|
</entry>
|
538
|
+
<entry file="file://$PROJECT_DIR$/967.errfile">
|
539
|
+
<provider selected="true" editor-type-id="text-editor" />
|
540
|
+
</entry>
|
541
|
+
<entry file="file://$PROJECT_DIR$/967.outfile">
|
542
|
+
<provider selected="true" editor-type-id="text-editor" />
|
543
|
+
</entry>
|
544
|
+
<entry file="file://$PROJECT_DIR$/1028.outfile">
|
545
|
+
<provider selected="true" editor-type-id="text-editor" />
|
546
|
+
</entry>
|
547
|
+
<entry file="file://$PROJECT_DIR$/1028.errfile">
|
548
|
+
<provider selected="true" editor-type-id="text-editor" />
|
549
|
+
</entry>
|
550
|
+
<entry file="file://$PROJECT_DIR$/1074.errfile">
|
551
|
+
<provider selected="true" editor-type-id="text-editor" />
|
552
|
+
</entry>
|
553
|
+
<entry file="file://$PROJECT_DIR$/1074.outfile">
|
554
|
+
<provider selected="true" editor-type-id="text-editor" />
|
555
|
+
</entry>
|
556
|
+
<entry file="file://$PROJECT_DIR$/1500.errfile">
|
557
|
+
<provider selected="true" editor-type-id="LargeFileEditor" />
|
558
|
+
</entry>
|
559
|
+
<entry file="file://$PROJECT_DIR$/1974.outfile">
|
560
|
+
<provider selected="true" editor-type-id="text-editor" />
|
561
|
+
</entry>
|
562
|
+
<entry file="file://$PROJECT_DIR$/1974.pid">
|
563
|
+
<provider selected="true" editor-type-id="text-editor" />
|
564
|
+
</entry>
|
565
|
+
<entry file="file://$PROJECT_DIR$/2002.errfile">
|
566
|
+
<provider selected="true" editor-type-id="text-editor" />
|
567
|
+
</entry>
|
568
|
+
<entry file="file://$PROJECT_DIR$/1974.errfile">
|
569
|
+
<provider selected="true" editor-type-id="text-editor" />
|
570
|
+
</entry>
|
571
|
+
<entry file="file://$PROJECT_DIR$/2002.outfile">
|
572
|
+
<provider selected="true" editor-type-id="text-editor" />
|
573
|
+
</entry>
|
574
|
+
<entry file="file://$PROJECT_DIR$/lib/Deamons/wash_trade.rb">
|
575
|
+
<provider selected="true" editor-type-id="text-editor">
|
576
|
+
<state relative-caret-position="287">
|
577
|
+
<caret line="32" column="32" lean-forward="true" selection-start-line="32" selection-start-column="32" selection-end-line="32" selection-end-column="32" />
|
578
|
+
</state>
|
579
|
+
</provider>
|
580
|
+
</entry>
|
581
|
+
<entry file="file://$PROJECT_DIR$/lib/utils.rb">
|
582
|
+
<provider selected="true" editor-type-id="text-editor">
|
583
|
+
<state relative-caret-position="92">
|
584
|
+
<caret line="108" column="82" selection-start-line="108" selection-start-column="82" selection-end-line="108" selection-end-column="82" />
|
585
|
+
</state>
|
586
|
+
</provider>
|
587
|
+
</entry>
|
592
588
|
<entry file="file://$PROJECT_DIR$/lib/SimBot.rb">
|
593
589
|
<provider selected="true" editor-type-id="text-editor">
|
594
|
-
<state relative-caret-position="
|
595
|
-
<caret line="
|
590
|
+
<state relative-caret-position="460">
|
591
|
+
<caret line="70" column="27" selection-start-line="70" selection-start-column="27" selection-end-line="70" selection-end-column="27" />
|
596
592
|
</state>
|
597
593
|
</provider>
|
598
594
|
</entry>
|
599
595
|
<entry file="file://$PROJECT_DIR$/lib/Deamons/simple_mm.rb">
|
600
596
|
<provider selected="true" editor-type-id="text-editor">
|
601
|
-
<state relative-caret-position="
|
602
|
-
<caret line="
|
597
|
+
<state relative-caret-position="224">
|
598
|
+
<caret line="45" column="88" selection-start-line="45" selection-start-column="88" selection-end-line="45" selection-end-column="88" />
|
603
599
|
</state>
|
604
600
|
</provider>
|
605
601
|
</entry>
|
data/Gemfile.lock
CHANGED
data/lib/Deamons/simple_mm.rb
CHANGED
@@ -35,18 +35,18 @@ module Deamons
|
|
35
35
|
end
|
36
36
|
|
37
37
|
def populate_order_book(data)
|
38
|
-
range =
|
38
|
+
range = 499
|
39
39
|
nums = (0..range).to_a.shuffle
|
40
40
|
for i in (0..range)
|
41
41
|
ord = data[:bids][nums[i]]
|
42
|
-
txID = JSON.parse(@api.post_order(@market,
|
42
|
+
txID = JSON.parse(@api.post_order(@market, ord[0].to_f, ord[1].to_f / 100, 'buy'))
|
43
43
|
ord.push(txID['id'])
|
44
44
|
@api.cancel_order(@order_book[:bids][nums[i]][-1]) if @order_book[:bids].size > 2
|
45
45
|
ord = data[:asks][nums[i]]
|
46
|
-
txID = JSON.parse(@api.post_order(@market,
|
46
|
+
txID = JSON.parse(@api.post_order(@market, ord[0].to_f, ord[1].to_f / 100, 'sell'))
|
47
47
|
ord.push(txID['id'])
|
48
48
|
@api.cancel_order(@order_book[:asks][nums[i]][-1]) if @order_book[:asks].size > 2
|
49
|
-
sleep(0.
|
49
|
+
sleep(0.1)
|
50
50
|
end
|
51
51
|
@order_book = data
|
52
52
|
puts data.inspect
|
data/lib/Deamons/wash_trade.rb
CHANGED
@@ -25,7 +25,7 @@ module Deamons
|
|
25
25
|
count = 0
|
26
26
|
puts "--------#{@market} -------"
|
27
27
|
loop do
|
28
|
-
vol = rand(0.
|
28
|
+
vol = rand(0.1...0.45) * (Math.sin(Time.now.hour / 24.00) + 1.00)
|
29
29
|
price = aug_price
|
30
30
|
@api.post_order(@market, price, vol, 'sell')
|
31
31
|
@api.post_order(@market, price, vol, 'buy')
|
data/lib/SimBot/version.rb
CHANGED
data/lib/utils.rb
CHANGED
@@ -106,7 +106,17 @@ class Utils
|
|
106
106
|
# fetch binance order book
|
107
107
|
# @return [float] rate
|
108
108
|
def self.binane_order_book
|
109
|
-
response = RestClient.get('https://api.binance.com/api/v1/depth?symbol=
|
109
|
+
response = RestClient.get('https://api.binance.com/api/v1/depth?symbol=BTCUSDT&limit=500')
|
110
|
+
hash = JSON.parse(response.body)
|
111
|
+
bids = hash['bids']
|
112
|
+
asks = hash['asks']
|
113
|
+
{ bids: bids, asks: asks }
|
114
|
+
end
|
115
|
+
|
116
|
+
# fetch binance order book
|
117
|
+
# @return [float] rate
|
118
|
+
def self.binane_usdtbtc_order_book
|
119
|
+
response = RestClient.get('https://api.binance.com/api/v1/depth?symbol=BTCUSDT&limit=500')
|
110
120
|
hash = JSON.parse(response.body)
|
111
121
|
bids = hash['bids']
|
112
122
|
asks = hash['asks']
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: SimBot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.22
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Ovadia
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-08-
|
11
|
+
date: 2018-08-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|