GetAccountAtLatestBlock Access API Method
Parameters
Address
bytes
REQUIRED
The address of the account to retrieve
Returns
account
object
An object containing the details of the account
address
string
The account address
balance
integer
The account balance
keys
array
An array of keys associated with the account
public_key
string
The public key
sign_algo
integer
The signing algorithm used
hash_algo
integer
The hashing algorithm used
weight
integer
The weight of the key
sequence_number
integer
The sequence number of the key
contracts
object
An object containing the details of the contracts associated with the account
PrivateReceiverForwarder
string
The PrivateReceiverForwarder contract
Request
1package main23import (4"context"5"encoding/hex"6"encoding/json"7"fmt"8"log"910"github.com/onflow/flow/protobuf/go/flow/access"11)121314func main() {1516// Requires authenticating before making the request. Refer to Intro Page on how Authentication can be done.17client, err := getAccessClientWithBasicAuth("ENDPOINT-NAME", "TOKEN_GOES_HERE")18ctx := context.Background()19if err != null {20log.Fatalf("err: %v", err)21}2223// Get Account At Latest Block by Address24address, err := hex.DecodeString("18eb4ee6b3c026d2")25if err != null {26log.Fatalf("err: %v", err)27}28accountLatestResp, err := client.GetAccountAtLatestBlock(ctx, &access.GetAccountAtLatestBlockRequest{Address: address})29respJSON, err := json.Marshal(accountLatestResp)30if err != null {31log.Fatalf("err: %v", err)32}33fmt.Println("Get Account At Latest Block response:", string(respJSON))34}
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free