Deposit address generation [Private]
Get or generate a deposit address.
Method name: | /v2/deposit/address |
Request type: | POST |
To call private endpoints, you need to get a JWT token or an API key for authentication.
Here you can learn in detail how to successfully authenticate.
Crypto-deposit is a specific operation, as there is actually no direct interaction between the client and the endpoint at the time of direct deposit execution.
The /v2/deposit/address
endpoint does not perform the deposit itself, but instead allows the user to generate a deposit address for further transfer of funds from a third-party wallet.
Once the deposit address is successfully generated, it can be used to top up from third-party wallets.
At the next request to /v2/deposit/address
with the same arguments, a new address is NOT generated, instead the parameters of the previously created address are returned.
The deposit address is generated on a permanent basis and does not need to be updated.
To correctly generate a crypto address, you need to specify the correct source value for the asset. Available sources for the user are determined by the available payment methods for the deposit, which are sent as a response to the /v2/deposit/pre-request
.
Crypto deposits can acquire the following statuses:
Created | Operation created. |
Processing | Operation in processing. |
OnHold | The operation is blocked (for example, for checking AML). |
Declined | The operation is rejected. |
Completed | The operation is successful. |
To provide information about the status of the operation, a callback service is implemented. The link for receiving callbacks should be provided before the address is held, the setting is permanent.
The duration of execution of a crypto deposit depends on many factors, but the main one is the speed of processing such withdrawal by the blockchain network. In most cases, this is a few minutes, but sometimes the processing time can take much longer. In this case, the operation will be in Processing status.
Before crypto deposit will received, the crypto address is validated, and its AML check is also carried out. If the crypto address is found to belong to the suspicious list, such an operation will be blocked, and the operation will be in OnHold status.
Information about the amount of operation fees will be indicated along with other operation details.
Data dictionary
Name | Type | Parameter type | Required | Range | Description |
---|---|---|---|---|---|
walletId | string | BODY | YES | - | Unique identifier of customer wallet in Kuna Core. |
source | string | BODY | YES | - | Crypto network for Asset(Currency) address. |
source
for TRC20 and ERC20 tokens:USDT TRC20 and other TRC20 tokens -
TRX
.
USDT ERC20 and other ERC20 tokens -ETH
.You can learn more about all the blockchains in our knowledge base.
Exemplary request
const url = BASE_URL;
const path = "/v2/deposit/address";
const body = {
walletId: "1f44b1c7-9fd4-4d20-b9a4-7aca3646d0d5",
source: "TRX"
};
const options = {
method: "POST",
headers: {
accept: "application/json",
"Content-Type": "application/json",
"Authorization": `Bearer ${data.accessToken}` // data.accessToken - generated a JWT token via /v2/auth/login.
},
body: JSON.stringify(body),
};
fetch(url + path, options)
.then((response) => response.json())
.then((showResponse) => console.log(showResponse.data));
import requests
url = BASE_URL
path = "/v2/deposit/address"
headers = {
"accept": "application/json",
"Content-Type": "application/json",
"Authorization": "Bearer " + data.accessToken # data.accessToken - generated a JWT token via /v2/auth/login.
}
body = {
"walletId": "1f44b1c7-9fd4-4d20-b9a4-7aca3646d0d5",
"source": "TRX"
}
request = requests.post(url + path, headers=headers, json=body)
print(request.json())
How to call private endpoints here
Response
{
"address": "TW6fBsVChypHoN3xFXpizHFJNQa7b1wRWc", // The client's wallet address.
"id": "ca7d5a67-d583-4beb-b153-8a122bb8edbe", // Wallet internal ID.
"memo": null, // Memo ID. Only for memo base coins.
"source": "TRX", // Crypto network for Asset(Currency) address.
"walletId": "1f44b1c7-9fd4-4d20-b9a4-7aca3646d0d5" // Unique identifier of customer wallet in Kuna Core.
}
Callback
You get a callback for each transaction status.
{
"data": {
"id": "9f445ab6-5ff4-52eb-947f-1a890e98764d",
"memo": "adafewzgfv",
"rate": null,
"type": "Deposit",
"reason": null,
"status": "Created | OnHold | Processing | Completed | Declined",
"address": "GCXGPTJI3WT2YS3UCAH4RI7XNDMRBQZQZOUNEPKE7CFSN4EMEXA2W5MI",
"network": null,
"feeTrade": null,
"metadata": {},
"walletId": "b538fb0f-090c-43df-8d08-a075dc06cd3f",
"createdAt": "2024-03-20T08:41:48.996Z",
"externalId": null,
"feeDeposit": "0.024",
"callbackUrl": null,
"completedAt": "2024-03-20T08:41:49.502Z",
"feeWithdraw": null,
"sourceAsset": "XLM",
"targetAsset": "XLM",
"sourceAmount": "1",
"targetAmount": "0.976",
"feeTradeAsset": null,
"initialAmount": null,
"blockchainTxId": "c10900ac0b187286a42d3cff45dc2d7036db345b0ab29101ce9ac84baeba0473",
"feeDepositAsset": "XLM",
"feeWithdrawAsset": null,
"totalFeeSourceAsset": "0.024",
"totalFeeTargetAsset": null
}
}
Updated 7 months ago