SimBot 0.1.14 → 0.1.15

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: ef2fd854c112b6a7114a61ba689aa3e66891038db441e72b767f75e4c5370c0d
4
- data.tar.gz: 68fee626ae8f6bff7fdb99c6d856896895f99eaf0ea7c2131bd63cd35568f585
3
+ metadata.gz: 1ef88e7997f31e652ddd2d1a95fc8f797c1989ba9566a00d0e43c3d01c06ba88
4
+ data.tar.gz: 323e328ca2921b190b00ea3140bfc9e59814a17d0cbf61462762cfc26d68f3a8
5
5
  SHA512:
6
- metadata.gz: 638223db8acb8c541f750f5e5af5100bd082d0f5a589a6f12341bb412f38e8fa288dff807baa9bf5280f5d8e3d8b78cb7b6976a9b41b1c5c2e96e54f26e2a709
7
- data.tar.gz: 37c4ba8be466b9272ed5128749118ab52871aacea1433db69cb43056a6f6984b8c516995b25e85a0f3a48b7831e7d9120b096cddf208873c9abe1a4031bedac8
6
+ metadata.gz: 570003ee42cf92583a591c6162226808f6f89d89c58a34189c769c3af34e96a97abc2c7e6cebe2ba5801b2d9ca0f8168749fd5ee752a60a7b61a995069ff0065
7
+ data.tar.gz: 2672199c5784d950b4ea40ca91c17fe45ba37f722c76a8c350b94f320d1ef0bb04d948235331bc5870885f340216eda475e3e32efd1ace6a7c35ad30eb5073d3
@@ -23,6 +23,8 @@
23
23
  <orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v3.7.0, RVM: ruby-2.5.1 [SimBot]) [gem]" level="application" />
24
24
  <orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v3.7.0, RVM: ruby-2.5.1 [SimBot]) [gem]" level="application" />
25
25
  <orderEntry type="library" scope="PROVIDED" name="rspec-support (v3.7.1, RVM: ruby-2.5.1 [SimBot]) [gem]" level="application" />
26
+ <orderEntry type="library" scope="PROVIDED" name="ruby-ole (v1.2.12.1, RVM: ruby-2.5.1 [SimBot]) [gem]" level="application" />
27
+ <orderEntry type="library" scope="PROVIDED" name="spreadsheet (v1.1.7, RVM: ruby-2.5.1 [SimBot]) [gem]" level="application" />
26
28
  <orderEntry type="library" scope="PROVIDED" name="thor (v0.20.0, RVM: ruby-2.5.1 [SimBot]) [gem]" level="application" />
27
29
  <orderEntry type="library" scope="PROVIDED" name="unf (v0.1.4, RVM: ruby-2.5.1 [SimBot]) [gem]" level="application" />
28
30
  <orderEntry type="library" scope="PROVIDED" name="unf_ext (v0.0.7.5, RVM: ruby-2.5.1 [SimBot]) [gem]" level="application" />
@@ -2,12 +2,14 @@
2
2
  <project version="4">
3
3
  <component name="ChangeListManager">
4
4
  <list default="true" id="d905eaf2-5cab-434b-a4d1-1ccf165356a4" name="Default" comment="">
5
+ <change beforePath="$PROJECT_DIR$/.idea/SimBot.iml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/SimBot.iml" afterDir="false" />
5
6
  <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
6
7
  <change beforePath="$PROJECT_DIR$/Gemfile.lock" beforeDir="false" afterPath="$PROJECT_DIR$/Gemfile.lock" afterDir="false" />
7
- <change beforePath="$PROJECT_DIR$/SimBot-0.1.12.gem" beforeDir="false" />
8
+ <change beforePath="$PROJECT_DIR$/SimBot-0.1.14.gem" beforeDir="false" />
9
+ <change beforePath="$PROJECT_DIR$/SimBot.gemspec" beforeDir="false" afterPath="$PROJECT_DIR$/SimBot.gemspec" afterDir="false" />
10
+ <change beforePath="$PROJECT_DIR$/lib/SimBot.rb" beforeDir="false" afterPath="$PROJECT_DIR$/lib/SimBot.rb" afterDir="false" />
8
11
  <change beforePath="$PROJECT_DIR$/lib/SimBot/version.rb" beforeDir="false" afterPath="$PROJECT_DIR$/lib/SimBot/version.rb" afterDir="false" />
9
- <change beforePath="$PROJECT_DIR$/lib/api_controller.rb" beforeDir="false" afterPath="$PROJECT_DIR$/lib/api_controller.rb" afterDir="false" />
10
- <change beforePath="$PROJECT_DIR$/lib/wash_trade.rb" beforeDir="false" afterPath="$PROJECT_DIR$/lib/wash_trade.rb" afterDir="false" />
12
+ <change beforePath="$PROJECT_DIR$/lib/utils.rb" beforeDir="false" afterPath="$PROJECT_DIR$/lib/utils.rb" afterDir="false" />
11
13
  </list>
12
14
  <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
13
15
  <option name="TRACKING_ENABLED" value="true" />
@@ -20,14 +22,23 @@
20
22
  <SUITE FILE_PATH="coverage/SimBot@Install_My_Gem.rcov" NAME="Install My Gem Coverage Results" MODIFIED="1528479809312" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="SimBot" />
21
23
  </component>
22
24
  <component name="FileEditorManager">
23
- <splitter split-orientation="horizontal" split-proportion="0.52644426">
25
+ <splitter split-orientation="horizontal" split-proportion="0.4615964">
24
26
  <split-first>
25
27
  <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
26
- <file leaf-file-name="SimBot.rb" pinned="false" current-in-tab="false">
28
+ <file leaf-file-name="SimBot.rb" pinned="false" current-in-tab="true">
27
29
  <entry file="file://$PROJECT_DIR$/lib/SimBot.rb">
28
30
  <provider selected="true" editor-type-id="text-editor">
29
- <state relative-caret-position="897">
30
- <caret line="39" column="7" selection-start-line="39" selection-start-column="7" selection-end-line="39" selection-end-column="7" />
31
+ <state relative-caret-position="204">
32
+ <caret line="21" column="15" selection-start-line="21" selection-start-column="15" selection-end-line="21" selection-end-column="15" />
33
+ </state>
34
+ </provider>
35
+ </entry>
36
+ </file>
37
+ <file leaf-file-name="spec_helper.rb" pinned="false" current-in-tab="false">
38
+ <entry file="file://$PROJECT_DIR$/spec/spec_helper.rb">
39
+ <provider selected="true" editor-type-id="text-editor">
40
+ <state relative-caret-position="138">
41
+ <caret line="6" selection-start-line="6" selection-end-line="6" />
31
42
  </state>
32
43
  </provider>
33
44
  </entry>
@@ -35,8 +46,8 @@
35
46
  <file leaf-file-name="SimBot" pinned="false" current-in-tab="false">
36
47
  <entry file="file://$PROJECT_DIR$/exe/SimBot">
37
48
  <provider selected="true" editor-type-id="text-editor">
38
- <state relative-caret-position="92">
39
- <caret line="4" column="7" selection-start-line="4" selection-start-column="7" selection-end-line="4" selection-end-column="7" />
49
+ <state relative-caret-position="69">
50
+ <caret line="3" selection-start-line="3" selection-end-line="3" />
40
51
  </state>
