Uniswap · JSON Structure

Uniswap Get Swaps Response Structure

JSON Structure for GetSwapsResponse from Uniswap Trading API

Type: Properties: 0
BlockchainCryptocurrencyDeFiDecentralized ExchangeLiquiditySwaps

Uniswap Get Swaps Response Structure is a JSON Structure definition published by Uniswap. It conforms to the https://json-schema.org/draft/2020-12/schema meta-schema.

Meta-schema: https://json-schema.org/draft/2020-12/schema

JSON Structure

Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "GetSwapsResponse Structure",
  "description": "JSON Structure for GetSwapsResponse from Uniswap Trading API",
  "structure": {
    "type": "object",
    "properties": {
      "requestId": {
        "type": "string",
        "description": "A unique ID for the request."
      },
      "swaps": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "swapType": {
              "$ref": "Routing"
            },
            "status": {
              "$ref": "SwapStatus"
            },
            "txHash": {
              "$ref": "TransactionHash"
            },
            "swapId": {
              "type": "string"
            },
            "userOpHash": {
              "$ref": "TransactionHash"
            },
            "hashType": {
              "type": "string",
              "description": "Identifies whether the row was resolved from a transaction hash or a userOperation hash. Omitted on transaction rows; absence is equivalent to `TX`.",
              "enum": [
                "TX",
                "USER_OP"
              ]
            }
          }
        }
      }
    },
    "required": [
      "requestId",
      "status"
    ]
  }
}