jaggedsoft / node-binance-api

Node Binance API is an asynchronous node.js library for the Binance API designed to be easy to use.
MIT License
1.58k stars 768 forks source link

Endpoint GET /fapi/v1/apiTradingStatus returns empty indicator object #536

Open flolege opened 3 years ago

flolege commented 3 years ago

My request with the API:

console.info( await binance.promiseRequest( 'v1/apiTradingStatus', {symbol: 'IOTAUSDT', recvWindow: 500}, {base: 'https://fapi.binance.com/fapi/', type: 'USER_DATA'} ) );

Response: { indicators: {}, updateTime: 1607613151523 }

According to https://binance-docs.github.io/apidocs/futures/en/#user-api-trading-quantitative-rules-indicators-user_data the response should return more than than.

Where is the problem here, on the API wrapper or binance?

jaggedsoft commented 3 years ago

thank you for the report!

I think this might be working as intended, it appears to only return the rules that you're in violation of, in this case none. it doesnt match the example but maybe thats a bug on binance's side. i've tried everything I could

added function


        futuresTradingStatus: async ( symbol = false, params = {} ) => {
            if ( symbol ) params.symbol = symbol;
            return promiseRequest( 'v1/apiTradingStatus', params, { base:fapi, type:'USER_DATA' } );
        },
    console.info( await binance.futuresTradingStatus() );
    console.info( await binance.futuresTradingStatus('BTCUSDT') );

cant seem to fix it

flolege commented 3 years ago

Ok many thanks for looking into that!