using Newtonsoft.Json;
using ShareInvest.Coinone;
using ShareInvest.Coinone.Models;
IEnumerable<Ticker> tickers;
using (var api = new Quotation())
{
var market = await api.GetMarketAsync();
var response = await api.GetTickerAsync(true);
tickers = response?.Tickers;
foreach (var ticker in tickers)
{
Console.WriteLine(ticker.Code);
}
}
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.RequestPingAsync();
foreach (var ticker in tickers)
{
await socket.RequestAsync("SUBSCRIBE", "TICKER", "KRW", ticker.Code.ToUpperInvariant());
}
await task;
}
forked from cyberprophet/Coinone
-
Notifications
You must be signed in to change notification settings - Fork 0
crypto-currency-by-exchange/coinone
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Releases
No releases published
Packages 0
No packages published
Languages
- C# 100.0%