{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/paradex/json-schema/paradex-responses-fill-result-schema.json",
  "title": "responses.FillResult",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/paradex-account-api-openapi.yml#/components/schemas/responses.FillResult",
  "type": "object",
  "properties": {
    "account": {
      "description": "Account that made the fill",
      "type": "string"
    },
    "client_id": {
      "description": "Unique client assigned ID for the order",
      "type": "string"
    },
    "created_at": {
      "description": "Fill time",
      "type": "integer"
    },
    "fee": {
      "description": "Fee paid by the user",
      "type": "string"
    },
    "fee_currency": {
      "description": "Asset that fee is charged in",
      "type": "string"
    },
    "fill_type": {
      "description": "Fill type, can be FILL, LIQUIDATION or UNWIND_TRANSFER",
      "allOf": [
        {
          "$ref": "#/$defs/responses.FillType"
        }
      ]
    },
    "flags": {
      "description": "Fill flags indicating special properties",
      "type": "array",
      "items": {
        "$ref": "#/$defs/responses.FillFlag"
      }
    },
    "id": {
      "description": "Unique string ID of fill per FillType",
      "type": "string"
    },
    "liquidity": {
      "description": "Maker or Taker",
      "allOf": [
        {
          "$ref": "#/$defs/responses.TraderRole"
        }
      ]
    },
    "market": {
      "description": "Market name",
      "type": "string"
    },
    "order_id": {
      "description": "Order ID",
      "type": "string"
    },
    "orderbook_seq_no": {
      "description": "Orderbook sequence number after trade execution (post-execution state). Use seqno-1 for pre-execution. 0 for position transfers (liquidations, settlements)",
      "type": "integer"
    },
    "price": {
      "description": "Price at which order was filled",
      "type": "string"
    },
    "realized_funding": {
      "description": "Realized funding of the fill",
      "type": "string"
    },
    "realized_pnl": {
      "description": "Realized PnL of the fill",
      "type": "string"
    },
    "remaining_size": {
      "description": "Remaining size of the order",
      "type": "string"
    },
    "side": {
      "description": "Taker side",
      "allOf": [
        {
          "$ref": "#/$defs/responses.OrderSide"
        }
      ]
    },
    "size": {
      "description": "Size of the fill",
      "type": "string"
    },
    "underlying_price": {
      "description": "Underlying asset price of the fill (spot price)",
      "type": "string"
    }
  },
  "$defs": {
    "responses.FillFlag": {
      "type": "string",
      "enum": [
        "interactive",
        "rpi",
        "fastfill"
      ],
      "x-enum-comments": {
        "FillFlagFast": "Retail order was fast filled",
        "FillFlagInteractive": "Fill was generated from an interactive order (user-initiated)",
        "FillFlagRPI": "Fill qualifies for Retail Price Improvement"
      },
      "x-enum-varnames": [
        "FillFlagInteractive",
        "FillFlagRPI",
        "FillFlagFast"
      ]
    },
    "responses.FillType": {
      "type": "string",
      "enum": [
        "LIQUIDATION",
        "UNWIND_TRANSFER",
        "FILL",
        "SETTLE_MARKET",
        "RPI",
        "BLOCK_TRADE"
      ],
      "x-enum-varnames": [
        "FillTypeLiquidation",
        "FillTypeUnwindTransfer",
        "FillTypeFill",
        "FillTypeSettleMarket",
        "FillTypeRPI",
        "FillTypeBlockTrade"
      ]
    },
    "responses.OrderSide": {
      "type": "string",
      "enum": [
        "BUY",
        "SELL"
      ],
      "x-enum-varnames": [
        "OrderSideBuy",
        "OrderSideSell"
      ]
    },
    "responses.TraderRole": {
      "type": "string",
      "enum": [
        "TAKER",
        "MAKER"
      ],
      "x-enum-varnames": [
        "TraderRoleTaker",
        "TraderRoleMaker"
      ]
    }
  }
}