Skip to content

Chain API

Chain API offers the information about the available blockchain network.

Get Chain information

Gets the information of the currently available blockchain network.

Request URL

Live URL https://bc-api.qpyou.cn/core/v0/chain/info
Sandbox URL https://sandbox-bc-api.qpyou.cn/core/v0/chain/info
HTTP Method GET
Content-Type application/json

Header parameters

Field Name Description Type Required
Authorization Authentication token required to call the API string Y

Responses

Field Name Description Type
code api request result code, 0: success number
message the result message String
data API response data array
data.network the blockchain networks string
data.chainID the blockchain ID string

Request sample

curl -X 'GET' 
  'https://sandbox-bc-api.qpyou.cn/core/v0/chain/info' 
  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXlObyI6MSwiaWQiOiJwbGF0Zm9ybSIsImNvbXBhbnkiO' 
  -H 'accept: application/json'

Response sample

{
  "code": 0,
  "message": "success",
  "data": [
    {
      "network": "xpla",
      "chainID": "cube_47-5"
    },
    {
      "network": "polygon",
      "chainID": "80001"
    }
  ]
}