Get limits
POST getPairsParams
Get limits for floating and fixed rate transactions
warning
The method is deprecated. To get the limits, 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. getPairsParams
still will be available for some time.
HTTP request
https://api.changelly.com/v2/#getPairsParams
Request
- Request
- Payload
- cURL
Header parameters
Name | Type | Required | Description |
---|---|---|---|
X-Api-Key | string | true | Your API key (SHA256 from Public Key) |
X-Api-Signature | string | true | The query's serialized body signed by your private key according to the RSA-SHA256 method. |
Body parameters
Name | Type | Required | Description |
---|---|---|---|
jsonrpc | string | true | JSON-RPC version. |
id | string | true | Client's custom ID. |
method | string | true | API method name. |
params | array of objects | true | Request parameters. |
params
schema:
Name | Type | Required | Description |
---|---|---|---|
from | string | true | Payin currency code (in lowercase). |
to | string | true | Payout currency code (in lowercase). |
application/json
{
"jsonrpc": "2.0",
"id": "test",
"method": "getPairsParams",
"params": [
{
"from": "eth",
"to": "btc"
},
{
"from": "btc",
"to": "eth"
}
]
}
curl --location --request POST 'https://api.changelly.com/v2' \
--header 'X-Api-Key: {{apiKey}}' \
--header 'X-Api-Signature: {{sign}}' \
--data-raw '{
"id": "test",
"jsonrpc": "2.0",
"method": "getPairsParams",
"params": [
{
"from": "eth",
"to": "btc"
},
{
"from": "btc",
"to": "eth"
}
]
}'
Response
- Example
- Success
- Errors
Sample response
application/json
{
"jsonrpc": "2.0",
"id": "test",
"result": [
{
"from": "eth",
"to": "btc",
"minAmountFloat": "0.0465",
"maxAmountFloat": "449172.45240999997",
"minAmountFixed": "0.0775",
"maxAmountFixed": "100"
},
{
"from": "btc",
"to": "eth",
"minAmountFloat": "0.0015",
"maxAmountFloat": "25629.527850432485",
"minAmountFixed": "0.0025",
"maxAmountFixed": "3.2138"
}
]
}
Response params
Name | Type | Description |
---|---|---|
jsonrpc | string | JSON-RPC version. |
id | string | Client's custom ID. |
result | array of objects | Limits for pairs. |
result
schema:
Name | Type | Description |
---|---|---|
from | string | Payin currency code. |
to | string | Payout currency code. |
minAmountFloat | string | Minimum exchangeable amount for float rate transactions. |
maxAmountFloat | string | Maximum exchangeable amount for float rate transactions. |
minAmountFixed | string | Minimum exchangeable amount for fixed rate transactions. |
maxAmountFixed | string | Maximum exchangeable amount for fixed rate transactions. |
Error schema
Name | Type | Description |
---|---|---|
jsonrpc | string | JSON-RPC version. |
id | string | Client's custom ID. |
error | object | Possible errors. |
»code | integer | Error code. |
»message | string | Error message. |
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. |