LogoLogo
CSPR.build Portal
1.1.x
1.1.x
  • Documentation
    • Introduction
    • Overview
      • Authorization
      • Rate limits and quotas
      • Pagination
      • Sorting
      • Filtering
      • Optional properties
      • Errors
    • Getting started
    • Highlights
      • Including related entities
      • Including CSPR rates
      • Including account info
      • Accessing auction data
      • Accessing token data
      • Accessing NFT data
      • De-anonymizing account hashes
      • De-anonymizing account purses
      • Receiving contract-level events
    • Changelog
  • REST API
    • Reference
    • Account
      • Get account
      • Get accounts
    • Account Info
      • Get account info
      • Get account infos
    • Auction metrics
      • Get auction metrics
    • Awaiting deploy
      • Create Awaiting Deploy
      • Add Awaiting Deploy signatures
      • Get Awaiting Deploy
    • Block
      • Get block
      • Get blocks
      • Get validator blocks
    • Bidder
      • Get bidder
      • Get bidders
    • Contract
      • Get contract
      • Get contracts
      • Get contracts by contract package
      • Get contract types
    • Contract entry point
      • Get contract entry points
      • Get contract entry point costs
    • Contract package
      • Get contract package
      • Get contract packages
      • Get account contract packages
    • Delegation
      • Get account delegations
      • Get validator delegations
    • Delegator reward
      • Get account delegator rewards
      • Get total validator delegators' rewards
    • Deploy
      • Get deploy
      • Get deploys
      • Get account deploys
      • Get block deploys
      • Get deploy execution types
    • Fungible token action
      • Get fungible token actions
      • Get fungible token action types
      • Get account fungible token actions
      • Get contract package fungible token actions
    • Fungible token ownership
      • Get account fungible token ownership
      • Get contract package fungible token ownership
    • Non-fungible token (NFT)
      • Get NFT
      • Get account NFTs
      • Get contract package NFTs
      • Get NFT standards
      • Get off-chain NFT metadata statuses
    • Non-fungible token (NFT) action
      • Get contract package NFT actions for a token
      • Get account NFT actions
      • Get contract package NFT actions
      • Get NFT action types
    • Non-fungible token (NFT) ownership
      • Get contract package NFT ownership
      • Get account NFT ownership
    • CSPR rate
      • Get the current currency rate
      • Get historical currency rates
      • Get currencies
    • CSPR supply
      • Get supply
    • Transfer
      • Get account transfers
      • Get deploy transfers
    • Validator
      • Get validator
      • Get validators
    • Validator performance
      • Get historical validator performance
      • Get historical average validator performance
      • Get historical average validators performance
    • Validator reward
      • Get validator rewards
      • Get validator total rewards
  • Streaming API
    • Reference
    • Account balance
    • Block
    • Contract
    • Contract package
    • Contract-level events
    • Deploy
    • Fungible token action
    • Non-fungible token (NFT)
    • Non-fungible token (NFT) action
    • Transfer
  • Casper Node API
    • Connecting with an SDK
Powered by GitBook
On this page
  • Base URLs
  • Mainnet
  • Testnet
  • Authorization
  • Rate limits and quotas
  • Responses
  • Pagination
  • Sorting
  • Filtering
  • Optional properties
  • Errors
  • Versions
  1. Documentation

Overview

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.

Base URLs

The APIs can be accessed using the following base URLs

Mainnet

API
Base URL

CSPR.cloud REST API

CSPR.cloud Streaming API

Casper Node RPC API

Casper Node SSE API

Testnet

API
Base URL

CSPR.cloud REST API

CSPR.cloud Streaming API

Casper Node RPC API

Casper Node SSE API

Authorization

Rate limits and quotas

Responses

The API sends data in the JSON format. Successful REST API responses contain the data property, which contains the response data:

{
    "data": <ResponseData>
}

The Streaming API messages additionally include the action and timestamp properties:

{
    "action": <string>,
    "data": <MessageData>,
    "timestamp": <datetime>
}

Pagination

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:

{
    "data": [<ResponseData>],
    "item_count": <int>,
    "page_count": <int>
}

Sorting

Filtering

Optional properties

Errors

Error responses contain the error property with optional code, message, and description properties providing more information about the error that occurred:

{
    "error": {
        "code": 404,
        "message": "The requested block was not found"
    }
}

Versions

PreviousIntroductionNextAuthorization

Last updated 11 months ago

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.

Authorization
Rate limits and quotas
Pagination
Sorting
Filtering
Optional properties
Errors
here
https://api.cspr.cloud
wss://streaming.cspr.cloud
https://node.cspr.cloud
https://node-sse.cspr.cloud
https://api.testnet.cspr.cloud
wss://streaming.testnet.cspr.cloud
https://node.testnet.cspr.cloud
https://node-sse.testnet.cspr.cloud