Python Forum
creating a list of dictionaries from API calls
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
creating a list of dictionaries from API calls
#6
(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
Reply


Messages In This Thread
RE: creating a list of dictionaries from API calls - by AndrewEnglsh101 - Apr-03-2020, 02:21 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Sort a list of dictionaries by the only dictionary key Calab 2 589 Apr-29-2024, 04:38 PM
Last Post: Calab
  Access list of dictionaries britesc 4 1,104 Jul-26-2023, 05:00 AM
Last Post: Pedroski55
  Class-Aggregation and creating a list/dictionary IoannisDem 1 1,942 Oct-03-2021, 05:16 PM
Last Post: Yoriz
  function that returns a list of dictionaries nostradamus64 2 1,781 May-06-2021, 09:58 PM
Last Post: nostradamus64
  Calls to Attributes of a Class SKarimi 3 3,427 Apr-22-2021, 04:18 PM
Last Post: SKarimi
  convert List with dictionaries to a single dictionary iamaghost 3 2,886 Jan-22-2021, 03:56 PM
Last Post: iamaghost
  Creating list of lists from generator object t4keheart 1 2,228 Nov-13-2020, 04:59 AM
Last Post: perfringo
  Creating a dictionary from a list Inkanus 5 3,194 Nov-06-2020, 06:11 PM
Last Post: DeaD_EyE
  list call problem in generator function using iteration and recursive calls postta 1 1,936 Oct-24-2020, 09:33 PM
Last Post: bowlofred
  Creating a list of dictionaries while iterating pythonnewbie138 6 3,322 Sep-27-2020, 08:23 PM
Last Post: pythonnewbie138

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020