SimBot 0.1.23 → 0.1.24

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: 8d0596a0c844308e6943928edc76254a8aad4857a040c403314096841461be73
4
- data.tar.gz: 45df72d77d497db2d69281714057621aff2986338d60f0c32dbe16dd70316447
3
+ metadata.gz: bb8e979ef7eca7d196fbec6980009a590336c96e6d064674ee9851285232222f
4
+ data.tar.gz: 2530b40d5b1e1f6f7f53148af56255a9b83a77c1aaa8f8168968d209d57b9e94
5
5
  SHA512:
6
- metadata.gz: ab2440d5e4810e868290687ec3d941a27499928691da1f51284a6cfea3ece809eb740d3601cb43955948446deb32c7386a8aa8b52b92d82be59038374dca3285
7
- data.tar.gz: aa66f0b6c80ff4c933a93bf113315ea802fc9e3a8858bb2878ad9c232475d6ad2f3605158e1cd6aec1229b7d33ed13418896a1fc633d1b2525c2b8b7d636b2d5
6
+ metadata.gz: 83af9517c7792524b1648e43c01198b376f8722ac1f54ab2251aced5d41f3e97283c6dbfa3e6c2c5038cde5660aa456ef4c7760e042cd52891a01bf8790bc29e
7
+ data.tar.gz: 742535a4d4259819220cce207b0269cb67a0c209a7373d96a9e4ea50241de9aadfa87c3ece044cc51d6817514a7b871c17be650f70e095fdc9ce628c058ebd42
@@ -35,7 +35,7 @@
35
35
  <splitter split-orientation="horizontal" split-proportion="0.5059264">
36
36
  <split-first>
37
37
  <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
38
- <file leaf-file-name="SimBot.rb" pinned="false" current-in-tab="true">
38
+ <file leaf-file-name="SimBot.rb" pinned="false" current-in-tab="false">
39
39
  <entry file="file://$PROJECT_DIR$/lib/SimBot.rb">
40
40
  <provider selected="true" editor-type-id="text-editor">
41
41
  <state relative-caret-position="441">
@@ -53,20 +53,11 @@
53
53
  </provider>
54
54
  </entry>
55
55
  </file>
56
- <file leaf-file-name="wash_trade.rb" pinned="false" current-in-tab="false">
57
- <entry file="file://$PROJECT_DIR$/lib/Deamons/wash_trade.rb">
58
- <provider selected="true" editor-type-id="text-editor">
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
- </state>
62
- </provider>
63
- </entry>
64
- </file>
65
- <file leaf-file-name="utils.rb" pinned="false" current-in-tab="false">
56
+ <file leaf-file-name="utils.rb" pinned="false" current-in-tab="true">
66
57
  <entry file="file://$PROJECT_DIR$/lib/utils.rb">
67
58
  <provider selected="true" editor-type-id="text-editor">
68
- <state relative-caret-position="92">
69
- <caret line="108" column="82" selection-start-line="108" selection-start-column="82" selection-end-line="108" selection-end-column="82" />
59
+ <state relative-caret-position="241">
60
+ <caret line="69" column="32" lean-forward="true" selection-start-line="69" selection-start-column="32" selection-end-line="69" selection-end-column="32" />
70
61
  </state>
71
62
  </provider>
72
63
  </entry>
@@ -93,11 +84,20 @@
93
84
  </provider>
94
85
  </entry>
95
86
  </file>
87
+ <file leaf-file-name="wash_trade.rb" pinned="false" current-in-tab="false">
88
+ <entry file="file://$PROJECT_DIR$/lib/Deamons/wash_trade.rb">
89
+ <provider selected="true" editor-type-id="text-editor">
90
+ <state relative-caret-position="406">
91
+ <caret line="40" column="7" lean-forward="true" selection-start-line="40" selection-start-column="7" selection-end-line="40" selection-end-column="7" />
92
+ </state>
93
+ </provider>
94
+ </entry>
95
+ </file>
96
96
  <file leaf-file-name="simple_mm.rb" pinned="false" current-in-tab="false">