41
52
  </provider>
42
53
  </entry>
@@ -50,20 +61,11 @@
50
61
  </provider>
51
62
  </entry>
52
63
  </file>
53
- <file leaf-file-name="version.rb" pinned="false" current-in-tab="true">
54
- <entry file="file://$PROJECT_DIR$/lib/SimBot/version.rb">
64
+ <file leaf-file-name="peatio.rb" pinned="false" current-in-tab="false">
65
+ <entry file="file://$PROJECT_DIR$/lib/ApiController/peatio.rb">
55
66
  <provider selected="true" editor-type-id="text-editor">
56
- <state relative-caret-position="23">
57
- <caret line="1" column="19" selection-start-line="1" selection-start-column="19" selection-end-line="1" selection-end-column="19" />
58
- </state>
59
- </provider>
60
- </entry>
61
- </file>
62
- <file leaf-file-name="api_controller.rb" pinned="false" current-in-tab="false">
63
- <entry file="file://$PROJECT_DIR$/lib/api_controller.rb">
64
- <provider selected="true" editor-type-id="text-editor">
65
- <state relative-caret-position="460">
66
- <caret line="20" column="27" selection-start-line="20" selection-start-column="27" selection-end-line="20" selection-end-column="27" />
67
+ <state relative-caret-position="529">
68
+ <caret line="23" column="44" selection-start-line="23" selection-start-column="44" selection-end-line="23" selection-end-column="44" />
67
69
  </state>
68
70
  </provider>
69
71
  </entry>
@@ -75,26 +77,26 @@
75
77
  <file leaf-file-name="utils.rb" pinned="false" current-in-tab="false">
76
78
  <entry file="file://$PROJECT_DIR$/lib/utils.rb">
77
79
  <provider selected="true" editor-type-id="text-editor">
78
- <state relative-caret-position="595">
79
- <caret line="27" column="5" selection-start-line="27" selection-start-column="5" selection-end-line="27" selection-end-column="5" />
80
+ <state relative-caret-position="324">
81
+ <caret line="23" column="18" lean-forward="true" selection-start-line="23" selection-start-column="18" selection-end-line="23" selection-end-column="18" />
80
82
  </state>
81
83
  </provider>
82
84
  </entry>
83
85
  </file>
84
- <file leaf-file-name="Gemfile" pinned="false" current-in-tab="false">
85
- <entry file="file://$PROJECT_DIR$/Gemfile">
86
+ <file leaf-file-name="version.rb" pinned="false" current-in-tab="true">
87
+ <entry file="file://$PROJECT_DIR$/lib/SimBot/version.rb">
86
88
  <provider selected="true" editor-type-id="text-editor">
87
- <state relative-caret-position="138">
88
- <caret line="6" selection-start-line="6" selection-end-line="6" />
89
+ <state relative-caret-position="23">
90
+ <caret line="1" column="19" selection-start-line="1" selection-start-column="19" selection-end-line="1" selection-end-column="19" />
89
91
  </state>
90
92
  </provider>
91
93
  </entry>
92
94
  </file>
93
- <file leaf-file-name="barong.rb" pinned="false" current-in-tab="false">
94
- <entry file="file://$PROJECT_DIR$/lib/barong.rb">
95
+ <file leaf-file-name="wash_trade.rb" pinned="false" current-in-tab="false">
96
+ <entry file="file://$PROJECT_DIR$/lib/Deamons/wash_trade.rb">
95
97
  <provider selected="true" editor-type-id="text-editor">
96
- <state relative-caret-position="92">
97
- <caret line="4" column="25" selection-start-line="4" selection-start-column="25" selection-end-line="4" selection-end-column="25" />
98
+ <state relative-caret-position="299">
99
+ <caret line="13" column="21" lean-forward="true" selection-start-line="13" selection-start-column="21" selection-end-line="13" selection-end-column="21" />
98
100
  </state>
99
101
  </provider>
100
102
  </entry>
@@ -102,26 +104,17 @@
102
104
  <file leaf-file-name="SimBot.gemspec" pinned="false" current-in-tab="false">
103
105
  <entry file="file://$PROJECT_DIR$/SimBot.gemspec">
104
106
  <provider selected="true" editor-type-id="text-editor">
105
- <state relative-caret-position="483">
106
- <caret line="21" column="32" selection-start-line="21" selection-start-column="32" selection-end-line="21" selection-end-column="32" />
107
- </state>
108
- </provider>
109
- </entry>
110
- </file>
111
- <file leaf-file-name="wash_trade.rb" pinned="false" current-in-tab="true">
112
- <entry file="file://$PROJECT_DIR$/lib/wash_trade.rb">
113
- <provider selected="true" editor-type-id="text-editor">
114
- <state relative-caret-position="632">
115
- <caret line="37" column="7" lean-forward="true" selection-start-line="37" selection-start-column="7" selection-end-line="37" selection-end-column="7" />
107
+ <state relative-caret-position="851">
108
+ <caret line="37" column="35" selection-start-line="37" selection-start-column="35" selection-end-line="37" selection-end-column="35" />
116
109
  </state>
117
110
  </provider>
118
111
  </entry>
119
112
  </file>
120
- <file leaf-file-name="SimBot_spec.rb" pinned="false" current-in-tab="false">
121
- <entry file="file://$PROJECT_DIR$/spec/SimBot_spec.rb">
113
+ <file leaf-file-name="Gemfile" pinned="false" current-in-tab="false">
114
+ <entry file="file://$PROJECT_DIR$/Gemfile">
122
115
  <provider selected="true" editor-type-id="text-editor">
123
- <state relative-caret-position="161">
124
- <caret line="7" column="5" selection-start-line="7" selection-start-column="5" selection-end-line="7" selection-end-column="5" />
116
+ <state relative-caret-position="138">
117
+ <caret line="6" selection-start-line="6" selection-end-line="6" />
125
118
  </state>
126
119
  </provider>
127
120
  </entry>
@@ -152,15 +145,17 @@
152
145
  <option value="$PROJECT_DIR$/exe/SimBot" />
153
146
  <option value="$PROJECT_DIR$/lib/utilities.rb" />
154
147
  <option value="$PROJECT_DIR$/.gitignore" />
155
- <option value="$PROJECT_DIR$/lib/barong.rb" />
156
- <option value="$PROJECT_DIR$/SimBot.gemspec" />
157
148
  <option value="$PROJECT_DIR$/lib/Deamons/WashTrade.rb" />
158
149
  <option value="$PROJECT_DIR$/lib/Deamons/deamon.rb" />
150
+ <option value="$PROJECT_DIR$/lib/barong.rb" />
151
+ <option value="$PROJECT_DIR$/lib/api_controller.rb" />
152
+ <option value="$PROJECT_DIR$/lib/wash_trade.rb" />
153
+ <option value="$PROJECT_DIR$/lib/peatio.rb" />
159
154
  <option value="$PROJECT_DIR$/lib/Deamons/wash_trade.rb" />
155
+ <option value="$PROJECT_DIR$/spec/spec_helper.rb" />
156
+ <option value="$PROJECT_DIR$/SimBot.gemspec" />
160
157
  <option value="$PROJECT_DIR$/lib/SimBot.rb" />
