GithubHelp home page GithubHelp logo

aleangel / bitfinex Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ohenrik/bitfinex

0.0 0.0 0.0 431 KB

A Python client for the Bitfinex API

License: MIT License

Python 99.11% Makefile 0.89%

bitfinex's Introduction

Bitfinex Python Client

Continuation of: https://github.com/scottjbarr/bitfinex

A Python client for the Bitfinex API v1 and v2 + websockets for v2.

1.0.0 release note

Functionality related to nonces has been changed in release 1.0.0. This might cause existing keys that where used on earlier version of this library to stop working due to a "nonce too small" error.

Either create a new key/secret to use with 1.0.0 or use a nonce multiplier of 100000 (100k).

Installation

pip install bitfinex-v2

Usage example

from bitfinex import WssClient, ClientV2, ClientV1

def my_handler(message):
  # Here you can do stuff with the messages
  print(message)

my_client = WssClient()
my_client.subscribe_to_ticker(
    symbol="BTCUSD",
    callback=my_handler
)
my_client.start()

Documentation

The full documentation is available here: https://bitfinex.readthedocs.io/en/latest/

Compatibility

This code has been tested on

  • Python 3.6

At the moment the library is only supported from 3.6 and above.

Contributing

Contributions are welcome and i will do my best to merge PR quickly.

Here are some guidelines that makes everything easier for everybody:

  1. Fork it.
  2. Create a feature branch containing only your fix or feature.
  3. Preferably add/update tests. Features or fixes that don't have good tests won't be accepted before someone adds them (mostly...).
  4. Create a pull request.

Setup

Install the requirements:

pip install -r requirements.txt

Testing

This projects uses pytest, so to run all the tests use:

pytest -v

At the moment functionality related to websocket v2 is not properly tested.

TODO

  • Add the remaining Websocket calls.
  • Implement all API calls that Bitfinex make available (v1).

References

Licence

The MIT License (MIT)

Copyright (c) 2014-2015 Scott Barr ^ Original project created by this guy.

See LICENSE.md

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.