Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DEX

DEX class for fetching xy=k dex data

date

1/13/2023 - 6:02:32 PM

export
implements

{IDEXes}

Hierarchy

  • DEX

Implements

Index

Constructors

constructor

Properties

Private API_KEY

API_KEY: string

Description placeholder

date

1/13/2023 - 6:02:32 PM

Private API_URI

API_URI: string

Description placeholder

date

1/13/2023 - 6:02:32 PM

chain_id

chain_id: string

chain_name

chain_name: string

dex_name

dex_name: string

factory_contract_address

factory_contract_address: string

router_contract_addresses

router_contract_addresses: string[]

swap_fee

swap_fee: number

Methods

getXYAddressExchangeBalances

  • Fetch Address account balances.

    date

    1/13/2023 - 6:02:32 PM

    async

    Parameters

    • chainId: number

      chainId for the network

    • dexName: string

      name of the dex e.g sushiswap

    • walletAddress: string

    Returns Promise<AddressBalance | ErrorResponse>

getXYEcosystemChartData

  • getXYEcosystemChartData(chainId: number, dexName: string): Promise<any>
  • Fetch ecosystem chart data for a specific DEX.

    date

    1/13/2023 - 6:02:32 PM

    async

    Parameters

    • chainId: number
    • dexName: string

    Returns Promise<any>

getXYHealthData

  • getXYHealthData(chainId: number, dexName: string): Promise<any>
  • Fetch last synced block height data and latest block height for a specific DEX.

    date

    1/13/2023 - 6:02:32 PM

    async

    Parameters

    • chainId: number
    • dexName: string

    Returns Promise<any>

getXYNetworkExchangeTokens

  • getXYNetworkExchangeTokens(chainId: number, dexName: string): Promise<any>
  • Fetch network Tokens for given DEX

    date

    1/13/2023 - 6:02:32 PM

    async

    Parameters

    • chainId: number
    • dexName: string

    Returns Promise<any>

getXYPools

  • Fetch xy=k DEX data

    date

    1/13/2023 - 6:02:32 PM

    async

    Parameters

    • chainId: number

      chainId for the network

    • dexName: string

      uniswap, sushiswap

    Returns Promise<Pools | ErrorResponse>

getXYPoolsByAddress

  • getXYPoolsByAddress(chainId: number, dexName: string, usdcPoolAddress: string): Promise<Pools | ErrorResponse>
  • Fetch XY Pools by their address

    date

    1/13/2023 - 6:02:32 PM

    async

    Parameters

    • chainId: number

      chainId for the network

    • dexName: string

      uniswap, sushiswap

    • usdcPoolAddress: string

    Returns Promise<Pools | ErrorResponse>

getXYSingleNetworkExchangeToken

  • getXYSingleNetworkExchangeToken(chainId: string, dexName: string, usdcContractAddress: string): Promise<any | ErrorResponse>
  • Fetch single network exchange token for a specific DEX.

    date

    1/13/2023 - 6:02:32 PM

    async

    Parameters

    • chainId: string
    • dexName: string
    • usdcContractAddress: string

    Returns Promise<any | ErrorResponse>

getXYSupportedDEXes

getXYTransactionsForAccountAddress

  • getXYTransactionsForAccountAddress(chainId: number, dexName: string, walletAddress: string): Promise<any>
  • Fetch transactions for account address for a specific DEX.

    date

    1/13/2023 - 6:02:32 PM

    async

    Parameters

    • chainId: number
    • dexName: string
    • walletAddress: string

    Returns Promise<any>

getXYTransactionsForExchange

  • getXYTransactionsForExchange(chainId: number, dexName: string, usdcContractAddress: string): Promise<any>
  • Fetch transactions for exchange for a specific DEX.

    date

    1/13/2023 - 6:02:32 PM

    async

    Parameters

    • chainId: number
    • dexName: string
    • usdcContractAddress: string

    Returns Promise<any>

getXYTransactionsForTokenAddress

  • getXYTransactionsForTokenAddress(chainId: number, dexName: string, linkContractAdress: string): Promise<any>
  • Fetch transactions for token address for a specific DEX

    date

    1/13/2023 - 6:02:32 PM

    async

    Parameters

    • chainId: number
    • dexName: string
    • linkContractAdress: string

    Returns Promise<any>

Generated using TypeDoc