Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't connect to websocket #579

Open
ronanft opened this issue Mar 21, 2022 · 0 comments
Open

Can't connect to websocket #579

ronanft opened this issue Mar 21, 2022 · 0 comments

Comments

@ronanft
Copy link

ronanft commented Mar 21, 2022

==============
* mkts.yml

root_directory: data
listen_port: 5993
log_level: info
queryable: true
stop_grace_period: 0
wal_rotate_interval: 5
enable_last_known: false
timezone: "America/New_York"
triggers:
  - module: ondiskagg.so
    on: "*/1Min/OHLCV"
    config:
      filter: nasdaq
      destinations: [ '5Min', '15Min', '1H', '1D' ]
  - module: stream.so
    on: "*/1Min/OHLCV" # */*/*
    config:
      filter: "nasdaq"
bgworkers:
  - module: alpaca.so
    config:
      api_key: {"My api key...."} <=== obviously ommited here
      api_secret: {"My api secret...."}
      ws_server: wss://data.alpaca.markets/stream
      minute_bar_symbols:
       - SPY

==============
* Error:
*

mktstore_1  | {"level":"error","timestamp":"2022-03-21T20:04:20.996Z","msg":"[alpaca] error connecting to server {server:wss://data.alpaca.markets/stream,subscription:[AM.SPY],error:[alpaca] connection failure, err: websocket: bad handshake, status_code: 403, body: <html>\r\n<head><title>403 Forbidden</title></head>\r\n<body>\r\n<center><h1>403 Forbidden</h1></center>\r\n<hr><center>nginx</center>\r\n</body>\r\n</html>\r\n}"}
mktstore_1  | {"level":"error","timestamp":"2022-03-21T20:04:20.996Z","msg":"[alpaca] error during ws listening {error:[alpaca] connection failure, err: websocket: bad handshake, status_code: 403, body: <html>\r\n<head><title>403 Forbidden</title></head>\r\n<body>\r\n<center><h1>403 Forbidden</h1></center>\r\n<hr><center>nginx</center>\r\n</body>\r\n</html>\r\n}"}
mktstore_1  | {"level":"info","timestamp":"2022-03-21T20:04:20.996Z","msg":"[alpaca] backing off for 4s"}

==============

  • _Also tried this server: wss://stream.data.alpaca.markets/v2/iex

In this case, the Error is this:_

mktstore_1  | {"level":"error","timestamp":"2022-03-21T20:09:35.570Z","msg":"[alpaca] unable to authenticate {response:[{\"T\":\"success\",\"msg\":\"connected\"}],error:didn't receive expected message}"}
mktstore_1  | {"level":"error","timestamp":"2022-03-21T20:09:35.570Z","msg":"[alpaca] error during ws listening {error:didn't receive expected message}"}
mktstore_1  | {"level":"info","timestamp":"2022-03-21T20:09:35.570Z","msg":"[alpaca] backing off for 2s"}

===============
The first configuration above used to work until two weeks ago...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant