NAV -image
bash javascript php python

Introduction

This documentation aims to provide all the information you need to work with our API.

Base URL

https://coinnexus.ch

Authenticating requests

This API is authenticated 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

Calculate Exchange

Calculate the get or send amount of an exchange with latest rate and fees.

requires authentication

Example request:

curl -X POST \
    "https://coinnexus.ch/api/exchangeCalculate" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"sendAmount":"0.053","sendCurrency":"btc (btc)","getAmount":"50.21","getCurrency":"chf (chf,eur,usd)","fixed":"sendAmount (sendAmount,getAmount)"}'
const url = new URL(
    "https://coinnexus.ch/api/exchangeCalculate"
);

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

let body = {
    "sendAmount": "0.053",
    "sendCurrency": "btc (btc)",
    "getAmount": "50.21",
    "getCurrency": "chf (chf,eur,usd)",
    "fixed": "sendAmount (sendAmount,getAmount)"
}

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

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://coinnexus.ch/api/exchangeCalculate',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'json' => [
            'sendAmount' => '0.053',
            'sendCurrency' => 'btc (btc)',
            'getAmount' => '50.21',
            'getCurrency' => 'chf (chf,eur,usd)',
            'fixed' => 'sendAmount (sendAmount,getAmount)',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://coinnexus.ch/api/exchangeCalculate'
payload = {
    "sendAmount": "0.053",
    "sendCurrency": "btc (btc)",
    "getAmount": "50.21",
    "getCurrency": "chf (chf,eur,usd)",
    "fixed": "sendAmount (sendAmount,getAmount)"
}
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):


{
"name":"Euro",
"cryptoCode":"BTC",
"currencyPair":"BTC_EUR",
"code":"EUR",
"rate":6318.163170000001,
"fee":"1.97",
"fixedFee":"3.00",
"calculated":"sendAmount",
"getAmount":null,
"sendAmount":"50.21",
}

Request      

POST api/exchangeCalculate

Body Parameters

sendAmount  string optional  
The amount you send for exchange.

sendCurrency  string optional  
The currency of the amount you send for exchange.

getAmount  string optional  
The amount you get in exchange.

getCurrency  string optional  
The currency of the amount you get in exchange.

fixed  string  
The fixed amount from where we calculate the 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","sendAmount":"0.053","sendCurrency":"btc (btc)","getAmount":"50.21","getCurrency":"chf (chf,eur,usd)","type":"buy","fixed":"sendAmount (sendAmount,getAmount)"}'
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",
    "sendAmount": "0.053",
    "sendCurrency": "btc (btc)",
    "getAmount": "50.21",
    "getCurrency": "chf (chf,eur,usd)",
    "type": "buy",
    "fixed": "sendAmount (sendAmount,getAmount)"
}

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

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://coinnexus.ch/api/exchangePost',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'json' => [
            'lang' => 'en',
            'sendAmount' => '0.053',
            'sendCurrency' => 'btc (btc)',
            'getAmount' => '50.21',
            'getCurrency' => 'chf (chf,eur,usd)',
            'type' => 'buy',
            'fixed' => 'sendAmount (sendAmount,getAmount)',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://coinnexus.ch/api/exchangePost'
payload = {
    "lang": "en",
    "sendAmount": "0.053",
    "sendCurrency": "btc (btc)",
    "getAmount": "50.21",
    "getCurrency": "chf (chf,eur,usd)",
    "type": "buy",
    "fixed": "sendAmount (sendAmount,getAmount)"
}
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",
    "getCurrency": "btc",
    "getAmount": null,
    "sendCurrency": "chf",
    "sendAmount": "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_cryptoAddress": "3AYjsG6xifJGKkxV7szbSizZBMUg6YJfSY",
    "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  object optional  

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.

sendAmount  string optional  
The amount you send for exchange.

sendCurrency  string optional  
The currency of the amount you send for exchange.

getAmount  string optional  
The amount you get in exchange.

getCurrency  string optional  
The currency of the amount you get in exchange.

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

fixed  string  
The fixed amount from where we calculate the 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","sendAmount":"0.053","sendCurrency":"btc (btc)","getAmount":"50.21","getCurrency":"chf (chf,eur,usd)","fixed":"sendAmount (sendAmount,getAmount)"}'
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",
    "sendAmount": "0.053",
    "sendCurrency": "btc (btc)",
    "getAmount": "50.21",
    "getCurrency": "chf (chf,eur,usd)",
    "fixed": "sendAmount (sendAmount,getAmount)"
}

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

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://coinnexus.ch/api/checkLimit',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'json' => [
            'iban' => 'NL35ABNA9732254661',
            'cryptoAddress' => '1bSUZAzYR24i1jqkKaHg1JQzN5o6Kj1Vh',
            'sendAmount' => '0.053',
            'sendCurrency' => 'btc (btc)',
            'getAmount' => '50.21',
            'getCurrency' => 'chf (chf,eur,usd)',
            'fixed' => 'sendAmount (sendAmount,getAmount)',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://coinnexus.ch/api/checkLimit'
payload = {
    "iban": "NL35ABNA9732254661",
    "cryptoAddress": "1bSUZAzYR24i1jqkKaHg1JQzN5o6Kj1Vh",
    "sendAmount": "0.053",
    "sendCurrency": "btc (btc)",
    "getAmount": "50.21",
    "getCurrency": "chf (chf,eur,usd)",
    "fixed": "sendAmount (sendAmount,getAmount)"
}
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.

sendAmount  string optional  
The amount you send for exchange.

sendCurrency  string optional  
The currency of the amount you send for exchange.

getAmount  string optional  
The amount you get in exchange.

getCurrency  string optional  
The currency of the amount you get in exchange.

fixed  string optional  
The fixed amount from where we calculate the exchange.

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/ullam" \
    -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/ullam"
);

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

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

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

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://coinnexus.ch/api/exchange/ullam',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            '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/ullam'
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",
    "fixed": "getAmount",
    "sendCurrency": "btc",
    "sendAmount": null,
    "getCurrency": "chf",
    "getAmount": "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}

URL Parameters

id  string  

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/officiis" \
    -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/officiis"
);

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

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

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

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://coinnexus.ch/api/rate/officiis',
    [
        'headers' => [
            '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/officiis'
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": "1.97",
    "fixedFee": "3.00"
}

Request      

GET api/rate/{currency_pair}

URL Parameters

currency_pair  string  

Body Parameters

currency_pair  string optional  
Currency Pair