SwapHistory#

pydantic model empyrealSDK.types.SwapHistory[source]#

Show JSON schema
{
   "title": "SwapHistory",
   "type": "object",
   "properties": {
      "pair": {
         "$ref": "#/$defs/DexPair"
      },
      "intervals": {
         "items": {
            "$ref": "#/$defs/SwapInterval"
         },
         "title": "Intervals",
         "type": "array"
      }
   },
   "$defs": {
      "DexFactory": {
         "const": "uniswap",
         "title": "DexFactory"
      },
      "DexPair": {
         "properties": {
            "factory_address": {
               "title": "Factory Address",
               "type": "string"
            },
            "token0": {
               "$ref": "#/$defs/Token"
            },
            "token1": {
               "$ref": "#/$defs/Token"
            },
            "address": {
               "title": "Address",
               "type": "string"
            },
            "index": {
               "title": "Index",
               "type": "integer"
            },
            "fee": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Fee"
            },
            "network": {
               "$ref": "#/$defs/Network"
            },
            "block_number": {
               "title": "Block Number",
               "type": "integer"
            },
            "transaction_hash": {
               "title": "Transaction Hash",
               "type": "string"
            },
            "factory": {
               "$ref": "#/$defs/DexFactory"
            }
         },
         "required": [
            "factory_address",
            "token0",
            "token1",
            "address",
            "index",
            "fee",
            "network",
            "block_number",
            "transaction_hash",
            "factory"
         ],
         "title": "DexPair",
         "type": "object"
      },
      "Network": {
         "const": 1,
         "description": "An enum representing the different Networks supported by the SDK",
         "title": "Network"
      },
      "SwapInterval": {
         "properties": {
            "start_time": {
               "format": "date-time",
               "title": "Start Time",
               "type": "string"
            },
            "open": {
               "title": "Open",
               "type": "number"
            },
            "close": {
               "title": "Close",
               "type": "number"
            },
            "tx_count": {
               "title": "Tx Count",
               "type": "integer"
            },
            "min": {
               "title": "Min",
               "type": "number"
            },
            "max": {
               "title": "Max",
               "type": "number"
            },
            "prev_close": {
               "title": "Prev Close",
               "type": "number"
            }
         },
         "required": [
            "start_time",
            "open",
            "close",
            "tx_count",
            "min",
            "max",
            "prev_close"
         ],
         "title": "SwapInterval",
         "type": "object"
      },
      "Token": {
         "description": "An abstraction of an ERC20 token instance",
         "properties": {
            "id": {
               "format": "uuid",
               "title": "Id",
               "type": "string"
            },
            "address": {
               "title": "Address",
               "type": "string"
            },
            "name": {
               "title": "Name",
               "type": "string"
            },
            "symbol": {
               "title": "Symbol",
               "type": "string"
            },
            "decimals": {
               "title": "Decimals",
               "type": "integer"
            },
            "chainId": {
               "$ref": "#/$defs/Network"
            }
         },
         "required": [
            "id",
            "address",
            "name",
            "symbol",
            "decimals",
            "chainId"
         ],
         "title": "Token",
         "type": "object"
      }
   },
   "required": [
      "pair",
      "intervals"
   ]
}

Fields:
  • intervals (list[empyrealSDK.types.dex.SwapInterval])

  • pair (empyrealSDK.types.dex.DexPair)

field intervals: list[SwapInterval] [Required]#
field pair: DexPair [Required]#
property closes#
property maxs#
property mins#
property opens#
property timestamps#