Fetch Blockchains

Update a specific contact's details

Get Blockchain Details

In order to call mutations such as money transfers and swaps, you will need to fetch the specific blockchain ID you wish to operate in. In order to get a specific blockchain/multiple blockchain IDs, use the following query:

In the query variables (body), you insert the blockchain name (or code depending on your preference) of the blockchain you wish to fetch. See the example body below for reference.

query Blockchains($where: BlockchainWhereInput) {
  blockchains(where: $where) {
    id
    name
    code
  }
}

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Body (BlockchainWhereInput) object

One of/both:

Name
Type
Description

name

String

Blockchain Name

code

String

Blockchain Code

Example body:

{
  "where": {
    "name": {
      "equals": "Bitcoin"
    }
  }
}

Response

Return values:

Name
Type
Description

id*

String

Blockchain ID

name

String

Blockchain Name

code

String

Blockchain Code

{
  "data": {
    "blockchains": [
      {
        "id": "clefn78cb00h9lc6rdemx563g",
        "name": "Bitcoin",
        "code": "bitcoin"
      }
    ]
  }
}

Try it out!