diff --git a/Examples/Coinbase.Api/Program.cs b/Examples/Coinbase.Api/Program.cs index d76afac..5eaa31b 100644 --- a/Examples/Coinbase.Api/Program.cs +++ b/Examples/Coinbase.Api/Program.cs @@ -1,3 +1,4 @@ +using Coinbase.Net.Interfaces.Clients; using Microsoft.AspNetCore.Mvc; var builder = WebApplication.CreateBuilder(args); @@ -28,15 +29,15 @@ // Map the endpoint and inject the rest client app.MapGet("/{Symbol}", async ([FromServices] ICoinbaseRestClient client, string symbol) => { - var result = await client.SpotApi.ExchangeData.GetTickersAsync(symbol); - return result.Data.List.First().LastPrice; + var result = await client.AdvancedTradeApi.ExchangeData.GetSymbolAsync(symbol); + return result.Data.LastPrice; }) .WithOpenApi(); app.MapGet("/Balances", async ([FromServices] ICoinbaseRestClient client) => { - var result = await client.SpotApi.Account.GetBalancesAsync(); + var result = await client.AdvancedTradeApi.Account.GetAccountsAsync(); return (object)(result.Success ? result.Data : result.Error!); }) .WithOpenApi(); diff --git a/Examples/Coinbase.Console/Program.cs b/Examples/Coinbase.Console/Program.cs index 0dbd785..2498cc9 100644 --- a/Examples/Coinbase.Console/Program.cs +++ b/Examples/Coinbase.Console/Program.cs @@ -3,8 +3,8 @@ // REST var restClient = new CoinbaseRestClient(); -var ticker = await restClient.AdvancedTradeApi.ExchangeData.GetSpotTickersAsync("ETH-USDT"); -Console.WriteLine($"Rest client ticker price for ETH-USDT: {ticker.Data.List.First().LastPrice}"); +var ticker = await restClient.AdvancedTradeApi.ExchangeData.GetSymbolAsync("ETH-USDT"); +Console.WriteLine($"Rest client ticker price for ETH-USDT: {ticker.Data.LastPrice}"); Console.WriteLine(); Console.WriteLine("Press enter to start websocket subscription");