-
Notifications
You must be signed in to change notification settings - Fork 21
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
Wrong requested positions #134
Comments
Thanks for opening issue. Can you elaborate what you mean by “wrong”? Do you mean that the position data is not correct or that there are missing positions or other ? |
Thank you Abel for your answer! Best Regards. |
Dear Abel, Best regards. |
If the API returns a wrong value this has most likely nothing to do with IB4m. A more suitable place to ask this question might be https://groups.io/g/twsapi. |
Thanks Despair! Best regards. |
Hi Domenico and Despair, I totally see the problem now, sorry for the earlier flow of dumb question. I got the problem: I was calling the metabuf rather than the data buffer. Now I see what you mean and I confirm I could get all the data I needed! I will shortly try to add more instruments to see how it looks like with multiple subscriptions |
Hi Despair,
the real position is -11052 but the wrong position -2424 also appears. Best Regards |
I don't know what is happening. I never see duplicates when I request positions. But what are you trying to do? If you just want to get your whole portfolio you can maybe try to request portfolio updates. I use this more often than rePositions. |
Hi Despair, Best Regards |
Try the following function. It should give you your portfolio: `function [portfolio] = getPortfolio % create local buffer for protfolio update events % request account updates i = uint8(0); if i < 6 function port = parsePortfolio(pos) |
Thank you very much Despair!!! Best Regards. |
Dear Abel,
I have a problem when I request my positions via API using the following code:
Sometimes the M_position matrix is wrong even if I wait a few minutes after the execution of all the orders.
Why does this happen?
Best Regards.
Domenico.
The text was updated successfully, but these errors were encountered: