☢️Aggregation API Usage Guide

Summery of APIs we Provide

Aggregation API Documentation

Note: This API is in the early stages. The endpoints and API specifications are subject to change at any time.

GraphQL API

Endpoint: http://test.xtreamly.io:10007/graphql/

A GraphQL playground is available at the same URL and can be accessed using a web browser.

Available Items

  1. Mempool Item

    These are mempool transactions monitored by our own full node. They contain the first seen time and the first block that the transaction was seen.

    Example Query:

    {
        mempool {
            nodes {
                txHash,
                timestamp,
                blockNumber
            }
        }
    }
  2. SwapWithDetail Item

    These are swaps detected on the blockchain that implement the Uniswap v3 swap interface and meet certain conditions in our system. For a swap to be listed here, it must meet conditions such as obtaining the underlying pool fee according to Uniswap and the token price in USD from our sources. If a swap fails to meet any of these conditions, it won't be listed here. We are working on a different collection to provide raw information about these transactions.

    Example Query:

    query {
      swapsWithDetails {
        nodes {
          _id
          blockHash
          blockNumber
          amount1
          data
          gasPrice
          poolAddress
          liquidity
          poolFee
          poolPriceAfter
          poolPriceBefore
          priceImpactPercentage
          quotedPrice
          quotedAmountOut
          priceImpact
          recipient
          sender
          slippagePercentage
          sqrtPriceX96
          threshold
          tick
          timestamp
          token0Address
          token0Decimal
          token0PriceBinance
          token0Symbol
          token0Worth
          token1Decimal
          token1Address
          token1Worth
          token1Symbol
          token1PriceBinance
          txHash
          wasSeenInMempool
        }
      }
    }
  3. TimeLiquidityPrices Item

    These items provide information and insight about a liquidity pool implementing Uniswap v3. They include, but are not limited to, token prices and symbols, and TVLs (Total Value Locked) in both token terms and USD terms.

    Example Query:

    query {
      timeLiquidityPrices {
        nodes {
          _id
          endTime
          meaningfulPrice
          poolAddress
          price
          priceInverse
          startTime
          timestamp
          token0Address
          token0Tvl
          token1Address
          token1Tvl
        }
      }
    }
  4. TimeVolatility Item

    These items provide information and insight about the volatility of a specific liquidity pool that implements the Uniswap v3 interface. Analytics include average price, standard deviation, variance, and average true range.

    Example Query:

    query {
      timeVolatility {
        nodes {
          _id
          atr
          averagePrice
          endTime
          poolAddress
          poolFee
          standardDeviation
          startTime
          timestamp
          token0Decimal
          token0Symbol
          token1Decimal
          token1Symbol
          variance
        }
      }
    }
  5. TimeVolume Item

    These items provide information and insight about the volume of trades that happen in a pool implementing Uniswap v3. These volumes are calculated using the actual value in USD at the time of swap detection and then summed up for a specific period. Information about liquidity pool events such as minting, burning, and collecting is not included in these metrics.

    Example Query:

    query {
      timeVolume {
        nodes {
          _id
          endTime
          poolAddress
          startTime
          timestamp
          token0Volume
          token0VolumeUsd
          token1Volume
          token1VolumeUsd
          totalVolumeUsd
        }
      }
    }

Information REST API

Endpoint: https://test.xteamly.io:7111

  1. Supported Pool

    A list of pools we officially support for information gathering. Although we aggregate data for other pools as well, the data from these pools are proven to be more stable and accurate than others. Other pool support can be dropped at any time.

    Endpoint: /api/v1/Mempool/GetOfficiallySupportedPoolList

    Example Response:

    [
      "0x11b815efB8f581194ae79006d24E0d814B7697F6",
      "0x4e68Ccd3E89f51C3074ca5072bbAC773960dFa36",
      "0xC5aF84701f98Fa483eCe78aF83F11b6C38ACA71D",
      "0xc7bBeC68d12a0d1830360F8Ec58fA599bA1b0e9b",
      "0xE0554a476A092703abdB3Ef35c80e0D76d32939F",
      "0x7BeA39867e4169DBe237d55C8242a8f2fcDcc387",
      "0x8ad599c3A0ff1De082011EFDDc58f1908eb6e6D8",
      "0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640",
      "0xD8dEC118e1215F02e10DB846DCbBfE27d477aC19",
      "0x60594a405d53811d3BC4766596EFD80fd545A270",
      "0xC2e9F25Be6257c210d7Adf0D4Cd6E3E881ba25f8",
      "0xa80964C5bBd1A0E95777094420555fead1A26c1e"
    ]

AI REST API

Endpoint: https://test.xtreamly.io:50000/

Swagger: https://test.xtreamly.io:50000/swagger/index.html

These endpoints provide an easy way to communicate with our AI models.

  1. Inference Slippage

    This endpoint is used to predict slippage of a transaction.

    Endpoint: /api/v1/Inference/InferenceSlippage

    Parameters: amountIn, gasPrice, isBuy, poolAddress, fee, and symbol

    More information on the format of these parameters plese refer to https://app.gitbook.com/o/OSEmCDTfknXYjyFYJ719/s/OrHaYKrGY1VHeVR1ZNol/~/changes/61/xtreamly-ai-empowered-collaborative-lp-hedging-through-incentivized-data-sharing/technical-details/ai-api-usage-guide

  2. Inference Volatility

    This endpoint is used to predict the volatility of a pool address.

    Endpoint: /api/v1/Inference/InferenceVolatility

    Parameters: amountIn, gasPrice, isBuy, poolAddress, fee, and symbol

    More information on the format of these parameters please refer to https://app.gitbook.com/o/OSEmCDTfknXYjyFYJ719/s/OrHaYKrGY1VHeVR1ZNol/~/changes/61/xtreamly-ai-empowered-collaborative-lp-hedging-through-incentivized-data-sharing/technical-details/ai-api-usage-guide

  3. Inference Price

    This endpoint is used to predict the price of a token.

    Endpoint: /api/v1/Inference/InferencePrice

    Parameters: amountIn, gasPrice, isBuy, poolAddress, fee, and symbol

    More information on the format of these parameters please refer to https://app.gitbook.com/o/OSEmCDTfknXYjyFYJ719/s/OrHaYKrGY1VHeVR1ZNol/~/changes/61/xtreamly-ai-empowered-collaborative-lp-hedging-through-incentivized-data-sharing/technical-details/ai-api-usage-guide

Last updated