Technical Guidelines
API protocol is WebSocket (unless mentioned otherwise)
Any request body should be a valid JSON
, non valid JSON
objects will be ignored.
Within the valid JSON
please be aware that:
System ignores any additional parameter that was sent on request body but was not specified in this document.
In case of multiple parameters sent with different values, system will always use the last value provided.
Request Parameters
q
String
qualifier, contains the method for the specific API call.
token
String
sid
Int
stream identifier, for each WebSocket connection this is a unique identifier for the API call. Please note that as long as the sid was not ended (other by exchange or by consumer) this can’t be used again on the same WebSocket connection
d
Json
data object, contain the request body
Success Response
The response will always include the q
and sid
parameters from request and a d
parameter with the response body.
In case of short living stream (i.e. trading action), additional response will be sent upon stream closure with success, this message will include the q
and sid
parameters from request and sig:1
.
Failure Response
The response will always include the below parameters:
sig
signal will be equal to "2"
q
from request
errorType
internal error type that should be ignored
sid
from request
d
data that contain errorCode and errorMessage. Those are the error code and message to consider.
Stream Closure
In order to close active stream need to send a message with sig:3
in addition to q
and sid
from request.
sig parameter summary table:
1
Stream closed with success
2
Stream closed with failure
3
Stream was closed due to consumer request
Heartbeats (Pings)
The WebSocket connection supports ping messages for the client to identify connection drops. Ping requests can be made on-demand, and the server responds to each request.
Request Parameters
d
Int
This value will be returned in the response.
Samples
Last updated