{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/wagyu-xyz/json-schema/wagyu-xyz-swap-terms-schema.json",
  "title": "SwapTerms",
  "x-generated": "2026-11-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/wagyu-xyz-openapi.json#/components/schemas/SwapTerms",
  "type": "object",
  "properties": {
    "depositWindowMinutes": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "How long a new order waits for its deposit, top-ups included. Each order states its own deadline as `expiresAt`; count down to that, not to this."
    },
    "chains": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "chainId": {
            "$ref": "#/$defs/ChainId"
          },
          "depositEnabled": {
            "type": "boolean",
            "description": "Whether POST /v2/swaps accepts an order sending from this chain right now."
          },
          "minDepositUsd": {
            "type": "number",
            "description": "Smallest order sending from this chain, in US dollars. A quote's `minDepositUsd` is the same value."
          },
          "confirmations": {
            "type": "object",
            "properties": {
              "min": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "max": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "min",
              "max"
            ],
            "additionalProperties": false,
            "description": "Confirmations a deposit from this chain needs before the order acts on it. Where min and max differ (Monero, Zcash), bigger deposits and busier periods need more. An order's own `requiredConfirmations` is the value that applies to it."
          }
        },
        "required": [
          "chainId",
          "depositEnabled",
          "minDepositUsd",
          "confirmations"
        ],
        "additionalProperties": false
      },
      "description": "Every chain an order can send from, with its live availability."
    },
    "partialDeposit": {
      "type": "object",
      "properties": {
        "executesFromPercent": {
          "type": "number",
          "description": "A token deposit of at least this share of `depositAmount` counts as paid and executes on what arrived."
        },
        "noticeFromPercent": {
          "type": "number",
          "description": "An arrival below this share of `depositAmount` is treated as stray dust: no short-deposit notice."
        },
        "continueFromUsd": {
          "type": "number",
          "description": "When the top-up wait ends, a short deposit worth at least this many US dollars executes on what arrived. A smaller one expires and support returns it."
        }
      },
      "required": [
        "executesFromPercent",
        "noticeFromPercent",
        "continueFromUsd"
      ],
      "additionalProperties": false
    },
    "recoveryCheckMinutes": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        {
          "type": "null"
        }
      ],
      "description": "Longest wait before an order waiting on recovery (for example after a refund or payout address is submitted) is checked again. `null` when the check does not run on a fixed interval."
    },
    "integratorFee": {
      "type": "object",
      "properties": {
        "maxPercent": {
          "type": "number",
          "description": "Highest `integratorFeePercent` a quote or order accepts."
        }
      },
      "required": [
        "maxPercent"
      ],
      "additionalProperties": false
    },
    "defaultLimits": {
      "type": "object",
      "properties": {
        "requestLimitPerMin": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "quoteLimitPerMin": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "createLimitPerMin": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "maxOpenOrders": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "openOrderWindowMinutes": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "requestLimitPerMin",
        "quoteLimitPerMin",
        "createLimitPerMin",
        "maxOpenOrders",
        "openOrderWindowMinutes"
      ],
      "additionalProperties": false,
      "description": "Per-client limits that apply without an integrator key. An integration can have higher ones: GET /v2/integrator/me returns yours."
    }
  },
  "required": [
    "depositWindowMinutes",
    "chains",
    "partialDeposit",
    "recoveryCheckMinutes",
    "integratorFee",
    "defaultLimits"
  ],
  "additionalProperties": false,
  "$defs": {
    "ChainId": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991,
      "description": "Non-negative integer chain identifier."
    }
  }
}