Skip to main content
GET
/
v1
/
networks
/
{network}
/
blockchains
/
{blockchainId}
/
vertices
/
{vertexHash}
JavaScript
import { Avalanche } from "@avalanche-sdk/chainkit";

const avalanche = new Avalanche({
  network: "mainnet",
});

async function run() {
  const result = await avalanche.data.primaryNetwork.vertices.getByHash({
    vertexHash: "haP1CW56cspZY7aEuqHNrtpvhqCaMTxQaYe6j5u2Mbn4L2Gqr",
    blockchainId: "x-chain",
  });

  console.log(result);
}

run();
curl --request GET \
--url https://glacier-api.avax.network/v1/networks/{network}/blockchains/{blockchainId}/vertices/{vertexHash} \
--header 'x-glacier-api-key: <api-key>'
import requests

url = "https://glacier-api.avax.network/v1/networks/{network}/blockchains/{blockchainId}/vertices/{vertexHash}"

headers = {"x-glacier-api-key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://glacier-api.avax.network/v1/networks/{network}/blockchains/{blockchainId}/vertices/{vertexHash}",
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-glacier-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://glacier-api.avax.network/v1/networks/{network}/blockchains/{blockchainId}/vertices/{vertexHash}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("x-glacier-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://glacier-api.avax.network/v1/networks/{network}/blockchains/{blockchainId}/vertices/{vertexHash}")
.header("x-glacier-api-key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://glacier-api.avax.network/v1/networks/{network}/blockchains/{blockchainId}/vertices/{vertexHash}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-glacier-api-key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "vertexHash": "<string>",
  "parentHashes": [
    "<string>"
  ],
  "vertexHeight": 123,
  "vertexIndex": 123,
  "vertexTimestamp": 123,
  "txCount": 123,
  "transactions": [
    "<string>"
  ],
  "vertexSizeBytes": 123
}
{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}
{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}
{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}
{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}
{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}
{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}
{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}
{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}

Authorizations

x-glacier-api-key
string
header
required

Api keys provide higher access to rate limits. To obtain an api key, sign up for an account at https://avacloud.io/.

Path Parameters

vertexHash
string
required

A vertex hash string.

blockchainId
enum<string>
required

A primary network blockchain id or alias.

Available options:
2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM,
2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm,
x-chain
network
enum<string>
required

Either mainnet or testnet/fuji.

Available options:
mainnet,
fuji,
testnet

Response

Successful response

vertexHash
string
required
parentHashes
string[]
required
vertexHeight
number
required
vertexIndex
number
required
vertexTimestamp
number
required
txCount
number
required
transactions
string[]
required
vertexSizeBytes
number
required