sensei_eod_risk_ruby 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 7b47b998cdff5a832b9d54684aaaba70637a565123d55e9abd5926b65579b01d
4
+ data.tar.gz: 919e6f08749689b96b8bee8f5573c93a0e242cb4607053a8157dcaee92ac50fd
5
+ SHA512:
6
+ metadata.gz: c7fb385a69de45c4e8784faff001ecb93ff55a59e9cdbc25a1184823d78ebcfa3ea5fd863da7a3f48d1808baed9238dae5b96f90df501c33a8e499d7b2a1cf2c
7
+ data.tar.gz: e04403cabd1bfa6f318feeea67e7f85e7ee4786daecf97173618f6105e290eb05992b31bab456780f8cbaab79273e1f7ab50a2d7afa5a3154ce7881ed8aeb798
@@ -0,0 +1,20 @@
1
+ require 'sensei_eod_utils'
2
+
3
+ module SenseiApi
4
+ class PositionRisk
5
+ class <<self
6
+ def risk(params)
7
+ response = HTTParty.get(url, query: params.compact, format: :json)
8
+ JSON.parse(response.body, object_class: OpenStruct)
9
+ end
10
+
11
+ def url
12
+ @url ||= "#{ENV['SENSEI_RISK_API']}/positions"
13
+ end
14
+
15
+ def base_url
16
+ @base_url ||= ENV['SENSEI_RISK_API']
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,3 @@
1
+ require 'sensei_eod_utils'
2
+
3
+ require_relative './sensei_api/position_risk'
metadata ADDED
@@ -0,0 +1,72 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: sensei_eod_risk_ruby
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Nishant Shah
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2019-12-20 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: httparty
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0.17'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '0.17'
27
+ - !ruby/object:Gem::Dependency
28
+ name: sensei_eod_utils
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 0.0.49
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 0.0.49
41
+ description:
42
+ email:
43
+ executables: []
44
+ extensions: []
45
+ extra_rdoc_files: []
46
+ files:
47
+ - lib/sensei_api/position_risk.rb
48
+ - lib/sensei_eod_risk_ruby.rb
49
+ homepage: https://rubygems.org/gems/sensei_eod_risk_ruby
50
+ licenses:
51
+ - MIT
52
+ metadata: {}
53
+ post_install_message:
54
+ rdoc_options: []
55
+ require_paths:
56
+ - lib
57
+ required_ruby_version: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ required_rubygems_version: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ version: '0'
67
+ requirements: []
68
+ rubygems_version: 3.0.4
69
+ signing_key:
70
+ specification_version: 4
71
+ summary: Sensei trader risk api gem
72
+ test_files: []