Get ERC-20 balance
curl --request GET \
--url https://data-api.cloud.ormi.dev/somnia/v1/address/{walletAddress}/balance/erc20import requests
url = "https://data-api.cloud.ormi.dev/somnia/v1/address/{walletAddress}/balance/erc20"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://data-api.cloud.ormi.dev/somnia/v1/address/{walletAddress}/balance/erc20', 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://data-api.cloud.ormi.dev/somnia/v1/address/{walletAddress}/balance/erc20",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://data-api.cloud.ormi.dev/somnia/v1/address/{walletAddress}/balance/erc20"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://data-api.cloud.ormi.dev/somnia/v1/address/{walletAddress}/balance/erc20")
.asString();require 'uri'
require 'net/http'
url = URI("https://data-api.cloud.ormi.dev/somnia/v1/address/{walletAddress}/balance/erc20")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"erc20TokenBalances": [
{
"balance": "<string>",
"contract": {
"address": "<string>",
"decimals": 123,
"erc_type": "<string>",
"logoUri": "<string>",
"name": "<string>",
"symbol": "<string>"
},
"raw_balance": "<string>"
}
],
"resultCount": 123,
"cursor": "<string>"
}Get ERC-20 balance
Lists ERC-20 token balances of a wallet address.
GET
/
somnia
/
v1
/
address
/
{walletAddress}
/
balance
/
erc20
Get ERC-20 balance
curl --request GET \
--url https://data-api.cloud.ormi.dev/somnia/v1/address/{walletAddress}/balance/erc20import requests
url = "https://data-api.cloud.ormi.dev/somnia/v1/address/{walletAddress}/balance/erc20"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://data-api.cloud.ormi.dev/somnia/v1/address/{walletAddress}/balance/erc20', 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://data-api.cloud.ormi.dev/somnia/v1/address/{walletAddress}/balance/erc20",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://data-api.cloud.ormi.dev/somnia/v1/address/{walletAddress}/balance/erc20"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://data-api.cloud.ormi.dev/somnia/v1/address/{walletAddress}/balance/erc20")
.asString();require 'uri'
require 'net/http'
url = URI("https://data-api.cloud.ormi.dev/somnia/v1/address/{walletAddress}/balance/erc20")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"erc20TokenBalances": [
{
"balance": "<string>",
"contract": {
"address": "<string>",
"decimals": 123,
"erc_type": "<string>",
"logoUri": "<string>",
"name": "<string>",
"symbol": "<string>"
},
"raw_balance": "<string>"
}
],
"resultCount": 123,
"cursor": "<string>"
}Path Parameters
A wallet address.
Query Parameters
A contract address to filter by.
The cursor returned in previous response (for getting the next page).
Number of records to fetch
Required range:
1 <= x <= 100⌘I