LogoLogo
CSPR.build Portal
1.0.x
1.0.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 delegator total 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
  • Query params
  • Sorting
  • Optional properties
  • Response
  • Example
  1. REST API
  2. Contract package

Get account contract packages

PreviousGet contract packagesNextDelegation

Last updated 1 year ago

Get a paginated list of account contract packages.

GET /accounts/{public_key}/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.

Query params

None

Sorting

Property
Description

timestamp

Sort contract packages by timestamp.

Default sorting is timestamp DESC

Optional properties

Property
Type
Description

deploys_number

int

Response

Example

curl -X 'GET' \
  'https://api.testnet.cspr.cloud/account/017E80955A6D493A4A4B9F1B5DD23D2EDCDC2C8B00FCD9689F2F735F501BD088C5/contract-packages' \
  -H 'Accept: application/json' \
  -H 'Authorization: your_access_token_here'
{
  "data": [
    {
      "contract_package_hash": "0038a63a09e0b600158d4648745930239aba43eb7a5e725ab1af12b49077100c",
      "owner_public_key": "017e80955a6d493a4a4b9f1b5dd23d2edcdc2c8b00fcd9689f2f735f501bd088c5",
      "name": null,
      "description": null,
      "metadata": {},
      "latest_version_contract_type_id": null,
      "timestamp": "2023-04-12T05:38:48Z",
      "icon_url": null
    },
    {
      "contract_package_hash": "004f02d03d1011ea71397363a34fbf038496be30ee2b1d88820c37cc9b9daeee",
      "owner_public_key": "017e80955a6d493a4a4b9f1b5dd23d2edcdc2c8b00fcd9689f2f735f501bd088c5",
      "name": "Wrap BTC",
      "description": null,
      "metadata": {
        "name": "Wrap BTC",
        "symbol": "WBTC",
        "decimals": 8,
        "balances_uref": "uref-4744c56c1ca94c6c1f3d2076d8b3fe474b03a86736143ad1921505b71b693b1f-007",
        "total_supply_uref": "uref-f3771de0504c0dd74feb56f6e327add0ba89562022ff2816e98a8700673124e3-003"
      },
      "latest_version_contract_type_id": 2,
      "timestamp": "2023-03-31T08:22:32Z",
      "icon_url": null
    },
    ...
    {
      "contract_package_hash": "0342537e19667f5c9b5ab976e302bcdfce04b5e681a6c535d330ae0c534203ab",
      "owner_public_key": "017e80955a6d493a4a4b9f1b5dd23d2edcdc2c8b00fcd9689f2f735f501bd088c5",
      "name": null,
      "description": null,
      "metadata": {},
      "latest_version_contract_type_id": null,
      "timestamp": "2022-11-11T05:14:46Z",
      "icon_url": null
    }
  ],
  "item_count": 459,
  "page_count": 46
}

Number of deploys in the specified number of the past days. It's a that accepts the number of days as an argument.

PaginatedResponse
<ContractPackage>
function includer