コード例 #1
0
        /// <summary>
        /// Loads the trading rules.
        /// </summary>
        private void LoadTradingRules()
        {
            string     tradeRules    = _bApi.apiUrl + EndPoints.ExchangeInfo;
            BinanceApi binanceClient = new BinanceApi("", "", tradeRules, _bApi.webSocketEndpoint, addDefaultHeaders: false);

            _tradingRules = binanceClient.CallAsync <TradingRules>(ApiMethod.GET, "").Result;
        }
コード例 #2
0
        /// <summary>
        /// ctor.
        /// </summary>
        /// <param name="binanceApi">API client to be used for API calls.</param>
        /// <param name="loadTradingRules">Optional parameter to skip loading trading rules.</param>
        public BinanceClient(IBinanceApi binanceApi, bool loadTradingRules = false) : base(binanceApi)
        {
            _bApi = (BinanceApi)binanceApi;

            if (loadTradingRules)
            {
                LoadTradingRules();
            }
        }