{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/lightspark/main/json-schema/lightspark-exchange-rate-list-response-schema.json",
  "title": "ExchangeRateListResponse",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/lightspark-exchange-rates-api-openapi.yml#/components/schemas/ExchangeRateListResponse",
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "array",
      "description": "List of exchange rates matching the filter criteria",
      "items": {
        "$ref": "#/$defs/ExchangeRate"
      }
    }
  },
  "$defs": {
    "Currency": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "description": "Three-letter currency code (ISO 4217) for fiat currencies. Some cryptocurrencies may use their own ticker symbols (e.g. \"BTC\" for Bitcoin, \"USDC\" for USDC, etc.)"
        },
        "name": {
          "type": "string",
          "description": "Full name of the currency"
        },
        "symbol": {
          "type": "string",
          "description": "Symbol of the currency"
        },
        "decimals": {
          "type": "integer",
          "description": "Number of decimal places for the currency",
          "minimum": 0
        }
      }
    },
    "ExchangeRate": {
      "type": "object",
      "description": "Exchange rate information for a currency corridor",
      "required": [
        "sourceCurrency",
        "destinationCurrency",
        "destinationPaymentRail",
        "minSendingAmount",
        "maxSendingAmount",
        "sendingAmount",
        "receivingAmount",
        "exchangeRate",
        "fees",
        "updatedAt"
      ],
      "properties": {
        "sourceCurrency": {
          "$ref": "#/$defs/Currency"
        },
        "sendingAmount": {
          "type": "integer",
          "format": "int64",
          "description": "The sending amount in the smallest unit of the source currency (e.g., cents for USD). Echoed back from the request if provided.",
          "minimum": 0
        },
        "minSendingAmount": {
          "type": "integer",
          "format": "int64",
          "description": "The minimum supported sending amount in the smallest unit of the source currency.",
          "minimum": 0
        },
        "maxSendingAmount": {
          "type": "integer",
          "format": "int64",
          "description": "The maximum supported sending amount in the smallest unit of the source currency.",
          "minimum": 0
        },
        "destinationCurrency": {
          "$ref": "#/$defs/Currency"
        },
        "destinationPaymentRail": {
          "allOf": [
            {
              "$ref": "#/$defs/PaymentRail"
            },
            {
              "description": "The payment rail used for the destination (e.g., UPI, SEPA_INSTANT, MOBILE_MONEY, FASTER_PAYMENTS)"
            }
          ]
        },
        "receivingAmount": {
          "type": "integer",
          "format": "int64",
          "description": "The receiving amount in the smallest unit of the destination currency",
          "minimum": 0
        },
        "exchangeRate": {
          "type": "number",
          "description": "Number of sending currency units per receiving currency unit.",
          "exclusiveMinimum": 0
        },
        "fees": {
          "$ref": "#/$defs/ExchangeRateFees"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "description": "Timestamp when this exchange rate was last refreshed"
        }
      }
    },
    "ExchangeRateFees": {
      "type": "object",
      "description": "Fees associated with an exchange rate",
      "properties": {
        "fixed": {
          "type": "integer",
          "format": "int64",
          "description": "Fixed fee in the smallest unit of the sending currency (e.g., cents for USD)",
          "minimum": 0
        },
        "total": {
          "type": "integer",
          "format": "int64",
          "description": "Total fees in the smallest unit of the sending currency (e.g., cents for USD). This value may change depending on the sending amount used; if no sending amount is specified, it falls back to the default.",
          "minimum": 0
        }
      }
    },
    "PaymentRail": {
      "type": "string",
      "enum": [
        "ACH",
        "ACH_COLOMBIA",
        "BANK_TRANSFER",
        "BRE_B",
        "CIPS",
        "FAST",
        "FASTER_PAYMENTS",
        "FEDNOW",
        "INSTAPAY",
        "MOBILE_MONEY",
        "NEFT",
        "PAYNOW",
        "PESONET",
        "PIX",
        "RTGS",
        "RTP",
        "SEPA",
        "SEPA_INSTANT",
        "SPEI",
        "SWIFT",
        "UNIONPAY",
        "UPI",
        "WIRE"
      ],
      "description": "The payment rail used for the transfer. Payment rails represent the underlying payment network or system used to move funds between accounts."
    }
  }
}