Field List
I am using the market_price_rdpgw_service_discovery.py and was wondering how I can get back only the Bid and Ask field? When i pass in the following, I am getting back many more attributes than i requested. What data types does the 'Field' attribute accept? Many thanks
def _send_market_price_request(self, ric_name):
""" Create and send simple Market Price request """
mp_req_json = {
'ID': 2, # market data=2, Login=1
'Key': {
'Name': ric_name,
'Service': service,
'Field': ['BID', 'ASK']
},
}
Find more posts tagged with
Sort by:
1 - 1 of
11
Sort by:
1 - 1 of
11
Please refer to the Websocket API Tutorials - where you can find one on Filtering the Field List
So for, example:
{
"ID":2,
"Key":{
"Name":"VOD.L"
},
"View":[
"BID",
"ASK",
"BIDSIZE"
]
}
will filter for only BID, ASK and BIDSIZE
You should be aware, however, that if the server is too busy to filter, it may ignore the request and send you an unfiltered list - rare - but it can happen and your code should be able to cope with such an occurrence.
hi @mark.banford-Lawrence
Please refer to the Websocket API Tutorials - where you can find one on Filtering the Field List
So for, example:
will filter for only BID, ASK and BIDSIZE
You should be aware, however, that if the server is too busy to filter, it may ignore the request and send you an unfiltered list - rare - but it can happen and your code should be able to cope with such an occurrence.