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

[alpaca] possibly outdated docs for streaming data #428

Open
kierangilliam opened this issue Feb 1, 2021 · 2 comments
Open

[alpaca] possibly outdated docs for streaming data #428

kierangilliam opened this issue Feb 1, 2021 · 2 comments

Comments

@kierangilliam
Copy link

Hi, I've followed the basic setup for Marketstore with the Alpaca and GDAX feeder. GDAX data populates as expected but despite getting message notifications from Alpaca, no data is saved to the data folder.

Steps to reproduce:

docker create --volume "/root/data:/data" --name mktsdb -p 5993:5993 alpacamarkets/marketstore:latest
docker cp mkts.yml mktsdb:/etc/mkts.yml
docker start mktsdb

mkts.yml

root_directory: data
listen_port: 5993
log_level: info
queryable: true
stop_grace_period: 0
wal_rotate_interval: 5
enable_add: true
enable_remove: false
enable_last_known: false
timezone: "America/New_York"
triggers:
  - module: ondiskagg.so
    on: "*/1Min/OHLCV"
    config:
      filter: nasdaq
      destinations: [ '5Min', '15Min', '1H', '1D' ]
bgworkers:
  - module: gdaxfeeder.so
    name: Crypto
    config:
      query_start: '2018-01-01 00:00'
      symbols:
        - BTC-USD
      base_timeframe: '1D'
  - module: alpaca.so
    config:
      api_key: KEY
      api_secret: SECRET
      ws_server: wss://data.alpaca.markets/stream
      ws_worker_count: 10
      minute_bar_symbols:
        - '*'
      quote_symbols:
        - VOO
        - SPY
      trade_symbols:
        - AAPL
        - GME

Only items in ./data

WALFile.1612155387000035356.walfile 
gdax_BTC-USD
category_name

Despite getting seemingly sucessful responses from the alpaca server

...
{"level":"info","timestamp":"2021-02-01T04:56:27.610Z","msg":"[alpaca] subscribing to Alpaca data websocket: wss://data.alpaca.markets/stream"}
{"level":"info","timestamp":"2021-02-01T04:56:27.610Z","msg":"[alpaca] enabling ... {streams:[AM.* Q.VOO Q.SPY T.AAPL T.GME]}"}
{"level":"info","timestamp":"2021-02-01T04:56:27.610Z","msg":"[alpaca] using 10 workers"}
{"level":"info","timestamp":"2021-02-01T04:56:27.989Z","msg":"[alpaca] authenticated successfully"}
{"level":"info","timestamp":"2021-02-01T04:58:27.613Z","msg":"[alpaca] {subscription:[AM.* Q.VOO Q.SPY T.AAPL T.GME],channel_depth:0,handled_messages:0}"}

Did I miss a step to ensure that the data from Alpaca persists?

@mtucker502
Copy link

Was this resolved?

@jaggas
Copy link

jaggas commented Dec 28, 2021

It appears the API was not updated for the V2 streaming interface.

It seems configured for the old style of WS subscription using AM.*, etc.
https://alpaca.markets/docs/api-documentation/api-v2/market-data/alpaca-data-api-v1/streaming/
https://github.com/alpacahq/marketstore/blob/master/contrib/alpaca/api/connection.go

The interface needs to be updated to V2:
https://alpaca.markets/docs/api-documentation/api-v2/market-data/alpaca-data-api-v2/real-time/

Is there anyone working this currently? If not, I can do it. It seems like it would make sense to make use of the officially supported golang Alpaca API.

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

3 participants