Retry with new address [Private]
External fiat deposit with exchange by fixed rate and send crypto to external address.
Method name: | /v2/exchange/external/buy-to-send-crypto/retry |
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.
This endpoint only works with the "Buy crypto to send to address" endpoint.
It is advisable to request this endpoint if, during the execution of the request to /v2/exchange/external/buy-to-send-crypto
, the operation acquired the OnHold status due to the failure of the AML check (dirty crypto address) and the client wants to provide a new crypto address in order to complete the cryptocurrency withdrawal.
After the request to the given AML endpoint, the check will be started again already with the new provided crypto-address, as a result of which either the withdrawal of cryptocurrency will start, or the operation will again go to the OnHold status (in case when new crypto-address is also dirty).
Also there is an option to execute a transfer of the cryptocurrency received after exchanging the fiat asset to the Kuna-Pro account by specifying the Kuna ID.
Data dictionary
Name | Type | Parameter type | Required | Range | Description |
---|---|---|---|---|---|
id | string | BODY | YES | - | ID of the "Buy crypto to send to address" operation. |
address | string | BODY | YES | - | New wallet address. |
Exemplary request
const url = BASE_URL;
const path = "/v2/exchange/external/buy-to-send-crypto/retry";
const body = {
id: "41c039a2-0efd-4f8a-9015-b60a1c668d27",
address: "T2iVdWdAQWDdwqiebc4miqreaUZ68HrhiF"
};
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/exchange/external/buy-to-send-crypto/retry"
headers = {
"accept": "application/json",
"Content-Type": "application/json",
"Authorization": "Bearer " + data.accessToken # data.accessToken - generated a JWT token via /v2/auth/login.
}
body = {
"id": "41c039a2-0efd-4f8a-9015-b60a1c668d27",
"address": "T2iVdWdAQWDdwqiebc4miqreaUZ68HrhiF"
}
request = requests.post(url + path, headers=headers, json=body)
print(request.json())
How to call private endpoints here
Response
{
"data": {
"success": true
}
}
Callback
You get a callback for each transaction status.
{
"data": {
"id": "41c039a2-0efd-4f8a-9015-b60a1c668d27",
"memo": null,
"rate": "1.015332",
"type": "BuyToSendCrypto",
"reason": null,
"status": "Processing | OnHold | Declined | Completed",
"address": "T9zGcAgLTSQdwqiebc4miqreaUZ68HrhiF",
"network": null,
"feeTrade": "0",
"metadata": {},
"walletId": "1f44b1c7-9fd4-4d20-b9a4-7aca3646d0d5",
"createdAt": "2024-03-13T17:22:32.664Z",
"externalId": "but-send-001",
"feeDeposit": "0.15",
"callbackUrl": "https://webhook.site/12495b92-cbe4-4e88-a645-19b1ae5f4c97",
"completedAt": "2024-03-13T17:39:58.949Z",
"feeWithdraw": "0",
"sourceAsset": "EUR",
"targetAsset": "USDT",
"sourceAmount": "15",
"targetAmount": "15.07768",
"feeTradeAsset": "USDT",
"initialAmount": null,
"blockchainTxId": null,
"feeDepositAsset": "EUR",
"feeWithdrawAsset": "USDT",
"totalFeeSourceAsset": "0.15",
"totalFeeTargetAsset": "0.1523"
}
}
Updated 3 months ago