From c89c0836d8eb21b5ec2d4f97dcc5270e207461f8 Mon Sep 17 00:00:00 2001 From: Abhimanyu Paldiwal Date: Fri, 6 Aug 2021 23:25:07 -0700 Subject: [PATCH] Update strict-receive.mdx --- .../api/aggregations/paths/strict-receive.mdx | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/content/api/aggregations/paths/strict-receive.mdx b/content/api/aggregations/paths/strict-receive.mdx index 773150925..5ffb38b1c 100644 --- a/content/api/aggregations/paths/strict-receive.mdx +++ b/content/api/aggregations/paths/strict-receive.mdx @@ -78,6 +78,34 @@ server console.error(err); }); ``` + +```go +package main + +import ( + "fmt" + "github.com/stellar/go/clients/horizonclient" + "log" +) + +func main() { + client := horizonclient.DefaultPublicNetClient + pathsRequest := horizonclient.PathsRequest { + DestinationAssetType: horizonclient.AssetType4, + DestinationAssetCode: "BB1", + DestinationAssetIssuer: "GD5J6HLF5666X4AZLTFTXLY46J5SW7EXRKBLEYPJP33S33MXZGV6CWFN", + DestinationAmount: "5", + SourceAssets: "CNY:GAREELUB43IRHWEASCFBLKHURCGMHE5IF6XSE7EXDLACYHGRHM43RFOX", + } + + resp, err := client.StrictReceivePaths(pathsRequest) + if err != nil { + log.Fatal(err) + return + } + fmt.Println(resp) +} +```