{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cspriceapi-com/json-schema/cspriceapi-com-youpin-buyorder-response-schema.json",
  "title": "YoupinBuyorderResponse",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cspriceapi-com-buyorder-prices-api-openapi.yml#/components/schemas/YoupinBuyorderResponse",
  "allOf": [
    {
      "$ref": "#/$defs/BaseWrapper"
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/YoupinBuyorderItem"
          }
        },
        "source": {
          "type": "string",
          "enum": [
            "YouPin"
          ]
        }
      },
      "required": [
        "data"
      ]
    }
  ],
  "$defs": {
    "BaseWrapper": {
      "type": "object",
      "description": "Envelope fields returned by every `GET /v1/prices/*` response.",
      "properties": {
        "source": {
          "type": "string",
          "description": "Human-readable marketplace identifier."
        },
        "requestor": {
          "type": "string",
          "format": "email",
          "description": "Email address associated with the API key making the call."
        },
        "plan": {
          "type": "string",
          "description": "Plan of the API key (e.g. `free`, `pro`, `enterprise`)."
        },
        "timestamp": {
          "allOf": [
            {
              "$ref": "#/$defs/UpdatedAt"
            }
          ],
          "description": "Server time when this response was produced."
        }
      },
      "required": [
        "source",
        "timestamp"
      ]
    },
    "DecimalString": {
      "type": "string",
      "description": "Fixed-point decimal value serialized as a string (preserves precision\nacross languages). Parse with an arbitrary-precision decimal library;\ndo **not** parse as a native float.\n",
      "pattern": "^-?\\d+(\\.\\d+)?$"
    },
    "Phase": {
      "type": [
        "string",
        "null"
      ],
      "description": "Doppler phase, normalised to English. Empty string or `null` for\nnon-phase items.\n"
    },
    "UpdatedAt": {
      "type": "string",
      "format": "date-time",
      "description": "ISO-8601 UTC timestamp (millisecond precision)."
    },
    "YoupinBuyorderItem": {
      "type": "object",
      "description": "Current YouPin buy-order row.",
      "properties": {
        "id": {
          "type": "integer"
        },
        "market_hash_name": {
          "type": "string"
        },
        "templateId": {
          "type": [
            "integer",
            "null"
          ]
        },
        "buyorder_price": {
          "allOf": [
            {
              "$ref": "#/$defs/DecimalString"
            }
          ],
          "nullable": true,
          "description": "Highest standing buy-order price (CNY / RMB)."
        },
        "blue_buyorder_price": {
          "allOf": [
            {
              "$ref": "#/$defs/DecimalString"
            }
          ],
          "nullable": true,
          "description": "Highest \"blue\"-tier buy-order price (CNY / RMB), used e.g. for certain Doppler phases."
        },
        "phase": {
          "$ref": "#/$defs/Phase"
        },
        "typeId": {
          "type": [
            "integer",
            "null"
          ]
        },
        "updated_at": {
          "$ref": "#/$defs/UpdatedAt"
        },
        "count": {
          "type": [
            "integer",
            "null"
          ]
        }
      },
      "required": [
        "id",
        "market_hash_name"
      ]
    }
  }
}