Giter Site home page Giter Site logo

makerdao / gdax-client Goto Github PK

View Code? Open in Web Editor NEW
2.0 6.0 13.0 25 KB

Client library for accessing price feeds from GDAX WebSocket. Reliably handles reconnection and price expiry.

License: GNU Affero General Public License v3.0

Python 92.02% Shell 7.98%
library

gdax-client's Introduction

gdax-client

Build Status codecov

gdax-client is a simple library for accessing price feeds from coinbase (former GDAX) WebSocket.

It handles WebSocket reconnection very reliably. It also automatically expires the price value if the client isn't able to connect to the WebSocket for at least expiry seconds.

Installation

This project uses Python 3.6.6.

In order to clone the project and install required third-party packages please execute:

git clone https://github.com/makerdao/gdax-client.git
cd gdax-client
pip3 install -r requirements.txt

License

See COPYING file.

gdax-client's People

Contributors

ith-harvey avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

gdax-client's Issues

Price feed does not expire if no GDAX trades are happening

If a GDAX market gets stuck or is stopped, as it happened with BTC:USD a few days ago, the client library keeps reporting the last price, but this price can be from many many hours ago.

Currently the client library thinks the price is valid as long as GDAX keeps sending keepalive messages. Unfortunately they have nothing to do with the market being active, they just tell the client that both GDAX is operative and the WebSocket connection works properly. An alternative would be to use last trade id which gets passed along the last price, and expire the price feed if that id hasn't changed for a while. Unfortunately there is nothing to compare the id to the first time we connect. :/

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.