All Projects → bitoex → bitopro-api-ruby

bitoex / bitopro-api-ruby

Licence: MIT License
API Wrapper gem for the Bitopro(幣託) crypto currency exchange written in Ruby.

Programming Languages

ruby
36898 projects - #4 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to bitopro-api-ruby

moonshine
Moonshine is a homebrewed, open-source, non-custodial, Bitcoin wallet for iOS & Android.
Stars: ✭ 56 (+273.33%)
Mutual labels:  litecoin
foxfolio-desktop
Cryptocurrency portfolio management application which automatically retrieves balances and trades using exchange APIs
Stars: ✭ 63 (+320%)
Mutual labels:  litecoin
marscoin
Marscoin source tree
Stars: ✭ 37 (+146.67%)
Mutual labels:  litecoin
cryptowallet-cli
CW is a crypto wallet generator CLI tool for a lot of blockchains: Bitcoin, Ethereum, Binance Smart Chain and many others
Stars: ✭ 45 (+200%)
Mutual labels:  litecoin
bitcoin-kit-android
Comprehensive Bitcoin development library for iOS, implemented on Swift. SPV wallet implementation for Bitcoin, Bitcoin Cash, Litecoin and Dash blockchains. Fully compliant with existing standards and BIPs.
Stars: ✭ 102 (+580%)
Mutual labels:  litecoin
lara-block-io
A Laravel Package/Facade for the Block.io API
Stars: ✭ 22 (+46.67%)
Mutual labels:  litecoin
php-currency-api
Standardized wrapper for popular currency rate APIs. Currently supports FixerIO, CurrencyLayer, Open Exchange Rates and Exchange Rates API.
Stars: ✭ 17 (+13.33%)
Mutual labels:  currency-exchange
exch
a command-line tool to see currency exchange rates
Stars: ✭ 20 (+33.33%)
Mutual labels:  currency-exchange
Bitcoin-Payment-Gateway-ASP.NET
Bitcoin Payment Gateway API on ASP.NET. Accept Bitcoin, Litecoin, Dogecoin, Dash, Speedcoin, Reddcoin, Potcoin, Feathercoin, BTC, Vertcoin, Vericoin, Peercoin, Paycoin, MonetaryUnit, Swiscoin Payments Online on your ASP.NET C# website
Stars: ✭ 56 (+273.33%)
Mutual labels:  litecoin
bitcoin-cryptocurrency-tutorial
PHP & Cryptocurrencies Collections. Powered By https://btcschools.net
Stars: ✭ 142 (+846.67%)
Mutual labels:  litecoin
wallet-address-validator
Useful library for validation of Bitcoin, Litecoin, Ethereum and other cryptocoin addresses
Stars: ✭ 240 (+1500%)
Mutual labels:  litecoin
altcoin-bitcoin-explorer
PHP Altcoin/Bitcoin Data Explorer
Stars: ✭ 19 (+26.67%)
Mutual labels:  litecoin
desktop
CoinApp is a simple to use minimal Cryptocurrency Wallet for Ethereum, ERC20 Tokens, Bitcoin and Litecoin built for Windows, Mac and Linux.
Stars: ✭ 60 (+300%)
Mutual labels:  litecoin
blockstarter
This is a white label solution to create a contribution crypto-wallet that can be used in your ICO campaign.
Stars: ✭ 21 (+40%)
Mutual labels:  litecoin
crypto-price-widget
Easily track the price of your favorite crypto in an attractive desktop widget
Stars: ✭ 72 (+380%)
Mutual labels:  litecoin
CryptoCurrency
Page to keep track of value & profits of a portfolio of cryptocurrency (based on Coinmarketcap, Bitfinex and Binance)
Stars: ✭ 27 (+80%)
Mutual labels:  litecoin
rn-bitcoinjs-lib
A React Native compatible implementation of bitcoinjs-lib
Stars: ✭ 28 (+86.67%)
Mutual labels:  litecoin
block-explorer
The official Stakenet block explorer
Stars: ✭ 29 (+93.33%)
Mutual labels:  litecoin
miningcore
Miningcore is a high-performance Mining Pool Software for Linux and Windows.
Stars: ✭ 554 (+3593.33%)
Mutual labels:  litecoin
gdax bot
gdax_bot - Micro dollar cost averaging for crypto
Stars: ✭ 57 (+280%)
Mutual labels:  litecoin

Bitopro

Build Status Gem Version

This is an Ruby wrapper for the Bitopro exchange APIs.

Bitopro official API document

Limitations

Rate Limit

There is rate limits applied to each API, please check API documentation for more detail.

Precisions

Both price and amount are subject to decimal restrictions, please check official settings for more detail.

Minimum order amount

Checkout the official settings of minimum amount.

Installation

Add this line to your application's Gemfile:

gem 'bitopro'

And then execute:

$ bundle

Or install it yourself as:

$ gem install bitopro

Setup

Set account credentials if you want use authentication API endpoint.

Bitopro.configure do |config|
  config.email = "your_email"
  config.key = "your_key"
  config.secret = "your_secret"
end

Usage

require "bitopro"

client = Bitopro::Client.new

Public REST Endpoints

getOrderBook

client.order_book("btc_twd")
Output
{
  "bids": [
    {
      "price": "180500",
      "amount": "0.12817687",
      "count": 1,
      "total": "0.12817687"
    },
    {
      "price": "180010",
      "amount": "0.32292",
      "count": 2,
      "total": "0.45109687"
    },
    {
      "price": "180000",
      "amount": "0.24236",
      "count": 3,
      "total": "0.69345687"
    }
  ],
  "asks": [
    {
      "price": "180599",
      "amount": "0.00326056",
      "count": 1,
      "total": "0.00326056"
    },
    {
      "price": "180600",
      "amount": "0.04202575",
      "count": 1,
      "total": "0.04528631"
    }
  ]
}

getTickers

client.tickers("eth_btc")
Output
{
  "data": [
    {
      "high24hr": "0.03252800",
      "isBuyer": false,
      "lastPrice": "0.03252800",
      "low24hr": "0.03252800",
      "pair": "eth_btc",
      "priceChange24hr": "0",
      "volume24hr": "0.00000000"
    },
    {
      "high24hr": "541.00000000",
      "isBuyer": false,
      "lastPrice": "541.00000000",
      "low24hr": "541.00000000",
      "pair": "btg_twd",
      "priceChange24hr": "0",
      "volume24hr": "0.00000000"
    }
  ]
}

getTrades

client.recent_trades("btc_twd")
Output
{
  "data": [
    {
      "timestamp": 1557203407,
      "price": "180500.00000000",
      "amount": "0.07717687",
      "isBuyer": false
    },
    {
      "timestamp": 1557203187,
      "price": "180500.00000000",
      "amount": "0.05100000",
      "isBuyer": false
    },
    {
      "timestamp": 1557203053,
      "price": "180500.00000000",
      "amount": "0.01860000",
      "isBuyer": false
    },
    {
      "timestamp": 1557202804,
      "price": "180500.00000000",
      "amount": "0.04781533",
      "isBuyer": false
    },
    {
      "timestamp": 1557202804,
      "price": "180500.00000000",
      "amount": "0.06000000",
      "isBuyer": false
    }
  ]
}

Authenticated REST Endpoints

getAccountBalances

client.account_balance
Output
{
  "data": [
    {
      "amount": "10001",
      "available": "1.0",
      "currency": "bito",
      "stake": "10000"
    },
    {
      "amount": "0.0",
      "available": "1.0",
      "currency": "btc",
      "stake": "0"
    },
    {
      "amount": "3.0",
      "available": "0.01",
      "currency": "eth",
      "stake": "0"
    },
    {
      "amount": "30000",
      "available": "2500",
      "currency": "twd",
      "stake": "0"
    }
  ]
}

getOrderHistory

client.order_history
Output
{
  "data": [
    {
      "action": "buy",
      "avgExecutionPrice": "100000.00000000",
      "bitoFee": "0.00000000",
      "executedAmount": "1.00000000",
      "fee": "0.00100000",
      "feeSymbol": "BTC",
      "id": "123",
      "originalAmount": "1.00000000",
      "pair": "btc_twd",
      "price": "100000.00000000",
      "remainingAmount": "0.00000000",
      "status": 2,
      "timestamp": 1508753757000,
      "type": "limit"
    },
    {
      "action": "buy",
      "avgExecutionPrice": "100000.00000000",
      "bitoFee": "0.00000000",
      "executedAmount": "1.00000000",
      "fee": "0.00200000",
      "feeSymbol": "BTC",
      "id": "456",
      "originalAmount": "1.00000000",
      "pair": "btc_twd",
      "price": "100000.00000000",
      "remainingAmount": "0.00000000",
      "status": 2,
      "timestamp": 1508753787000,
      "type": "limit"
    }
  ]
}

getOrders

client.order_list(pair: "btc_twd", page: 1, active: false)
Output
{
  "data": [
    {
      "action": "buy",
      "avgExecutionPrice": "100000.00000000",
      "bitoFee": "0.00000000",
      "executedAmount": "1.00000000",
      "fee": "0.00100000",
      "feeSymbol": "BTC",
      "id": "123",
      "originalAmount": "1.00000000",
      "pair": "btc_twd",
      "price": "100000.00000000",
      "remainingAmount": "0.00000000",
      "status": 2,
      "timestamp": 1508753757000,
      "type": "limit"
    },
    {
      "action": "buy",
      "avgExecutionPrice": "100000.00000000",
      "bitoFee": "0.00000000",
      "executedAmount": "1.00000000",
      "fee": "0.00200000",
      "feeSymbol": "BTC",
      "id": "456",
      "originalAmount": "1.00000000",
      "pair": "btc_twd",
      "price": "100000.00000000",
      "remainingAmount": "0.00000000",
      "status": 2,
      "timestamp": 1508753787000,
      "type": "limit"
    }
  ],
  "page": 1,
  "totalPages": 10
}

createOrder

client.create_order(pair: "btc_twd", action: "buy", amount: "0.235", price: "1", type: "limit")
Output
{
  "action": "buy",
  "amount": "0.235",
  "orderId": "11233456",
  "price": "1.0",
  "timestamp": 1504262258000
}

cancelOrder

client.cancel_order(pair: "btc_twd", order_id: "12234566")
Output
{
  "action": "buy",
  "amount": 2.3,
  "orderId": "12234566",
  "price": 1.2,
  "timestamp": 1504262258000
}

getOrder

client.get_order(pair: "btc_twd", order_id: "123")
Output
{
  "action": "sell",
  "avgExecutionPrice": "112000.00000000",
  "bitoFee": "103.70370360",
  "executedAmount": "1.00000000",
  "fee": "0.00000000",
  "feeSymbol": "TWD",
  "id": "123",
  "originalAmount": "1.00000000",
  "pair": "btc_twd",
  "price": "112000.00000000",
  "remainingAmount": "0.00000000",
  "status": 2,
  "timestamp": 1508753757000,
  "type": "limit"
}

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/bitoex/bitopro-api-ruby. 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.

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature).
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

We're using RSpec for testing. Run the test suite with rake spec. Tests for pull requests are appreciated but not required. (If you don't include a test, we'll write one before merging.)

License

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].