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:

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:

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.

The following currencies are available:

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

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

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

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

Contract package

Represents contract packages deployed to the network

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

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

Example

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

Deploy execution type

Value-object that defines deploy execution type

Extended Deploy

New iteration of the Deploy object that identifies contract calls

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

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

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

NFT Token action type

Value-object that defines nft token action type

ERC20 Token Action

Represents an erc20 token action

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

Validator reward

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

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

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

Example

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

Endpoints

Blocks

Get paginated list of blocks

Endpoint

GET /blocks

Endpoint-specific query parameters

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

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

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

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

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

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

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,
      "url": "/accounts/01c6af2fdbce2da279a26b595567b5679aa26083b67cfdb9c2a3812310702894dd/deploys?page=1&limit=10"
    }
  ]
}

Get paginated list of account extended deploys

Endpoint

GET /accounts/:public_key/extended-deploys

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

Endpoint-specific query parameters

Sorting

Fields:

  • block_hash

  • contract_package_hash

  • contract_hash

  • timestamp

Default sorting: timestamp DESC

Response

PaginatedResponse<ExtendedDeploys>

Example

GET /accounts/012bac1d0ff9240ff0b7b06d555815640497861619ca12583ddef434885416e69b/extended-deploys?fields=entry_point,contract_package
{
  "data": [
    {
      "deploy_hash": "6022c141856010f4c3514bc17e993f4f42b467ce112f0828205f6acda2d1b5b0",
      "block_hash": "9f482f15c0a93c3a04f87dcde34dec3f01859e2387535b3f06ca98a0ba42b8f6",
      "caller_public_key": "012bac1d0ff9240ff0b7b06d555815640497861619ca12583ddef434885416e69b",
      "execution_type_id": 6,
      "contract_hash": null,
      "contract_package_hash": null,
      "cost": "100000000",
      "payment_amount": "300000000",
      "error_message": null,
      "timestamp": "2022-08-02T07:54:34.000Z",
      "status": "executed",
      "args": {
        "id": {
          "parsed": 123456789012345,
          "cl_type": {
            "Option": "U64"
          }
        },
        "amount": {
          "parsed": "479700000000000",
          "cl_type": "U512"
        },
        "target": {
          "parsed": "9312048c7e71cfcda29af7ed2588220965c205031ec2161c890ea8cd718a7a91",
          "cl_type": {
            "ByteArray": 32
          }
        }
      },
      "amount": "479700000000000",
      "entry_point": null,
      "contract_package": null,
    },
    ...
  ],
  "pageCount": 8,
  "itemCount": 75,
  "pages": [
    {
      "number": 1,
      "url": "/accounts/012bac1d0ff9240ff0b7b06d555815640497861619ca12583ddef434885416e69b/extended-deploys?with_amounts_in_currency_id=1&page=1&limit=10&fields%5B0%5D=entry_point&fields%5B1%5D=contract_package"
    },
    {
      "number": 2,
      "url": "/accounts/012bac1d0ff9240ff0b7b06d555815640497861619ca12583ddef434885416e69b/extended-deploys?with_amounts_in_currency_id=1&page=2&limit=10&fields%5B0%5D=entry_point&fields%5B1%5D=contract_package"
    },
    {
      "number": 3,
      "url": "/accounts/012bac1d0ff9240ff0b7b06d555815640497861619ca12583ddef434885416e69b/extended-deploys?with_amounts_in_currency_id=1&page=3&limit=10&fields%5B0%5D=entry_point&fields%5B1%5D=contract_package"
    }
  ]
}

Get paginated list of transfers from account and to account

Endpoint

GET /accounts/:accountHash/transfers

Note, that an account hash should be used for form the URL. The reason for that is that on the chain transfers are tracked by account hashes.

Endpoint-specific query parameters

Sorting

Fields:

  • amount

  • timestamp

Default: timestamp DESC

Response

PaginatedResponse<Transfer>

Example

GET /accounts/1688d91a338b807ebfc1756568e6388b9c94abcfe1e7bc671adaf70d681b5fc0/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"
    },
    {
      "transferId": null,
      "deployHash": "4e861137173369b14c5b40692c7d405528880a1b350631e7d6a8dfece62ea363",
      "blockHash": "7a83be4831c9656a287479529f4df78659568da8831efb46abcbe2ab34475a26",
      "sourcePurse": "uref-b06a1ab0cfb52b5d4f9a08b68a5dbe78e999de0b0484c03e64f5c03897cf637b-007",
      "targetPurse": "uref-be8d8056f4c4a11b034ffa1f4a502beacba0d8ba6434f2c9bd43fb05205bfb96-004",
      "amount": "1000000000000",
      "fromAccount": "b383c7cc23d18bc1b42406a1b2d29fc8dba86425197b6f553d7fd61375b5e446",
      "toAccount": "1688d91a338b807ebfc1756568e6388b9c94abcfe1e7bc671adaf70d681b5fc0",
      "timestamp": "2021-06-22T10:54:12.000Z"
    }
  ],
  "pageCount": 1,
  "itemCount": 2,
  "pages": [
    {
      "number": 1,
      "url": "/accounts/1688d91a338b807ebfc1756568e6388b9c94abcfe1e7bc671adaf70d681b5fc0/transfers?page=1&limit=10"
    }
  ]
}

Transfers

Get paginated list of transfers

Endpoint

GET /transfers

Endpoint-specific query parameters

Sorting

Fields:

  • amount

  • timestamp

Default: timestamp DESC

Response

PaginatedResponse<Transfer>

Example

GET /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"
    },
    ...,
    {
      "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": 445,
  "itemCount": 4441,
  "pages": [
    {
      "number": 1,
      "url": "/transfers?page=1&limit=10"
    },
    {
      "number": 2,
      "url": "/transfers?page=2&limit=10"
    },
    {
      "number": 3,
      "url": "/transfers?page=3&limit=10"
    }
  ]
}

Contract Packages

Get paginated list of contract packages

Endpoint

GET /contract-packages

Endpoint-specific query parameters

Sorting

Fields:

  • owner_public_key

  • timestamp

Default sorting: timestamp DESC

Response

PaginatedResponse<ContractPackages>

Example

GET /contract-packages?page=1&limit=3
{
  "data": [
    {
      "contract_package_hash": "09fd8c6bf8b0f3d0e33a7bbc3eab4885915a98bd1d1af898a4f04e03f15d3aa7",
      "owner_public_key": "0202817047d701d1d006374e30e873d5d56051c92fb105c047cf97c457d55aa42a93",
      "contract_type_id": 4,
      "contract_name": "my_token",
      "contract_description": null,
      "metadata": {
        "symbol": "MY"
      },
      "timestamp": "2022-12-13T11:31:13.000Z"
    },
    {
      "contract_package_hash": "1bf2b50e368527a58cddfd47c51eec8f273696b3f494abb38fa33baf5adc9e8b",
      "owner_public_key": "015d4d230841ae93139f23124597468f4e9d7f7f68479f5394ccd0079814661504",
      "contract_type_id": null,
      "contract_name": null,
      "contract_description": null,
      "metadata": null,
      "timestamp": "2022-12-13T09:41:43.000Z"
    },
    {
      "contract_package_hash": "9be9a80ac12ad77d3293febd4832c2a8b848b61e886a26e0bda6ea83e7cfe61c",
      "owner_public_key": "01eb9b0e8e73de521f86f40666d985529ae316aff5ace6c4049a42364f442e0e76",
      "contract_type_id": null,
      "contract_name": null,
      "contract_description": null,
      "metadata": null,
      "timestamp": "2022-12-13T09:14:55.000Z"
    }
  ],
  "pageCount": 2192,
  "itemCount": 6574,
  "pages": [
    {
      "number": 1,
      "url": "/contract-packages?page=1&limit=3"
    },
    {
      "number": 2,
      "url": "/contract-packages?page=2&limit=3"
    },
    {
      "number": 3,
      "url": "/contract-packages?page=3&limit=3"
    }
  ]
}

Get contract packages by hash

Endpoint

GET /contract-packages/:contract_package_hash

Response

ContractPackage

Example

GET /contract-packages/09fd8c6bf8b0f3d0e33a7bbc3eab4885915a98bd1d1af898a4f04e03f15d3aa7
{
    "contract_package_hash": "09fd8c6bf8b0f3d0e33a7bbc3eab4885915a98bd1d1af898a4f04e03f15d3aa7",
    "owner_public_key": "0202817047d701d1d006374e30e873d5d56051c92fb105c047cf97c457d55aa42a93",
    "contract_type_id": 4,
    "contract_name": "my_token",
    "contract_description": null,
    "metadata": {
        "symbol": "MY"
    },
    "timestamp": "2022-12-13T11:31:13.000Z"