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

Suggestion in grpc-copytrade #1

Open
outsmartchad opened this issue Aug 29, 2024 · 1 comment
Open

Suggestion in grpc-copytrade #1

outsmartchad opened this issue Aug 29, 2024 · 1 comment

Comments

@outsmartchad
Copy link

outsmartchad commented Aug 29, 2024

First issue: const amount = tokenDetails[0].uiTokenAmount.uiAmount;
This doesn't work on some type of swap transaction, 1. transactions that uses jupiter swap api, 2. transactions that interact multiple dex liquidity pools.

Second issue: You are getting the pool price from dexscreener while it's not exactly the entry/exit price of the trader, you could calculate the exact entry/exit price using this formula, (post number of sol in pool / post number of token in pool), using the data.transaction.transaction.meta.postTokenBalances.

hope this helps!

@codinpsycho
Copy link
Collaborator

Thanks for the feedback. @ahyammona Can probably check this out.

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

No branches or pull requests

2 participants