161
158
  <option value="$PROJECT_DIR$/lib/utils.rb" />
162
- <option value="$PROJECT_DIR$/lib/api_controller.rb" />
163
- <option value="$PROJECT_DIR$/lib/wash_trade.rb" />
164
159
  <option value="$PROJECT_DIR$/lib/SimBot/version.rb" />
165
160
  </list>
166
161
  </option>
@@ -175,9 +170,9 @@
175
170
  <packageJsonPaths />
176
171
  </component>
177
172
  <component name="ProjectFrameBounds">
178
- <option name="x" value="1440" />
173
+ <option name="x" value="1545" />
179
174
  <option name="y" value="22" />
180
- <option name="width" value="1615" />
175
+ <option name="width" value="1645" />
181
176
  <option name="height" value="1058" />
182
177
  </component>
183
178
  <component name="ProjectView">
@@ -185,7 +180,6 @@
185
180
  <foldersAlwaysOnTop value="true" />
186
181
  </navigator>
187
182
  <panes>
188
- <pane id="Scope" />
189
183
  <pane id="ProjectPane">
190
184
  <subPane>
191
185
  <expand>
@@ -213,6 +207,7 @@
213
207
  <select />
214
208
  </subPane>
215
209
  </pane>
210
+ <pane id="Scope" />
216
211
  </panes>
217
212
  </component>
218
213
  <component name="PropertiesComponent">
@@ -222,13 +217,14 @@
222
217
  <property name="settings.editor.selected.configurable" value="preferences.pluginManager" />
223
218
  </component>
224
219
  <component name="RecentsManager">
225
- <key name="MoveFile.RECENT_KEYS">
226
- <recent name="$PROJECT_DIR$/lib" />
227
- <recent name="$PROJECT_DIR$/lib/Deamons" />
228
- </key>
229
220
  <key name="CopyFile.RECENT_KEYS">
230
221
  <recent name="$PROJECT_DIR$" />
231
222
  </key>
223
+ <key name="MoveFile.RECENT_KEYS">
224
+ <recent name="$PROJECT_DIR$/lib/ApiController" />
225
+ <recent name="$PROJECT_DIR$/lib/Deamons" />
226
+ <recent name="$PROJECT_DIR$/lib" />
227
+ </key>
232
228
  </component>
233
229
  <component name="RunDashboard">
234
230
  <option name="ruleStates">
@@ -276,27 +272,29 @@
276
272
  <updated>1525279604835</updated>
277
273
  <workItem from="1525279607229" duration="36216000" />
278
274
  <workItem from="1528301072964" duration="35313000" />
279
- <workItem from="1528709208580" duration="16041000" />
275
+ <workItem from="1528709208580" duration="28075000" />
276
+ <workItem from="1529482548938" duration="7932000" />
277
+ <workItem from="1531747087172" duration="1203000" />
280
278
  </task>
281
279
  <servers />
282
280
  </component>
283
281
  <component name="TimeTrackingManager">
284
- <option name="totallyTimeSpent" value="87570000" />
282
+ <option name="totallyTimeSpent" value="108739000" />
285
283
  </component>
286
284
  <component name="ToolWindowManager">
287
- <frame x="1440" y="22" width="1615" height="1058" extended-state="0" />
285
+ <frame x="1545" y="22" width="1645" height="1058" extended-state="0" />
288
286
  <editor active="true" />
289
287
  <layout>
290
- <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.22759059" />
288
+ <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.18964441" />
291
289
  <window_info anchor="bottom" id="TODO" order="6" />
292
290
  <window_info anchor="bottom" id="Docker" order="7" show_stripe_button="false" />
293
- <window_info anchor="bottom" id="Event Log" order="7" sideWeight="0.50380623" side_tool="true" weight="0.28540304" />
291
+ <window_info anchor="bottom" id="Event Log" order="7" sideWeight="0.51341236" side_tool="true" weight="0.3540305" />
294
292
  <window_info anchor="right" id="Database" order="3" />
295
293
  <window_info anchor="bottom" id="Database Changes" order="7" show_stripe_button="false" />
296
- <window_info anchor="bottom" id="Version Control" order="7" />
297
- <window_info anchor="bottom" id="Run" order="2" sideWeight="0.48719722" weight="0.28540304" />
294
+ <window_info anchor="bottom" id="Version Control" order="7" weight="0.3292683" />
295
+ <window_info anchor="bottom" id="Run" order="2" sideWeight="0.48658764" visible="true" weight="0.3540305" />
298
296
  <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
299
- <window_info anchor="bottom" id="Terminal" order="7" sideWeight="0.49619377" weight="0.41463414" />
297
+ <window_info anchor="bottom" id="Terminal" order="7" sideWeight="0.49619377" weight="0.34422657" />
300
298
  <window_info id="Favorites" order="2" side_tool="true" />
301
299
  <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
302
300
  <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
@@ -309,26 +307,26 @@
309
307
  <window_info anchor="bottom" id="Find" order="1" sideWeight="0.49896193" weight="0.32897604" />
310
308
  </layout>
311
309
  <layout-to-restore>
312
- <window_info anchor="right" content_ui="combo" id="Hierarchy" order="3" weight="0.25" />
313
- <window_info anchor="bottom" id="Docker" order="0" show_stripe_button="false" />
314
- <window_info anchor="bottom" id="Run" order="8" sideWeight="0.48719722" weight="0.2780807" />
315
- <window_info anchor="bottom" id="Cvs" order="10" weight="0.25" />
316
- <window_info content_ui="combo" id="Project" order="1" visible="true" weight="0.24982698" />
317
- <window_info id="Structure" order="2" side_tool="true" weight="0.25" />
318
- <window_info anchor="right" id="Commander" internal_type="SLIDING" order="1" type="SLIDING" weight="0.4" />
319
- <window_info anchor="right" id="Ant Build" order="2" weight="0.25" />
320
- <window_info anchor="bottom" id="TODO" order="12" />
321
- <window_info anchor="bottom" id="Inspection" order="11" weight="0.4" />
322
- <window_info anchor="bottom" id="Find" order="7" sideWeight="0.49896193" weight="0.32897604" />
323
- <window_info anchor="right" id="Database" order="0" />
324
- <window_info active="true" anchor="bottom" id="Terminal" order="2" sideWeight="0.49619377" visible="true" weight="0.20261438" />
325
- <window_info anchor="bottom" id="Debug" order="9" weight="0.4" />
326
- <window_info anchor="bottom" id="Database Changes" order="1" show_stripe_button="false" />
327
- <window_info anchor="bottom" id="Version Control" order="3" />
328
- <window_info anchor="bottom" id="Event Log" order="4" sideWeight="0.50380623" side_tool="true" weight="0.3293348" />
329
- <window_info anchor="bottom" id="Message" order="6" />
330
- <window_info anchor="bottom" id="Messages" order="5" sideWeight="0.49965397" weight="0.3293348" />
331
- <window_info id="Favorites" order="0" side_tool="true" />
310
+ <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
311
+ <window_info anchor="bottom" id="Docker" order="7" show_stripe_button="false" />
312
+ <window_info anchor="bottom" id="Run" order="2" sideWeight="0.48719722" weight="0.28540304" />
313
+ <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
314
+ <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.2123369" />
315
+ <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
316
+ <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
317
+ <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
318
+ <window_info anchor="bottom" id="TODO" order="6" />
319
+ <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
320
+ <window_info anchor="bottom" id="Find" order="1" sideWeight="0.49896193" weight="0.32897604" />
321
+ <window_info anchor="right" id="Database" order="3" />
322
+ <window_info anchor="bottom" id="Terminal" order="9" sideWeight="0.49619377" weight="0.41463414" />
323
+ <window_info anchor="bottom" id="Event Log" order="10" sideWeight="0.50380623" side_tool="true" weight="0.28540304" />
324
+ <window_info anchor="bottom" id="Database Changes" order="8" show_stripe_button="false" />
325
+ <window_info anchor="bottom" id="Version Control" order="11" />
326
+ <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
327
+ <window_info anchor="bottom" id="Message" order="0" />
328
+ <window_info anchor="bottom" id="Messages" order="12" sideWeight="0.49965397" weight="0.3293348" />
329
+ <window_info id="Favorites" order="2" side_tool="true" />
332
330
  </layout-to-restore>
333
331
  </component>
334
332
  <component name="TypeScriptGeneratedFilesManager">
@@ -342,10 +340,108 @@
342
340
  </component>
343
341
  <component name="XDebuggerManager">
344
342
  <breakpoint-manager>
345
- <option name="time" value="4" />
343
+ <option name="time" value="7" />
346
344
  </breakpoint-manager>
347
345
  </component>
348
346
  <component name="editorHistoryManager">
347
+ <entry file="file://$PROJECT_DIR$/lib/SimBot.rb">
348
+ <provider selected="true" editor-type-id="text-editor">
349
+ <state relative-caret-position="989">
350
+ <caret line="43" column="47" selection-start-line="43" selection-start-column="47" selection-end-line="43" selection-end-column="47" />
351
+ </state>
352
+ </provider>
353
+ </entry>
354
+ <entry file="file://$PROJECT_DIR$/spec/spec_helper.rb">
355
+ <provider selected="true" editor-type-id="text-editor">
356
+ <state relative-caret-position="138">
357
+ <caret line="6" selection-start-line="6" selection-end-line="6" />
358
+ </state>
359
+ </provider>
360
+ </entry>
361
+ <entry file="file://$PROJECT_DIR$/exe/SimBot">
362
+ <provider selected="true" editor-type-id="text-editor">
363
+ <state relative-caret-position="69">
364
+ <caret line="3" selection-start-line="3" selection-end-line="3" />
365
+ </state>
366
+ </provider>
367
+ </entry>
368
+ <entry file="file://$PROJECT_DIR$/.gitignore">
369
+ <provider selected="true" editor-type-id="text-editor">
370
+ <state relative-caret-position="322">
371
+ <caret line="14" selection-start-line="14" selection-end-line="14" />
372
+ </state>
373
+ </provider>
374
+ </entry>
375
+ <entry file="file://$PROJECT_DIR$/lib/ApiController/peatio.rb">
376
+ <provider selected="true" editor-type-id="text-editor">
377
+ <state relative-caret-position="529">
378
+ <caret line="23" column="44" selection-start-line="23" selection-start-column="44" selection-end-line="23" selection-end-column="44" />
379
+ </state>
380
+ </provider>
381
+ </entry>
382
+ <entry file="file://$PROJECT_DIR$/lib/utils.rb">
383
+ <provider selected="true" editor-type-id="text-editor">
384
+ <state relative-caret-position="2668">
385
+ <caret line="116" column="9" lean-forward="true" selection-start-line="116" selection-start-column="9" selection-end-line="116" selection-end-column="9" />
386
+ </state>
387
+ </provider>
388
+ </entry>
389
+ <entry file="file://$PROJECT_DIR$/SimBot.gemspec">
390
+ <provider selected="true" editor-type-id="text-editor">
391
+ <state relative-caret-position="851">
392
+ <caret line="37" column="35" lean-forward="true" selection-start-line="37" selection-start-column="35" selection-end-line="37" selection-end-column="35" />
393
+ </state>
394
+ </provider>
395
+ </entry>
396
+ <entry file="file://$PROJECT_DIR$/Gemfile">
397
+ <provider selected="true" editor-type-id="text-editor">
398
+ <state relative-caret-position="138">
399
+ <caret line="6" selection-start-line="6" selection-end-line="6" />
400
+ </state>
401
+ </provider>
402
+ </entry>
403
+ <entry file="file://$PROJECT_DIR$/lib/SimBot.rb">
404
+ <provider selected="true" editor-type-id="text-editor">
405
+ <state relative-caret-position="276">
406
+ <caret line="12" column="62" selection-start-line="12" selection-start-column="54" selection-end-line="12" selection-end-column="62" />
407
+ </state>
408
+ </provider>
409
+ </entry>
410
+ <entry file="file://$PROJECT_DIR$/spec/spec_helper.rb">
411
+ <provider selected="true" editor-type-id="text-editor">
412
+ <state relative-caret-position="138">
413
+ <caret line="6" selection-start-line="6" selection-end-line="6" />
414
+ </state>
415
+ </provider>
416
+ </entry>
417
+ <entry file="file://$PROJECT_DIR$/exe/SimBot">
418
+ <provider selected="true" editor-type-id="text-editor">
419
+ <state relative-caret-position="69">
420
+ <caret line="3" lean-forward="true" selection-start-line="3" selection-end-line="3" />
421
+ </state>
422
+ </provider>
423
+ </entry>
424
+ <entry file="file://$PROJECT_DIR$/.gitignore">
425
+ <provider selected="true" editor-type-id="text-editor">
426
+ <state relative-caret-position="322">
427
+ <caret line="14" selection-start-line="14" selection-end-line="14" />
428
+ </state>
429
+ </provider>
430
+ </entry>
431
+ <entry file="file://$PROJECT_DIR$/lib/ApiController/peatio.rb">
432
+ <provider selected="true" editor-type-id="text-editor">
433
+ <state relative-caret-position="529">
434
+ <caret line="23" column="44" lean-forward="true" selection-start-line="23" selection-start-column="44" selection-end-line="23" selection-end-column="44" />
435
+ </state>
436
+ </provider>
437
+ </entry>
438
+ <entry file="file://$PROJECT_DIR$/lib/utils.rb">
439
+ <provider selected="true" editor-type-id="text-editor">
440
+ <state relative-caret-position="2668">
441
+ <caret line="116" column="4" lean-forward="true" selection-start-line="116" selection-start-column="4" selection-end-line="116" selection-end-column="4" />
442
+ </state>
443
+ </provider>
444
+ </entry>
349
445
  <entry file="file://$PROJECT_DIR$/lib/SimBot.rb">
350
446
  <provider selected="true" editor-type-id="text-editor">
351
447
  <state relative-caret-position="345">
@@ -374,7 +470,7 @@
374
470
  </state>
375
471
  </provider>
376
472
  </entry>
377
- <entry file="file://$PROJECT_DIR$/lib/api_controller.rb">
473
+ <entry file="file://$PROJECT_DIR$/lib/ApiController/peatio.rb">
378
474
  <provider selected="true" editor-type-id="text-editor">
379
475
  <state relative-caret-position="184">
380
476
  <caret line="8" column="24" selection-start-line="8" selection-start-column="24" selection-end-line="8" selection-end-column="24" />