97
97
  <entry file="file://$PROJECT_DIR$/lib/Deamons/simple_mm.rb">
98
98
  <provider selected="true" editor-type-id="text-editor">
99
- <state relative-caret-position="236">
100
- <caret line="45" column="25" lean-forward="true" selection-start-line="34" selection-start-column="7" selection-end-line="35" />
99
+ <state relative-caret-position="153">
100
+ <caret line="45" column="90" selection-start-line="45" selection-start-column="90" selection-end-line="45" selection-end-column="90" />
101
101
  </state>
102
102
  </provider>
103
103
  </entry>
@@ -105,8 +105,8 @@
105
105
  <file leaf-file-name="mailer.rb" pinned="false" current-in-tab="false">
106
106
  <entry file="file://$PROJECT_DIR$/lib/mailer.rb">
107
107
  <provider selected="true" editor-type-id="text-editor">
108
- <state relative-caret-position="384">
109
- <caret line="30" column="3" selection-start-line="30" selection-start-column="3" selection-end-line="30" selection-end-column="3" />
108
+ <state relative-caret-position="563">
109
+ <caret line="29" column="5" lean-forward="true" selection-start-line="29" selection-start-column="5" selection-end-line="29" selection-end-column="5" />
110
110
  </state>
111
111
  </provider>
112
112
  </entry>
@@ -172,10 +172,10 @@
172
172
  <option value="$PROJECT_DIR$/lib/SimBot.rb" />
173
173
  <option value="$PROJECT_DIR$/lib/ApiController/peatio.rb" />
174
174
  <option value="$PROJECT_DIR$/99700.errfile" />
175
- <option value="$PROJECT_DIR$/lib/Deamons/wash_trade.rb" />
176
175
  <option value="$PROJECT_DIR$/2002.outfile" />
177
- <option value="$PROJECT_DIR$/lib/utils.rb" />
178
176
  <option value="$PROJECT_DIR$/lib/Deamons/simple_mm.rb" />
177
+ <option value="$PROJECT_DIR$/lib/utils.rb" />
178
+ <option value="$PROJECT_DIR$/lib/Deamons/wash_trade.rb" />
179
179
  <option value="$PROJECT_DIR$/lib/SimBot/version.rb" />
180
180
  </list>
181
181
  </option>
@@ -304,12 +304,12 @@
304
304
  <workItem from="1531747087172" duration="4944000" />
305
305
  <workItem from="1531824473237" duration="2590000" />
306
306
  <workItem from="1532528275009" duration="12558000" />
307
- <workItem from="1532961242324" duration="23086000" />
307
+ <workItem from="1532961242324" duration="26743000" />
308
308
  </task>
309
309
  <servers />
310
310
  </component>
311
311
  <component name="TimeTrackingManager">
312
- <option name="totallyTimeSpent" value="150714000" />
312
+ <option name="totallyTimeSpent" value="154371000" />
313
313
  </component>
314
314
  <component name="ToolWindowManager">
315
315
  <frame x="1443" y="22" width="1645" height="1028" extended-state="0" />
@@ -321,10 +321,10 @@
321
321
  <window_info anchor="bottom" id="Event Log" order="7" sideWeight="0.50904554" side_tool="true" weight="0.3457207" />
322
322
  <window_info anchor="right" id="Database" order="3" />
323
323
  <window_info anchor="bottom" id="Database Changes" order="7" show_stripe_button="false" />
324
- <window_info anchor="bottom" id="Run" order="2" sideWeight="0.48658764" weight="0.3536036" />
324
+ <window_info anchor="bottom" id="Run" order="2" sideWeight="0.48658764" visible="true" weight="0.3536036" />
325
325
  <window_info anchor="bottom" id="Version Control" order="7" weight="0.3292683" />
326
326
  <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
