Giter Site home page Giter Site logo

bitfinex-client-websocket's Introduction

Bitfinex websocket API version 2.0 client Build Status NuGet version

This is a C# implementation of the Bitfinex websocket API version 2.0 (BETA) found here:

https://bitfinex.readme.io/v2/docs

License:

Apache License 2.0

Features

  • instalation via NuGet (Bitfinex.Client.Websocket)
  • public and authenticated API
  • targeting .NET Standard 2.0 (.NET Core, Linux/MacOS compatible)
  • reactive extensions (Rx.NET)
  • integrated logging (Serilog)

Usage

var exitEvent = new ManualResetEvent(false);
var url = BitfinexValues.ApiWebsocketUrl;

using (var communicator = new BitfinexWebsocketCommunicator(url))
{
    using (var client = new BitfinexWebsocketClient(communicator))
    {
        client.Streams.PongStream.Subscribe(pong =>
        {
            Console.WriteLine($"Pong received! Id: {pong.Cid}") // Pong received! Id: 123456
            exitEvent.Set();
        });

        await communicator.Start();
        await client.Send(new PingRequest() {Cid = 123456});

        exitEvent.WaitOne(TimeSpan.FromSeconds(30));
    }
}

More usage examples:

  • integration tests (link)
  • console sample (link)

API coverage

PUBLIC Covered
Info
Ping-Pong
Errors
Channel subscribing
Channel unsubscribing
Ticker
Trades
Books
Raw books
Candles
AUTHENTICATED Covered
Account info
Orders
Positions
Trades
Funding
Wallets
Balance
Notifications
AUTHENTICATED - INPUT Covered
New order
Cancel order
Cancel order multi
Calc

Pull Requests are welcome!

Donations gratefully accepted.

  • Bitcoin: 1HfxKZhvm68qK3gE8bJAdDBWkcZ2AFs9pw
  • Litecoin: LftdENE8DTbLpV6RZLKLdzYzVU82E6dz4W
  • Ethereum: 0xb9637c56b307f24372cdcebd208c0679d4e48a47

bitfinex-client-websocket's People

Contributors

marfusios avatar axiomaticcrab avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.