Skip to content

cyberprophet/Binance

Repository files navigation

NuGet

using Newtonsoft.Json;

using ShareInvest.Binance;
using ShareInvest.Binance.Models;

IEnumerable<Ticker> tickers;

using (var api = new Quotation())
{
    tickers = await api.GetEntireDayTickerAsync() ?? [];
}

using (var socket = new WebSocket())
{
    socket.SendTicker += (sender, e) =>
    {
        Console.WriteLine(JsonConvert.SerializeObject(e.Ticker, Formatting.Indented));
    };
    await socket.ConnectAsync();

    var task = Task.Run(socket.ReceiveAsync);

    await socket.RequestAsync("SUBSCRIBE", "!ticker@arr");
    await task;
}

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages