feat(exchanges): add watchFundingRate support#27950
Conversation
ts/src/pro/paradex.ts
Outdated
| }, | ||
| }; | ||
| const messageHashes = []; | ||
| if (Array.isArray (symbols)) { |
There was a problem hiding this comment.
if we want to make symbols optional, we might use Symbols: = undefined
then we should check if symbols is undefined or nto, but if it's not undefined we should assume it's an array
There was a problem hiding this comment.
On paradex you can omit the symbols argument and get a response for all of the symbols, so I decided to keep this conditional check and change the schema to use symbols: Strings = undefined
There was a problem hiding this comment.
@Dan-krm yes but if you don't provide symbols then symbols will be undefined right? or an empty array, isArray indicates that the user can provide like a different type like a single symbol/string which is not correct
can you please expand a little bit more here? If they have the funding rate info in the tickers stream for instance, then we can implement wathFundingRates, as long as we share the same subscriptionHash, (messageHash should be different) |
|
@Dan-krm also this method is failing can you check if it is inside exchange.go?
|

Added watchFundingRates support to multiple exchanges:
bitget, binance, bybit, currently omitted because they use the same message as watchTicker/watchMarkPrice but return different data types from watchFundingRate, and I'm not sure if that's something that can be handled properly in handleMessage