Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
REST API endpoints that potentially may return an unlimited number of items are paginated.
In addition to the endpoint-specific parameters, endpoints that return paginated responses accept the following pagination parameters to control the page and number of items per page correspondingly:
page
int
1
Page number
page_size
int
10
Number of items per page
The maximum number of items per page is 250
.
Paginated responses contain two additional properties providing information on the total number of items and the total number of pages:
item_count
int
Total number of items
page_count
int
Total number of pages
Get the second page of accounts with 25
items per page:
When making an API request to an endpoint that returns paginated data, you usually don't receive all of the results in a single response. To traverse the data, you need to increment the page number in your requests until you collect all the required items. When doing so, note the rate limits. Setting the number of items per page to its maximum value of 250
will minimize the chances of being rate-limited for most of the use cases.
Note that if new objects are added to the list of items being paginated, the contents of each page will change.
The CSPR.cloud API is exclusively available to registered users. To authorize your API requests, an access token is required. The access tokens identify the API user and their corresponding access tier limitations. Please visit the website to learn about the tiers and to submit an access token request. To learn more about rate limites and quotas please read the documentation page.
The access token should be included in the Authorization
header:
The access token provided in the example above is for the demonstration purposes only, and has limited capabilities.
To learn how to include the Authorization
header in Casper SDKs to access the CSPR.cloud Casper Node please read the page.
At this moment CPSR.cloud provides only the server side integration. By using your access token in a front-end application, you'll expose it to the world.
You can request the usage report by sending an email from your registered account to .
CSPR.cloud REST API is an HTTP-based API that dApps can use to programmatically query Casper network data. It has predictable resource-oriented endpoints and uses standard HTTP response codes, authentication, and verbs.
CSPR.cloud Streaming API is WebSocket-based and follows the WebSocket standard conventions.
The APIs can be accessed using the following base URLs
The API sends data in the JSON format. Successful REST API responses contain the data
property, which contains the response data:
The Streaming API messages additionally include the action
and timestamp
properties:
Requests that potentially may return an unlimited number of items are paginated. Endpoints that return paginated responses accept the page
and limit
query parameters to control the page and the number of items per page, correspondingly. Paginated responses contain two additional properties providing information on the total number of items and the total number of pages:
Error responses contain the error
property with optional code
, message
, and description
properties providing more information about the error that occurred:
At CSPR.cloud, we distinguish between rate limits and quotas to ensure efficient API management.
We impose a limit on the number of requests per minute. This measure helps manage load and avoid overloading our systems.
Quotas control the overall call rates over an extended period, often tied to subscription tiers.
Long-term Management: Quotas determine the total number of calls that can be made in a set period, like a month.
Tier-based Access: For example, a free tier might allow 10,000 calls per month, while a premium tier could permit up to 10,000,000 calls in the same timeframe.
Exceeding these limits triggers a 429 error, signaling a rate limit breach.
The free tier limits are set to ensure that you can test the API and integrate it into your application.
To effectively manage your API usage and comply with rate limit or quota, consider the following strategies:
Implement a Backoff-Retry Strategy: In cases where you encounter a 429 error (rate limit or quota exceeded), it's advisable to implement a backoff-retry strategy. This involves reducing the frequency of your API requests to stay within the allowed limits.
Monitor API Calls: Utilize logging tools to monitor your application’s API usage. This can help you identify patterns and optimize your request strategy to ensure efficient usage.
Lazy Loading Technique: To reduce unnecessary API calls, implement lazy loading in your application. Trigger API calls based on user interactions, such as clicking a button or reaching a specific section of a page, to minimize the number of requests.
Adhering to these strategies will help you efficiently manage your API usage within the CSPR.cloud environment.
CSPR.cloud is an enterprise-grade middleware platform aimed to super-charge developers and to be the primary way for dApps to interact with the Casper Network. It provides access to indexed and enriched blockchain data, real-time streaming subscriptions, and access to reliable and maintained Casper Node. The APIs include:
Indexed and normalized network data
Integrations with the existing fungible and non-fungible (NFT) token standards, such as , , and
Support of the existing smart contract-level event standards, such as , which is also natively supported by the
Relevant off-chain data, such as CSPR rates or
and more
CSPR.cloud was built with developer experience in mind and expands the Casper Node RPC API with more data points and querying possibilities, which are not available via the native node API. You can check for examples in the section.
To get familiar with CSPR.cloud, we recommend that you read these documents:
Learn about the general technical aspects of CSPR.cloud API, and how it works
Learn how to make your first API request and start your integration with the Casper Network
Learn about CSPR.cloud API possibilities, which aren't present in the Casper Node RPC API
Get familiar with the REST API reference to know what endpoints are available
Get familiar with the Streaming API reference to know what Web Socket subscriptions are available
Learn how to connect to the private Casper Node powered by CSPR.cloud using the most popular SDKs
REST and WebSocket API endpoints that return multiple results may provide possibility to filter the data by certain properties. Not all properties can be used as filters. Please check the endpoint documentation to find out what properties are available for filtering.
To filter the results by a property, the corresponding property should be provided as a query param. Multiply filters can be used in one request to narrow down the data to what fits your dApp use-case. Some filters can accept multiple values separated by a comma.
Filter NFT tokens by owner and contract package:
Most of the REST API endpoints allow optional data to be included in their responses. It could be related entities, derived properties, , or CSPR rates at the moment of the entity creation. Please check the endpoint documentation to find out what optional properties could be included in the responses.
Optional data can be included using the includes
query param that specifies a comma-separated list of all optional data that should be included. The includes
query param options can be one of three forms:
To include a scalar value its name should be specified the includes
list.
Similar to scalar values to include an object its name should be specified in the includes
list. However, for objects it's possible to specify a subset of fields that should be returned using the object querying syntax, which looks like this:
The request above will return only the name
and the branding.logo
properties of the account info object
When the included data requires extra parameters, it is included as a function. The function form provides a possibility to specify the needed input. For example, to include the USD to CSPR rate, the USD currency ID 1
should be passed as a parameter to the rate
function, like this:
The rate
property of the first result in the response above holds the CSPR rate from May 16th, 2023, and the second result has the rate
from November 11th, 2022.
This tutorial will help you make your first API call to receive a list of NFT tokens in the contract.
We will use cURL to make API calls. You can install it from the website or by using the package manager of your choice.
Please register on to create a CSPR.cloud access token.
To fetch the NFT tokens in the contract we'll be using the . The endpoint requires a contract package hash, which we can find on :
Replace "[Your-Access-Token]" with your actual access token in each example.
Please proceed with the following documents to get familiar with CSPR.cloud:
CSPR.cloud indexes and normalizes on-chain data to improve developers' experience when building on the Casper Network. Below are examples that demonstrate some of the possibilities CSPR.cloud offers. For the full list, please see the API reference pages.
Receive related entities in a single response to minimize the number of network requests needed to load the data
Include CSPR rates that were relevant at the moment of a transfer, contract call, or reward creation
Include account info information provided by the account owner in the responses that contain account identifiers
Query granular pieces of the auction data that interest you, like all account delegations or a list of the current era validators
Query fungible token data relevant to your dApp
Query NFT movements and ownership from CSPR.cloud while focusing on the core business value of your application
Check aggregated historical contract costs to provide your users with better pricing
Translate account hashes to the corresponding public key for accounts that were observed on the network
Translate account main purses to the account public keys to better trace the fund movements
Subscribe to contract-level events the contracts from your dApps emit to track and aggregate the off-chain state for a better user experience
CSPR.cloud REST API provides the possibility to include related entities in responses. An entity is called related if its identifier is present among the requested entity's properties. For example, the entity is related to the entity because the latter has a deploy_hash
property identifying the deploy that produced the action. Not all related entities can be included in responses; the ones that can are listed in the "Optional properties" section for the corresponding entity or endpoint page.
Related entities are included the same as other , using the includes
query param. For the related entity to be added to the response, its name has to be specified in the list of includes
.
Including related entities makes it possible to fetch the required data in one request, simplifying the integration and reducing latency, which is especially useful when processing paginated responses. Continuing the and example, one may need to know the deploy caller account when processing the NFT Action
data. By including the Deploy
object in the NFT Action
response, all the required information can be received in just one API call instead of requesting the deploy data for each NFT action in the list:
REST API endpoints that return may provide a possibility to sort the results by one of the result properties. Not all properties can be used for sorting. Please check the endpoint documentation to find out the sorting properties.
In addition to the endpoint-specific parameters, endpoints that return sorted results accept the following parameters to control the sorting property and the order:
The defaults are different for different endpoints and are provided in the corresponding endpoint documentation.
Get blocks sorted by height from lowest to highest:
The API is protected and requires access tokens to be provided with each request. The access tokens identify the API user and their corresponding access tier limits. Visit the page to learn more.
The API is rate-limited, with rate limits defined by the user access tier. The total number of requests to each of the APIs is limited by monthly and daily quotas. Visit the page to learn more.
Visit the page to learn more.
Some of the endpoints that return paginated responses provide a possibility to sort the results. Sorting is controlled by the order_by
and order_direction
query params. Visit the page to learn more.
Some of the endpoints that return paginated responses provide a possibility to filter the results by certain properties. Available filter properties vary for different endpoints and are specified in the corresponding endpoint documentation. Visit the page to learn more.
Some of the endpoints provide a possibility to include optional properties into the responses using the includes
query param. Visit the page to learn more.
Visit the page to learn more.
This documentation covers CSPR.cloud V2. Click for CSPR.cloud V1 documentation, which will be deprecated soon.
Upgrade to Premium Tier: If your needs exceed the free tier quota, consider upgrading to our Premium tier for higher limits. You can apply at .
If you have any questions or run into any issues while using the CSPR.cloud Web API, you can find help in the . Here you can connect and get help from other developers.
By using CSPR.cloud, you agree to our and acknowledge that you have read our .
The WriteTransfer
transforms that are used to track the native token transfers, contain the recipient account hash. It's possible, however, to include the corresponding public key if it is known to us. To learn more, visit the page.
An entity is called related if its identifier is present among the requested entity's properties. To include a related entity you need to specify its name in the includes
query param. In the example below, we include contract package and contract entry point objects in the deploy list data. To learn more, visit the page.
Entities that have the timestamp
property can optionally include the CSPR rate at that time in the requested currency, which is passed as an argument to the rate
function. In the example below, we include the USD to CSPR rate in the account transfers response. To learn more, visit the page.
Visit the for more information regarding Rate limiting errors.
Learn about the general technical aspects of CSPR.cloud API, and how it works
Learn about CSPR.cloud API possibilities, which aren't present in the Casper Node RPC API
Get familiar with the REST API reference to know what endpoints are available
Get familiar with the Streaming API reference to know what Web Socket subscriptions are available
Learn how to connect to the private Casper Node powered by CSPR.cloud using the most popular SDKs
While CSPR.cloud handles your dApp integration with the Casper Network, CSPR.click takes care of how users of your dApp interact with the blockchain. It provides integration with all the wallets and on-ramp providers in the Casper ecosystem to solve authentication and token-acquiring problems. Please be sure to check it out!
CSPR.cloud REST API
CSPR.cloud Streaming API
Casper Node RPC API
Casper Node SSE API
CSPR.cloud REST API
CSPR.cloud Streaming API
Casper Node RPC API
Casper Node SSE API
CSPR.Node Proxy
20,000
1,200
100
CSPR.Node Proxy SSE
5,000
200
10
CSPR.Cloud API
100,000
6,000
100
CSPR.Node Proxy
20,000
1,200
100
CSPR.Node Proxy SSE
5,000
200
10
CSPR.Cloud API
100,000
6,000
100
code
string
Error code constant represented as a string
message
string
Error message depending on the type of error and an API resource
invalid_input
InvalidParamError
400
Invalid client input parameters
unauthorized
UnauthorizedError
401
Client is not authorized
access_denied
AccessDeniedError
403
Entity
or resource access is forbidden
not_found
NotFoundError
404
Entity
not found
duplicate_entity
DuplicateEntityError
409
Entity
already exist
order_by
string
Sorting property the results should be sorted by
order_direction
string
Order direction: ASC or DESC
CPSR.cloud provides granular access to the auction data, which is more convenient than parsing the results of the state_get_auction_info
Casper RPC API method, through the following APIs:
For example, fetching account delegations can be done with the following API request:
Fungible tokens are one of the most used abstractions implemented on blockchains. CSPR.cloud allows dApp developers to focus on the core logic of their applications by tracking the token activity on the Casper Network for CEP-18 compatible tokens and providing APIs to query that data. CSPR.cloud provides a possibility to:
Below is an example, that demonstrated fetching list of tokens owned by an account. Note, that we are including optional data about the contract package using the includes
query parameter.
Often, when looking at the fiat value of a native token amount, we want it to be converted using the rate that was relevant at the moment when the corresponding action happened. CSPR.cloud REST API provides the possibility to do so when requesting data having the timestamp
property and when it's semantically acceptable To learn more, visit the CSPR rate page.
In the example below, we include the USD to CSPR rate in the account delegation rewards response by calling the rate
function with the USD currency ID as the argument in the includes
query param:
Non-fungible tokens, or NFTs, became one of the most popular use cases in the current blockchain world. CSPR.cloud keeps track of all NFT contracts compatible with the CEP-47 and CEP-78 NFT standards on the Casper Network. CSPR.cloud provides a possibility to:
and more
Moreover, CSPR.cloud not only tracks on-chain NFT data but also fetches the off-chain metadata for you, which can be particularly slow when the metadata is stored on IPFS. Below is an example that demonstrated fetching NFT tokens for the CasperPunks contracts, which is a CEP-78 smart NFT contract that stores the token metadata on IPFS:
Note the offchain_metadata
property, which contains the off-chain token metadata.
Accounts on Casper Mainnet and Testnet networks have the possibility to self-identify themselves in a decentralized with the Casper Account Info Standard smart contract. Many validators and contract owner accounts provide information about themselves to increase trust on the network.
CSPR.cloud REST API allows including account information to simplify the integration with the standard for dApps developers. Typically, account info standard data can be included in responses that contain account identifiers like account hashes or public keys.
In the example below, we'll include validator account info data in the account delegations API response. To demonstrate the possibility of filtering included object data, we'll request only the owner name and logo properties of the account info object.
While accounts are known to be recognized by their public keys, internally on-chain, they are uniquely identified by fixed-length accounts hashes derived from those public keys. Because of that, in certain contexts, we may know the account hash but not the public key. CSPR.cloud maintains the mapping between account hashes and the corresponding public keys to be able to "de-anonymize" the former when needed by requesting the public key as an optional property.
Let's have a look at the Transfer API, for example. The Transfer
object only provides the recipient account hash:
Let's "de-anonymize" the recipient of the transfer above by including the to_public_key
optional property:
Note the to_public_key
property that was added in the second response. It contains the public key that corresponds to the account hash specified in to_account_hash
. Please check Transfer Optional Properties to learn about all the optional data that can be included in the Transfer API responses.
Added ability to sort FTTokenOwnerships (token holders) by balance
Added new endpoint GET /daily-staking-rewards/{date}
Added tracking of primary CSPR.name names for the reverse resolution
Bugfixes
Added rates
optional field for FTTokenAction
resource
Bugfixes
Added new endpoint GET /network-stats
Bugfixes
Added CSPR.name API
Bugfixes
Bugfixes
Add ability to sort validators by is_identified_account_info
and total_stake
by default
Fix sorting and pagination for Accounts API
Fix total delegation rewards data tracking
Data tracking performance optimizations
Add deploy
optional field for Transfers API
Add the ability to filter nft-actions
and ft-actions
streams by deploy_hash
for Streaming API
Fix account_info
optional field including logic
Bug fixes
Fix GET /daily-deploy-numbers
endpoint
Fix GET /accounts/{account_identifier}/associated-to-accounts
returning empty associations
Fix ordering for Contracts API
Fix Bidders API
Fix filtering byt caller_public_key
for Deploys API
Fix validator_performance
optional field including logic
Fix GET /validators/{public_key}/rewards
endpoint
Bug fixes
Add POST /accounts
endpoint to request multiple accounts by account_hashes
Fix Accounts API
Fix GET /accounts/{account_identifier}/total-delegation-rewards
endpoint
Fix tracking balances for Accounts without tracked purse_uref
Add Centralized Account Info API
Add new endpoint GET /account/:public_key/total-delegation-rewards
to return total rewards from delegations for a specific account
Add contract_package
optional field to all resources that have contract_package_hash
field
Add from_purse_public_key
and to_purse_public_key
optional fields for Transfers API endpoints
Add the ability to filter deploys
stream by deploy_hash
for Streaming API
Fix Streaming API intermittent connection terminations
Fix Accounts API to return account balances properly
Add is_burned
filter for NFT tokens API
Fixes for NFT API
Fixes for FT API
Fixes for NFT API
Optimise Deploys and Blocks APIs
Added ability to sort data by block ranges
Bug fixes
Improved stability of Streaming API connections
First release. Welcome, CSPR.cloud! 🎉
This is a full list of the available CSPR.cloud REST API entities. Some of the entities are presented as root-level resources, and some represent related information of the root-level resources and are presented as their edges. The endpoints associated with each entity provide all the relevant data about that entity. Value objects that provide a mapping between identifiers and names aren't listed here and are documented with the corresponding endpoint documentation.
Entities may have relations to other entities. Such relations are exposed by the presence of one entity identifier in the other entity properties. Typically, it means that this identifier can be used as a in the API requests and that the related entity could be included in the responses as an .
Web3 comes with a new storage architecture dApps have to embrace. In traditional Web2 applications, users don't interact with the storage directly. It's typically hidden behind the API layer.
Blockchain is data storage that provides data we can trust, and that trust requires no middleman between the users and the changes in the data. In this setup, dApps have to observe the on-chain activity to display the relevant state to the end users. While this can be done by polling the network state using the or , CSPR.cloud is also prepared to assist dApps developers with observing the on-chain activity with its .
Note the extra
property that provides technical information, such as deploy_hash
, event_id
, and the deploy execution transform_id
, which can be used to link the event data to the corresponding deploy properly.
CSPR.cloud REST API provides the possibility to resolve CSPR.name names either directly by calling the or by including CSPR.name names as .
At the moment of writing this page (August 27th, 2024), the CSPR.name is not launched yet. That's why we added a test CSPR.name for the Faucet account to allow developers to implement and test their CSPR.name integration before the launch.
Direct CSPR.name to account hash resolution can be done using the and is recommended for the situations when you receive the name outside CSPR.cloud and want to resolve it to the corresponding account hash:
In situations, when you want to resolve account hashes to the corresponding CSPR.name names, in most of the cases it's possible to do by requesting CSPR.name as in the includes
query parameter:
The Account
entity represents the account observed in the network activity. For example, when the corresponding public key was passed as a deploy argument. Because of that, an Account
may not necessarily have a purse and on-chain balance.
The Account
entity has the following properties:
Example
Depending on the endpoint some of the following optional properties may be included in the Account
entity:
The Account
entity has the following relations with other entities:
The Account
entity has the following endpoints:
The Account
entity has the following relation endpoints:
Similarly to , CSPR.cloud can also "de-anonymize" account purses which can be used as the only transfer source or destination parameter. Let's have a look at transfers that happened in this for example.
The AccountInfo
entity represents a record of an account along with related metadata in the context of the . This entity is parsed from the and stores a denormalized representation of the data from this contract.
The AccountInfo
entity has the following properties:
Example
None
The AccountInfo
entity has the following relations with other entities:
The AccountInfo
entity has the following endpoints:
None
To demonstrate it in action, let's create an NFT contract using the Testnet version of and observe its activity on the network. Navigate to the page and create a new collection. To listen to the contract-level events emitted by our contract, we'll need to know its hash. Copy the hash of the deploy that created your NFT collection on the last step of the collection creation process and query the contract it deployed to the network using the :
Knowing the contract hash, we can subscribe to the contract-level events emitted by our newly created contract using the . For this example, you'll need to install the utility.
Now, let's go back to and mint an NFT. Once the mint deploy is executed on the network, our WebSocket connection will receive a message containing the Mint
event data, as well as the token data encoded as a JSON string:
If you want to find the primary CSPR.name for an account, you can include it in the :
The to_account_hash
was not specified in the transfer parameters. Let's "de-anonymize" it by including the to_purse_public_key
:
Note the to_purse_public_key
property that was added in the second response. It contains the public key that corresponds to the account having the to_purse
as its main purse. Please check to learn about all the optional data that can be included in the responses.
account_hash
Account can have account info data if provided by the owner to the Account Info contract
public_key
Account can be a bidder in the auction
owner_public_key
Account can deploy contracts to the network
caller_public_key
Account can call deploys on the network
proposer_public_key
Account can have delegations to validators
public_key
Account can receive delegator rewards
owner_hash
Account can own fungible tokens
from_hash
, to_hash
Account can be on the sending or receiving end of a fungible token action
owner_hash
Account can own NFTs
from_hash
, to_hash
Account can be on the sending or receiving end of a fungible token action
owner_hash
Account can own multiple NFTs in one NFT contract
initiator_account_hash
, to_account_hash
Account can initiate transfers and be a transfer recipient
public_key
Account can be a validator
total_bids_number,active_bids_number
Validators with active bids are bidders in the auction era
total_active_era_stake
Validators of the current and next era hold active era stake
account_hash
Account info is related to an account
deploy_hash
Contracts are deployed to the network with a deploy call.
auction_status
string
Account auction status: inactive_bidder
, active_bidder
, active_validator
, pending_validator
delegated_balance
uint64
Total funds delegated across all validators
staked_balance
uint64
Total funds staked as validator
undelegating_balance
uint64
Total undelegated funds that will be returned to the account main purse after the 7 era lockdown period
account_info
Account info provided by the account owner
centralized_account_info
Account information available for known accounts provided by CSPR.cloud team
cspr_name
string
Primary CSPR.name of the account
account_hash
Comma-separated list of account hashes
balance
Sort accounts by the main purse balance
total_balance
Sort accounts by the total account balance, including the delegated funds
auction_status
string
Account auction status: inactive_bidder
, active_bidder
, active_validator
, pending_validator
delegated_balance
uint64
Total funds delegated across all validators
staked_balance
uint64
Total funds staked as validator
undelegating_balance
uint64
Total undelegated funds that will be returned to the account main purse after the 7 era lockdown period
account_info
Account info provided by the account owner
centralized_account_info
Account information available for known accounts provided by CSPR.cloud team
cspr_name
string
Primary CSPR.name of the account
Account observed in the network activity, which may not necessarily have the on-chain balance
Account info data provided through the account information contract
Aggregated auction metrics for an era
Deploy that is awaiting for submission
Normalized representation of the Casper Network block
Bidder participating in the auction
Account information about known accounts provided by CSPR.cloud team
Normalized representation of the Casper Network contract
Normalized representation of the Casper Network contract entry point
Normalized representation of the Casper Network contract package
Normalized representation of the Casper Network deploy
Action performed on a fungible token
Account fungible token ownership
Non-fungible token (NFT)
Action performed on a non-fungible token (NFT)
Non-fungible token (NFT) ownership
Historical CSPR rate to fiat and popular cryptocurrencies
Network native token (CSPR) supply information
Normalized representation of the Casper Network transfer transform
Validator participating in an era
Historical validator performance based on the era rewards information
account_hash
[]string
Comma-separated list of account hashes
public_key
string(68)
Account public key represented as a hexadecimal string. Primary account identifier
account_hash
string(64)
32-byte hash of the public_key
represented as a hexadecimal string. Secondary account identifier
main_purse_uref
string(73)
Account main purse URef in the uref-dead...beef-007
format
balance
uint64
Account main purse balance in motes
auction_status
string
Account auction status: inactive_bidder
, active_bidder
, active_validator
, pending_validator
delegated_balance
uint64
Total funds delegated across all validators
staked_balance
uint64
Total funds staked as validator
undelegating_balance
uint64
Total undelegated funds that will be returned to the account main purse after the 7 era lockdown period
account_info
Account info provided by the account owner
centralized_account_info
Account information available for known accounts provided by CSPR.cloud team
cspr_name
string
Primary CSPR.name of the account
Property
Type
Description
current_era_id
uint32
Current era identifier
active_validator_number
uint32
Current number of active validators
total_bids_number
uint32
Total number of bidders
active_bids_number
uint32
Number of active bidders
total_active_era_stake
uint64
Total sum of all validator stakes from current and next era
account_hash
string(64)
Account hash represented as a hexadecimal string
url
string
The top level domain URL for an account information
is_active
boolean
Status describes whether account info active or not
info
JSON
JSON representation of account info data, related to Casper Account Info Standard
deploy_hash
string(64)
Hash of the deploy that deployed the Casper Account Info Contract to the network represented as a hexadecimal string
verified_account_hashes
[]string
List of verified account hashes represented as a hexadecimal string
created
datetime
Account info creation timestamp
updated
datetime
Account info last update timestamp
AwaitingDeploy
is a Casper deploy that is awaiting submission, and temporarily stored on CSPR.cloud before submission, in order to perform some additional modifications, such as collecting additional signatures. A perfect use case for this functionality is Multisig Deploys
This API is not available for the "Free" tier
The AwaitingDeploy
entity has the following properties:
deploy
casper.Deploy
Casper raw deploy
Example
None
None
The AwaitingDeploy
entity has the following endpoints:
None
Get awaiting deploy by its hash
None
None
None
The Block
entity provides a normalized representation of the Casper Network block. It doesn't contain the executed deploy hashes as the network block object. However, they could be queried separately using the Deploy API.
The Block
entity has the following properties:
block_height
uint64
Block height. Primary block identifier
block_hash
string(64)
Block hash represented as a hexadecimal string. Secondary block identifier
parent_block_hash
string(64)
Parent block hash represented as a hexadecimal string
state_root_hash
string(64)
Identifier of the network's state after executing the block's deploys represented as a hexadecimal string
era_id
uint32
Era ID in which the block was created
proposer_public_key
string(68)
Public key of the validator who proposed the block represented as a hexadecimal string
native_transfers_number
uint16
Number of native transfer deploys included in the block
contract_calls_number
uint16
Number of contract calls included in the block
is_switch_block
bool
true
if the block is the last one in the era
timestamp
datetime
The timestamp from when the block was proposed
Example
Depending on the endpoint some of the following optional properties may be included in the Block
entity:
proposer_account_info
proposer_centralized_account_info
Account information available for known accounts provided by CSPR.cloud team
proposer_cspr_name
string
Primary CSPR.name of the block proposer account
block_hash
Blocks can have deploys
proposer_public_key
Blocks are proposed by validators
The Block
entity has the following endpoints:
The Block
entity has the following relation endpoints:
Get block by its identifier (block height or block hash)
None
None
proposer_account_info
proposer_centralized_account_info
Account information available for known accounts provided by CSPR.cloud team
proposer_cspr_name
string
Primary CSPR.name of the block proposer account
Get paginated list of blocks
proposer_public_key
Proposer public key
block_height
Sort blocks by block height
timestamp
Sort blocks by timestamp
Default sorting is block_height DESC
proposer_account_info
proposer_centralized_account_info
Account information available for known accounts provided by CSPR.cloud team
proposer_cspr_name
string
Primary CSPR.name of the block proposer account
Get a paginated list of bidders
era_id
Active auction era identifier. Data for older eras aren't persistent for long, and will eventually become unavailable. This is a required parameter
is_active
Bidder active filter param
public_key
Comma-separated list of public key
rank
Sort bidders by rank
fee
Sort bidders by fee
delegators_number
Sort bidders by delegators number
total_stake
Sort bidders by total stake
self_stake
Sort bidders by self stake
network_share
Sort bidders by network share
Default sorting is total_stake DESC
account_info
average_performance
Moving average of validator performance based on the received rewards over the past 360 eras (approximately one month)
centralized_account_info
Account information available for known accounts provided by CSPR.cloud team
cspr_name
string
Primary CSPR.name of the account
Since this API works only with recent eras, you'll need to replace the era ID with the latest one, which you can fetch using the Get auction metrics API.
Get paginated list of blocks proposed by the validator
None
block_height
Sort blocks by block height
timestamp
Sort blocks by timestamp
Default sorting is block_height DESC
proposer_account_info
proposer_centralized_account_info
Account information available for known accounts provided by CSPR.cloud team
proposer_cspr_name
string
Primary CSPR.name of the block proposer account
Get bidder by public key
era_id
Active auction era identifier. Data for older eras aren't persistent for long, and will eventually become unavailable. This is a required parameter
None
account_info
average_performance
Moving average of validator performance based on the received rewards over the past 360 eras (approximately one month)
centralized_account_info
Account information available for known accounts provided by CSPR.cloud team
cspr_name
string
Primary CSPR.name of the account
Since this API works only with recent eras, you'll need to replace the era ID with the latest one, which you can fetch using the Get auction metrics API.
The Bidder
entity represents an account participating in the auction to become a Validator for the era after the next one. It has the same properties as the Validator entity, with the network share value being projected instead of actual.
The Bidder
entity has the following properties:
rank
uint8
Projected validator rank based on total bid amount
era_id
uint32
Auction era identifier
public_key
string(68)
Bidder account public key represented as a hexadecimal string
is_active
bool
Describes whether the bidder is active or not
fee
float32
Percentage of the rewards the bidder will retain for its services once becomes a validator
delegators_number
uint64
Number of delegators staked to the bidder
bid_amount
uint64
Amount of bidder bid stake
delegators_stake
uint64
Cumulative stake of all delegators
total_stake
uint64
Total bidder stake. The sum of the self-stake and the delegator stakes.
self_stake
uint64
self_share
float32
Percentage of the bidder's self-stake to its total stake
network_share
float32
Projected network stake share if the bidder becomes a validator
Example
Depending on the endpoint some of the following optional properties may be included in the Bidder
entity:
account_info
centralized_account_info
cspr_name
string
Primary CSPR.name of the account
average_performance
Moving average of validator performance based on the received rewards over the past 360 eras (approximately one month)
public_key
Auction bids are made by accounts
public_key
Bidders that were validators in the past have associated validator performance
The Bidder
entity has the following endpoints:
None
The Contract
entity offers a normalized representation of the Casper Network without including entry point hashes, which can be queried separately using the API. Additionally, this entity omits the contract's named keys but utilizes them for identifying the contract's type.
The Contract
entity has the following properties:
Example
Depending on the endpoint, the following optional properties may be included in the Contract
entity:
The Contract
entity has the following relations with other entities:
The Contract
entity has the following endpoints:
The Contract
entity has the following relation endpoints:
The CentralizedAccountInfo
entity provides account information collected by CSPR.cloud team for the well-known accounts in the Casper ecosystem.
The CentralizedAccountInfo
entity has the following properties:
Example
None
The CentralizedAccountInfo
entity has the following relations with other entities:
The CentralizedAccountInfo
entity has the following endpoints:
None
provided by the proposer account
provided by the block proposer
provided by the block proposer
provided by the bidder
provided by the block proposer
provided by the bidder
Bidder self-stake calculated as a sum of the bidder stake and the stakes of the affiliated accounts provided via the
Bidder provided by the account owner
contract_package
Contract package, this contract version is a part of
contract_hash, deploy_hash
Contracts are deployed to the network with a deploy call. Deploys can be the contract call
contract_hash
Contracts can have endpoints
contract_package_hash
Contracts are different versions of the same smart contract under the contract package
account_hash
Account info is related to an account
deploy_hash
Hash of the deploy that deployed the contract to the network
contract_package_hash
Contract Package hash.
from_block_height
From block height range
to_block_height
To block height range
timestamp
Sort contracts by timestamp
contract_package
Contract package, this contract version is a part of
account_hash
[]string
Comma-separated list of account hashes
account_hash
Comma-separated list of account hashes
contract_package
Contract package, this contract version is a part of
contract_hash
string(64)
Contract hash represented as a hexadecimal string. Unique contract identifier
contract_package_hash
string(64)
Hash of the contract package, this contract version is a part of, represented as a hexadecimal string
block_height
uint64
Height of the block in which the contract was deployed to the network
deploy_hash
string(64)
Hash of the deploy that deployed the contract to the network represented as a hexadecimal string
contract_type_id
uint8
Identifier representing the type of the contract, check the types list here
timestamp
uint16
Timestamp indicating when the contract was created
contract_version
uint16
Version number associated with the contract
is_disabled
bool
Indicates whether the contract is currently disabled
timestamp
datetime
Timestamp indicating when the contract was created
contract_version
uint16
Version number associated with the contract
is_disabled
bool
Indicates whether the contract is currently disabled
account_hash
string(64)
Account hash represented as a hexadecimal string
name
string
Account name
url
string
Website URL associated with the account
avatar_url
string
Account avatar URL
Get contract entry points by contract hash
None
None
None
PaginatedResponse
<ContractEntryPoint>
The ContractEntryPoint
entity offers a normalized representation of the Casper Network EntryPoint. Entry points are associated with the Contract entity and describe how to interact with it. In CSPR.Cloud, only the name of the entry point and its relations to the Contract and ContractPackage are stored.
The ContractEntryPoint
entity has the following properties:
contract_hash
string(64)
Contract hash represented as a hexadecimal string. Unique contract identifier
contract_package_hash
string(64)
Hash of the contract package, this contract version is a part of, represented as a hexadecimal string
name
string
Name of the entry point
Example
None
The ContractEntryPoint
entity has the following relations with other entities:
contract_hash
Entry point is associated with a contract
contract_package_hash
Entry point is associated with a contract, that is a version of the contract package.
The ContractEntryPoint
entity has the following endpoints:
Retrieve contracts associated with a specific contract package.
This endpoint allows you to retrieve contracts associated with a specific contract package. You can filter the results by deploy hash and choose to include optional fields such as contract package data. The example demonstrates a sample response with details for each contract, including contract hash, contract package hash, deploy hash, contract type ID, timestamp, contract version, and disabled status.
deploy_hash
Hash of the deploy that deployed the contract to the network
None
contract_package
Contract package, this contract version is a part of
timestamp
Sort contracts by timestamp
Default sorting is timestamp DESC
The ContractPackage
entity provides a normalized representation of the Casper Network Contract Package. It includes the contract package's metadata based on Contract's type and named keys values and the latest version of the contract type within the package.
The ContractPackage
entity has the following properties:
contract_package_hash
string(64)
Contract package hash represented as a hexadecimal string. Unique contract package identifier
owner_public_key
string(68)
Public key of the owner of the contract package. Represented as a hexadecimal string
name
string
Name of the contract package.
description
string
Description of the contract package.
metadata
ContractPackageMetadata
Metadata associated with the contract package. Details described in the next table.
latest_version_contract_type_id
uint8
timestamp
datetime
Timestamp indicating when the contract package was created.
icon_url
string
URL pointing to an icon representing the contract package.
Metadata Property:
name
string
Name associated with the contract package.
symbol
string
Contract package name pulled from the last version named keys. Contract package symbol pulled from the last version named keys. Applicable only for token contracts.
decimals
uint8
Contract package token decimals pulled from the last version named keys. Applicable only for token contracts.
balances_uref
string(72)
Contract package balances dictionary URef pulled from the last version named keys. Applicable only for token contracts.
total_supply_uref
string(72)
Contract package total supply URef pulled from the last version named keys. Applicable only for token contracts.
ownership_mode
uint8
nft_kind
uint8
nft_metadata_kind
uint8
whitelist_mode
uint8
holder_mode
uint8
minting_mode
uint8
burn_mode
uint8
identifier_mode
uint8
metadata_mutability
uint8
owner_reverse_lookup_mode
uint8
events_mode
uint8
Depending on the endpoint, the following optional property may be included in the ContractPackage
entity:
deploys_number
int
The ContractPackage
entity has the following relations with other entities:
contract_package_hash
Contracts packages are deployed to the network with a deploy call.
contract_package_hash
Contracts are different versions of the same smart contract included in the contract package
The ContractPackage
entity has the following endpoints:
The ContractPackage
entity has the following relation endpoints:
Get contract package NFT tokens (applicable only to NFT contract packages)
Get contract package NFT token actions (applicable only to NFT contract package)
Get contract package NFT token ownership (applicable only to NFT contract package)
Get contract package fungible token ownership (applicable only to fungible token contract package)
Get contract package fungible tokens (applicable only to fungible token contract package)
Get a contract package by its identifier (contract package hash).
This endpoint allows you to retrieve detailed information about a specific contract package using its unique identifier, the contract package hash. The response includes various properties such as owner public key, name, description, metadata, latest version contract type ID, timestamp, icon URL, and deploys number.
None
None
account_info
ContractPackage owner account info
centralized_account_info
ContractPackage centralized account info
cspr_name
string
Owner's primary CSPR.name
The Delegation
entity represents a record of a delegation transaction in the context of Casper Network Staking vs. Delegating process
The Delegation
entity has the following properties:
public_key
string(68)
Public key of the delegator represented as a hexadecimal string
validator_public_key
string(68)
Public key of the validator represented as a hexadecimal string
stake
string
Delegation amount in motes. The type is string to avoid overflow in languages that don't support uint64, which is the correct type.
bonding_purse
string(72)
URef of the purse from which the delegation was made in the uref-dead...beef-007
format
Example
Depending on the endpoint some of the following optional properties may be included in the Delegation
entity:
account_info
validator_account_info
cspr_name
string
Primary CSPR.name of the account
The Delegation
entity has the following relations with other entities:
public_key
Delegations are made by accounts
validator_public_key
Validators can be delegated to
The Delegation
entity has the following endpoints:
None
Get a paginated list of account contract packages.
This endpoint allows you to retrieve a paginated list of account contract packages. You can filter the results by owner public key, specify the page number and size, and choose the sorting order and field. Additionally, you can include optional deploys number data in the response. The example shows a sample response with relevant details for each contract package, including contract package hash, owner public key, name, description, metadata, latest version contract type ID, timestamp, icon URL, and deploys number.
None
timestamp
Sort contract packages by timestamp.
Default sorting is timestamp DESC
deploys_number
int
account_info
ContractPackage owner account info
centralized_account_info
ContractPackage centralized account info
cspr_name
string
Owner's primary CSPR.name
PaginatedResponse
<ContractPackage>
Get paginated list of delegations made by an account.
None
stake
Sort by stake amount
Default sorting is stake DESC
account_info
validator_account_info
centralized_account_info
Account information available for known accounts provided by CSPR.cloud team
cspr_name
string
Primary CSPR.name of the account
Get paginated list of delegations made to a validator.
None
stake
Sort by stake amount
Default sorting is stake DESC
account_info
validator_account_info
centralized_account_info
Account information available for known accounts provided by CSPR.cloud team
cspr_name
string
Primary CSPR.name of the account
Get a paginated list of contract packages.
This endpoint allows you to retrieve a paginated list of contract packages. You can filter the results by owner public key, specify the page number and size, and choose the sorting order and field. Additionally, you can include optional deploys number data in the response. The example shows a sample response with relevant details for each contract package, including contract package hash, owner public key, name, description, metadata, latest version contract type ID, timestamp, icon URL, and deploys number.
owner_public_key
Owner public key filter.
timestamp
Sort contract packages by timestamp.
Default sorting is timestamp DESC
deploys_number
int
account_info
ContractPackage owner account info
centralized_account_info
ContractPackage centralized account info
cspr_name
string
Owner's primary CSPR.name
PaginatedResponse
<ContractPackage>
The DelegatorReward
entity offers a normalized representation of the Casper Network related to the delegator account.
The DelegatorReward
entity contains the following properties:
Example
Depending on the endpoint, the following optional properties may be included in the DelegatorReward
entity:
The DelegatorReward
entity has the following relations with other entities:
The DelegatorReward
entity has the following endpoints:
The Deploy
entity provides a normalized representation of the Casper Network deploy. It is enriched with normalized contract data to make it possible to filter deploys by the contract regardless of the execution type.
The Deploy
entity has the following properties:
Example
Depending on the endpoint some of the following optional properties may be included in the Deploy
entity:
The Deploy
entity has the following relations with other entities:
The Deploy
entity has the following endpoints:
identifier of the latest contract version
CEP-78 contract . Applicable only for CEP-78 contracts.
CEP-78 contract . Applicable only for CEP-78 contracts.
CEP-78 contract . Applicable only for CEP-78 contracts.
CEP-78 contract . Applicable only for CEP-78 contracts.
CEP-78 contract . Applicable only for CEP-78 contracts.
CEP-78 contract . Applicable only for CEP-78 contracts.
CEP-78 contract . Applicable only for CEP-78 contracts.
CEP-78 contract . Applicable only for CEP-78 contracts.
CEP-78 contract . Applicable only for CEP-78 contracts.
CEP-78 contract . Applicable only for CEP-78 contracts.
CEP-78 contract . Applicable only for CEP-78 contracts.
Number of deploys in the specified number of the past days. It's a that accepts the number of days as an argument.
provided by the delegator
provided by the validator
Number of deploys in the specified number of the past days. It's a that accepts the number of days as an argument.
provided by the delegator
provided by the validator
provided by the delegator
provided by the validator
Number of deploys in the specified number of the past days. It's a that accepts the number of days as an argument.
rate
float32
The rate that was relevant at the moment when the last block was proposed. To get more details see Including CSPR rates .
account_info
Account info provided by the account owner
centralized_account_info
Account information available for known accounts provided by CSPR.cloud team
cspr_name
string
Primary CSPR.name of the account
public_key
Accounts receive rewards for delegating to validators.
validator_public_key
Delegation rewards are associated with the validator, that distributed the rewards
account_info
Account info provided by the deploy caller account
centralized_account_info
Account information available for known accounts provided by CSPR.cloud team
caller_cspr_name
string
Primary CSPR.name of the deploy caller account
contract_package
ContractPackage
called by deploy.
contract
Contract
called by deploy.
contract_entrypoint
ContractEntrypoint
called by deploy.
rate
float32
CSPR rate for specified currency that was relevant at the moment of deploy creation.
caller_public_key
Deploys are called by accounts.
block_hash
Deploys are executed in blocks.
contract_hash
Deploys can call contracts, and contracts are deployed with deploys.
entry_point
Deploys can call entry points.
contract_package_hash
Deploys can call contracts in contract packages.
execution_type_id
Deploys call contracts via different execution types.
deploy_hash
Fungible token actions are result of deploy execution.
NFTs are created as result of deploy execution. There is no direct mapping, but rather a semantic relationship between deploys and nft tokens.
deploy_hash
NFT actions are result of deploy execution.
deploy_hash
Transfers are result of deploy execution.
account_info
Account info provided by the deploy caller
centralized_account_info
Account information available for known accounts provided by CSPR.cloud team
caller_cspr_name
string
Primary CSPR.name of the deploy caller account
contract_package
ContractPackage
ContractPackage
entity.
contract
Contract
Contract
entity.
contract_entrypoint
ContractEntrypoint
ContractEntrypoint
entity.
rate
float32
CSPR rate for specified currency that was relevant at the moment of deploy creation.
transfers
[]Transfer
List of Transfer
entities.
nft_token_actions
List of NFTTokenAction
entities.
ft_token_actions
List of Fungible token action
entities.
validator_public_key
The public key of the validator to whom the stakes were delegated.
era_id
Sort validator rewards by era identifier
rate
float32
The rate that was relevant at the moment when the last block was proposed. To get more details see Including CSPR rates .
account_info
Account info provided by the account owner
centralized_account_info
Account information available for known accounts provided by CSPR.cloud team
cspr_name
string
Primary CSPR.name of the account
public_key
string(64)
The public key of the delegator account represented as a hexadecimal string. Primary account identifier
validator_public_key
string(64)
Public key of the validator represented as a hexadecimal string. Unique validator identifier
era_id
uint32
Era identifier
amount
uint64
Amount of the reward received by the delegator.
timestamp
datetime
Timestamp indicating when the last block was proposed.
deploy_hash
string(64)
Deploy hash represented as a hexadecimal string. Primary deploy identifier.
block_hash
string(64)
Hash of the block containing the deploy represented as a hexadecimal string.
block_height
uint64
Height of the block containing the deploy.
caller_public_key
string(68)
Public key of the deploy caller account represented as a hexademical string.
execution_type_id
uint8
DeployExecutionType
unique identifier.
contract_package_hash
string(64)
Hash of the contract package called by the deploy represented as a hexadecimal string. null
if the deploy had no contract call.
contract_hash
string(64)
Hash of the contract called by the deploy represented as a hexadecimal string. null
if the deploy had no contract call.
entry_point_id
uint32
Identifier of the ContractEntrypoint
called by deploy. null
if the deploy had no contract call.
args
JSON
Deploy sessions arguments provided for contract execution.
payment_amount
string
Payment amount provided by the caller in motes. The type is string to avoid overflow in languages that don't support uint64
, which is the correct type. null
if a custom payment contract was provided to the deploy instead of the value in motes.
cost
string
Deploy execution cost. The type is string
to avoid overflow in languages that don't support uint64
, which is the correct type.
error_message
string(128)
Error message in case of a failed deploy. null
for successful. deploys.
status
string
Deploy status (pending
, expired
, or processed
).
timestamp
string
Deploy creation timestamp in the ISO 8601 format.
Get deploys by block identifier (hash or height).
caller_public_key
Deploy caller public key
contract_package_hash
Contract package hash of the called contract
contract_hash
Called contract hash
contract_entrypoint_id
Called entry point ID
timestamp
Sort deploys by timestamp
Default sorting is timestamp DESC
account_info
centralized_account_info
Account information available for known accounts provided by CSPR.cloud team
caller_cspr_name
string
Primary CSPR.name of the deploy caller account
contract_package
contract
contract_entrypoint
rate
float32
CSPR rate for specified currency that was relevant at the moment of deploy creation.
transfers
List of Transfer
entities.
nft_token_actions
List of NFTTokenAction
entities.
ft_token_actions
List of Fungible token action
entities.
Get fungible token actions
contract_package_hash
Filter token actions by contract package hash
account_hash
Filter token actions by account hash
from_block_height
From block height range
to_block_height
To block height range
timestamp
Sort fungible token actions by timestamp
Default sorting is timestamp DESC
contract_package
Fungible contract package
deploy
Deploy in which the token action occurred
from_public_key
string(68)
Action source public key if it's an account
to_public_key
string(68)
Action target public key if it's an account
to_account_info
Action source account info if it's an account
to_centralized_account_info
Action target centralized account info if it's an account
from_account_info
Action target account info if it's an account
from_centralized_account_info
Action target centralized account info if it's an account
rate
float32
CSPR rate for specified currency that was relevant at the moment of deploy creation.
from_cspr_name
string
Primary CSPR.name of the source account, if it is an account
to_cspr_name
string
Primary CSPR.name of the destination account, if it is an account
PaginatedResponse
<FTTokenAction>
Get deploys by the caller account public key.
contract_package_hash
Contract package hash of the called contract
contract_hash
Called contract hash
contract_entrypoint_id
Called entry point ID
from_block_height
From block height range
to_block_height
To block height range
timestamp
Sort deploys by timestamp
Default sorting is timestamp DESC
account_info
centralized_account_info
Account information available for known accounts provided by CSPR.cloud team
caller_cspr_name
string
Primary CSPR.name of the deploy caller account
contract_package
contract
contract_entrypoint
rate
float32
CSPR rate for specified currency that was relevant at the moment of deploy creation.
transfers
List of Transfer
entities.
nft_token_actions
List of NFTTokenAction
entities.
ft_token_actions
List of Fungible token action
entities.
Get a paginated list of deploys.
caller_public_key
Deploy caller public key
block_hash
Hash of the deploy block
contract_package_hash
Contract package hash of the called contract
contract_hash
Called contract hash
contract_entrypoint_id
Called entry point ID
from_block_height
From block height range
to_block_height
To block height range
timestamp
Sort deploys by timestamp
Default sorting is timestamp DESC
account_info
centralized_account_info
Account information available for known accounts provided by CSPR.cloud team
caller_cspr_name
string
Primary CSPR.name of the deploy caller account
contract_package
ContractPackage
entity.
contract
Contract
entity.
contract_entrypoint
ContractEntrypoint
entity.
rate
float32
CSPR rate for specified currency that was relevant at the moment of deploy creation.
transfers
List of Transfer
entities.
nft_token_actions
List of NFTTokenAction
entities.
ft_token_actions
List of Fungible token action
entities.
The FTTokenAction
entity describes standard actions that can be performed on fungible tokens, such as mint, transfer, or burn. CSPR.cloud supports fungible tokens compatible with the CEP-18 Casper Network standard.
The FTTokenAction
entity has the following properties:
deploy_hash
string(64)
Deploy hash in which the token action occurred. First part of token action identifier, represented as a hexadecimal string
block_height
uint64
Height of the block in which the token action occurred.
transform_idx
int
ID of the transform in the deploy execution result containing performed token action in deploy execution. Second part of token action identifier
contract_package_hash
string(64)
Contract package hash of fungible token contract, represented as a hexadecimal string
from_hash
string(64)
Action source account or contract hash, represented as a hexadecimal string
from_type
uint8
Action source hash type: 0
for account, 1
for contract
to_hash
string(64)
Action target account or contract hash, represented as a hexadecimal string
to_type
uint8
Action target hash type: 0
for account, 1
for contract
ft_action_type_id
uint8
amount
string
Tokens amount value used during the token action
timestamp
uint16
The timestamp of performed token action
Example
Depending on the endpoint some of the following optional properties may be included in the FTTokenAction
entity:
contract_package
Fungible contract package
deploy
Deploy in which the token action occurred
from_public_key
string(68)
Action source public key if it's an account
to_public_key
string(68)
Action target public key if it's an account
to_account_info
Action source account info if it's an account
from_account_info
Action target account info if it's an account
to_centralized_account_info
Action target centralized account info if it's an account
from_centralized_account_info
Action target centralized account info if it's an account
from_cspr_name
string
Primary CSPR.name of the source account, if it is an account
to_cspr_name
string
Primary CSPR.name of the destination account, if it is an account
contract_package_hash
Fungible tokens actions belong to a contract package
from_hash, to_hash
Fungible token actions could have accounts as the action source and target
The FTTokenAction
entity has the following endpoints:
The FTTokenAction
entity has the following relation endpoints:
Get accounts fungible token ownership by identifier (public key or account hash)
None
balance
Sort ownerships by balance
contract_package
Fungible contract package
account_info
Owner account info
centralized_account_info
Owner centralized account info
cspr_name
string
Owner account CSPR.name
PaginatedResponse
<FTOwnership>
Get contract package fungible token ownership
None
balance
Sort ownerships by balance
contract_package
Fungible contract package
account_info
Owner account info
centralized_account_info
Owner centralized account info
cspr_name
string
Owner account CSPR.name
PaginatedResponse
<FTOwnership>
Get contract package fungible token actions by contract package hash
from_block_height
From block height range
to_block_height
To block height range
deploy_hash
Comma-separated list of deploy hashes
timestamp
Sort fungible token actions by timestamp
Default sorting is timestamp DESC
contract_package
Fungible contract package
deploy
Deploy in which the token action occurred
from_public_key
string(68)
Action source public key if it's an account
to_public_key
string(68)
Action target public key if it's an account
to_account_info
Action source account info if it's an account
from_account_info
Action target account info if it's an account
to_centralized_account_info
Action target centralized account info if it's an account
from_centralized_account_info
Action target centralized account info if it's an account
rate
float32
CSPR rate for specified currency that was relevant at the moment of deploy creation.
from_cspr_name
string
Primary CSPR.name of the source account, if it is an account
to_cspr_name
string
Primary CSPR.name of the destination account, if it is an account
PaginatedResponse
<FTTokenAction>
The FTOwnership
entity represents a fungible token ownership relation between accounts and contract packages, as well as provides the corresponding token balances
The FTOwnership
entity has the following properties:
owner_hash
string(64)
Owner hash represented as a hexadecimal string. First part of token ownership identifier
contract_package_hash
string(64)
Fungible contract package hash represented as a hexadecimal string. Second part of token ownership identifier
owner_type
uint8
Owber hash type: 0
for account, 1
for contract
balance
string
Fungible tokens balance in the network
Example
Depending on the endpoint some of the following optional properties may be included in the FTOwnership
entity:
contract_package
Fungible contract package
owner_public_key
string(68)
Owner public key if it's an account
account_info
Owner account info
centralized_account_info
Owner centralized account info
cspr_name
string
Owner account CSPR.name
contract_package_hash
Fungible token ownership represents fungible contract package token owners
owner_hash
Account can be a token owner
The FTOwnership
entity has the following endpoints:
None
Get account fungible token actions by identifier (public key or account hash)
from_block_height
From block height range
to_block_height
To block height range
deploy_hash
Comma-separated list of deploy hashes
timestamp
Sort fungible token actions by timestamp
Default sorting is timestamp DESC
contract_package
Fungible contract package
deploy
Deploy in which the token action occurred
from_public_key
string(68)
Action source public key if it's an account
to_public_key
string(68)
Action target public key if it's an account
to_account_info
Action source account info if it's an account
to_centralized_account_info
Action target centralized account info if it's an account
from_account_info
Action target account info if it's an account
from_centralized_account_info
Action target centralized account info if it's an account
rate
float32
CSPR rate for specified currency that was relevant at the moment of deploy creation.
from_cspr_name
string
Primary CSPR.name of the action source account, if it is an account
to_cspr_name
string
Primary CSPR.name of the destination account, if it is an account
PaginatedResponse
<FTTokenAction>
The NFTToken
entity provides representation of an NFT on Casper Network. CSPR.cloud supports NFTs compatible with the and Casper Network standards.
The NFTToken
entity has the following properties:
Example
Depending on the endpoint some of the following optional properties may be included in the NFTToken
entity:
The NFTToken
entity has the following endpoints:
The NFTToken
entity has the following relation endpoints:
provided by the deploy caller
called by deploy.
called by deploy.
called by deploy.
[]
[]
[]
provided by the deploy caller
called by deploy.
called by deploy.
called by deploy.
[]
[]
[]
provided by the deploy caller
[]
[]
[]
type identifier
contract_package
NFT contract package
owner_public_key
string(68)
Owner public key if it's an account
owner_cspr_name
string
Primary CSPR.name of the owner account
contract_package_hash
NFT tokens belong to a contract package
from_hash, to_hash
NFT token could have accounts as the token owner
tracking_id
NFT token actions are mapped by contract package hash and token id
from_block_height
From block height range
to_block_height
To block height range
is_burned
Filters tokens by their is_burned status: false
to get active NFTs, true
to get the burned ones. By default all tokens are returned.
token_id
Sort tokens by token_id
timestamp
Sort tokens by timestamp
contract_package
NFT contract package
owner_public_key
string(68)
Owner public key if it's an account
owner_cspr_name
string
Primary CSPR.name of the owner account
contract_package
NFT contract package
owner_public_key
string(68)
Owner public key if it's an account
owner_cspr_name
string
Primary CSPR.name of the owner account
from_block_height
From block height range
to_block_height
To block height range
is_burned
Filters tokens by their is_burned status: false
to get active NFTs, true
to get the burned ones. By default all tokens are returned.
token_id
Sort tokens by token_id
timestamp
Sort tokens by timestamp
owner_public_key
string(68)
Owner public key if it's an account
owner_cspr_name
string
Primary CSPR.name of the owner account
contract_package_hash
string(64)
NFT contract package hash represented as a hexadecimal string. First of of token identifier
block_height
uint64
Height of the block in which the token was minted.
token_id
string
Token ID under the contract. Second part of token identifier
token_standard_id
uint8
NFT standard identifier
owner_hash
string(64)
NFT token owner account or contract hash, represented as a hexadecimal string
owner_type
uint8
NFT owner type. 0
for account, 1
for contract
onchain_metadata
JSON
On-chain NFT metadata
offchain_metadata
JSON
Off-chain NFT metadata
offchain_metadata_status
uint8
NFT token offchain metadata status identifier
is_burned
bool
true
if the token was burn
tracking_id
uint32
Unique ID describes relation with corresponded NFTTokenAction
.
timestamp
uint16
The timestamp of token creation
Get NFT action types
None
None
None
List of value objects describing the available NFT action types
Get CSPR.name resolution by name
None
None
None |
Get the current CSPR rate by currency identifier.
None
None
None
Get contract package NFT actions by its hash
from_block_height
From block height range
to_block_height
To block height range
deploy_hash
Comma-separated list of deploy hashes
timestamp
Sort NFT actions by timestamp
Default sorting is timestamp DESC
contract_package
NFT contract package
deploy
Deploy in which the token action occurred
from_public_key
string(68)
Action source public key if it's an account
to_public_key
string(68)
Action target public key if it's an account
to_account_info
Action source account info if it's an account
to_centralized_account_info
Action target centralized account info if it's an account
from_account_info
Action target account info if it's an account
from_centralized_account_info
Action target centralized account info if it's an account
from_cspr_name
string
Primary CSPR.name of the source account, if it is an account
to_cspr_name
string
Primary CSPR.name of the destination account, if it is an account
PaginatedResponse
<NFTTokenAction>
Get token NFT actions by contract package hash and token ID
None
timestamp
Sort NFT actions by timestamp
contract_package
NFT contract package
deploy
Deploy in which the token action occurred
from_public_key
string(68)
Action source public key if it's an account
to_public_key
string(68)
Action target public key if it's an account
to_account_info
Action source account info if it's an account
to_centralized_account_info
Action target centralized account info if it's an account
from_account_info
Action target account info if it's an account
from_centralized_account_info
Action target centralized account info if it's an account
from_cspr_name
string
Primary CSPR.name of the source account, if it is an account
to_cspr_name
string
Primary CSPR.name of the destination account, if it is an account
PaginatedResponse
<NFTTokenAction>
Get account NFT actions by its identifier (public key or account hash)
from_block_height
From block height range
to_block_height
To block height range
deploy_hash
Comma-separated list of deploy hashes
timestamp
Sort NFT actions by timestamp
Default sorting is timestamp DESC
contract_package
NFT contract package
deploy
Deploy in which the token action occurred
from_public_key
string(68)
Action source public key if it's an account
to_public_key
string(68)
Action target public key if it's an account
to_account_info
Action source account info if it's an account
to_centralized_account_info
Action target centralized account info if it's an account
from_account_info
Action target account info if it's an account
from_centralized_account_info
Action target centralized account info if it's an account
from_cspr_name
string
Primary CSPR.name of the source account, if it is an account
to_cspr_name
string
Primary CSPR.name of the destination account, if it is an account
PaginatedResponse
<NFTTokenAction>
The NFTTokenOwnership
entity represents a NFT ownership relation between accounts and contract packages, as well as provides the total tokens number.
The NFTTokenOwnership
entity has the following properties:
owner_hash
string(64)
Owner hash represented as a hexadecimal string
contract_package_hash
string(64)
NFT contract package hash represented as a hexadecimal string
owner_type
uint8
NFT token owner type: 0
for account, 1
for contract
tokens_number
uint32
Number of NFTs owned by the owner account
Example
Depending on the endpoint some of the following optional properties may be included in the NFTTokenOwnership
entity:
contract_package
NFT contract package
owner_public_key
string(68)
Owner public key if it's an account
account_info
Owner account info
centralized_account_info
Owner centralized account info
cspr_name
string
Owner account CSPR.name
contract_package_hash
NFT token ownership represents NFT contract package token owners
owner_hash
Account can be a token owner
The NFTTokenOwnership
entity has the following endpoints:
None
The NFTTokenAction
entity describes standard actions that can be performed on NFTs, such as mint, transfer, burn etc. CSPR.cloud supports NFTs compatible with the CEP-47 and CEP-78 Casper Network standards.
The NFTTokenAction
entity has the following properties:
deploy_hash
string(64)
Deploy hash in which the token action occurred. First part of token action identifier, represented as a hexadecimal string
block_height
uint64
Height of the block in which the token action occurred.
token_tracking_id
string
contract_package_hash
string(64)
Contract package hash of the NFT contract, represented as a hexadecimal string
from_hash
string(64)
Action source account or contract hash, represented as a hexadecimal string
from_type
uint8
Action source hash type: 0
for account, 1
for contract
to_hash
string(64)
Action target account or contract hash, represented as a hexadecimal string
to_type
uint8
Action target hash type: 0
for account, 1
for contract
nft_action_id
uint8
token_id
string
Token ID presented on the network
timestamp
uint16
The timestamp of performed token action
Example
Depending on the endpoint some of the following optional properties may be included in the NFTTokenAction
entity:
contract_package
NFT contract package
deploy
Deploy in which the token action occurred
from_public_key
string(68)
Action source public key if it's an account
to_public_key
string(68)
Action target public key if it's an account
to_account_info
Action source account info if it's an account
to_centralized_account_info
Action target centralized account info if it's an account
from_account_info
Action target account info if it's an account
from_centralized_account_info
Action target centralized account info if it's an account
from_cspr_name
string
Primary CSPR.name of the source account, if it is an account
to_cspr_name
string
Primary CSPR.name of the destination account, if it is an account
contract_package_hash
NFT actions belong to a contract package
from_hash, to_hash
NFT actions could have accounts as the action source and target
tracking_id
NFT actions are performed under non-fungible tokens
The NFTTokenAction
entity has the following endpoints:
The NFTTokenAction
entity has the following relation endpoints:
Get account NFT ownerships
contract_package_hash
Contract package hash
tokens_number
Sort NFT token ownership by tokens number
Default sorting is tokens_number DESC
contract_package
Fungible contract package
owner_public_key
string(68)
Owner public key if it's an account
account_info
Owner account info
centralized_account_info
Owner centralized account info
cspr_name
string
Owner account CSPR.name
PaginatedResponse
<NFTTokenOwnership>
The CSPRNameResolution
entity holds information about mapping between account hashes and CSPR.name names.
The CSPRNameResolution
entity has the following properties:
name_token_id
string
ID of the name token (NFT)
name
string
Name (e.g. cloud.cspr
)
resolved_hash
string(64)
Account hash represented as a hexadecimal string
is_primary
boolean
Flag that indicates if CSPR.name is primary for a specific account (only single primary name of an account).
expires_at
string
Example
Depending on the endpoint, the following optional properties may be included in the CSPRNameResolution
entity:
resolved_public_key
string(68)
Public key of the resolved account
account
Account
of the resolved account hash
account_info
Account info of the resolved account
centralized_account_info
Centralized Account info of the resolved account
name_token
NFT token that represents the ownership of the CSPR.name
The CSPRNameResolution
entity has the following relations with other entities:
resolved_hash
Names are resolved to accounts
name_token_id
Name ownership is granted by the corresponding CSPR.name NFT
The CSPRNameResolution
entity has the following endpoints:
CSPR.cloud maintains historical CSPR rates provided by CoinGecko for more than 40 different fiat and crypto currencies.
The Rate
entity has the following properties:
currency_id
uint8
amount
float32
Rate amount
created
string
Example
None
The Rate
entity has the following relations with other entities:
currency_id
Rates are related to the specific currency
timestamp
Rates can be included into the Deploy
entity
timestamp
Rates can be included into the Transfer
entity
timestamp
Rates can be included into the ValidatorReward
entity
timestamp
Rates can be included into the DelegatorReward
entity
The Rate
entity has the following endpoints:
Get contract package NFT ownerships
owner_hash
Owner hash
tokens_number
Sort NFT token ownership by tokens number
Default sorting is tokens_number DESC
contract_package
Fungible contract package
owner_public_key
string(68)
Owner public key if it's an account
account_info
Owner account info
centralized_account_info
Owner centralized account info
cspr_name
string
Owner account CSPR.name
PaginatedResponse
<NFTTokenOwnership>
ID describes relation with corresponded . Second part of token action identifier
type identifier
Resolution expiration timestamp in the format
identifier
Rate timestamp in the format
from
Start of the range in the ISO 8601 format
to
End of the range in the ISO 8601 format
tracked_at
Sort rates by timestamp