示例#1
0
        private async Task <BalanceViewModel> GetBalanceDetailsAsync(string accountNumber)
        {
            var balanceApi       = new BalancesApi(_configuration.ApiHost);
            var balanceViewModel = await balanceApi.ApiV1AccountsByAccountNumberBalanceGetAsyncWithHttpInfo(accountNumber);

            return(balanceViewModel.Data);
        }
示例#2
0
        /// <summary>
        /// Initializes a new instance of <see cref="MatchingEngineClient"/>.
        /// </summary>
        /// <param name="settings">The matching engine client settings.</param>
        public MatchingEngineClient(MatchingEngineClientSettings settings)
        {
            AppContext.SetSwitch("System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport", true);

            if (!string.IsNullOrEmpty(settings.BalancesServiceAddress))
            {
                Balances = new BalancesApi(settings.BalancesServiceAddress);
            }

            if (!string.IsNullOrEmpty(settings.OrderBooksServiceAddress))
            {
                OrderBooks = new OrderBooksApi(settings.OrderBooksServiceAddress);
            }

            if (!string.IsNullOrEmpty(settings.CashOperationsServiceAddress))
            {
                CashOperations = new CashOperationsApi(settings.CashOperationsServiceAddress);
            }

            if (!string.IsNullOrEmpty(settings.TradingServiceAddress))
            {
                Trading = new TradingApi(settings.TradingServiceAddress);
            }
        }
 public void Init()
 {
     instance = new BalancesApi();
 }
 public BalancesApiTests()
 {
     instance = new BalancesApi();
 }
示例#5
0
        /// <summary>
        /// Initializes a new instance of <see cref="BalancesClient"/>.
        /// </summary>
        /// <param name="settings">The client settings.</param>
        public BalancesClient(BalancesClientSettings settings)
        {
            AppContext.SetSwitch("System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport", true);

            Balances = new BalancesApi(settings.ServiceAddress);
        }