Exchange

Calculate the exchange rate

post

Get info about exchange rates. This endpoint has limitation up to 30 requests per minute from one IP address. In case this amount is exceeded a new successful response can only be obtained after one minute break.

Header parameters
X-Processing-KeystringRequired

Private key

X-Processing-SignaturestringRequired

Private secret key

Body
sender_currencystringRequired
Currency to exchange from. For a list of all available currencies, see Supported currencies.
receiver_currencystringRequired
Currency to exchange to. For a list of all available currencies, see Supported currencies.
sender_amountnumber · floatOptional

Amount you want to calculate. The parameter is required when the receiver_amount parameter is absent

receiver_amountnumber · floatOptional

Amount you want to calculate for getting. The parameter is required when the sender_amount parameter is absent.

price_precisionintegerOptional
Responses
200
OK
application/json
post
POST /api/v2/exchange/calculate HTTP/1.1
Host: app.cryptoprocessing.com
X-Processing-Key: text
X-Processing-Signature: text
Content-Type: application/json
Accept: */*
Content-Length: 109

{
  "sender_currency": "BTC",
  "receiver_currency": "BTC",
  "sender_amount": 0,
  "receiver_amount": 0,
  "price_precision": 8
}
{
  "data": {
    "sender_currency": "EUR",
    "sender_amount": "25.00000000",
    "receiver_currency": "BTC",
    "receiver_amount": "0.00123001",
    "fee_currency": "CPD",
    "fee_amount": "0.17266485",
    "price": "0.00004920",
    "ts_fixed": 1665008630,
    "ts_release": 1665008690,
    "fix_period": 60
  }
}

Exchange on fixed exchange rate

post

Make the exchange at a given fixed exchange rate.

Header parameters
X-Processing-KeystringRequired

Private key

X-Processing-SignaturestringRequired

Private secret key

Body
sender_currencystringOptional
Currency to exchange from. For a list of all available currencies, see Supported currencies.
receiver_currencystringOptional
Currency to exchange to. For a list of all available currencies, see Supported currencies.
sender_amountnumberOptional

Amount you want to exchange.

receiver_amountnumberOptional

Amount you want to exchange.

foreign_idstring · max: 255Required

Unique foreign ID in your system.

pricenumberRequired

Exchange rate price on which exchange will be placed.

Responses
200
OK
application/json
post
POST /api/v2/exchange/fixed HTTP/1.1
Host: app.cryptoprocessing.com
X-Processing-Key: text
X-Processing-Signature: text
Content-Type: application/json
Accept: */*
Content-Length: 121

{
  "sender_currency": "BTC",
  "receiver_currency": "BTC",
  "sender_amount": 0,
  "receiver_amount": 0,
  "foreign_id": "string",
  "price": 0
}
{
  "data": {
    "id": 2687667,
    "foreign_id": "knwi24op9",
    "type": "exchange",
    "sender_amount": "0.01",
    "sender_currency": "BTC",
    "receiver_amount": "63.52069015",
    "receiver_currency": "EUR",
    "fee_amount": "6.98727592",
    "fee_currency": "EUR",
    "price": "6352.06901520",
    "status": "processing"
  }
}

Exchange regardless of the exchange rate

post

Make the exchange regardless of the price.

Header parameters
X-Processing-KeystringRequired

Private key

X-Processing-SignaturestringRequired

Private secret key

Body
sender_currencystringRequired
Currency to exchange from. For a list of all available currencies, see Supported currencies.
receiver_currencystringRequired
Currency to exchange to. For a list of all available currencies, see Supported currencies.
sender_amountnumberOptional

Amount you want to exchange. This parameter is required when the receiver_amount parameter is absent.

receiver_amountnumberOptional

Amount you want to exchange. This parameter is required when the sender_amount parameter is absent.

foreign_idstring · max: 255Required

Unique foreign ID in your system.

Responses
200
OK
application/json
post
POST /api/v2/exchange/now HTTP/1.1
Host: app.cryptoprocessing.com
X-Processing-Key: text
X-Processing-Signature: text
Content-Type: application/json
Accept: */*
Content-Length: 111

{
  "sender_currency": "BTC",
  "receiver_currency": "BTC",
  "sender_amount": 0,
  "receiver_amount": 0,
  "foreign_id": "string"
}
{
  "data": {
    "sender_currency": "EUR",
    "sender_amount": "1966.61957532",
    "receiver_currency": "BTC",
    "receiver_amount": "0.10000000",
    "fee_currency": "EUR",
    "fee_amount": "19.66619575",
    "price": "0.00005084",
    "id": 678287,
    "foreign_id": "postman_auto_test_1665475611907",
    "type": "exchange",
    "status": "processing"
  }
}

Was this helpful?