{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/trdefi-com/json-schema/trdefi-com-position-request-schema.json",
  "title": "PositionRequest",
  "x-generated": "2026-11-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/trdefi-com-openapi.json#/components/schemas/PositionRequest",
  "type": "object",
  "required": [
    "chain",
    "wallet",
    "deposits"
  ],
  "properties": {
    "chain": {
      "type": "string",
      "enum": [
        "base",
        "arc",
        "baseSepolia"
      ],
      "description": "Chain key. `base` = 8453, `arc` = 5042, `baseSepolia` = 84532. A test key may only name `baseSepolia`; a live key may not."
    },
    "wallet": {
      "type": "string",
      "pattern": "^0x[a-fA-F0-9]{40}$",
      "description": "The address that will sign. It must be yours. We only ever prepare for the address you name here."
    },
    "deposits": {
      "type": "array",
      "minItems": 2,
      "maxItems": 2,
      "description": "Exactly two tokens. Each `amount` is an integer string in **base units** — never a float. You supply both sides, so we never have to guess a price.",
      "items": {
        "type": "object",
        "required": [
          "symbol",
          "amount"
        ],
        "properties": {
          "symbol": {
            "type": "string",
            "description": "Token symbol or address. Supported — base: USDC, USDT, EURC · arc: USDC, EURC · baseSepolia: USDC, USDT."
          },
          "amount": {
            "type": "string",
            "description": "Amount in base units, as a string."
          }
        }
      }
    },
    "makerFeeBps": {
      "type": "integer",
      "minimum": 0,
      "maximum": 2000000,
      "default": 0,
      "description": "**Your** commission, in the protocol's 1e7 fee scale (`30000` = 0.30%). Independent of, and on top of, the 0.05% protocol fee."
    },
    "includeApprovals": {
      "type": "boolean",
      "default": true,
      "description": "Set `false` to receive only the `ship` step. By default the `approve` steps are included **only where your live allowance is short**."
    },
    "checkBalances": {
      "type": "boolean",
      "default": false,
      "description": "Add live balance checks to `preflight` so you can tell a human the transfer will succeed before asking them to approve."
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "Bounded free-form map (no secrets). Echoed back; returned in webhooks and exports."
    }
  }
}