diff --git a/src/Solana.Unity.Dex/Jupiter/JupiterDex.cs b/src/Solana.Unity.Dex/Jupiter/JupiterDex.cs index 50b83eba..996dd776 100644 --- a/src/Solana.Unity.Dex/Jupiter/JupiterDex.cs +++ b/src/Solana.Unity.Dex/Jupiter/JupiterDex.cs @@ -35,7 +35,7 @@ public class JupiterDexAg: IDexAggregator /// Public constructor; Create the JupiterDexAg instance with the account to use for the aggregator. /// /// - public JupiterDexAg(string endpoint = "https://quote-api.jup.ag/v6") + public JupiterDexAg(string endpoint = "https://api.jup.ag/") { _endpoint = endpoint; _httpClient = new HttpClient(); @@ -56,7 +56,7 @@ public JupiterDexAg(string endpoint = "https://quote-api.jup.ag/v6") /// /// /// - public JupiterDexAg(PublicKey account, string endpoint = "https://quote-api.jup.ag/v6") + public JupiterDexAg(PublicKey account, string endpoint = "https://api.jup.ag/") { _account = account; _endpoint = endpoint; @@ -108,7 +108,7 @@ public async Task GetSwapQuote( var queryString = string.Join("&", queryParams.Select(kv => $"{kv.Key}={kv.Value}")); // Construct the request URL - var apiUrl = _endpoint + "/quote?" + queryString; + var apiUrl = _endpoint + "/swap/v1/quote?" + queryString; using var httpReq = new HttpRequestMessage(HttpMethod.Get, apiUrl); @@ -141,7 +141,7 @@ public async Task Swap( userPublicKey ??= _account; // Construct the request URL - var apiUrl = _endpoint + "/swap"; + var apiUrl = _endpoint + "/swap/v1/swap"; var req = new SwapRequest() { @@ -222,4 +222,4 @@ public async Task GetTokenByMint(string mint) IList tokens = await GetTokens(TokenListType.All); return tokens.First(t => string.Equals(t.Mint, mint, StringComparison.CurrentCultureIgnoreCase)); } -} \ No newline at end of file +}