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

fetch common tokens #732

Merged
merged 2 commits into from
Oct 7, 2024
Merged

fetch common tokens #732

merged 2 commits into from
Oct 7, 2024

Conversation

p6te
Copy link
Collaborator

@p6te p6te commented Oct 4, 2024

  • fetch common tokens list for mainnet

Copy link

github-actions bot commented Oct 4, 2024

This pull request has been deployed to Vercel.

Latest commit: 13e6e23
✅ Preview: https://webapp-kjybts7rp-invariantlabs.vercel.app
🔍 Inspect: https://vercel.com/invariantlabs/webapp/NqJbQKCjCmb1oJNbiYYWQnJ6ACYi

View Workflow Logs

@@ -1188,3 +1188,13 @@ export const solToPriorityFee = (sol: number) => {
}

export const createLoaderKey = () => (new Date().getMilliseconds() + Math.random()).toString()

export const getMainnetCommonTokens = async (): Promise<PublicKey[]> => {
const { data } = await axios.get('https://tokens.jup.ag/tokens?tags=verified')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have you checked if jup handles the limit in the query (to fetch only 8 tokens)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, i have checked. there is no option to limit number of tokens in query. here is link to API https://station.jup.ag/docs/token-list/token-list-api

@p6te p6te merged commit f49801f into dev Oct 7, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants