polygonio-ruby 0.2.8 → 0.2.9

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: 0025e44c36af5a1d8091cca11ac55ebf929a3dae3ecde2f047bf6d4effb46d52
4
- data.tar.gz: 0306c02483d4f80046c64adb45b3062b49c4bb5c979708d1c096c95b397e1087
3
+ metadata.gz: cd2208137de88cf3903e8b70d4326b7a980cbb53e73ef35ee5740cb39574d57b
4
+ data.tar.gz: 428d7c0d6b41c1ded06a0fbfbe5bce4e3fd6ecf29765560ba35323328d26caa6
5
5
  SHA512:
6
- metadata.gz: e4026dea18165f8554ac3f66c28460a85f15a8caba691eaf3c9dfde7f91d9a2f10ac419f87ece14eed5af0548bb3b29d54ab8a537a8c92720f5f51fa63f6026d
7
- data.tar.gz: '01865cb6d541ed0e6d49c9c0897528bb98c9f89581d906f023a4578e9b9689c5f920834c80a3f23e3b35458086f831f7261a4ed6d1c39af3d85908d4e3f51dd1'
6
+ metadata.gz: f1e82c65515334bfaaeecbf124394e7a40664c3fb9b44a3e47ab26ae8092e7693514055c687614236b874f9f096ca5d51734e1f0ff69f611b49c4a02a32116b0
7
+ data.tar.gz: c064a8089b8a56f25f5e36f24f75460ed5da618aefa5fb7de2797653011294e8ca57e61a666bd2d80e934312d231f2848293259983cda1b4d836a196ee779320
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
+
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Polygonio
4
- VERSION = "0.2.8"
4
+ VERSION = "0.2.9"
5
5
  end
@@ -135,7 +135,8 @@ module Polygonio
135
135
  @api_key = api_key
136
136
  @ws = nil
137
137
  @opts = opts
138
- if opts.fetch(:delayed) == true
138
+ delayed = opts.fetch(:delayed) { false }
139
+ if delayed
139
140
  @url = "#{BASE_URL_DELAYED}#{path}"
140
141
  else
141
142
  @url = "#{BASE_URL}#{path}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: polygonio-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anthony Eufemio