Problem with rithmic R protocol Api

Hello everybody. I’m trying to use rithmic R protocol API in python. I’ve wrote some code and I think it should be working. but rithmic api does not send me any response. I accepted agreements and my credentials are valid. But I got stuck at the first step (requesting rithmic system info).
Is here any one who used this API before with python? or any one who could help me.

Here is my code:

from websocket import create_connection
import request_rithmic_system_info_pb2
import response_rithmic_system_info_pb2
import asyncio
 

async def list_systems(ws):
    rq = request_rithmic_system_info_pb2.RequestRithmicSystemInfo()

    rq.template_id = 16
    # rq.user_msg.append("hello");
    # rq.user_msg.append("world");

    serialized = rq.SerializeToString()
    length     = len(serialized)
        
    # length into bytes (4 bytes, big/little, true/false)
    buf  = bytearray()
    buf  = length.to_bytes(4, byteorder='big', signed=True)
    buf += serialized

    ws.send(buf)
    print(f"sent list_systems request")

    rp_buf = bytearray()
    rp_buf = ws.recv()
    print('recieved:', rp_buf)

    # get length from first four bytes from rp_buf
    rp_length = int.from_bytes(rp_buf[0:3], byteorder='big', signed=True)

    rp = response_rithmic_system_info_pb2.ResponseRithmicSystemInfo()
    rp.ParseFromString(rp_buf[4:])

    # an rp code of "0" indicates that the request was completed successfully
    if rp.rp_code[0] == "0":
        print(f" Available Systems :")
        print(f" ===================")
        for sys_name in rp.system_name:
            print(f"{sys_name}")
    else:
        print(f" error retrieving system list :")
        print(f" template_id : {rp.template_id}")
        print(f"    user_msg : {rp.user_msg}")
        print(f"     rp code : {rp.rp_code}")
        print(f" system_name : {rp.system_name}")


ws = create_connection("wss://rituz00100.rithmic.com:443")

asyncio.run(list_systems(ws))

ws.close()

We dont even need any credentials in this step.

Any help would be appreciated.
Thanks.

Hi @sorooshmoghimi,

Thank you for your question and welcome to the Optimus community forum.

We would kindly ask you to email your question to Rithmic’s API team at rapi@rithmic.com - for very specific questions like this, Rithmic asks the client to work with their API team directly.

If any of our community members have input here, I would strongly encourage them to write their responses below, however, I think the best place to ask this is to work with RIthmic’s API team directly.

Thanks for your understanding.
Jake
Optimus Futures Support