327
- <window_info anchor="bottom" id="Terminal" order="7" sideWeight="0.49095446" visible="true" weight="0.33896396" />
327
+ <window_info anchor="bottom" id="Terminal" order="7" sideWeight="0.49095446" weight="0.33896396" />
328
328
  <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
329
329
  <window_info id="Favorites" order="2" side_tool="true" />
330
330
  <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
@@ -374,18 +374,6 @@
374
374
  </breakpoint-manager>
375
375
  </component>
376
376
  <component name="editorHistoryManager">
377
- <entry file="file://$PROJECT_DIR$/98498.errfile">
378
- <provider selected="true" editor-type-id="text-editor" />
379
- </entry>
380
- <entry file="file://$PROJECT_DIR$/98565.pid">
381
- <provider selected="true" editor-type-id="text-editor" />
382
- </entry>
383
- <entry file="file://$PROJECT_DIR$/98565.outfile">
384
- <provider selected="true" editor-type-id="text-editor" />
385
- </entry>
386
- <entry file="file://$PROJECT_DIR$/98565.errfile">
387
- <provider selected="true" editor-type-id="text-editor" />
388
- </entry>
389
377
  <entry file="file://$PROJECT_DIR$/98638.outfile">
390
378
  <provider selected="true" editor-type-id="text-editor" />
391
379
  </entry>
@@ -421,13 +409,6 @@
421
409
  </state>
422
410
  </provider>
423
411
  </entry>
424
- <entry file="file://$PROJECT_DIR$/lib/mailer.rb">
425
- <provider selected="true" editor-type-id="text-editor">
426
- <state relative-caret-position="384">
427
- <caret line="30" column="3" selection-start-line="30" selection-start-column="3" selection-end-line="30" selection-end-column="3" />
428
- </state>
429
- </provider>
430
- </entry>
431
412
  <entry file="file://$PROJECT_DIR$/99082.outfile">
432
413
  <provider selected="true" editor-type-id="text-editor" />
433
414
  </entry>
@@ -566,31 +547,52 @@
566
547
  <entry file="file://$PROJECT_DIR$/2002.outfile">
567
548
  <provider selected="true" editor-type-id="text-editor" />
568
549
  </entry>
569
- <entry file="file://$PROJECT_DIR$/lib/Deamons/wash_trade.rb">
550
+ <entry file="file://$PROJECT_DIR$/lib/SimBot.rb">
570
551
  <provider selected="true" editor-type-id="text-editor">
571
- <state relative-caret-position="287">
572
- <caret line="32" column="32" lean-forward="true" selection-start-line="32" selection-start-column="32" selection-end-line="32" selection-end-column="32" />
552
+ <state relative-caret-position="441">
553
+ <caret line="70" column="27" selection-start-line="70" selection-start-column="27" selection-end-line="70" selection-end-column="27" />
573
554
  </state>
574
555
  </provider>
575
556
  </entry>
557
+ <entry file="file://$PROJECT_DIR$/18131.outfile">
558
+ <provider selected="true" editor-type-id="text-editor" />
559
+ </entry>
560
+ <entry file="file://$PROJECT_DIR$/18131.errfile">
561
+ <provider selected="true" editor-type-id="text-editor" />
562
+ </entry>
576
563
  <entry file="file://$PROJECT_DIR$/lib/utils.rb">
577
564
  <provider selected="true" editor-type-id="text-editor">
578
- <state relative-caret-position="92">
579
- <caret line="108" column="82" selection-start-line="108" selection-start-column="82" selection-end-line="108" selection-end-column="82" />
565
+ <state relative-caret-position="241">
566
+ <caret line="69" column="32" lean-forward="true" selection-start-line="69" selection-start-column="32" selection-end-line="69" selection-end-column="32" />
580
567
  </state>
581
568
  </provider>
582
569
  </entry>
