tastytrade / tastytrade-api-js

Javascript sdk for the tastytrade api
MIT License
67 stars 36 forks source link

Data streaming throttling with "acceptAggregationPeriod" #14

Closed dirkdirk closed 7 months ago

dirkdirk commented 8 months ago

Hopefully I just missed it but there does not seem to be a way to throttle data streaming.

The dxfeed docs mentions a FEED_SETUP Configuration message but I can't seem to find it in tastytrade-api-js.

Any ideas on how to throttle data steam?

dirkdirk commented 8 months ago

Progress report.

I managed to set up a hacky testing version of tastytrade-api-js inside my React project.

The FEED_SETUP Configuration message is accepted by the dxfeed api (from within tastytrade-api-js).

The fields "acceptDataFormat" and "acceptEventFields" are effective.

But "acceptAggregationPeriod" defaults or is overridden to 0.5 seconds.
(Just as it is in dxfeeds debug console.)

Guess we have to set up throttling on our project's end for now. Or is there another/better way?

dmoss18 commented 7 months ago

@dirkdirk DxFeed has their own javascript sdk now. I recommend using it https://github.com/dxFeed/dxLink/blob/main/dxlink-javascript/dxlink-api/README.md

We will be deprecating MarketDataStreamer in the next release.