@@ -395,7 +491,7 @@
395
491
  </state>
396
492
  </provider>
397
493
  </entry>
398
- <entry file="file://$PROJECT_DIR$/lib/barong.rb">
494
+ <entry file="file://$PROJECT_DIR$/lib/ApiController/barong.rb">
399
495
  <provider selected="true" editor-type-id="text-editor">
400
496
  <state relative-caret-position="115">
401
497
  <caret line="5" selection-start-line="5" selection-end-line="8" selection-end-column="7" />
@@ -409,7 +505,7 @@
409
505
  </state>
410
506
  </provider>
411
507
  </entry>
412
- <entry file="file://$PROJECT_DIR$/lib/wash_trade.rb">
508
+ <entry file="file://$PROJECT_DIR$/lib/Deamons/wash_trade.rb">
413
509
  <provider selected="true" editor-type-id="text-editor">
414
510
  <state relative-caret-position="460">
415
511
  <caret line="20" column="15" lean-forward="true" selection-start-line="20" selection-start-column="15" selection-end-line="20" selection-end-column="15" />
@@ -423,7 +519,7 @@
423
519
  </state>
424
520
  </provider>
425
521
  </entry>
426
- <entry file="file://$PROJECT_DIR$/lib/api_controller.rb">
522
+ <entry file="file://$PROJECT_DIR$/lib/ApiController/peatio.rb">
427
523
  <provider selected="true" editor-type-id="text-editor">
428
524
  <state relative-caret-position="552">
429
525
  <caret line="24" column="5" lean-forward="true" selection-start-line="24" selection-start-column="5" selection-end-line="24" selection-end-column="5" />
@@ -483,13 +579,6 @@
483
579
  </provider>
484
580
  </entry>
485
581
  <entry file="file://$PROJECT_DIR$/lib/utilities.rb" />
486
- <entry file="file://$PROJECT_DIR$/Gemfile">
487
- <provider selected="true" editor-type-id="text-editor">
488
- <state relative-caret-position="138">
489
- <caret line="6" selection-start-line="6" selection-end-line="6" />
490
- </state>
491
- </provider>
492
- </entry>
493
582
  <entry file="file://$PROJECT_DIR$/bin/setup">
494
583
  <provider selected="true" editor-type-id="text-editor">
495
584
  <state relative-caret-position="184">
@@ -505,10 +594,188 @@
505
594
  </provider>
506
595
  </entry>
507
596
  <entry file="file://$PROJECT_DIR$/lib/Deamons/deamon.rb" />
508
- <entry file="file://$PROJECT_DIR$/lib/barong.rb">
597
+ <entry file="uml://Ruby/Utils">
598
+ <provider selected="true" editor-type-id="UmlEditorProvider">
599
+ <state>
600
+ <ID>Ruby</ID>
601
+ <OriginalElement>Utils</OriginalElement>
602
+ <nodes>
603
+ <node x="24.0" y="158.0">RSpec::Mocks::ArgumentMatchers</node>
604
+ <node x="632.0" y="79.0">FileUtils</node>
605
+ <node x="622.0" y="158.0">Rake::FileUtilsExt</node>
606
+ <node x="419.5" y="415.0">Module</node>
607
+ <node x="194.0" y="158.0">RSpec::Mocks::ExampleMethods::ExpectHost</node>
608
+ <node x="510.0" y="237.0">MakeMakefile</node>
609
+ <node x="0.0" y="568.0">RSpec::Mocks::AnyInstance</node>
610
+ <node x="516.5" y="415.0">Utils</node>
611
+ <node x="261.0" y="237.0">PP::ObjectMixin</node>
612
+ <node x="0.0" y="237.0">RSpec::Support::ShellOut</node>
613
+ <node x="644.0" y="237.0">Rake::DSL</node>
614
+ <node x="104.0" y="237.0">RSpec::Mocks::ExampleMethods</node>
615
+ <node x="385.0" y="237.0">BasicObject</node>
616
+ <node x="466.25" y="336.0">Object</node>
617
+ <node x="811.0" y="237.0">RSpec::Support::WhitespaceChecks</node>
618
+ <node x="720.0" y="237.0">Kernel</node>
619
+ <node x="425.5" y="494.0">Class</node>
620
+ <node x="617.5" y="0.0">FileUtils::StreamUtils_</node>
621
+ </nodes>
622
+ <notes />
623
+ <edges>
624
+ <edge source="FileUtils" target="FileUtils::StreamUtils_">
625
+ <point x="-20.0" y="-14.5" />
626
+ <point x="652.0" y="54.0" />
627
+ <point x="644.75" y="54.0" />
628
+ <point x="-27.25" y="14.5" />
629
+ </edge>
630
+ <edge source="RSpec::Mocks::ExampleMethods" target="RSpec::Mocks::ArgumentMatchers">
631
+ <point x="-34.25" y="-14.5" />
632
+ <point x="138.25" y="212.0" />
633
+ <point x="99.0" y="212.0" />
634
+ <point x="0.0" y="14.5" />
635
+ </edge>
636
+ <edge source="Object" target="PP::ObjectMixin">
637
+ <point x="-13.5" y="-14.5" />
638
+ <point x="488.75" y="296.0" />
639
+ <point x="313.0" y="296.0" />
640
+ <point x="0.0" y="14.5" />
641
+ </edge>
642
+ <edge source="Rake::FileUtilsExt" target="FileUtils">
643
+ <point x="0.0" y="-14.5" />
644
+ <point x="0.0" y="14.5" />
645
+ </edge>
646
+ <edge source="Rake::DSL" target="Rake::FileUtilsExt">
647
+ <point x="0.0" y="-14.5" />
648
+ <point x="0.0" y="14.5" />
649
+ </edge>
650
+ <edge source="Utils" target="Object">
651
+ <point x="0.0" y="-14.5" />
652
+ <point x="546.5" y="390.0" />
653
+ <point x="520.25" y="390.0" />
654
+ <point x="18.0" y="14.5" />
655
+ </edge>
656
+ <edge source="Object" target="RSpec::Support::WhitespaceChecks">
657
+ <point x="31.5" y="-14.5" />
658
+ <point x="533.75" y="316.0" />
659
+ <point x="885.5" y="316.0" />
660
+ <point x="0.0" y="14.5" />
661
+ </edge>
662
+ <edge source="Object" target="BasicObject">
663
+ <point x="-4.5" y="-14.5" />
664
+ <point x="497.75" y="286.0" />
665
+ <point x="437.5" y="286.0" />
666
+ <point x="0.0" y="14.5" />
667
+ </edge>
668
+ <edge source="Class" target="Module">
669
+ <point x="0.0" y="-14.5" />
670
+ <point x="0.0" y="14.5" />
671
+ </edge>
672
+ <edge source="RSpec::Mocks::ExampleMethods" target="RSpec::Mocks::ExampleMethods::ExpectHost">
673
+ <point x="34.25" y="-14.5" />
674
+ <point x="206.75" y="212.0" />
675
+ <point x="246.0" y="212.0" />
676
+ <point x="0.0" y="14.5" />
677
+ </edge>
678
+ <edge source="Object" target="Kernel">
679
+ <point x="22.5" y="-14.5" />
680
+ <point x="524.75" y="306.0" />
681
+ <point x="755.5" y="306.0" />
682
+ <point x="0.0" y="14.5" />
683
+ </edge>
684
+ <edge source="Object" target="RSpec::Support::ShellOut">
685
+ <point x="-31.5" y="-14.5" />
686
+ <point x="470.75" y="316.0" />
687
+ <point x="42.0" y="316.0" />
688
+ <point x="0.0" y="14.5" />
689
+ </edge>
690
+ <edge source="Module" target="Object">
691
+ <point x="0.0" y="-14.5" />
692
+ <point x="458.0" y="390.0" />
693
+ <point x="484.25" y="390.0" />
694
+ <point x="-18.0" y="14.5" />
695
+ </edge>
696
+ <edge source="Object" target="RSpec::Mocks::ExampleMethods">
697
+ <point x="-22.5" y="-14.5" />
698
+ <point x="479.75" y="306.0" />
699
+ <point x="172.5" y="306.0" />
700
+ <point x="0.0" y="14.5" />
701
+ </edge>
702
+ <edge source="Object" target="MakeMakefile">
703
+ <point x="4.5" y="-14.5" />
704
+ <point x="506.75" y="286.0" />
705
+ <point x="567.0" y="286.0" />
706
+ <point x="0.0" y="14.5" />
707
+ </edge>
708
+ <edge source="Object" target="Rake::DSL">
709
+ <point x="13.5" y="-14.5" />
710
+ <point x="515.75" y="296.0" />
711
+ <point x="672.0" y="296.0" />
712
+ <point x="0.0" y="14.5" />
713
+ </edge>
714
+ </edges>
715
+ <settings layout="Hierarchic Group" zoom="0.986734693877551" x="223.0" y="-181.0" />
716
+ <SelectedNodes>
717
+ <node>Utils</node>
718
+ </SelectedNodes>
719
+ <Categories />
720
+ <SCOPE>All</SCOPE>
721
+ </state>
722
+ </provider>
723
+ </entry>
724
+ <entry file="uml://GemDependency/#SimBot">
725
+ <provider selected="true" editor-type-id="UmlEditorProvider">
726
+ <state>
727
+ <ID>GemDependency</ID>
728
+ <OriginalElement>#SimBot</OriginalElement>
729
+ <nodes>
730
+ <node x="" y="">rspec-support</node>
731
+ <node x="" y="">rspec</node>
732
+ <node x="" y="">netrc</node>
733
+ <node x="" y="">rspec-core</node>
734
+ <node x="" y="">diff-lcs</node>
735
+ <node x="" y="">rspec-mocks</node>
736
+ <node x="" y="">rspec-expectations</node>
737
+ <node x="" y="">rake</node>
738
+ <node x="" y="">unf</node>
739
+ <node x="" y="">domain_name</node>
740
+ <node x="" y="">websocket</node>
741
+ <node x="" y="">http-cookie</node>
742
+ <node x="" y="">json</node>
743
+ <node x="" y="">unf_ext</node>
744
+ <node x="" y="">thor</node>
745
+ <node x="" y="">#SimBot</node>
746
+ <node x="" y="">pusher-client</node>
747
+ <node x="" y="">mime-types-data</node>
748
+ <node x="" y="">rest-client</node>
749
+ <node x="" y="">bundler</node>
750
+ <node x="" y="">mime-types</node>
751
+ </nodes>
752
+ <notes />
753
+ <edges />
754
+ <settings layout="Hierarchic Group" zoom="0.9383660806618407" x="360.0" y="295.0" />
755
+ <SelectedNodes />
756
+ <Categories />
757
+ <SCOPE>All</SCOPE>
758
+ </state>
759
+ </provider>
760
+ </entry>
761
+ <entry file="file://$PROJECT_DIR$/lib/ApiController/barong.rb">
509
762
  <provider selected="true" editor-type-id="text-editor">
