Snapshot Book

With the help of this function you can fetch Book Data for a given contract. It takes as parameters: the contract, level, dataType and the callback function that will be called when the result is available.

function snapshotBook(contract, level, dataType, callback)

Possible Responses:

  • Success

{
    "RQT":"snapshotBook",           // Request Type
    "RQI":"19",                     // Request Id
    "RES":"OK",                     // Result
    "INS":"ESZ19",                  // Contract
    "ASKS":[                        // ASKS
    {
        "PR": "3106.25"             // Ask Value
        "PO": "1",                  // Ask Position
        "PZ": "15"                  // Ask Size
    },
    {
        "PR": "3106.5"              // Ask Value
        "PO": "2",                  // Ask Position
        "PZ": "70"                  // Ask Size
    },
    ...
    ]
    "BIDS":[                        // BIDS
    {
        "PR": "3106.0"              // Bid Value
        "PO": "1",                  // Bid Position
        "PZ": "61"                  // Bid Size
    },
    {
        "PR": "3105.75"             // Bid Value
        "PO": "2",                  // Bid Position
        "PZ": "89"                  // Bid Size
    },
    ...
    ]
}
  • Error

{
    "RQT":"snapshotBook",           // Request Type
    "RQI":"19",                     // Request Id
    "RES":"ERR",                    // Result
    "MSG":"Unknown contract"        // Error Message
}