示例#1
0
        public async Task Test_NewLimitOrder()
        {
            var er = await _restClient.NewLimitOrderAsync(
                NewClOrdId("limit"),
                "XBTUSD",
                Side.Sell, 1M,
                MarginAccountId,
                10000M,
                cancellationToken : _token).ConfigureAwait(false);

            er.Should().NotBeNull();
            er.Should().NotBeNull();
            er.ExecType.Should().Be(ExecType.PendingNewExec);
        }
        private async Task LimitOrderAsync(CancellationToken cancellationToken)
        {
            var executionReport = await _restClient.NewLimitOrderAsync(
                CommonFuncs.NewClOrdId("limit-order"),
                "BTC/USDT",
                Side.Sell,
                0.01M,
                SpotAccountId,
                10500,
                text : "order comment 1",
                cancellationToken : cancellationToken).ConfigureAwait(false);

            HandleOrderReport(executionReport);
        }