CPAY Coin Price API Documentation 3.0
  • What is CPAY Coin Price?
  • Introduction
  • Quick Start Guide
  • Authentication
  • Public API
    • Public API architecture
    • Integration in your system
    • Using the public API
  • Standards and Conventions
  • Errors and Rate Limits
  • Changes
    • Release 3.0
  • GUIDES
    • Not a developer?
    • Registration/Login
    • Overview
      • API Key Usage
      • API Request Log
    • Plan & Billing
      • Your Plan
      • Billing History
      • Subscription plans
    • Notification
    • API Key
    • Profile
Powered by GitBook
On this page
  • Getting a list of available exchanges
  • Getting cryptocurrency pairs on the selected exchange
  • Cryptocurrency conversion
  • History of cryptocurrency pairs rates
  • List of cryptocurrencies with price, marketCap and etc..
  1. Public API

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

Name
Type
Description

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"
      }
    ]
  }
}
{
    "status": "fail",
    "data": {
        "message": "Unauthorized"
    }
}

Getting cryptocurrency pairs on the selected exchange

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

Query Parameters

Name
Type
Description

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

Name
Type
Description

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"
      }
    ]
  }
}
{
    "status": "fail",
    "data": {
        "message": "Unauthorized"
    }
}
{
    "status": "fail",
    "data": {
        "message": "Exchange not found."
    }
}

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

Name
Type
Description

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

Name
Type
Description

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
  }
}
{
    "status": "fail",
    "data": {
        "message": "Pair not support."
    }
}
{
    "status": "fail",
    "data": {
        "message": "Unauthorized"
    }
}

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

Name
Type
Description

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

Name
Type
Description

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
    }
  ]
}
{
    "status": "fail",
    "data": {
        "message": "Unauthorized"
    }
}
{
    "status": "fail",
    "data": {
        "message": "Exchange not found."
    }
}

List of cryptocurrencies with price, marketCap and etc..

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

Query Parameters

Name
Type
Description

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
          }
        ]
      }
    ]
  }
}
PreviousIntegration in your systemNextStandards and Conventions

Last updated 3 years ago