Project

rybit

0.0
No release in over a year
Bybit API connector
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

~> 0.21.0
 Project Readme

Rybit

Bybit Ruby API client

Installation

gem 'rybit' # in your Gemfile

Usage

client = Rybit::Client.new(
  api_key: '<your API KEY>',
  secret_key: '<your SECRET KEY>',
  # testnet: <boolean> (default false)
)

client.get_wallet_balance(accountType: 'CONTRACT')

client.create_order(
  category: 'linear',
  symbol: 'BTCUSDT',
  side: 'Buy',
  positionIdx: 0,
  orderType: 'Limit',
  qty: '0.001',
  price: '10000',
  timeInForce: 'GTC',
  orderLinkId: SecureRandom.uuid
)

NOTE: tesnet credentials are created separately on https://testnet.bybit.com/app/user/api-management

Development

  • bin/setup to install dependencies
  • rake spec to run the tests
  • bin/console for an interactive prompt

  • bundle exec rake install to install this gem onto your local machine

Release

  1. Update the version number in version.rb
  2. Run bundle exec rake release

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/light-flight/rybit.