polygonio-ruby 0.2.8 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +10 -0
- data/lib/polygonio/version.rb +1 -1
- data/lib/polygonio/websocket/client.rb +3 -1
- data/lib/polygonio/websocket/events.rb +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: da2cad3a46c2398a6870001bd5cfe968cc9a3e7cd352d56b5e7912b2bc97e28a
|
4
|
+
data.tar.gz: f2d619957c5549e493aef4a712769a891a4cccd4f663c20ff70e8d40c75b1018
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ddda76d07347f4b7ba49c711f0ff7b97de0d6d2b29170c351a56d6a05d7c52fb750f53d0758ef12776fea29ef73a2fdb1b0ac6eae7ea895944f32661d3bb553d
|
7
|
+
data.tar.gz: f5ee7cd088e3896a32e0f14e9472b8328d5e16c3c546795b0d954953e569aee91f66597624cec7d4d74cff83a7bcb8cc72e0b5c3e60c02434b3ce42e1ca3fd9b
|
data/README.md
CHANGED
@@ -48,3 +48,13 @@ Polygonio::Websocket::Client.new("crypto", api_key).subscribe("XQ.BTC-USD") do |
|
|
48
48
|
pp event
|
49
49
|
end
|
50
50
|
```
|
51
|
+
|
52
|
+
Using delayed websockets. If your account only supports delayed feeds you will need to use the delayed websocket endpoint
|
53
|
+
|
54
|
+
```ruby
|
55
|
+
Polygonio::Websocket::Client.new("stocks", api_key, delayed: true).subscribe("AM.*,A.*,T.*") do |event|
|
56
|
+
pp "Incoming message"
|
57
|
+
pp event
|
58
|
+
end
|
59
|
+
```
|
60
|
+
|
data/lib/polygonio/version.rb
CHANGED
@@ -134,8 +134,10 @@ module Polygonio
|
|
134
134
|
|
135
135
|
@api_key = api_key
|
136
136
|
@ws = nil
|
137
|
+
opts[:comm_inactivity_timeout] = 0
|
137
138
|
@opts = opts
|
138
|
-
|
139
|
+
delayed = opts.fetch(:delayed) { false }
|
140
|
+
if delayed
|
139
141
|
@url = "#{BASE_URL_DELAYED}#{path}"
|
140
142
|
else
|
141
143
|
@url = "#{BASE_URL}#{path}"
|
@@ -41,8 +41,8 @@ module Polygonio
|
|
41
41
|
attribute? :h, Types::JSON::Decimal # High Price
|
42
42
|
attribute? :l, Types::JSON::Decimal # Low Price
|
43
43
|
attribute? :c, Types::JSON::Decimal # Close Price
|
44
|
-
attribute? :a, Types::
|
45
|
-
attribute? :z, Types::
|
44
|
+
attribute? :a, Types::JSON::Decimal # Today's Volume weighted average price
|
45
|
+
attribute? :z, Types::JSON::Decimal # Average trade size
|
46
46
|
attribute? :s, Types::Integer # Starting tick timestamp
|
47
47
|
attribute? :e, Types::Integer # Ending tick timestamp
|
48
48
|
attribute? :otc, Types::Bool # Whether or not this aggregate is for an OTC ticker.
|
@@ -60,8 +60,8 @@ module Polygonio
|
|
60
60
|
attribute? :h, Types::JSON::Decimal # High Price
|
61
61
|
attribute? :l, Types::JSON::Decimal # Low Price
|
62
62
|
attribute? :c, Types::JSON::Decimal # Close Price
|
63
|
-
attribute? :a, Types::
|
64
|
-
attribute? :z, Types::
|
63
|
+
attribute? :a, Types::JSON::Decimal # Today's Volume weighted average price
|
64
|
+
attribute? :z, Types::JSON::Decimal # Average trade size
|
65
65
|
attribute? :s, Types::Integer # Starting tick timestamp
|
66
66
|
attribute? :e, Types::Integer # Ending tick timestamp
|
67
67
|
attribute? :otc, Types::Bool # Whether or not this aggregate is for an OTC ticker.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: polygonio-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anthony Eufemio
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-04-
|
11
|
+
date: 2023-04-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|