GetAccountAtLatestBlock Access API Method
Parameters
Address
bytes
REQUIRED
Loading...
Returns
account
object
Loading...
address
string
Loading...
balance
integer
Loading...
keys
array
Loading...
public_key
string
Loading...
sign_algo
integer
Loading...
hash_algo
integer
Loading...
weight
integer
Loading...
sequence_number
integer
Loading...
contracts
object
Loading...
PrivateReceiverForwarder
string
Loading...
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 != nil {20log.Fatalf("err: %v", err)21}2223// Get Account At Latest Block by Address24address, err := hex.DecodeString("18eb4ee6b3c026d2")25if err != nil {26log.Fatalf("err: %v", err)27}28accountLatestResp, err := client.GetAccountAtLatestBlock(ctx, &access.GetAccountAtLatestBlockRequest{Address: address})29respJSON, err := json.Marshal(accountLatestResp)30if err != nil {31log.Fatalf("err: %v", err)32}33fmt.Println("Get Account At Latest Block response:", string(respJSON))34}
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 != nil {20log.Fatalf("err: %v", err)21}2223// Get Account At Latest Block by Address24address, err := hex.DecodeString("18eb4ee6b3c026d2")25if err != nil {26log.Fatalf("err: %v", err)27}28accountLatestResp, err := client.GetAccountAtLatestBlock(ctx, &access.GetAccountAtLatestBlockRequest{Address: address})29respJSON, err := json.Marshal(accountLatestResp)30if err != nil {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