Get contract info
Retrieves details for a specific smart contract.
Path Parameters
contract_idstring
Contract identifier formatted as <contract_address>.<contract_name>
Response Body
A Smart Contract Detail
TypeScript Definitions
Use the response body type in TypeScript.
tx_idstring
canonicalboolean
contract_idstring
block_heightinteger
clarity_versioninteger | null
source_codestring
abistring | null
Default Response
TypeScript Definitions
Use the response body type in TypeScript.
errorstring
message?string
[key: string]any
curl -X GET "https://api.hiro.so//extended/v1/contract/SP6P4EJF0VG8V0RB3TQQKJBHDQKEF6NVRD1KZE3C.satoshibles"
fetch("https://api.hiro.so//extended/v1/contract/SP6P4EJF0VG8V0RB3TQQKJBHDQKEF6NVRD1KZE3C.satoshibles")
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.hiro.so//extended/v1/contract/SP6P4EJF0VG8V0RB3TQQKJBHDQKEF6NVRD1KZE3C.satoshibles"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
import requests
url = "https://api.hiro.so//extended/v1/contract/SP6P4EJF0VG8V0RB3TQQKJBHDQKEF6NVRD1KZE3C.satoshibles"
response = requests.request("GET", url)
print(response.text)
{
"tx_id": "string",
"canonical": true,
"contract_id": "string",
"block_height": 0,
"clarity_version": 0,
"source_code": "string",
"abi": "string"
}
{
"error": "string",
"message": "string"
}