README.md in viabtc-0.2.0 vs README.md in viabtc-0.3.0
- old
+ new
@@ -1,10 +1,10 @@
-# ViaBTC
+# ViaBTC 📈
-[](https://travis-ci.org/krmbzds/viabtc) [](https://rubygems.org/gems/viabtc) [](https://rubygems.org/gems/viabtc)
+[](https://travis-ci.org/krmbzds/viabtc) [](https://rubygems.org/gems/viabtc) [](https://rubygems.org/gems/viabtc) [](https://www.rubydoc.info/gems/viabtc/)
-An HTTP client to interface with the open-source [ViaBTC Exchange Server][ViaBTC Exchange Server Repo] API.
+An HTTP & WebSocket client to interface with the open-source [ViaBTC Exchange Server][ViaBTC Exchange Server Repo].
## Installation
Add `viabtc` to your Gemfile and run `bundle` OR install it yourself with `gem install viabtc`.
@@ -12,69 +12,46 @@
If using **Rails**, create a file named `viabtc.rb` under `config/initializers` and add the following block of code.
```rb
ViaBTC.configure do |config|
- config.base_url = 'http://localhost:18080'
- config.faraday_response = :logger
- config.faraday_adapter = :net_http
+ config.http_base_url = 'http://localhost:18080'
end
```
-If not, add it anywhere in your code that runs before a new client is initialized.
+If not, add it anywhere in your code that runs before a new client is initialized. Read more at: 📖[Configuration Wiki](https://github.com/krmbzds/viabtc/wiki/Configuration)
## Usage
Create a new instance:
```rb
-viabtc_client = ViaBTC::Client.new
+viabtc_http_client = ViaBTC::HTTP::Client.new
```
Make an API request:
```rb
-viabtc_client.market_status(market: 'ETHBTC')
-```
+viabtc_http_client.market_status(market: 'ETHBTC')
-Market status example output:
-```rb
-{"error"=>nil, "result"=>{"low"=>"0", "period"=>86400, "last"=>"0", "high"=>"0", "open"=>"0", "volume"=>"0", "close"=>"0", "deal"=>"0"}, "id"=>0}
+#=> {"error"=>nil, "result"=>{"low"=>"0", "period"=>86400, "last"=>"0", "high"=>"0", "open"=>"0", "volume"=>"0", "close"=>"0", "deal"=>"0"}, "id"=>0}
```
## Support
-### API Actions
+#### Ruby Versions Tested Against
-#### HTTP Protocol
+- ✅ `2.6.0` (stable)
+- ✅ `2.5.3` (stable)
+- ✅ `2.4.5` (stable)
+- ⏳ `2.3.8` (security maintenance phase)
-| API Method | Corresponding Methods |
-|---|---|
-| `balance.query` | `#balance` |
-| `balance.update` | `#withdraw` `#deposit` |
-| `balance.history` | `#balance_history` |
-| `asset.list` | `#asset_list` |
-| `asset.summary` | `#asset_summary` |
-| `order.put_limit` | `#limit_sell` `#limit_buy` |
-| `order.put_market` | `#market_sell` `#market_buy` |
-| `order.cancel` | `#cancel_order` |
-| `order.deals` | `#order_deals` |
-| `order.book` | `#sell_orders` `#buy_orders` |
-| `order.depth` | `#order_depth` |
-| `order.pending` | `#pending_orders` |
-| `order.pending_detail` | `#pending_order_details` |
-| `order.finished` | `#finished_orders` `#finished_sell_orders` `#finished_buy_orders` |
-| `order.finished_detail` | `#finished_order_detail` |
-| `market.last` | `#market_last` |
-| `market.deals` | `#market_deals` |
-| `market.user_deals` | `#user_executed_orders` |
-| `market.kline` | `#market_kline` |
-| `market.status` | `#market_status` |
-| `market.status_today` | `#market_status_today` |
-| `market.list` | `#market_list` |
-| `market.summary` | `#market_summary` |
+#### ViaBTC Exchange Server API Support
+- 📖 [HTTP Protocol](https://github.com/krmbzds/viabtc/wiki/API-Support#http-protocol)
+- 📖 [WebSocket Protocol](https://github.com/krmbzds/viabtc/wiki/API-Support#websocket-protocol)
+
## Development
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [RubyGems][RubyGems].
@@ -86,10 +63,10 @@
3. Create your feature branch (`git checkout -b my-new-feature`)
4. Commit your changes (`git commit -am 'Add some feature'`)
5. Push to the branch (`git push origin my-new-feature`)
6. Create new Pull Request
-### Donations
+### Donations ❤️
You can donate me at [Librepay][Donation]. Thanks! ☕️
## Is it any good?