The protocol is aimed to be used through web-socket but is not limited to it, any bi-directional communication protocol can be used to implement this standard.
Every event is formatted in a JSON array like the following:
[type, request_id, method, arguments]
|type||This element identifies the type of the event (see the table below)|
|request_id||This is a request ID set by the client to identify the request and the corresponding response. It must be an unsigned integer. It's absent for events.|
|method||method name to be called|
|arguments||list of arguments for the method|
|Type ID||Short description|
Because precision in finance matters a lot, the float type must not be used, it's an approximate data type which means values are round up. Decimal or String representation should be preferred. A common practice is to use Decimal type inside independent systems and String for communication between systems. This is why every numerical value which matters in this protocol is stored in a string.
The biggest unit of time possible must be chosen to represent a time period.
5m must be chosen instead of