0.0
No commit activity in last 3 years
No release in over 3 years
WebSocket client for BitShares API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.15
~> 10.0
~> 3.0

Runtime

 Project Readme

Bitsharesws

This gem is websocket client for Decentralize Exchange BitShares. Now gem can get public information from Database API.

Installation

Add this line to your application's Gemfile:

gem 'bitsharesws'

And then execute:

$ bundle

Or install it yourself as:

$ gem install bitsharesws

Usage

BitShares is main class. Require it:

require 'bitshares'

Becouse BitShares is decentralize exchange, before you use it, you need set node (for example openledger):

BitShares.config do
	node 'wss://bitshares.openledger.info/ws'
end

This command try connect to this node. If you don't want connect now, use this:

BitShares.config false do
	node 'wss://bitshares.openledger.info/ws'
end

# some else code

BitShares.start # now try to connect

If you want to set username and password:

BitShares.config do
	node 'wss://bitshares.openledger.info/ws'
	login 'mylogin'
	pass 'mypass'
end

If you want to get account use BitShares.account 'some-account-name'. If you want to know balance some account use BitShares.balance 'some-account-name'.

Development

Now gem have only Database API. In future version, I want add all public and wallet API.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/scientistnik/bitsharesws.

License

The gem is available as open source under the terms of the MIT License.