/// <summary> /// Create a new instance of BinanceClient using provided options /// </summary> /// <param name="options">The options to use for this client</param> public BinanceClient(BinanceClientOptions options) : base("Binance", options, options.ApiCredentials == null ? null : new BinanceAuthenticationProvider(options.ApiCredentials)) { AutoTimestamp = options.AutoTimestamp; TradeRulesBehaviour = options.TradeRulesBehaviour; TradeRulesUpdateInterval = options.TradeRulesUpdateInterval; AutoTimestampRecalculationInterval = options.AutoTimestampRecalculationInterval; TimestampOffset = options.TimestampOffset; DefaultReceiveWindow = options.ReceiveWindow; _baseAddressFuturesUsdt = options.BaseAddressUsdtFutures; _baseAddressFuturesCoin = options.BaseAddressCoinFutures; arraySerialization = ArrayParametersSerialization.MultipleValues; requestBodyFormat = RequestBodyFormat.FormData; requestBodyEmptyContent = string.Empty; Spot = new BinanceClientSpot(log, this); Brokerage = new BinanceClientBrokerage(this); FuturesCoin = new BinanceClientFuturesCoin(log, this); FuturesUsdt = new BinanceClientFuturesUsdt(log, this); General = new BinanceClientGeneral(this); Margin = new BinanceClientMargin(log, this); Lending = new BinanceClientLending(this); Mining = new BinanceClientMining(this); SubAccount = new BinanceClientSubAccount(this); WithdrawDeposit = new BinanceClientWithdrawDeposit(this); Blvt = new BinanceClientLeveragedTokens(this); BSwap = new BinanceClientLiquidSwap(this); Fiat = new BinanceClientFiat(this); }
/// <summary> /// Create a new instance of BinanceClient using provided options /// </summary> /// <param name="options">The options to use for this client</param> public BinanceClient(BinanceClientOptions options) : base(options, options.ApiCredentials == null ? null : new BinanceAuthenticationProvider(options.ApiCredentials)) { AutoTimestamp = options.AutoTimestamp; TradeRulesBehaviour = options.TradeRulesBehaviour; TradeRulesUpdateInterval = options.TradeRulesUpdateInterval; AutoTimestampRecalculationInterval = options.AutoTimestampRecalculationInterval; TimestampOffset = options.TimestampOffset; DefaultReceiveWindow = options.ReceiveWindow; _baseAddressFutures = options.FuturesBaseAddress; arraySerialization = ArrayParametersSerialization.MultipleValues; postParametersPosition = PostParameters.InBody; requestBodyFormat = RequestBodyFormat.FormData; requestBodyEmptyContent = ""; Spot = new BinanceClientSpot(log, this); Brokerage = new BinanceClientBrokerage(this); Futures = new BinanceClientFutures(log, this); Account = new BinanceClientAccount(this); Margin = new BinanceClientMargin(this); IsolatedMargin = new BinanceClientIsolatedMargin(this); System = new BinanceClientSystem(log, this); Lending = new BinanceClientLending(this); Mining = new BinanceClientMining(this); SubAccount = new BinanceClientSubAccount(this); Dust = new BinanceClientDust(this); Withdraw = new BinanceClientWithdraw(this); Deposit = new BinanceClientDeposit(this); }