Пример #1
0
        public async Task Test_ListActiveOrders()
        {
            var orders = await _restClient.ListActiveOrdersAsync(MarginAccountId, cancellationToken : _token).ConfigureAwait(false);

            orders.Should().NotBeNull();
            orders.Length.Should().BeGreaterThan(0);
        }
Пример #2
0
        private async Task ListActiveOrdersAsync(CancellationToken cancellationToken)
        {
            var orders = await _restClient.ListActiveOrdersAsync(MarginAccountId, string.Empty, cancellationToken)
                         .ConfigureAwait(false);

            var toPrint = string.Join("\n", orders.Select(p => p.ToString()));

            _logger.LogInformation($"Active orders: {toPrint}");
        }