Coder Social home page Coder Social logo

icostan / deribit-api-ruby Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 82 KB

Idiomatic Ruby library for Deribit 2.0 API

Home Page: https://docs.deribit.com

License: MIT License

Ruby 96.76% Shell 1.72% Python 1.51%
bitcoin deribit deribit-api exchange-api options ruby ruby-library trading-api

deribit-api-ruby's People

Contributors

icostan avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

blogkid

deribit-api-ruby's Issues

Websocket subscription, not streaming

I tried following the readme example but it does not stream from the websocket. Only the last 10 trades are shown.

➜  project git:(master) ✗ rails c
Running via Spring preloader in process 68646
Loading development environment (Rails 6.0.2.1)
irb(main):001:0> client = Deribit::Client.new
irb(main):002:1* client.trades do |trade|
irb(main):003:1*   puts trade
irb(main):004:0> end
#<Hashie::Mash amount=40.0 direction="buy" indexPrice=9752.33 instrument="BTC-27MAR20" price=9942.5 quantity=4 tickDirection=1 timeStamp=1582552602072 tradeId=62823772 tradeSeq=2533026>
#<Hashie::Mash amount=2990.0 direction="buy" indexPrice=9752.33 instrument="BTC-PERPETUAL" price=9764.5 quantity=299 tickDirection=1 timeStamp=1582552602005 tradeId=62823771 tradeSeq=38286547>
#<Hashie::Mash amount=770.0 direction="buy" indexPrice=9752.33 instrument="BTC-PERPETUAL" price=9764.5 quantity=77 tickDirection=1 timeStamp=1582552602005 tradeId=62823770 tradeSeq=38286546>
#<Hashie::Mash amount=20.0 direction="buy" indexPrice=9752.33 instrument="BTC-PERPETUAL" price=9764.5 quantity=2 tickDirection=1 timeStamp=1582552602005 tradeId=62823769 tradeSeq=38286545>
#<Hashie::Mash amount=10.0 direction="buy" indexPrice=9752.33 instrument="BTC-PERPETUAL" price=9764.5 quantity=1 tickDirection=0 timeStamp=1582552602005 tradeId=62823768 tradeSeq=38286544>
#<Hashie::Mash amount=10.0 direction="buy" indexPrice=9752.33 instrument="BTC-PERPETUAL" price=9764.0 quantity=1 tickDirection=1 timeStamp=1582552602005 tradeId=62823767 tradeSeq=38286543>
#<Hashie::Mash amount=10.0 direction="buy" indexPrice=9752.33 instrument="BTC-PERPETUAL" price=9764.0 quantity=1 tickDirection=1 timeStamp=1582552602005 tradeId=62823766 tradeSeq=38286542>
#<Hashie::Mash amount=30.0 direction="buy" indexPrice=9752.33 instrument="BTC-PERPETUAL" price=9764.0 quantity=3 tickDirection=1 timeStamp=1582552602005 tradeId=62823765 tradeSeq=38286541>
#<Hashie::Mash amount=10.0 direction="buy" indexPrice=9752.33 instrument="BTC-PERPETUAL" price=9764.0 quantity=1 tickDirection=0 timeStamp=1582552602005 tradeId=62823764 tradeSeq=38286540>
#<Hashie::Mash amount=50.0 direction="buy" indexPrice=9752.33 instrument="BTC-PERPETUAL" price=9763.5 quantity=5 tickDirection=1 timeStamp=1582552602005 tradeId=62823763 tradeSeq=38286539>

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.