Get available pairs
POST getPairs
Method returns all enabled currency pairs. You can filter them by payin currency, payout currency, or transaction type using the request params.
HTTP request
https://api.criptointercambio.com/v2/#getPairs
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 | object | true | Request parameters. |
params schema:
| Name | Type | Required | Description |
|---|---|---|---|
| from | string | false | Payin currency ticker (in lowercase). |
| to | string | false | Payout currency ticker (in lowercase). |
| txType | string | false | Type of transaction. If not specified, the method returns all available pairs regardless of type. Enum: float/fixed |
application/json
{
"jsonrpc": "2.0",
"id": "test",
"method": "getPairs",
"params":
{
"from": "eth",
"txType": "fixed"
}
}
curl --location --request POST 'https://api.criptointercambio.com/v2' \
--header 'X-Api-Key: {{apiKey}}' \
--header 'X-Api-Signature: {{sign}}' \
--data-raw '{
"id": "test",
"jsonrpc": "2.0",
"method": "getPairs",
"params":
{
"from": "eth",
"txType": "fixed"
}
}'
Response
- Example
- Success
- Errors
Sample response
application/json
{
"jsonrpc": "2.0",
"id": "test",
"result": [
{
"from": "eth",
"to": "btc"
},
{
"from": "eth",
"to": "usdt"
},
{
"from": "eth",
"to": "xmr"
}
]
}
Response params
| Name | Type | Description |
|---|---|---|
| jsonrpc | string | JSON-RPC version. |
| id | string | Client's custom ID. |
| result | array of objects | Available pairs. |
result schema:
| Name | Type | Description |
|---|---|---|
| from | string | Payin currency ticker. |
| to | string | Payout currency ticker. |
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} not found | This currency is not listed on Cripto InterCambio 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. |