510
- <state relative-caret-position="92">
511
- <caret line="4" column="25" selection-start-line="4" selection-start-column="25" selection-end-line="4" selection-end-column="25" />
763
+ <state relative-caret-position="575">
764
+ <caret line="25" column="5" lean-forward="true" selection-start-line="25" selection-start-column="5" selection-end-line="25" selection-end-column="5" />
765
+ </state>
766
+ </provider>
767
+ </entry>
768
+ <entry file="file://$PROJECT_DIR$/spec/SimBot_spec.rb">
769
+ <provider selected="true" editor-type-id="text-editor">
770
+ <state relative-caret-position="207">
771
+ <caret line="9" lean-forward="true" selection-start-line="9" selection-end-line="9" />
772
+ </state>
773
+ </provider>
774
+ </entry>
775
+ <entry file="file://$PROJECT_DIR$/exe/SimBot">
776
+ <provider selected="true" editor-type-id="text-editor">
777
+ <state relative-caret-position="69">
778
+ <caret line="3" selection-start-line="3" selection-end-line="3" />
512
779
  </state>
513
780
  </provider>
514
781
  </entry>
@@ -519,52 +786,52 @@
519
786
  </state>
520
787
  </provider>
521
788
  </entry>
522
- <entry file="file://$PROJECT_DIR$/spec/SimBot_spec.rb">
789
+ <entry file="file://$PROJECT_DIR$/lib/ApiController/peatio.rb">
523
790
  <provider selected="true" editor-type-id="text-editor">
524
- <state relative-caret-position="161">
525
- <caret line="7" column="5" selection-start-line="7" selection-start-column="5" selection-end-line="7" selection-end-column="5" />
791
+ <state relative-caret-position="529">
792
+ <caret line="23" column="44" selection-start-line="23" selection-start-column="44" selection-end-line="23" selection-end-column="44" />
526
793
  </state>
527
794
  </provider>
528
795
  </entry>
529
- <entry file="file://$PROJECT_DIR$/lib/utils.rb">
796
+ <entry file="file://$PROJECT_DIR$/spec/spec_helper.rb">
530
797
  <provider selected="true" editor-type-id="text-editor">
531
- <state relative-caret-position="595">
532
- <caret line="27" column="5" selection-start-line="27" selection-start-column="5" selection-end-line="27" selection-end-column="5" />
798
+ <state relative-caret-position="138">
799
+ <caret line="6" selection-start-line="6" selection-end-line="6" />
533
800
  </state>
534
801
  </provider>
535
802
  </entry>
536
- <entry file="file://$PROJECT_DIR$/SimBot.gemspec">
803
+ <entry file="file://$PROJECT_DIR$/Gemfile">
537
804
  <provider selected="true" editor-type-id="text-editor">
538
- <state relative-caret-position="483">
539
- <caret line="21" column="32" selection-start-line="21" selection-start-column="32" selection-end-line="21" selection-end-column="32" />
805
+ <state relative-caret-position="138">
806
+ <caret line="6" selection-start-line="6" selection-end-line="6" />
540
807
  </state>
541
808
  </provider>
542
809
  </entry>
543
- <entry file="file://$PROJECT_DIR$/lib/wash_trade.rb">
810
+ <entry file="file://$PROJECT_DIR$/SimBot.gemspec">
544
811
  <provider selected="true" editor-type-id="text-editor">
