API Documentation

Bitliber provides a simple API to allow for anyone to access the market. Requests are made using standard HTTP and responses are returned in JSON format.

The endpoint used for API calls is https://bitliber.com/api/v1 with methods appended. Always check the success flag to ensure that your API call succeeded. In case of error the error message will be provided in error field.

Public API

These API calls do not require any authentication.

/public/assets

Retrieve all supported asses at Bitliber.

Method (GET)

Response

{
  "success": true,
  "result": [
    {
      "currency": "BTC",
      "currencyLong": "Bitcoin"
    },
    {
      "currency": "XMR",
      "currencyLong": "Monero"
    }
  ]
}

/public/pairs

Retrieve all supported pairs at Bitliber.

Method (GET)

Response

{
  "success": true,
  "result": [
    {
      "pair": "AEON-BTC",
      "baseCurrency": "AEON",
      "quoteCurrency": "BTC",
      "baseCurrencyLong": "Aeon",
      "quoteCurrencyLong": "Bitcoin"
    },
    {
      "pair": "XMR-BTC",
      "baseCurrency": "XMR",
      "quoteCurrency": "BTC",
      "baseCurrencyLong": "Monero",
      "quoteCurrencyLong": "Bitcoin"
    }
  ]
}

/public/markets

Retrieve the last 24 hour summary of all active markets. The change represents the volume change in percentage.

Method (GET)

Response

{
  "success": true,
  "result": [
    {
      "pair": "AEON-BTC",
      "volume": 0.054,
      "change": 4.34782609,
      "last": 0.0022,
      "high": 0.0023,
      "low": 0.0022,
      "bid": 0.002,
      "ask": 0.0023
    },
    {
      "pair": "XMR-BTC",
      "volume": 1.896,
      "change": -7.23,
      "last": 0.024,
      "high": 0.03,
      "low": 0.024,
      "bid": 0.023,
      "ask": 0.025
    }
  ]
}

/public/ticker/{pair}

Retrieve the current tick values for a market. volume, change, high and low are in the last 24 hours. The change represents the volume change in percentage.

Method (GET)

Response

{
  "success": true,
  "result": {
    "volume": 0.054,
    "change": 4.34609,
    "last": 0.0022,
    "high": 0.0023,
    "low": 0.0022,
    "bid": 0.002,
    "ask": 0.0023
  }
}

/public/orders/{pair}

Retrieve orderbook for a market.

Method (GET)

Response

{
  "success": true,
  "result": {
    "buy": [
      {
        "price": 0.002,
        "size": 12
      }
    ],
    "sell": [
      {
        "price": 0.0023,
        "size": 12
      },
      {
        "price": 0.0024,
        "size": 23
      }
    ]
  }
}

/public/history/{pair}

Retrieve the latest trades that have occured for a market. Limited to 100 of the most recent trades. The date is a Unix UTC timestamp.

Method (GET)

Response

{
  "success": true,
  "result": [
    {
      "date": "1529351745517",
      "quantity": 12,
      "price": 0.0022,
      "total": 0.0264,
      "type": "buy"
    },
    {
      "date": "1529351740431",
      "quantity": 12,
      "price": 0.0023,
      "total": 0.0276,
      "type": "sell"
    }
  ]
}

API Documentation

The endpoint used for API calls is https://bitliber.com/api/v1 with methods appended. Always check the success flag to ensure that your API call succeeded. In case of error the error message will be provided in error field.

Private API

API keys are needed for these calls. You can generate an API keys at your profile settings. API keys can be removed and new once can be generated. Remember to keep your API keys in secure place.

For authentication, append API keys to basic authentication header field in the HTTP request, for example:

curl -u '{key}:{secret}' https://bitliber.com/api/v1/{method}.

private/order/buy

Submit a buy order to the order book for a specific market. If your order is successful but not fully fulfilled, the order is placed onto the order book and you will receive a uuid for the order.

Method (POST)
                        

Parameters

pair

amount

price

Response
                        {
                          "success": true,
                          "uuid": "4d6c35d0-1513-11e9-9663-835cb73ff913"
                        }
                        

private/order/sell

Submit a sell order to the order book for a specific market. If your order is successful but not fully fulfilled, the order is placed onto the order book and you will receive a uuid for the order.

Method (POST)
                        

Parameters

pair

amount

price

Response
                        {
                          "success": true,
                          "uuid": "4d6c35d0-1513-11e9-9663-835cb73ff913"
                        }
                        

private/order/cancel

Cancel an order on the order book. The uuid parameter can also be set to all and all of your orders will be cancelled.

Method (POST)
                        

Parameters

uuid

Response
                        {
                          "success": true,
                          "uuid": "4d6c35d0-1513-11e9-9663-835cb73ff913"
                        }
                        

private/account/orders

Retrieve the active orders under your account. The pair query parameter is optional, and leaving it out will return all orders. date is a Unix UTC timestamp.

Method (GET)
                        

Query parameter

pair

Response
                        {
                          "success": true,
                          "orders": [
                            {
                              "uuid": "453ca690-1515-11e9-9663-835cb73ff913",
                              "date": "1547150000000",
                              "type": "ask",
                              "pair": "aeon-btc",
                              "price": 0.002,
                              "amount": 10
                            },
                            {
                              "uuid": "401400a0-1515-11e9-9663-835cb73ff913",
                              "date": "1547150000000",
                              "type": "ask",
                              "pair": "aeon-btc",
                              "price": 0.002,
                              "amount": 10
                            },
                            {
                              "uuid": "3f881450-1515-11e9-9663-835cb73ff913",
                              "date": "1547150000000",
                              "type": "ask",
                              "pair": "aeon-btc",
                              "price": 0.002,
                              "amount": 10
                            }
                          ]
                        }
                        

private/account/order/:uuid

Retrieve information about a specific order. date is a Unix UTC timestamp.

Method (GET)
                        
Response
                        {
                          "success": true,
                          "order": {
                            "uuid": "453ca690-1515-11e9-9663-835cb73ff913",
                            "date": "1547150000000",
                            "type": "ask",
                            "pair": "aeon-btc",
                            "price": 0.002,
                            "amount": 10
                          }
                        }
                        

private/account/balances

Retrieve all balances for your account.

Method (GET)
                        
Response
                        {
                          "success": true,
                          "balances": [
                            {
                              "asset": "BTC",
                              "available": 1.024,
                              "reserved": 0.024
                            },
                            {
                              "asset": "XMR",
                              "available": 0,
                              "reserved": 0
                            },
                            {
                              "asset": "AEON",
                              "available": 100,
                              "reserved": 54
                            }
                          ]
                        }
                        

private/account/balance/:asset

Get the balance of a specific asset for you account. The asset field is required, such as BTC.

Method (GET)
                        
Response
                        {
                          "success": true,
                          "balance": {
                            "asset": "BTC",
                            "available": 1.024,
                            "reserved": 0
                          },
                        }
                        

Node client

See it on gihthub