Beispiel #1
0
        public static void GetTradeSession(TickTraderWebClient client)
        {
            // Account trade session
            TTTradeSession tradesession = client.GetTradeSession();

            Console.WriteLine("Trade session status: {0}", tradesession.SessionStatus);
        }
Beispiel #2
0
        public static void GetPublicTradeSession(TickTraderWebClient client)
        {
            // Public trade session
            TTTradeSession publictradesession = client.GetPublicTradeSession();

            Console.WriteLine("TickTrader name: {0}", publictradesession.PlatformName);
            Console.WriteLine("TickTrader company: {0}", publictradesession.PlatformCompany);
            Console.WriteLine("TickTrader address: {0}", publictradesession.PlatformAddress);
            Console.WriteLine("TickTrader timezone offset: {0}", publictradesession.PlatformTimezoneOffset);
            Console.WriteLine("TickTrader session status: {0}", publictradesession.SessionStatus);
        }
Beispiel #3
0
        public async Task GetTradeSession()
        {
            TradeSession.Clear();

            // Account trade session
            TTTradeSession tradeSession = await _client.GetTradeSessionAsync();

            TradeSession.Add(new KeyValuePair <string, object>(nameof(tradeSession.PlatformName), tradeSession.PlatformName));
            TradeSession.Add(new KeyValuePair <string, object>(nameof(tradeSession.PlatformCompany), tradeSession.PlatformCompany));
            TradeSession.Add(new KeyValuePair <string, object>(nameof(tradeSession.PlatformAddress), tradeSession.PlatformAddress));
            TradeSession.Add(new KeyValuePair <string, object>(nameof(tradeSession.PlatformTimezoneOffset), tradeSession.PlatformTimezoneOffset));
            TradeSession.Add(new KeyValuePair <string, object>(nameof(tradeSession.SessionId), tradeSession.SessionId));
            TradeSession.Add(new KeyValuePair <string, object>(nameof(tradeSession.SessionStatus), tradeSession.SessionStatus));
            TradeSession.Add(new KeyValuePair <string, object>(nameof(tradeSession.SessionStartTime), tradeSession.SessionStartTime.ToString("u")));
            TradeSession.Add(new KeyValuePair <string, object>(nameof(tradeSession.SessionEndTime), tradeSession.SessionEndTime.ToString("u")));
            TradeSession.Add(new KeyValuePair <string, object>(nameof(tradeSession.SessionOpenTime), tradeSession.SessionOpenTime.ToString("u")));
            TradeSession.Add(new KeyValuePair <string, object>(nameof(tradeSession.SessionCloseTime), tradeSession.SessionCloseTime.ToString("u")));
        }