Commodities
Objects
Ggoption

Object: ggOption

This object contains the full Options Chain for an underlying asset at 1-min & 5-min intervals.

Schema

Json
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "StockOptionsProfile",
  "description": "Describes stock options, including historical data organized by timestamps.",
  "type": "object",
  "properties": {
    "symbol": {
      "description": "Underlying stock's ticker symbol.",
      "type": "string"
    },
    "optionType": {
      "description": "Type of the option (call or put).",
      "type": "string",
      "enum": ["call", "put"]
    },
    "strikePrice": {
      "description": "Strike price of the option.",
      "type": "number"
    },
    "expirationDate": {
      "description": "Expiration date of the option.",
      "type": "string",
      "format": "date"
    },
    "historicalData": {
      "description": "Dictionary of historical data for the option, keyed by timestamps.",
      "type": "object",
      "additionalProperties": {
        "type": "object",
        "properties": {
          "oneMinute": {
            "description": "1-minute candle data.",
            "type": "object",
            "properties": {
              "open": { "type": "number" },
              "high": { "type": "number" },
              "low": { "type": "number" },
              "close": { "type": "number" },
              "volume": { "type": "integer", "minimum": 0 }
            },
            "required": ["open", "high", "low", "close", "volume"]
          },
          "fiveMinute": {
            "description": "Optional 5-minute candle data.",
            "type": "object",
            "properties": {
              "open": { "type": "number" },
              "high": { "type": "number" },
              "low": { "type": "number" },
              "close": { "type": "number" },
              "volume": { "type": "integer", "minimum": 0 }
            },
            "required": ["open", "high", "low", "close", "volume"]
          }
        },
        "required": ["oneMinute"]
      }
    }
  },
  "required": ["symbol", "optionType", "strikePrice", "expirationDate", "historicalData"]
}
Yang
module stock-options-profile {
  namespace "http://example.com/stock-options-profile";
  prefix sop;

  organization "Example Organization";
  description "Describes the options for a stock, including historical data keyed by timestamps.";

  container stockOptionsProfile {
    leaf symbol {
      type string;
      description "Underlying stock's ticker symbol.";
    }

    leaf optionType {
      type enumeration {
        enum call {
          description "Call option.";
        }
        enum put {
          description "Put option.";
        }
      }
      description "Type of the option (call or put).";
    }

    leaf strikePrice {
      type decimal64 {
        fraction-digits 2;
      }
      description "Strike price of the option.";
    }

    leaf expirationDate {
      type string;
      description "Expiration date of the option.";
    }

    container historicalData {
      description "Dictionary of historical data for the option, keyed by timestamps.";

      list candleData {
        key "timestamp";
        leaf timestamp {
          type string;
          description "Timestamp marking the beginning of the historical data point.";
        }

        container oneMinute {
          description "1-minute candle data.";
          leaf open {
            type decimal64 {
              fraction-digits 2;
            }
          }
          leaf high {
            type decimal64 {
              fraction-digits 2;
            }
          }
          leaf low {
            type decimal64 {
              fraction-digits 2;
            }
          }
          leaf close {
            type decimal64 {
              fraction-digits 2;
            }
          }
          leaf volume {
            type uint64;
            description "Volume of options traded.";
          }
        }

        container fiveMinute {
          description "Optional 5-minute candle data.";
          leaf open {
            type decimal64 {
              fraction-digits 2;
            }
          }
          leaf high {
            type decimal64 {
              fraction-digits 2;
            }
          }
          leaf low {
            type decimal64 {
              fraction-digits 2;
            }
          }
          leaf close {
            type decimal64 {
              fraction-digits 2;
            }
          }
          leaf volume {
            type uint64;
            description "Volume of options traded.";
          }
        }
      }
    }
  }
}

Example