545
- <state relative-caret-position="632">
546
- <caret line="37" column="7" lean-forward="true" selection-start-line="37" selection-start-column="7" selection-end-line="37" selection-end-column="7" />
812
+ <state relative-caret-position="851">
813
+ <caret line="37" column="35" selection-start-line="37" selection-start-column="35" selection-end-line="37" selection-end-column="35" />
547
814
  </state>
548
815
  </provider>
549
816
  </entry>
550
817
  <entry file="file://$PROJECT_DIR$/lib/SimBot.rb">
551
818
  <provider selected="true" editor-type-id="text-editor">
552
- <state relative-caret-position="897">
553
- <caret line="39" column="7" selection-start-line="39" selection-start-column="7" selection-end-line="39" selection-end-column="7" />
819
+ <state relative-caret-position="204">
820
+ <caret line="21" column="15" selection-start-line="21" selection-start-column="15" selection-end-line="21" selection-end-column="15" />
554
821
  </state>
555
822
  </provider>
556
823
  </entry>
557
- <entry file="file://$PROJECT_DIR$/exe/SimBot">
824
+ <entry file="file://$PROJECT_DIR$/lib/Deamons/wash_trade.rb">
558
825
  <provider selected="true" editor-type-id="text-editor">
559
- <state relative-caret-position="92">
560
- <caret line="4" column="7" selection-start-line="4" selection-start-column="7" selection-end-line="4" selection-end-column="7" />
826
+ <state relative-caret-position="299">
827
+ <caret line="13" column="21" lean-forward="true" selection-start-line="13" selection-start-column="21" selection-end-line="13" selection-end-column="21" />
561
828
  </state>
562
829
  </provider>
563
830
  </entry>
564
- <entry file="file://$PROJECT_DIR$/lib/api_controller.rb">
831
+ <entry file="file://$PROJECT_DIR$/lib/utils.rb">
565
832
  <provider selected="true" editor-type-id="text-editor">
566
- <state relative-caret-position="460">
567
- <caret line="20" column="27" selection-start-line="20" selection-start-column="27" selection-end-line="20" selection-end-column="27" />
833
+ <state relative-caret-position="324">
834
+ <caret line="23" column="18" lean-forward="true" selection-start-line="23" selection-start-column="18" selection-end-line="23" selection-end-column="18" />
568
835
  </state>
569
836
  </provider>
570
837
  </entry>
@@ -1,10 +1,11 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- SimBot (0.1.13)
4
+ SimBot (0.1.14)
5
5
  json
6
6
  pusher-client
7
7
  rest-client
8
+ spreadsheet
8
9
  thor (~> 0.20)
9
10
 
10
11
  GEM
@@ -41,6 +42,9 @@ GEM
41
42
  diff-lcs (>= 1.2.0, < 2.0)
42
43
  rspec-support (~> 3.7.0)
43
44
  rspec-support (3.7.1)
45
+ ruby-ole (1.2.12.1)
46
+ spreadsheet (1.1.7)
47
+ ruby-ole (>= 1.0)
44
48
  thor (0.20.0)
45
49
  unf (0.1.4)
46
50
  unf_ext
@@ -37,4 +37,6 @@ Gem::Specification.new do |spec|
37
37
  spec.add_dependency "pusher-client"
38
38
  spec.add_dependency "rest-client"
39
39
  spec.add_dependency "json"
40
+ spec.add_dependency "spreadsheet"
41
+
40
42
  end
@@ -1,6 +1,8 @@
1
- module Barong
1
+ # frozen_string_literal: true
2
+
3
+ module ApiController
2
4
  # General barong API functions
3
- class API
5
+ class Barong
4
6
  require 'json'
5
7
  require 'rest-client'
6
8
  def initialize(endpoint, app_id)
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ApiController
4
+ # General peatio api functionality
5
+ class Peatio
6
+ require 'json'
7
+ require 'rest-client'
8
+
9
+ def initialize(endpoint, token)
10
+ @endpoint = endpoint
11
+ @auth_token = token
12
+ end
13
+
14
+ def post_order(market, price, volume, type)
15
+ response = RestClient.post("#{@endpoint}/orders",
16
+ {
17
+ 'market': market,
18
+ 'side': type.to_s,
19
+ 'volume': volume.to_s,
20
+ 'price': price.to_s,
21
+ 'ord_type': 'limit'
22
+ },
23
+ {'Authorization': "Bearer #{@auth_token}",
24
+ 'content_type': 'application/x-www-form-urlencoded'})
25
+ #puts response
26
+ end
27
+ end
28
+ end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Deamons
2
4
  # Simple process to add wash trades to a market in order to simulate trade matching for QA and dev
3
5
  class WashTrade
@@ -16,7 +18,7 @@ module Deamons
16
18
  write_pid_file(pid, "#{pid}.pid")
17
19
  start
18
20
  end
19
- puts "SimBot started on #{market} @ freq #{freq}"
21
+ puts "SimBot started on #{market} @ freq #{freq}."
20
22
  end
21
23
 
22
24
  def start
@@ -37,6 +39,7 @@ module Deamons
37
39
  end
38
40
  end
39
41
 
42
+ # @return [float] augmented price
40
43
  def aug_price
41
44
  if @g_count > 60
42
45
  @range = rand(1.003...1.010)
@@ -47,6 +50,9 @@ module Deamons
47
50
  end
48
51
 
49
52
  # Attempts to write the pid of the forked process to the pid file.
53
+ # @param [Integer] pid
54
+ # @param [String] pidfile
55
+ # @return [Integer and File]
50
56
  def write_pid_file(pid, pidfile)
51
57
  File.open pidfile, "w" do |f|
52
58
  f.write pid
@@ -57,6 +63,9 @@ module Deamons
57
63
  end
58
64
 
59
65
  # Send stdout and stderr to log files for the child process
66
+ # @param [String] outfile
67
+ # @param [String] errfile
68
+ # @return [TrueClass]
60
69
  def redirect(outfile, errfile)
61
70
  $stdin.reopen '/dev/null'
62
71
  out = File.new outfile, "a"
@@ -1,25 +1,24 @@
1
1
  require "SimBot/version"
2
2
  require 'thor'
3
3
  require 'pusher-client'
4
-
4
+ require_relative 'apicontroller/barong'
5
+ require_relative 'apicontroller/peatio'
6
+ require_relative 'deamons/wash_trade'
5
7
  module SimBot
8
+ # CLI for controlling the SimBot
6
9
  class CLI < Thor
7
10
  require 'utils'
8
- require 'barong'
9
- require 'api_controller'
10
- require 'wash_trade'
11
11
  desc 'start', 'Start simulation bot parsing in base-url and auth token.'
12
12
  method_option :email, type: :string, default: 'admin@ovex.io', required: true, desc: 'Your OVEX email address'
