Login Page - Create Account

Support Board


Date/Time: Sun, 24 Nov 2024 21:57:16 +0000



Post From: [SC Relay Server] Documentation Needed

[2024-05-02 15:55:43]
MichaelPPTF - Posts: 69
Hello,

I am trying to write a client to use the SC Relay Server functionality to stream data relayed from SC and do some calculations. But I am stuck at the very first step, which is to get ENCODING_REQUEST.

Q1: I am trying to understand the procedure used by SC. For example, SC documentation stated that if the client (my script) and the server (SC itself) use the same encoding, I can bypass this step. But how do I know which encoding scheme is SC using? Do I have to send an ENCODING_REQUEST to find out or there's some documentation that I didn't find out about?

Q2: As for LOGON_REQUEST, what do I use in the username/password fields? Do I use the username/password for login to SC or something else?

Here's how I am packing my requests with Python struct library:

format_string = '<HHI32s32s128sIII32s32s32sI'
logon_request = struct.pack(
format_string,
0, # Size will be calculated after packing
message_type,
protocol_version,
username,
password,
general_text_data,
integer_1,
integer_2,
heartbeat_interval,
trade_account,
hardware_identifier,
client_name,
market_data_transmission_interval
)

That's all I have for now. Without the two steps above I can't even get SC to acknowledge my client as a valid one. Here's what I got from SC:

2024-05-02 08:38:19.356 | DTC client #5. 127.0.0.1 | Received unknown message type from client. Type = 0