API Documentation
WebSocket API
Starting a stream
In order to start using WebSocket connect to wss://api-streaming-capital.backend-capital.com/connect
. In order to keep the connection alive, ping service at least once every 10 minutes.
Streams available
marketData.subscribe
To subscribe to the price updates by mentioning the epics.
Note: the max number of epics = 40
Request:
{
"destination": "marketData.subscribe",
"correlationId": 1,
"cst": "zvkT26****nsHKk",
"securityToken": "g6K90****QKvCS7",
"payload": {
"epics": [
"OIL_CRUDE"
]
}
}
Response:
{
"status": "OK",
"destination": "marketData.subscribe",
"correlationId": "1",
"payload": {
"subscriptions": {
"OIL_CRUDE": "PROCESSED"
}
}
}
marketData.unsubscribe
To unsubscribe from the prices updates.
Request:
{
"destination": "marketData.unsubscribe",
"correlationId": 1,
"cst": "zvkT26****nsHKk",
"securityToken": "g6K90****QKvCS7",
"payload": {
"epics": [
"OIL_CRUDE"
]
}
}
Response:
{
"status": "OK",
"destination": "marketData.unsubscribe",
"correlationId": "1",
"payload": {
"subscriptions": {
"OIL_CRUDE": "PROCESSED"
}
}
}
Ping
To ping the service for keeping the connection alive.
Response:
{
"destination": "ping",
"correlationId": 1,
"cst": "zvkT26****nsHKk",
"securityToken": "g6K90****QKvCS7"
}
Response:
{
"status": "OK",
"destination": "ping",
"correlationId": "1",
"payload": {}
}