CSPR.cloud API

Overview

The API is REST-based. It has predictable resource-oriented endpoints, uses standard HTTP response codes, authentication, and verbs.

Base URL

The API works over HTTPS and is accessed from https://api.CSPR.live.

Version 1.0 notes

This document describes API version 1.0. Version 2.0 is already in development and will replace version 1.0 at some point. Please keep this in mind when designing an API integration layer.

Until version 2.0 is ready, version 1.0 will receive all the highly requested features.

Version 1.0 users will be given enough time to comfortably migrate to 2.0 once it's ready.

Responses

All data from the server is sent as JSON. Successful API responses contain a data property, which contains the response data:

{
  "data": <ResponseData>
}

Pagination

Requests that potentially may return an unlimited number of items are paginated. In addition to the endpoint-specific parameters, they accept the following pagination parameters:

ParameterTypeDefaultDescription

page

int

1

Requested page number

limit

int

10

Number of items per page

The response contains pagination information and has the following structure:

{
  "data": { ... },
  "itemCount": <int>,
  "pageCount": <int>,
  "pages": [ // a list of links to the previous page, the current one, and the next one
    {
      number: <int>,
      url: <string>,
    }
  ]
}

Example

GET /blocks?page=2&limit=1
{
  "data": [
    {
      "blockHash": "0502d1a908282819d99d13c08e3365d5fc925b2388f1e40c99efa1b84a400edf",
      "parentHash": "199e4889e15772f72715713a2ef7be2f1d4e49b856442978f4b7b472268c4cc9",
      "timestamp": "2021-06-22T20:07:46.000Z",
      "eraId": 894,
      "proposer": "017d96b9a63abcb61c870a4f55187a0a7ac24096bdb5fc585c12a686a4d892009e",
      "state": "864d8c41f223684fa7a971105cd25e4ceb60cde46bc852686fe99d234e16c20b",
      "deployCount": 0,
      "transferCount": 0,
      "blockHeight": 85488
    }
  ],
  "pageCount": 85488,
  "itemCount": 85488,
  "pages": [
    {
      "number": 1,
      "url": "/blocks?page=1&limit=1"
    },
    {
      "number": 2,
      "url": "/blocks?page=2&limit=1"
    },
    {
      "number": 3,
      "url": "/blocks?page=3&limit=1"
    }
  ]
}

Sorting

Some paginated requests provide a possibility to sort the results. It can be done using the following query parameters:

ParameterTypeDescription

order_by

string

Field the results should be sorted by

order_direction

string

Order direction: ASC or DESC

Example

GET /blocks?page=1&limit=1&order_by=blockHeight&order_direction=ASC
{
  "data": [
    {
      "blockHash": "975ea4de188c2a67946188cea0ec8a93d2d38286d7642526d50c45839a291210",
      "parentHash": "0000000000000000000000000000000000000000000000000000000000000000",
      "timestamp": "2021-04-08T17:00:56.000Z",
      "eraId": 0,
      "proposer": "0106ca7c39cd272dbf21a86eeb3b36b7c26e2e9b94af64292419f7862936bca2ca",
      "state": "e88b7c061760134ba37ad312c1e2d6373121748e9c61bcea19cc57510829addf",
      "deployCount": 0,
      "transferCount": 0,
      "blockHeight": 0
    }
  ],
  "pageCount": 86099,
  "itemCount": 86099,
  "pages": [
    {
      "number": 1,
      "url": "/blocks?page=1&limit=1&order_by=blockHeight&order_direction=ASC"
    },
    {
      "number": 2,
      "url": "/blocks?page=2&limit=1&order_by=blockHeight&order_direction=ASC"
    },
    {
      "number": 3,
      "url": "/blocks?page=3&limit=1&order_by=blockHeight&order_direction=ASC"
    }
  ]
}

Including optional fields

Certain objects provide possibility of including the nested objects by including their names in the fields query param.

Example

GET /extended-deploys?fields=contract_package,entry_point
{
  "data": [
    {
      "deploy_hash": "cf2a0d11f8b4e263a2e1dc50c1e0cbf0cb6b080deb9d27af7a2a9351742b6fa0",
      "block_hash": "f5a5a96e68c9c9cd8a4b66242d5106b83409330c961f9a4873484f0e03ba1342",
      "caller_public_key": "020222f81070130766028a76432e3272573ac5fc48df45cca9a2d088b0dcd675bb37",
      "execution_type_id": 2,
      "contract_hash": "ccb576d6ce6dec84a551e48f0d0b7af89ddba44c7390b690036257a04a3ae9ea",
      "contract_package_hash": "86f2d45f024d7bb7fb5266b2390d7c253b588a0a16ebd946a60cb4314600af74",
      "cost": "2500000000",
      "payment_amount": "2500000000",
      "error_message": null,
      "timestamp": "2022-08-09T15:26:30.000Z",
      "status": "executed",
      "args": {
        "amount": {
          "parsed": "851000000000",
          "cl_type": "U512"
        },
        "delegator": {
          "parsed": "020222f81070130766028a76432e3272573ac5fc48df45cca9a2d088b0dcd675bb37",
          "cl_type": "PublicKey"
        },
        "validator": {
          "parsed": "0169e1552a97843ff2ef4318e8a028a9f4ed0c16b3d96f6a6eee21e6ca0d4022bc",
          "cl_type": "PublicKey"
        }
      },
      "amount": "851000000000",
      "entry_point": {
        "id": "538",
        "contract_hash": "ccb576d6ce6dec84a551e48f0d0b7af89ddba44c7390b690036257a04a3ae9ea",
        "contract_package_hash": "86f2d45f024d7bb7fb5266b2390d7c253b588a0a16ebd946a60cb4314600af74",
        "name": "delegate",
        "action_type_id": null
      },
      "contract_package": {
        "contract_package_hash": "86f2d45f024d7bb7fb5266b2390d7c253b588a0a16ebd946a60cb4314600af74",
        "owner_public_key": null,
        "contract_type_id": 1,
        "contract_name": "Auction",
        "contract_description": "Built-in contract that allows interaction with the validator auction, and provides possibility to bid and delegate funds to Casper network participants",
        "timestamp": "2021-03-31T15:00:40.000Z"
      }
    },
    ...
  ],
  "pageCount": 64794,
  "itemCount": 647936,
  "pages": [
    {
      "number": 1,
      "url": "/extended-deploys?fields%5B0%5D=contract_package&fields%5B1%5D=entry_point&page=1&limit=10"
    },
    {
      "number": 2,
      "url": "/extended-deploys?fields%5B0%5D=contract_package&fields%5B1%5D=entry_point&page=2&limit=10"
    },
    {
      "number": 3,
      "url": "/extended-deploys?fields%5B0%5D=contract_package&fields%5B1%5D=entry_point&page=3&limit=10"
    }
  ]
}

