Skip to main content

Sync Messages

🔐 Sync Messages Request

FieldDetails
API NameSyncMessages
URL Format<protocol>://<domain name:port>/<URL>
Example URLhttps://localhost:8080/SyncMessages
DescriptionThis request syncs all messages available in the system. Upon receiving the request, the system sends state‑based information depending on jEventType. The request must include jToken from the Authentication API response.

📝 Sync Messages Request Parameters

ParameterData TypeDescription
jMessageTypevarchar(15)Must be sent as SYNC_MESSAGES
jEventTypeintEvent Type:
1 = Sync Orders
2 = Sync Trades
3 = Sync Multileg Orders
4 = Sync GTD Orders
5 = Sync Rejected Orders
6 = Sync Position Conversion
7 = Sync CashCollateral
8 = Sync Algo Orders (currently only 8 is supported)
jManagerIDvarchar(50)Manager Identification Number
jCustomerIdvarchar(50)Customer ID assigned to the user
jExchangeintExchange identifier
jTokenvarchar(512)Authentication token from Authentication API
jEntrySequenceNumberint64Last received sequence number. Default is 0 if not provided
jRequestIDvarchar(255)Echo‑back field

Example Sync Messages Request

{
"jMessageType": "SYNC_MESSAGES",
"jEventType": 8,
"jManagerID": "<MANAGER1>",
"jCustomerId": "<MEMBER>",
"jExchange": 1,
"jToken": "<Token received in the Authentication Response>",
"jEntrySequenceNumber": "<max sequence no>",
"jRequestID": "<Echo back field>"
}

📝 Sync Messages Response

The response contains the following parameters:

ParameterData TypeDescription
jManagerIdvarchar(50)User ID assigned to the user
jEventTypeintEcho‑back field (same value sent in the request)
jCustomerIdvarchar(50)Customer ID assigned to the user
jLastSyncedPacketintIndicates if this is the last packet: 1 = last packet
jNoOfRecordsintNumber of records returned
jMessageDetail Structure (array)Array of message objects matching the selected jEventType; size = jNoOfRecords
jRequestIDvarchar(255)Echo‑back field
jResponseIDvarchar(255)System‑generated alphanumeric ID

Example Response

{
"jData": {
"ManagerID": "KOTAL_10.0.0.1",
"CustomerId": "KOTAK",
"NoOfRecords": 2,
"CashCollateralDetail": [
{
"EventType": 1,
"GroupID": "HO",
"UserID": "R1",
"Key": "CC_HO_R1_1",
"LastUpdateTime": 2349888554,
"Periodicity": 1,
"DepositHeads": { },
"Utilization": { }
},
{
"EventType": 1,
"GroupID": "HO",
"UserID": "R2",
"Key": "CC_HO_R2_121",
"LastUpdateTime": 2349888554,
"Periodicity": 121,
"DepositHeads": { },
"Utilization": { }
}
]
}
}
ParameterDatatypeDescription
MessageTypenVarchar(45)CASH_COLLATERAL
ManagerIDvarchar(40)Null (not used)
GroupIDnVarchar(30)Group ID assigned to the user
UserIDchar(15)User ID assigned to the user
EventTypeintAlways 1
sKeynVarchar(145)Composite key: CC + GroupId + DealerId + Periodicity + User
PeriodicitynVarchar(100)Exchange / periodicity (e.g., NSE, BSE, MSE, All Exchange Combine)
CashDepositbigint(8)Deposited cash of user
AdhocDepositbigint(8)0
MiscDepositfloat(8)0
OverdraftLimitfloat(8)0
NotionalDepositfloat(8)0
ManualCollateralfloat(8)0
OptionCFSfloat(8)0
DPPledgedCollateralnumeric(9)0
POOLPledgedCollateralnumeric(9)0
DPCreditForSalenumeric(9)0
POOLCreditForSalenumeric(9)0
SARCollateralnumeric(9)0
DPCollateralnumeric(9)0
POOLCollateralnumeric(9)0
SARCreditForSalenumeric(9)0
Tplus5HoldingCollateralbigint(8)0
Tplus5HaircutCollateralbigint(8)0
Tplus5CFSint(4)0
MaxMarginfloat(8)Margin assigned
ExposureMarginfloat(8)Exposure margin assigned to user
Premiumbigint(8)Allotted net premium
BookedPLfloat(8)0
MTMPLfloat(8)0
Brokeragefloat(8)0
CumulativeDepositbigint(8)Limit inclusion limit set for user
LastUpdateTimebigint(8)getdate() equivalent timestamp (milliseconds)