SimBot 0.1.39 → 0.1.40

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: 5e6b958b1984d41a038c142e44cdfd752c67e12a0da3b2225ccb2ca8bb28d723
4
- data.tar.gz: 33d0c0bb16b2fefc46a5155fb9f91a255bacdad893ed3d0ad7d1117f4dda1ddb
3
+ metadata.gz: ac2e5334c07836c5eef24d98d4e2a832bb341fc14edef75069c2039936fda257
4
+ data.tar.gz: fb38828954c1e586deaf2d939e331603ade5c2156ac98542f29ffdbcf432e43f
5
5
  SHA512:
6
- metadata.gz: a76638f38f2aa2b243c2e07357ca4b7f5885c37ab92dc496580123e561b2d720bad7c2b92b83bd496003bf91da4496d05eeb93a5b08a32aacf8d9f7d4093d03e
7
- data.tar.gz: 10b26076fc7255271410e0b08a5495a8483845a0f67e25219fe30da953597b1e53a6813eda1ba7c93936b769eeb8fee926fab16e1d8dec77e351ac3b3ae52872
6
+ metadata.gz: 8be8d975119fe3f3a86bed38184b25d824f8c3cee19237b8ed56aed49eba1af3b59f6fcbe91aadb338affb47f069dff9249093f402d482dbc9f722aac5085456
7
+ data.tar.gz: ce4a09e1d4f550a7c1c6309e474c587f7f91fca710262b57eb9c634119bb1a3ef874dd82c5c88fd8664a43dab5c13983c35a12d33821fd1b9b2771764de28eef
@@ -105,7 +105,7 @@
105
105
  <entry file="file://$PROJECT_DIR$/lib/Deamons/bitcoind.rb">
106
106
  <provider selected="true" editor-type-id="text-editor">
107
107
  <state relative-caret-position="115">
108
- <caret line="5" column="19" lean-forward="true" selection-start-line="5" selection-start-column="19" selection-end-line="5" selection-end-column="19" />
108
+ <caret line="5" column="19" selection-start-line="5" selection-start-column="19" selection-end-line="5" selection-end-column="19" />
109
109
  </state>
110
110
  </provider>
111
111
  </entry>
@@ -113,8 +113,8 @@
113
113
  <file leaf-file-name="SimBot.rb" pinned="false" current-in-tab="false">
114
114
  <entry file="file://$PROJECT_DIR$/lib/SimBot.rb">
115
115
  <provider selected="true" editor-type-id="text-editor">
116
- <state relative-caret-position="1843">
117
- <caret line="105" column="3" lean-forward="true" selection-start-line="105" selection-start-column="3" selection-end-line="105" selection-end-column="3" />
116
+ <state relative-caret-position="406">
117
+ <caret line="31" column="7" lean-forward="true" selection-start-line="31" selection-start-column="7" selection-end-line="31" selection-end-column="7" />
118
118
  </state>
119
119
  </provider>
120
120
  </entry>
@@ -122,8 +122,8 @@
122
122
  <file leaf-file-name="utils.rb" pinned="false" current-in-tab="false">
123
123
  <entry file="file://$PROJECT_DIR$/lib/utils.rb">
124
124
  <provider selected="true" editor-type-id="text-editor">
125
- <state relative-caret-position="470">
126
- <caret line="145" lean-forward="true" selection-start-line="145" selection-end-line="145" />
125
+ <state relative-caret-position="339">
126
+ <caret line="93" column="33" lean-forward="true" selection-start-line="93" selection-start-column="18" selection-end-line="93" selection-end-column="33" />
127
127
  </state>
128
128
  </provider>
129
129
  </entry>
@@ -131,8 +131,8 @@
131
131
  <file leaf-file-name="wash_trade.rb" pinned="false" current-in-tab="false">
132
132
  <entry file="file://$PROJECT_DIR$/lib/Deamons/wash_trade.rb">
133
133
  <provider selected="true" editor-type-id="text-editor">
134
- <state relative-caret-position="381">
135
- <caret line="29" column="16" lean-forward="true" selection-start-line="29" selection-start-column="16" selection-end-line="29" selection-end-column="16" />
134
+ <state relative-caret-position="534">
135
+ <caret line="30" column="16" lean-forward="true" selection-start-line="30" selection-start-column="16" selection-end-line="30" selection-end-column="16" />
136
136
  </state>
137
137
  </provider>
138
138
  </entry>
@@ -169,6 +169,8 @@
169
169
  <find>post</find>
170
170
  <find>\n</find>
171
171
  <find>ethusd_price</find>
172
+ <find>mm</find>
173
+ <find>rand</find>
172
174
  </findStrings>
173
175
  </component>
174
176
  <component name="Git.Settings">
@@ -208,9 +210,9 @@
208
210
  <option value="$PROJECT_DIR$/lib/Deamons/bitcoind.rb" />
209
211
  <option value="$PROJECT_DIR$/SimBot.gemspec" />
210
212
  <option value="$PROJECT_DIR$/.ruby-version" />
211
- <option value="$PROJECT_DIR$/lib/SimBot.rb" />
212
- <option value="$PROJECT_DIR$/lib/Deamons/wash_trade.rb" />
213
213
  <option value="$PROJECT_DIR$/lib/utils.rb" />
214
+ <option value="$PROJECT_DIR$/lib/Deamons/wash_trade.rb" />
215
+ <option value="$PROJECT_DIR$/lib/SimBot.rb" />
214
216
  <option value="$PROJECT_DIR$/lib/SimBot/version.rb" />
215
217
  </list>
216
218
  </option>
@@ -225,17 +227,16 @@
225
227
  <packageJsonPaths />
226
228
  </component>
227
229
  <component name="ProjectFrameBounds">
228
- <option name="x" value="1647" />
230
+ <option name="x" value="65" />
229
231
  <option name="y" value="23" />
230
232
  <option name="width" value="1615" />
231
- <option name="height" value="1057" />
233
+ <option name="height" value="1027" />
232
234
  </component>
233
235
  <component name="ProjectView">
234
236
  <navigator proportions="" version="1">
235
237
  <foldersAlwaysOnTop value="true" />
236
238
  </navigator>
237
239
  <panes>
238
- <pane id="Scope" />
239
240
  <pane id="ProjectPane">
240
241
  <subPane>
241
242
  <expand>
@@ -254,16 +255,11 @@
254
255
  <item name="lib" type="462c0819:PsiDirectoryNode" />
255
256
  <item name="Deamons" type="462c0819:PsiDirectoryNode" />
256
257
  </path>
257
- <path>
258
- <item name="SimBot" type="b2602c69:ProjectViewProjectNode" />
259
- <item name="SimBot" type="462c0819:PsiDirectoryNode" />
260
- <item name="lib" type="462c0819:PsiDirectoryNode" />
261
- <item name="SimBot" type="462c0819:PsiDirectoryNode" />
262
- </path>
263
258
  </expand>
264
259
  <select />
265
260
  </subPane>
266
261
  </pane>
262
+ <pane id="Scope" />
267
263
  </panes>
268
264
  </component>
269
265
  <component name="PropertiesComponent">
@@ -347,12 +343,14 @@
347
343
  <workItem from="1540392568366" duration="1094000" />
348
344
  <workItem from="1543308539466" duration="4000" />
349
345
  <workItem from="1543413426007" duration="137000" />
350
- <workItem from="1543938137760" duration="3025000" />
346
+ <workItem from="1543938137760" duration="3461000" />
347
+ <workItem from="1544462202927" duration="460000" />
348
+ <workItem from="1544890937953" duration="1463000" />
351
349
  </task>
352
350
  <servers />
353
351
  </component>
354
352
  <component name="TimeTrackingManager">
355
- <option name="totallyTimeSpent" value="184723000" />
353
+ <option name="totallyTimeSpent" value="187082000" />
356
354
  </component>
357
355
  <component name="TodoView">
358
356
  <todo-panel id="selected-file">
@@ -364,21 +362,21 @@
364
362
  </todo-panel>
365
363
  </component>
366
364
  <component name="ToolWindowManager">
367
- <frame x="1647" y="23" width="1615" height="1057" extended-state="0" />
365
+ <frame x="65" y="23" width="1615" height="1027" extended-state="0" />
368
366
  <editor active="true" />
369
367
  <layout>
370
- <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.16973935" />
368
+ <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.17355372" />
371
369
  <window_info anchor="bottom" id="TODO" order="6" weight="0.32995495" />
372
370
  <window_info anchor="bottom" id="Docker" order="7" show_stripe_button="false" />
373
371
  <window_info anchor="bottom" id="Event Log" order="11" sideWeight="0.30114448" side_tool="true" weight="0.44097695" />
374
372
  <window_info anchor="right" id="Database" order="3" />
375
373
  <window_info anchor="bottom" id="Database Changes" order="8" show_stripe_button="false" />
376
- <window_info anchor="bottom" id="Version Control" order="10" weight="0.3292683" />
377
374
  <window_info anchor="bottom" id="Run" order="2" sideWeight="0.6044349" weight="0.35262594" />
375
+ <window_info anchor="bottom" id="Version Control" order="10" weight="0.3292683" />
378
376
  <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
379
- <window_info active="true" anchor="bottom" id="Terminal" order="9" sideWeight="0.6988555" visible="true" weight="0.18649517" />
380
- <window_info id="Favorites" order="2" side_tool="true" />
377
+ <window_info anchor="bottom" id="Terminal" order="9" sideWeight="0.6988555" visible="true" weight="0.18604651" />
381
378
  <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
379
+ <window_info id="Favorites" order="2" side_tool="true" />
382
380
  <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
383
381
  <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
384
382
  <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
@@ -599,31 +597,31 @@
599
597
  </state>
600
598
  </provider>
601
599
  </entry>
602
- <entry file="file://$PROJECT_DIR$/lib/Deamons/bitcoind.rb">
600
+ <entry file="file://$PROJECT_DIR$/lib/utils.rb">
603
601
  <provider selected="true" editor-type-id="text-editor">
604
- <state relative-caret-position="115">
605
- <caret line="5" column="19" lean-forward="true" selection-start-line="5" selection-start-column="19" selection-end-line="5" selection-end-column="19" />
602
+ <state relative-caret-position="339">
603
+ <caret line="93" column="33" lean-forward="true" selection-start-line="93" selection-start-column="18" selection-end-line="93" selection-end-column="33" />
606
604
  </state>
607
605
  </provider>
608
606
  </entry>
609
- <entry file="file://$PROJECT_DIR$/lib/Deamons/wash_trade.rb">
607
+ <entry file="file://$PROJECT_DIR$/lib/Deamons/bitcoind.rb">
610
608
  <provider selected="true" editor-type-id="text-editor">
611
- <state relative-caret-position="381">
612
- <caret line="29" column="16" lean-forward="true" selection-start-line="29" selection-start-column="16" selection-end-line="29" selection-end-column="16" />
609
+ <state relative-caret-position="115">
610
+ <caret line="5" column="19" selection-start-line="5" selection-start-column="19" selection-end-line="5" selection-end-column="19" />
613
611
  </state>
614
612
  </provider>
615
613
  </entry>
616
614
  <entry file="file://$PROJECT_DIR$/lib/SimBot.rb">
617
615
  <provider selected="true" editor-type-id="text-editor">
618
- <state relative-caret-position="1843">
619
- <caret line="105" column="3" lean-forward="true" selection-start-line="105" selection-start-column="3" selection-end-line="105" selection-end-column="3" />
616
+ <state relative-caret-position="406">
617
+ <caret line="31" column="7" lean-forward="true" selection-start-line="31" selection-start-column="7" selection-end-line="31" selection-end-column="7" />
620
618
  </state>
621
619
  </provider>
622
620
  </entry>
623
- <entry file="file://$PROJECT_DIR$/lib/utils.rb">
621
+ <entry file="file://$PROJECT_DIR$/lib/Deamons/wash_trade.rb">
624
622
  <provider selected="true" editor-type-id="text-editor">
625
- <state relative-caret-position="470">
626
- <caret line="145" lean-forward="true" selection-start-line="145" selection-end-line="145" />
623
+ <state relative-caret-position="534">
624
+ <caret line="30" column="16" lean-forward="true" selection-start-line="30" selection-start-column="16" selection-end-line="30" selection-end-column="16" />
627
625
  </state>
628
626
  </provider>
629
627
  </entry>
@@ -5,12 +5,13 @@ module Deamons
5
5
  class WashTrade
6
6
  require 'utils'
7
7
 
8
- def initialize(api, market, freq)
8
+ def initialize(api, market, freq, vol)
9
9
  @g_count = 1
10
10
  @range = 1.015
11
11
  @api = api
12
12
  @market = market
13
13
  @freq = freq
14
+ @volume = vol
14
15
  Process.fork do
15
16
  Process.daemon(true)
16
17
  pid = Process.pid
@@ -25,12 +26,12 @@ module Deamons
25
26
  count = 0
26
27
  puts "--------#{@market} -------"
27
28
  loop do
28
- vol = rand(0.05...0.225) * (Math.sin(Time.now.hour / 6.00)
29
+ vol = rand(@volume...@volume*1.3) * (Math.sin(Time.now.hour / 6.00)
29
30
  + 1.00) * Utils.rand_for_hour(1.5, 2)
30
31
  vol /= 1
31
32
  price = aug_price
32
- @api.post_order(@market, price, vol, 'buy')
33
- @api.post_order(@market, price, vol, 'sell')
33
+ @api.post_order(@market, price, vol, 'buy') if rand(1...100) < 22
34
+ @api.post_order(@market, price, vol, 'sell') if rand(1...100) < 22
34
35
  puts "order ##{count} placed"
35
36
  delay = (1 / @freq).to_i
36
37
  sleep(rand(delay...delay + 2))
@@ -25,9 +25,10 @@ module SimBot
25
25
  method_option :app_id, type: :string, default: 'ceca08fbc83c2fb4eb53bb026489', desc: 'Peatio applicaiton id from Barong'
26
26
  method_option :market, type: :string, default: 'btcbch', required: false, desc: 'OVEX market for SimBot to interact with'
27
27
  method_option :freq, type: :numeric, default: 1, desc: 'Frequency for trades to be added'
28
+ method_option :vol, type: :numeric, default: 0.5, desc: 'Volume for trades to be added @'
28
29
  def wash
29
30
  api = ApiController::Peatio.new(options[:peatio_base_url], options[:barong_base_url], options[:app_id], options[:email], options[:password])
30
- Deamons::WashTrade.new(api, options[:market], options[:freq])
31
+ Deamons::WashTrade.new(api, options[:market], options[:freq], options[:vol])
31
32
  end
32
33
  desc 'mm', 'Starts a market maker'
33
34
  method_option :email, type: :string, default: 'admin@ovex.io', required: true, desc: 'Your OVEX email address'
@@ -1,3 +1,3 @@
1
1
  module SimBot
2
- VERSION = "0.1.39"
2
+ VERSION = "0.1.40"
3
3
  end
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.39
4
+ version: 0.1.40
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-12-05 00:00:00.000000000 Z
11
+ date: 2018-12-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler