-
-
Notifications
You must be signed in to change notification settings - Fork 425
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
Is there a way to get the average price of a token bought from the API #1336
Comments
Get the last 100 orders and calculate it |
Formula is: total token2 / total token1 = avg price |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
With all the new changes since the last time I used this API, did Binance add any new functions to get the average price of a token bought by the user?
So if you bought 1 BTC at $100 and another one at $200, then the average price of your token, i.e. the unit price would be $150. From this you can calculate the PNL.
Or do they have a way to get the PNL for each token?
Thanks a lot in advance.
The text was updated successfully, but these errors were encountered: