Get contract source

Retrieves the Clarity source code of a given contract, along with the block height it was published in, and the MARF proof for the data.

GET

/v2/contracts/source/{contract_address}/{contract_name}

Retrieves the Clarity source code of a given contract, along with the block height it was published in and the MARF proof for the data.

Status codeDescription
200Success
Terminal
curl -X GET "https://api.mainnet.hiro.so/v2/contracts/source/%7Bcontract_address%7D/%7Bcontract_name%7D"

GET request that returns the contract source

Example response
{
  "source": "string",
  "publish_height": 0,
  "proof": "string"
}