Including rate in other currencies

It is possible to include CSPR to fiat currency rates to paginated response results by adding with_amounts_in_currency_id query param.

ParameterTypeDescription

with_amounts_in_currency_id

int

Modifies paginated results by adding token amounts in the requested currency

The following currencies are available:

IDCode

1

USD

2

EUR

3

JPY

4

GBP

5

CAD

6

CHF

7

CNY

8

HKD

When the with_amounts_in_currency_id response modifier is used, the result items will be extended with the rate property that provides the CSPR rate in the request currency at the moment of the creation of the requested entity

Example

GET /validators/017d96b9a63abcb61c870a4f55187a0a7ac24096bdb5fc585c12a686a4d892009e/rewards?with_amounts_in_currency_id=1
{
  "data": [
    {
      "eraId": 5959,
      "publicKey": "012dbde8cac6493c07c5548edc89ab7803c376278ec91757475867324d99f5f4dd",
      "amount": "519099446711",
      "timestamp": "2022-08-11T07:35:02.000Z",
      "rate": 0.0378569,
    },
    {
      "eraId": 5958,
      "publicKey": "012dbde8cac6493c07c5548edc89ab7803c376278ec91757475867324d99f5f4dd",
      "amount": "521343206946",
      "timestamp": "2022-08-11T05:34:53.000Z",
      "rate": 0.0377718,
    }
  ],
  "pageCount": 91,
  "itemCount": 902,
  "pages": [
    {
      "number": 1,
      "url": "/validators/017d96b9a63abcb61c870a4f55187a0a7ac24096bdb5fc585c12a686a4d892009e/rewards?with_amounts_in_currency_id=1&page=1&limit=10"
    },
    {
      "number": 2,
      "url": "/validators/017d96b9a63abcb61c870a4f55187a0a7ac24096bdb5fc585c12a686a4d892009e/rewards?with_amounts_in_currency_id=1&page=2&limit=10"
    },
    {
      "number": 3,
      "url": "/validators/017d96b9a63abcb61c870a4f55187a0a7ac24096bdb5fc585c12a686a4d892009e/rewards?with_amounts_in_currency_id=1&page=3&limit=10"
    }
  ]
}

Entities

Block

Represents the chain Block object

PropertyTypeDescription

eraId

int

ID of the era when the block was generated

blockHash

string(64)

Unique block hash

blockHeight

int

Consecutive number of the block starting from 0

parentHash

string(64)

Hash of the previous block

proposer

string(68)

Public key of the validator that proposed the block

state

string(64)

Global state hash

deployCount

int

Number of deploys in the block that are not native transfers

transferCount

int

Number of native transfers deploys in the block

timestamp

DateTime

Time when the source node saw the block

Example

{
  "blockHash": "0502d1a908282819d99d13c08e3365d5fc925b2388f1e40c99efa1b84a400edf",
  "parentHash": "199e4889e15772f72715713a2ef7be2f1d4e49b856442978f4b7b472268c4cc9",
  "timestamp": "2021-06-22T20:07:46.000Z",
  "eraId": 894,
  "proposer": "017d96b9a63abcb61c870a4f55187a0a7ac24096bdb5fc585c12a686a4d892009e",
  "state": "864d8c41f223684fa7a971105cd25e4ceb60cde46bc852686fe99d234e16c20b",
  "deployCount": 2,
  "transferCount": 9,
  "blockHeight": 85488
}

Deploy

Represents the chain Deploy object. Deprecated in favor of ExtendedDeploy

PropertyTypeDescription

deployHash

string(64)

Unique deploy hash

blockHash

string(64)

Parent block hash

account

string(68)

Public key of the account that created the deploy

cost

int

Deploy cost in motes

errorMessage

string

Error message if the deploy failed

timestamp

DateTime

Time when the source node saw the deploy

Example

{
  "deployHash": "056fc62a77f971a2323d6aa2a2a9633ed1dbb63c3ecfda15dffbab1a1479a976",
  "blockHash": "8ddb1e5e4a729c99347833fc4c8f8d32963e85a5737b5f6981d45eab306d014d",
  "account": "011cb66592b852208ebf1a2b88eec6ce61035f24bbe2691f82b71f824fbae3c369",
  "cost": 2732814230,
  "errorMessage": "ApiError::AuctionError(4) [64516]",
  "timestamp": "2021-06-23T08:15:34.000Z"
}

Transfer

Represents transfers between accounts and/or purses

PropertyTypeDescription

transferId

?int

User provided transfer ID, null if not provided

deployHash

string(64)

Parent deploy hash

blockHash

string(64)

Parent block hash

fromAccount

string(64)

Account hash of the transfer sender

toAccount

?string(64)

Account hash of the transfer recipient. If null, then the funds were sent directly to a purse.

sourcePurse

string(73)

Purse the funds were transferred from (belongs to the transfer sender, in the majority of the cases, it will be the senders's main purse)

targetPurse

string(73)

Purse the funds were transferred to (belongs to the transfer recipient, in the majority of the cases, it will be the recipient's main purse)

amount

int

Transfer amount in motes

timestamp

DateTime

Time when the source node saw the deploy where the transfer happen

Example

{
  "transferId": 187821,
  "deployHash": "32a5716d14c0e6a92cbe1ec48af19ad6814ca87e0ba250ce191b2848b3dc71bf",
  "blockHash": "f39a25da3ad43acdeb8cdbad8874e683eabf65e42256096718bae592f744d110",
  "sourcePurse": "uref-4e66337c4e22451249ee44d70e603834907becfa8569c9a2c230d51efdd2a83f-007",
  "targetPurse": "uref-d6c0277d0ec99d2ba591c7328734da117cef5af6e9ee1daf66445b653749479e-004",
  "amount": "2500000000",
  "fromAccount": "ee3d42a0bd09405b3c5e1f757a23e24ea8fc54552aa18655981cd40643bc42bd",
  "toAccount": "ec109fc034b3a68362de508ad4da0bb4f614c4c617c36a775bbac8f78362d76c",
  "timestamp": "2021-06-22T20:19:54.000Z"
}

Contract type

Value-object that defines contract type

IDName

1

System

2

Strict ERC-20

3

Custom ERC-20

4

Strict CEP-47 (NFT)

5

Modified CEP-47 (NFT)

6

DeFi

Contract package

Represents contract packages deployed to the network

PropertyTypeDescription

contract_package_hash

string(64)

Contract package hash

owner_public_key

?string(68)

Contract owner public key or null for system contracts

contract_type_id

int

Contract type identifier

contract_name

string(128)

Contract name, if it's known

contract_description

string(256)

Contract description, if it's known

metadata

?json

Contract Metadata or null

timestamp

DateTime

Time when the first version of the contract was deployed

Example

{
  "contract_package_hash": "fced7072e4b52f8f4841667cfc0a7d92c93b01ffc0717d5cd80f49546bd7febb",
  "owner_public_key": "02022ef9655d4e608076fbdfde2c4052df4a72e2d4d16ef80da9e129f705aa8288b7",
  "contract_type_id": null,
  "contract_name": "Account Info",
  "contract_description": "Contract developed by MAKE Software that allows account owners to provide information about themselves on the Casper Network",
  "metadata": {
    "symbol": "SYMBOL"
  },
  "timestamp": "2021-09-08T15:58:43.000Z"
}

Contract

Represents particular contract versions deployed to the network

PropertyTypeDescription

contract_hash

string(64)

Contract hash

contract_package_hash

string(64)

Contract package hash

deploy_hash

string(64)

Hash of the deploy that deployed the contract to the network

contract_type_id

int

Contract type identifier

contract_version

int

Contract version. Versions are sequential natural numbers starting from 1

is_disabled

bool

Contract description, if it's known

timestamp

DateTime

Time when the first version of the contract was deployed

Example

{
  "contract_hash": "34756be8e2a3a26ca69d081da76b67c9046c0dc010535eb5940c37461b774da7",
  "contract_package_hash": "74e7c4f25eafb5b902ecdcdf08a6bda30c128defd974309f76c7fd2160465237",
  "deploy_hash": "d348e076c150940e22a5b0c6addce78ed329c5f752a675a3212198036cd188b9",
  "contract_type_id": 3,
  "contract_version": 1,
  "is_disabled": false,
  "protocol_version": "1.4.6",
  "timestamp": "2022-08-03T16:55:07.000Z"
}

Entry point

Represents contract entry points

PropertyTypeDescription

id

uint32

Internal entry point identifier

contract_package_hash

string(64)

Contract package hash

contract_hash

string(64)

Contract hash

name

string(128)

Entry point name

Example

{
  "id": "538",
  "contract_hash": "ccb576d6ce6dec84a551e48f0d0b7af89ddba44c7390b690036257a04a3ae9ea",
  "contract_package_hash": "86f2d45f024d7bb7fb5266b2390d7c253b588a0a16ebd946a60cb4314600af74",
  "name": "delegate",
}

Deploy execution type

Value-object that defines deploy execution type

IDName

1

ModuleBytes

2

StoredContractByHash

3

StoredContractByName

4

StoredVersionedContractByHash

5

StoredVersionedContractByName

6

Transfer

Extended Deploy

New iteration of the Deploy object that identifies contract calls

PropertyTypeDescription

deploy_hash

string(64)

Deploy hash

block_hash

string(64)

Parent block hash

caller_public_key

string(68)

Public key of the account that created the deploy

execution_type_id

uint8

Execution type identifier

contract_package_hash

?string(64)

Contract package hash or null if not a valid contract call

contract_package

?ContractPackage

Contract package object that can be optionally included in the data

contract_hash

?string(64)

Contract hash or null if not a valid contract call

entry_point

?EntryPoint

Entry point object that can be optionally included in the data

args

?json

Entry point arguments in the network format or null if not a valid contract call

amount

?uint64

The amount argument value

payment_amount

uint64

Payment amount in motes

cost

uint64

Cost in motes

error_message

?string

Error message

status

enum

pending, executed or expired

Example

{
  "deploy_hash": "cf2a0d11f8b4e263a2e1dc50c1e0cbf0cb6b080deb9d27af7a2a9351742b6fa0",
  "block_hash": "f5a5a96e68c9c9cd8a4b66242d5106b83409330c961f9a4873484f0e03ba1342",
  "caller_public_key": "020222f81070130766028a76432e3272573ac5fc48df45cca9a2d088b0dcd675bb37",
  "execution_type_id": 2,
  "contract_hash": "ccb576d6ce6dec84a551e48f0d0b7af89ddba44c7390b690036257a04a3ae9ea",
  "contract_package_hash": "86f2d45f024d7bb7fb5266b2390d7c253b588a0a16ebd946a60cb4314600af74",
  "cost": "2500000000",
  "payment_amount": "2500000000",
  "error_message": null,
  "timestamp": "2022-08-09T15:26:30.000Z",
  "status": "executed",
  "args": {
    "amount": {
      "parsed": "851000000000",
      "cl_type": "U512"
    },
    "delegator": {
      "parsed": "020222f81070130766028a76432e3272573ac5fc48df45cca9a2d088b0dcd675bb37",
      "cl_type": "PublicKey"
    },
    "validator": {
      "parsed": "0169e1552a97843ff2ef4318e8a028a9f4ed0c16b3d96f6a6eee21e6ca0d4022bc",
      "cl_type": "PublicKey"
    }
  },
  "amount": "851000000000",
  "entry_point": {
    "id": "538",
    "contract_hash": "ccb576d6ce6dec84a551e48f0d0b7af89ddba44c7390b690036257a04a3ae9ea",
    "contract_package_hash": "86f2d45f024d7bb7fb5266b2390d7c253b588a0a16ebd946a60cb4314600af74",
    "name": "delegate",
    "action_type_id": null
  },
  "contract_package": {
    "contract_package_hash": "86f2d45f024d7bb7fb5266b2390d7c253b588a0a16ebd946a60cb4314600af74",
    "owner_public_key": null,
    "contract_type_id": 1,
    "contract_name": "Auction",
    "contract_description": "Built-in contract that allows interaction with the validator auction, and provides possibility to bid and delegate funds to Casper network participants",
    "timestamp": "2021-03-31T15:00:40.000Z"
  }
}

NFT Token

Represents an nft token minted by some nft contract

PropertyTypeDescription

tracking_id

uint

Auto incremented id of the nft token on the CSPR.cloud side

token_standard_id

uint(8)

NFT token standard id of the token

contract_package_hash

string(64)

Contract Package Hash of the token contract

token_id

string(64)

The id of the token

owner_account_hash

?string(64)

The hash of the token owner account, may be null if the token in burned

metadata

?json

NFT token Metadata or null

is_burned

boolean

The flag that indicates weither token burned or not

contract_package

?ContractPackage

Contract Package object

owner_public_key

?string(68)

The public key of the owner account, null if not being identified

timestamp

DateTime

Time when the first version of the contract was deployed

Example

{
  "tracking_id": "27576",
  "token_standard_id": 1,
  "contract_package_hash": "542359cb825bbf2a10017db5cb31b8862df7a64784e39b947678164156050d89",
  "token_id": "E2E-DEMO-01",
  "owner_account_hash": "fcc99f47a8a39da698c15e0dfc4a5ab5d6de08346b5d66c0235dee1342deea57",
  "metadata": [
    {
      "key": "tokenId",
      "value": "E2E-DEMO-01"
    },
    {
      "key": "tokenMetaHash",
      "value": "aUSvGy+AEcKzSjtQa0nb+w5nnT60MYFwm+9uGtgcAQI="
    }
  ],
  "is_burned": false,
  "timestamp": "2021-08-12T14:23:09.000Z",
  "contract_package": {
    "contract_package_hash": "542359cb825bbf2a10017db5cb31b8862df7a64784e39b947678164156050d89",
    "owner_public_key": "0151cfcc0e740203030902649d1cdd18e55018175d08a4cb985dacd53e237f129c",
    "contract_type_id": 5,
    "contract_name": "ipwe_nft",
    "contract_description": null,
    "metadata": {
      "symbol": "IPWENFT"
    },
    "timestamp": "2021-08-10T19:09:55.000Z"
  },
  "owner_public_key": null
}

NFT Token Action

Represents an nft token action

PropertyTypeDescription

deploy_hash

string(64)

Deploy hash of the token action

token_tracking_id

uint

Tracking id of the NFT token

from_account_hash

?string(64)

Account hash from which action happend, null for mint actions

to_account_hash

?string(64)

Account hash to which action happend, null for burn actions

from_public_key

?string(68)

Account public key from which action happend, null if not being identified

to_public_key

?string(68)

Account public key to which action happend, null if not being identified

nft_action_id

uint(8)

NFT token action type id of the action

deploy

?ExtendedDeploy

Deploy object

timestamp

DateTime

Time when the first version of the contract was deployed

Example

{
  "deploy_hash": "3430254ceff99cd48a779334b325109b61ce540337f37832b70e5a26beaa566a",
  "token_tracking_id": "27573",
  "from_account_hash": "fd3436916830ce706cdc9796fd01500ddcaa8d021b58207d7e87eca00f4b4e9a",
  "from_public_key": null,
  "to_account_hash": "fd3436916830ce706cdc9796fd01500ddcaa8d021b58207d7e87eca00f4b4e9a",
  "to_public_key": null,
  "nft_action_id": 5,
  "timestamp": "2021-08-12T06:52:20.000Z",
  "deploy": {
    "deploy_hash": "3430254ceff99cd48a779334b325109b61ce540337f37832b70e5a26beaa566a",
    "block_hash": "14a3913c56057ffa30e3b0ced909744a6a20c0ecf7357e8daac246251e196538",
    "caller_public_key": "0151cfcc0e740203030902649d1cdd18e55018175d08a4cb985dacd53e237f129c",
    "execution_type_id": 2,
    "contract_hash": "25f1c770dfe5258dd05d182dce8e96b1a2e35990b88c3f62f46e90dc352eabc6",
    "contract_package_hash": "542359cb825bbf2a10017db5cb31b8862df7a64784e39b947678164156050d89",
    "cost": "247504850",
    "payment_amount": "12000000000",
    "error_message": null,
    "timestamp": "2021-08-12T06:52:20.000Z",
    "status": "executed",
    "args": {
      "token_id": {
        "parsed": "E2E-TEST-05",
        "cl_type": "String"
      },
      "token_meta": {
        "parsed": [
          {
            "key": "tokenId",
            "value": "E2E-TEST-05"
          },
          {
            "key": "tokenMetaHash",
            "value": "D8pT5qyrZUKbpzePdG4kfzjU8O1tQLCaGBtT8DJ9CJs="
          }
        ],
        "cl_type": {
          "Map": {
            "key": "String",
            "value": "String"
          }
        }
      }
    },
    "amount": null
  }
}

NFT Token standard

Value-object that defines nft token standard

IDName

1

CEP47

NFT Token action type

Value-object that defines nft token action type

IDName

1

MintOne

2

BurnOne

3

ApproveToken

4

TransferToken

5

MetadataUpdate

ERC20 Token Action

Represents an erc20 token action

PropertyTypeDescription

deploy_hash

string(64)

Deploy hash of the token action

contract_package_hash

string(64)

Contract package hash of the token contract

from_hash

?string(64)

Hash from which action happend, null for mint actions

from_type

?string(16)

The type of the from action participant, may be account-hash, hash or null for mint actions

to_hash

?string(64)

Hash to which action happend, null for burn actions

to_type

?string(16)

The type of the to action participant, may be account-hash, hash or null for burn actions

from_public_key

?string(68)

Account public key from which action happend, null if not being identified

to_public_key

?string(68)

Account public key to which action happend, null if not being identified

erc20_action_type_id

uint(8)

ERC20 token action type id of the action

amount

string(128)

The amount of tokens

deploy

?ExtendedDeploy

Deploy object

deploy

?ContractPackage

Contract Package object

timestamp

DateTime

Time when the first version of the contract was deployed

Example

{
  "deploy_hash": "1f6ce947f6a6e3aeb422dfd2a15a9b3576cf18fe18f1cf753572f572b1b23490",
  "contract_package_hash": "7ea0b783101136b14b10a58974e930f7f393c6b87b18e99e71e7df44dc9bc650",
  "from_type": null,
  "from_hash": null,
  "from_public_key": null,
  "to_type": "account-hash",
  "to_hash": "afad4779d55438441bb423437c6cae4d058f3e761018e68b7a96704a98f49d5b",
  "to_public_key": "01e3b6ef459f27376599266bcb6c03fc7e172faa2edf551f3791c2a8a27d72bc1c",
  "erc20_action_type_id": 1,
  "amount": "100000000000000000000",
  "timestamp": "2022-08-16T17:54:05.000Z",
  "deploy": {
    "deploy_hash": "1f6ce947f6a6e3aeb422dfd2a15a9b3576cf18fe18f1cf753572f572b1b23490",
    "block_hash": "c3fe5f1128371bfeb41f2f52ce6610402c282a7a0c698b217f6b6c36bd819d43",
    "caller_public_key": "01e3b6ef459f27376599266bcb6c03fc7e172faa2edf551f3791c2a8a27d72bc1c",
    "execution_type_id": 2,
    "contract_hash": "93c6ea23c3ef98d6863478114b795cbf76034bda13c6a09c4a2e597741adf8a3",
    "contract_package_hash": "7ea0b783101136b14b10a58974e930f7f393c6b87b18e99e71e7df44dc9bc650",
    "cost": "378168830",
    "payment_amount": "5000000000",
    "error_message": null,
    "timestamp": "2022-08-16T17:54:05.000Z",
    "status": "executed",
    "args": {
      "to": {
        "parsed": {
          "Account": "account-hash-afad4779d55438441bb423437c6cae4d058f3e761018e68b7a96704a98f49d5b"
        },
        "cl_type": "Key"
      },
      "amount": {
        "parsed": "100000000000000000000",
        "cl_type": "U256"
      }
    },
    "amount": "100000000000000000000"
  },
  "contract_package": {
    "contract_package_hash": "7ea0b783101136b14b10a58974e930f7f393c6b87b18e99e71e7df44dc9bc650",
    "owner_public_key": "01e3b6ef459f27376599266bcb6c03fc7e172faa2edf551f3791c2a8a27d72bc1c",
    "contract_type_id": 3,
    "contract_name": "Dai-Token",
    "contract_description": null,
    "metadata": {
      "symbol": "DAI",
      "decimals": 9,
      "balances_uref": "uref-5eb59a3e2fd776f3ce5abf869634f112134f2bd5d7eff34e78bbaa3bb3ff8392-007",
      "total_supply_uref": "uref-c0bba347aab0a6014002d2b5023db86e2080b789c84c5735f64a835e8b3ca132-007"
    },
    "timestamp": "2022-08-16T11:46:58.000Z"
  }
}

ERC20 Token action type

Value-object that defines nft token action type

IDName

1

Mint

2

Transfer

3

Approve

4

Burn

Validator reward

ValidatorReward is an entity that stores information about era rewards earned by a validator

PropertyTypeDescription

eraId

int

ID of era when the reward was earned

publicKey

string(68)

Validator public key

amount

int

Reward amount in motes

timestamp

DateTime

Time when the source node saw the switch block where the reward was earned

Example

{
  "eraId": 1015,
  "publicKey": "0190c434129ecbaeb34d33185ab6bf97c3c493fc50121a56a9ed8c4c52855b5ac1",
  "amount": 20742139338237,
  "timestamp": "2021-06-24T09:47:40.000Z"
}

Delegator reward

DelegatorReward is an entity that stores information about era rewards earned by a delegator

PropertyTypeDescription

eraId

int

ID of era when the reward was earned

publicKey

string(68)

Delegator public key

validatorPublicKey

string(68)

Validator public key

amount

int

Reward amount in motes

timestamp

DateTime

Time when the source node saw the switch block where the reward was earned

Example

{
  "eraId": 1015,
  "publicKey": "01041a966808d68bf1de2c4f04d756e5ecf4059903eaf4bf6582188dbf96f891c4",
  "validatorPublicKey": "015fd964620f98e551065079e142840dac3fb25bd97a0d4722411cb439f9247d72",
  "amount": 4045968027,
  "timestamp": "2021-06-24T09:47:40.000Z"
}

Token supply

TokenSupply is an entity that stores information about the token supply

PropertyTypeDescription

total

int

Total token supply

circulating

int

Circulating token supply

timestamp

DateTime

Time when the token supply was recalculated

Example

{
  "data": {
    "total": 10168406025,
    "circulating": 592774555,
    "timestamp": 1624455946839
  }
}

Endpoints

Blocks

Get paginated list of blocks

Endpoint

GET /blocks

Endpoint-specific query parameters

ParameterTypeDescription

blockHash

string(64)

Filters the results by block hash

blockHeight

int

Filters the results by block height

eraId

int

Filters the results by era ID

proposer

string(68)

Filters the results by public key of the proposer validator

Sorting

Fields:

  • eraId

  • blockHeight

  • deployCount

  • transferCount

  • timestamp

Default: blockHeight DESC

Response

PaginatedResponse<Block>

Example

GET /blocks
{
  "data": [
    {
      "blockHash": "44a3d4814e268564f7850267114d29c1f586601c4ace43efaa6ae32d500d0dea",
      "parentHash": "68d5b023a14181c8c5f40f6ac1c419e42721b7b127f7d2bf0c879cb71f7123b2",
      "timestamp": "2021-06-23T07:12:57.000Z",
      "eraId": 900,
      "proposer": "01d66d09fb163ca2723960470777467056951df570d6add6e051af827a3b07c76a",
      "state": "cb5d59ce600bee8d5dd5e10453c1d1b0a430d1ce31f9057f0e00f5f4e4418ad1",
      "deployCount": 0,
      "transferCount": 0,
      "blockHeight": 86097
    },
    ...,
    {
      "blockHash": "b567e4ed1804bf458f53c19503f411e4f2fea4957d86a9e03de8b2d7f8a8b19d",
      "parentHash": "236d5262dd9f2c1e9504fa0bfa2eb58fc34c34360c4e1d6c26faf052b44d89bd",
      "timestamp": "2021-06-23T07:03:08.000Z",
      "eraId": 900,
      "proposer": "0125a1d61bbeb09579e5e9c2126eabfdbbce3f061251496e3674e7bf0cf2587cbb",
      "state": "cb5d59ce600bee8d5dd5e10453c1d1b0a430d1ce31f9057f0e00f5f4e4418ad1",
      "deployCount": 0,
      "transferCount": 0,
      "blockHeight": 86088
    }
  ],
  "pageCount": 8610,
  "itemCount": 86097,
  "pages": [
    {
      "number": 1,
      "url": "/blocks?page=1&limit=10"
    },
    {
      "number": 2,
      "url": "/blocks?page=2&limit=10"
    },
    {
      "number": 3,
      "url": "/blocks?page=3&limit=10"
    }
  ]
}

Get block by hash

Endpoint

GET /blocks/:blockHash

Response

Block

Example

GET /blocks/7d95e118b769392670b82e7e336b3da4453dbbcfa83ef1dcc978538f8fd8a2c3
{
  "data": {
    "blockHash": "7d95e118b769392670b82e7e336b3da4453dbbcfa83ef1dcc978538f8fd8a2c3",
    "parentHash": "4f235287f3bb9bd0d6e459a7dafe4cf8be92fae32678c2d1d52cce230c54108f",
    "timestamp": "2021-06-23T07:54:28.000Z",
    "eraId": 900,
    "proposer": "018f0d3e2bd95047078003ca8b06b4c26c0bf99500927827fea39ba4454c3d1e78",
    "state": "a2d4450b8e56fb27f011e7330cc07e1f4b3322a38cc317a18ab08c8d479a1d57",
    "deployCount": 0,
    "transferCount": 0,
    "blockHeight": 86135
  }
}

Get paginated list of block deploys

Endpoint

GET /blocks/:blockHash/deploys

Endpoint-specific query parameters

ParameterTypeDescription

account

string(68)

Filters the results by public key of the creator account

Sorting

Fields:

  • cost

  • timestamp

Default: timestamp DESC

Response

PaginatedResponse<Deploy>

Example

GET /blocks/673c0bc66d4592f6e3f01ffc16f8784fa427db90b00132287aa979e6356fb61c/deploys
{
  "data": [
    {
      "deployHash": "8db684fd6b5ddd1f518845cda3ada15853be9a800111b071e9b8cfdeb8b6d646",
      "blockHash": "673c0bc66d4592f6e3f01ffc16f8784fa427db90b00132287aa979e6356fb61c",
      "account": "01459b4289c57c69b0b8bb7cb7e9dbd65759595c970124286e3aded5e7d51b35dc",
      "cost": 2732814230,
      "errorMessage": "ApiError::AuctionError(4) [64516]",
      "timestamp": "2021-06-23T08:13:27.000Z"
    }
  ],
  "pageCount": 1,
  "itemCount": 1,
  "pages": [
    {
      "number": 1,
      "url": "/blocks/673c0bc66d4592f6e3f01ffc16f8784fa427db90b00132287aa979e6356fb61c/deploys?page=1&limit=10"
    }
  ]
}

Get paginated list of block transfers

Endpoint

GET /blocks/:blockHash/transfers

Endpoint-specific query parameters

ParameterTypeDescription

deployHash

string(64)

Filters the results by block hash

transferId

int

Filters the results by transferId

accountHash

string(64)

Filters the results by accountFrom or accountTo fields

Sorting

Fields:

  • amount

  • timestamp

Default: timestamp DESC

Response

PaginatedResponse<Transfer>

Example

GET /blocks/2990f5c3b50d76e2f39d6abc39d942b27b20ca338e3c2ddce8731c1ba163adc1/transfers
{
  "data": [
    {
      "transferId": 187821,
      "deployHash": "bfd660bd1d098ddfeb57a3d1f85d770fff67191c37f92194bfab8f6cf5378e02",
      "blockHash": "2990f5c3b50d76e2f39d6abc39d942b27b20ca338e3c2ddce8731c1ba163adc1",
      "sourcePurse": "uref-4e66337c4e22451249ee44d70e603834907becfa8569c9a2c230d51efdd2a83f-007",
      "targetPurse": "uref-024de273b007fc939bd82dc61119eb0794e800040b745f673d193ab3bb450fba-004",
      "amount": "2500000000",
      "fromAccount": "ee3d42a0bd09405b3c5e1f757a23e24ea8fc54552aa18655981cd40643bc42bd",
      "toAccount": "c5be6bdd586cdd08df8c6287124014dbe765b73ffcea8bd00a1e0f8d5416f869",
      "timestamp": "2021-06-22T19:30:42.000Z"
    }
  ],
  "pageCount": 1,
  "itemCount": 1,
  "pages": [
    {
      "number": 1,
      "url": "/blocks/2990f5c3b50d76e2f39d6abc39d942b27b20ca338e3c2ddce8731c1ba163adc1/transfers?page=1&limit=10"
    }
  ]
}

Deploys (deprecated)

Get paginated list of deploys

Endpoint

GET /deploys

Endpoint-specific query parameters

ParameterTypeDescription

blockHash

string(64)

Filters the results by block hash

account

string(68)

Filters the results by public key of the creator account

Sorting

Fields:

  • timestamp

Default sorting: timestamp DESC

Response

PaginatedResponse<Deploy>

Example

GET /deploys
{
  "data": [
    {
      "deployHash": "4e508e8d44e2dc82a1a3ba6222f84c9527c844fa3ccafb899ef131816a2ab95b",
      "blockHash": "4ae0d6b50dafd5a108404bd70614409573404d73167c08b25f3d5c286ba12ff5",
      "account": "01c6af2fdbce2da279a26b595567b5679aa26083b67cfdb9c2a3812310702894dd",
      "cost": 2735834850,
      "errorMessage": null,
      "timestamp": "2021-06-23T08:59:49.000Z"
    },
    ...,
    {
      "deployHash": "38d67ea3e72ac26278c4450a32a5e711bd5f5648e10502994e9de7e78c5ecff6",
      "blockHash": "238df5fd9d5929156db21a42066c405bc5fa7dd9b9ebeb062aad3f4d0906edeb",
      "account": "018afa98ca4be12d613617f7339a2d576950a2f9a92102ca4d6508ee31b54d2c02",
      "cost": 170101740,
      "errorMessage": null,
      "timestamp": "2021-06-23T07:40:57.000Z"
    }
  ],
  "pageCount": 679,
  "itemCount": 6787,
  "pages": [
    {
      "number": 1,
      "url": "/deploys?page=1&limit=10"
    },
    {
      "number": 2,
      "url": "/deploys?page=2&limit=10"
    },
    {
      "number": 3,
      "url": "/deploys?page=3&limit=10"
    }
  ]
}

Get deploy by hash

Endpoint

GET /deploys/:deployHash

Response

Deploy

Example

GET /deploys/1e8639fc8737c6d43ec7ade2898b0db5924015b8b3f6589063b8927bed8579a8
{
  "data": {
    "deployHash": "1e8639fc8737c6d43ec7ade2898b0db5924015b8b3f6589063b8927bed8579a8",
    "blockHash": "b351a39944585bc7d7102ca9fabe3fc87edfedb1336d623fb973e9c4f25acc6a",
    "account": "01459b4289c57c69b0b8bb7cb7e9dbd65759595c970124286e3aded5e7d51b35dc",
    "cost": 2735834850,
    "errorMessage": null,
    "timestamp": "2021-06-23T08:12:24.000Z"
  }
}

Get paginated list of deploy transfers

Endpoint

GET /deploys/:deployHash/transfers

Endpoint-specific query parameters

ParameterTypeDescription

blockHash

string(64)

Filters the results by block hash

transferId

int

Filters the results by transferId

accountHash

string(64)

Filters the results by accountFrom or accountTo fields

Sorting

Fields:

  • amount

  • timestamp

Default: timestamp DESC

Response

PaginatedResponse<Transfer>

Example

GET /deploys/4e508e8d44e2dc82a1a3ba6222f84c9527c844fa3ccafb899ef131816a2ab95b/transfers
{
  "data": [
    {
      "transferId": null,
      "deployHash": "4e508e8d44e2dc82a1a3ba6222f84c9527c844fa3ccafb899ef131816a2ab95b",
      "blockHash": "4ae0d6b50dafd5a108404bd70614409573404d73167c08b25f3d5c286ba12ff5",
      "sourcePurse": "uref-be8d8056f4c4a11b034ffa1f4a502beacba0d8ba6434f2c9bd43fb05205bfb96-007",
      "targetPurse": "uref-67ff62b09c09df8f18e182644d66295c7e50b7ddcee6cad17d960edaca01f344-007",
      "amount": "900000000000",
      "fromAccount": "1688d91a338b807ebfc1756568e6388b9c94abcfe1e7bc671adaf70d681b5fc0",
      "toAccount": null,
      "timestamp": "2021-06-23T08:59:49.000Z"
    }
  ],
  "pageCount": 1,
  "itemCount": 1,
  "pages": [
    {
      "number": 1,
      "url": "/deploys/4e508e8d44e2dc82a1a3ba6222f84c9527c844fa3ccafb899ef131816a2ab95b/transfers?page=1&limit=10"
    }
  ]
}

Extended deploys

Get paginated list of extended deploys

Endpoint

GET /extended-deploys

Endpoint-specific query parameters

ParameterTypeDescription

block_hash

string(64)

Filters the results by block hash

caller_public_key

string(68)

Filters the results by public key of the creator account

contract_package_hash

string(64)

Filters the results by contract package hash

contract_hash

string(64)

Filters the results by contract hash

Sorting

Fields:

  • block_hash

  • caller_public_key

  • contract_package_hash

  • contract_hash

  • timestamp

Default sorting: timestamp DESC

Response

PaginatedResponse<ExtendedDeploys>

Example

GET /extended-deploys?fields=contract_package,entry_point
{
  "data": [
    {
      "deploy_hash": "cf2a0d11f8b4e263a2e1dc50c1e0cbf0cb6b080deb9d27af7a2a9351742b6fa0",
      "block_hash": "f5a5a96e68c9c9cd8a4b66242d5106b83409330c961f9a4873484f0e03ba1342",
      "caller_public_key": "020222f81070130766028a76432e3272573ac5fc48df45cca9a2d088b0dcd675bb37",
      "execution_type_id": 2,
      "contract_hash": "ccb576d6ce6dec84a551e48f0d0b7af89ddba44c7390b690036257a04a3ae9ea",
      "contract_package_hash": "86f2d45f024d7bb7fb5266b2390d7c253b588a0a16ebd946a60cb4314600af74",
      "cost": "2500000000",
      "payment_amount": "2500000000",
      "error_message": null,
      "timestamp": "2022-08-09T15:26:30.000Z",
      "status": "executed",
      "args": {
        "amount": {
          "parsed": "851000000000",
          "cl_type": "U512"
        },
        "delegator": {
          "parsed": "020222f81070130766028a76432e3272573ac5fc48df45cca9a2d088b0dcd675bb37",
          "cl_type": "PublicKey"
        },
        "validator": {
          "parsed": "0169e1552a97843ff2ef4318e8a028a9f4ed0c16b3d96f6a6eee21e6ca0d4022bc",
          "cl_type": "PublicKey"
        }
      },
      "amount": "851000000000",
      "entry_point": {
        "id": "538",
        "contract_hash": "ccb576d6ce6dec84a551e48f0d0b7af89ddba44c7390b690036257a04a3ae9ea",
        "contract_package_hash": "86f2d45f024d7bb7fb5266b2390d7c253b588a0a16ebd946a60cb4314600af74",
        "name": "delegate",
        "action_type_id": null
      },
      "contract_package": {
        "contract_package_hash": "86f2d45f024d7bb7fb5266b2390d7c253b588a0a16ebd946a60cb4314600af74",
        "owner_public_key": null,
        "contract_type_id": 1,
        "contract_name": "Auction",
        "contract_description": "Built-in contract that allows interaction with the validator auction, and provides possibility to bid and delegate funds to Casper network participants",
        "timestamp": "2021-03-31T15:00:40.000Z"
      }
    },
    ...
  ],
  "pageCount": 64794,
  "itemCount": 647936,
  "pages": [
    {
      "number": 1,
      "url": "/extended-deploys?fields%5B0%5D=contract_package&fields%5B1%5D=entry_point&page=1&limit=10"
    },
    {
      "number": 2,
      "url": "/extended-deploys?fields%5B0%5D=contract_package&fields%5B1%5D=entry_point&page=2&limit=10"
    },
    {
      "number": 3,
      "url": "/extended-deploys?fields%5B0%5D=contract_package&fields%5B1%5D=entry_point&page=3&limit=10"
    }
  ]
}

Get extended deploy by hash

Endpoint

GET /extended-deploys/:deploy_hash

Response

ExtendedDeploy

Example

GET /extended-deploys/cf2a0d11f8b4e263a2e1dc50c1e0cbf0cb6b080deb9d27af7a2a9351742b6fa0?fields=contract_package,entry_point
{
  "data": {
    "deploy_hash": "cf2a0d11f8b4e263a2e1dc50c1e0cbf0cb6b080deb9d27af7a2a9351742b6fa0",
    "block_hash": "f5a5a96e68c9c9cd8a4b66242d5106b83409330c961f9a4873484f0e03ba1342",
    "caller_public_key": "020222f81070130766028a76432e3272573ac5fc48df45cca9a2d088b0dcd675bb37",
    "execution_type_id": 2,
    "contract_hash": "ccb576d6ce6dec84a551e48f0d0b7af89ddba44c7390b690036257a04a3ae9ea",
    "contract_package_hash": "86f2d45f024d7bb7fb5266b2390d7c253b588a0a16ebd946a60cb4314600af74",
    "cost": "2500000000",
    "payment_amount": "2500000000",
    "error_message": null,
    "timestamp": "2022-08-09T15:26:30.000Z",
    "status": "executed",
    "args": {
    "amount": {
      "parsed": "851000000000",
      "cl_type": "U512"
    },
    "delegator": {
      "parsed": "020222f81070130766028a76432e3272573ac5fc48df45cca9a2d088b0dcd675bb37",
      "cl_type": "PublicKey"
    },
    "validator": {
      "parsed": "0169e1552a97843ff2ef4318e8a028a9f4ed0c16b3d96f6a6eee21e6ca0d4022bc",
      "cl_type": "PublicKey"
    }
    },
    "amount": "851000000000",
    "entry_point": {
    "id": "538",
    "contract_hash": "ccb576d6ce6dec84a551e48f0d0b7af89ddba44c7390b690036257a04a3ae9ea",
    "contract_package_hash": "86f2d45f024d7bb7fb5266b2390d7c253b588a0a16ebd946a60cb4314600af74",
    "name": "delegate",
    "action_type_id": null
    },
    "contract_package": {
    "contract_package_hash": "86f2d45f024d7bb7fb5266b2390d7c253b588a0a16ebd946a60cb4314600af74",
    "owner_public_key": null,
    "contract_type_id": 1,
    "contract_name": "Auction",
    "contract_description": "Built-in contract that allows interaction with the validator auction, and provides possibility to bid and delegate funds to Casper network participants",
    "timestamp": "2021-03-31T15:00:40.000Z"
    }
  }
}

Accounts

Get paginated list of account deploys (deprecated)

Endpoint

GET /accounts/:public_key/deploys

Note, that an account public key should be used to form the URL.

Endpoint-specific query parameters

ParameterTypeDescription

blockHash

string(64)

Filters the results by block hash

Sorting

Fields:

  • cost

  • timestamp

Default: timestamp DESC

Response

PaginatedResponse<Deploy>

Example

GET /accounts/01c6af2fdbce2da279a26b595567b5679aa26083b67cfdb9c2a3812310702894dd/deploys
{
  "data": [
    {
      "deployHash": "4e508e8d44e2dc82a1a3ba6222f84c9527c844fa3ccafb899ef131816a2ab95b",
      "blockHash": "4ae0d6b50dafd5a108404bd70614409573404d73167c08b25f3d5c286ba12ff5",
      "account": "01c6af2fdbce2da279a26b595567b5679aa26083b67cfdb9c2a3812310702894dd",
      "cost": 2735834850,
      "errorMessage": null,
      "timestamp": "2021-06-23T08:59:49.000Z"
    }
  ],
  "pageCount": 1,
  "itemCount": 1,
  "pages": [
    {
      "number": 1,