Contracts
Get contract by address
Retrieve detailed information about a specific contract using its address.
GET
/
contracts
/
{contractAddress}
Get contract by address
curl --request GET \
--url https://public-api.voyager.online/beta/contracts/{contractAddress} \
--header 'x-api-key: <api-key>'import requests
url = "https://public-api.voyager.online/beta/contracts/{contractAddress}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://public-api.voyager.online/beta/contracts/{contractAddress}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://public-api.voyager.online/beta/contracts/{contractAddress}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://public-api.voyager.online/beta/contracts/{contractAddress}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://public-api.voyager.online/beta/contracts/{contractAddress}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.voyager.online/beta/contracts/{contractAddress}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"address": "0x07faf54d35eb92d381cb5d3b9ba6b35ccf297980e35be22ecfe07eafd2a4ac48",
"blockNumber": 29410,
"isAccount": true,
"isErcToken": false,
"isProxy": false,
"type": "Ready",
"creationTimestamp": 1680260250,
"verifiedTimestamp": null,
"classAlias": "Ready",
"contractAlias": null,
"classHash": "0x01a736d6ed154502257f02b1ccdf4d9d1089f80811cd6acad48e6b6a9d1f2003",
"version": "2.0.0",
"blockHash": "0x701838987e597a6cb3489d93cb41e8827cc62048ca5fb690a1cf62d8a9a2bc5",
"nonce": 100,
"implementationContract": null,
"tokenName": null,
"tokenSymbol": null
}{
"error": "<string>"
}{
"message": "Forbidden"
}{
"error": "<string>"
}{
"message": "Limit Exceeded"
}Authorizations
API key for authentication. Get your key at https://voyager.online/plans
Path Parameters
Starknet contract address (0x-prefixed hex).
Pattern:
^(0x[0-9a-fA-F]{1,66})$Response
Contract details
⌘I
Get contract by address
curl --request GET \
--url https://public-api.voyager.online/beta/contracts/{contractAddress} \
--header 'x-api-key: <api-key>'import requests
url = "https://public-api.voyager.online/beta/contracts/{contractAddress}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://public-api.voyager.online/beta/contracts/{contractAddress}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://public-api.voyager.online/beta/contracts/{contractAddress}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://public-api.voyager.online/beta/contracts/{contractAddress}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://public-api.voyager.online/beta/contracts/{contractAddress}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.voyager.online/beta/contracts/{contractAddress}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"address": "0x07faf54d35eb92d381cb5d3b9ba6b35ccf297980e35be22ecfe07eafd2a4ac48",
"blockNumber": 29410,
"isAccount": true,
"isErcToken": false,
"isProxy": false,
"type": "Ready",
"creationTimestamp": 1680260250,
"verifiedTimestamp": null,
"classAlias": "Ready",
"contractAlias": null,
"classHash": "0x01a736d6ed154502257f02b1ccdf4d9d1089f80811cd6acad48e6b6a9d1f2003",
"version": "2.0.0",
"blockHash": "0x701838987e597a6cb3489d93cb41e8827cc62048ca5fb690a1cf62d8a9a2bc5",
"nonce": 100,
"implementationContract": null,
"tokenName": null,
"tokenSymbol": null
}{
"error": "<string>"
}{
"message": "Forbidden"
}{
"error": "<string>"
}{
"message": "Limit Exceeded"
}