{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/alpaca/json-schema/alpaca-snapshot-schema.json",
  "title": "Snapshot",
  "description": "The Snapshot API for one ticker provides the latest trade, latest quote, minute bar daily bar and previous daily bar data for a given ticker symbol.\n",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/alpaca-crypto-pricing-data-api-api-openapi.yml#/components/schemas/Snapshot",
  "type": "object",
  "properties": {
    "latestTrade": {
      "$ref": "#/$defs/Trade"
    },
    "latestQuote": {
      "$ref": "#/$defs/Quote"
    },
    "minuteBar": {
      "$ref": "#/$defs/Bar"
    },
    "dailyBar": {
      "$ref": "#/$defs/Bar"
    },
    "prevDailyBar": {
      "$ref": "#/$defs/Bar"
    }
  },
  "$defs": {
    "Bar": {
      "title": "Bar",
      "type": "object",
      "description": "The bars API returns aggregate historical data for the requested securities.\n",
      "properties": {
        "t": {
          "type": "string",
          "description": "Timestamp in RFC-3339 format with nanosecond precision.",
          "format": "date-time"
        },
        "x": {
          "type": "string",
          "description": "Exchange. Only present on Bars for Crypto symbols",
          "enum": [
            "FTXU",
            "ERSX",
            "CBSE"
          ]
        },
        "o": {
          "type": "number",
          "description": "Open price"
        },
        "h": {
          "type": "number",
          "description": "High price."
        },
        "l": {
          "type": "number",
          "description": "Low price.\n"
        },
        "c": {
          "type": "number",
          "description": "Close price."
        },
        "v": {
          "description": "Volume.",
          "type": "number"
        },
        "n": {
          "type": "integer",
          "description": "Number of trades.",
          "format": "int64"
        },
        "vw": {
          "description": "Volume weighted average price.",
          "type": "number"
        }
      },
      "required": [
        "t",
        "o",
        "h",
        "l",
        "c",
        "v"
      ]
    },
    "Quote": {
      "title": "Quote",
      "type": "object",
      "description": "The Quotes API provides NBBO quotes for a given ticker symbol at a specified date.\n",
      "properties": {
        "t": {
          "type": "string",
          "description": "Timestamp in RFC-3339 format with nanosecond precision",
          "format": "date-time"
        },
        "ax": {
          "type": "string",
          "description": "ask exchange (Stock quote only)"
        },
        "ap": {
          "type": "number",
          "description": "ask price\n"
        },
        "as": {
          "type": "number",
          "description": "ask size\n"
        },
        "bx": {
          "type": "string",
          "description": "bid exchange (Stock quote only)"
        },
        "bp": {
          "type": "number",
          "description": "bid price\n"
        },
        "bs": {
          "description": "bid size",
          "type": "number"
        },
        "c": {
          "type": "array",
          "description": "quote conditions (Stock quotes only)",
          "items": {
            "type": "string"
          }
        },
        "x": {
          "type": "string",
          "description": "Exchange (Crypto quote Only)"
        },
        "z": {
          "type": "string",
          "description": "Tape (Stock quote only)"
        }
      },
      "required": [
        "t"
      ]
    },
    "Trade": {
      "title": "Trade",
      "type": "object",
      "description": "A model representing a trade",
      "properties": {
        "t": {
          "type": "string",
          "description": "Timestamp in RFC-3339 format with nanosecond precision",
          "format": "date-time"
        },
        "x": {
          "type": "string",
          "description": "Exchange where the trade happened."
        },
        "p": {
          "type": "number",
          "description": "Trade price."
        },
        "s": {
          "type": "number",
          "description": "Trade Size."
        },
        "c": {
          "type": "array",
          "description": "Trade conditions (Stock trade only)",
          "items": {
            "type": "string"
          }
        },
        "i": {
          "type": "integer",
          "description": "Trade ID",
          "format": "int64"
        },
        "z": {
          "type": "string",
          "description": "Tape (Stock trade only)"
        },
        "tks": {
          "type": "string",
          "description": "Taker's side (crypto trade only)"
        }
      },
      "required": [
        "x",
        "i"
      ]
    }
  }
}