DexPair#

pydantic model empyrealSDK.types.DexPair[source]#

Show JSON schema
{
   "title": "DexPair",
   "type": "object",
   "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"
      }
   },
   "$defs": {
      "DexFactory": {
         "const": "uniswap",
         "title": "DexFactory"
      },
      "Network": {
         "const": 1,
         "description": "An enum representing the different Networks supported by the SDK",
         "title": "Network"
      },
      "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": [
      "factory_address",
      "token0",
      "token1",
      "address",
      "index",
      "fee",
      "network",
      "block_number",
      "transaction_hash",
      "factory"
   ]
}

Fields:
  • address (eth_typing.evm.ChecksumAddress)

  • block_number (int)

  • factory (empyrealSDK.types.dex.DexFactory)

  • factory_address (eth_typing.evm.ChecksumAddress)

  • fee (float | None)

  • index (int)

  • network (empyrealSDK.types.network.Network)

  • token0 (empyrealSDK.types.token.Token)

  • token1 (empyrealSDK.types.token.Token)

  • transaction_hash (eth_typing.encoding.HexStr)

field address: ChecksumAddress [Required]#
field block_number: int [Required]#
field factory: DexFactory [Required]#
field factory_address: ChecksumAddress [Required]#
field fee: float | None [Required]#
field index: int [Required]#
field network: Network [Required]#
field token0: Token [Required]#
field token1: Token [Required]#
field transaction_hash: HexStr [Required]#
async get_liquidity(block_number: int | None = None)[source]#
async get_taxes()[source]#
async honeypot() bool[source]#
async swap(wallet: Wallet, amount: int, priority_fee: int, is_private: bool, use_token0: bool)[source]#
async swap_history(use_token0: bool = True, start_time=None, end_time=None)[source]#