{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bitnob/json-schema/bitnob-create-transaction-request-schema.json",
  "title": "CreateTransactionRequest",
  "x-generated": "2026-11-16",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/bitnob-swagger-openapi.yml#/components/schemas/CreateTransactionRequest",
  "properties": {
    "amount": {
      "description": "Amount to send as a human-readable decimal in the asset's display unit",
      "type": "string"
    },
    "asset": {
      "description": "Asset to send — the asset ID (e.g. USDT_TRX, USDC_ETH, TRX) or, for a single-chain wallet, the bare symbol (e.g. USDT) which resolves to the wallet's chain. See GET /assets for the full list.",
      "type": "string"
    },
    "fee_level": {
      "description": "Fee priority level: low, medium, or high",
      "enum": [
        "low",
        "medium",
        "high"
      ],
      "type": "string"
    },
    "fee_rate": {
      "description": "Explicit Bitcoin fee rate in sat/vB; overrides fee_level. Bitcoin only",
      "type": "string"
    },
    "fill_fee_from_unselected": {
      "description": "Top up from the rest of the wallet if pinned inputs don't cover amount+fee. Bitcoin only.",
      "type": "boolean"
    },
    "inputs": {
      "description": "Bitcoin UTXOs to spend ({txid, vout}). Coin control — Bitcoin only. Not supported with treat_as_gross_amount, or when the transaction would require approval or a policy time-delay (returns 400).",
      "items": {
        "$ref": "#/$defs/TransactionInput"
      },
      "maxItems": 250,
      "type": "array"
    },
    "max_fee_rate": {
      "description": "Bitcoin fee-rate ceiling in sat/vB; caps the effective rate. Bitcoin only",
      "type": "string"
    },
    "network": {
      "deprecated": true,
      "description": "Deprecated. The environment determines the network (live→mainnet, sandbox→testnet); an omitted value defaults to the wallet's network. Ignored when it contradicts the environment.",
      "type": "string"
    },
    "note": {
      "description": "Optional partner-supplied note to attach to the transaction",
      "type": "string"
    },
    "sponsor": {
      "description": "Whether to have the network fee sponsored",
      "type": "boolean"
    },
    "to_address": {
      "description": "Recipient address",
      "type": "string"
    },
    "treat_as_gross_amount": {
      "description": "Whether the amount is treated as gross (fee deducted from it) rather than net",
      "type": "boolean"
    },
    "wallet_id": {
      "description": "Identifier of the wallet to send from",
      "format": "uuid",
      "type": "string"
    }
  },
  "required": [
    "wallet_id",
    "to_address",
    "amount",
    "asset"
  ],
  "type": "object",
  "$defs": {
    "TransactionInput": {
      "properties": {
        "txid": {
          "description": "Transaction hash of the output to spend",
          "maxLength": 64,
          "minLength": 64,
          "type": "string"
        },
        "vout": {
          "description": "Output index within that transaction",
          "type": "string"
        }
      },
      "required": [
        "txid"
      ],
      "type": "object"
    }
  }
}