LiboPro API Documentation



Welcome to LiboPro API v1 Documentation

BASE ENDPOINT : 

API : https://libopro.com/api/v1/

NOTE: This is just the base endpoint and must be concatenated with the remaining part in each of the API methods e.g https://libopro.com/api/v1/depth


METHOD

Many of our API endpoints use POST method and takes the API token and other parameters as POST data. Others GET method. Details available in each individual endpoint explanation.


AUTHENTICATION

To access any of our endpoint you must obtain your API key from your user account page on LiboPro, navigate to API and click the generate API key button.

Send the API key as "api_key" in your POST request body. It MUST be sent as Form Data and NOT JSON.

api_key = "[YOUR API KEY]"

RATE LIMIT

10 request per seconds is only allowed for now for an API key. You can contact us for special purposes that require more than that limit. You can view your API key statistics on you user account page.


ALL ORDER TYPES

There are many order types on LiboPro and here is a list of all of them, you can refer to our posts page to know how each one works.

LIMIT   |   LIMIT-IOC   |   LIMIT-FOK   |   LIMIT-GTC

MARKET   |   MARKET-IOC   |   MARKET-FOK

STOP-LIMIT   |   STOP-MARKET

OSO

OCO

API RESPONSE

All our API response is in JSON format.

Success will be true if the request was successful else it will be false and have a message field.

Lets make a request to our base endpoint API which is the only method that uses a GET request.

Request:

GET - https://libopro.com/api/v1/

Response:

{
  "status": "ok",
  "success": true,
  "message": "Welcome to LiboPro API please refer to the docs for usage"
}

For failure response which is not available on the base endpoint API.

An incorrect API key for example will give:

{
  "success": false,
  "message": "invalid key"
}

COMMON ERRORS

If the result is returning "invalid key" please check to ensure you have sent the api_key POST data and in the format the library you are using is expecting. A very frequent error is that the key is not sent in the format expected so our system won't detect a key and will return "invalid key" message. The format some libraries use in sending data is as JSON body data, but we are expecting a FORM DATA format. Taking an example of axios using NodeJs you should use "qs" library or any other library that converts the JSON body data to Form Data like "form-data" library. An example using "qs" will look like this:

const axios = require('axios');
const qs = require('qs');

let url = "https://libopro.com/api/v1/pairs";

let data = {
   'api_key': "pSspsUS1KYgW71ZWOustX3IgaroY0HOo4F9X"
};

axios.post(url, qs.stringify(data))
 .then(function (body) {
    console.log(body.data);
 })
 .catch(function (e) {
    console.log(e);
 });

As you can see, using "qs" to wrap our body data will send the data as Form Data which is the required format for LiboPro API v1.

You can now proceed to the methods