Hi, I've been looking for some working examples of how to add custom universe selection with custom attribution from a restful api returning json.
The api expects the date to be passed as a parameter in the URL, which is fine because we already have the date parameter in the GetSource function within the PythonData. The json will be returned as
[{"symbol": "META","attribute_1": 32},{"symbol": "WBD","attribute_1": 33}]
I am struggling to implement the Reader. I got the GetSource as below:
def GetSource(self, config, date, isLive):
return SubscriptionDataSource(f"https://some-api/some-endpoint?date={date}",
SubscriptionTransportMedium.Rest,
FileFormat.UnfoldingCollection)
I can't see any request from QC to my API endpoint. Even if I hardcode the date in the URL there is no request coming to the API side.
I've been through the docs already but couldn't connect all the pieces. The closest I got was by following this page
but copying/pasting the snippets didn't work and the demonstration at the bottom didn't help as well.
I'd appreciate a lot if someone could post a working example for this.
Great thanks.