Simple Ruby client for the Hexsafe API.
Simply using rubygems:
gem install hexsafe
Add this line to your application's Gemfile:
gem 'hexsafe'
And then execute:
$ bundle install
Or install it yourself as:
$ git clone https://github.com/imrahulprajapat/hexsafe-ruby.git
$ cd hexsafe-ruby
$ bundle
$ gem build hexsafe.gemspec
$ gem install hexsafe-0.0.0.gem
If you want to call Hexsafe Apis, which is normally what you want to do, it's as simple as:
hex_safe = Hexsafe::Api.new(env: "Test", key: "your-api-key", secret: "your-key-secret")
env: Envoirments i.e Test, Main
key: api key, will get when you create a account on hexsafe
secret: your secret when you create a account on hexsafe
For more information check the API docs at:
hex_safe.get_accounts
hex_safe.get_account account_id
hex_safe.get_balance account_id
hex_safe.get_txn ticker, tx_hash
ticker: i.e BTC, ETH
tx_hash: "transaction_id"
hex_safe.get_txn_ac account_id, start_time, end_time
hex_safe.create_deposit body
body = {"account_id": 1028, "wallet_name": "test-wallet", "asset_ticker": "ETH", "quantity": 1.5, "memo": "string", "note": "string"}
hex_safe.cancel_deposit request_id
hex_safe.get_deposit request_id
hex_safe.create_deposit body
body = {"quantity": 1.5, "memo": "string", "note": "string", "account_id": 1028, "asset_ticker": "ETH", "wallet_name": "test-wallet", "to_address": "0x8CfbA3Cd46fB7136Fc04c6B863bCbcb6d5FDb6DA", "fee_price": 75, "fee_limit": 21000}
hex_safe.cancel_withdraw request_id
hex_safe.get_withdraw request_id
hex_safe.subscribe_webhook body
body = {"url": "https://localhost/callback_url/","account_id": 2,"wallet_type_id": 3, "asset_ticker": "ETH" }
hex_safe.get_subscriptions account_id
hex_safe.delete_subscription uuid
- To generate api token you need to discuss with hexsafe support.