Register Quote
This function registers the quote for the specified contract. It takes two parameters: the contract and the callback function that will be called when the result is available.
Important
The first response from this function will be processed by the callback function passed in register function.
If the registration succeeds, the streaming updates for this quote is started. After the first response, the stream of updates will start and will be processed by the callback function used as a parameter in init function.
function register(contract, callback)
Possible Responses:
Success
{
"RQT":"register", // Request Type
"RQI":"4", // Request Id
"RES":"OK", // Result
"AK":"3800", // Ask
"AT":"03/27/2017 - 18:09:42", // Ask Timestamp
"AZ":"10", // Ask Size
"BD":"3796", // Bid
"BT":"03/27/2017 - 18:09:42", // Bid Timestamp
"BZ":"5", // Bid Size
"HG":"3905", // High
"HT":"03/27/2017 - 15:19:13", // High Timestamp
"INF": "T", // Info: Trading / Settled
"INS":"ESZ17", // Instrument
"LT":"03/27/2017 - 15:01:02", // Low Timestamp
"LW":"3786", // Low
"OI":"1223", // Open Interest
"OP":"3800", // Open
"CL":"", // Close
"PS":"3798", // Previous Settlement
"ST":"", // Settlement
"TR":"3800", // Trade
"TT":"03/27/2017 - 15:01:02", // Trade Timestamp
"TZ":"2", // Trade Size
"VL":"2995" // Volume
}
Error
{
"RQT":"register", // Request Type
"RQI":"4", // Request Id
"RES":"ERR", // Result
"MSG":"Unknown contract" // Error Message
}