{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/bigone/main/json-schema/bigone-convert-trade-schema.json",
  "title": "ConvertTrade",
  "description": "A completed or pending conversion trade.",
  "x-generated": "2026-10-13",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/bigone-convert-openapi.yml#/components/schemas/ConvertTrade",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "description": "The unique trade ID.",
      "format": "int64"
    },
    "quote_id": {
      "type": "string",
      "description": "The quote ID used for this trade."
    },
    "from_asset": {
      "type": "string",
      "description": "The source asset symbol."
    },
    "to_asset": {
      "type": "string",
      "description": "The destination asset symbol."
    },
    "from_sz": {
      "type": "string",
      "description": "The amount converted from."
    },
    "to_sz": {
      "type": "string",
      "description": "The amount received."
    },
    "px": {
      "type": "string",
      "description": "The execution price."
    },
    "ts": {
      "type": "integer",
      "format": "int64",
      "description": "The timestamp when the trade was executed (Unix milliseconds)."
    },
    "state": {
      "type": "string",
      "description": "The current state of the conversion trade.",
      "enum": [
        "PENDING",
        "PROCESSING",
        "SUCCEEDED",
        "FAILED"
      ]
    },
    "acct_typ": {
      "type": "string",
      "enum": [
        "FUND",
        "SPOT"
      ],
      "description": "The account type used for the trade."
    }
  }
}