NAV -image
bash javascript php python

Introduction

Welcome to our API documentation!

Authenticating requests

Authenticate requests to this API's endpoints by sending an Authorization header with the value "Bearer {YOUR_AUTH_KEY}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

You can retrieve your token by visiting your dashboard and clicking Create New Token.

Exchange

Create Exchange

Create an exchange and receive a bank or crypto address with / as reference code.

requires authentication

Example request:

curl -X POST \
    "https://coinnexus.ch/api/exchangePost" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"lang":"en","type":"buy","crypto":"btc","cryptoAmount":"0.053","fiat":"chf","fiatAmount":"50.21"}'
const url = new URL(
    "https://coinnexus.ch/api/exchangePost"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "lang": "en",
    "type": "buy",
    "crypto": "btc",
    "cryptoAmount": "0.053",
    "fiat": "chf",
    "fiatAmount": "50.21"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://coinnexus.ch/api/exchangePost',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'lang' => 'en',
            'type' => 'buy',
            'crypto' => 'btc',
            'cryptoAmount' => '0.053',
            'fiat' => 'chf',
            'fiatAmount' => '50.21',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://coinnexus.ch/api/exchangePost'
payload = {
    "lang": "en",
    "type": "buy",
    "crypto": "btc",
    "cryptoAmount": "0.053",
    "fiat": "chf",
    "fiatAmount": "50.21"
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (200):

{
    "id": 142,
    "p_accountHolder": "Coinnexus SA",
    "p_bic": "BCNNCH22",
    "p_bankName": "BCN, Switzerland",
    "p_bankCountry": "CH",
    "lang": "en",
    "type": "buy",
    "crypto": "btc",
    "cryptoAmount": null,
    "fiat": "chf",
    "fiatAmount": "50.21",
    "c_iban": "NL35ABNA9732254661",
    "c_cryptoAddress": "1bSUZAzYR24i1jqkKaHg1JQzN5o6Kj1Vh",
    "c_bic": "BNPABGSX",
    "c_fullName": "Madeleine Kanz",
    "c_address": "Brunnenstr. 3",
    "c_zip": "8610",
    "c_city": "Uster",
    "c_country": "CH",
    "c_email": "madeleine.kanz@example.com",
    "refAmount": 50.21,
    "p_iban": "CH44 0076 6000 1034 4164 1",
    "p_reference": "KmWB",
    "originalPaymentStatus": "new",
    "updated_at": "2020-04-15T11:29:21.000000Z",
    "created_at": "2020-04-15T11:29:20.000000Z"
}

Request

POST api/exchangePost

Body Parameters

customer.iban  string
Customer

customer.cryptoAddress  string optional
Customer (required_if: type=buy)

customer.bic  string optional
Customer (required_if: type=sell)

customer.fullName  string optional
Customer

customer.address  string optional
Customer (required_if: type=sell)

customer.zip  string optional
Customer (required_if: type=sell)

customer.city  string optional
Customer (required_if: type=sell)

customer.country  string optional
Customer (required_if: type=sell)

customer.email  string
Customer

lang  string
The lang of your exchange.

type  string
The type (buy,sell) of your exchange.

crypto  string optional
The cryptocurrency (btc) of your exchange.

cryptoAmount  string optional
The amount in crypto of your exchange.

fiat  string optional
string The fiatcurrency (chf,eur,usd) of your exchange.

fiatAmount  string optional
The amount in crypto of your exchange.

Check Exchange Limit

Check exchange limit of 1000 CHF per year by bank or crypto address.

requires authentication

Example request:

curl -X POST \
    "https://coinnexus.ch/api/checkLimit" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"iban":"NL35ABNA9732254661","cryptoAddress":"1bSUZAzYR24i1jqkKaHg1JQzN5o6Kj1Vh","crypto":"btc","cryptoAmount":"0.3456"}'
const url = new URL(
    "https://coinnexus.ch/api/checkLimit"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "iban": "NL35ABNA9732254661",
    "cryptoAddress": "1bSUZAzYR24i1jqkKaHg1JQzN5o6Kj1Vh",
    "crypto": "btc",
    "cryptoAmount": "0.3456"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://coinnexus.ch/api/checkLimit',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'iban' => 'NL35ABNA9732254661',
            'cryptoAddress' => '1bSUZAzYR24i1jqkKaHg1JQzN5o6Kj1Vh',
            'crypto' => 'btc',
            'cryptoAmount' => '0.3456',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://coinnexus.ch/api/checkLimit'
payload = {
    "iban": "NL35ABNA9732254661",
    "cryptoAddress": "1bSUZAzYR24i1jqkKaHg1JQzN5o6Kj1Vh",
    "crypto": "btc",
    "cryptoAmount": "0.3456"
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (200):

{
    "withinLimit": true
}

Request

POST api/checkLimit

Body Parameters

iban  string optional
Iban to check limit.

cryptoAddress  string optional
Crypto address to check limit.

crypto  string optional
Cryptocurrency to check limit. (btc)

cryptoAmount  string optional
Crypto amount to check limit.

Show Exchange

Show an existing exchange. The 'originalPaymentStatus' can be 'new' (after invoice created), 'paidUnconfirmed' (outstanding confirmation), 'proceeding' (internal payment proceeding), 'paidIn' or 'paidOut'.

requires authentication

Example request:

curl -X GET \
    -G "https://coinnexus.ch/api/exchange/{id}" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"id":"345"}'
const url = new URL(
    "https://coinnexus.ch/api/exchange/{id}"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "id": "345"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://coinnexus.ch/api/exchange/{id}',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'id' => '345',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://coinnexus.ch/api/exchange/{id}'
payload = {
    "id": "345"
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers, json=payload)
response.json()

Example response (200):

{
    "id": 142,
    "p_accountHolder": "Coinnexus SA",
    "p_bic": "BCNNCH22",
    "p_bankName": "BCN, Switzerland",
    "p_bankCountry": "CH",
    "lang": "en",
    "type": "buy",
    "crypto": "btc",
    "cryptoAmount": null,
    "fiat": "chf",
    "fiatAmount": "50.21",
    "c_iban": "NL35ABNA9732254661",
    "c_cryptoAddress": "1bSUZAzYR24i1jqkKaHg1JQzN5o6Kj1Vh",
    "c_bic": "BNPABGSX",
    "c_fullName": "Madeleine Kanz",
    "c_address": "Brunnenstr. 3",
    "c_zip": "8610",
    "c_city": "Uster",
    "c_country": "CH",
    "c_email": "madeleine.kanz@example.com",
    "refAmount": 50.21,
    "p_iban": "CH44 0076 6000 1034 4164 1",
    "p_reference": "KmWB",
    "originalPaymentStatus": "paidOut",
    "updated_at": "2020-04-15T11:29:21.000000Z",
    "created_at": "2020-04-15T11:29:20.000000Z"
}

Request

GET api/exchange/{id}

Body Parameters

id  string
Exchange ID

Check Exchange Rate

Check exchange rate by crypto and fiat pair.

Example request:

curl -X GET \
    -G "https://coinnexus.ch/api/rate/{currency_pair}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"currency_pair":"chf_btc, btc_chf, btc_eur, ..."}'
const url = new URL(
    "https://coinnexus.ch/api/rate/{currency_pair}"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "currency_pair": "chf_btc, btc_chf, btc_eur, ..."
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://coinnexus.ch/api/rate/{currency_pair}',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'currency_pair' => 'chf_btc, btc_chf, btc_eur, ...',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://coinnexus.ch/api/rate/{currency_pair}'
payload = {
    "currency_pair": "chf_btc, btc_chf, btc_eur, ..."
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers, json=payload)
response.json()

Example response (200):

{
    "name": "Euro",
    "cryptoCode": "BTC",
    "currencyPair": "BTC_EUR",
    "code": "EUR",
    "rate": 6318.163170000001,
    "fee": "0.0197",
    "fixedFee": "3.00"
}

Request

GET api/rate/{currency_pair}

Body Parameters

currency_pair  string optional
Currency Pair