DexRoute#
- pydantic model empyrealSDK.types.DexRoute[source]#
Show JSON schema
{ "title": "DexRoute", "type": "object", "properties": { "path": { "items": { "type": "string" }, "title": "Path", "type": "array" }, "fees": { "default": [], "items": { "type": "integer" }, "title": "Fees", "type": "array" }, "pair_addresses": { "items": { "type": "string" }, "title": "Pair Addresses", "type": "array" }, "eth_price": { "$ref": "#/$defs/TokenAmount" }, "usdc_price": { "$ref": "#/$defs/TokenAmount" }, "factory": { "$ref": "#/$defs/DexFactory" }, "network": { "$ref": "#/$defs/Network" } }, "$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" }, "TokenAmount": { "description": "An abstraction on a token amount", "properties": { "amount": { "title": "Amount", "type": "integer" }, "decimals": { "default": 18, "title": "Decimals", "type": "integer" }, "token": { "anyOf": [ { "$ref": "#/$defs/Token" }, { "type": "null" } ], "default": null } }, "required": [ "amount" ], "title": "TokenAmount", "type": "object" } }, "required": [ "path", "pair_addresses", "eth_price", "usdc_price", "factory", "network" ] }
- Fields:
eth_price (empyrealSDK.types.token.TokenAmount)
factory (empyrealSDK.types.dex.DexFactory)
fees (list[int])
network (empyrealSDK.types.network.Network)
pair_addresses (list[eth_typing.evm.ChecksumAddress])
path (list[eth_typing.evm.ChecksumAddress])
usdc_price (empyrealSDK.types.token.TokenAmount)
- field eth_price: TokenAmount [Required]#
- field factory: DexFactory [Required]#
- field fees: list[int] = []#
- field pair_addresses: list[ChecksumAddress] [Required]#
- field path: list[ChecksumAddress] [Required]#
- field usdc_price: TokenAmount [Required]#
- async simulate(amount_in: int, sender: ChecksumAddress, use_eth: bool = True) TokenAmount [source]#
Simulate a swap for a specific route