REST API v1

Resources

ResourceDescription
OrderAn order holding payment and payout instructions.
ExchangeAn exchange initiated by funding a previously created order.

Download our Postman Collection to find examples on how to work with these resources.

Exchange pairs

PairBase currencyQuote currency
btc/eurBTCEUR
btc/chfBTCCHF

Please note that cost, rate and fee are always denominated in the quote currency (eur, chf), while the amount is denominated in the base currency (btc).

Create an order

POST /api/rest/v1/orders
{
"fee_rate": 0.03,
"payment_method": {
"currency": "chf",
"debitor_iban": "DE75512108001245126199"
},
"payout_method": {
"bitcoin_address": "1LHhyNHEYeHH7f8WDMUUzzSCcog1Vj1YDb",
"message": "test",
"signature": "H+rxZHwPrclVMeDwGc6GjuO2h6cTXAao18DD07iDofRYaGce08zS+f/JCb6vXjrz0Eb03fTIsmkrxU0U0Bl1p9M=",
// optional group
"extended_public_key": "xpub6BpuaaM2MT81WLY9eHaHpsZQv7Um1msaao55YBZgYqvqwBbnMGZQEr4ciiQXGQrg5b9nKmxYYtLY9Af4qcovJPm3jPndafyTAi9T8cfUaKY",
"derivation_path": "0/3",
"gap_limit": null // default 10
}
}
200 created order
{
"id": "64decab6-4129-4fe7-9f6e-1db68283f5ce",
"created_on": "2021-09-10T04:55:36.887Z",
"fee_rate": 0.03,
"payment_method": {
"currency": "chf",
"debitor_iban": "DE75512108001245126199",
"creditor_reference": "RF18GW8K79",
"creditor_iban": "CH9400778214768302002",
"creditor_bank_name": "Luzerner Kantonalbank",
"creditor_bank_street": "Pilatusstrasse 12",
"creditor_bank_postal_code": "6002",
"creditor_bank_town": "Luzern",
"creditor_bank_country": "CH",
"creditor_bank_bic": "LUKBCH2260A",
"creditor_name": "Pocket App",
"creditor_street": "Industriestrasse 33",
"creditor_postal_code": "5242",
"creditor_town": "Lupfig",
"creditor_country": "CH",
"swiss_qr_bill_payload": null
},
"payout_method": {
"bitcoin_address": "1iADkcNX6bU85RDiFHv5hZWw7xxD1eoAT",
"message": "test",
"signature": "H/6ZRG2byxi+lRlxjfj/IQwAfIf3+4ab1Q8oWHdbf/iQJ8Kg0AEjnSFAf/i4m0lVH1avGhHuWXBTXOJyM+WamQY=",
// optional group
"extended_public_key": "xpub6BpuaaM2MT81WLY9eHaHpsZQv7Um1msaao55YBZgYqvqwBbnMGZQEr4ciiQXGQrg5b9nKmxYYtLY9Af4qcovJPm3jPndafyTAi9T8cfUaKY",
"derivation_path": "0/3",
"gap_limit": null // default 10
}
}

Retrieve an order

GET /api/rest/v1/orders/{id}
200 existing order
{
"id": "64decab6-4129-4fe7-9f6e-1db68283f5ce",
"created_on": "2021-09-10T04:55:36.887Z",
"fee_rate": 0.03,
"payment_method": {
"currency": "chf",
"debitor_iban": "DE75512108001245126199",
"creditor_reference": "RF18GW8K79",
"creditor_iban": "CH9400778214768302002",
"creditor_bank_name": "Luzerner Kantonalbank",
"creditor_bank_street": "Pilatusstrasse 12",
"creditor_bank_postal_code": "6002",
"creditor_bank_town": "Luzern",
"creditor_bank_country": "CH",
"creditor_bank_bic": "LUKBCH2260A",
"creditor_name": "Pocket App",
"creditor_street": "Industriestrasse 33",
"creditor_postal_code": "5242",
"creditor_town": "Lupfig",
"creditor_country": "CH",
"swiss_qr_bill_payload": null
},
"payout_method": {
"bitcoin_address": "1LHhyNHEYeHH7f8WDMUUzzSCcog1Vj1YDb",
"message": "test",
"signature": "H+rxZHwPrclVMeDwGc6GjuO2h6cTXAao18DD07iDofRYaGce08zS+f/JCb6vXjrz0Eb03fTIsmkrxU0U0Bl1p9M=",
// optional group
"extended_public_key": "xpub6BpuaaM2MT81WLY9eHaHpsZQv7Um1msaao55YBZgYqvqwBbnMGZQEr4ciiQXGQrg5b9nKmxYYtLY9Af4qcovJPm3jPndafyTAi9T8cfUaKY",
"derivation_path": "0/3",
"gap_limit": null // default 10
}
}

Retrieve an exchange

GET /api/rest/v1/exchanges/{id}
200 executed exchange
{
"id": "a2d75998-5ee5-4501-a4cf-4e3788732b7a",
"order_id": "64decab6-4129-4fe7-9f6e-1db68283f5ce",
"fee_rate": 0.015,
"pair": "btc/chf",
"type": "buy",
"cost": 100.00,
"executed_on": "2021-09-15T14:35:10.122Z",
"amount": 0.00197000,
"rate": 50000.00,
"fee": 1.50,
"action": null,
"reason": null,
"payout": null
}
200 interrupted exchange
{
"id": "a2d75998-5ee5-4501-a4cf-4e3788732b7a",
"order_id": "64decab6-4129-4fe7-9f6e-1db68283f5ce",
"fee_rate": 0.015,
"pair": "btc/chf",
"type": "buy",
"cost": 100.00,
"executed_on": null,
"amount": null,
"rate": null,
"fee": null,
"action": {
"code": "identification_required",
"identification_id": "7bf967b5-3d34-4cd6-936c-6631811401d2"
},
"reason": null,
"payout": null
}
200 refunded exchange
{
"id": "a2d75998-5ee5-4501-a4cf-4e3788732b7a",
"order_id": "64decab6-4129-4fe7-9f6e-1db68283f5ce",
"fee_rate": 0.015,
"pair": "btc/chf",
"type": "buy",
"cost": 100.00,
"executed_on": null,
"amount": null,
"rate": null,
"fee": null,
"action": {
"code": "threshold_exceeded"
},
"reason": null,
"payout": null
}
200 settled exchange
{
"id": "a2d75998-5ee5-4501-a4cf-4e3788732b7a",
"order_id": "64decab6-4129-4fe7-9f6e-1db68283f5ce",
"fee_rate": 0.015,
"pair": "btc/chf",
"type": "buy",
"cost": 100.00,
"executed_on": "2021-09-15T14:35:10.122Z",
"amount": 0.00197000,
"rate": 50000.00,
"fee": 1.50,
"action": null,
"reason": null,
"payout": {
"txid": "c01c7a0fd270aa3876119098c0e2d51687a795efab99787e214d8a93ab9f8342",
"outpoint": 1,
"bitcoin_address": "bc1q5vvayqt3n4alhjaxy6ql4w2fs6r0y83rmvh3tg",
"derivation_path": null,
"block_height": null,
"confirmations": 0,
"fee": 0.00000190,
"amount": 0.0019681
}
}