binance / binance-futures-connector-java

MIT License
111 stars 61 forks source link

wrong mandatory parameter 'symbol' for UMAccount.currentAllOpenOrders(). #7

Closed yechanpark closed 1 year ago

yechanpark commented 1 year ago

in binance-futures docs, GET /fapi/v1/openOrders endpoint does not have 'symbol' as a mandatory parameter. https://binance-docs.github.io/apidocs/futures/en/#current-all-open-orders-user_data

but UMAccount.currentAllOpenOrders() validate 'symbol' as mandatory parameter.

    // UMAccount.java
    /**
     * Get all open orders on a symbol. Careful when accessing this with no symbol.
     * <br><br>
     * GET /v1/openOrders
     * <br>
     * @param
     * parameters LinkedHashedMap of String,Object pair
     *            where String is the name of the parameter and Object is the value of the parameter
     * <br><br>
     * symbol -- mandatory/string <br>
     * recvWindow -- optional/long <br>
     * @return String
     * @see <a href="https://binance-docs.github.io/apidocs/futures/en/#current-all-open-orders-user_data">
     *    https://binance-docs.github.io/apidocs/futures/en/#current-all-open-orders-user_data</a>
     */
    public String currentAllOpenOrders(LinkedHashMap<String, Object> parameters) {
        ParameterChecker.checkParameter(parameters, "symbol", String.class);
        return super.currentAllOpenOrders(parameters);
    }

as a result, following kotlin code occurred exception.

UMFuturesClientImpl(apiKey, secretKey).account().currentAllOpenOrders(LinkedHashMap())

Caused by: com.binance.connector.futures.client.exceptions.BinanceConnectorException: "symbol" is a mandatory parameter!

dependency version is '2.0.0'.

thanks.

jonte-z commented 1 year ago

Hi thanks for bringing this to our attention. This will be fixed very shortly in the upcoming release.

jonte-z commented 1 year ago

This is now fixed in the latest version: https://github.com/binance/binance-futures-connector-java/releases/tag/v3.0.1