Skip to content

Instantly share code, notes, and snippets.

@Kirbyrawr
Created April 30, 2022 13:16
Show Gist options
  • Save Kirbyrawr/bc6700776af04790aada9e2901d78c41 to your computer and use it in GitHub Desktop.
Save Kirbyrawr/bc6700776af04790aada9e2901d78c41 to your computer and use it in GitHub Desktop.
Get All Assets using Stellar .NET SDK
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