API Documentation

Our api policies

Our api is a work in progress and will change overtime, please bear with us and use this function responsible and without any ill intentions. For example, don't spam our api with request that are not needed, we give a lot of information on the getgo, so don't request it multiple times


Response JSON

Our api responds with all our requests in the same way. Do keep in mind that the data is a child of the default template, so it does require an extra step to retreive data.

The template returns the following entries in a JSON object:

successbooleanA boolean saying if your request was succesfully handled and no errors were returned.
msnumberThe amount of ms it took, regardless of failure or success (for benchmarking)
errorstringIf any error is catched, success will be false and the error will be displayed here. If not, this will be null
dataobjectThe actual data response, can still be populated with data even though success is false
paramsobjectThe URL parameters given.

For example, this is what it looks like without the data points:

{ "success": true, "ms": 1, "error": null, "data": [Object], "params": [Object] }

Market format

Due to simplicity of listing we have a different way of displaying markets and API parameters. As you may have noticed we display our markets like PRIV/XSH. This is because you trade PRiVCY coins for SHIELD coins. In this we define a

Main currency - [XSH]

For us a main currency are markets that are used the most and are static. Our current main currencies are as followed:

Second currency - [PRIV]

These are the currencies added via votings or listings. These are crossed with main currencies to create market pairs. Until now a market pair can only exist between a main currency and a second currency. Example for second currencies are:

For the API

Now for the API to process marketpairs we have a small system that utilizes these main and second currencies methods. Due to the way request urls can be made/used we do not use / in our API requests. To work around this we have replaced them with a :: instead.

Also do we not process the markets the same way as we display them. We use a different naming to retreive data from our database than we display on our webpage. So, as we have shown before, PRIV/XSH is what we display. But to use the same market in our API request we need to define the Main currencyand the Second currency. Then we can use the following format to convert it: [maincurrency]::[secondcurrency] And use that in our API requests. So for our example (Market PRIV/XSH) We would get XSH::PRIV which is useable in our API.

API key

To get an api key from our server, you first need to create an account on our exchange Login/Sign up. Afterwards, go to settings and under api keys you can create an key.

If you already have an api key you can use it in our api by simply adding ?key=[apikey] to the end of your request. E.g:

GET /api/get/marketstats/ETH::BTC?key=p56dgKWCXxmVVMHcp56dgKWCXxmVVMHc

Get markets

GET /api/get/markets/[currencies]

Will get all the markets containing the currencies or the correct marketpair.

currenciesThe currency that you want to filter on, or a market you want to check.
For example:
GET /api/get/markets/BTC?key=p56dgKWCXxmVVMHcp56dgKWCXxmVVMHc { "success": true, "ms": 1, "data": [ "BTC::XSH", "BTC::ETH", "BTC::LTC", "BTC::DASH", "BTC::DOGE", "BTC::BCH", "BTC::ONION", "BTC::PRIV", "BTC::TRBO" ], "params": { "currencies": [ "BTC" ] } }

If the marketpair is not found, an error will be returned.

Get currencies

GET /api/get/currencies

Will get all the currencies available on our exchange. Including their fullname and shortname (ticker).

For example:
GET /api/get/markets/BTC?key=p56dgKWCXxmVVMHcp56dgKWCXxmVVMHc { "success": true, "ms": 1, "data": { "BCH": { "fullname": "Bitcoin Cash", "shortname": "BCH" }, "BTC": { "fullname": "Bitcoin", "shortname": "BTC" }, "DASH": { "fullname": "Dash", "shortname": "DASH" }, ... etc }, "params": {} }

Get global marketstats

GET /api/get/marketstats/[market]

Will get the global market stat of the given market.

marketThe market in the correct market format


posstringThe market pair in API request format
lastPricenumberThe last traded price in main currency
lowestnumberThe lowest trade in price 24h in main currency
changenumberThe change of the price in 24h in precentage
highestnumberThe highest trade price in 24h in main currency
volumenumberThe volume in 24h traded in second currency
For example:
GET /api/get/marketstats/BTC::ETH?key=p56dgKWCXxmVVMHcp56dgKWCXxmVVMHc { "success": true, "ms": 10, "data": { "pos": "BTC::ETH", "lastPrice": 0, "lowest": 0, "change": 0, "highest": 0, "volume": 0 }, "params": { "market": "BTC::ETH" } }

Get global marketstats

GET /api/get/markethistory/[market]

Will get the global market stat of the given market.

marketThe market in the correct market format

One object in the array consists of the following variables:

timeStampdateThe timestamp of the the made trade
pricenumberThe price of the made trade in main currency
amountnumberThe amount of the made trade in second currency
actionstringThe change of the price in 24h in precentage, can be either BUY or SELL
For example:
GET /api/get/markethistory/BTC::ONION?key=p56dgKWCXxmVVMHcp56dgKWCXxmVVMHc { "success": true, "ms": 2, "data": [ { "timeStamp": 1538376387613, "price": 0.000045, "amount": 9, "action": "SELL" }, { "timeStamp": 1538375179412, "price": 0.00004, "amount": 44, "action": "BUY" }, { "timeStamp": 1538375179412, "price": 0.00004, "amount": 35, "action": "BUY" }, ... etc ], "params": { "market": "BTC::ONION" } }