Created
April 30, 2022 13:16
-
-
Save Kirbyrawr/bc6700776af04790aada9e2901d78c41 to your computer and use it in GitHub Desktop.
Get All Assets using Stellar .NET SDK
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static async Task GetAllAssets() | |
{ | |
Server server = new Server("https://horizon.stellar.org"); | |
Page<AssetResponse> page = await server.Assets.Limit(200).Execute(); | |
while (page != null) | |
{ | |
Console.WriteLine("-- Listing all Assets on the Network --"); | |
foreach (var record in page.Records) | |
{ | |
Console.WriteLine(record.AssetCode); | |
} | |
page = await page.NextPage(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment