binance-api-node icon indicating copy to clipboard operation
binance-api-node copied to clipboard

FuturesPartialDepth

Open hdmark opened this issue 4 years ago • 2 comments

Great project btw!

In the index.d.ts , futuresPartialDepth takes in a depth: PartialDepth in the callback, but then it returns something different. I changed it and it seemed to work for me :

 futuresPartialDepth: (
      options: { symbol: string; level: number } | { symbol: string; level: number }[],
      callback: (depth: FuturesPartialDepth) => void,
      transform?: boolean,
    ) => ReconnectingWebSocketHandler

and added

  export interface FuturesPartialDepth {
    level: number,
    eventType: string,
    eventTime:  number,
    transactionTime: number,
    symbol: string,
    firstUpdateId: number,
    finalUpdateId: number,
    prevFinalUpdateId: number,
    bidDepth:  BidDepth[],
    askDepth:  BidDepth[],
  }

hdmark avatar Dec 01 '21 19:12 hdmark

maybe @bennycode has a comment?

balthazar avatar Dec 02 '21 00:12 balthazar

@hdmark can you turn your changes into a PR so it is easier for me to verify your changes?

bennycode avatar Dec 02 '21 10:12 bennycode