From 2fe33f921ac776ce4980daf14acc8cf64491824e Mon Sep 17 00:00:00 2001 From: Abhimanyu Paldiwal Date: Thu, 5 Aug 2021 15:36:58 -0700 Subject: [PATCH] Update transactions.mdx --- .../api/resources/accounts/transactions.mdx | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/content/api/resources/accounts/transactions.mdx b/content/api/resources/accounts/transactions.mdx index ab2862c76..241b97b52 100644 --- a/content/api/resources/accounts/transactions.mdx +++ b/content/api/resources/accounts/transactions.mdx @@ -64,6 +64,30 @@ server console.error(err); }); ``` +```go +package main + +import ( + "fmt" + "log" + + "github.com/stellar/go/clients/horizonclient" +) + +func main() { + client := horizonclient.DefaultPublicNetClient + transactionRequest := horizonclient.TransactionRequest{ + ForAccount: "GAYOLLLUIZE4DZMBB2ZBKGBUBZLIOYU6XFLW37GBP2VZD3ABNXCW4BVA", + } + + resp, err := client.Transactions(transactionRequest) + if err != nil { + log.Fatal(err) + return + } + fmt.Println(resp) +} +```