Bitmex
A Ruby wrapper for the Bitmex API v1
Installation
gem install bitmex_client
Usage
See https://www.bitmex.com/api/explorer/ for details.
HTTP API
Example
BitmexClient.configure do |config|
config.adapter = Faraday.default_adapter
config.url = 'https://www.bitmex.com'
config.user_agent = 'Bitmex Ruby Gem'
config.loud_logger = true
end
public_client = BitmexClient.http_public_client
p public_client.instrument
private_client = BitmexClient.http_private_client('YOUR_API_KEY', 'YOUR_API_SECRET')
private_client.create_order("XBTUSD", 100, {price: 6700, execInst: "ParticipateDoNotInitiate", ordType: 'Limit', side: 'Sell'})
p private_client.position
p private_client.user_wallet
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/markgeek/bitmex_client. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
License
The gem is available as open source under the terms of the MIT License.