Snapshot

This function is used to request a snapshot for the specified contract. It takes two parameters: the contract and the callback function that will be called when the result is available.

function snapshot(contract, callback)

Note

Please note that this request does not start the streaming updates for the specified contract. For that purpose, you’ll have to use Register Quote request.

Possible Responses:

  • Success

{
    "RQT":"snapshot",                   // Request Type
    "RQI":"12",                         // 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":"snapshot",                   // Request Type
    "RQI":"12",                         // Request Id
    "RES":"ERR",                        // Result
    "MSG":"Unknown contract"            // Error Message
}