Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use higher rate limit Jupiter URL #88

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

abunsen
Copy link

@abunsen abunsen commented Oct 1, 2024

This PR adjusts the API provided for the jupiter package. The default API was updated for swap/quote to leverage jupiterapi.com. The API offers higher rate limits (up to 10 rps) along with a faster updated market cache. The jupiterapi.com market cache surfaces newly launched tokens faster since it doesn't require a certain volume/liquidity threshold to be met, along with an improved cadence of it being updated. _With that said, the API does take a small platform fee (0.2%) on swaps given the stability/rate limits/new markets it provides.

More details can be found on the site.

@opanasiuk-oleksii
Copy link
Collaborator

Hi, @abunsen!

Thank you for your pull request! Have you considered overriding the jupiterUrl property during the SDK initialization? This could help resolve the issue you're addressing.

Here's an example of how to do it:

import { AllbridgeCoreSdk, nodeRpcUrlsDefault, mainnet } from "@allbridge/bridge-core-sdk";
const sdk = new AllbridgeCoreSdk(
  nodeRpcUrlsDefault,
  {
    ...mainnet,
    jupiterUrl: "https://public.jupiterapi.com"
  });

You can also review all available configuration options here.

Once again, thank you for contributing!

@gholam-deblan
Copy link

0.2% fee is not small

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants