{
  "components": {
    "schemas": {
      "AcceptSwapQuoteResponse": {
        "properties": {
          "accepted_at": {
            "type": "string"
          },
          "order_id": {
            "format": "uuid",
            "type": "string"
          },
          "quote_id": {
            "format": "uuid",
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "quote_id",
          "order_id",
          "status",
          "accepted_at"
        ],
        "type": "object"
      },
      "ApiKeyListResponse": {
        "properties": {
          "keys": {
            "items": {
              "$ref": "#/components/schemas/ApiKeySummary"
            },
            "type": "array"
          }
        },
        "required": [
          "keys"
        ],
        "type": "object"
      },
      "ApiKeySummary": {
        "properties": {
          "audience": {
            "type": "string"
          },
          "auth_scheme": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "ip_allowlist": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "key_last4": {
            "type": "string"
          },
          "last_used_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "withdrawal_scope_granted_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "key_last4",
          "scopes",
          "audience",
          "auth_scheme",
          "ip_allowlist",
          "created_at"
        ],
        "type": "object"
      },
      "BankAccountDetails": {
        "description": "Bank account details attached to a fiat recipient or fiat settlement record.",
        "properties": {
          "account_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "account_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "bank_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "bank_name": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "BankResponse": {
        "description": "Supported bank metadata for fiat recipient setup and account verification.",
        "properties": {
          "bank_code": {
            "description": "Bank code (CBN code)",
            "example": "044",
            "type": [
              "string",
              "null"
            ]
          },
          "institution_code": {
            "description": "Institution code",
            "example": "000014",
            "type": "string"
          },
          "institution_name": {
            "description": "Bank name",
            "example": "Access Bank",
            "type": "string"
          }
        },
        "required": [
          "institution_code",
          "institution_name"
        ],
        "type": "object"
      },
      "BankTransferSettlementDetails": {
        "description": "Bank transfer settlement details for a fiat wallet transaction. Withdrawals also carry `transfer_count` and a `transfers` list with one entry per bank transfer.",
        "properties": {
          "confirmed_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "credited_amount": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/MoneyAmount",
                "description": "Deposit credited after the customer fee, before any automatic credit repayment."
              }
            ]
          },
          "customer_fee": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/MoneyAmount",
                "description": "Customer deposit charge, in the wallet currency. Gross `amount` remains unchanged."
              }
            ]
          },
          "depositor": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/BankAccountDetails",
                "description": "Originator details reported with an inbound bank deposit."
              }
            ]
          },
          "failed_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "fee": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/MoneyAmount",
                "description": "Reported bank fee. Informational only; it does not change the amount\ncredited to the customer."
              }
            ]
          },
          "rail_reference": {
            "type": "string"
          },
          "recipient": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/BankAccountDetails",
                "description": "Destination bank account for a withdrawal. For a withdrawal with\nseveral beneficiaries this is the first beneficiary; use the\nper-transfer `recipient` in `transfers` for the others."
              }
            ]
          },
          "transfer_count": {
            "description": "Number of bank transfers created for a withdrawal. Present only on\nwithdrawals. Greater than one when the request had several\nbeneficiaries or an amount was split above the per-transfer limit.",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "transfers": {
            "description": "One entry per bank transfer, in `sequence` order, each with its own\nstatus. Present only on withdrawals. Use it to see which beneficiaries\nwere paid when the parent status is `partial`.",
            "items": {
              "$ref": "#/components/schemas/BankTransferSplitPreview"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "rail_reference"
        ],
        "type": "object"
      },
      "BankTransferSplitPreview": {
        "description": "One bank transfer that pays part or all of a withdrawal, with its own status, beneficiary position, and recipient.",
        "properties": {
          "amount": {
            "description": "Amount of this transfer in major units.",
            "type": "string"
          },
          "client_item_id": {
            "description": "The `client_item_id` you supplied for this beneficiary, if any.",
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "description": "The description you supplied for this beneficiary, if any.",
            "type": [
              "string",
              "null"
            ]
          },
          "item_index": {
            "description": "Position of the beneficiary in the submitted `items` list, starting\nat 0.",
            "format": "int32",
            "type": "integer"
          },
          "item_transfer_index": {
            "description": "Position of this transfer within its beneficiary, starting at 1. Above\n1 only when that beneficiary's amount was split across transfers.",
            "format": "int32",
            "type": "integer"
          },
          "recipient": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/BankAccountDetails",
                "description": "Destination bank account for this transfer."
              }
            ]
          },
          "sequence": {
            "description": "Position of this transfer across the whole withdrawal, starting at 1.",
            "format": "int32",
            "type": "integer"
          },
          "status": {
            "description": "Status of this transfer alone: `pending`, `processing`, `success`,\nor `failed`.",
            "type": "string"
          }
        },
        "required": [
          "sequence",
          "item_index",
          "item_transfer_index",
          "amount",
          "status"
        ],
        "type": "object"
      },
      "CancelOrderResponse": {
        "description": "Result returned after a cancel request is accepted for processing.",
        "properties": {
          "cancelled_at": {
            "description": "Cancellation timestamp",
            "type": "string"
          },
          "order_id": {
            "description": "Cancelled order identifier",
            "format": "uuid",
            "type": "string"
          },
          "status": {
            "description": "Order status (cancelling)",
            "example": "cancelling",
            "type": "string"
          }
        },
        "required": [
          "order_id",
          "status",
          "cancelled_at"
        ],
        "type": "object"
      },
      "Candle": {
        "description": "Single calendar-aligned OHLCV candle. `is_closed=false` means the candle can still change.",
        "properties": {
          "close": {
            "description": "Closing price",
            "example": "1652.00",
            "type": "string"
          },
          "high": {
            "description": "Highest price",
            "example": "1655.00",
            "type": "string"
          },
          "is_closed": {
            "description": "`false` only for a final in-progress candle whose end is after `as_of`.",
            "type": "boolean"
          },
          "low": {
            "description": "Lowest price",
            "example": "1648.00",
            "type": "string"
          },
          "open": {
            "description": "Opening price",
            "example": "1650.00",
            "type": "string"
          },
          "timestamp": {
            "description": "Inclusive UTC start timestamp of this calendar-aligned candle bucket.",
            "format": "date-time",
            "type": "string"
          },
          "trade_count": {
            "description": "Number of trades in this candle",
            "example": 150,
            "format": "int64",
            "type": "integer"
          },
          "volume": {
            "description": "Volume in base currency",
            "example": "10000.00",
            "type": "string"
          },
          "volume_quote": {
            "description": "Volume in quote currency",
            "example": "16500000.00",
            "type": "string"
          }
        },
        "required": [
          "timestamp",
          "open",
          "high",
          "low",
          "close",
          "volume",
          "volume_quote",
          "trade_count",
          "is_closed"
        ],
        "type": "object"
      },
      "CandleInterval": {
        "description": "Supported duration of one OHLCV candle.",
        "enum": [
          "1m",
          "5m",
          "15m",
          "1h",
          "4h",
          "1d"
        ],
        "type": "string"
      },
      "CandlesResponse": {
        "description": "Non-empty OHLCV candles for an exact bounded UTC window, including its calculation timestamp.",
        "properties": {
          "as_of": {
            "description": "Point in time at which this response was calculated. A candle whose end\nis after this value is still open and can change.",
            "format": "date-time",
            "type": "string"
          },
          "candles": {
            "description": "Existing candles ordered from oldest to newest. Buckets with no trades\nare omitted rather than filled with synthetic prices.",
            "items": {
              "$ref": "#/components/schemas/Candle"
            },
            "type": "array"
          },
          "from": {
            "description": "Inclusive requested start boundary.",
            "format": "date-time",
            "type": "string"
          },
          "interval": {
            "description": "Candle interval",
            "example": "1h",
            "type": "string"
          },
          "pair_id": {
            "description": "Trading pair identifier",
            "example": "USD/NGN",
            "type": "string"
          },
          "to": {
            "description": "Exclusive requested end boundary.",
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "pair_id",
          "interval",
          "from",
          "to",
          "as_of",
          "candles"
        ],
        "type": "object"
      },
      "CngnConversionResponse": {
        "properties": {
          "currency": {
            "description": "Amounts are cumulative decimal wallet-currency strings, net of the deposit fee.",
            "type": "string"
          },
          "initially_restricted_amount": {
            "description": "Portion of the original net deposit awaiting conversion capacity.",
            "type": "string"
          },
          "released_amount": {
            "description": "Cumulative amount released from the conversion restriction. Read balances\nfor current spendability; later activity can consume released funds.",
            "type": "string"
          },
          "remaining_amount": {
            "description": "Initially restricted minus released and returned. Can include funds\ncommitted to a pending withdrawal; use quotes for withdrawal eligibility.",
            "type": "string"
          },
          "returned_amount": {
            "description": "Restricted amount returned through its origin rail or transferred to another Stabyl\naccount. Internal transfers retain the restriction for the recipient.",
            "type": "string"
          },
          "revision": {
            "description": "Increasing progress revision. Keep the highest revision per transaction\nacross REST reads and conversion.updated deliveries.",
            "format": "int64",
            "type": "integer"
          },
          "settlement_rail": {
            "description": "Origin settlement rail; for example CNGN for an NGN wallet.",
            "example": "CNGN",
            "type": "string"
          },
          "status": {
            "description": "pending while remaining_amount is positive; completed when it is zero.\nCompletion can result from release, return, or both.",
            "type": "string"
          },
          "transaction_id": {
            "description": "Incoming wallet transaction ID, not the blockchain transaction hash.",
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "transaction_id",
          "revision",
          "currency",
          "settlement_rail",
          "initially_restricted_amount",
          "released_amount",
          "returned_amount",
          "remaining_amount",
          "status"
        ],
        "type": "object"
      },
      "CngnConversionWebhookData": {
        "additionalProperties": false,
        "description": "Cumulative conversion progress. Consumers retain the highest revision for\neach transaction; delivery can be duplicated or arrive out of order.",
        "properties": {
          "currency": {
            "description": "Amounts are cumulative decimal wallet-currency strings, net of the deposit fee.",
            "type": "string"
          },
          "initially_restricted_amount": {
            "description": "Portion of the original net deposit awaiting conversion capacity.",
            "type": "string"
          },
          "released_amount": {
            "description": "Amount released from the conversion restriction.",
            "type": "string"
          },
          "remaining_amount": {
            "description": "Initially restricted minus released and returned. Use withdrawal quotes\nfor current withdrawal eligibility.",
            "type": "string"
          },
          "returned_amount": {
            "description": "Restricted amount returned through its origin rail or transferred to another Stabyl\naccount. Internal recipients retain the restriction.",
            "type": "string"
          },
          "revision": {
            "description": "Increasing progress revision; retain the highest per transaction across\nwebhook deliveries and REST reads.",
            "format": "int64",
            "type": "integer"
          },
          "settlement_rail": {
            "description": "Origin settlement rail; for example CNGN for an NGN wallet.",
            "example": "CNGN",
            "type": "string"
          },
          "status": {
            "description": "pending while remaining_amount is positive; completed when it is zero.",
            "type": "string"
          },
          "transaction_id": {
            "description": "Incoming wallet transaction ID, not the blockchain transaction hash.",
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "transaction_id",
          "revision",
          "currency",
          "settlement_rail",
          "initially_restricted_amount",
          "released_amount",
          "returned_amount",
          "remaining_amount",
          "status"
        ],
        "type": "object"
      },
      "CngnPoolResponse": {
        "properties": {
          "as_of": {
            "description": "Time the capacity snapshot was observed.",
            "format": "date-time",
            "type": "string"
          },
          "available": {
            "description": "Uncommitted capacity. This is not an account balance or a reservation.",
            "type": "string"
          },
          "cap": {
            "description": "Total conversion capacity, as a decimal wallet-currency string.",
            "type": "string"
          },
          "currency": {
            "description": "Wallet currency in which all capacity amounts are denominated.",
            "type": "string"
          },
          "rail": {
            "description": "Origin settlement rail, for example CNGN.",
            "type": "string"
          },
          "status": {
            "description": "available, exhausted, or paused. A positive amount during paused status\ndoes not mean conversions can proceed.",
            "type": "string"
          },
          "utilized": {
            "description": "Capacity used or already committed to conversions.",
            "type": "string"
          }
        },
        "required": [
          "rail",
          "currency",
          "cap",
          "utilized",
          "available",
          "status",
          "as_of"
        ],
        "type": "object"
      },
      "ComparedTradeStatistic": {
        "description": "Current value, preceding-period value, and percentage change.",
        "properties": {
          "change_pct": {
            "description": "`(current - previous) / abs(previous) * 100`. It is `null` when the\nprevious value is zero and the current value is non-zero.",
            "example": 3.42,
            "format": "double",
            "type": [
              "number",
              "null"
            ]
          },
          "current": {
            "description": "Current-period amount in major units of `quote_currency`.",
            "example": "525900.00",
            "type": "string"
          },
          "previous": {
            "description": "Preceding-period amount in major units of `quote_currency`.",
            "example": "508510.64",
            "type": "string"
          }
        },
        "required": [
          "current",
          "previous"
        ],
        "type": "object"
      },
      "CreateOrderRequest": {
        "description": "Order intent for creating a limit or market order. Amounts are decimal strings.",
        "properties": {
          "client_order_id": {
            "description": "Client-provided order identifier",
            "maxLength": 128,
            "type": [
              "string",
              "null"
            ]
          },
          "idempotency_key": {
            "description": "Idempotency key to prevent duplicate orders",
            "type": [
              "string",
              "null"
            ]
          },
          "order_type": {
            "description": "Order type: \"limit\" or \"market\"",
            "example": "limit",
            "type": "string"
          },
          "pair_id": {
            "description": "Trading pair identifier",
            "example": "USD/NGN",
            "type": "string"
          },
          "price": {
            "description": "Price per unit. Required for limit orders; ignored for market orders.",
            "example": "1650.00",
            "type": [
              "string",
              "null"
            ]
          },
          "quantity": {
            "description": "Order quantity in base currency",
            "example": "100.00",
            "type": "string"
          },
          "side": {
            "description": "Order side: \"buy\" or \"sell\"",
            "example": "buy",
            "type": "string"
          },
          "time_in_force": {
            "description": "Time in force: \"GTC\", \"IOC\", \"FOK\", \"POST_ONLY\". Ignored for market orders, which always use IOC.",
            "example": "GTC",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "pair_id",
          "side",
          "order_type",
          "quantity"
        ],
        "type": "object"
      },
      "CreateOrderResponse": {
        "description": "Result returned after an order create request is accepted for processing.",
        "properties": {
          "created_at": {
            "description": "Order creation timestamp",
            "type": "string"
          },
          "order_id": {
            "description": "Server-assigned order identifier",
            "format": "uuid",
            "type": "string"
          },
          "status": {
            "description": "Order status (pending)",
            "example": "pending",
            "type": "string"
          }
        },
        "required": [
          "order_id",
          "status",
          "created_at"
        ],
        "type": "object"
      },
      "CreatePartnerWebhookRequest": {
        "additionalProperties": false,
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "enabled": {
            "type": "boolean"
          },
          "event_types": {
            "items": {
              "$ref": "#/components/schemas/PartnerWebhookEventType"
            },
            "type": "array"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "url",
          "enabled",
          "event_types"
        ],
        "type": "object"
      },
      "CreatePartnerWebhookResponse": {
        "properties": {
          "secret": {
            "description": "Signing secret shown only in this create response.",
            "example": "whsec_<shown-once>",
            "type": "string"
          },
          "webhook": {
            "$ref": "#/components/schemas/PartnerWebhookEndpointResponse"
          }
        },
        "required": [
          "webhook",
          "secret"
        ],
        "type": "object"
      },
      "CreateWalletRecipientRequest": {
        "additionalProperties": false,
        "description": "Recipient details to save in the account address book.",
        "properties": {
          "account_name": {
            "example": "Jane Doe",
            "type": [
              "string",
              "null"
            ]
          },
          "account_number": {
            "example": "0123456789",
            "type": [
              "string",
              "null"
            ]
          },
          "bank_code": {
            "example": "058",
            "type": [
              "string",
              "null"
            ]
          },
          "bank_name": {
            "example": "GTBank",
            "type": [
              "string",
              "null"
            ]
          },
          "chain": {
            "example": "evm",
            "type": [
              "string",
              "null"
            ]
          },
          "country": {
            "description": "ISO-3166 alpha-3 country code for crypto recipients. Null for existing recipients\nor when the client has not collected the destination country.",
            "example": "NGA",
            "type": [
              "string",
              "null"
            ]
          },
          "crypto_address": {
            "example": "0x1234...abcd",
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "example": "USDT",
            "type": [
              "string",
              "null"
            ]
          },
          "label": {
            "example": "Main USDT recipient",
            "type": "string"
          },
          "recipient_type": {
            "$ref": "#/components/schemas/RecipientType"
          }
        },
        "required": [
          "recipient_type",
          "label"
        ],
        "type": "object"
      },
      "CreditActivityItem": {
        "description": "One customer-facing credit operation. Trade draws and repayments are\ngrouped by order; deposit repayments remain one operation per deposit.",
        "properties": {
          "amount": {
            "example": "2000.00",
            "type": "string"
          },
          "currency": {
            "example": "USD",
            "type": "string"
          },
          "draw_lot_id": {
            "description": "Draw lot the event applies to, when applicable.",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "occurred_at": {
            "type": "string"
          },
          "order_id": {
            "description": "Trade order the event applies to, when applicable.",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "quote_amount": {
            "description": "Same movement in the trade's quote currency, in major units, when the\nevent carries one (e.g. the NGN equivalent of a USD credit draw).",
            "example": "3100000.00",
            "type": [
              "string",
              "null"
            ]
          },
          "quote_currency": {
            "example": "NGN",
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "description": "Credit operation type: `draw` or `repay`.",
            "example": "draw",
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "amount",
          "currency",
          "occurred_at"
        ],
        "type": "object"
      },
      "CreditActivityResponse": {
        "description": "Paginated credit activity list.",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/CreditActivityItem"
            },
            "type": "array"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "CreditCommitmentGrouping": {
        "description": "Granularity of drawn commitments; reserve rows are always per order.",
        "enum": [
          "order",
          "lot"
        ],
        "type": "string"
      },
      "CreditCommitmentItem": {
        "description": "One outstanding credit commitment: an active reserve (credit committed to\nan open order) or open/overdue drawn credit grouped by order.",
        "properties": {
          "amount": {
            "description": "Credit committed or drawn, in major units.",
            "example": "5000.00",
            "type": "string"
          },
          "currency": {
            "example": "USD",
            "type": "string"
          },
          "due_at": {
            "description": "Earliest repayment due date among the order's open drawn lots.",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "kind": {
            "description": "`reserve` for credit committed to an open order, `draw` for drawn\ncredit grouped by order.",
            "example": "draw",
            "type": "string"
          },
          "opened_at": {
            "type": "string"
          },
          "order_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "outstanding": {
            "description": "Remaining outstanding credit, in major units.",
            "example": "5000.00",
            "type": "string"
          },
          "quote_currency": {
            "example": "NGN",
            "type": [
              "string",
              "null"
            ]
          },
          "quote_outstanding": {
            "description": "Remaining commitment in the trade's quote currency, in major units,\nwhen known.",
            "example": "8250000.00",
            "type": [
              "string",
              "null"
            ]
          },
          "side": {
            "description": "Trade side (`buy`/`sell`) when the linked order is known.",
            "example": "buy",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "description": "`reserved`, `open`, or `overdue`.",
            "example": "open",
            "type": "string"
          }
        },
        "required": [
          "id",
          "kind",
          "status",
          "amount",
          "outstanding",
          "currency",
          "opened_at"
        ],
        "type": "object"
      },
      "CreditCommitmentsResponse": {
        "description": "Paginated outstanding credit commitment list.",
        "properties": {
          "grouping": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/CreditCommitmentGrouping"
              }
            ]
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/CreditCommitmentItem"
            },
            "type": "array"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "CreditRepaymentRequest": {
        "additionalProperties": false,
        "description": "Maximum same-currency repayment from available owned wallet funds.",
        "properties": {
          "amount": {
            "example": "1000.00",
            "type": "string"
          },
          "currency": {
            "example": "NGN",
            "type": "string"
          },
          "draw_lot_id": {
            "description": "Exact persisted draw lot to repay; omitted means FIFO. Never spills over.",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "currency",
          "amount"
        ],
        "type": "object"
      },
      "CreditRepaymentResponse": {
        "description": "Public repayment receipt. Processing is not proof of a completed payment.",
        "properties": {
          "created_at": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "draw_lot_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "repaid_amount": {
            "type": "string"
          },
          "requested_amount": {
            "type": "string"
          },
          "status": {
            "description": "`processing` or `completed`; a confirmed zero is completed too.",
            "type": "string"
          }
        },
        "required": [
          "id",
          "currency",
          "requested_amount",
          "repaid_amount",
          "status",
          "created_at"
        ],
        "type": "object"
      },
      "CreditSnapshotResponse": {
        "description": "Credit information included in the wallet balance overview when applicable.",
        "properties": {
          "available_credit": {
            "description": "Additional credit currently available after both user and pool limits.",
            "example": "1000000.00",
            "type": "string"
          },
          "credit_limit": {
            "description": "Configured maximum credit exposure for this account.",
            "example": "1500000.00",
            "type": "string"
          },
          "credit_used": {
            "description": "Total credit in use, including open-order commitments and drawn debt.",
            "example": "500000.00",
            "type": "string"
          },
          "currency": {
            "description": "Credit line denomination. Credit exposure is normalized to USD.",
            "example": "USD",
            "type": "string"
          },
          "net_negative": {
            "description": "Drawn, unpaid credit exceeding the current USD wallet balance.",
            "example": "0.00",
            "type": "string"
          },
          "net_positive": {
            "description": "USD wallet balance remaining after subtracting drawn, unpaid credit.",
            "example": "250000.00",
            "type": "string"
          },
          "next_due_at": {
            "description": "Earliest due date among unpaid draw lots.",
            "type": [
              "string",
              "null"
            ]
          },
          "outstanding": {
            "description": "Drawn credit that has not yet been repaid.",
            "example": "500000.00",
            "type": "string"
          },
          "overdue": {
            "description": "Whether any unpaid draw is overdue.",
            "example": false,
            "type": "boolean"
          },
          "status": {
            "description": "Credit account status.",
            "example": "active",
            "type": "string"
          },
          "updated_at": {
            "description": "Projection timestamp used by streaming clients to reject older REST baselines.",
            "type": [
              "string",
              "null"
            ]
          },
          "withdrawal_blocked": {
            "description": "Legacy debt indicator. This does not mean all withdrawals are blocked;\nwithdrawal submission enforces an asset-specific protected floor.",
            "example": true,
            "type": "boolean"
          }
        },
        "required": [
          "currency",
          "available_credit",
          "net_positive",
          "net_negative",
          "credit_limit",
          "credit_used",
          "outstanding",
          "status",
          "overdue",
          "withdrawal_blocked"
        ],
        "type": "object"
      },
      "CryptoNetworkInfo": {
        "description": "Network metadata attached to a stablecoin settlement record.",
        "properties": {
          "chain": {
            "type": [
              "string",
              "null"
            ]
          },
          "chain_id": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "slug": {
            "type": [
              "string",
              "null"
            ]
          },
          "token_standard": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "CryptoSettlementDetails": {
        "description": "Blockchain settlement details for a stablecoin wallet transaction.",
        "properties": {
          "amounts": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/WalletSettlementAmounts",
                "description": "Frozen customer amounts; omitted for historical USD payloads."
              }
            ]
          },
          "beneficiary_nickname": {
            "type": [
              "string",
              "null"
            ]
          },
          "block_number": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "blockchain_tx_hash": {
            "type": [
              "string",
              "null"
            ]
          },
          "confirmations": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "confirmed_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "destination_address": {
            "type": [
              "string",
              "null"
            ]
          },
          "explorer_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "failed_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "network": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/CryptoNetworkInfo"
              }
            ]
          },
          "network_display": {
            "type": [
              "string",
              "null"
            ]
          },
          "network_fee": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/MoneyAmount"
              }
            ]
          },
          "principal_amount": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/MoneyAmount"
              }
            ]
          },
          "rail_reference": {
            "type": "string"
          },
          "sender_address": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "rail_reference"
        ],
        "type": "object"
      },
      "DepositAccountResponse": {
        "description": "Fiat deposit account details for incoming NGN deposits.",
        "properties": {
          "account_name": {
            "description": "Account holder name",
            "example": "Love ltd",
            "type": "string"
          },
          "account_number": {
            "description": "Virtual account number for deposits",
            "example": "1234567890",
            "type": "string"
          },
          "bank_name": {
            "description": "Bank name",
            "example": "Wema Bank",
            "type": "string"
          },
          "currency": {
            "description": "Currency code",
            "example": "NGN",
            "type": "string"
          },
          "fundingDetails": {
            "description": "Complete bank funding instructions, including BIC/SWIFT.",
            "type": "array"
          }
        },
        "required": [
          "account_number",
          "account_name",
          "bank_name",
          "currency",
          "fundingDetails"
        ],
        "type": "object"
      },
      "FiatBeneficiary": {
        "additionalProperties": false,
        "description": "Supply either a saved beneficiary or the recipient's postal address.",
        "properties": {
          "address": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/FiatBeneficiaryAddress"
              }
            ]
          },
          "beneficiary_id": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "FiatBeneficiaryAddress": {
        "additionalProperties": false,
        "description": "Postal address of the bank transfer recipient.",
        "properties": {
          "address_line1": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "state": {
            "type": "string"
          }
        },
        "required": [
          "address_line1",
          "city",
          "state",
          "country"
        ],
        "type": "object"
      },
      "FillInfo": {
        "description": "Execution linked to an account order.",
        "properties": {
          "applied_fee_bps": {
            "description": "Exact rate committed for this user's role in the fill.",
            "format": "int32",
            "type": [
              "integer",
              "null"
            ]
          },
          "created_at": {
            "type": "string"
          },
          "fee": {
            "type": "string"
          },
          "fee_currency": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "maker_rebate": {
            "description": "Maker rebate actually paid, expressed in the base asset's major units.\nOther internal fee-calculation details are not exposed.",
            "type": [
              "string",
              "null"
            ]
          },
          "price": {
            "type": "string"
          },
          "quantity": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "price",
          "quantity",
          "fee",
          "fee_currency",
          "created_at"
        ],
        "type": "object"
      },
      "FillTapeInfo": {
        "description": "Single public execution entry with price, quantity, side marker, and timestamp.",
        "properties": {
          "created_at": {
            "description": "Fill timestamp",
            "type": "string"
          },
          "id": {
            "description": "Fill identifier",
            "format": "uuid",
            "type": "string"
          },
          "maker_is_buyer": {
            "description": "Whether the maker was on the buy side",
            "type": "boolean"
          },
          "pair_id": {
            "description": "Trading pair identifier",
            "example": "USD/NGN",
            "type": "string"
          },
          "price": {
            "description": "Execution price",
            "example": "1650.00",
            "type": "string"
          },
          "quantity": {
            "description": "Executed quantity",
            "example": "100.00",
            "type": "string"
          }
        },
        "required": [
          "id",
          "pair_id",
          "price",
          "quantity",
          "maker_is_buyer",
          "created_at"
        ],
        "type": "object"
      },
      "FillWebhookData": {
        "additionalProperties": false,
        "properties": {
          "fill": {
            "$ref": "#/components/schemas/FillInfo"
          },
          "order": {
            "$ref": "#/components/schemas/OrderInfo"
          }
        },
        "required": [
          "order",
          "fill"
        ],
        "type": "object"
      },
      "FillsResponse": {
        "description": "Recent public execution entries returned in fills format.",
        "properties": {
          "fills": {
            "description": "List of recent fills",
            "items": {
              "$ref": "#/components/schemas/FillTapeInfo"
            },
            "type": "array"
          }
        },
        "required": [
          "fills"
        ],
        "type": "object"
      },
      "ListOrdersResponse": {
        "description": "Paginated collection of orders for the authenticated account.",
        "example": {
          "count": 1,
          "orders": [
            {
              "avg_fill_price": "1649.50",
              "client_order_id": "cli-123",
              "created_at": "2026-01-14T10:30:00Z",
              "filled_quantity": "50.00",
              "id": "123e4567-e89b-12d3-a456-426614174000",
              "order_type": "limit",
              "pair_id": "USD/NGN",
              "price": "1650.00",
              "quantity": "100.00",
              "replace": {
                "replaced_by_order_id": null,
                "replaces_order_id": null
              },
              "side": "buy",
              "status": "accepted",
              "time_in_force": "POST_ONLY"
            }
          ]
        },
        "properties": {
          "count": {
            "description": "Count of orders in this response",
            "minimum": 0,
            "type": "integer"
          },
          "orders": {
            "description": "List of orders",
            "items": {
              "$ref": "#/components/schemas/OrderInfo"
            },
            "type": "array"
          }
        },
        "required": [
          "orders",
          "count"
        ],
        "type": "object"
      },
      "MarketInfo": {
        "description": "Trading market metadata, including pair identifier, base and quote currencies, precision, minimum order size, fee basis points, and active status.",
        "properties": {
          "base_currency": {
            "description": "Base currency symbol",
            "example": "USD",
            "type": "string"
          },
          "is_active": {
            "description": "Whether the market is active",
            "type": "boolean"
          },
          "maker_fee_bps": {
            "description": "Maker fee in basis points",
            "example": 1,
            "format": "int32",
            "type": "integer"
          },
          "min_base_lot": {
            "description": "Minimum order size in base currency",
            "example": "0.01",
            "type": "string"
          },
          "min_notional": {
            "description": "Minimum order value in quote currency",
            "example": "100.00",
            "type": "string"
          },
          "pair_id": {
            "description": "Trading pair identifier",
            "example": "USD/NGN",
            "type": "string"
          },
          "quote_currency": {
            "description": "Quote currency symbol",
            "example": "NGN",
            "type": "string"
          },
          "taker_fee_bps": {
            "description": "Taker fee in basis points",
            "example": 3,
            "format": "int32",
            "type": "integer"
          },
          "tick_size": {
            "description": "Minimum price increment",
            "example": "0.01",
            "type": "string"
          }
        },
        "required": [
          "pair_id",
          "base_currency",
          "quote_currency",
          "tick_size",
          "min_base_lot",
          "min_notional",
          "maker_fee_bps",
          "taker_fee_bps",
          "is_active"
        ],
        "type": "object"
      },
      "MarketOrderEstimateRequest": {
        "description": "Request for execution pricing with an optional partner presentation spread.",
        "properties": {
          "business_bps": {
            "description": "Optional partner spread applied to the estimated execution price for a client quote.\nThis does not alter Stabyl execution or fees.",
            "example": 25,
            "format": "int32",
            "maximum": 10000,
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "pair_id": {
            "description": "Trading pair identifier.",
            "example": "USD/NGN",
            "type": "string"
          },
          "quantity": {
            "description": "Quantity in base currency.",
            "example": "100.00",
            "type": "string"
          },
          "side": {
            "description": "Order side: \"buy\" consumes asks and \"sell\" consumes bids.",
            "example": "buy",
            "type": "string"
          }
        },
        "required": [
          "pair_id",
          "side",
          "quantity"
        ],
        "type": "object"
      },
      "MarketOrderEstimateResponse": {
        "description": "Non-binding market-order execution and partner-quote estimate.",
        "properties": {
          "business_bps": {
            "description": "Partner-supplied spread used to calculate `client_quote_price`.",
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "client_quote_notional": {
            "description": "Client-facing notional after applying `business_bps`.",
            "type": "string"
          },
          "client_quote_price": {
            "description": "Average price with the partner spread applied (buy: add; sell: subtract).",
            "type": "string"
          },
          "estimated_at": {
            "description": "Timestamp of the source order-book snapshot.",
            "type": "string"
          },
          "estimated_average_price": {
            "description": "Quantity-weighted average execution price across visible levels.",
            "type": "string"
          },
          "estimated_fill_quantity": {
            "description": "Quantity covered by the currently visible order-book depth.",
            "type": "string"
          },
          "estimated_notional": {
            "description": "Estimated Stabyl execution notional for the covered quantity.",
            "type": "string"
          },
          "estimated_slippage_bps": {
            "description": "Estimated adverse movement from the best price, in basis points.",
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "orderbook_sequence": {
            "description": "Order-book sequence used for the estimate.",
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "pair_id": {
            "type": "string"
          },
          "quantity": {
            "description": "Requested base quantity.",
            "type": "string"
          },
          "reference_price": {
            "description": "Current best price on the consumed side of the book.",
            "type": "string"
          },
          "side": {
            "type": "string"
          },
          "sufficient_liquidity": {
            "description": "Whether visible depth covers the entire request.",
            "type": "boolean"
          }
        },
        "required": [
          "pair_id",
          "side",
          "quantity",
          "estimated_fill_quantity",
          "sufficient_liquidity",
          "reference_price",
          "estimated_average_price",
          "estimated_slippage_bps",
          "business_bps",
          "client_quote_price",
          "estimated_notional",
          "client_quote_notional",
          "orderbook_sequence",
          "estimated_at"
        ],
        "type": "object"
      },
      "MarketsResponse": {
        "description": "Collection of trading markets available to the account.",
        "properties": {
          "markets": {
            "description": "List of available markets",
            "items": {
              "$ref": "#/components/schemas/MarketInfo"
            },
            "type": "array"
          }
        },
        "required": [
          "markets"
        ],
        "type": "object"
      },
      "MoneyAmount": {
        "description": "Decimal amount and currency code.",
        "properties": {
          "amount": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          }
        },
        "required": [
          "amount",
          "currency"
        ],
        "type": "object"
      },
      "OrderBookLevelsResponse": {
        "description": "Aggregated order book levels for one side of a trading pair.",
        "properties": {
          "levels": {
            "description": "Price levels",
            "items": {
              "$ref": "#/components/schemas/PriceLevel"
            },
            "type": "array"
          },
          "pair_id": {
            "description": "Trading pair identifier",
            "example": "USD/NGN",
            "type": "string"
          },
          "side": {
            "description": "Side of the order book",
            "example": "bid",
            "type": "string"
          },
          "timestamp": {
            "description": "Timestamp of the snapshot",
            "type": "string"
          }
        },
        "required": [
          "pair_id",
          "side",
          "levels",
          "timestamp"
        ],
        "type": "object"
      },
      "OrderBookSnapshotResponse": {
        "description": "Point-in-time bid and ask depth for a trading pair.",
        "properties": {
          "asks": {
            "description": "Ask (sell) price levels",
            "items": {
              "$ref": "#/components/schemas/PriceLevel"
            },
            "type": "array"
          },
          "bids": {
            "description": "Bid (buy) price levels",
            "items": {
              "$ref": "#/components/schemas/PriceLevel"
            },
            "type": "array"
          },
          "pair_id": {
            "description": "Trading pair identifier",
            "example": "USD/NGN",
            "type": "string"
          },
          "sequence": {
            "description": "Sequence number for ordering",
            "example": 12345,
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "timestamp": {
            "description": "Timestamp of the snapshot",
            "type": "string"
          }
        },
        "required": [
          "pair_id",
          "sequence",
          "bids",
          "asks",
          "timestamp"
        ],
        "type": "object"
      },
      "OrderDetailsResponse": {
        "description": "Canonical order detail response, including order state and fills where available.",
        "example": {
          "fills": [
            {
              "created_at": "2026-01-14T10:31:00Z",
              "fee": "0.25",
              "fee_currency": "USD",
              "id": "123e4567-e89b-12d3-a456-426614174222",
              "price": "1649.50",
              "quantity": "25.00"
            }
          ],
          "order": {
            "avg_fill_price": "1649.50",
            "client_order_id": "cli-123",
            "created_at": "2026-01-14T10:30:00Z",
            "filled_quantity": "50.00",
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "order_type": "limit",
            "pair_id": "USD/NGN",
            "price": "1650.00",
            "quantity": "100.00",
            "replace": {
              "replaced_by_order_id": "123e4567-e89b-12d3-a456-426614174111",
              "replaces_order_id": null
            },
            "side": "buy",
            "status": "partially_filled",
            "time_in_force": "POST_ONLY"
          }
        },
        "properties": {
          "fills": {
            "description": "List of fills for this order",
            "items": {
              "$ref": "#/components/schemas/FillInfo"
            },
            "type": "array"
          },
          "order": {
            "$ref": "#/components/schemas/OrderInfo",
            "description": "Order information"
          }
        },
        "required": [
          "order",
          "fills"
        ],
        "type": "object"
      },
      "OrderInfo": {
        "description": "Order state, quantities, pricing, time-in-force, and replacement linkage.",
        "properties": {
          "avg_fill_price": {
            "type": [
              "string",
              "null"
            ]
          },
          "cancel_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "client_order_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string"
          },
          "filled_quantity": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "maker_fee_bps": {
            "description": "Frozen maker rate for authenticated order history. Absent for legacy\nrecords and event shapes that predate immutable fee snapshots.",
            "format": "int32",
            "type": [
              "integer",
              "null"
            ]
          },
          "order_type": {
            "type": "string"
          },
          "pair_id": {
            "type": "string"
          },
          "price": {
            "type": [
              "string",
              "null"
            ]
          },
          "quantity": {
            "type": "string"
          },
          "reject_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "remaining_quantity": {
            "type": "string"
          },
          "replace": {
            "$ref": "#/components/schemas/OrderReplaceInfo"
          },
          "side": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "taker_fee_bps": {
            "description": "Frozen taker rate for authenticated order history. Absent for legacy\nrecords and event shapes that predate immutable fee snapshots.",
            "format": "int32",
            "type": [
              "integer",
              "null"
            ]
          },
          "time_in_force": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "pair_id",
          "side",
          "order_type",
          "time_in_force",
          "status",
          "quantity",
          "filled_quantity",
          "remaining_quantity",
          "replace",
          "created_at"
        ],
        "type": "object"
      },
      "OrderReplaceInfo": {
        "description": "Links an order to the order it replaced or the order that replaced it.",
        "properties": {
          "replaced_by_order_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "replaces_order_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "OrderWebhookData": {
        "additionalProperties": false,
        "properties": {
          "order": {
            "$ref": "#/components/schemas/OrderInfo"
          }
        },
        "required": [
          "order"
        ],
        "type": "object"
      },
      "PartnerMarketOrderEstimateResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/MarketOrderEstimateResponse"
          },
          {
            "properties": {
              "estimated_fee_base": {
                "type": "string"
              },
              "expires_at": {
                "type": "string"
              },
              "fee_bps": {
                "description": "Estimated account taker fee; the applied fee is fixed at order admission.",
                "format": "int32",
                "type": "integer"
              },
              "protected_limit_price": {
                "type": "string"
              },
              "quote_id": {
                "format": "uuid",
                "type": "string"
              },
              "slippage_tolerance_bps": {
                "format": "int32",
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "quote_id",
              "expires_at",
              "protected_limit_price",
              "slippage_tolerance_bps",
              "fee_bps",
              "estimated_fee_base"
            ],
            "type": "object"
          }
        ],
        "description": "Existing estimate fields plus an account-owned, executable protected quote."
      },
      "PartnerWebhookData": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/ReplacementWebhookData"
          },
          {
            "$ref": "#/components/schemas/FillWebhookData"
          },
          {
            "$ref": "#/components/schemas/WalletTransactionWebhookData"
          },
          {
            "$ref": "#/components/schemas/OrderWebhookData"
          },
          {
            "$ref": "#/components/schemas/CngnConversionWebhookData"
          }
        ]
      },
      "PartnerWebhookDeliveriesResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/PartnerWebhookDeliveryResponse"
            },
            "type": "array"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "PartnerWebhookDeliveryAttemptResponse": {
        "properties": {
          "attempt_number": {
            "format": "int32",
            "type": "integer"
          },
          "attempted_at": {
            "format": "date-time",
            "type": "string"
          },
          "completed_at": {
            "format": "date-time",
            "type": "string"
          },
          "duration_ms": {
            "format": "int32",
            "type": [
              "integer",
              "null"
            ]
          },
          "error_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "http_status": {
            "format": "int32",
            "type": [
              "integer",
              "null"
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "next_retry_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "outcome": {
            "type": "string"
          },
          "signing_secret_versions": {
            "description": "Secret version numbers used, never signing material or signatures.",
            "items": {
              "format": "int32",
              "type": "integer"
            },
            "type": "array"
          }
        },
        "required": [
          "id",
          "attempt_number",
          "outcome",
          "signing_secret_versions",
          "attempted_at",
          "completed_at"
        ],
        "type": "object"
      },
      "PartnerWebhookDeliveryDetailResponse": {
        "properties": {
          "attempts": {
            "items": {
              "$ref": "#/components/schemas/PartnerWebhookDeliveryAttemptResponse"
            },
            "type": "array"
          },
          "delivery": {
            "$ref": "#/components/schemas/PartnerWebhookDeliveryResponse"
          }
        },
        "required": [
          "delivery",
          "attempts"
        ],
        "type": "object"
      },
      "PartnerWebhookDeliveryResponse": {
        "properties": {
          "attempt_count": {
            "format": "int32",
            "type": "integer"
          },
          "cancelled_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "delivered_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "event_id": {
            "format": "uuid",
            "type": "string"
          },
          "event_type": {
            "$ref": "#/components/schemas/PartnerWebhookEventType"
          },
          "failed_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "last_attempt_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "last_error_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_http_status": {
            "format": "int32",
            "type": [
              "integer",
              "null"
            ]
          },
          "next_attempt_at": {
            "description": "Display-only projection; delivery scheduling remains authoritative in the broker.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "webhook_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "id",
          "event_id",
          "webhook_id",
          "event_type",
          "status",
          "attempt_count",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "PartnerWebhookEndpointResponse": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "event_types": {
            "items": {
              "$ref": "#/components/schemas/PartnerWebhookEventType"
            },
            "type": "array"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "secret_version": {
            "format": "int32",
            "type": "integer"
          },
          "status": {
            "$ref": "#/components/schemas/PartnerWebhookEndpointStatus"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "url",
          "status",
          "event_types",
          "secret_version",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "PartnerWebhookEndpointStatus": {
        "enum": [
          "enabled",
          "disabled"
        ],
        "type": "string"
      },
      "PartnerWebhookEndpointsResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/PartnerWebhookEndpointResponse"
            },
            "type": "array"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "PartnerWebhookEnvelope": {
        "additionalProperties": false,
        "description": "Frozen Partner webhook public body. Internal routing metadata must remain outside this type.",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PartnerWebhookData"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "occurred_at": {
            "format": "date-time",
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/PartnerWebhookEventType"
          },
          "version": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "id",
          "type",
          "version",
          "occurred_at",
          "data"
        ],
        "type": "object"
      },
      "PartnerWebhookEventDetailResponse": {
        "properties": {
          "deliveries": {
            "description": "Delivery history is eventually consistent with the live webhook pipeline.",
            "items": {
              "$ref": "#/components/schemas/PartnerWebhookDeliveryResponse"
            },
            "type": "array"
          },
          "event": {
            "$ref": "#/components/schemas/PartnerWebhookEnvelope"
          }
        },
        "required": [
          "event",
          "deliveries"
        ],
        "type": "object"
      },
      "PartnerWebhookEventListItem": {
        "properties": {
          "emitted_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "occurred_at": {
            "format": "date-time",
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/PartnerWebhookEventType"
          },
          "version": {
            "format": "int32",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "type",
          "version",
          "occurred_at",
          "emitted_at"
        ],
        "type": "object"
      },
      "PartnerWebhookEventType": {
        "description": "Exact Partner webhook topics supported by the V1 public contract.",
        "enum": [
          "deposit.action_required",
          "deposit.success",
          "deposit.failed",
          "withdrawal.pending",
          "withdrawal.success",
          "withdrawal.failed",
          "withdrawal.partial",
          "exchange.accepted",
          "exchange.filled",
          "exchange.replaced",
          "exchange.cancelled",
          "exchange.rejected",
          "conversion.updated"
        ],
        "type": "string"
      },
      "PartnerWebhookEventsResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/PartnerWebhookEventListItem"
            },
            "type": "array"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "PartnerWithdrawalQuoteRequest": {
        "additionalProperties": false,
        "example": {
          "currency": "NGN",
          "items": [
            {
              "amount": "200000000.00",
              "client_item_id": "beneficiary-a",
              "description": "Supplier settlement",
              "destination": {
                "account_name": "Jane Doe",
                "account_number": "0123456789",
                "bank_code": "044",
                "bank_name": "Access Bank",
                "type": "bank_account"
              }
            }
          ]
        },
        "properties": {
          "currency": {
            "example": "NGN",
            "type": "string"
          },
          "items": {
            "description": "Bank withdrawals accept 1 to 50 bank-account items. CNGN (NGN)\nand USDT/USDC (USD) withdrawals accept exactly one crypto-address item.",
            "items": {
              "$ref": "#/components/schemas/WalletWithdrawalItemRequest"
            },
            "maxItems": 50,
            "minItems": 1,
            "type": "array"
          },
          "settlement_rail": {
            "example": "USDC",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "currency",
          "items"
        ],
        "type": "object"
      },
      "PartnerWithdrawalSubmitRequest": {
        "additionalProperties": false,
        "example": {
          "currency": "USD",
          "idempotency_key": "partner-withdrawal-20260711-001",
          "items": [
            {
              "amount": "100.00",
              "client_item_id": "vendor-a",
              "destination": {
                "address": "0xRecipient",
                "chain": "evm",
                "slug": "base",
                "type": "crypto_address"
              }
            }
          ],
          "settlement_rail": "USDC"
        },
        "properties": {
          "currency": {
            "example": "USD",
            "type": "string"
          },
          "idempotency_key": {
            "type": "string"
          },
          "items": {
            "description": "Bank withdrawals accept 1 to 50 bank-account items. CNGN (NGN)\nand USDT/USDC (USD) withdrawals accept exactly one crypto-address item.",
            "items": {
              "$ref": "#/components/schemas/WalletWithdrawalItemRequest"
            },
            "maxItems": 50,
            "minItems": 1,
            "type": "array"
          },
          "settlement_rail": {
            "example": "USDC",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "currency",
          "items",
          "idempotency_key"
        ],
        "type": "object"
      },
      "PriceLevel": {
        "description": "Aggregated price and quantity available at one order book level.",
        "properties": {
          "price": {
            "description": "Price at this level",
            "example": "1650.50",
            "type": "string"
          },
          "quantity": {
            "description": "Total quantity at this price",
            "example": "100.00",
            "type": "string"
          }
        },
        "required": [
          "price",
          "quantity"
        ],
        "type": "object"
      },
      "RecipientType": {
        "description": "Saved recipient type. Fiat recipients use bank details; crypto recipients use chain and address details.",
        "enum": [
          "fiat",
          "crypto"
        ],
        "type": "string"
      },
      "ReplaceOrderRequest": {
        "description": "Replacement values for an existing limit order.",
        "properties": {
          "client_order_id": {
            "description": "New client order ID for the replacement",
            "maxLength": 128,
            "type": [
              "string",
              "null"
            ]
          },
          "idempotency_key": {
            "description": "Idempotency key for replace command",
            "type": [
              "string",
              "null"
            ]
          },
          "price": {
            "description": "New price per unit",
            "example": "1655.00",
            "type": [
              "string",
              "null"
            ]
          },
          "quantity": {
            "description": "New quantity (if None, use remaining unfilled quantity)",
            "example": "150.00",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "ReplaceOrderResponse": {
        "description": "Result returned after a replace request is accepted for processing.",
        "properties": {
          "new_order_id": {
            "description": "New order identifier",
            "format": "uuid",
            "type": "string"
          },
          "original_order_id": {
            "description": "Original order identifier",
            "format": "uuid",
            "type": "string"
          },
          "replaced_at": {
            "description": "Replacement timestamp",
            "type": "string"
          },
          "status": {
            "description": "Status (replacing)",
            "example": "replacing",
            "type": "string"
          }
        },
        "required": [
          "original_order_id",
          "new_order_id",
          "status",
          "replaced_at"
        ],
        "type": "object"
      },
      "ReplacePartnerWebhookRequest": {
        "additionalProperties": false,
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "enabled": {
            "type": "boolean"
          },
          "event_types": {
            "items": {
              "$ref": "#/components/schemas/PartnerWebhookEventType"
            },
            "type": "array"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "url",
          "enabled",
          "event_types"
        ],
        "type": "object"
      },
      "ReplacementWebhookData": {
        "additionalProperties": false,
        "properties": {
          "original_order": {
            "$ref": "#/components/schemas/OrderInfo"
          },
          "replacement_order": {
            "$ref": "#/components/schemas/OrderInfo"
          }
        },
        "required": [
          "original_order",
          "replacement_order"
        ],
        "type": "object"
      },
      "RequiredAction": {
        "properties": {
          "status": {
            "$ref": "#/components/schemas/RequiredActionStatus"
          },
          "submission_url": {
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/RequiredActionType"
          }
        },
        "required": [
          "type",
          "status",
          "submission_url"
        ],
        "type": "object"
      },
      "RequiredActionStatus": {
        "enum": [
          "required",
          "submitted"
        ],
        "type": "string"
      },
      "RequiredActionType": {
        "enum": [
          "travel_rule"
        ],
        "type": "string"
      },
      "RotatePartnerWebhookSecretResponse": {
        "properties": {
          "previous_secret_valid_until": {
            "format": "date-time",
            "type": "string"
          },
          "secret": {
            "description": "New signing secret shown only in this rotation response.",
            "example": "whsec_<shown-once>",
            "type": "string"
          },
          "secret_version": {
            "format": "int32",
            "type": "integer"
          },
          "webhook_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "webhook_id",
          "secret",
          "secret_version",
          "previous_secret_valid_until"
        ],
        "type": "object"
      },
      "SimulateCryptoDepositRequest": {
        "description": "Non-production stablecoin deposit event to create for integration testing.",
        "properties": {
          "amount": {
            "example": "100.5",
            "type": "string"
          },
          "blockchain_tx_hash": {
            "description": "Optional transaction hash, preserved exactly in responses, completed details and webhooks.\nEVM: 0x plus 64 hex characters; TRON: 64 hex; Solana: base58 64-byte signature.\nOmit to generate a synthetic hash. Retry with the same idempotency key and body.",
            "type": [
              "string",
              "null"
            ]
          },
          "chain": {
            "$ref": "#/components/schemas/WalletChain",
            "description": "cNGN requires evm and uses Base, in development only."
          },
          "idempotency_key": {
            "example": "sim_crypto_dep_001",
            "type": [
              "string",
              "null"
            ]
          },
          "symbol": {
            "description": "Token symbol; cNGN credits the NGN wallet after the configured deposit fee.",
            "example": "USDT",
            "type": "string"
          },
          "user_id": {
            "description": "Required only when no API key or session is supplied. Must match authenticated identity.",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "chain",
          "symbol",
          "amount"
        ],
        "type": "object"
      },
      "SimulateCryptoDepositResponse": {
        "description": "Result returned after creating a non-production stablecoin deposit event.",
        "properties": {
          "amount": {
            "example": "100.5",
            "type": "string"
          },
          "blockchain_tx_hash": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "reference": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "example": "SUCCESS",
            "type": "string"
          }
        },
        "required": [
          "id",
          "status",
          "amount"
        ],
        "type": "object"
      },
      "SimulateCryptoWithdrawalRequest": {
        "description": "Non-production stablecoin withdrawal record to create for integration testing.",
        "properties": {
          "amount": {
            "example": "2.5",
            "type": "string"
          },
          "blockchain_tx_hash": {
            "description": "Optional transaction hash, preserved exactly in responses, completed details and webhooks.\nEVM: 0x plus 64 hex characters; TRON: 64 hex; Solana: base58 64-byte signature.\nOmit to generate a synthetic hash. Retry with the same idempotency key and body.",
            "type": [
              "string",
              "null"
            ]
          },
          "chain": {
            "$ref": "#/components/schemas/WalletChain",
            "description": "cNGN requires evm and uses Base, in development only."
          },
          "currency": {
            "description": "USDT, USDC, or development-only CNGN. CNGN debits NGN principal plus fees.",
            "example": "USDT",
            "type": "string"
          },
          "idempotency_key": {
            "description": "Reuse the same key and payload to retry the original simulated withdrawal.",
            "type": [
              "string",
              "null"
            ]
          },
          "user_id": {
            "description": "Required only when no API key or session is supplied. Must match authenticated identity.",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "chain",
          "currency",
          "amount"
        ],
        "type": "object"
      },
      "SimulateFiatDepositRequest": {
        "description": "Non-production fiat deposit event to create for integration testing.",
        "properties": {
          "amount": {
            "example": "50000.00",
            "type": "string"
          },
          "currency": {
            "example": "NGN",
            "type": "string"
          },
          "idempotency_key": {
            "example": "sim_fiat_dep_001",
            "type": [
              "string",
              "null"
            ]
          },
          "user_id": {
            "description": "Required only when no API key or session is supplied. Must match authenticated identity.",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "currency",
          "amount"
        ],
        "type": "object"
      },
      "SimulateFiatDepositResponse": {
        "description": "Result returned after creating a non-production fiat deposit event.",
        "properties": {
          "amount": {
            "example": "50000.00",
            "type": "string"
          },
          "reference": {
            "example": "SIM-FIAT-DEP-001",
            "type": "string"
          },
          "status": {
            "example": "confirmed",
            "type": "string"
          },
          "transaction_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "transaction_id",
          "reference",
          "status",
          "amount"
        ],
        "type": "object"
      },
      "SimulateFiatWithdrawalRequest": {
        "description": "Non-production fiat withdrawal record to create for integration testing.",
        "properties": {
          "amount": {
            "example": "500.00",
            "type": "string"
          },
          "currency": {
            "example": "NGN",
            "type": "string"
          },
          "user_id": {
            "description": "Required only when no API key or session is supplied. Must match authenticated identity.",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "amount",
          "currency"
        ],
        "type": "object"
      },
      "SimulateKybDecision": {
        "description": "Decision value to apply in a non-production KYB simulation.",
        "enum": [
          "approved",
          "denied",
          "unknown"
        ],
        "type": "string"
      },
      "SimulateKybStatus": {
        "description": "KYB status value to apply in a non-production simulation.",
        "enum": [
          "approved",
          "rejected",
          "pending"
        ],
        "type": "string"
      },
      "SimulateKybStatusRequest": {
        "description": "Non-production KYB state change for a test account.",
        "properties": {
          "status": {
            "$ref": "#/components/schemas/SimulateKybStatus"
          },
          "user_id": {
            "description": "Required only when no API key or session is supplied. Must match authenticated identity.",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "status"
        ],
        "type": "object"
      },
      "SimulateKybStatusResponse": {
        "description": "Result returned after applying a non-production KYB state.",
        "properties": {
          "decision": {
            "$ref": "#/components/schemas/SimulateKybDecision"
          },
          "status": {
            "$ref": "#/components/schemas/SimulateKybStatus"
          },
          "user_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "user_id",
          "status",
          "decision"
        ],
        "type": "object"
      },
      "SimulateProductUpdateResponse": {
        "description": "Result returned after creating a non-production product update notification.",
        "example": {
          "notification_key": "product_update_019d1a2a-ec7a-7e51-a488-b001931e0faa",
          "product_update_id": "019d1a2a-ec7a-7e51-a488-b001931e0faa",
          "state": "created"
        },
        "properties": {
          "notification_key": {
            "type": "string"
          },
          "product_update_id": {
            "format": "uuid",
            "type": "string"
          },
          "state": {
            "type": "string"
          }
        },
        "required": [
          "product_update_id",
          "notification_key",
          "state"
        ],
        "type": "object"
      },
      "SimulationFiatWithdrawalResponse": {
        "description": "Result returned after creating a non-production fiat withdrawal record.",
        "properties": {
          "amount": {
            "description": "Withdrawal amount",
            "example": "50000.00",
            "type": "string"
          },
          "reference": {
            "description": "Payment reference",
            "example": "STABYL-WD-123456",
            "type": "string"
          },
          "status": {
            "description": "Transaction status",
            "example": "pending",
            "type": "string"
          },
          "transaction_id": {
            "description": "Transaction identifier",
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "transaction_id",
          "reference",
          "status",
          "amount"
        ],
        "type": "object"
      },
      "SimulationStablecoinWithdrawalResponse": {
        "description": "Result returned after creating a non-production stablecoin withdrawal record.",
        "properties": {
          "blockchain_tx_hash": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "reference": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "status",
          "blockchain_tx_hash"
        ],
        "type": "object"
      },
      "Ticker": {
        "description": "Rolling market statistics plus the current best bid and best ask for a trading pair.",
        "properties": {
          "best_ask": {
            "description": "Current best ask from the existing live order-book lookup. It is not a\nhistorical minimum within the selected interval.",
            "example": "1650.50",
            "type": [
              "string",
              "null"
            ]
          },
          "best_bid": {
            "description": "Current best bid from the existing live order-book lookup. It is not a\nhistorical maximum within the selected interval.",
            "example": "1649.50",
            "type": [
              "string",
              "null"
            ]
          },
          "high": {
            "description": "Highest execution price in the selected interval.",
            "example": "1660.00",
            "type": [
              "string",
              "null"
            ]
          },
          "last": {
            "description": "Last traded price",
            "example": "1650.00",
            "type": [
              "string",
              "null"
            ]
          },
          "low": {
            "description": "Lowest execution price in the selected interval.",
            "example": "1635.00",
            "type": [
              "string",
              "null"
            ]
          },
          "open": {
            "description": "Price of the first execution in the selected interval.",
            "example": "1640.00",
            "type": [
              "string",
              "null"
            ]
          },
          "pair_id": {
            "description": "Trading pair identifier",
            "example": "USD/NGN",
            "type": "string"
          },
          "price_change": {
            "description": "Absolute price change",
            "example": "10.00",
            "type": [
              "string",
              "null"
            ]
          },
          "price_change_pct": {
            "description": "Percentage price change",
            "example": 0.61,
            "format": "double",
            "type": [
              "number",
              "null"
            ]
          },
          "timestamp": {
            "description": "Same calculation timestamp as the response-level `to` value.",
            "format": "date-time",
            "type": "string"
          },
          "trade_count": {
            "description": "Number of executions in the selected interval.",
            "example": 1250,
            "format": "int64",
            "type": "integer"
          },
          "volume": {
            "description": "Executed volume in the pair's base currency during the interval.",
            "example": "50000.00",
            "type": "string"
          },
          "volume_quote": {
            "description": "Executed notional in the pair's quote currency during the interval.",
            "example": "82500000.00",
            "type": "string"
          }
        },
        "required": [
          "pair_id",
          "volume",
          "volume_quote",
          "trade_count",
          "timestamp"
        ],
        "type": "object"
      },
      "TickerInterval": {
        "description": "Supported rolling ticker statistics interval.",
        "enum": [
          "24h",
          "1d",
          "7d",
          "30d",
          "180d",
          "360d"
        ],
        "type": "string"
      },
      "TickerResponse": {
        "description": "Ticker response containing rolling statistics for one or more markets and the exact calculation window.",
        "properties": {
          "from": {
            "description": "Inclusive beginning of the rolling statistics window.",
            "format": "date-time",
            "type": "string"
          },
          "interval": {
            "description": "Requested interval. `24h` and `1d` are equivalent aliases.",
            "example": "7d",
            "type": "string"
          },
          "tickers": {
            "description": "One ticker per returned market, ordered by `pair_id`.",
            "items": {
              "$ref": "#/components/schemas/Ticker"
            },
            "type": "array"
          },
          "to": {
            "description": "Exclusive end and calculation time of the statistics window.",
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "interval",
          "from",
          "to",
          "tickers"
        ],
        "type": "object"
      },
      "TradeInfo": {
        "description": "Single public trade tape entry with price, quantity, side, sequence, and timestamp.",
        "properties": {
          "created_at": {
            "description": "Trade timestamp",
            "type": "string"
          },
          "id": {
            "description": "Trade identifier",
            "format": "uuid",
            "type": "string"
          },
          "pair_id": {
            "description": "Trading pair identifier",
            "example": "USD/NGN",
            "type": "string"
          },
          "price": {
            "description": "Execution price",
            "example": "1650.00",
            "type": "string"
          },
          "quantity": {
            "description": "Executed quantity",
            "example": "100.00",
            "type": "string"
          },
          "sequence": {
            "description": "Sequence number for ordering",
            "example": 12345,
            "format": "int64",
            "type": "integer"
          },
          "side": {
            "description": "Trade side: \"buy\" or \"sell\"",
            "example": "buy",
            "type": "string"
          }
        },
        "required": [
          "id",
          "pair_id",
          "price",
          "quantity",
          "side",
          "sequence",
          "created_at"
        ],
        "type": "object"
      },
      "TradeStatisticsBucketPoint": {
        "description": "One zero-filled chart bucket inside the current period.",
        "properties": {
          "from": {
            "description": "Inclusive bucket boundary.",
            "format": "date-time",
            "type": "string"
          },
          "net_profit_loss": {
            "description": "Marked net-inventory change less non-trading external contributions,\nin major units of `quote_currency`. Posted fees are already included.",
            "example": "1250.00",
            "type": "string"
          },
          "to": {
            "description": "Exclusive bucket boundary.",
            "format": "date-time",
            "type": "string"
          },
          "traded_volume": {
            "description": "Executed quote notional in major units of `quote_currency`.",
            "example": "82500.00",
            "type": "string"
          }
        },
        "required": [
          "from",
          "to",
          "traded_volume",
          "net_profit_loss"
        ],
        "type": "object"
      },
      "TradeStatisticsInterval": {
        "description": "Supported rolling period for authenticated trade statistics.",
        "enum": [
          "1d",
          "7d",
          "30d",
          "180d",
          "360d"
        ],
        "type": "string"
      },
      "TradeStatisticsPeriod": {
        "description": "Exact half-open comparison period.",
        "properties": {
          "from": {
            "description": "Inclusive period boundary.",
            "format": "date-time",
            "type": "string"
          },
          "to": {
            "description": "Exclusive period boundary.",
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "from",
          "to"
        ],
        "type": "object"
      },
      "TradeStatisticsResponse": {
        "description": "Authenticated customer exchange report with an equal preceding comparison.",
        "properties": {
          "as_of": {
            "description": "Start of the current UTC hour and end of the last completed hour.",
            "format": "date-time",
            "type": "string"
          },
          "bucket_interval": {
            "description": "Width of each chart bucket.",
            "example": "1d",
            "type": "string"
          },
          "current_period": {
            "$ref": "#/components/schemas/TradeStatisticsPeriod",
            "description": "Current half-open period `[from, to)`."
          },
          "interval": {
            "description": "Requested rolling interval.",
            "example": "7d",
            "type": "string"
          },
          "pair_id": {
            "description": "Canonical selected pair, or `null` when all pairs were requested.",
            "type": [
              "string",
              "null"
            ]
          },
          "previous_period": {
            "$ref": "#/components/schemas/TradeStatisticsPeriod",
            "description": "Immediately preceding equal-duration half-open period `[from, to)`."
          },
          "summaries": {
            "description": "One summary per quote currency, ordered by currency code. Values from\nunlike currencies are never added together.",
            "items": {
              "$ref": "#/components/schemas/TradeStatisticsSummary"
            },
            "type": "array"
          }
        },
        "required": [
          "as_of",
          "interval",
          "current_period",
          "previous_period",
          "bucket_interval",
          "summaries"
        ],
        "type": "object"
      },
      "TradeStatisticsSummary": {
        "description": "Customer trade statistics for one quote currency.",
        "properties": {
          "buckets": {
            "description": "Current-period chart values on a continuous time axis. Volume is zero\nwithout executions; held inventory may still change in marked value.",
            "items": {
              "$ref": "#/components/schemas/TradeStatisticsBucketPoint"
            },
            "type": "array"
          },
          "net_profit_loss": {
            "$ref": "#/components/schemas/ComparedTradeStatistic",
            "description": "Marked net-inventory profit/loss for the current and previous periods,\nexcluding non-trading external contributions at committed-time value."
          },
          "quote_currency": {
            "description": "Currency of every monetary value in this summary.",
            "example": "NGN",
            "type": "string"
          },
          "traded_volume": {
            "$ref": "#/components/schemas/ComparedTradeStatistic",
            "description": "Total executed quote notional. Each fill is counted once even when the\nauthenticated user is present on both sides."
          }
        },
        "required": [
          "quote_currency",
          "traded_volume",
          "net_profit_loss",
          "buckets"
        ],
        "type": "object"
      },
      "TradesResponse": {
        "description": "Recent public trade tape entries for a trading pair.",
        "properties": {
          "trades": {
            "description": "List of trades",
            "items": {
              "$ref": "#/components/schemas/TradeInfo"
            },
            "type": "array"
          }
        },
        "required": [
          "trades"
        ],
        "type": "object"
      },
      "TravelRuleDepositPurpose": {
        "enum": [
          "personal_transfer",
          "business_payment",
          "goods_or_services",
          "investment_or_savings",
          "other"
        ],
        "type": "string"
      },
      "TravelRuleFieldOption": {
        "properties": {
          "label": {
            "type": "string"
          },
          "value": {
            "$ref": "#/components/schemas/TravelRuleDepositPurpose"
          }
        },
        "required": [
          "value",
          "label"
        ],
        "type": "object"
      },
      "TravelRuleFieldRequirement": {
        "properties": {
          "label": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "options": {
            "items": {
              "$ref": "#/components/schemas/TravelRuleFieldOption"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "required": {
            "type": "boolean"
          }
        },
        "required": [
          "name",
          "label",
          "required"
        ],
        "type": "object"
      },
      "TravelRuleRequirementResponse": {
        "properties": {
          "fields": {
            "items": {
              "$ref": "#/components/schemas/TravelRuleFieldRequirement"
            },
            "type": "array"
          },
          "status": {
            "$ref": "#/components/schemas/RequiredActionStatus"
          },
          "transaction_id": {
            "type": "string"
          }
        },
        "required": [
          "transaction_id",
          "status",
          "fields"
        ],
        "type": "object"
      },
      "TravelRuleSubmissionRequest": {
        "additionalProperties": false,
        "properties": {
          "purpose": {
            "$ref": "#/components/schemas/TravelRuleDepositPurpose"
          },
          "sender_country": {
            "type": "string"
          },
          "sender_originator": {
            "type": "string"
          }
        },
        "required": [
          "sender_originator",
          "sender_country",
          "purpose"
        ],
        "type": "object"
      },
      "TravelRuleSubmissionResponse": {
        "properties": {
          "status": {
            "$ref": "#/components/schemas/RequiredActionStatus"
          },
          "transaction_id": {
            "type": "string"
          }
        },
        "required": [
          "transaction_id",
          "status"
        ],
        "type": "object"
      },
      "UpdateWalletRecipientRequest": {
        "additionalProperties": false,
        "description": "Mutable saved-recipient fields to update.",
        "properties": {
          "account_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "account_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "bank_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "bank_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "chain": {
            "type": [
              "string",
              "null"
            ]
          },
          "country": {
            "description": "ISO-3166 alpha-3 country code for crypto recipients. Omit to keep the current value.",
            "example": "NGA",
            "type": [
              "string",
              "null"
            ]
          },
          "crypto_address": {
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "label": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "UsdCashSettlementDetails": {
        "description": "USD cash settlement details for a wallet transaction.",
        "properties": {
          "confirmed_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "destination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/BankAccountDetails"
              }
            ]
          },
          "failed_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "rail_reference": {
            "type": "string"
          }
        },
        "required": [
          "rail_reference"
        ],
        "type": "object"
      },
      "VerifyAccountRequest": {
        "description": "Bank account details to verify before saving a fiat recipient.",
        "properties": {
          "account_number": {
            "description": "Account number to verify",
            "example": "0123456789",
            "type": "string"
          },
          "bank_code": {
            "description": "Bank code",
            "example": "044",
            "type": "string"
          }
        },
        "required": [
          "account_number",
          "bank_code"
        ],
        "type": "object"
      },
      "VerifyAccountResponse": {
        "description": "Verified bank account name returned for operator confirmation.",
        "properties": {
          "account_name": {
            "description": "Verified account holder name",
            "example": "JOHN DOE",
            "type": "string"
          }
        },
        "required": [
          "account_name"
        ],
        "type": "object"
      },
      "WalletAddressResponse": {
        "description": "Deposit address for a requested blockchain route.",
        "properties": {
          "address": {
            "description": "Deposit address",
            "example": "0x1234567890abcdef...",
            "type": "string"
          },
          "chain": {
            "$ref": "#/components/schemas/WalletChain",
            "description": "Blockchain network"
          },
          "memo": {
            "description": "Memo/tag for networks that require it",
            "type": [
              "string",
              "null"
            ]
          },
          "slug": {
            "description": "Exact blockchain route slug when the route is network-specific.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "chain",
          "address"
        ],
        "type": "object"
      },
      "WalletChain": {
        "description": "Blockchain route family. Enum values do not imply availability in every environment; use GET /partner/wallets/chains to discover enabled networks and exact slugs.",
        "enum": [
          "evm",
          "tron",
          "solana"
        ],
        "type": "string"
      },
      "WalletChainMetadata": {
        "description": "Display and explorer metadata for a blockchain route.",
        "properties": {
          "explorer_url": {
            "description": "Transaction explorer URL template with `{tx_hash}` placeholder.",
            "example": "https://etherscan.io/tx/{tx_hash}",
            "type": "string"
          },
          "logo": {
            "description": "Chain logo URL.",
            "example": "https://s2.coinmarketcap.com/static/img/coins/256x256/1027.png",
            "type": "string"
          },
          "name": {
            "description": "Human-readable chain name.",
            "example": "Ethereum",
            "type": "string"
          },
          "slug": {
            "description": "URL-friendly identifier.",
            "example": "ethereum",
            "type": "string"
          },
          "symbol": {
            "description": "Native chain symbol.",
            "example": "ETH",
            "type": "string"
          },
          "token_standard": {
            "description": "Token standard for stablecoin rails where applicable.",
            "example": "ERC20",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "name",
          "slug",
          "symbol",
          "logo",
          "explorer_url"
        ],
        "type": "object"
      },
      "WalletChainSupport": {
        "description": "Environment-specific route metadata under a stablecoin settlement rail. Check both rail and route deposit_enabled/withdrawal_enabled flags before use.",
        "properties": {
          "chain": {
            "$ref": "#/components/schemas/WalletChainMetadata",
            "description": "Chain metadata."
          },
          "deposit_enabled": {
            "type": "boolean"
          },
          "network": {
            "$ref": "#/components/schemas/WalletChain",
            "description": "Wallet network family (`evm`, `tron`, `solana`)."
          },
          "settlement_rail": {
            "example": "USDT",
            "type": "string"
          },
          "wallet_currency": {
            "example": "USD",
            "type": "string"
          },
          "withdrawal_enabled": {
            "type": "boolean"
          }
        },
        "required": [
          "network",
          "chain",
          "settlement_rail",
          "wallet_currency",
          "deposit_enabled",
          "withdrawal_enabled"
        ],
        "type": "object"
      },
      "WalletCurrencySupport": {
        "description": "Metadata, availability and the current bank-deposit fee in basis points where applicable.",
        "properties": {
          "code": {
            "example": "NGN",
            "type": "string"
          },
          "decimals": {
            "example": 2,
            "format": "int32",
            "type": "integer"
          },
          "deposit_enabled": {
            "type": "boolean"
          },
          "deposit_fee_bps": {
            "description": "Current bank-deposit fee in basis points (35 = 0.35%); zero when waived\nor customer fees are disabled. Omitted for route-dependent currencies.",
            "example": 35,
            "format": "int32",
            "maximum": 9999,
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "logo_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "description": "Human-readable currency name.",
            "example": "Nigerian Naira",
            "type": "string"
          },
          "symbol": {
            "description": "Currency symbol.",
            "type": "string"
          },
          "wallet_enabled": {
            "type": "boolean"
          },
          "withdrawal_enabled": {
            "type": "boolean"
          }
        },
        "required": [
          "code",
          "name",
          "decimals",
          "symbol",
          "wallet_enabled",
          "deposit_enabled",
          "withdrawal_enabled"
        ],
        "type": "object"
      },
      "WalletOverviewBalance": {
        "description": "Balance summary for one wallet currency, including total, available, and locked amounts.",
        "properties": {
          "available": {
            "example": "49000.00",
            "type": "string"
          },
          "currency": {
            "example": "NGN",
            "type": "string"
          },
          "locked": {
            "example": "1000.00",
            "type": "string"
          },
          "rail_equivalents": {
            "items": {
              "$ref": "#/components/schemas/WalletRailEquivalentQuote"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "total": {
            "example": "50000.00",
            "type": "string"
          }
        },
        "required": [
          "currency",
          "total",
          "available",
          "locked"
        ],
        "type": "object"
      },
      "WalletOverviewLiquidBalances": {
        "description": "NGN and USD ordinary balances eligible for withdrawal after credit restrictions. A null value means the amount is temporarily unavailable. Use withdrawal quotes for fees, route limits, and restricted CNGN return eligibility.",
        "properties": {
          "ngn": {
            "example": "49000.00",
            "type": [
              "string",
              "null"
            ]
          },
          "usd": {
            "example": "1000.00",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "WalletOverviewResponse": {
        "description": "NGN and USD wallet balance overview with generation timestamp.",
        "properties": {
          "balances": {
            "items": {
              "$ref": "#/components/schemas/WalletOverviewBalance"
            },
            "type": "array"
          },
          "credit": {
            "$ref": "#/components/schemas/CreditSnapshotResponse",
            "description": "Credit line metrics snapshot."
          },
          "generated_at": {
            "description": "RFC3339 timestamp at which the overview was generated.",
            "type": "string"
          },
          "withdrawable": {
            "$ref": "#/components/schemas/WalletOverviewLiquidBalances",
            "description": "Balances currently withdrawable for NGN and USD after credit\nwithdrawal protection floors."
          }
        },
        "required": [
          "balances",
          "credit",
          "withdrawable",
          "generated_at"
        ],
        "type": "object"
      },
      "WalletRail": {
        "description": "Settlement rail with its wallet currency, availability, fees where applicable, and supported routes.",
        "enum": [
          "fiat",
          "crypto"
        ],
        "type": "string"
      },
      "WalletRailEquivalentQuote": {
        "description": "Indicative stablecoin rail equivalent for a USD wallet balance.",
        "properties": {
          "debit_amount": {
            "example": "1000.00",
            "type": "string"
          },
          "debit_currency": {
            "example": "USD",
            "type": "string"
          },
          "estimated_receive": {
            "example": "999.350000",
            "type": "string"
          },
          "expires_at": {
            "example": "2026-05-13T12:00:30Z",
            "type": "string"
          },
          "fee": {
            "example": "0.65",
            "type": "string"
          },
          "rail": {
            "example": "USDT",
            "type": "string"
          },
          "reason": {
            "example": "temporarily_unavailable",
            "type": [
              "string",
              "null"
            ]
          },
          "receive_currency": {
            "example": "USDT",
            "type": "string"
          },
          "settlement_estimate": {
            "example": "10-30 minutes",
            "type": "string"
          },
          "status": {
            "example": "available",
            "type": "string"
          }
        },
        "required": [
          "rail",
          "status",
          "estimated_receive",
          "receive_currency",
          "debit_amount",
          "debit_currency",
          "fee",
          "expires_at",
          "settlement_estimate"
        ],
        "type": "object"
      },
      "WalletRecipientResponse": {
        "description": "Saved fiat or crypto recipient record.",
        "properties": {
          "account_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "account_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "bank_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "bank_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "chain": {
            "type": [
              "string",
              "null"
            ]
          },
          "country": {
            "description": "ISO-3166 alpha-3 country code for crypto recipients. Null for fiat recipients\nand for legacy crypto recipients created before the field existed.",
            "example": "NGA",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string"
          },
          "crypto_address": {
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "recipient_type": {
            "$ref": "#/components/schemas/RecipientType"
          },
          "status": {
            "description": "`active` or `suspended`. A crypto recipient is suspended when its\ndestination address returns a SEVERE compliance verdict, and is\nre-activated automatically once a subsequent screening of that\naddress returns clean -- no manual review step is required. Fiat\nrecipients are always `active`.",
            "example": "active",
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "recipient_type",
          "label",
          "status",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "WalletSettlementAmounts": {
        "properties": {
          "fee_amount": {
            "$ref": "#/components/schemas/MoneyAmount"
          },
          "gross_amount": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/MoneyAmount"
              }
            ]
          },
          "net_amount": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/MoneyAmount"
              }
            ]
          },
          "settlement_amount": {
            "$ref": "#/components/schemas/MoneyAmount"
          },
          "total_debit": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/MoneyAmount"
              }
            ]
          }
        },
        "required": [
          "fee_amount",
          "settlement_amount"
        ],
        "type": "object"
      },
      "WalletSettlementDetails": {
        "description": "Settlement details for a wallet transaction.",
        "oneOf": [
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/BankTransferSettlementDetails"
              },
              {
                "properties": {
                  "type": {
                    "enum": [
                      "bank_transfer"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "type"
                ],
                "type": "object"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/CryptoSettlementDetails"
              },
              {
                "properties": {
                  "type": {
                    "enum": [
                      "crypto"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "type"
                ],
                "type": "object"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/UsdCashSettlementDetails"
              },
              {
                "properties": {
                  "type": {
                    "enum": [
                      "usd_cash"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "type"
                ],
                "type": "object"
              }
            ]
          }
        ]
      },
      "WalletSettlementRailSupport": {
        "description": "USD settlement rail and its enabled blockchain routes.",
        "properties": {
          "code": {
            "example": "USDT",
            "type": "string"
          },
          "decimals": {
            "example": 6,
            "format": "int32",
            "type": "integer"
          },
          "deposit_enabled": {
            "type": "boolean"
          },
          "deposit_fee_bps": {
            "format": "int32",
            "type": [
              "integer",
              "null"
            ]
          },
          "display_name": {
            "example": "Tether USD",
            "type": "string"
          },
          "minimum_deposit_amount": {
            "description": "Source token major amount required for a positive net NGN credit.",
            "type": [
              "string",
              "null"
            ]
          },
          "rail_type": {
            "example": "stablecoin",
            "type": "string"
          },
          "routes": {
            "items": {
              "$ref": "#/components/schemas/WalletChainSupport"
            },
            "type": "array"
          },
          "wallet_currency": {
            "example": "USD",
            "type": "string"
          },
          "withdrawal_enabled": {
            "type": "boolean"
          },
          "withdrawal_fee_bps": {
            "format": "int32",
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "code",
          "wallet_currency",
          "rail_type",
          "decimals",
          "display_name",
          "deposit_enabled",
          "withdrawal_enabled",
          "routes"
        ],
        "type": "object"
      },
      "WalletSupportedChainsResponse": {
        "description": "Settlement rails and available routes for the requested NGN or USD wallet currency.",
        "properties": {
          "rails": {
            "items": {
              "$ref": "#/components/schemas/WalletSettlementRailSupport"
            },
            "type": "array"
          }
        },
        "required": [
          "rails"
        ],
        "type": "object"
      },
      "WalletSupportedCurrenciesResponse": {
        "description": "User-facing wallet currencies supported by the API.",
        "properties": {
          "currencies": {
            "items": {
              "$ref": "#/components/schemas/WalletCurrencySupport"
            },
            "type": "array"
          }
        },
        "required": [
          "currencies"
        ],
        "type": "object"
      },
      "WalletTransactionDetail": {
        "description": "Detailed wallet transaction record with settlement information where available.",
        "properties": {
          "amount": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "failure_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "processing_reason": {
            "description": "`liquidity_pending` while a cNGN deposit has funds awaiting conversion\ncapacity. May accompany `success`; omitted after release/return or on holds.",
            "example": "liquidity_pending",
            "type": [
              "string",
              "null"
            ]
          },
          "rail": {
            "$ref": "#/components/schemas/WalletRail"
          },
          "reference": {
            "type": [
              "string",
              "null"
            ]
          },
          "required_action": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/RequiredAction"
              }
            ]
          },
          "settlement_details": {
            "$ref": "#/components/schemas/WalletSettlementDetails"
          },
          "settlement_rail": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string"
          },
          "tx_type": {
            "type": "string"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "rail",
          "currency",
          "tx_type",
          "status",
          "amount",
          "created_at",
          "settlement_details"
        ],
        "type": "object"
      },
      "WalletTransactionSummary": {
        "description": "Transaction summary returned in wallet timeline lists.",
        "example": {
          "amount": "1000000000.00",
          "created_at": "2026-05-16T10:30:00Z",
          "currency": "NGN",
          "description": "Bank withdrawal",
          "id": "0195f7cb-8af5-7f40-9f7c-f08f568d37aa",
          "rail": "fiat",
          "reference": "WD-20260708-001",
          "status": "processing",
          "transfer_count": 10,
          "tx_type": "withdrawal"
        },
        "properties": {
          "amount": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "processing_reason": {
            "description": "`liquidity_pending` while a cNGN deposit has funds awaiting conversion\ncapacity. May accompany `success`; omitted after release/return or on holds.",
            "example": "liquidity_pending",
            "type": [
              "string",
              "null"
            ]
          },
          "rail": {
            "$ref": "#/components/schemas/WalletRail"
          },
          "reference": {
            "type": [
              "string",
              "null"
            ]
          },
          "required_action": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/RequiredAction"
              }
            ]
          },
          "settlement_rail": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string"
          },
          "transfer_count": {
            "description": "Number of bank transfers created for a withdrawal. Present only on\nwithdrawals; greater than one for multi-beneficiary or split payouts.\nRead the transaction detail for per-transfer outcomes.",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "tx_type": {
            "description": "Canonical wallet transaction type. Possible values: `deposit`, `withdrawal`, `refund`, `fee`, `adjustment`.",
            "example": "deposit",
            "type": "string"
          }
        },
        "required": [
          "id",
          "rail",
          "currency",
          "tx_type",
          "status",
          "amount",
          "created_at"
        ],
        "type": "object"
      },
      "WalletTransactionWebhookData": {
        "additionalProperties": false,
        "properties": {
          "transaction": {
            "$ref": "#/components/schemas/WalletTransactionDetail"
          }
        },
        "required": [
          "transaction"
        ],
        "type": "object"
      },
      "WalletTransactionsResponse": {
        "description": "Cursor-paginated wallet transaction timeline.",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/WalletTransactionSummary"
            },
            "type": "array"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "WalletWithdrawalDestination": {
        "oneOf": [
          {
            "properties": {
              "account_name": {
                "type": "string"
              },
              "account_number": {
                "type": "string"
              },
              "bank_code": {
                "type": "string"
              },
              "bank_name": {
                "type": "string"
              },
              "beneficiary": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/FiatBeneficiary"
                  }
                ]
              },
              "type": {
                "enum": [
                  "bank_account"
                ],
                "type": "string"
              }
            },
            "required": [
              "bank_code",
              "bank_name",
              "account_number",
              "account_name",
              "type"
            ],
            "type": "object"
          },
          {
            "properties": {
              "address": {
                "type": "string"
              },
              "chain": {
                "$ref": "#/components/schemas/WalletChain"
              },
              "slug": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "type": {
                "enum": [
                  "crypto_address"
                ],
                "type": "string"
              }
            },
            "required": [
              "chain",
              "address",
              "type"
            ],
            "type": "object"
          }
        ]
      },
      "WalletWithdrawalItemPreview": {
        "description": "Rail-neutral item preview. Its field names intentionally match the existing\nfiat preview so NGN response JSON remains unchanged.",
        "properties": {
          "amount": {
            "type": "string"
          },
          "client_item_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "destination": {
            "$ref": "#/components/schemas/WalletWithdrawalDestination"
          },
          "transfers": {
            "items": {
              "$ref": "#/components/schemas/WalletWithdrawalTransferPreview"
            },
            "type": "array"
          }
        },
        "required": [
          "amount",
          "destination",
          "transfers"
        ],
        "type": "object"
      },
      "WalletWithdrawalItemRequest": {
        "additionalProperties": false,
        "description": "Rail-neutral withdrawal item used by list-only public adapters.",
        "properties": {
          "amount": {
            "example": "100.00",
            "type": "string"
          },
          "client_item_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "destination": {
            "$ref": "#/components/schemas/WalletWithdrawalDestination"
          }
        },
        "required": [
          "amount",
          "destination"
        ],
        "type": "object"
      },
      "WalletWithdrawalQuote": {
        "properties": {
          "as_of": {
            "description": "Time of the balance observation. A quote does not reserve funds.",
            "type": [
              "string",
              "null"
            ]
          },
          "debit_amount": {
            "type": "string"
          },
          "estimated_receive": {
            "type": "string"
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "fee": {
            "type": "string"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/WalletWithdrawalItemPreview"
            },
            "type": "array"
          },
          "max_transfer_amount": {
            "type": [
              "string",
              "null"
            ]
          },
          "max_withdrawable_amount": {
            "description": "Maximum recipient principal for one destination after allowing for fees\ncharged in addition and applicable limits. For NGN, bank quotes exclude\nfunds awaiting CNGN conversion; CNGN quotes include eligible returns.\nList requests additionally check their actual total fee.",
            "type": [
              "string",
              "null"
            ]
          },
          "rail": {
            "type": "string"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "reason_code": {
            "description": "Public reason when unavailable, such as insufficient_withdrawable_balance,\nroute_unavailable, or amount_outside_route_limits.",
            "type": [
              "string",
              "null"
            ]
          },
          "receive_currency": {
            "type": "string"
          },
          "settlement_estimate": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string"
          },
          "transfer_count": {
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "rail",
          "status",
          "fee",
          "debit_amount",
          "estimated_receive",
          "receive_currency",
          "transfer_count",
          "items"
        ],
        "type": "object"
      },
      "WalletWithdrawalQuoteResponse": {
        "properties": {
          "amount": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "quotes": {
            "items": {
              "$ref": "#/components/schemas/WalletWithdrawalQuote"
            },
            "type": "array"
          }
        },
        "required": [
          "currency",
          "amount",
          "quotes"
        ],
        "type": "object"
      },
      "WalletWithdrawalResponse": {
        "example": {
          "amount": "100.00",
          "currency": "USD",
          "id": "0195f7cb-8af5-7f40-9f7c-f08f568d37aa",
          "rail": "crypto",
          "reference": "0195f7cb-8af5-7f40-9f7c-f08f568d37aa",
          "settlement_rail": "USDC",
          "status": "processing",
          "tx_type": "withdrawal"
        },
        "properties": {
          "amount": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "debit_amount": {
            "type": [
              "string",
              "null"
            ]
          },
          "estimated_receive": {
            "type": [
              "string",
              "null"
            ]
          },
          "fee": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/WalletWithdrawalItemPreview"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "max_transfer_amount": {
            "type": [
              "string",
              "null"
            ]
          },
          "rail": {
            "type": "string"
          },
          "receive_currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "reference": {
            "type": [
              "string",
              "null"
            ]
          },
          "settlement_rail": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string"
          },
          "transfer_count": {
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "tx_type": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "status",
          "rail",
          "currency",
          "tx_type",
          "amount"
        ],
        "type": "object"
      },
      "WalletWithdrawalTransferPreview": {
        "properties": {
          "amount": {
            "type": "string"
          },
          "sequence": {
            "format": "int32",
            "type": "integer"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "sequence",
          "amount",
          "status"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "api_key": {
        "description": "API credential. Withdrawal quote and submit operations additionally require the documented Ed25519 timestamp, nonce, and signature headers.",
        "in": "header",
        "name": "X-Api-Key",
        "type": "apiKey",
        "x-default": "sb_test_your_key"
      }
    }
  },
  "info": {
    "contact": {
      "email": "support@stabyl.com",
      "name": "Stabyl Support"
    },
    "description": "REST API for approved Stabyl accounts to automate exchange, wallet, and non-production simulation workflows.",
    "license": {
      "name": "Proprietary"
    },
    "title": "Stabyl API",
    "version": "1.0.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/partner/api/keys": {
      "get": {
        "description": "Lists active API keys owned by the authenticated API key's account, including keys created through a browser session. Returns the same metadata as GET /developer/api/keys. Requires explicit api-keys:view scope. Only the last four characters are returned; full credentials and secrets are never returned. This is account-scoped, not an organization-wide listing.",
        "operationId": "get_partner_api_keys",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "keys": [
                      {
                        "audience": "external_partner",
                        "auth_scheme": "ed25519_v1",
                        "created_at": "2026-10-26T10:00:00Z",
                        "id": "01980d95-5537-76aa-88a8-ad59117632ef",
                        "ip_allowlist": [],
                        "key_last4": "t5QZ",
                        "last_used_at": null,
                        "name": "Integration",
                        "scopes": [
                          "api-keys:view",
                          "webhooks:view"
                        ],
                        "withdrawal_scope_granted_at": null
                      }
                    ]
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ApiKeyListResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Owned API keys"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "request is not allowed"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "FORBIDDEN",
                          "type": "string"
                        },
                        "message": {
                          "example": "request is not allowed",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Missing api-keys:view scope"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "List API keys",
        "tags": [
          "API Keys"
        ],
        "x-mint": {
          "content": "Select `api-keys:view` explicitly when creating your inventory credential; it is excluded from default scopes. See [List your API keys](/docs/authentication#list-your-api-keys). This read-only endpoint lists active keys for the authenticated account and never reveals full credentials or secrets."
        },
        "x-required-scopes": [
          "api-keys:view"
        ]
      }
    },
    "/partner/exchange/candles": {
      "get": {
        "description": "Returns non-empty OHLCV candles in the exact requested half-open UTC window. `interval` is one candle's width, not the chart range. Supply aligned `from` and `to` boundaries. There is no bucket-count limit; the requested window is never clipped. Results are oldest-first, empty buckets are omitted, and `is_closed` identifies a final candle that can still change. Plot `close` at `timestamp` for a line series. Responses can be cached for five seconds, so use the returned `as_of` as calculation time.",
        "operationId": "get_partner_exchange_candles",
        "parameters": [
          {
            "description": "Trading pair identifier returned by `GET /partner/exchange/markets`, for example `USD/NGN`.",
            "example": "USD/NGN",
            "in": "query",
            "name": "pair_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Width of one candle. Supported values: `1m`, `5m`, `15m`, `1h`, `4h`, `1d`. This is independent of the chart's visible time range.",
            "in": "query",
            "name": "interval",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/CandleInterval"
            }
          },
          {
            "description": "Inclusive RFC 3339 UTC start boundary. It is required and must align exactly to the selected candle interval.",
            "example": "2026-08-27T12:00:00Z",
            "in": "query",
            "name": "from",
            "required": true,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "Exclusive RFC 3339 UTC end boundary. It is required and must align exactly to the selected candle interval. There is no bucket-count limit; the requested window is never clipped.",
            "example": "2026-09-03T12:00:00Z",
            "in": "query",
            "name": "to",
            "required": true,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "as_of": "2026-05-24T13:30:00Z",
                    "candles": [
                      {
                        "close": "1655.00",
                        "high": "1660.00",
                        "is_closed": true,
                        "low": "1648.00",
                        "open": "1650.00",
                        "timestamp": "2026-05-24T12:00:00Z",
                        "trade_count": 42,
                        "volume": "1000.00",
                        "volume_quote": "1655000.00"
                      }
                    ],
                    "from": "2026-05-24T12:00:00Z",
                    "interval": "1h",
                    "pair_id": "USD/NGN",
                    "to": "2026-05-24T14:00:00Z"
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CandlesResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OHLCV candles"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "invalid request parameters"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "VALIDATION_FAILED",
                          "type": "string"
                        },
                        "message": {
                          "example": "invalid request parameters",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unsupported pair, invalid or unaligned time window"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Get candles",
        "tags": [
          "Exchange"
        ]
      }
    },
    "/partner/exchange/fills": {
      "get": {
        "description": "Returns recent public execution entries for a market as a fills view. Use it for execution review and market activity displays; use order detail when reconciling fills for one of your own orders.",
        "operationId": "get_partner_exchange_fills",
        "parameters": [
          {
            "description": "Trading pair identifier returned by `GET /partner/exchange/markets`, for example `USD/NGN`.",
            "example": "USD/NGN",
            "in": "query",
            "name": "pair_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Number of fill entries to return. Defaults to `50` and is capped by the API.",
            "example": 50,
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "fills": [
                      {
                        "created_at": "2026-05-24T12:00:00Z",
                        "id": "0197f1f0-0000-7000-8000-000000000009",
                        "price": "1650.00",
                        "quantity": "10.00",
                        "sequence": 12345,
                        "side": "buy"
                      }
                    ]
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/FillsResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Recent fills"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Get recent fills",
        "tags": [
          "Exchange"
        ]
      }
    },
    "/partner/exchange/markets": {
      "get": {
        "description": "Returns the trading markets currently available to your account. Use this response as the source of truth for pair identifiers, base and quote currencies, price precision, quantity precision, minimum notional, fee basis points, and active trading status before creating orders.",
        "operationId": "get_partner_exchange_markets",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "markets": [
                      {
                        "base_currency": "USD",
                        "is_active": true,
                        "maker_fee_bps": 1,
                        "min_base_lot": "0.01",
                        "min_notional": "100.00",
                        "pair_id": "USD/NGN",
                        "quote_currency": "NGN",
                        "taker_fee_bps": 3,
                        "tick_size": "0.01"
                      }
                    ]
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/MarketsResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "List of trading markets"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "List markets",
        "tags": [
          "Exchange"
        ]
      }
    },
    "/partner/exchange/orderbook/{pair_id}/levels": {
      "get": {
        "description": "Returns aggregated bid or ask levels for one market. Use this endpoint for focused depth checks when you only need one side of the book.",
        "operationId": "get_partner_exchange_orderbook_pair_id_levels",
        "parameters": [
          {
            "description": "Trading pair identifier returned by `GET /partner/exchange/markets`. URL-encode `/` as `%2F` in path parameters, for example `USD%2FNGN`.",
            "example": "USD%2FNGN",
            "in": "path",
            "name": "pair_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Order book side. Use `bid` for buys or `ask` for sells.",
            "example": "bid",
            "in": "query",
            "name": "side",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Maximum number of price levels to return.",
            "example": 20,
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "levels": [
                      {
                        "price": "1650.00",
                        "quantity": "100.00"
                      }
                    ],
                    "pair_id": "USD/NGN",
                    "side": "bid",
                    "timestamp": "2026-05-24T12:00:00Z"
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/OrderBookLevelsResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Order book levels"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "invalid request parameters"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "VALIDATION_FAILED",
                          "type": "string"
                        },
                        "message": {
                          "example": "invalid request parameters",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Invalid side parameter"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Get order book levels",
        "tags": [
          "Exchange"
        ]
      }
    },
    "/partner/exchange/orderbook/{pair_id}/snapshot": {
      "get": {
        "description": "Returns bid and ask depth for one market, including a sequence value and timestamp. Treat the response as a point-in-time snapshot and refresh before submitting price-sensitive orders.",
        "operationId": "get_partner_exchange_orderbook_pair_id_snapshot",
        "parameters": [
          {
            "description": "Trading pair identifier returned by `GET /partner/exchange/markets`. URL-encode `/` as `%2F` in path parameters, for example `USD%2FNGN`.",
            "example": "USD%2FNGN",
            "in": "path",
            "name": "pair_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Maximum number of bid and ask levels to return per side.",
            "example": 50,
            "in": "query",
            "name": "levels",
            "required": false,
            "schema": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "asks": [
                      {
                        "price": "1660.00",
                        "quantity": "75.00"
                      }
                    ],
                    "bids": [
                      {
                        "price": "1650.00",
                        "quantity": "100.00"
                      }
                    ],
                    "pair_id": "USD/NGN",
                    "sequence": 12345,
                    "timestamp": "2026-05-24T12:00:00Z"
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/OrderBookSnapshotResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Order book snapshot"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Get order book snapshot",
        "tags": [
          "Exchange"
        ]
      }
    },
    "/partner/exchange/orders": {
      "get": {
        "description": "Returns your account's orders with optional market, status, and pagination filters. Use this endpoint for dashboards, backfills, and reconciliation jobs.",
        "operationId": "get_partner_exchange_orders",
        "parameters": [
          {
            "description": "Optional order status filter. Supported values include `pending`, `accepted`, `partially_filled`, `filled`, `cancelled`, `rejected`, and `expired`.",
            "example": "accepted",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "description": "Trading pair identifier returned by `GET /partner/exchange/markets`, for example `USD/NGN`.",
            "example": "USD/NGN",
            "in": "query",
            "name": "pair_id",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "description": "Number of orders to return for this page.",
            "example": 50,
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            }
          },
          {
            "description": "Offset for paginated order list reads.",
            "example": 0,
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "next_cursor": null,
                    "orders": []
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ListOrdersResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Order list"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "List orders",
        "tags": [
          "Exchange"
        ]
      },
      "post": {
        "description": "Creates a limit or market order intent for asynchronous matching. A successful response means the order was accepted for processing; read the order until it reaches a terminal status before treating execution as final.",
        "operationId": "post_partner_exchange_orders",
        "parameters": [
          {
            "description": "Unique key for this exact write intent. Store it before sending the request and reuse it for retries after timeouts or transient errors.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrderRequest"
              }
            }
          },
          "description": "Order intent to submit. Amounts are decimal strings; validate pair, precision, minimums, and balances before sending.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "created_at": "2026-05-24T12:00:00Z",
                    "order_id": "0197f1f0-0000-7000-8000-000000000001",
                    "status": "pending"
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CreateOrderResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Order created"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "invalid request parameters"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "VALIDATION_FAILED",
                          "type": "string"
                        },
                        "message": {
                          "example": "invalid request parameters",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Invalid order parameters"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "request is not allowed"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "FORBIDDEN",
                          "type": "string"
                        },
                        "message": {
                          "example": "request is not allowed",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Trading admission is disabled"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Create order",
        "tags": [
          "Exchange"
        ],
        "x-mint": {
          "content": "<Note>\nOrder writes are asynchronous. Store the `Idempotency-Key` before sending the request, reuse it for retries after uncertain responses, and read the order resource for the final state.\n</Note>"
        }
      }
    },
    "/partner/exchange/orders/estimate": {
      "post": {
        "deprecated": true,
        "description": "Deprecated: use POST /partner/exchange/quotes. This route remains supported with the same request, response, and trades:view permission.",
        "operationId": "post_partner_exchange_orders_estimate",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "business_bps": 25,
                "pair_id": "USD/NGN",
                "quantity": "100.00",
                "side": "buy"
              },
              "schema": {
                "$ref": "#/components/schemas/MarketOrderEstimateRequest"
              }
            }
          },
          "description": "Pair, buy or sell side, and base-currency quantity as a decimal string. business_bps is an optional display spread.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "business_bps": 25,
                    "client_quote_notional": "150375",
                    "client_quote_price": "1503.75",
                    "estimated_at": "2026-09-29T12:00:00Z",
                    "estimated_average_price": "1500",
                    "estimated_fee_base": "0.10",
                    "estimated_fill_quantity": "100",
                    "estimated_notional": "150000",
                    "estimated_slippage_bps": 0,
                    "expires_at": "2026-09-29T12:00:30Z",
                    "fee_bps": 10,
                    "orderbook_sequence": 42,
                    "pair_id": "USD/NGN",
                    "protected_limit_price": "1507.50",
                    "quantity": "100",
                    "quote_id": "01999a40-0000-7000-8000-000000000001",
                    "reference_price": "1500",
                    "side": "buy",
                    "slippage_tolerance_bps": 50,
                    "sufficient_liquidity": true
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PartnerMarketOrderEstimateResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Market-order estimate with executable quote"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "invalid request parameters"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "VALIDATION_FAILED",
                          "type": "string"
                        },
                        "message": {
                          "example": "invalid request parameters",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Invalid side, quantity, spread, or unavailable liquidity"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Estimate market order (deprecated)",
        "tags": [
          "Exchange"
        ],
        "x-required-scopes": [
          "trades:view"
        ]
      }
    },
    "/partner/exchange/orders/{order_id}": {
      "get": {
        "description": "Returns the canonical state of one order, including status, quantities, replacement linkage, and fills where available. Use this endpoint after create, cancel, replace, timeout, or retry events.",
        "operationId": "get_partner_exchange_orders_order_id",
        "parameters": [
          {
            "description": "Public order ID returned by create or list order endpoints.",
            "in": "path",
            "name": "order_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "fills": [],
                    "order": {
                      "avg_fill_price": null,
                      "cancel_reason": null,
                      "client_order_id": "client-order-001",
                      "created_at": "2026-05-24T12:00:00Z",
                      "filled_quantity": "0.00",
                      "id": "0197f1f0-0000-7000-8000-000000000001",
                      "order_type": "limit",
                      "pair_id": "USD/NGN",
                      "price": "1650.00",
                      "quantity": "100.00",
                      "remaining_quantity": "100.00",
                      "replace": {
                        "replaced_by_order_id": null,
                        "replaces_order_id": null
                      },
                      "side": "buy",
                      "status": "accepted",
                      "time_in_force": "GTC"
                    }
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/OrderDetailsResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Order details"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "resource not found"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "NOT_FOUND",
                          "type": "string"
                        },
                        "message": {
                          "example": "resource not found",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Order not found"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Get order details",
        "tags": [
          "Exchange"
        ]
      }
    },
    "/partner/exchange/orders/{order_id}/cancel": {
      "post": {
        "description": "Requests cancellation of open quantity on an order. Filled quantity is final; only remaining quantity can be cancelled if the order is still cancellable.",
        "operationId": "post_partner_exchange_orders_order_id_cancel",
        "parameters": [
          {
            "description": "Public order ID returned by create or list order endpoints.",
            "in": "path",
            "name": "order_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Unique key for this exact write intent. Store it before sending the request and reuse it for retries after timeouts or transient errors.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "cancelled_at": "2026-05-24T12:01:00Z",
                    "order_id": "0197f1f0-0000-7000-8000-000000000001",
                    "status": "cancelling"
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CancelOrderResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Cancellation submitted"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "invalid request parameters"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "VALIDATION_FAILED",
                          "type": "string"
                        },
                        "message": {
                          "example": "invalid request parameters",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Order not cancellable"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "request is not allowed"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "FORBIDDEN",
                          "type": "string"
                        },
                        "message": {
                          "example": "request is not allowed",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not authorized to cancel this order"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "resource not found"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "NOT_FOUND",
                          "type": "string"
                        },
                        "message": {
                          "example": "resource not found",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Order not found"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Cancel order",
        "tags": [
          "Exchange"
        ],
        "x-mint": {
          "content": "<Note>\nOrder writes are asynchronous. Store the `Idempotency-Key` before sending the request, reuse it for retries after uncertain responses, and read the order resource for the final state.\n</Note>"
        }
      }
    },
    "/partner/exchange/orders/{order_id}/replace": {
      "post": {
        "description": "Submits a replacement intent for an existing limit order. Read the response and the returned order state before assuming the original order is no longer active.",
        "operationId": "post_partner_exchange_orders_order_id_replace",
        "parameters": [
          {
            "description": "Public order ID returned by create or list order endpoints.",
            "in": "path",
            "name": "order_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Unique key for this exact write intent. Store it before sending the request and reuse it for retries after timeouts or transient errors.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReplaceOrderRequest"
              }
            }
          },
          "description": "Replacement values for the existing order. Use a new idempotency key for each distinct replacement intent.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "new_order_id": "0197f1f0-0000-7000-8000-000000000008",
                    "original_order_id": "0197f1f0-0000-7000-8000-000000000001",
                    "replaced_at": "2026-05-24T12:01:00Z",
                    "status": "replacing"
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ReplaceOrderResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Order replacement submitted"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "invalid request parameters"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "VALIDATION_FAILED",
                          "type": "string"
                        },
                        "message": {
                          "example": "invalid request parameters",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Invalid order parameters"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "request is not allowed"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "FORBIDDEN",
                          "type": "string"
                        },
                        "message": {
                          "example": "request is not allowed",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Trading admission is disabled or caller is not authorized to replace this order"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "resource not found"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "NOT_FOUND",
                          "type": "string"
                        },
                        "message": {
                          "example": "resource not found",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Order not found"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Replace order",
        "tags": [
          "Exchange"
        ],
        "x-mint": {
          "content": "<Note>\nOrder writes are asynchronous. Store the `Idempotency-Key` before sending the request, reuse it for retries after uncertain responses, and read the order resource for the final state.\n</Note>"
        }
      }
    },
    "/partner/exchange/quotes": {
      "post": {
        "description": "Creates a quote valid for 30 seconds with estimated pricing, fees, and a protected price. Requires trades:view. Use expires_at to track expiry. The optional business_bps affects displayed pricing only. Accept the returned quote_id to trade; liquidity is not reserved.",
        "operationId": "post_partner_exchange_quotes",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "business_bps": 25,
                "pair_id": "USD/NGN",
                "quantity": "100.00",
                "side": "buy"
              },
              "schema": {
                "$ref": "#/components/schemas/MarketOrderEstimateRequest"
              }
            }
          },
          "description": "Pair, buy or sell side, and base-currency quantity as a decimal string. business_bps is an optional display spread.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "business_bps": 25,
                    "client_quote_notional": "150375",
                    "client_quote_price": "1503.75",
                    "estimated_at": "2026-09-29T12:00:00Z",
                    "estimated_average_price": "1500",
                    "estimated_fee_base": "0.10",
                    "estimated_fill_quantity": "100",
                    "estimated_notional": "150000",
                    "estimated_slippage_bps": 0,
                    "expires_at": "2026-09-29T12:00:30Z",
                    "fee_bps": 10,
                    "orderbook_sequence": 42,
                    "pair_id": "USD/NGN",
                    "protected_limit_price": "1507.50",
                    "quantity": "100",
                    "quote_id": "01999a40-0000-7000-8000-000000000001",
                    "reference_price": "1500",
                    "side": "buy",
                    "slippage_tolerance_bps": 50,
                    "sufficient_liquidity": true
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PartnerMarketOrderEstimateResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Market-order estimate with executable quote"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "invalid request parameters"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "VALIDATION_FAILED",
                          "type": "string"
                        },
                        "message": {
                          "example": "invalid request parameters",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Invalid side, quantity, spread, or unavailable liquidity"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Create execution quote",
        "tags": [
          "Exchange"
        ],
        "x-required-scopes": [
          "trades:view"
        ]
      }
    },
    "/partner/exchange/quotes/{quote_id}/accept": {
      "post": {
        "description": "Accepts your quote with trades:create; no body or separate idempotency key is needed. Retry uncertain responses with the same quote ID. Returns 409 for expired unaccepted quotes and 404 for unknown or unowned quotes. Fills may be partial; unfilled amounts are cancelled. Check order_id for the final result.",
        "operationId": "post_partner_exchange_quotes_quote_id_accept",
        "parameters": [
          {
            "description": "Quote ID returned by quote creation",
            "in": "path",
            "name": "quote_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "accepted_at": "2026-09-29T12:00:10Z",
                    "order_id": "01999a40-0000-7000-8000-000000000001",
                    "quote_id": "01999a40-0000-7000-8000-000000000001",
                    "status": "pending"
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AcceptSwapQuoteResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "invalid request parameters"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "VALIDATION_FAILED",
                          "type": "string"
                        },
                        "message": {
                          "example": "invalid request parameters",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": ""
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "request is not allowed"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "FORBIDDEN",
                          "type": "string"
                        },
                        "message": {
                          "example": "request is not allowed",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": ""
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "quote not found"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "NOT_FOUND",
                          "type": "string"
                        },
                        "message": {
                          "example": "quote not found",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": ""
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "quote expired; request a fresh quote"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "CONFLICT",
                          "type": "string"
                        },
                        "message": {
                          "example": "quote expired; request a fresh quote",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": ""
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Accept execution quote",
        "tags": [
          "Exchange"
        ],
        "x-required-scopes": [
          "trades:create"
        ]
      }
    },
    "/partner/exchange/ticker/{interval}": {
      "get": {
        "description": "Returns rolling statistics for `24h`, `1d`, `7d`, `30d`, `180d`, or `360d`. The `24h` and `1d` paths are aliases. Price and volume fields use the selected window; best bid and best ask always use the existing current order-book lookup and are not historical extrema. Responses can be cached for one second, so use the returned `to` as calculation time.",
        "operationId": "get_partner_exchange_ticker_interval",
        "parameters": [
          {
            "description": "Rolling statistics interval. `24h` and `1d` are equivalent aliases.",
            "example": "7d",
            "in": "path",
            "name": "interval",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/TickerInterval"
            }
          },
          {
            "description": "Trading pair identifier returned by `GET /partner/exchange/markets`, for example `USD/NGN`.",
            "example": "USD/NGN",
            "in": "query",
            "name": "pair_id",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "from": "2026-05-17T12:00:00Z",
                    "interval": "7d",
                    "tickers": [
                      {
                        "best_ask": "1651.00",
                        "best_bid": "1649.00",
                        "high": "1660.00",
                        "last": "1650.00",
                        "low": "1635.00",
                        "open": "1640.00",
                        "pair_id": "USD/NGN",
                        "price_change": "10.00",
                        "price_change_pct": 0.61,
                        "timestamp": "2026-05-24T12:00:00Z",
                        "trade_count": 1250,
                        "volume": "10000.00",
                        "volume_quote": "16500000.00"
                      }
                    ],
                    "to": "2026-05-24T12:00:00Z"
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TickerResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Ticker statistics for the selected interval"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "invalid request parameters"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "VALIDATION_FAILED",
                          "type": "string"
                        },
                        "message": {
                          "example": "invalid request parameters",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unsupported interval or trading pair"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Get ticker statistics",
        "tags": [
          "Exchange"
        ]
      }
    },
    "/partner/exchange/trade-statistics": {
      "get": {
        "description": "Returns the API-key owner's executed quote volume and marked net-inventory profit/loss for `1d`, `7d`, `30d`, `180d`, or `360d`, with the immediately preceding equal-duration comparison. The report ends at the last completed UTC hour and returns a fixed chart shape. Profit/loss excludes non-trading external contributions valued when committed; posted fees and rebates are already reflected in equity. Historical prices combine executions and Quidax midpoints, preferring executions on timestamp ties; marks must be at most 24 hours old, and unavailable inventory history or valuation returns `503`. Held inventory can change value in buckets without executions. An optional pair filter limits inventory to one current market and fails closed when other-base activity prevents attribution of shared quote inventory; otherwise recognized exchange bases are included and unlike quote cash currencies remain in separate summaries. Responses can be cached for 15 seconds, so use the returned period boundaries.",
        "operationId": "get_partner_exchange_trade_statistics",
        "parameters": [
          {
            "description": "Required report duration. Supported values: `1d`, `7d`, `30d`, `180d`, `360d`.",
            "in": "query",
            "name": "interval",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/TradeStatisticsInterval"
            }
          },
          {
            "description": "Trading pair identifier returned by `GET /partner/exchange/markets`, for example `USD/NGN`.",
            "example": "USD/NGN",
            "in": "query",
            "name": "pair_id",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "as_of": "2026-05-24T12:00:00Z",
                    "bucket_interval": "1d",
                    "current_period": {
                      "from": "2026-05-17T12:00:00Z",
                      "to": "2026-05-24T12:00:00Z"
                    },
                    "interval": "7d",
                    "pair_id": "USD/NGN",
                    "previous_period": {
                      "from": "2026-05-10T12:00:00Z",
                      "to": "2026-05-17T12:00:00Z"
                    },
                    "summaries": [
                      {
                        "buckets": [
                          {
                            "from": "2026-05-17T12:00:00Z",
                            "net_profit_loss": "1250.00",
                            "to": "2026-05-18T12:00:00Z",
                            "traded_volume": "82500.00"
                          }
                        ],
                        "net_profit_loss": {
                          "change_pct": 3.42,
                          "current": "25900.00",
                          "previous": "25043.51"
                        },
                        "quote_currency": "NGN",
                        "traded_volume": {
                          "change_pct": 3.42,
                          "current": "525900.00",
                          "previous": "508510.64"
                        }
                      }
                    ]
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TradeStatisticsResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Current and preceding-period account trade statistics"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "invalid request parameters"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "VALIDATION_FAILED",
                          "type": "string"
                        },
                        "message": {
                          "example": "invalid request parameters",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unsupported interval or trading pair"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "request is not allowed"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "FORBIDDEN",
                          "type": "string"
                        },
                        "message": {
                          "example": "request is not allowed",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "API key lacks `trades:view`"
          },
          "503": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "service unavailable"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "SERVICE_UNAVAILABLE",
                          "type": "string"
                        },
                        "message": {
                          "example": "service unavailable",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Required analytics projections are unavailable or invalid"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Get account trade statistics",
        "tags": [
          "Exchange"
        ]
      }
    },
    "/partner/exchange/trades": {
      "get": {
        "description": "Returns recent public trades for a market with sequence numbers for incremental reads. Store the last processed sequence if you are building a polling-based market data feed.",
        "operationId": "get_partner_exchange_trades",
        "parameters": [
          {
            "description": "Trading pair identifier returned by `GET /partner/exchange/markets`, for example `USD/NGN`.",
            "example": "USD/NGN",
            "in": "query",
            "name": "pair_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Resume public trade reads after a previously processed sequence number.",
            "in": "query",
            "name": "after_sequence",
            "required": false,
            "schema": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            }
          },
          {
            "description": "Number of trades to return. Defaults to `500` and is clamped to `1..=5000`.",
            "example": 500,
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "trades": [
                      {
                        "created_at": "2026-05-24T12:00:00Z",
                        "id": "0197f1f0-0000-7000-8000-000000000010",
                        "pair_id": "USD/NGN",
                        "price": "1650.00",
                        "quantity": "10.00",
                        "sequence": 12345,
                        "side": "buy"
                      }
                    ]
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TradesResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Recent trades"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Get recent trades",
        "tags": [
          "Exchange"
        ]
      }
    },
    "/partner/wallets/balances/overview": {
      "get": {
        "description": "Returns current NGN and USD balances. Use available for spend checks. Locked includes funds committed to pending activity and CNGN funds awaiting conversion capacity. Use withdrawal quotes for the current maximum on each settlement rail.",
        "operationId": "get_partner_wallets_balances_overview",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "balances": [
                      {
                        "available": "49000.00",
                        "currency": "NGN",
                        "locked": "1000.00",
                        "rail_equivalents": null,
                        "total": "50000.00"
                      },
                      {
                        "available": "1000.00",
                        "currency": "USD",
                        "locked": "0.00",
                        "rail_equivalents": [],
                        "total": "1000.00"
                      }
                    ],
                    "credit": {
                      "available_credit": "0.00",
                      "credit_limit": "0.00",
                      "credit_used": "0.00",
                      "currency": "USD",
                      "net_negative": "0.00",
                      "net_positive": "0.00",
                      "next_due_at": null,
                      "outstanding": "0.00",
                      "overdue": false,
                      "status": "active",
                      "withdrawal_blocked": false
                    },
                    "generated_at": "2026-05-24T12:00:00Z",
                    "withdrawable": {
                      "ngn": "49000.00",
                      "usd": "1000.00"
                    }
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WalletOverviewResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Wallet overview"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Get wallet balance overview",
        "tags": [
          "Wallets"
        ],
        "x-mint": {
          "content": "<Note>\nUse `available` for spend checks. `locked` includes pending account activity and CNGN funds awaiting conversion capacity. `withdrawable` accounts for credit restrictions and may be null when temporarily unavailable. Use withdrawal quotes for the maximum recipient amount on each rail, including CNGN returns.\n</Note>"
        }
      }
    },
    "/partner/wallets/chains": {
      "get": {
        "description": "Returns settlement routes, network metadata and availability for the environment being called. Defaults to USD; currency=NGN includes bank cash and CNGN on Base. Check both rail and route deposit_enabled/withdrawal_enabled flags; an enabled rail with an empty routes array has no available blockchain route. The evm, tron and solana enum values identify families, not active networks in every environment. Response examples are labeled production and sandbox/staging excerpts, not complete route lists. Anonymous requests show global cNGN fees and deposit minimum; a valid session cookie shows the user's effective values. Invalid sessions return 401. API-key headers alone do not personalize this public endpoint. Responses are private and not cached.",
        "operationId": "get_partner_wallets_chains",
        "parameters": [
          {
            "example": "USD",
            "in": "query",
            "name": "currency",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "production_usdc_excerpt": {
                    "description": "Illustrative production route from the 27 October 2026 discovery snapshot. Other active production routes are listed in the availability table; this example is not the sandbox response.",
                    "summary": "Production USD: USDC on Base (excerpt)",
                    "value": {
                      "data": {
                        "rails": [
                          {
                            "code": "USDC",
                            "decimals": 6,
                            "deposit_enabled": true,
                            "display_name": "USD Coin",
                            "rail_type": "stablecoin",
                            "routes": [
                              {
                                "chain": {
                                  "explorer_url": "https://basescan.org/tx/{tx_hash}",
                                  "logo": "https://www.base.org/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fpartner.c0800f8b.png&w=750&q=99",
                                  "name": "Base",
                                  "slug": "base",
                                  "symbol": "ETH",
                                  "token_standard": "ERC20"
                                },
                                "deposit_enabled": true,
                                "network": "evm",
                                "settlement_rail": "USDC",
                                "wallet_currency": "USD",
                                "withdrawal_enabled": true
                              }
                            ],
                            "wallet_currency": "USD",
                            "withdrawal_enabled": true
                          }
                        ]
                      },
                      "status": "success"
                    }
                  },
                  "staging_usdt_excerpt": {
                    "description": "Illustrative sandbox/staging route from the 27 October 2026 discovery snapshot. USDC has no returned network routes in that snapshot. Query the live endpoint for the full current response.",
                    "summary": "Sandbox/staging USD: USDT on Tron Nile (excerpt)",
                    "value": {
                      "data": {
                        "rails": [
                          {
                            "code": "USDT",
                            "decimals": 6,
                            "deposit_enabled": true,
                            "display_name": "Tether USD",
                            "rail_type": "stablecoin",
                            "routes": [
                              {
                                "chain": {
                                  "explorer_url": "https://nile.tronscan.org/#/transaction/{tx_hash}",
                                  "logo": "https://assets.stabyl.com/chains/tron.svg",
                                  "name": "Tron Nile",
                                  "slug": "tron-nile",
                                  "symbol": "TRX",
                                  "token_standard": "TRC20"
                                },
                                "deposit_enabled": true,
                                "network": "tron",
                                "settlement_rail": "USDT",
                                "wallet_currency": "USD",
                                "withdrawal_enabled": true
                              }
                            ],
                            "wallet_currency": "USD",
                            "withdrawal_enabled": true
                          }
                        ]
                      },
                      "status": "success"
                    }
                  }
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WalletSupportedChainsResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Supported wallet chains"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "invalid request parameters"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "VALIDATION_FAILED",
                          "type": "string"
                        },
                        "message": {
                          "example": "invalid request parameters",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Error response"
          }
        },
        "security": [],
        "summary": "List supported wallet chains",
        "tags": [
          "Wallets"
        ],
        "x-mint": {
          "content": "<Note>\nUse the live response as the source of truth before showing deposit instructions. Check both rail and route deposit_enabled/withdrawal_enabled flags. A rail with an empty routes array has no available blockchain route. The evm, tron and solana enum values identify families, not active networks in every environment. Response examples are labeled excerpts, not complete availability lists.\n</Note>\n\n### Availability snapshot — 27 October 2026\n\n| Environment | Wallet currency | Rail | Network slugs | Deposits / withdrawals |\n| --- | --- | --- | --- | --- |\n| Production | USD | USDT | `ethereum`, `bnb-smart-chain`, `tron` | Enabled / enabled |\n| Production | USD | USDT | `solana` | Enabled / disabled |\n| Production | USD | USDC | `ethereum`, `base`, `bnb-smart-chain`, `solana` | Enabled / enabled |\n| Production | NGN | CNGN | `base` | Disabled / disabled |\n| Sandbox/staging | USD | USDT | `tron-nile` (Tron Nile) | Enabled / enabled |\n| Sandbox/staging | USD | USDC | None (`routes` is empty) | No blockchain route |\n| Sandbox/staging | NGN | CNGN | `base` | Enabled / enabled |\n\nUSDT on Solana supports deposits only: its route-level `withdrawal_enabled` flag is `false` even when the USDT rail is enabled. Do not offer Solana for USDT withdrawals.\n\nArbitrum One is not returned by production discovery in this snapshot. Query the target environment with `currency=USD` or `currency=NGN` before use; this is not a permanent allowlist. See [Supported Wallet Routes](/docs/supported-wallet-routes). Simulation environment restrictions are separate from route discovery flags."
        }
      }
    },
    "/partner/wallets/credit": {
      "get": {
        "description": "Returns the credit snapshot for your account, including available credit, credit limit, credit used, outstanding debt, account status and repayment due date. This is the same credit snapshot included in the wallet balance overview.",
        "operationId": "get_partner_wallets_credit",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "available_credit": "10000.00",
                    "credit_limit": "12000.00",
                    "credit_used": "2000.00",
                    "currency": "USD",
                    "net_negative": "2000.00",
                    "net_positive": "0.00",
                    "next_due_at": "2026-10-09T10:00:00Z",
                    "outstanding": "2000.00",
                    "overdue": false,
                    "status": "active",
                    "updated_at": "2026-10-06T10:00:00Z",
                    "withdrawal_blocked": true
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CreditSnapshotResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Credit summary"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Get credit account summary",
        "tags": [
          "Wallets"
        ]
      }
    },
    "/partner/wallets/credit/activity": {
      "get": {
        "description": "Returns a cursor-paginated history of credit draws and repayments for your account. Trade activity is grouped by order. Pass the returned next_cursor as cursor to read the next page; a null next_cursor marks the end of the list.",
        "operationId": "get_partner_wallets_credit_activity",
        "parameters": [
          {
            "description": "Opaque cursor returned as `next_cursor` by the previous response for this endpoint.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "description": "Page size (default 20, max 100).",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int32",
              "minimum": 0,
              "type": [
                "integer",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "items": [
                      {
                        "amount": "2000.00",
                        "currency": "USD",
                        "draw_lot_id": null,
                        "id": "01980d95-5537-76aa-88a8-ad59117632ef",
                        "occurred_at": "2026-10-06T10:00:00Z",
                        "order_id": "01980d95-5537-76aa-88a8-ad59117632ee",
                        "quote_amount": "3100000.00",
                        "quote_currency": "NGN",
                        "type": "draw"
                      }
                    ],
                    "next_cursor": null
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CreditActivityResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Credit activity page"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "invalid request parameters"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "VALIDATION_FAILED",
                          "type": "string"
                        },
                        "message": {
                          "example": "invalid request parameters",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Invalid cursor"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "List credit activity",
        "tags": [
          "Wallets"
        ]
      }
    },
    "/partner/wallets/credit/outstanding": {
      "get": {
        "description": "Returns a cursor-paginated list of credit reserved for open orders and unpaid drawn credit grouped by order. Each item identifies its status, remaining outstanding amount and repayment due date when applicable. Pass next_cursor as cursor to continue.",
        "operationId": "get_partner_wallets_credit_outstanding",
        "parameters": [
          {
            "description": "Opaque cursor returned as `next_cursor` by the previous response for this endpoint.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int32",
              "minimum": 0,
              "type": [
                "integer",
                "null"
              ]
            }
          },
          {
            "description": "Defaults to order. Use lot for exact repayment selection and balances.",
            "in": "query",
            "name": "grouping",
            "required": false,
            "schema": {
              "oneOf": [
                {
                  "type": "null"
                },
                {
                  "$ref": "#/components/schemas/CreditCommitmentGrouping"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "items": [
                      {
                        "amount": "2000.00",
                        "currency": "USD",
                        "due_at": "2026-10-09T10:00:00Z",
                        "id": "01980d95-5537-76aa-88a8-ad59117632ee",
                        "kind": "draw",
                        "opened_at": "2026-10-06T10:00:00Z",
                        "order_id": "01980d95-5537-76aa-88a8-ad59117632ee",
                        "outstanding": "2000.00",
                        "quote_currency": "NGN",
                        "quote_outstanding": "3100000.00",
                        "side": "buy",
                        "status": "open"
                      }
                    ],
                    "next_cursor": null
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CreditCommitmentsResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Outstanding commitments page"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "invalid request parameters"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "VALIDATION_FAILED",
                          "type": "string"
                        },
                        "message": {
                          "example": "invalid request parameters",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Invalid cursor"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "List outstanding credit commitments",
        "tags": [
          "Wallets"
        ]
      }
    },
    "/partner/wallets/credit/repayments": {
      "post": {
        "description": "Request repayment of outstanding USD or NGN credit from available funds in the same currency. The amount is a maximum. Retain the original Idempotency-Key when retrying and poll the receipt until completed; processing does not confirm payment.",
        "operationId": "post_partner_wallets_credit_repayments",
        "parameters": [
          {
            "description": "Unique key for this exact write intent. Store it before sending the request and reuse it for retries after timeouts or transient errors.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreditRepaymentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "created_at": "2026-09-19T10:00:00Z",
                    "currency": "NGN",
                    "id": "01980d95-5537-76aa-88a8-ad59117632ef",
                    "repaid_amount": "1000.00",
                    "requested_amount": "1000.00",
                    "status": "completed"
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CreditRepaymentResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Repayment accepted or replayed; inspect status"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "invalid request parameters"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "VALIDATION_FAILED",
                          "type": "string"
                        },
                        "message": {
                          "example": "invalid request parameters",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Invalid request"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "idempotency key already used"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "CONFLICT",
                          "type": "string"
                        },
                        "message": {
                          "example": "idempotency key already used",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Idempotency conflict"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Repay outstanding credit",
        "tags": [
          "Wallets"
        ]
      }
    },
    "/partner/wallets/credit/repayments/{repayment_id}": {
      "get": {
        "description": "Read the status and repaid amount of your repayment request. A completed receipt may report zero when no eligible debt or available funds remain, or the amount is too small to apply. A missing receipt is not confirmation of payment.",
        "operationId": "get_partner_wallets_credit_repayments_repayment_id",
        "parameters": [
          {
            "in": "path",
            "name": "repayment_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "created_at": "2026-09-19T10:00:00Z",
                    "currency": "NGN",
                    "id": "01980d95-5537-76aa-88a8-ad59117632ef",
                    "repaid_amount": "1000.00",
                    "requested_amount": "1000.00",
                    "status": "completed"
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CreditRepaymentResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Repayment status"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "resource not found"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "NOT_FOUND",
                          "type": "string"
                        },
                        "message": {
                          "example": "resource not found",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Get credit repayment status",
        "tags": [
          "Wallets"
        ]
      }
    },
    "/partner/wallets/crypto/address": {
      "get": {
        "description": "Returns the deposit address for a requested chain and creates it when it does not already exist. Production requires approved KYB before existing details are returned or a new address is provisioned. Store the chain and address together, and display the returned route exactly.",
        "operationId": "get_partner_wallets_crypto_address",
        "parameters": [
          {
            "description": "Blockchain route family (`network`) returned by `GET /partner/wallets/chains`: `evm`, `tron`, or `solana`. When the family has more than one network, also pass `slug`.",
            "example": "tron",
            "in": "query",
            "name": "chain",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/WalletChain"
            }
          },
          {
            "description": "Optional exact network slug when a route family has multiple supported networks.",
            "in": "query",
            "name": "slug",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "address": "TQn9Y2khEsLM5xk6E8hD4fQv3BpD5V6m7N",
                    "chain": "tron",
                    "memo": null,
                    "slug": "tron"
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WalletAddressResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Deposit address"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "request is not allowed"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "FORBIDDEN",
                          "type": "string"
                        },
                        "message": {
                          "example": "request is not allowed",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Approved KYB required in production"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Get crypto deposit address",
        "tags": [
          "Wallets"
        ],
        "x-mint": {
          "content": "<Warning>\nShow the returned chain and address exactly. Sending funds on a different chain can cause permanent loss.\n</Warning>"
        }
      }
    },
    "/partner/wallets/crypto/deposits/{id}/travel-rule": {
      "get": {
        "description": "Returns the sender information fields required to release a held crypto deposit. Use the transaction ID from wallet transaction reads.",
        "operationId": "get_partner_wallets_crypto_deposits_id_travel_rule",
        "parameters": [
          {
            "description": "Public wallet transaction ID returned by the transaction list endpoint.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "fields": [
                      {
                        "label": "Sender name",
                        "name": "sender_originator",
                        "required": true
                      },
                      {
                        "label": "Sender country",
                        "name": "sender_country",
                        "required": true
                      },
                      {
                        "label": "Purpose",
                        "name": "purpose",
                        "options": [
                          {
                            "label": "Personal transfer",
                            "value": "personal_transfer"
                          },
                          {
                            "label": "Business payment",
                            "value": "business_payment"
                          },
                          {
                            "label": "Goods or services",
                            "value": "goods_or_services"
                          },
                          {
                            "label": "Investment or savings",
                            "value": "investment_or_savings"
                          },
                          {
                            "label": "Other",
                            "value": "other"
                          }
                        ],
                        "required": true
                      }
                    ],
                    "status": "required",
                    "transaction_id": "019bd2d1-4e10-77ab-88d4-93f43d6a6df2"
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TravelRuleRequirementResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Travel Rule requirement"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "invalid request parameters"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "VALIDATION_FAILED",
                          "type": "string"
                        },
                        "message": {
                          "example": "invalid request parameters",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Invalid transaction id"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "resource not found"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "NOT_FOUND",
                          "type": "string"
                        },
                        "message": {
                          "example": "resource not found",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Travel Rule case not found"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Get crypto deposit Travel Rule requirements",
        "tags": [
          "Wallets"
        ],
        "x-mint": {
          "content": "<Note>\nUse these endpoints only when a wallet transaction includes `required_action.type = \"travel_rule\"`. The deposit remains unavailable until clearance completes.\n</Note>"
        }
      },
      "post": {
        "description": "Submits sender information for a held crypto deposit. Repeating a submission for an already submitted case returns the submitted state.",
        "operationId": "post_partner_wallets_crypto_deposits_id_travel_rule",
        "parameters": [
          {
            "description": "Public wallet transaction ID returned by the transaction list endpoint.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TravelRuleSubmissionRequest"
              }
            }
          },
          "description": "Sender information required to continue Travel Rule clearance for this held crypto deposit.",
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "status": "submitted",
                    "transaction_id": "019bd2d1-4e10-77ab-88d4-93f43d6a6df2"
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TravelRuleSubmissionResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Travel Rule submission accepted"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "invalid request parameters"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "VALIDATION_FAILED",
                          "type": "string"
                        },
                        "message": {
                          "example": "invalid request parameters",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Invalid request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "resource not found"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "NOT_FOUND",
                          "type": "string"
                        },
                        "message": {
                          "example": "resource not found",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Travel Rule case not found"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "idempotency key already used"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "CONFLICT",
                          "type": "string"
                        },
                        "message": {
                          "example": "idempotency key already used",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Travel Rule case is closed"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Submit crypto deposit Travel Rule information",
        "tags": [
          "Wallets"
        ],
        "x-mint": {
          "content": "<Note>\nUse these endpoints only when a wallet transaction includes `required_action.type = \"travel_rule\"`. The deposit remains unavailable until clearance completes.\n</Note>"
        }
      }
    },
    "/partner/wallets/currencies": {
      "get": {
        "description": "Returns currently available wallet currency choices and their metadata. Bank currency availability follows bank-payment support available to the authenticated API-key owner. USD discovery is unchanged. Bank currencies include the current integer deposit_fee_bps (35 = 0.35%, zero = no fee); USD omits it. Use this response to populate currency choices; existing owned wallet balances remain readable independently. CNGN settles into NGN; USDT and USDC settle into USD.",
        "operationId": "get_partner_wallets_currencies",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "currencies": [
                      {
                        "code": "NGN",
                        "decimals": 2,
                        "deposit_enabled": true,
                        "deposit_fee_bps": 0,
                        "logo_url": null,
                        "name": "Nigerian Naira",
                        "symbol": "NGN",
                        "wallet_enabled": true,
                        "withdrawal_enabled": true
                      },
                      {
                        "code": "USD",
                        "decimals": 2,
                        "deposit_enabled": true,
                        "logo_url": null,
                        "name": "US Dollar",
                        "symbol": "$",
                        "wallet_enabled": true,
                        "withdrawal_enabled": true
                      }
                    ]
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WalletSupportedCurrenciesResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Supported wallet currencies"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "List wallet currencies",
        "tags": [
          "Wallets"
        ],
        "x-mint": {
          "content": "<Note>\n`USDT` and `USDC` settle into the USD wallet; `CNGN` settles into the NGN wallet. They are not separate wallet currencies.\nBank currencies include `deposit_fee_bps`: `35` means `0.35%`, and `0` means no bank-deposit fee. Display `deposit_fee_bps / 100` as a percentage. Deposit fee amounts round upward to the smallest currency unit. USD omits this currency-level field; use settlement-route metadata for route-specific fees. Discovery reports the current policy for new deposits; accepted deposits retain their captured policy.\n</Note>"
        }
      }
    },
    "/partner/wallets/fiat/banks": {
      "get": {
        "description": "Returns supported banks for the requested fiat currency (default NGN) for fiat recipient setup and account verification. Refresh this list periodically instead of maintaining a hardcoded bank directory.",
        "operationId": "get_partner_wallets_fiat_banks",
        "parameters": [
          {
            "description": "Currency code (default: \"NGN\")",
            "example": "NGN",
            "in": "query",
            "name": "currency",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": [
                    {
                      "bank_code": "044",
                      "institution_code": "000014",
                      "institution_name": "Access Bank"
                    }
                  ],
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/BankResponse"
                      },
                      "type": "array"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "List of banks"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "invalid request parameters"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "VALIDATION_FAILED",
                          "type": "string"
                        },
                        "message": {
                          "example": "invalid request parameters",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unsupported currency"
          },
          "503": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "service unavailable"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "SERVICE_UNAVAILABLE",
                          "type": "string"
                        },
                        "message": {
                          "example": "service unavailable",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bank service temporarily unavailable"
          }
        },
        "security": [],
        "summary": "List supported banks",
        "tags": [
          "Wallets"
        ],
        "x-mint": {
          "content": "<Note>\nFiat deposit and account-verification routes prepare account records only. Reconcile credited deposits from wallet transactions.\n</Note>"
        }
      }
    },
    "/partner/wallets/fiat/deposit-account": {
      "get": {
        "description": "Returns the fiat deposit account for incoming NGN deposits. Production requires approved KYB before existing details are returned or a new account is provisioned. Display account name, bank name, and account number exactly as returned, then reconcile deposits through wallet transactions.",
        "operationId": "get_partner_wallets_fiat_deposit_account",
        "parameters": [
          {
            "description": "Fiat wallet currency. Defaults to `NGN`.",
            "example": "NGN",
            "in": "query",
            "name": "currency",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "account_name": "Love ltd",
                    "account_number": "1234567890",
                    "bank_name": "Wema Bank",
                    "currency": "NGN"
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DepositAccountResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Deposit account details"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "request is not allowed"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "FORBIDDEN",
                          "type": "string"
                        },
                        "message": {
                          "example": "request is not allowed",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Approved KYB required for production access and business deposit-account provisioning"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Get fiat deposit account",
        "tags": [
          "Wallets"
        ],
        "x-mint": {
          "content": "<Note>\nFiat deposit and account-verification routes prepare account records only. Reconcile credited deposits from wallet transactions.\n</Note>"
        }
      }
    },
    "/partner/wallets/fiat/verify-account": {
      "post": {
        "description": "Verifies fiat bank account details and returns the account name that should be shown before saving a recipient. Production requires approved KYB. Verification does not create a recipient and does not move funds.",
        "operationId": "post_partner_wallets_fiat_verify_account",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VerifyAccountRequest"
              }
            }
          },
          "description": "Bank account details to verify before saving a fiat recipient.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "account_name": "EXAMPLE RECIPIENT"
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/VerifyAccountResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Account verification result"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "invalid request parameters"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "VALIDATION_FAILED",
                          "type": "string"
                        },
                        "message": {
                          "example": "invalid request parameters",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Invalid account"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Verify bank account",
        "tags": [
          "Wallets"
        ],
        "x-mint": {
          "content": "<Note>\nFiat deposit and account-verification routes prepare account records only. Reconcile credited deposits from wallet transactions.\n</Note>"
        }
      }
    },
    "/partner/wallets/rails/{rail}/pool": {
      "get": {
        "description": "Returns platform-wide NGN conversion capacity with status and observation time. Requires wallets:view. This snapshot does not reserve capacity or guarantee immediate conversion for a subsequent deposit. Eligible deposits receive capacity automatically in FIFO order. Returns 503 when a current snapshot is unavailable.",
        "operationId": "get_partner_wallets_rails_rail_pool",
        "parameters": [
          {
            "description": "Settlement rail, case-insensitive. Only CNGN is supported.",
            "example": "CNGN",
            "in": "path",
            "name": "rail",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "as_of": "2026-10-20T12:00:00Z",
                    "available": "50000000.00",
                    "cap": "500000000.00",
                    "currency": "NGN",
                    "rail": "CNGN",
                    "status": "available",
                    "utilized": "450000000.00"
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CngnPoolResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Current conversion capacity"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "API key required"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "request is not allowed"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "FORBIDDEN",
                          "type": "string"
                        },
                        "message": {
                          "example": "request is not allowed",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Missing wallets:view scope"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "resource not found"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "NOT_FOUND",
                          "type": "string"
                        },
                        "message": {
                          "example": "resource not found",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Pool not available for this rail"
          },
          "503": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "service unavailable"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "SERVICE_UNAVAILABLE",
                          "type": "string"
                        },
                        "message": {
                          "example": "service unavailable",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Current capacity temporarily unavailable"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Get CNGN conversion capacity",
        "tags": [
          "Wallets"
        ],
        "x-mint": {
          "content": "See the [NGN currency guide](/docs/currencies/ngn#cngn) for deposits, conversion capacity, withdrawal limits, and `conversion.updated` webhook handling."
        },
        "x-required-scopes": [
          "wallets:view"
        ]
      }
    },
    "/partner/wallets/recipients": {
      "get": {
        "description": "Returns saved recipient records with optional type and currency filters. Use this endpoint to keep internal tools aligned with the current account address book.",
        "operationId": "get_partner_wallets_recipients",
        "parameters": [
          {
            "description": "Filter saved recipients by type: `fiat` or `crypto`.",
            "in": "query",
            "name": "recipient_type",
            "required": false,
            "schema": {
              "oneOf": [
                {
                  "type": "null"
                },
                {
                  "$ref": "#/components/schemas/RecipientType"
                }
              ]
            }
          },
          {
            "description": "Filter saved recipients by wallet currency or settlement rail.",
            "in": "query",
            "name": "currency",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": [
                    {
                      "account_name": "Example Recipient",
                      "account_number": "0123456789",
                      "bank_code": "044",
                      "bank_name": "Access Bank",
                      "chain": null,
                      "created_at": "2026-05-24T12:00:00Z",
                      "crypto_address": null,
                      "currency": "NGN",
                      "id": "0197f1f0-0000-7000-8000-000000000002",
                      "label": "Operations account",
                      "recipient_type": "fiat",
                      "updated_at": "2026-05-24T12:00:00Z"
                    }
                  ],
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/WalletRecipientResponse"
                      },
                      "type": "array"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Recipient list"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "List saved recipients",
        "tags": [
          "Wallets"
        ],
        "x-mint": {
          "content": "<Warning>\nSaved recipients are address book records. Creating, updating, or deleting a recipient does not submit a withdrawal or move funds.\n</Warning>"
        }
      },
      "post": {
        "description": "Creates a saved fiat or crypto recipient record for future use in Stabyl Pro workflows. Production requires approved KYB for fiat recipients. Creating a recipient does not submit a withdrawal or move funds.",
        "operationId": "post_partner_wallets_recipients",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWalletRecipientRequest"
              }
            }
          },
          "description": "Recipient details to save in the account address book. This request does not submit a withdrawal.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "account_name": "Example Recipient",
                    "account_number": "0123456789",
                    "bank_code": "044",
                    "bank_name": "Access Bank",
                    "chain": null,
                    "created_at": "2026-05-24T12:00:00Z",
                    "crypto_address": null,
                    "currency": "NGN",
                    "id": "0197f1f0-0000-7000-8000-000000000002",
                    "label": "Operations account",
                    "recipient_type": "fiat",
                    "updated_at": "2026-05-24T12:00:00Z"
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WalletRecipientResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Recipient created"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "invalid request parameters"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "VALIDATION_FAILED",
                          "type": "string"
                        },
                        "message": {
                          "example": "invalid request parameters",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Unable to process this wallet address"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "FORBIDDEN",
                          "type": "string"
                        },
                        "message": {
                          "example": "Unable to process this wallet address",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Recipient not permitted; error code FORBIDDEN"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Create saved recipient",
        "tags": [
          "Wallets"
        ],
        "x-mint": {
          "content": "<Warning>\nSaved recipients are address book records. Creating, updating, or deleting a recipient does not submit a withdrawal or move funds.\n</Warning>"
        }
      }
    },
    "/partner/wallets/recipients/{recipient_id}": {
      "delete": {
        "description": "Deletes a saved recipient from the account address book. Existing historical transactions remain available in wallet transaction reads.",
        "operationId": "delete_partner_wallets_recipients_recipient_id",
        "parameters": [
          {
            "description": "Saved recipient ID returned by create or list recipient endpoints.",
            "in": "path",
            "name": "recipient_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": null,
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Recipient deleted"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "resource not found"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "NOT_FOUND",
                          "type": "string"
                        },
                        "message": {
                          "example": "resource not found",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Delete saved recipient",
        "tags": [
          "Wallets"
        ],
        "x-mint": {
          "content": "<Warning>\nSaved recipients are address book records. Creating, updating, or deleting a recipient does not submit a withdrawal or move funds.\n</Warning>"
        }
      },
      "patch": {
        "description": "Updates mutable recipient fields. Production requires approved KYB for every fiat-recipient update; bank detail changes also require account verification again. Updating a recipient does not submit a withdrawal or move funds.",
        "operationId": "patch_partner_wallets_recipients_recipient_id",
        "parameters": [
          {
            "description": "Saved recipient ID returned by create or list recipient endpoints.",
            "in": "path",
            "name": "recipient_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWalletRecipientRequest"
              }
            }
          },
          "description": "Mutable recipient fields to update. Bank detail changes require account verification again.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "account_name": "Example Recipient",
                    "account_number": "0123456789",
                    "bank_code": "044",
                    "bank_name": "Access Bank",
                    "chain": null,
                    "created_at": "2026-05-24T12:00:00Z",
                    "crypto_address": null,
                    "currency": "NGN",
                    "id": "0197f1f0-0000-7000-8000-000000000002",
                    "label": "Operations account",
                    "recipient_type": "fiat",
                    "updated_at": "2026-05-24T12:00:00Z"
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WalletRecipientResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Recipient updated"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "invalid request parameters"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "VALIDATION_FAILED",
                          "type": "string"
                        },
                        "message": {
                          "example": "invalid request parameters",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "request is not allowed"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "FORBIDDEN",
                          "type": "string"
                        },
                        "message": {
                          "example": "request is not allowed",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Approved KYB required for fiat-recipient updates in production"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "resource not found"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "NOT_FOUND",
                          "type": "string"
                        },
                        "message": {
                          "example": "resource not found",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Unable to process this wallet address"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "FORBIDDEN",
                          "type": "string"
                        },
                        "message": {
                          "example": "Unable to process this wallet address",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Recipient not permitted; error code FORBIDDEN"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Update saved recipient",
        "tags": [
          "Wallets"
        ],
        "x-mint": {
          "content": "<Warning>\nSaved recipients are address book records. Creating, updating, or deleting a recipient does not submit a withdrawal or move funds.\n</Warning>"
        }
      }
    },
    "/partner/wallets/transactions": {
      "get": {
        "description": "Returns a cursor-paginated wallet timeline across fiat and stablecoin activity. Use this endpoint for reconciliation of deposits, fees, adjustments, refunds, and withdrawals initiated through the API or Stabyl Pro. A withdrawal to several beneficiaries is one timeline item; its `transfer_count` reports how many bank transfers it created.",
        "operationId": "get_partner_wallets_transactions",
        "parameters": [
          {
            "description": "Opaque cursor returned as `next_cursor` by the previous response for this endpoint.",
            "example": "MjAyNi0wMi0xOFQxMjowMDowMCswMDowMHw0YjdmYTU4NC0xNGI0LTQ5NWItYjEwYS0xNTM2ZDZlOTQxMTg",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "description": "Number of transactions to return. Defaults to `20` and is capped by the API.",
            "example": 20,
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int32",
              "minimum": 0,
              "type": [
                "integer",
                "null"
              ]
            }
          },
          {
            "description": "Filter wallet activity by rail, such as fiat or crypto.",
            "example": "fiat",
            "in": "query",
            "name": "rail",
            "required": false,
            "schema": {
              "oneOf": [
                {
                  "type": "null"
                },
                {
                  "$ref": "#/components/schemas/WalletRail"
                }
              ]
            }
          },
          {
            "description": "Filter wallet activity by wallet currency, such as `NGN` or `USD`.",
            "example": "NGN",
            "in": "query",
            "name": "currency",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "description": "Filter wallet activity by status, such as `pending`, `processing`, `success`, `partial`, `failed`, `cancelled`, or `hold`.",
            "example": "success",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "description": "Filter by transaction type: `deposit`, `withdrawal`, `refund`, `fee`, or `adjustment`.",
            "example": "deposit",
            "in": "query",
            "name": "tx_type",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "description": "Inclusive lower time bound. Accepts RFC3339 or date-only `YYYY-MM-DD`; date-only values start at midnight UTC.",
            "example": "2026-02-01",
            "in": "query",
            "name": "date_from",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "description": "Inclusive upper time bound. Accepts RFC3339 or date-only `YYYY-MM-DD`; date-only values include the full UTC day.",
            "example": "2026-02-28",
            "in": "query",
            "name": "date_to",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "description": "Case-insensitive partial match against the transaction reference.",
            "example": "STABYL-WD",
            "in": "query",
            "name": "reference",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "items": [
                      {
                        "amount": "100.00",
                        "created_at": "2026-05-24T12:00:00Z",
                        "currency": "USD",
                        "description": "USDT deposit",
                        "id": "0197f1f0-0000-7000-8000-000000000003",
                        "rail": "crypto",
                        "reference": "tx_001",
                        "settlement_rail": "USDT",
                        "status": "success",
                        "tx_type": "deposit"
                      }
                    ],
                    "next_cursor": null
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WalletTransactionsResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Wallet transactions"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "List wallet transactions",
        "tags": [
          "Wallets"
        ],
        "x-mint": {
          "content": "<Note>\nUse wallet transactions as the reconciliation source of truth. Withdrawals initiated through the API or Stabyl Pro can appear in this timeline. A bulk NGN withdrawal is one parent transaction; read its detail and walk `settlement_details.transfers` to see the outcome of each bank transfer.\n\nList items and details optionally include `processing_reason: \"liquidity_pending\"` when a CNGN deposit has funds still awaiting conversion-pool capacity. This is not a new status: a deposit can already have `status: \"success\"` while its restricted portion awaits conversion. Use conversion progress for amounts. The reason is omitted after full release or return, and on failed, cancelled, or held deposits; ordinary processing, payout delays, screening, and Travel Rule holds do not produce it. SDKs need an optional reason string on summary and detail models; clients should check `processing_reason`, tolerate unknown values, and clear an earlier reason when the field is absent.\n</Note>"
        }
      }
    },
    "/partner/wallets/transactions/{id}": {
      "get": {
        "description": "Returns detailed information for one wallet transaction by public transaction ID, including settlement details when available. For an NGN withdrawal, `settlement_details.transfers` lists every bank transfer with its own status, `client_item_id`, and recipient, which is how you reconcile bulk withdrawals and `partial` outcomes. Use this endpoint to refresh known records or investigate reconciliation gaps.",
        "operationId": "get_partner_wallets_transactions_id",
        "parameters": [
          {
            "description": "Public wallet transaction ID returned by the transaction list endpoint.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "amount": "99.50",
                    "created_at": "2026-05-16T10:30:00Z",
                    "currency": "USD",
                    "description": "USD withdrawal via USDC",
                    "failure_reason": null,
                    "id": "0195f7cb-8af5-7f40-9f7c-f08f568d37aa",
                    "rail": "crypto",
                    "reference": "wd_20260516_001",
                    "settlement_details": {
                      "beneficiary_nickname": null,
                      "block_number": null,
                      "blockchain_tx_hash": null,
                      "confirmations": null,
                      "confirmed_at": null,
                      "destination_address": "0xRecipient",
                      "explorer_url": null,
                      "failed_at": null,
                      "network": {
                        "chain": "evm",
                        "chain_id": 8453,
                        "display_name": "Base",
                        "slug": "base",
                        "token_standard": "erc20"
                      },
                      "network_display": "Base",
                      "network_fee": null,
                      "principal_amount": {
                        "amount": "99.50",
                        "currency": "USDC"
                      },
                      "rail_reference": "wd_20260516_001",
                      "sender_address": null,
                      "type": "crypto"
                    },
                    "settlement_rail": "USDC",
                    "status": "processing",
                    "tx_type": "withdrawal",
                    "updated_at": "2026-05-16T10:31:00Z"
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WalletTransactionDetail"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Transaction detail"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "resource not found"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "NOT_FOUND",
                          "type": "string"
                        },
                        "message": {
                          "example": "resource not found",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Get wallet transaction",
        "tags": [
          "Wallets"
        ],
        "x-mint": {
          "content": "<Note>\nUse wallet transactions as the reconciliation source of truth. Withdrawals initiated through the API or Stabyl Pro can appear in this timeline. A bulk NGN withdrawal is one parent transaction; read its detail and walk `settlement_details.transfers` to see the outcome of each bank transfer.\n\nList items and details optionally include `processing_reason: \"liquidity_pending\"` when a CNGN deposit has funds still awaiting conversion-pool capacity. This is not a new status: a deposit can already have `status: \"success\"` while its restricted portion awaits conversion. Use conversion progress for amounts. The reason is omitted after full release or return, and on failed, cancelled, or held deposits; ordinary processing, payout delays, screening, and Travel Rule holds do not produce it. SDKs need an optional reason string on summary and detail models; clients should check `processing_reason`, tolerate unknown values, and clear an earlier reason when the field is absent.\n</Note>"
        }
      }
    },
    "/partner/wallets/transactions/{transaction_id}/conversion": {
      "get": {
        "description": "Returns cumulative conversion progress for your credited incoming CNGN transaction. Requires wallets:view. Store only the highest revision per transaction, whether received here or through conversion.updated. Completed means no restricted amount remains; funds may have been released or returned. Use balances and withdrawal quotes for current spendability. Returns 404 for unknown, unowned, or not-yet-credited transactions.",
        "operationId": "get_partner_wallets_transactions_transaction_id_conversion",
        "parameters": [
          {
            "description": "Incoming CNGN wallet transaction ID from wallet transactions or a deposit webhook. This is not a blockchain transaction hash.",
            "example": "019a0430-0000-7000-8000-000000000001",
            "in": "path",
            "name": "transaction_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "currency": "NGN",
                    "initially_restricted_amount": "10000000.00",
                    "released_amount": "4000000.00",
                    "remaining_amount": "5000000.00",
                    "returned_amount": "1000000.00",
                    "revision": 3,
                    "settlement_rail": "CNGN",
                    "status": "pending",
                    "transaction_id": "019a0430-0000-7000-8000-000000000001"
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CngnConversionResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Cumulative conversion progress"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "API key required"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "request is not allowed"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "FORBIDDEN",
                          "type": "string"
                        },
                        "message": {
                          "example": "request is not allowed",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Missing wallets:view scope"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "resource not found"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "NOT_FOUND",
                          "type": "string"
                        },
                        "message": {
                          "example": "resource not found",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Conversion progress not found or deposit not yet credited"
          },
          "503": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SERVICE_UNAVAILABLE",
                    "message": "service unavailable"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "SERVICE_UNAVAILABLE",
                          "type": "string"
                        },
                        "message": {
                          "example": "service unavailable",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Conversion progress temporarily unavailable"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Get CNGN conversion progress",
        "tags": [
          "Wallets"
        ],
        "x-mint": {
          "content": "See the [NGN currency guide](/docs/currencies/ngn#cngn) for deposits, conversion capacity, withdrawal limits, and `conversion.updated` webhook handling."
        },
        "x-required-scopes": [
          "wallets:view"
        ]
      }
    },
    "/partner/wallets/withdrawal/quotes": {
      "post": {
        "description": "Quotes NGN bank items, one NGN CNGN item, or one USD stablecoin item. NGN quotes include max_withdrawable_amount and as_of for the selected rail. An oversized valid NGN request returns status unavailable and the current maximum while preserving the requested fee, debit, and receive amounts. Quoting never reserves funds; submit rechecks availability.",
        "operationId": "post_partner_wallets_withdrawal_quotes",
        "parameters": [
          {
            "description": "Current Unix time in milliseconds. The server accepts at most 30 seconds of clock skew.",
            "example": "1783756800000",
            "in": "header",
            "name": "X-Stabyl-Timestamp",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "A new UUIDv4 or UUIDv7 for this HTTP attempt. A verified nonce is single-use for five minutes.",
            "example": "018f32f0-3333-7333-8333-333333333333",
            "in": "header",
            "name": "X-Stabyl-Nonce",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Unpadded base64url Ed25519 signature of the version 1 canonical payload. The exact path includes the server prefix, for example `/v1/partner/wallets/withdrawals`.",
            "example": "-_flQmASKXMSSh5cMTAON3zdPWWDWus4ONfim0kYqaG3nGPyWw-TC4bbr4YfmoebWgYgj6V2DNmM6WIl1oaHAA",
            "in": "header",
            "name": "X-Stabyl-Signature",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerWithdrawalQuoteRequest"
              }
            }
          },
          "description": "List-shaped withdrawal to quote: NGN bank items, or exactly one crypto item with currency NGN and settlement_rail CNGN, or currency USD and settlement_rail USDT/USDC. The signed HTTP request authenticates the caller; quoting does not reserve funds.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "amount": "200000000.00",
                    "currency": "NGN",
                    "quotes": [
                      {
                        "as_of": "2026-10-20T12:00:00Z",
                        "debit_amount": "200000200.00",
                        "estimated_receive": "200000000.00",
                        "fee": "200.00",
                        "items": [
                          {
                            "amount": "200000000.00",
                            "client_item_id": "beneficiary-1",
                            "destination": {
                              "account_name": "Example Recipient",
                              "account_number": "0123456789",
                              "bank_code": "044",
                              "bank_name": "Access Bank",
                              "type": "bank_account"
                            },
                            "transfers": [
                              {
                                "amount": "100000000.00",
                                "sequence": 1,
                                "status": "available"
                              },
                              {
                                "amount": "100000000.00",
                                "sequence": 2,
                                "status": "available"
                              }
                            ]
                          }
                        ],
                        "max_transfer_amount": "100000000.00",
                        "max_withdrawable_amount": "299999700.00",
                        "rail": "bank_transfer",
                        "receive_currency": "NGN",
                        "status": "available",
                        "transfer_count": 2
                      }
                    ]
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WalletWithdrawalQuoteResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Withdrawal quote"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "invalid request parameters"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "VALIDATION_FAILED",
                          "type": "string"
                        },
                        "message": {
                          "example": "invalid request parameters",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Invalid parameters or unsupported route"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Signed request required"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "request is not allowed"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "FORBIDDEN",
                          "type": "string"
                        },
                        "message": {
                          "example": "request is not allowed",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Missing wallets:withdraw scope"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Quote withdrawals",
        "tags": [
          "Wallets"
        ],
        "x-mint": {
          "content": "<Warning>\nWithdrawal quote and submit calls require an Ed25519 signature over the exact HTTP method, request path and query, timestamp, nonce, and raw body hash. Reuse the business idempotency key with a new timestamp, nonce, and signature when retrying an uncertain response.\n</Warning>"
        }
      }
    },
    "/partner/wallets/withdrawals": {
      "post": {
        "description": "Directly creates one parent withdrawal from the signed list request. Production requires approved KYB for every supported NGN and USD rail. Store the returned transaction ID and reconcile status and split-transfer outcomes through wallet transaction reads.",
        "operationId": "post_partner_wallets_withdrawals",
        "parameters": [
          {
            "description": "Current Unix time in milliseconds. The server accepts at most 30 seconds of clock skew.",
            "example": "1783756800000",
            "in": "header",
            "name": "X-Stabyl-Timestamp",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "A new UUIDv4 or UUIDv7 for this HTTP attempt. A verified nonce is single-use for five minutes.",
            "example": "018f32f0-3333-7333-8333-333333333333",
            "in": "header",
            "name": "X-Stabyl-Nonce",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Unpadded base64url Ed25519 signature of the version 1 canonical payload. The exact path includes the server prefix, for example `/v1/partner/wallets/withdrawals`.",
            "example": "-_flQmASKXMSSh5cMTAON3zdPWWDWus4ONfim0kYqaG3nGPyWw-TC4bbr4YfmoebWgYgj6V2DNmM6WIl1oaHAA",
            "in": "header",
            "name": "X-Stabyl-Signature",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerWithdrawalSubmitRequest"
              }
            }
          },
          "description": "List-shaped withdrawal request to execute directly. Include a stable business idempotency key and do not send an authorization token.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "amount": "200000000.00",
                    "currency": "NGN",
                    "debit_amount": "200000200.00",
                    "estimated_receive": "200000000.00",
                    "fee": "200.00",
                    "id": "0197f1f0-0000-7000-8000-000000000014",
                    "items": [
                      {
                        "amount": "200000000.00",
                        "client_item_id": "beneficiary-1",
                        "destination": {
                          "account_name": "Example Recipient",
                          "account_number": "0123456789",
                          "bank_code": "044",
                          "bank_name": "Access Bank",
                          "type": "bank_account"
                        },
                        "transfers": [
                          {
                            "amount": "100000000.00",
                            "sequence": 1,
                            "status": "pending"
                          },
                          {
                            "amount": "100000000.00",
                            "sequence": 2,
                            "status": "pending"
                          }
                        ]
                      }
                    ],
                    "max_transfer_amount": "100000000.00",
                    "rail": "fiat",
                    "receive_currency": "NGN",
                    "reference": "WD-0197f1f000007000",
                    "status": "processing",
                    "transfer_count": 2,
                    "tx_type": "withdrawal"
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WalletWithdrawalResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Parent withdrawal accepted"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "invalid request parameters"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "VALIDATION_FAILED",
                          "type": "string"
                        },
                        "message": {
                          "example": "invalid request parameters",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Invalid parameters or unsupported route"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Signed request required"
          },
          "402": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INSUFFICIENT_BALANCE",
                    "message": "insufficient balance"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "INSUFFICIENT_BALANCE",
                          "type": "string"
                        },
                        "message": {
                          "example": "insufficient balance",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Insufficient balance"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "request is not allowed"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "FORBIDDEN",
                          "type": "string"
                        },
                        "message": {
                          "example": "request is not allowed",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Approved KYB or wallets:withdraw scope required"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "idempotency key already used"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "CONFLICT",
                          "type": "string"
                        },
                        "message": {
                          "example": "idempotency key already used",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Idempotency conflict"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Create withdrawal",
        "tags": [
          "Wallets"
        ],
        "x-mint": {
          "content": "<Warning>\nWithdrawal quote and submit calls require an Ed25519 signature over the exact HTTP method, request path and query, timestamp, nonce, and raw body hash. Reuse the business idempotency key with a new timestamp, nonce, and signature when retrying an uncertain response.\n</Warning>"
        }
      }
    },
    "/partner/webhook/deliveries": {
      "get": {
        "description": "Lists slim delivery history in `created_at DESC, id DESC` order. History and `next_attempt_at` are eventual, display-only projections and are never delivery acknowledgements or scheduling state.",
        "operationId": "get_partner_webhook_deliveries",
        "parameters": [
          {
            "in": "query",
            "name": "webhook_id",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "in": "query",
            "name": "event_id",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "in": "query",
            "name": "event_type",
            "required": false,
            "schema": {
              "oneOf": [
                {
                  "type": "null"
                },
                {
                  "$ref": "#/components/schemas/PartnerWebhookEventType"
                }
              ]
            }
          },
          {
            "description": "One of `queued`, `retrying`, `delivered`, `failed`, or `cancelled`.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "description": "Inclusive lower time bound. Accepts RFC3339 or date-only `YYYY-MM-DD`; date-only values start at midnight UTC.",
            "in": "query",
            "name": "date_from",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "description": "Inclusive upper time bound. Accepts RFC3339 or date-only `YYYY-MM-DD`; date-only values include the full UTC day.",
            "in": "query",
            "name": "date_to",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "description": "Opaque cursor returned as `next_cursor` by the previous response for this endpoint.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "description": "Page size, clamped to `1..=100` (default `20`).",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int32",
              "minimum": 0,
              "type": [
                "integer",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "items": [
                      {
                        "attempt_count": 1,
                        "cancelled_at": null,
                        "created_at": "2026-07-12T11:05:00Z",
                        "delivered_at": "2026-07-12T11:05:01.083Z",
                        "event_id": "d1232fb7-a993-52ec-a8f0-0ec026397553",
                        "event_type": "exchange.accepted",
                        "failed_at": null,
                        "id": "63422af5-8417-5ffc-8607-26c1dd2e5a4b",
                        "last_attempt_at": "2026-07-12T11:05:01Z",
                        "last_error_code": null,
                        "last_http_status": 204,
                        "next_attempt_at": null,
                        "status": "delivered",
                        "updated_at": "2026-07-12T11:05:01.083Z",
                        "webhook_id": "01980d95-5537-76aa-88a8-ad59117632ef"
                      }
                    ],
                    "next_cursor": null
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PartnerWebhookDeliveriesResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Delivery history page"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "invalid request parameters"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "VALIDATION_FAILED",
                          "type": "string"
                        },
                        "message": {
                          "example": "invalid request parameters",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Invalid filter or cursor"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "MISSING_SCOPE",
                    "message": "missing_scope"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "MISSING_SCOPE",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing_scope",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Missing webhook or requested domain scope"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "List projected Partner webhook deliveries",
        "tags": [
          "Webhooks"
        ],
        "x-required-scopes": [
          "webhooks:view"
        ]
      }
    },
    "/partner/webhook/deliveries/{delivery_id}": {
      "get": {
        "description": "Returns one owned delivery and completed logical attempts in ascending attempt order. Attempts expose only signing secret version numbers, never secrets or signature values. Unknown, cross-account, and domain-inaccessible identifiers return 404.",
        "operationId": "get_partner_webhook_deliveries_delivery_id",
        "parameters": [
          {
            "description": "Deterministic delivery identifier",
            "in": "path",
            "name": "delivery_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "attempts": [
                      {
                        "attempt_number": 1,
                        "attempted_at": "2026-07-12T11:05:01Z",
                        "completed_at": "2026-07-12T11:05:01.083Z",
                        "duration_ms": 83,
                        "error_code": null,
                        "http_status": 204,
                        "id": "9192a679-1f4a-5a38-9b32-a156589665d1",
                        "next_retry_at": null,
                        "outcome": "delivered",
                        "signing_secret_versions": [
                          2,
                          1
                        ]
                      }
                    ],
                    "delivery": {
                      "attempt_count": 1,
                      "cancelled_at": null,
                      "created_at": "2026-07-12T11:05:00Z",
                      "delivered_at": "2026-07-12T11:05:01.083Z",
                      "event_id": "d1232fb7-a993-52ec-a8f0-0ec026397553",
                      "event_type": "exchange.accepted",
                      "failed_at": null,
                      "id": "63422af5-8417-5ffc-8607-26c1dd2e5a4b",
                      "last_attempt_at": "2026-07-12T11:05:01Z",
                      "last_error_code": null,
                      "last_http_status": 204,
                      "next_attempt_at": null,
                      "status": "delivered",
                      "updated_at": "2026-07-12T11:05:01.083Z",
                      "webhook_id": "01980d95-5537-76aa-88a8-ad59117632ef"
                    }
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PartnerWebhookDeliveryDetailResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Delivery and attempt history"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "MISSING_SCOPE",
                    "message": "missing_scope"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "MISSING_SCOPE",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing_scope",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Missing `webhooks:view`"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "resource not found"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "NOT_FOUND",
                          "type": "string"
                        },
                        "message": {
                          "example": "resource not found",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Delivery not found"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Get a projected Partner webhook delivery",
        "tags": [
          "Webhooks"
        ],
        "x-required-scopes": [
          "webhooks:view"
        ]
      }
    },
    "/partner/webhook/events": {
      "get": {
        "description": "Lists slim event history in `occurred_at DESC, id DESC` order. History is eventually consistent with live delivery. Unfiltered results include only wallet and/or exchange domains allowed by the caller's read scopes.",
        "operationId": "get_partner_webhook_events",
        "parameters": [
          {
            "description": "Exact event topic filter.",
            "in": "query",
            "name": "type",
            "required": false,
            "schema": {
              "oneOf": [
                {
                  "type": "null"
                },
                {
                  "$ref": "#/components/schemas/PartnerWebhookEventType"
                }
              ]
            }
          },
          {
            "description": "Inclusive lower time bound. Accepts RFC3339 or date-only `YYYY-MM-DD`; date-only values start at midnight UTC.",
            "in": "query",
            "name": "date_from",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "description": "Inclusive upper time bound. Accepts RFC3339 or date-only `YYYY-MM-DD`; date-only values include the full UTC day.",
            "in": "query",
            "name": "date_to",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "description": "Opaque cursor returned as `next_cursor` by the previous response for this endpoint.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "description": "Page size, clamped to `1..=100` (default `20`).",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int32",
              "minimum": 0,
              "type": [
                "integer",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "items": [
                      {
                        "emitted_at": "2026-07-12T11:05:00Z",
                        "id": "d1232fb7-a993-52ec-a8f0-0ec026397553",
                        "occurred_at": "2026-07-12T11:05:00Z",
                        "type": "exchange.accepted",
                        "version": 1
                      }
                    ],
                    "next_cursor": null
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PartnerWebhookEventsResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Event history page"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "invalid request parameters"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "VALIDATION_FAILED",
                          "type": "string"
                        },
                        "message": {
                          "example": "invalid request parameters",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Invalid filter or cursor"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "MISSING_SCOPE",
                    "message": "missing_scope"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "MISSING_SCOPE",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing_scope",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Missing webhook or requested domain scope"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "List projected Partner webhook events",
        "tags": [
          "Webhooks"
        ],
        "x-required-scopes": [
          "webhooks:view"
        ]
      }
    },
    "/partner/webhook/events/{event_id}": {
      "get": {
        "description": "Returns the exact public envelope and its eventually consistent delivery summaries. Unknown, cross-account, and domain-inaccessible identifiers all return 404.",
        "operationId": "get_partner_webhook_events_event_id",
        "parameters": [
          {
            "description": "Deterministic event identifier",
            "in": "path",
            "name": "event_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "deliveries": [
                      {
                        "attempt_count": 1,
                        "cancelled_at": null,
                        "created_at": "2026-07-12T11:05:00Z",
                        "delivered_at": "2026-07-12T11:05:01.083Z",
                        "event_id": "d1232fb7-a993-52ec-a8f0-0ec026397553",
                        "event_type": "exchange.accepted",
                        "failed_at": null,
                        "id": "63422af5-8417-5ffc-8607-26c1dd2e5a4b",
                        "last_attempt_at": "2026-07-12T11:05:01Z",
                        "last_error_code": null,
                        "last_http_status": 204,
                        "next_attempt_at": null,
                        "status": "delivered",
                        "updated_at": "2026-07-12T11:05:01.083Z",
                        "webhook_id": "01980d95-5537-76aa-88a8-ad59117632ef"
                      }
                    ],
                    "event": {
                      "data": {
                        "order": {
                          "avg_fill_price": null,
                          "cancel_reason": null,
                          "client_order_id": "partner-order-1042",
                          "created_at": "2026-07-12T11:05:00Z",
                          "filled_quantity": "0",
                          "id": "01980d95-5537-76aa-88a8-ad59117632ef",
                          "order_type": "limit",
                          "pair_id": "USD/NGN",
                          "price": "1650.00",
                          "quantity": "100.00",
                          "reject_reason": null,
                          "remaining_quantity": "100.00",
                          "replace": {
                            "replaced_by_order_id": null,
                            "replaces_order_id": null
                          },
                          "side": "buy",
                          "status": "accepted",
                          "time_in_force": "gtc"
                        }
                      },
                      "id": "d1232fb7-a993-52ec-a8f0-0ec026397553",
                      "occurred_at": "2026-07-12T11:05:00Z",
                      "type": "exchange.accepted",
                      "version": 1
                    }
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PartnerWebhookEventDetailResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Event envelope and delivery summaries"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "MISSING_SCOPE",
                    "message": "missing_scope"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "MISSING_SCOPE",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing_scope",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Missing `webhooks:view`"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "resource not found"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "NOT_FOUND",
                          "type": "string"
                        },
                        "message": {
                          "example": "resource not found",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Event not found"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Get a projected Partner webhook event",
        "tags": [
          "Webhooks"
        ],
        "x-required-scopes": [
          "webhooks:view"
        ]
      }
    },
    "/partner/webhooks": {
      "get": {
        "description": "Lists enabled and disabled owned endpoints using a newest-first opaque cursor. Signing secrets and encrypted material are never returned.",
        "operationId": "get_partner_webhooks",
        "parameters": [
          {
            "description": "Opaque cursor returned as `next_cursor` by the previous response for this endpoint.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "description": "Page size, clamped to `1..=100` (default `20`).",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int32",
              "minimum": 0,
              "type": [
                "integer",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "items": [
                      {
                        "created_at": "2026-07-12T11:00:00Z",
                        "description": "Production event receiver",
                        "event_types": [
                          "deposit.success",
                          "withdrawal.success"
                        ],
                        "id": "01980d95-5537-76aa-88a8-ad59117632ef",
                        "secret_version": 1,
                        "status": "enabled",
                        "updated_at": "2026-07-12T11:00:00Z",
                        "url": "https://partner.example.com/stabyl/events"
                      }
                    ],
                    "next_cursor": null
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PartnerWebhookEndpointsResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Endpoint page"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "invalid request parameters"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "VALIDATION_FAILED",
                          "type": "string"
                        },
                        "message": {
                          "example": "invalid request parameters",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Invalid cursor"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "MISSING_SCOPE",
                    "message": "missing_scope"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "MISSING_SCOPE",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing_scope",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Missing `webhooks:view`"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "List Partner webhook endpoints",
        "tags": [
          "Webhooks"
        ],
        "x-required-scopes": [
          "webhooks:view"
        ]
      },
      "post": {
        "description": "Creates an owned HTTPS endpoint and returns its Standard Webhooks signing secret exactly once. Requires `webhooks:manage` and the matching `wallets:view` and/or `trades:view` scope for every subscribed event type.",
        "operationId": "post_partner_webhooks",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePartnerWebhookRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "secret": "whsec_<shown-once>",
                    "webhook": {
                      "created_at": "2026-07-12T11:00:00Z",
                      "description": "Production event receiver",
                      "event_types": [
                        "deposit.success",
                        "withdrawal.success"
                      ],
                      "id": "01980d95-5537-76aa-88a8-ad59117632ef",
                      "secret_version": 1,
                      "status": "enabled",
                      "updated_at": "2026-07-12T11:00:00Z",
                      "url": "https://partner.example.com/stabyl/events"
                    }
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CreatePartnerWebhookResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Endpoint created; secret shown once"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "invalid request parameters"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "VALIDATION_FAILED",
                          "type": "string"
                        },
                        "message": {
                          "example": "invalid request parameters",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Invalid topics or request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "MISSING_SCOPE",
                    "message": "missing_scope"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "MISSING_SCOPE",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing_scope",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Missing webhook or domain scope"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "WEBHOOK_ACTIVE_LIMIT_REACHED",
                    "message": "webhook_active_limit_reached"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "WEBHOOK_ACTIVE_LIMIT_REACHED",
                          "type": "string"
                        },
                        "message": {
                          "example": "webhook_active_limit_reached",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Three enabled endpoints already exist"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNPROCESSABLE_ENTITY",
                    "message": "webhook destination is not an allowed public HTTPS URL"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNPROCESSABLE_ENTITY",
                          "type": "string"
                        },
                        "message": {
                          "example": "webhook destination is not an allowed public HTTPS URL",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Destination URL rejected"
          },
          "503": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "PARTNER_WEBHOOKS_DISABLED",
                    "message": "partner_webhooks_disabled"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "PARTNER_WEBHOOKS_DISABLED",
                          "type": "string"
                        },
                        "message": {
                          "example": "partner_webhooks_disabled",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Partner webhook mutation is disabled"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Create a Partner webhook endpoint",
        "tags": [
          "Webhooks"
        ],
        "x-required-scopes": [
          "webhooks:manage"
        ]
      }
    },
    "/partner/webhooks/{webhook_id}": {
      "delete": {
        "description": "Soft-deletes an owned endpoint and releases its active slot. Repeating the delete for the same owned identifier is idempotent. An already in-flight HTTP request cannot be recalled.",
        "operationId": "delete_partner_webhooks_webhook_id",
        "parameters": [
          {
            "description": "Webhook endpoint identifier",
            "in": "path",
            "name": "webhook_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": null,
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "type": "null"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Endpoint deleted"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "MISSING_SCOPE",
                    "message": "missing_scope"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "MISSING_SCOPE",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing_scope",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Missing `webhooks:manage`"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "resource not found"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "NOT_FOUND",
                          "type": "string"
                        },
                        "message": {
                          "example": "resource not found",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Endpoint not found"
          },
          "503": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "PARTNER_WEBHOOKS_DISABLED",
                    "message": "partner_webhooks_disabled"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "PARTNER_WEBHOOKS_DISABLED",
                          "type": "string"
                        },
                        "message": {
                          "example": "partner_webhooks_disabled",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Partner webhook mutation is disabled"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Delete a Partner webhook endpoint",
        "tags": [
          "Webhooks"
        ],
        "x-required-scopes": [
          "webhooks:manage"
        ]
      },
      "get": {
        "description": "Returns one owned endpoint. Unknown and cross-account identifiers both return 404. No signing material is returned.",
        "operationId": "get_partner_webhooks_webhook_id",
        "parameters": [
          {
            "description": "Webhook endpoint identifier",
            "in": "path",
            "name": "webhook_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "created_at": "2026-07-12T11:00:00Z",
                    "description": "Production event receiver",
                    "event_types": [
                      "deposit.success",
                      "withdrawal.success"
                    ],
                    "id": "01980d95-5537-76aa-88a8-ad59117632ef",
                    "secret_version": 1,
                    "status": "enabled",
                    "updated_at": "2026-07-12T11:00:00Z",
                    "url": "https://partner.example.com/stabyl/events"
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PartnerWebhookEndpointResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Owned endpoint"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "MISSING_SCOPE",
                    "message": "missing_scope"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "MISSING_SCOPE",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing_scope",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Missing `webhooks:view`"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "resource not found"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "NOT_FOUND",
                          "type": "string"
                        },
                        "message": {
                          "example": "resource not found",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Endpoint not found"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Get a Partner webhook endpoint",
        "tags": [
          "Webhooks"
        ],
        "x-required-scopes": [
          "webhooks:view"
        ]
      },
      "put": {
        "description": "Fully replaces URL, nullable description, enabled state, and exact subscription set atomically. Replacing an endpoint never rotates its signing secret.",
        "operationId": "put_partner_webhooks_webhook_id",
        "parameters": [
          {
            "description": "Webhook endpoint identifier",
            "in": "path",
            "name": "webhook_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReplacePartnerWebhookRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "created_at": "2026-07-12T11:00:00Z",
                    "description": "Production event receiver",
                    "event_types": [
                      "deposit.success",
                      "withdrawal.success"
                    ],
                    "id": "01980d95-5537-76aa-88a8-ad59117632ef",
                    "secret_version": 1,
                    "status": "enabled",
                    "updated_at": "2026-07-12T11:00:00Z",
                    "url": "https://partner.example.com/stabyl/events"
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PartnerWebhookEndpointResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Endpoint replaced"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "invalid request parameters"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "VALIDATION_FAILED",
                          "type": "string"
                        },
                        "message": {
                          "example": "invalid request parameters",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Invalid topics or request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "MISSING_SCOPE",
                    "message": "missing_scope"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "MISSING_SCOPE",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing_scope",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Missing webhook or domain scope"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "resource not found"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "NOT_FOUND",
                          "type": "string"
                        },
                        "message": {
                          "example": "resource not found",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Endpoint not found"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "WEBHOOK_ACTIVE_LIMIT_REACHED",
                    "message": "webhook_active_limit_reached"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "WEBHOOK_ACTIVE_LIMIT_REACHED",
                          "type": "string"
                        },
                        "message": {
                          "example": "webhook_active_limit_reached",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Three enabled endpoints already exist"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNPROCESSABLE_ENTITY",
                    "message": "webhook destination is not an allowed public HTTPS URL"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNPROCESSABLE_ENTITY",
                          "type": "string"
                        },
                        "message": {
                          "example": "webhook destination is not an allowed public HTTPS URL",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Destination URL rejected"
          },
          "503": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "PARTNER_WEBHOOKS_DISABLED",
                    "message": "partner_webhooks_disabled"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "PARTNER_WEBHOOKS_DISABLED",
                          "type": "string"
                        },
                        "message": {
                          "example": "partner_webhooks_disabled",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Partner webhook mutation is disabled"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Fully replace a Partner webhook endpoint",
        "tags": [
          "Webhooks"
        ],
        "x-required-scopes": [
          "webhooks:manage"
        ]
      }
    },
    "/partner/webhooks/{webhook_id}/secret/rotate": {
      "post": {
        "description": "Generates and returns a new Standard Webhooks secret exactly once. The previous secret remains valid only for the configured overlap; a second rotation during overlap returns 409.",
        "operationId": "post_partner_webhooks_webhook_id_secret_rotate",
        "parameters": [
          {
            "description": "Webhook endpoint identifier",
            "in": "path",
            "name": "webhook_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "previous_secret_valid_until": "2026-07-13T11:00:00Z",
                    "secret": "whsec_<new-shown-once>",
                    "secret_version": 2,
                    "webhook_id": "01980d95-5537-76aa-88a8-ad59117632ef"
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/RotatePartnerWebhookSecretResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Secret rotated and shown once"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "MISSING_SCOPE",
                    "message": "missing_scope"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "MISSING_SCOPE",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing_scope",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Missing `webhooks:manage`"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "resource not found"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "NOT_FOUND",
                          "type": "string"
                        },
                        "message": {
                          "example": "resource not found",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Endpoint not found"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SECRET_ROTATION_IN_PROGRESS",
                    "message": "secret_rotation_in_progress"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "SECRET_ROTATION_IN_PROGRESS",
                          "type": "string"
                        },
                        "message": {
                          "example": "secret_rotation_in_progress",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Secret rotation overlap is still active"
          },
          "503": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "PARTNER_WEBHOOKS_DISABLED",
                    "message": "partner_webhooks_disabled"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "PARTNER_WEBHOOKS_DISABLED",
                          "type": "string"
                        },
                        "message": {
                          "example": "partner_webhooks_disabled",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Partner webhook mutation is disabled"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "Rotate a Partner webhook signing secret",
        "tags": [
          "Webhooks"
        ],
        "x-required-scopes": [
          "webhooks:manage"
        ]
      }
    },
    "/simulate/crypto/deposits": {
      "post": {
        "description": "Creates a non-production stablecoin deposit record and credits the test account for integration testing. Optionally supply blockchain_tx_hash; otherwise a synthetic hash is generated. The hash appears in the response, completed transaction details and transaction webhooks. Retry with the same idempotency_key and body. CNGN requires development and chain evm (Base), and credits NGN after the configured deposit fee. This endpoint is disabled in production and cannot move real funds. Omit user_id with a valid API key or session cookie; otherwise user_id is required. A supplied ID must match the authenticated account. Invalid credentials are rejected. Signed keys require their normal request-signature headers.",
        "operationId": "post_simulate_crypto_deposits",
        "parameters": [
          {
            "description": "Optional API key. Identifies the target user when user_id is omitted; signed keys also require request-signature headers.",
            "in": "header",
            "name": "X-Api-Key",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SimulateCryptoDepositRequest"
              }
            }
          },
          "description": "Non-production stablecoin deposit event to create for integration testing.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "amount": "100.5",
                    "id": "0197f1f0-0000-7000-8000-000000000005",
                    "reference": "SIM-CRYPTO-DEP-001",
                    "status": "SUCCESS"
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SimulateCryptoDepositResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Simulated deposit created"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "invalid request parameters"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "VALIDATION_FAILED",
                          "type": "string"
                        },
                        "message": {
                          "example": "invalid request parameters",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Invalid payload or missing user_id without authentication"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Invalid API key or session"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "request is not allowed"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "FORBIDDEN",
                          "type": "string"
                        },
                        "message": {
                          "example": "request is not allowed",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Simulate API disabled in production or authenticated identity mismatch"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "resource not found"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "NOT_FOUND",
                          "type": "string"
                        },
                        "message": {
                          "example": "resource not found",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "User not found"
          }
        },
        "security": [],
        "summary": "Simulate stablecoin deposit",
        "tags": [
          "Simulation"
        ],
        "x-mint": {
          "content": "<Note>\nSimulation endpoints are available only outside production. For user-targeted requests, omit `user_id` when using a valid API key or session cookie; otherwise supply `user_id`. A supplied ID must match the authenticated user. Invalid credentials are rejected, and both credentials must identify the same user when supplied together. Signed API keys require their normal request-signature headers. Every user is automatically KYB-approved in development and staging; simulated applicant statuses do not change this admission policy.\n</Note>"
        }
      }
    },
    "/simulate/crypto/withdrawals": {
      "post": {
        "description": "Creates a non-production stablecoin withdrawal record for timeline and reconciliation testing. Optionally supply blockchain_tx_hash and idempotency_key. The accepted hash appears in the response, completed transaction details and transaction webhooks. Retry with the same key and body. CNGN requires development and chain evm (Base), and debits NGN principal plus the configured withdrawal fee. This endpoint is disabled in production and cannot move real funds. Omit user_id with a valid API key or session cookie; otherwise user_id is required. A supplied ID must match the authenticated account. Invalid credentials are rejected. Signed keys require their normal request-signature headers.",
        "operationId": "post_simulate_crypto_withdrawals",
        "parameters": [
          {
            "description": "Optional API key. Identifies the target user when user_id is omitted; signed keys also require request-signature headers.",
            "in": "header",
            "name": "X-Api-Key",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SimulateCryptoWithdrawalRequest"
              }
            }
          },
          "description": "Non-production stablecoin withdrawal record to create for integration testing.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "id": "0197f1f0-0000-7000-8000-000000000012",
                    "reference": "sim:usd:wd:0197f1f0",
                    "status": "reserved"
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SimulationStablecoinWithdrawalResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Simulated withdrawal created"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "invalid request parameters"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "VALIDATION_FAILED",
                          "type": "string"
                        },
                        "message": {
                          "example": "invalid request parameters",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Invalid payload or missing user_id without authentication"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Invalid API key or session"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "request is not allowed"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "FORBIDDEN",
                          "type": "string"
                        },
                        "message": {
                          "example": "request is not allowed",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Simulate API disabled in production or authenticated identity mismatch"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "resource not found"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "NOT_FOUND",
                          "type": "string"
                        },
                        "message": {
                          "example": "resource not found",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "User not found"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "idempotency key already used"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "CONFLICT",
                          "type": "string"
                        },
                        "message": {
                          "example": "idempotency key already used",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Idempotency key reused with different withdrawal details or hash"
          }
        },
        "security": [],
        "summary": "Simulate stablecoin withdrawal record",
        "tags": [
          "Simulation"
        ],
        "x-mint": {
          "content": "<Note>\nSimulation endpoints are available only outside production. For user-targeted requests, omit `user_id` when using a valid API key or session cookie; otherwise supply `user_id`. A supplied ID must match the authenticated user. Invalid credentials are rejected, and both credentials must identify the same user when supplied together. Signed API keys require their normal request-signature headers. Every user is automatically KYB-approved in development and staging; simulated applicant statuses do not change this admission policy.\n</Note>"
        }
      }
    },
    "/simulate/fiat/deposits": {
      "post": {
        "description": "Creates a non-production fiat deposit record and credits the test account for integration testing. This endpoint is disabled in production and cannot move real funds. Omit user_id with a valid API key or session cookie; otherwise user_id is required. A supplied ID must match the authenticated account. Invalid credentials are rejected. Signed keys require their normal request-signature headers.",
        "operationId": "post_simulate_fiat_deposits",
        "parameters": [
          {
            "description": "Optional API key. Identifies the target user when user_id is omitted; signed keys also require request-signature headers.",
            "in": "header",
            "name": "X-Api-Key",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SimulateFiatDepositRequest"
              }
            }
          },
          "description": "Non-production fiat deposit event to create for integration testing.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "amount": "50000.00",
                    "reference": "SIM-FIAT-DEP-001",
                    "status": "confirmed",
                    "transaction_id": "0197f1f0-0000-7000-8000-000000000004"
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SimulateFiatDepositResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Simulated deposit created"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "invalid request parameters"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "VALIDATION_FAILED",
                          "type": "string"
                        },
                        "message": {
                          "example": "invalid request parameters",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Invalid payload or missing user_id without authentication"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Invalid API key or session"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "request is not allowed"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "FORBIDDEN",
                          "type": "string"
                        },
                        "message": {
                          "example": "request is not allowed",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Simulate API disabled in production or authenticated identity mismatch"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "resource not found"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "NOT_FOUND",
                          "type": "string"
                        },
                        "message": {
                          "example": "resource not found",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "User not found"
          }
        },
        "security": [],
        "summary": "Simulate fiat deposit",
        "tags": [
          "Simulation"
        ],
        "x-mint": {
          "content": "<Note>\nSimulation endpoints are available only outside production. For user-targeted requests, omit `user_id` when using a valid API key or session cookie; otherwise supply `user_id`. A supplied ID must match the authenticated user. Invalid credentials are rejected, and both credentials must identify the same user when supplied together. Signed API keys require their normal request-signature headers. Every user is automatically KYB-approved in development and staging; simulated applicant statuses do not change this admission policy.\n</Note>"
        }
      }
    },
    "/simulate/fiat/withdrawals": {
      "post": {
        "description": "Creates a non-production fiat withdrawal record for timeline and reconciliation testing. This endpoint is disabled in production and cannot move real funds. Omit user_id with a valid API key or session cookie; otherwise user_id is required. A supplied ID must match the authenticated account. Invalid credentials are rejected. Signed keys require their normal request-signature headers.",
        "operationId": "post_simulate_fiat_withdrawals",
        "parameters": [
          {
            "description": "Optional API key. Identifies the target user when user_id is omitted; signed keys also require request-signature headers.",
            "in": "header",
            "name": "X-Api-Key",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SimulateFiatWithdrawalRequest"
              }
            }
          },
          "description": "Non-production fiat withdrawal record to create for integration testing.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "amount": "500.00",
                    "reference": "SIM-FIAT-WD-001",
                    "status": "pending",
                    "transaction_id": "0197f1f0-0000-7000-8000-000000000011"
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SimulationFiatWithdrawalResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Simulated withdrawal created"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "invalid request parameters"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "VALIDATION_FAILED",
                          "type": "string"
                        },
                        "message": {
                          "example": "invalid request parameters",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Invalid payload or missing user_id without authentication"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Invalid API key or session"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "request is not allowed"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "FORBIDDEN",
                          "type": "string"
                        },
                        "message": {
                          "example": "request is not allowed",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Simulate API disabled in production or authenticated identity mismatch"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "resource not found"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "NOT_FOUND",
                          "type": "string"
                        },
                        "message": {
                          "example": "resource not found",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "User not found"
          }
        },
        "security": [],
        "summary": "Simulate fiat withdrawal record",
        "tags": [
          "Simulation"
        ],
        "x-mint": {
          "content": "<Note>\nSimulation endpoints are available only outside production. For user-targeted requests, omit `user_id` when using a valid API key or session cookie; otherwise supply `user_id`. A supplied ID must match the authenticated user. Invalid credentials are rejected, and both credentials must identify the same user when supplied together. Signed API keys require their normal request-signature headers. Every user is automatically KYB-approved in development and staging; simulated applicant statuses do not change this admission policy.\n</Note>"
        }
      }
    },
    "/simulate/kyb/status": {
      "post": {
        "description": "Sets a test account's stored KYB status outside production. Every user is automatically approved for KYB admission in development and staging, regardless of the simulated applicant status. Omit user_id with a valid API key or session cookie; otherwise user_id is required. A supplied ID must match the authenticated account. Invalid credentials are rejected. Signed keys require their normal request-signature headers.",
        "operationId": "post_simulate_kyb_status",
        "parameters": [
          {
            "description": "Optional API key. Identifies the target user when user_id is omitted; signed keys also require request-signature headers.",
            "in": "header",
            "name": "X-Api-Key",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SimulateKybStatusRequest"
              }
            }
          },
          "description": "Non-production KYB state to apply to a test account.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "decision": "approved",
                    "status": "approved",
                    "user_id": "0197f1f0-0000-7000-8000-000000000006"
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SimulateKybStatusResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Simulated KYB status updated"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "invalid request parameters"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "VALIDATION_FAILED",
                          "type": "string"
                        },
                        "message": {
                          "example": "invalid request parameters",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Invalid payload or missing user_id without authentication"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "missing X-Api-Key header"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "UNAUTHORIZED",
                          "type": "string"
                        },
                        "message": {
                          "example": "missing X-Api-Key header",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Invalid API key or session"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "request is not allowed"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "FORBIDDEN",
                          "type": "string"
                        },
                        "message": {
                          "example": "request is not allowed",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Simulate API disabled in production or authenticated identity mismatch"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "resource not found"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "NOT_FOUND",
                          "type": "string"
                        },
                        "message": {
                          "example": "resource not found",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "User not found"
          }
        },
        "security": [],
        "summary": "Simulate KYB status",
        "tags": [
          "Simulation"
        ],
        "x-mint": {
          "content": "<Note>\nSimulation endpoints are available only outside production. For user-targeted requests, omit `user_id` when using a valid API key or session cookie; otherwise supply `user_id`. A supplied ID must match the authenticated user. Invalid credentials are rejected, and both credentials must identify the same user when supplied together. Signed API keys require their normal request-signature headers. Every user is automatically KYB-approved in development and staging; simulated applicant statuses do not change this admission policy.\n</Note>"
        }
      }
    },
    "/simulate/notifications/product-updates": {
      "post": {
        "description": "Creates a non-production product update notification for integration and UI testing. This endpoint is disabled in production.",
        "operationId": "post_simulate_notifications_product_updates",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "notification_key": "product_update_0197f1f0",
                    "product_update_id": "0197f1f0-0000-7000-8000-000000000007",
                    "state": "created"
                  },
                  "status": "success"
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SimulateProductUpdateResponse"
                    },
                    "status": {
                      "enum": [
                        "success"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Simulated product update created"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "request is not allowed"
                  },
                  "status": "error"
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "example": "FORBIDDEN",
                          "type": "string"
                        },
                        "message": {
                          "example": "request is not allowed",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "enum": [
                        "error"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Simulate API disabled in production"
          }
        },
        "security": [],
        "summary": "Simulate product update notification",
        "tags": [
          "Simulation"
        ],
        "x-mint": {
          "content": "<Note>\nSimulation endpoints are available only outside production. For user-targeted requests, omit `user_id` when using a valid API key or session cookie; otherwise supply `user_id`. A supplied ID must match the authenticated user. Invalid credentials are rejected, and both credentials must identify the same user when supplied together. Signed API keys require their normal request-signature headers. Every user is automatically KYB-approved in development and staging; simulated applicant statuses do not change this admission policy.\n</Note>"
        }
      }
    }
  },
  "servers": [
    {
      "description": "Production",
      "url": "https://api.stabyl.com/v1"
    },
    {
      "description": "Staging",
      "url": "https://api-staging.stabyl.com/v1"
    }
  ],
  "tags": [
    {
      "description": "Read the authenticated account’s API key inventory without revealing credentials.",
      "name": "API Keys"
    },
    {
      "description": "Trading market data and order management for account automation.",
      "name": "Exchange"
    },
    {
      "description": "Supported routes, deposit destinations, balances, transactions, and saved recipients.",
      "name": "Wallets"
    },
    {
      "description": "Outbound event delivery configuration and eventually consistent delivery history. Verify Standard Webhooks webhook-id, webhook-timestamp, and webhook-signature headers against the unchanged raw request body before parsing JSON.",
      "name": "Webhooks"
    },
    {
      "description": "Non-production endpoints for testing integration behavior. API-key or session authentication allows user_id to be omitted; unauthenticated user-targeted requests require user_id. All users are automatically KYB-approved in development and staging.",
      "name": "Simulation"
    }
  ]
}
