Get minimum amount
Get the minimum amount for floating rate transactions
info
Most users do not read the information about the minimum amount. Be sure to highlight this information in your UI. If users send less than the minimum amount, their coins will likely be lost.
warning
The method is deprecated. To get the minimum amount, you need to use getFixRateForAmount/getExchangeAmount, but the transaction amount must be within limits.
A full-fledged replacement of this method is also coming soon. getMinAmount
still will be available for some time.
HTTP request
post
/v2/#getMinAmount
Request
Header parameters
Requires authentification.
Body parameters
Requires JSON-RPC 2.0 protocol request body.
The params
parameter schema:
Name | Type | Required | Description |
---|---|---|---|
from | string | true | Payin currency code (in lowercase). |
to | string | true | Payout currency code (in lowercase). |
Sample request payload
application/json
{
"jsonrpc": "2.0",
"id": "test",
"method": "getMinAmount",
"params": {
"from": "ltc",
"to": "eth"
}
}
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": "getMinAmount",
"params": {
"from": "btc",
"to": "eth"
}
}'
Response
Response parameters
Requires JSON-RPC 2.0 protocol response body.
The result
parameter schema:
Name | Type | Description |
---|---|---|
result | string | Minimum exchangeable amount for currency pair. |
Sample response
application/json
{
"jsonrpc": "2.0",
"id": "test",
"result": "0.0008563"
}
Error response
Error response parameters
Check the error response schema.
Error codes
Code | Message | Description |
---|---|---|
-32600 | Error: You reached requests limit {limit} rps | You have been sending more than 10 requests per second. |
-32602 | Invalid currency: {currency} temporary disabled | This currency is currently disabled. |
-32602 | Invalid currency: {currency} is temporary disabled on API as output currency | This currency is currently disabled on API as an output currency. |
-32602 | Invalid currency: {currency} is temporary disabled on API as input currency | This currency is currently disabled on API as an input currency. |
-32602 | Invalid currency: {currency} not found | This currency is not listed on Changelly or the ticker is invalid. |
-32602 | Parameter {param} is invalid | You've specified an invalid parameter. |
-32603 | Internal Error or Error | Most likely, the problem is on our side. Further investigation is required. |