Get contract info
Retrieves details for a specific smart contract.
Path Parameters
contract_idstring
Contract identifier formatted as <contract_address>.<contract_name>
Response Body
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"
}