GetAssetIssueList gRPC Method
Parameters
page
integer
REQUIRED
Loading...
limit
integer
Loading...
Returns
assetIssue
array
Loading...
id
string
Loading...
owner_address
string
Loading...
name
string
Loading...
abbr
string
Loading...
total_supply
integer
Loading...
frozen_supply
array
Loading...
frozen_amount
integer
Loading...
frozen_days
integer
Loading...
trx_num
integer
Loading...
precision
integer
Loading...
num
integer
Loading...
start_time
integer
Loading...
end_time
integer
Loading...
order
integer
Loading...
vote_score
integer
Loading...
description
string
Loading...
url
string
Loading...
free_asset_net_limit
integer
Loading...
public_free_asset_net_limit
integer
Loading...
public_free_asset_net_usage
integer
Loading...
public_latest_free_net_time
integer
Loading...
Request
1package main23import (4"context"5"crypto/tls"6"fmt"7"github.com/fbsobreira/gotron-sdk/pkg/client"8"google.golang.org/grpc"9"google.golang.org/grpc/credentials"10"log"11)1213// Quicknode endpoints consist of two crucial components: the endpoint name and the corresponding token14// For eg: QN Endpoint: https://docs-demo.tron-mainnet.quiknode.pro/abcde12345678915// endpoint will be: docs-demo.tron-mainnet.quiknode.pro:50051 {50051 is the port number for Tron gRPC}16// token will be : abcde1234567891718var token = "YOUR_TOKEN"19var endpoint = "YOUR_ENDPOINT:50051"2021type auth struct {22token string23}2425func (a *auth) GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error) {26return map[string]string{27"x-token": a.token,28}, nil29}3031func (a *auth) RequireTransportSecurity() bool {32return false33}3435func main() {3637opts := []grpc.DialOption{38grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{})),39grpc.WithPerRPCCredentials(&auth{token}),40}41conn := client.NewGrpcClient(endpoint)42if err := conn.Start(opts...); err != nil {43panic(err)44}45defer conn.Conn.Close()4647fmt.Println("Fetching complete list of TRC10 tokens...")4849page := int64(-1) // Use -1 to get all tokens5051assetList, err := conn.GetAssetIssueList(page)5253if err != nil {54log.Fatalf("Error getting asset issue list: %v", err)55}5657totalTokens := len(assetList.AssetIssue)58fmt.Printf("\nTotal TRC10 tokens found: %d\n", totalTokens)5960// Display the first few tokens as an example61fmt.Println("\nSample of first 5 tokens:")62displayCount := 563if totalTokens < displayCount {64displayCount = totalTokens65}6667for i := 0; i < displayCount; i++ {68token := assetList.AssetIssue[i]69fmt.Printf("\n%d. ID: %s\n", i+1, token.Id)70fmt.Printf(" Name: %s\n", string(token.Name))71fmt.Printf(" Symbol: %s\n", string(token.Abbr))72fmt.Printf(" Decimals: %d\n", token.Precision)73fmt.Printf(" Total Supply: %d\n", token.TotalSupply)74}75}
1package main23import (4"context"5"crypto/tls"6"fmt"7"github.com/fbsobreira/gotron-sdk/pkg/client"8"google.golang.org/grpc"9"google.golang.org/grpc/credentials"10"log"11)1213// Quicknode endpoints consist of two crucial components: the endpoint name and the corresponding token14// For eg: QN Endpoint: https://docs-demo.tron-mainnet.quiknode.pro/abcde12345678915// endpoint will be: docs-demo.tron-mainnet.quiknode.pro:50051 {50051 is the port number for Tron gRPC}16// token will be : abcde1234567891718var token = "YOUR_TOKEN"19var endpoint = "YOUR_ENDPOINT:50051"2021type auth struct {22token string23}2425func (a *auth) GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error) {26return map[string]string{27"x-token": a.token,28}, nil29}3031func (a *auth) RequireTransportSecurity() bool {32return false33}3435func main() {3637opts := []grpc.DialOption{38grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{})),39grpc.WithPerRPCCredentials(&auth{token}),40}41conn := client.NewGrpcClient(endpoint)42if err := conn.Start(opts...); err != nil {43panic(err)44}45defer conn.Conn.Close()4647fmt.Println("Fetching complete list of TRC10 tokens...")4849page := int64(-1) // Use -1 to get all tokens5051assetList, err := conn.GetAssetIssueList(page)5253if err != nil {54log.Fatalf("Error getting asset issue list: %v", err)55}5657totalTokens := len(assetList.AssetIssue)58fmt.Printf("\nTotal TRC10 tokens found: %d\n", totalTokens)5960// Display the first few tokens as an example61fmt.Println("\nSample of first 5 tokens:")62displayCount := 563if totalTokens < displayCount {64displayCount = totalTokens65}6667for i := 0; i < displayCount; i++ {68token := assetList.AssetIssue[i]69fmt.Printf("\n%d. ID: %s\n", i+1, token.Id)70fmt.Printf(" Name: %s\n", string(token.Name))71fmt.Printf(" Symbol: %s\n", string(token.Abbr))72fmt.Printf(" Decimals: %d\n", token.Precision)73fmt.Printf(" Total Supply: %d\n", token.TotalSupply)74}75}
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free