{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/grainfinance-co/json-schema/grainfinance-co-conversion-quote-request-body-schema.json",
  "title": "ConversionQuoteRequestBody",
  "description": "Information required by Grain in order to generate a conversion quote proposal.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/grainfinance-co-conversions-api-openapi.yml#/components/schemas/ConversionQuoteRequestBody",
  "properties": {
    "fromCurrency": {
      "$ref": "#/$defs/CurrencyCode",
      "description": "The currency in which the transaction should be paid at by your customer."
    },
    "toCurrency": {
      "$ref": "#/$defs/CurrencyCode",
      "description": "The currency in which the inventory item is listed at on your platform."
    },
    "toCurrencyAmount": {
      "type": "number",
      "format": "double",
      "description": "The amount of `toCurrency` to convert, using this amount and the conversion rate will determine the `fromCurrency` amount."
    }
  },
  "required": [
    "fromCurrency",
    "toCurrency"
  ],
  "type": "object",
  "additionalProperties": false,
  "$defs": {
    "CurrencyCode": {
      "type": "string",
      "description": "The alpha-3 ISO 4217 currency code of the related entity, in upper case.",
      "pattern": "^[A-Z]{3}$"
    }
  }
}