{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/swapwallet-app/json-schema/swapwallet-app-otc-swap-request-schema.json",
  "title": "OtcSwapRequest",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/swapwallet-app-openapi.yaml#/components/schemas/OtcSwapRequest",
  "type": "object",
  "properties": {
    "sourceToken": {
      "$ref": "#/$defs/TokenEnum",
      "description": "توکن مبدأ"
    },
    "destinationToken": {
      "$ref": "#/$defs/TokenEnum",
      "description": "توکن مقصد"
    },
    "sourceAmount": {
      "type": [
        "string",
        "null"
      ],
      "description": "مقدار توکن مبدأ برای فروش (با `destinationAmount` نمی‌توان همزمان ارسال کرد)"
    },
    "destinationAmount": {
      "type": [
        "string",
        "null"
      ],
      "description": "مقدار توکن مقصد مورد نیاز (با `sourceAmount` نمی‌توان همزمان ارسال کرد)"
    }
  },
  "required": [
    "sourceToken",
    "destinationToken"
  ],
  "$defs": {
    "TokenEnum": {
      "type": "string",
      "enum": [
        "USDT",
        "TON",
        "TRX",
        "IRT",
        "ETH",
        "BNB"
      ]
    }
  }
}