KVANTSWAPSYSTEM

Partner API · version 1

Connect
the API.

How to plug Kvant Swap exchanges into your product: the key, four endpoints, order statuses and errors.

Get an API keyLog in

01Quick start

Four calls cover an exchange: list the coins, get the amount, create the order, then poll its status until it is final.

  1. 01Get coins and networks
  2. 02Estimate the amount
  3. 03Create the order
  4. 04Track the status

02Authentication

Send your partner API key in a header with every request. The key is on your dashboard. Requests without a valid key are rejected.

HEADER
X-Api-Key: kv_live_••••••••••••3f9c

Base URL: https://api.kvant.finance

03Endpoints

GET/v1/coins

Coins available for exchange. Each coin comes with all its networks. Use the ticker together with one of its networks everywhere.

REQUEST
GET https://api.kvant.finance/v1/coins
RESPONSE
[
  { "ticker": "USDT", "networks": [
      { "network": "TRX", "default": true, "memoRequired": false },
      { "network": "ETH", "default": false, "memoRequired": false },
      { "network": "BSC", "default": false, "memoRequired": false } ] },
  { "ticker": "XRP", "networks": [
      { "network": "XRP", "default": true, "memoRequired": true } ] }
]
GET/v1/estimate

The amount the user gets for a pair, plus the minimum and maximum.

REQUEST
GET …?from=BTC&fromNetwork=BTC&to=XMR&toNetwork=XMR&amount=0.1
RESPONSE
{
  "result": "12.87",
  "min": "0.0011",
  "max": "11.98"
}
POST/v1/orders

Creates an order and returns the deposit address to show to the user.

REQUEST
{
  "from": "BTC",
  "fromNetwork": "BTC",
  "to": "XMR",
  "toNetwork": "XMR",
  "amount": "0.1",
  "address": "48Sample…L2gT8",
  "memo": "if the payout network has memoRequired",
  "refundAddress": "bc1qsample…9d4t",
  "refundMemo": "if the refund network has memoRequired"
}
RESPONSE
{
  "id": "KV-7F3A9C2D",
  "depositAddress": "bc1qsample…5t9w",
  "depositMemo": null,
  "status": "awaiting"
}
GET/v1/orders/{id}

The current status of an order with both transaction hashes when they exist.

REQUEST
GET …/KV-7F3A9C2D
RESPONSE
{
  "id": "KV-7F3A9C2D",
  "status": "sending",
  "inputHash": "sample7d2f…6c8d",
  "outputHash": "sample3b8e…d5f1"
}

04Order statuses

Poll the order until it reaches a final status. Final statuses do not change.

StatusMeaningFinal
awaitingWaiting for the depositNo
confirmingDeposit seen, collecting confirmationsNo
exchangingThe exchange is runningNo
sendingPayout is on its way to the userNo
finishedPayout sent, commission creditedYes
refundedDeposit returned to the refund addressYes
failedThe exchange could not be completedYes
stoppedOn hold until support decidesNo
supportThe user must contact supportNo

05Errors and limits

CodeWhen
401 invalid_api_keyThe API key is missing or wrong
400 network_requiredfromNetwork or toNetwork is missing
422 network_unavailableDeposits or payouts on that network are off now
422 pair_unavailableThe pair is not available
422 amount_out_of_rangeThe amount is below the minimum or above the maximum
400 memo_requiredmemo or refundMemo is missing on a network that needs it. Show the user the depositMemo too: a deposit without it is lost
422 invalid_addressThe address does not match the network
429 rate_limitedToo many requests: 120 requests and 20 new orders per minute for one key

06Commission and payouts

Commission of your partner percent is accrued once a day for the orders that finished that day. Days without exchanges have no accrual. Request a payout from the dashboard once the balance passes 50 USDT. Each payout status change is sent to your email.