binance / binance-futures-connector-java

MIT License
111 stars 61 forks source link

changeMarginType is checking marginType paramater as Integer instead of String #2

Closed 0xenAlpha closed 1 year ago

0xenAlpha commented 1 year ago

Hi, changeMarginType function checks the marginType parameter as an integer instead of a string.

    public String changeMarginType(LinkedHashMap<String, Object> parameters) {
        ParameterChecker.checkParameter(parameters, "symbol", String.class);
        ParameterChecker.checkParameter(parameters, "marginType", Integer.class);
        return this.requestHandler.sendSignedRequest(this.productUrl, "/v1/marginType", parameters, HttpMethod.POST, this.showLimitUsage);
    }

Change margin type trade takes string as explained on the API: https://binance-docs.github.io/apidocs/futures/en/#change-margin-type-trade

jonte-z commented 1 year ago

Hi thanks for bringing the issue to attention. You're correct, marginType should not be an Integer. This will be fixed asap in upcoming release.

aisling-2 commented 1 year ago

This is fixed in v2.0.0. Thank you.