package com.binance.connector.client.impl.websocketapi;

import com.binance.connector.client.utils.JSONParser;
import com.binance.connector.client.utils.ParameterChecker;
import com.binance.connector.client.utils.websocketapi.WebSocketApiRequestHandler;
import org.json.JSONObject;

/* loaded from: binance-connector-java-3.0.0rc3.jar:com/binance/connector/client/impl/websocketapi/WebSocketApiAccount.class */
public class WebSocketApiAccount {
    private WebSocketApiRequestHandler handler;

    public WebSocketApiAccount(WebSocketApiRequestHandler handler) {
        this.handler = handler;
    }

    public void accountStatus(JSONObject parameters) {
        this.handler.signedRequest("account.status", parameters);
    }

    public void accountRateLimitsOrders(JSONObject parameters) {
        this.handler.signedRequest("account.rateLimits.orders", parameters);
    }

    public void accountAllOrders(String symbol, JSONObject parameters) {
        ParameterChecker.checkParameterType(symbol, String.class, "symbol");
        this.handler.signedRequest("allOrders", JSONParser.addKeyValue(parameters, "symbol", symbol));
    }

    public void accountAllOcoOrders(JSONObject parameters) {
        this.handler.signedRequest("allOrderLists", parameters);
    }

    public void accountTradeHistory(String symbol, JSONObject parameters) {
        ParameterChecker.checkParameterType(symbol, String.class, "symbol");
        this.handler.signedRequest("myTrades", JSONParser.addKeyValue(parameters, "symbol", symbol));
    }

    public void accountPreventedMatches(String symbol, JSONObject parameters) {
        ParameterChecker.checkParameterType(symbol, String.class, "symbol");
        ParameterChecker.checkOneOfParametersRequired(parameters, "preventedMatchId", "orderId");
        ParameterChecker.checkOnlyOneOfParameters(parameters, "preventedMatchId", "orderId");
        this.handler.signedRequest("myPreventedMatches", JSONParser.addKeyValue(parameters, "symbol", symbol));
    }
}
