GainsNetwork-org / nft-bot-v3

Bot that executes limit orders of gTrade v6, the decentralized leveraged trading platform on Polygon.
46 stars 39 forks source link

New price feed support #28

Closed thebuidler closed 1 year ago

thebuidler commented 1 year ago

Overview

Price feed now emits a batch of price updates based on a rate limit, instead of individual updates. Only pairs that have been updated within the rate limit interval are included.

There is a checkpoint message every ~1s for stream freshness.

New formats:

Price updates [pairIndex1,pairIndex1Price,pairIndex2,pairIndex2Price,PairIndexN,pairIndexNPrice]

Checkpoint [timestamp]

When the stream length is 1, it is a timestamp message

GainsNetwork commented 1 year ago

LGTM! just need to actually test