Login Page - Create Account

DTC Protocol Discussion Forum


Date/Time: Fri, 29 Nov 2024 14:52:23 +0000



ServerOrderID of more than 32 bytes

View Count: 2723

[2015-09-14 19:44:22]
vbmithr - Posts: 204
BitMEX uses UUID (represented as strings) as id for orders and executions reports.
This string is longer than 32 bytes.

What should I do ?
I can represent the ID as a binary form, which would fit in 16 bytes, but I don't know if it is ok for SC to have order ids that are raw binary strings as opposed to ASCII.

Edit: I'm gonna represent it in Base64 or Hex instead
Date Time Of Last Edit: 2015-09-14 20:39:29
[2015-09-16 00:20:42]
DTC Engineering - Posts: 320
For longer than 32 characters, you will need to switch to Binary Encoding with Variable Length Strings. Or use Google Protocol Buffer encoding.

but I don't know if it is ok for SC to have order ids that are raw binary strings as opposed to ASCII.
Yes it is as long as none of the bytes before the very end of the order ID has a zero value. Otherwise, it will be interpreted as a null-terminator ending the text string.

I'm gonna represent it in Base64 or Hex instead
OK

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account