ib-orientdb 1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +56 -0
  3. data/CODE_OF_CONDUCT.md +74 -0
  4. data/Gemfile +12 -0
  5. data/Gemfile.lock +128 -0
  6. data/Guardfile +24 -0
  7. data/LICENSE +21 -0
  8. data/README.md +41 -0
  9. data/Rakefile +6 -0
  10. data/bin/console +99 -0
  11. data/bin/gateway +92 -0
  12. data/bin/readme.md +1 -0
  13. data/changelog.md +10 -0
  14. data/ib-orientdb.gemspec +42 -0
  15. data/lib/alerts/base-alert.rb +143 -0
  16. data/lib/alerts/gateway-alerts.rb +16 -0
  17. data/lib/alerts/order-alerts.rb +68 -0
  18. data/lib/ib-orientdb.rb +12 -0
  19. data/lib/ib/account-infos.rb +115 -0
  20. data/lib/ib/account-init.rb +151 -0
  21. data/lib/ib/orient-gateway.rb +362 -0
  22. data/lib/ib/setup-orientdb.rb +112 -0
  23. data/lib/logging.rb +34 -0
  24. data/lib/models/hc/d2_f.rb +0 -0
  25. data/lib/models/hc/grid.rb +0 -0
  26. data/lib/models/hc/has_portfolio.rb +0 -0
  27. data/lib/models/hc/has_position.rb +0 -0
  28. data/lib/models/hc/has_strategy.rb +0 -0
  29. data/lib/models/hc/hc_grid.rb +0 -0
  30. data/lib/models/hc/my_user.rb +0 -0
  31. data/lib/models/hc/p2_u.rb +0 -0
  32. data/lib/models/hc/portfolio.rb +161 -0
  33. data/lib/models/ib/account.rb +5 -0
  34. data/lib/models/ib/account_value.rb +29 -0
  35. data/lib/models/ib/advisor.rb +0 -0
  36. data/lib/models/ib/contract.rb +15 -0
  37. data/lib/models/ib/demo_advisor.rb +0 -0
  38. data/lib/models/ib/demo_user.rb +0 -0
  39. data/lib/models/ib/financials.rb +6 -0
  40. data/lib/models/ib/has_account.rb +0 -0
  41. data/lib/models/ib/portfolio_value.rb +10 -0
  42. data/lib/models/ib/spread.rb +0 -0
  43. data/lib/models/ib/user.rb +0 -0
  44. data/lib/models/tg/tag.rb +16 -0
  45. data/lib/support.rb +21 -0
  46. data/lib/version.rb +5 -0
  47. data/setup.md +83 -0
  48. metadata +231 -0
