Migration from APIv3 to APIv4

The new version of API has the same authorization as in APIv3, so you do not have to change the code too much. But there are other changes that you should know in order to easily migrate to the new version of API.

It is strongly recommended that you read General API information before you begin your migration.

API keys

If you have the old API keys, then you do not need to change them in order to use authorization with a signature. To use authorization with a single API key, you will need to create new keys.

New headers

We changed the name of the headers that need to pass for a successful request:

APIv3APIv4
acceptaccept
content-typecontent-type
kun-noncenonce
kun-apikeypublic-key
kun-signaturesignature
-account (only for PRO accounts)

Body style

The body of the request and the body of the response use lowerCamelCase style.

New URLs

We kept the features of APIv3 and tried to improve them in APIv4.

Below we provide a table showing the old and new URLs. If you click on the URL, you will be redirected to the documentation for that endpoint:

APIv3APIv4
/v3/timestamp/v4/public/timestamp
/v3/markets/v4/markets/public/getAll
/v3/tickers/v4/markets/public/tickers
/v3/currencies/v4/public/currencies
/v3/book/v4/order/public/book
-/v4/trade/public/book
/v3/auth/me/v4/private/me
/v3/auth/r/wallets/v4/private/getBalance
/v3/auth/w/order/submit/v4/order/private/create
/v3/auth/r/orders/v4/order/private/active
/v3/auth/r/orders/{?markets}/hist/v4/order/private/history
-/v4/trade/private/history
-/v4/order/private/details
/v3/auth/r/order/{market}:{order_id}/trades/v4/order/private/{id}/trades
/v3/order/cancel/v4/order/private/cancel
/v3/order/cancel/multi/v4/order/private/cancel/multi
/v3/auth/deposit/info/v4/deposit/private/crypto/address
/v3/auth/deposit/info/v4/deposit/private/crypto/generateAddress
-/v4/deposit/private/crypto/getMerchantAddress
/v3/auth/payment_requests/address/v4/deposit/private/crypto/generateMerchantAddress
/v3/auth/merchant/payment_services/v4/deposit/private/preRequest
/v3/auth/assets-history/deposits/v4/deposit/private/history
/v3/auth/deposit/details/v4/deposit/private/details/{depositId}
/v3/auth/withdraw/prerequest/v4/withdraw/private/preRequest
/v3/auth/withdraw/v4/withdraw/private/create
/v3/auth/assets-history/withdraws/v4/withdraw/private/history
/v3/auth/withdraw/details/v4/withdraw/private/details/{withdrawId}
/v3/kuna_codes/{code}/check/v4/kuna-code/{code}/check
/v3/auth/kuna_codes/v4/kuna-code
/v3/auth/kuna_codes/redeem/v4/kuna-code/redeem
/v3/auth/kuna_codes/details/v4/kuna-code/{id}
/v3/auth/kuna_codes/issued-by-me/v4/kuna-code/issued-by-me
/v3/auth/kuna_codes/redeemed-by-me/v4/kuna-code/redeemed-by-me

WebSocket API

WebSocket API has been added with APiv4. Now you can get real-time data about changes in the markets or changes in your account. Therefore, you can significantly reduce the number of requests using APIv4 endpoints and increase your productivity on our service.

Read more about WebSocket API.

We will assist you!

If you have any additional questions, please contact our support team: @KunaSupport_bot, we will assist you!