market:options:trades:cme

Subscribes/Unsubscribes to options trades data for CME.

Make sure you're connected to this subscription: wss://ws.web3api.io/cme. You must specify the instrument symbol.

🚧

CME Authorization

You must have a valid license directly with CME to consume CME data via Amberdata's Websockets. Please connect with your Amberdata Account Executive if you have any questions.

Request

{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "subscribe",
    "params": [
        "market:options:trades:cme",
        {
            "symbol": "W2EK3 C31250"
        }
    ]
}
ParamTypeDescription
symbolstringThe asset instrument.

Response

{
    "jsonrpc": "2.0",
    "method": "subscription",
    "params": {
        "subscription": "u49r3xf7jtflha242udhm6uo6059rxo24q111s9kfmi24n6ppm5cysmskvaj6sap",
        "result": {
            "exchange": "CME",
            "symbol": "W2EK3 C31250",
            "exchangeTimestamp": 1683119795534,
            "exchangeTimestampNanoseconds": 591705,
            "receivedTimestamp": 1683119797069,
            "receivedTimestampNanoseconds": 418,
            "sentTime": "null",
            "tradeSummary": {
                "aggressorSide": "2",
                "mdTradeEntryId": "1734013",
                "tradePrice": "175",
                "tradeQty": "100",
                "tradeOrderCount": "2",
                "tradeUpdateAction": "NEW",
                "orderQty": {
                    "orderId": "2",
                    "lastOrdQty": "100"
                }
            },
            "instrument": {
                "definitionSource": "E",
                "exchangeMic": "XCME",
                "id": "186245",
                "marketSegmentId": "74",
                "periodCode": "202305",
                "productCode": "W2E",
                "productGroup": "OOF",
                "productType": "B1",
                "symbol": "W2EK3 C31250",
                "putOrCall": "Call",
                "strikePrice": "31250000000000",
                "underlyingSymbol": "MBTK3"
            }
        }
    }
}

Example

const WebSocket = require('ws');
const ws = new WebSocket('wss://ws.web3api.io/cme', {headers: {x-api-key:'<api_key>'}});

ws.on('open', () => {
  ws.send(JSON.stringify({
      jsonrpc: '2.0',
      method: 'subscribe',
      params  : [ "market:options:trades:cme", { "symbol": "W2EK3 C31250" } ],
      id: 1,
    }));
});

ws.on('message', data => {
  console.log(JSON.stringify(JSON.parse(data), null, 2));
});