Get enabled currency pairs
posthttps://api.criptointercambio.com/v2/#getPairsRetrieves all enabled currency pairs. To filter them, use the request body params.
Request
Header parameters
Requires authentication headers.
Body parameters
Consists of a JSON-RPC 2.0 protocol request object.
The params schema:
| Name | Type | Required | Description |
|---|---|---|---|
from | string | false | The payin currency ticker. Enter in lowercase. |
to | string | false | The payout currency ticker. Enter in lowercase. |
txType | string | false | The transaction type. Enums: float/fixed InfoIf not specified, the method retrieves all available pairs. |
Sample request
{
"jsonrpc": "2.0",
"id": "exampleCustomIdValue",
"method": "getPairs",
"params": {
"from": "btc",
"txType": "float"
}
}
Response
Successful response
Consists of a JSON-RPC 2.0 protocol response object.
The result schema:
| Name | Type | Description |
|---|---|---|
from | string | The payin currency ticker. |
to | string | Payout currency ticker. |
Sample successful response
{
"jsonrpc": "2.0",
"id": "exampleCustomIdValue",
"result": [
{
"from": "btc",
"to": "btg"
},
{
"from": "btc",
"to": "dgb"
},
{
"from": "btc",
"to": "vib"
},
{
"from": "btc",
"to": "tusd"
}
]
}
Error response
Consists of a JSON-RPC 2.0 protocol error response object.
Sample error response
{
"jsonrpc": "2.0",
"id": "exampleCustomIdValue",
"error": {
"code": -32603,
"message": "Internal Error"
}
}
Error codes
| Code | Message | Description |
|---|---|---|
-32600 | Error: You reached requests limit {limit} rps | RPS is out of the limit. |
-32602 | Invalid currency: {currency} not found |
|
Parameter {param} is invalid | The specified request address is invalid. | |
-32603 |
| Mostly, this is a technical issue on our side. Requires further investigation. |