@@ -0,0 +1,5 @@
1
+ module IB
2
+ module OrientDB
3
+ VERSION = "1.0"
4
+ end
5
+ end
@@ -0,0 +1,83 @@
1
+ # Install the Database
2
+
3
+ Its recommended to install the database on a virtual server or as docker-image.
4
+
5
+ Within a virtual machine, the server may be run as normal user.
6
+
7
+ First, check the presence of Java
8
+ ```
9
+ > java --version
10
+ java 12.0.2 2019-07-16
11
+
12
+ ```
13
+
14
+ To install in an unix environment, download the binary from https://orientdb.org/download
15
+ and copy the archive-file to the appropriate destination or
16
+
17
+ ```
18
+ wget https://s3.us-east-2.amazonaws.com/orientdb3/releases/3.1.4/orientdb-3.1.4.tar.gz
19
+
20
+ ```
21
+
22
+ unzip there, create a link and run `server.sh`
23
+
24
+ ```
25
+ tar -zxvf orientdb-community-3.1.0-beta1.tar.gz
26
+ ln -s orientdb-3.1.4 orientdb
27
+ cd orientdb/bin
28
+ ./server.sh
29
+
30
+ # ...
31
+ +---------------------------------------------------------------+
32
+ | WARNING: FIRST RUN CONFIGURATION |
33
+ +---------------------------------------------------------------+
34
+ | This is the first time the server is running. Please type a |
35
+ | password of your choice for the 'root' user or leave it blank |
36
+ | to auto-generate it. |
37
+ | |
38
+ | To avoid this message set the environment variable or JVM |
39
+ | setting ORIENTDB_ROOT_PASSWORD to the root password to use. |
40
+ +---------------------------------------------------------------+
41
+
42
+ Root password [BLANK=auto generate it]: ***********
43
+ Please confirm the root password: ***********
44
+
45
+ ```
46
+
47
+ Finally install it as service. Edit `bin/orientdb.sh` and follow the instructions there
48
+ and copy the modified script to `/etc/init.d`
49
+ ```
50
+ sudo cp orientdb.sh /etc/init.d/orientdb
51
+
52
+ ```
53
+
54
+ Finally start the service through `service orientdb start`
55
+
56
+ On _systemd-Systems `systemctl` is used to manage services as the OrientDB-Database-Server.
57
+
58
+ The `orientdb.service`-file is placed in the bin directory. To install copy the orientdb.service
59
+ to /etc/systemd/ and Edit the file.
60
+
61
+ To start, run
62
+ ```
63
+ systemctl start orientdb.service
64
+
65
+ systemctl enable orientdb.service # starts the database.server during boot.
66
+ ```
67
+
68
+ ### New User
69
+
70
+ To introduce a new user, just edit `config/orientdb-server-config.xml` and add
71
+
72
+ ```
73
+ <user resources="*" password="hc" name="hctw"/>
74
+
75
+ ```
76
+ to the `<users>` section. Then the User `hctw` has access to anything.
77
+
78
+
79
+
80
+
81
+
82
+
83
+
metadata ADDED
@@ -0,0 +1,231 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ib-orientdb
3
+ version: !ruby/object:Gem::Version
4
+ version: '1.0'
5
+ platform: ruby
6
+ authors:
7
+ - Hartmut Bischoff
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2020-12-22 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2.0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '2.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rspec
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '3.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '3.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec-collection_matchers
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec-its
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: guard
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: guard-rspec
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: ib-api
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '972.1'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '972.1'
111
+ - !ruby/object:Gem::Dependency
112
+ name: ib-extensions
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'
125
+ - !ruby/object:Gem::Dependency
126
+ name: active-orient
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '0.8'
132
+ type: :runtime
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: '0.8'
139
+ - !ruby/object:Gem::Dependency
140
+ name: orientdb-time-graph
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :runtime
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ description:
154
+ email:
155
+ - topofocus@gmail.com
156
+ executables: []
157
+ extensions: []
158
+ extra_rdoc_files: []
159
+ files:
160
+ - ".gitignore"
161
+ - CODE_OF_CONDUCT.md
162
+ - Gemfile
163
+ - Gemfile.lock
164
+ - Guardfile
165
+ - LICENSE
166
+ - README.md
167
+ - Rakefile
168
+ - bin/console
169
+ - bin/gateway
170
+ - bin/readme.md
171
+ - changelog.md
172
+ - ib-orientdb.gemspec
173
+ - lib/alerts/base-alert.rb
174
+ - lib/alerts/gateway-alerts.rb
175
+ - lib/alerts/order-alerts.rb
176
+ - lib/ib-orientdb.rb
177
+ - lib/ib/account-infos.rb
178
+ - lib/ib/account-init.rb
179
+ - lib/ib/orient-gateway.rb
180
+ - lib/ib/setup-orientdb.rb
181
+ - lib/logging.rb
182
+ - lib/models/hc/d2_f.rb
183
+ - lib/models/hc/grid.rb
184
+ - lib/models/hc/has_portfolio.rb
185
+ - lib/models/hc/has_position.rb
186
+ - lib/models/hc/has_strategy.rb
187
+ - lib/models/hc/hc_grid.rb
188
+ - lib/models/hc/my_user.rb
189
+ - lib/models/hc/p2_u.rb
190
+ - lib/models/hc/portfolio.rb
191
+ - lib/models/ib/account.rb
192
+ - lib/models/ib/account_value.rb
193
+ - lib/models/ib/advisor.rb
194
+ - lib/models/ib/contract.rb
195
+ - lib/models/ib/demo_advisor.rb
196
+ - lib/models/ib/demo_user.rb
197
+ - lib/models/ib/financials.rb
198
+ - lib/models/ib/has_account.rb
199
+ - lib/models/ib/portfolio_value.rb
200
+ - lib/models/ib/spread.rb
201
+ - lib/models/ib/user.rb
202
+ - lib/models/tg/tag.rb
203
+ - lib/support.rb
204
+ - lib/version.rb
205
+ - setup.md
206
+ homepage: https://ib-ruby.github.io/ib-doc/
207
+ licenses: []
208
+ metadata:
209
+ homepage_uri: https://ib-ruby.github.io/ib-doc/
210
+ source_code_uri: https://github.cm/ib-ruby/ib-orientdb
211
+ changelog_uri: https://github.cm/ib-ruby/ib-orientdb/changelog.md
212
+ post_install_message:
213
+ rdoc_options: []
214
+ require_paths:
215
+ - lib
216
+ required_ruby_version: !ruby/object:Gem::Requirement
217
+ requirements:
218
+ - - ">="
219
+ - !ruby/object:Gem::Version
220
+ version: 2.6.0
221
+ required_rubygems_version: !ruby/object:Gem::Requirement
222
+ requirements:
223
+ - - ">="
224
+ - !ruby/object:Gem::Version
225
+ version: '0'
226
+ requirements: []
227
+ rubygems_version: 3.0.4
228
+ signing_key:
229
+ specification_version: 4
230
+ summary: Part of IB-Ruby. Methods do store data from the TWS in a OrientDB-Database.
231
+ test_files: []