Ejemplo n.º 1
0
 public void MarketDataStart()
 {
     foreach (var currency in Symbols)
     {
         initial[currency] = true;
         var ws = new Gemini.Websocket("wss://api.gemini.com/v1/marketdata/" + currency.ToUpper(), MarketDataCallback, currency);
         ws.Connect();
         sockets.Add(ws);
     }
 }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            Console.WriteLine("24hr VWAP {0}",
                              Math.Round(Vwap(DateTime.UtcNow.Subtract(new TimeSpan(24, 0, 0)).ToTimestamp(), DateTime.UtcNow.ToTimestamp()), 2));

            // Initialize the websocket with a callback
            Gemini.Websocket ws = new Gemini.Websocket("wss://api.gemini.com/v1/marketdata/BTCUSD?heartbeat=true", callback, null);
            ws.Connect();
            while (true)
            {
                ;
            }
        }