Skip to content

Code-Sharp/PoloniexWebSocketsApi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PoloniexWebSocketsApi

A C# wrapper for the Poloniex WebSockets api

NuGet package

This package is available on NuGet.org under the name PoloniexWebSocketsApi.

Usage example

Check this JavaScript file for api reference.

static async Task Main(string[] args)
{
    PoloniexChannel poloniexChannel = new PoloniexChannel();
    
    poloniexChannel.MessageArrived += OnMessageArrived;
    
    await poloniexChannel.ConnectAsync();
    
    await poloniexChannel.SendAsync(new PoloniexCommand() { Channel = 1001, Command = PoloniexCommandType.Subscribe });
    await poloniexChannel.SendAsync(new PoloniexCommand() { Channel = 1002, Command = PoloniexCommandType.Subscribe });
    await poloniexChannel.SendAsync(new PoloniexCommand() { Channel = 1003, Command = PoloniexCommandType.Subscribe });
    await poloniexChannel.SendAsync(new PoloniexCommand() { Channel = TickerSymbol.BTC_XMR, Command = PoloniexCommandType.Subscribe });

    Console.ReadLine();
}

private static void OnMessageArrived(JsonSerializer serializer, object message)
{
    Console.WriteLine(message);
}

About

A .NET Standard 2.0 wrapper for the Poloniex WebSockets api

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages