I am trying to get the positions for the strategy and symbol below using the C2 URL. I have confirmed that this system ID does hold a position in that contract but it returns a zero.
http://www.collective2.com/cgi-perl/signal.mpl?cmd=positionstatus&systemid=148114007&pw=MyPassword&instrument=future&symbol=@VXV24
I get the result:
OK 2024-09-16 13:42:02:000 @VXV24 0
It should show -2 not zero.
In contrast this link pulls the correct positions
https://www.collective2.com/cgi-perl/signal.mpl?cmd=positionstatus&systemid=148114007&pw=MyPassword&instrument=stock&symbol=vxx
So what am I doing wrong in the futures link? I have removed my actual password of course.
I strongly, strongly encourage you to migrate to API v 4.
You can see general docs here:
https://trade.collective2.com/c2-api.html
And docs about the GetStrategyOpenPositions command here:
https://documenter.getpostman.com/view/12009826/U16ksR43#6416e92c-0b79-4888-83ad-93697369d156
(We’re in the process of radically improving the docs, but even today, you can see what you need in the current version).
If you want to continue using the command you’re using, you can make futures work by using the “old” futures symbol format, which has no tens digit for year of expiration. So instead of looking up @VXV24 … look up @VXV4 (notice the missing 2).
Thank you for the help. That did the trick. Your recommendation is noted. This new version is something I can use with VB/Excel, is that correct?
Hi @MatthewKlein , any particular reason why you say that? I have been using API v3 for 4 years now and have not thought of migrating. Any specific reason why not to continue with v3? Will it not be supported in the near future? Thanks
1 Like