Dear team,
I am getting full book from exchange B3 data in Refinitiv OMMItemStream class using this code, with domain MarketByPrice:
futures = rdp.OMMItemStream(session = session,name="DOLG23",domain = "MarketByPrice, on_refresh = lambda euro, event : display_event("Refresh", event),on_update = lambda euro, event : display_event("Update", event),on_status = lambda euro, event: display_event("Status", event))
futures.open()
The display_event function is implemented below:
def display_event(eventType, event):
currentTime = datetime.datetime.now().time()
print("----------------------------------------------------------")
print(">>> {} event received at {}".format(eventType, currentTime))
print(event)
return
And, as a result, a piece of the output is:
>>> Refresh event received at 15:26:51.287372
{'ID': 3, 'Type': 'Refresh', 'Domain': 'MarketByPrice', 'Key': {'Service': 'ELEKTRON_DD', 'Name': 'DOLG23'}, 'State': {'Stream': 'Open', 'Data': 'Ok', 'Code': 'UnsupportedViewType'}, 'Complete': False, 'Qos': {'Timeliness': 'Realtime', 'Rate': 'JitConflated'}, 'PartNumber': 0, 'PermData': 'AwEBZxnA', 'SeqNumber': 25440, 'Map': {'KeyType': 'Buffer', 'Summary': {'Fields': {'PROD_PERM': 6719, 'DSPLY_NAME': 'BMF USDBRL FEB3', 'CURRENCY': 'BRL', 'ACTIV_DATE': '2023-01-05', 'LOT_SIZE_A': 50000, 'RECORDTYPE': 114, 'RDN_EXCHD2': 'BMF', 'PROV_SYMB': 'DOLG23', 'PR_RNK_RUL': 'NOR', 'OR_RNK_RUL': 'PTS ', 'MNEMONIC': 'DOL', 'TRD_TYPE': '17', 'CONTEXT_ID': 3224, 'DDS_DSO_ID': 8409, 'SPS_SP_RIC': '.[SPSBMF01L2', 'BOOK_STATE': 'N', 'HALT_REASN': '2', 'ORD_ENT_ST': 'E', 'MKT_OR_RUL': 'I', 'TRD_STATUS': 'N ', 'HALT_RSN': ' ', 'DELBY_DT': None, 'SEE_RIC': None, 'PERIOD_CD2': '17', 'INST_PHASE': 'T ', 'L2_REPR': 'MBP-D ', 'ORDBK_DEPH': 'FB ', 'TIMACT_NS': '14:26:49.261', 'DBOR_DM_TP': None, 'VEH_PERMID': None, 'MAS_ID': None}}, 'CountHint': 307, 'Entries': [{'Action': 'Add', 'Key': 'NTQ0My41QQ==', 'Fields': {'ORDER_SIDE': 'ASK', 'ORDER_PRC': 5443.5, 'ACC_SIZE': 60, 'NO_ORD': 10, 'LV_TIM_MS': 52003059, 'LV_DATE': '2023-01-05'}}, {'Action': 'Add', 'Key': 'NTM2MC4wQg==', 'Fields': {'ORDER_SIDE': 'BID', 'ORDER_PRC': 5360.0, 'ACC_SIZE': 5, 'NO_ORD': 1, 'LV_DATE': '2023-01-05', 'LV_TIM_MS': 49118579}}, {'Action': 'Add', 'Key': 'NTU5OC4wQQ==', 'Fields': {'NO_ORD': 1, 'ACC_SIZE': 5, 'ORDER_PRC': 5598.0, 'ORDER_SIDE': 'ASK', 'LV_TIM_MS': 43250009, 'LV_DATE': '2023-01-05'}}, {'Action': 'Add', 'Key': 'NTQ2NS4wQQ==', 'Fields': {'ORDER_SIDE': 'ASK', 'ORDER_PRC': 5465.0, 'ACC_SIZE': 15, 'NO_ORD': 3, 'LV_TIM_MS': 49868825, 'LV_DATE': '2023-01-05'}}, {'Action': 'Add', 'Key': 'NTQxNS41Qg==', 'Fields': {'NO_ORD': 3, 'ACC_SIZE': 15, 'ORDER_PRC': 5415.5, 'ORDER_SIDE': 'BID', 'LV_TIM_MS': 51930733, 'LV_DATE': '2023-01-05'}}, {'Action': 'Add', 'Key': 'NTM4NS41Qg==', 'Fields': {'NO_ORD': 1, 'ACC_SIZE': 5, 'ORDER_PRC': 5385.5, 'ORDER_SIDE': 'BID'}}
I would like to know the amount of each bid/ask per level in the book. Could you please confirm if the ACC_SIZE is the number of contract in each quote? Or it’s volume in some measure? Because it comes always as a multiple of 5 and I didn’t find this specific information in the documentation I have. If you have any documentation that provides the information between B3 and Refinitiv, it would be very helpful for us (on B3 documentation they use another fields).
Thank you very much in advance,
Salih