JavaScript
import { Avalanche } from "@avalanche-sdk/chainkit";
const avalanche = new Avalanche();
async function run() {
const result = await avalanche.data.icm.listByAddress({
pageSize: 10,
address: "0x8578AE7723751446B196bD5124e1bF57B40EB7Bc",
network: "mainnet",
});
console.log(result);
}
run();curl --request GET \
--url https://glacier-api.avax.network/v1/icm/addresses/{address}/messages \
--header 'x-glacier-api-key: <api-key>'import requests
url = "https://glacier-api.avax.network/v1/icm/addresses/{address}/messages"
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/icm/addresses/{address}/messages",
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/icm/addresses/{address}/messages"
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/icm/addresses/{address}/messages")
.header("x-glacier-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://glacier-api.avax.network/v1/icm/addresses/{address}/messages")
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{
"messages": [
{
"messageId": "<string>",
"icmContractAddress": "<string>",
"sourceBlockchainId": "<string>",
"destinationBlockchainId": "<string>",
"sourceEvmChainId": "<string>",
"destinationEvmChainId": "<string>",
"messageNonce": "<string>",
"from": "<string>",
"to": "<string>",
"messageExecuted": true,
"receipts": [
{
"receivedMessageNonce": "<string>",
"relayerRewardAddress": "<string>"
}
],
"receiptDelivered": true,
"rewardDetails": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"ercType": "ERC-20",
"value": "<string>",
"logoUri": "<string>",
"price": {
"value": 123
}
},
"sourceTransaction": {
"txHash": "<string>",
"timestamp": 123,
"gasSpent": "<string>"
},
"status": "pending",
"data": "<string>"
}
],
"nextPageToken": "<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>"
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}Interchain Messaging
List ICM messages by address
Lists ICM messages by address. Ordered by timestamp in descending order.
GET
/
v1
/
icm
/
addresses
/
{address}
/
messages
JavaScript
import { Avalanche } from "@avalanche-sdk/chainkit";
const avalanche = new Avalanche();
async function run() {
const result = await avalanche.data.icm.listByAddress({
pageSize: 10,
address: "0x8578AE7723751446B196bD5124e1bF57B40EB7Bc",
network: "mainnet",
});
console.log(result);
}
run();curl --request GET \
--url https://glacier-api.avax.network/v1/icm/addresses/{address}/messages \
--header 'x-glacier-api-key: <api-key>'import requests
url = "https://glacier-api.avax.network/v1/icm/addresses/{address}/messages"
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/icm/addresses/{address}/messages",
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/icm/addresses/{address}/messages"
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/icm/addresses/{address}/messages")
.header("x-glacier-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://glacier-api.avax.network/v1/icm/addresses/{address}/messages")
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{
"messages": [
{
"messageId": "<string>",
"icmContractAddress": "<string>",
"sourceBlockchainId": "<string>",
"destinationBlockchainId": "<string>",
"sourceEvmChainId": "<string>",
"destinationEvmChainId": "<string>",
"messageNonce": "<string>",
"from": "<string>",
"to": "<string>",
"messageExecuted": true,
"receipts": [
{
"receivedMessageNonce": "<string>",
"relayerRewardAddress": "<string>"
}
],
"receiptDelivered": true,
"rewardDetails": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"ercType": "ERC-20",
"value": "<string>",
"logoUri": "<string>",
"price": {
"value": 123
}
},
"sourceTransaction": {
"txHash": "<string>",
"timestamp": 123,
"gasSpent": "<string>"
},
"status": "pending",
"data": "<string>"
}
],
"nextPageToken": "<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>"
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}Authorizations
Api keys provide higher access to rate limits. To obtain an api key, sign up for an account at https://avacloud.io/.
Path Parameters
An EVM address.
Query Parameters
A page token, received from a previous list call. Provide this to retrieve the subsequent page.
The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
Required range:
1 <= x <= 100Either mainnet or testnet/fuji.
Available options:
mainnet, fuji, testnet Was this page helpful?
⌘I