api documentation


This page is documentation for RESTful API of project

This API is mainly for our business partners, however, there are public methods which everybody can use and can be found useful.

If you are not a partner and want to be, please contact us at [email protected].

If you are a partner and need help with implementation or have improvement suggestions, please contact [email protected].

Technical details

Zalando RESTful API and Event Guidelines are followed.

For exact details of each endpoint please see OpenAPI specs.


PHP example:

$body = null;
$key = 'syoihuudkjqc3882';
$nonce = rand() << 32 | rand();
$private = 'z2z77e0pl8rhtn9w';

$signature = hash_hmac('sha256',
    . "$"
    . $nonce
    . "$"
    . json_encode($body ?: [])//please note json_encode always inputs array even if $body is NULL

// curl call itself
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, '');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, false);

if (!is_null($body)) {//post method if $body is not NULL
    curl_setopt($ch, CURLOPT_POST, true);
    $dataJson = json_encode($body);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $dataJson);

curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Content-Type: application/json",
    "btcex-key: $key",
    "btcex-nonce: $nonce",
    "btcex-signature: $signature",
    "btcex-test: 1",
$response = curl_exec($ch);

$rType = (string)curl_getinfo($ch, CURLINFO_CONTENT_TYPE);//application/json
$rCode = (int)curl_getinfo($ch, CURLINFO_RESPONSE_CODE);//return code
$rData = json_decode($response, true);//json decoded data


On successful call you should get partner

See following input and output variables for signature function in order to test you have it right:

$nonce = 4835119959885924862;
$key = 'syoihuudkjqc3882';
$private = 'z2z77e0pl8rhtn9w';
$body = null;
$signature = 'cb11e4c0411ced017a6fda9df5c34cc78898685e488b2b05769acc01c9cdf5b6';

$body = [];
$signature = 'cb11e4c0411ced017a6fda9df5c34cc78898685e488b2b05769acc01c9cdf5b6';

$body = ['foo' => 'bar'];
$signature = '9eb77611ed3afdee9d864b72014213d3bea615422feac0fa74b985e9c5c40aeb';

JS example:

At first you need to install libraries yarn add crypto axios

//Include libraries
var crypto = require("crypto");
var axios = require("axios");
//Initialize parameters
var body = null;
var key = "syoihuudkjqc3882";
var privateKey = "z2z77e0pl8rhtn9w";
var nonce = "4835119959885924862";
//Create hash
var hasher = crypto.createHmac("sha256", privateKey);

var hashKey = key + "$" + nonce + "$" + JSON.stringify(body || []);
var hash = hasher.update(hashKey).digest("hex");

//Send request
var apiUrl = "";
var headers = {
    "Content-Type": "application/json",
    "btcex-key": key,
    "btcex-nonce": nonce,
    "btcex-signature": hash,
    "btcex-test": "1"

if (body) {, body, {headers: headers})
        .then(function (res) { console.log(res) })
        .catch(function (err) { console.log(err) });
} else {
    axios.get(apiUrl, {headers: headers})
        .then(function (res) { console.log(res) })
        .catch(function (err) { console.log(err) });

Test mode

To implementation testing there is Test mode present.

It is activated by adding custom hearder: btcex-test: 1

When using, please have in mind following:

  • underlying resources are not changed (even responses says otherwise though)

  • when creating orders, their variable_symbol is always 0

  • you as partner might have test mode enforced (case for for example)

  • Created by, Copyright © 2022 All Rights Reserved.