Exemplo n.º 1
0
        private async Task GetMarginRequirementsAsync(CancellationToken cancellationToken)
        {
            var report = await _restClient.GetMarginRequirementsAsync(MarginAccountId, cancellationToken)
                         .ConfigureAwait(false);

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

            _logger.LogInformation($"Margin amounts: {toPrint}");
        }
Exemplo n.º 2
0
        public async Task Test_GetMarginRequirements()
        {
            var report = await _restClient.GetMarginRequirementsAsync(MarginAccountId, _token).ConfigureAwait(false);

            report.Should().NotBeNull();
            report.Should().NotBeNull();
            report.Account.Should().Be(MarginAccountId);
            report.MarginAmounts.Count.Should().BeGreaterThan(0);
            report.RejectReason.Should().BeNullOrEmpty();
        }