583
- <entry file="file://$PROJECT_DIR$/lib/SimBot.rb">
570
+ <entry file="file://$PROJECT_DIR$/18251.outfile">
571
+ <provider selected="true" editor-type-id="text-editor" />
572
+ </entry>
573
+ <entry file="file://$PROJECT_DIR$/18251.errfile">
584
574
  <provider selected="true" editor-type-id="text-editor">
585
- <state relative-caret-position="441">
586
- <caret line="70" column="27" selection-start-line="70" selection-start-column="27" selection-end-line="70" selection-end-column="27" />
575
+ <state relative-caret-position="-57853" />
576
+ </provider>
577
+ </entry>
578
+ <entry file="file://$PROJECT_DIR$/lib/mailer.rb">
579
+ <provider selected="true" editor-type-id="text-editor">
580
+ <state relative-caret-position="563">
581
+ <caret line="29" column="5" lean-forward="true" selection-start-line="29" selection-start-column="5" selection-end-line="29" selection-end-column="5" />
587
582
  </state>
588
583
  </provider>
589
584
  </entry>
590
585
  <entry file="file://$PROJECT_DIR$/lib/Deamons/simple_mm.rb">
591
586
  <provider selected="true" editor-type-id="text-editor">
592
- <state relative-caret-position="236">
593
- <caret line="45" column="25" lean-forward="true" selection-start-line="34" selection-start-column="7" selection-end-line="35" />
587
+ <state relative-caret-position="153">
588
+ <caret line="45" column="90" selection-start-line="45" selection-start-column="90" selection-end-line="45" selection-end-column="90" />
589
+ </state>
590
+ </provider>
591
+ </entry>
592
+ <entry file="file://$PROJECT_DIR$/lib/Deamons/wash_trade.rb">
593
+ <provider selected="true" editor-type-id="text-editor">
594
+ <state relative-caret-position="406">
595
+ <caret line="40" column="7" lean-forward="true" selection-start-line="40" selection-start-column="7" selection-end-line="40" selection-end-column="7" />
594
596
  </state>
595
597
  </provider>
596
598
  </entry>
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- SimBot (0.1.22)
4
+ SimBot (0.1.23)
5
5
  json
6
6
  mail
7
7
  rest-client
@@ -43,7 +43,7 @@ module Deamons
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, ord[0].to_f, ord[1].to_f / 100, 'sell'))
46
+ txID = JSON.parse(@api.post_order(@market, ord[0].to_f, 1/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
49
  sleep(1)
@@ -25,7 +25,8 @@ module Deamons
25
25
  count = 0
26
26
  puts "--------#{@market} -------"
27
27
  loop do
28
- vol = rand(0.1...0.45) * (Math.sin(Time.now.hour / 24.00) + 1.00)
28
+ vol = rand(0.05...0.225) * (Math.sin(Time.now.hour / 6.00)
29
+ + 1.00) * Utils.rand_for_hour(1.5, 2)
29
30
  price = aug_price
30
31
  @api.post_order(@market, price, vol, 'sell')
31
32
  @api.post_order(@market, price, vol, 'buy')
@@ -1,3 +1,3 @@
1
1
  module SimBot
2
- VERSION = "0.1.23"
2
+ VERSION = "0.1.24"
3
3
  end
@@ -62,7 +62,15 @@ class Utils
62
62
  hash = JSON.parse(response.body)
63
63
  hash['data']['quotes']['BTC']['price'].to_f.round(4)
64
64
  end
65
-
65
+ @prev_time = -1
66
+ @rand_val = 1
67
+ def self.rand_for_hour(min, max)
68
+ if @prev_time != Time.now.hour
69
+ @rand_val = rand(min...max)
70
+ @prev_time = Time.now.hour
71
+ end
72
+ @rand_val
73
+ end
66
74
  # fetch btc/ltc price from coin market cap
67
75
  # @return [float] rate
68
76
  def self.btcltc_price
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.23
4
+ version: 0.1.24
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-02 00:00:00.000000000 Z
11
+ date: 2018-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler