Estimate private send
Method returns a fee estimation. You need to provide the request with currency and the amount user is going to send.
HTTP request
post
/v2/#estimatePrivateSendRequest
Header parameters
Requires authentication.
Body parameters
Requires JSON-RPC 2.0 protocol request body.
The params parameter schema:
| Name | Type | Required | Description |
|---|---|---|---|
| currency | string | true | Currency ticker (in lowercase). |
| amount | string | true | Amount of currency that user is going to send. |
| userMetadata | string | false | Escaped JSON. You can use userMetadata to include any additional parameters for customization purposes. To use this feature, please contact us at [email protected]. |
Sample request payload
application/json
{
"jsonrpc": "2.0",
"id": "test",
"method": "estimatePrivateSend",
"params": {
"currency": "eth",
"amount": "0.2934325"
}
}
Sample cURL
curl --location --request POST 'https://api.changelly.com/v2' \
--header 'X-Api-Key: {{apiKey}}' \
--header 'X-Api-Signature: {{sign}}' \
--data-raw '{
"jsonrpc": "2.0",
"id": "test",
"method": "estimatePrivateSend",
"params": {
"currency": "eth",
"amount": "0.2934325"
}
}'
Response
Response parameters
Requires JSON-RPC 2.0 protocol response body.
The result parameter schema:
| Name | Type | Description |
|---|---|---|
| currency | string | Payin currency ticker. |
| amount | string | This is the estimated payout amount of currency before withholding fee. |
| serviceFee | string | Commission taken by Changelly and the network from the amount sent to the user. Displayed in payout currency. |
| min | string | Minimum payout amount for which we would be able to perform the sending operation. |
| max | string | Maximum payout amount for which we would be able to perform the sending operation. |
Sample response
application/json
{
"jsonrpc": "2.0",
"id": "test",
"result": {
"currency": "eth",
"amount": "0.2934325",
"serviceFee": "0.00009",
"min": "0.0001",
"max": "0.5"
}
}
Error response
Error response parameters
Check the error response schema.
Error codes
| Code | Message | Description |
|---|---|---|
-32601 | Method not found | The method you're calling doesn't exist. |
-32602 | Invalid amount. {limit_type} amount is {limit} {currency} | The attempt to send currency out of limits. {limit_type} is a “Minimal“ or “Maximum“ value. |
-32602 | Invalid currency: {currency} temporary disabled | This currency is currently disabled. |
-32602 | Invalid currency: {currency} not found | This currency is not listed on Changelly or the ticker is invalid. |
-32602 | Invalid {param} | You've specified an invalid parameter. |
-32602 | Invalid params | You haven't specified a few required parameters. |
-32602 | Not enough liquidity. Max amount is {max} {currency}. | The amount you've specified exceeds maximal volume. |
-32603 | Error: You reached requests limit {limit} rps | You have sent requests more than the RPS limit. The default RPS limit is 10. |
-32603 | Internal Error or Error | Most likely, the problem is on our side. Further investigation is required. |
-32603 | An error encountered during address generation. Please try again later | An error occurred during address generation. |