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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a6e99138cbce43b5dcb7f3ca51d0bbb2a526bb09ca1be1167eafdd2a4b718953
4
- data.tar.gz: 1183a55e0b707288ddd2cb92dae8f86608a74c67cd14c79e6c779b0841a6567b
3
+ metadata.gz: 6a441c0eab14bf41e786f9f56d917ee5eb743a8d8936514d072260447a005d8e
4
+ data.tar.gz: 56486b83294eff1eed4754333ca0c9a0624aa1ef4917bc570e1d3246c912ebd2
5
5
  SHA512:
6
- metadata.gz: 5ed227008b3487b0514d5b45a495e447a1dad309558984d30ae127a18ba177eedbb3e58266ca3355a30a78cbc90b11f06aa361899648ddebd38ff83d33881ff4
7
- data.tar.gz: b9b7552801fddb9eeaf845add1c34cb8348a6013bfd3bf8ca721b505db5655c74748b9e55dc0f686eb05b48368fc43895a738180118f0dbcdae465e58bea4b04
6
+ metadata.gz: c3e6399e96be872d07380377c4e850568351289d2c8d05b5cda421702963ea0bb0382e26d67302066d9354f409502c7ffafe521c5c2dbc8ab660182ad86880d7
7
+ data.tar.gz: 5afef96b3af1a147472744b9834e93cb94a6ab3fbd0c4cb79bb58807fa13979952f8a4e2133bdf07e2311eaff3e4177428c844f5e0f03d7c7d05bb4353fd6e4d
@@ -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="-393">
42
- <caret line="34" column="6" selection-start-line="34" selection-start-column="6" selection-end-line="34" selection-end-column="6" />
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="-596">
60
- <caret line="35" column="28" lean-forward="true" selection-start-line="35" selection-start-column="13" selection-end-line="35" selection-end-column="28" />
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="236">
69
- <caret line="108" column="91" selection-start-line="108" selection-start-column="91" selection-end-line="108" selection-end-column="91" />
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="385">
100
- <caret line="48" column="17" lean-forward="true" selection-start-line="48" selection-start-column="17" selection-end-line="48" selection-end-column="17" />
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="19655000" />
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="147283000" />
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" visible="true" weight="0.3536036" />
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="-393">
595
- <caret line="34" column="6" selection-start-line="34" selection-start-column="6" selection-end-line="34" selection-end-column="6" />
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="385">
602
- <caret line="48" column="17" lean-forward="true" selection-start-line="48" selection-start-column="17" selection-end-line="48" selection-end-column="17" />
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>
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- SimBot (0.1.20)
4
+ SimBot (0.1.21)
5
5
  json
6
6
  mail
7
7
  rest-client
@@ -35,18 +35,18 @@ module Deamons
35
35
  end
36
36
 
37
37
  def populate_order_book(data)
38
- range = 99
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, 1 / ord[0].to_f, ord[1].to_f / 10, 'sell'))
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, 1 / ord[0].to_f, ord[1].to_f / 10, 'buy'))
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.5)
49
+ sleep(0.1)
50
50
  end
51
51
  @order_book = data
52
52
  puts data.inspect
@@ -25,7 +25,7 @@ module Deamons
25
25
  count = 0
26
26
  puts "--------#{@market} -------"
27
27
  loop do
28
- vol = rand(0.01...0.1)
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')
@@ -1,3 +1,3 @@
1
1
  module SimBot
2
- VERSION = "0.1.21"
2
+ VERSION = "0.1.22"
3
3
  end
@@ -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=BCCBTC&limit=100')
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.21
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-01 00:00:00.000000000 Z
11
+ date: 2018-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler