icostan / deribit-api-ruby Goto Github PK
View Code? Open in Web Editor NEWIdiomatic Ruby library for Deribit 2.0 API
Home Page: https://docs.deribit.com
License: MIT License
Idiomatic Ruby library for Deribit 2.0 API
Home Page: https://docs.deribit.com
License: MIT License
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>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.