Using the public API

You can integrate the Api key into your system and then use the public api.

Getting a list of available exchanges

GET https://api.rates.cpay.world/ex/api/exchanges/list

This endpoint allows you to get a list of all available exchanges, the Ids of which should be used in other requests.

Query Parameters

NameTypeDescription

search

String

Search by exchange name

order

String

Available values : ASC, DESC. Default value : ASC

{
  "data": {
    "page": 0,
    "pages": 0,
    "countItems": 0,
    "entities": [
      {
        "id": 0,
        "name": "string",
        "slug": "string",
        "isActive": true,
        "firstHistoricalData": "string",
        "lastHistoricalData": "string"
      }
    ]
  }
}

Getting cryptocurrency pairs on the selected exchange

GET https://api.rates.cpay.world/ex/api/exchanges/pairs

Query Parameters

NameTypeDescription

exchangeId*

String

This parameter is the exchange Id that we get in the response to the GET /api​/exchanges​/list endpoint

search

String

Search by crypto pair

order

String

Available values : ASC, DESC. Default value : ASC

Headers

NameTypeDescription

x-exchange-api-key*

String

We get the value of this parameter in the API Key block after log in to https://rates.cpay.world/

{
  "data": {
    "page": 0,
    "pages": 0,
    "countItems": 0,
    "entities": [
      {
        "id": 0,
        "symbol": "string",
        "baseAsset": "string",
        "quoteAsset": "string",
        "price": 0,
        "volumeBaseAsset": 0,
        "volumeQuoteAsset": 0,
        "firstHistoricalData": "string",
        "lastHistoricalData": "string"
      }
    ]
  }
}

Cryptocurrency conversion

GET https://api.rates.cpay.world/ex/api/exchanges/convert

This endpoint allows you to convert cryptocurrency to cryptocurrency, fiat currency to cryptocurrency, cryptocurrency to fiat currency, and fiat currency to fiat currency.

Query Parameters

NameTypeDescription

from*

String

Parameter containing which currency the conversion is being performed from

to*

String

Parameter containing which currency the conversion is being performed to

exchangeId*

String

This parameter is the exchange Id that we get in the response to the GET /api​/exchanges​/list endpoint

Headers

NameTypeDescription

x-exchange-api-key

String

We get the value of this parameter in the API Key block after log in to https://rates.cpay.world/

{
  "data": {
    "price": 0
  }
}

History of cryptocurrency pairs rates

GET https://api.rates.cpay.world/ex/api/exchanges/history

This endpoint returns the exchange rate history for the selected pair

Query Parameters

NameTypeDescription

symbol*

String

This parameter contains a crypto pair, the list of which can be obtained in the server response via the GET /api​/exchanges​/pairs endpoint

from*

String

This parameter contains the date and time from which the course history should be returned. Example : 2021-03-01 14:12:10

to*

String

This parameter contains the date and time to which the course history should be returned. Example : 2021-03-01 14:12:10

interval*

String

This parameter contains the interval with which you want to return the exchange rate history for the selected pair. Available values : hourly, daily, weekly, monthly. Default value: hourly.

exchangeId*

String

This parameter is the exchange Id that we get in the response to the GET /api​/exchanges​/list endpoint

Headers

NameTypeDescription

x-exchange-api-key*

String

We get the value of this parameter in the API Key block after log in to https://rates.cpay.world/

{
  "data": [
    {
      "symbol": "string",
      "baseAsset": "string",
      "quoteAsset": "string",
      "timestamp": "string",
      "price": 0,
      "volumeBaseAsset": 0,
      "volumeQuoteAsset": 0
    }
  ]
}

List of cryptocurrencies with price, marketCap and etc..

GET https://api.rates.cpay.world/ex/api/public/assets/list

Query Parameters

NameTypeDescription

search

String

Search by cryptocurrency symbol

order

String

Available values : ASC, DESC. Default value : ASC

{
  "data": {
    "page": 0,
    "pages": 0,
    "countItems": 0,
    "entities": [
      {
        "id": 0,
        "symbol": "string",
        "baseAsset": "string",
        "quoteAsset": "string",
        "price": 0,
        "volumeBaseAsset": 0,
        "volumeQuoteAsset": 0,
        "marketCap": 0,
        "circulatingSupply": 0,
        "change24H": 0,
        "change24HPercent": 0,
        "history7D": [
          {
            "symbol": "string",
            "baseAsset": "string",
            "quoteAsset": "string",
            "timestamp": "string",
            "price": 0,
            "volumeBaseAsset": 0,
            "volumeQuoteAsset": 0
          }
        ]
      }
    ]
  }
}

Last updated