Apr-03-2020, 02:21 PM
(Apr-03-2020, 01:53 PM)buran Wrote: First of all, why would you requests the assets,
you can just request positions (there is all info you want - AssetID, symbol and price).
You can get what you want from there.
Good question, I have thought about this. The 'Positions' only provide the current price of the asset you buy from Alpaca. The real-time pricing API call would be changed to 'Polygon.io' but his comes at a cost £+100 a month. - I cannot justify this at the moment. it is still early stages but once this code is resolved I will transfer the API call from Alpaca's position to Polygon.io's real-time pricing.
The Asset API call does provide all the AssetID's and Symbol's just not the Real-time pricing.
I have bought a share on this paper-trading platform so once this code is resolved it will show 1 'current_price' value for the time being but once the call is adapted to Polygon.io it will provide all real-time pricing.
I will have to match the stock symbol from Alpaca with Polygon to get the corresponding price. It has to match Alpaca since that is the trading platform.
Kind Regards,
Andrew