13
- method_option :password, type: :string, default: '1bQozgrr', required: true, desc: 'Your OVEX password'
14
- method_option :peatio_base_url, type: :string, default: 'https://platform.review.ovex.io/api/v2', desc: 'Peatio API base URL'
15
- method_option :barong_base_url, type: :string, default: 'https://account.review.ovex.io/api/v1', desc: 'Barong API base URL'
16
- method_option :app_id, type: :string, default: 'ef3f28bfb2625ed56f0ff88c6fdb', desc: 'Peatio applicaiton id from Barong'
13
+ method_option :password, type: :string, default: '7P1CMgrr', required: true, desc: 'Your OVEX password'
14
+ method_option :peatio_base_url, type: :string, default: 'https://api.review.ovex.io/api/v2', desc: 'Peatio API base URL'
15
+ method_option :barong_base_url, type: :string, default: 'https://auth.review.ovex.io/api/v1', desc: 'Barong API base URL'
16
+ method_option :app_id, type: :string, default: 'ceca08fbc83c2fb4eb53bb026489', desc: 'Peatio applicaiton id from Barong'
17
17
  method_option :market, type: :string, default: 'bchbtc', required: false, desc: 'OVEX market for SimBot to interact with'
18
18
  method_option :freq, type: :numeric, default: 1, desc: 'Frequency for trades to be added'
19
19
  def start
20
- count = 0
21
- jwt = Barong::API.new(options[:barong_base_url], options[:app_id]).log_in(options[:email], options[:password])
22
- api = ApiController.new(options[:peatio_base_url], jwt)
20
+ jwt = ApiController::Barong.new(options[:barong_base_url], options[:app_id]).log_in(options[:email], options[:password])
21
+ api = ApiController::Peatio.new(options[:peatio_base_url], jwt)
23
22
  Deamons::WashTrade.new(api, options[:market], options[:freq])
24
23
  end
25
24
  desc 'list', 'Return list of running processes'
@@ -38,5 +37,11 @@ module SimBot
38
37
  def quote(market)
39
38
  puts "#{market}: #{Utils.quote(market)}"
40
39
  end
40
+
41
+ desc 'cmc_data outfile', 'export coin market cap data to spread sheet'
42
+ def cmc_data(outfile)
43
+ data = Utils.cmc_data
44
+ Utils.write_to_spreadsheet(data, outfile)
45
+ end
41
46
  end
42
47
  end
@@ -1,3 +1,3 @@
1
1
  module SimBot
2
- VERSION = "0.1.14"
2
+ VERSION = "0.1.15"
3
3
  end
@@ -1,4 +1,6 @@
1
+ # General use utilities for SimBot
1
2
  class Utils
3
+ require 'spreadsheet'
2
4
  # accept market paramter and return the coinmarket cap quote for said market
3
5
  # @param [String] market
4
6
  # @return [FalseClass and Float]
@@ -16,17 +18,27 @@ class Utils
16
18
  btcltc_price
17
19
  when 'ltcbtc'
18
20
  ltcbtc_price
19
- when 'bchxrp'
20
- bchxrp_price
21
21
  when 'ltcbch'
22
22
  ltcbch_price
23
23
  when 'ltcxrp'
24
24
  ltcxrp_price
25
+ when 'btcusd'
26
+ btcusd_price
27
+ when 'btcbch'
28
+ 1/bchbtc_price
25
29
  else
26
30
  false
27
31
  end
28
32
  end
29
33
 
34
+ # fetch btc/usd price from coin market cap
35
+ # @return [float] rate
36
+ def self.btcusd_price
37
+ response = RestClient.get('https://api.coinmarketcap.com/v2/ticker/1/?convert=USD')
38
+ hash = JSON.parse(response.body)
39
+ hash['data']['quotes']['USD']['price'].to_f.round(4)
40
+ end
41
+
30
42
  # fetch ltc/xrp price from coin market cap
31
43
  # @return [float] rate
32
44
  def self.ltcxrp_price
@@ -43,14 +55,6 @@ class Utils
43
55
  hash['data']['quotes']['BCH']['price'].to_f.round(4)
44
56
  end
45
57
 
46
- # fetch bch/xrp price from coin market cap
47
- # @return [float] rate
48
- def self.bchxrp_price
49
- response = RestClient.get('https://api.coinmarketcap.com/v2/ticker/1831/?convert=XRP')
50
- hash = JSON.parse(response.body)
51
- hash['data']['quotes']['XRP']['price'].to_f.round(4)
52
- end
53
-
54
58
  # fetch ltc/btc price from coin market cap
55
59
  # @return [float] rate
56
60
  def self.ltcbtc_price
@@ -124,5 +128,40 @@ class Utils
124
128
  $stderr.puts "While signaling the PID, unexpected #{e.class}: #{e}"
125
129
  false
126
130
  end
131
+
132
+ # @return [Array] cmc data
133
+ def self.cmc_data
134
+ data = []
135
+ (0...16).each do |start|
136
+ response = RestClient.get("https://api.coinmarketcap.com/v2/ticker/?start=#{start * 100 + 1}")
137
+ hash = JSON.parse (response.body)
138
+ hash['data'].each do |key, coin|
139
+ row = [coin['name'], coin['symbol'],
140
+ coin['quotes']['USD']['market_cap'].to_f,
141
+ coin['quotes']['USD']['volume_24h'].to_f]
142
+ data.push(row)
143
+ end
144
+ end
145
+ data
146
+ end
147
+
148
+ # @param [Array] data
149
+ # @param [String] name
150
+ # @return [NilClass]
151
+ def self.write_to_spreadsheet(data, name)
152
+ book = Spreadsheet::Workbook.new
153
+ sheet = book.create_worksheet(name: 'coin_data')
154
+ rc = 1
155
+ data.each do |row|
156
+ col = 0
157
+ row.each do |cell|
158
+ sheet[rc, col] = cell
159
+ col += 1
160
+ end
161
+ rc += 1
162
+ end
163
+ book.write(name)
164
+ puts "Data written to #{name}"
165
+ end
127
166
  end
128
167
 
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.14
4
+ version: 0.1.15
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-06-12 00:00:00.000000000 Z
11
+ date: 2018-07-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -108,6 +108,20 @@ dependencies:
108
108
  - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: spreadsheet
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
111
125
  description: OVEX simulation Bot CLI used to simulate real world traing activity on
112
126
  the OVEX exchange for testing and QA purposes
113
127
  email:
@@ -139,12 +153,12 @@ files:
139
153
  - bin/console
140
154
  - bin/setup
141
155
  - exe/SimBot
156
+ - lib/ApiController/barong.rb
157
+ - lib/ApiController/peatio.rb
158
+ - lib/Deamons/wash_trade.rb
142
159
  - lib/SimBot.rb
143
160
  - lib/SimBot/version.rb
144
- - lib/api_controller.rb
145
- - lib/barong.rb
146
161
  - lib/utils.rb
147
- - lib/wash_trade.rb
148
162
  homepage: https://github.com/ovCEO/SimBot
149
163
  licenses:
150
164
  - MIT
@@ -1,26 +0,0 @@
1
- class ApiController
2
- require 'json'
3
- require 'rest-client'
4
-
5
- @endpoint = ''
6
- @auth_token = ''
7
-
8
- def initialize(endpoint, token)
9
- @endpoint = endpoint
10
- @auth_token = token
11
- end
12
-
13
- def post_order(market, price, volume, type)
14
- response = RestClient.post("#{@endpoint}/orders",
15
- {
16
- 'market': market,
17
- 'side': type.to_s,
18
- 'volume': volume.to_s,
19
- 'price': price.to_s,
20
- 'ord_type': 'limit'
21
- },
22
- {'Authorization': "Bearer #{@auth_token}",
23
- 'content_type': 'application/x-www-form-urlencoded'})
24
- #puts response
25
- end
26
- end