tiagosiebler / binance

Node.js & JavaScript SDK for Binance REST APIs & WebSockets, with TypeScript & browser support, integration tests, beautification & more.
MIT License
728 stars 264 forks source link

Wrong type for field newOrderRespType NewSpotOrderParams #424

Closed capaj closed 1 month ago

capaj commented 1 month ago

I have this code

binanceClient.submitNewOrder(
{
            symbol: symbol,
            side: 'SELL',
            type: 'LIMIT',
            price: price,
            newOrderRespType: 'FULL',
            quantity: amount
          }
)

but getting

Type 'string' is not assignable to type 'undefined'.ts(2322)
spot.d.ts(346, 5): The expected type comes from property 'newOrderRespType' which is declared here on type 'NewSpotOrderParams<OrderType, undefined>'

At runtime this works ok, so I think this is just a wrong TS type for newOrderRespType

tiagosiebler commented 1 month ago

Thanks for reporting this! Will be fixed shortly in v2.11.1 via #425. Let me know if you notice anything else!