Пример #1
0
        public async Task <OperationResult> GetAccountHistory()
        {
            try
            {
                var res = new OperationResult
                {
                    Operation = "GetAccountHistory",
                    StartDate = DateTime.UtcNow
                };

                var request = new AccountHistoryRpcClientRequest
                {
                    Token = _token
                };
                var result = await _service.GetAccountHistory(request.ToJson());

                res.EndDate = DateTime.UtcNow;
                res.Result  = result;
                LogInfo($";{res.Duration};GetAccountHistory: Accounts={result.Account.Length}, OpenPositions={result.OpenPositions.Length}, PositionsHistory={result.PositionsHistory.Length}");
                return(res);
            }
            catch (Exception ex)
            {
                LogError(ex);
                return(null);
            }
        }
Пример #2
0
        public async Task GetHistory()
        {
            var request = new AccountHistoryRpcClientRequest
            {
                Token = _token
            };

            var result = await _service.GetHistory(request.ToJson());
        }
Пример #3
0
        public async Task <OperationResult> GetHistory()
        {
            var res = new OperationResult
            {
                Operation = "GetHistory",
                StartDate = DateTime.UtcNow
            };

            var request = new AccountHistoryRpcClientRequest
            {
                Token = _token
            };
            var result = await _service.GetHistory(request.ToJson());

            res.EndDate = DateTime.UtcNow;
            res.Result  = result;
            LogInfo($";{res.Duration};GetHistory: Items={result.Length}");
            return(res);
        }