|
3 | 3 | This section explains how the dexpool data is built and shared via APIs and [Kafka streams](https://docs.bitquery.io/docs/streams/kafka-streaming-concepts/). It also explains how to understand each entry of the response. |
4 | 4 |
|
5 | 5 | > **Note:** In GraphQL, DEXPools data is accessed through two schema cubes: |
| 6 | +> |
6 | 7 | > - **`DEXPoolEvents`**: Provides pool event data (swaps, mints, burns, etc.) |
7 | 8 | > - **`DEXPoolSlippages`**: Provides slippage and price impact data for different trade sizes |
8 | | -> |
9 | | -> For blockchain-specific slippage API documentation, see: |
10 | | -> - [Arbitrum Slippage API](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-slippage-api/) |
11 | | -> - [Base Slippage API](https://docs.bitquery.io/docs/blockchain/Base/base-slippage-api/) |
12 | | -> - [BSC Slippage API](https://docs.bitquery.io/docs/blockchain/BSC/bsc-slippage-api/) |
13 | | -> - [Matic Slippage API](https://docs.bitquery.io/docs/blockchain/Matic/matic-slippage-api/) |
| 9 | +
|
14 | 10 |
|
15 | 11 | import VideoPlayer from "../../src/components/videoplayer.js"; |
16 | 12 |
|
@@ -81,6 +77,14 @@ Each price entry in the arrays contains: |
81 | 77 | - **`MinAmountOut`**: Minimum output amount guaranteed at this slippage level |
82 | 78 | - **`Price`**: Average execution price for swaps at this slippage level |
83 | 79 |
|
| 80 | +The following slippage levels are available in the data: |
| 81 | +- 10 basis points (0.1%) |
| 82 | +- 50 basis points (0.5%) |
| 83 | +- 100 basis points (1.0%) |
| 84 | +- 200 basis points (2.0%) |
| 85 | +- 500 basis points (5.0%) |
| 86 | +- 1000 basis points (10.0%) |
| 87 | + |
84 | 88 | For example, in the `AtoBPrices` array above, with a 10 basis point (0.1%) slippage tolerance, you can swap up to 2,557,952,147 units of CurrencyA (USDC) and receive at least 860,478,002,991,619,427 units of CurrencyB (WETH), at an average price of 0.0003364734002389014 USDC per WETH. |
85 | 89 |
|
86 | 90 | ## When is a new DEXPool record emitted in the APIs & Streams? |
@@ -110,12 +114,30 @@ The following events trigger a new DEXPool entry: |
110 | 114 | - `ModifyLiquidity(bytes32,address,int24,int24,int256,bytes32)` - Emitted when liquidity is modified in the pool |
111 | 115 | - `Swap(bytes32,address,int128,int128,uint160,uint128,int24,uint24)` - Emitted when tokens are swapped in the pool |
112 | 116 |
|
| 117 | +> Note: Forks of Uniswap can also be tracked with these APIs if the signature is exactly the same. |
| 118 | +
|
113 | 119 | ## Filtering in DEXPools Cube |
114 | 120 |
|
115 | 121 | Filtering helps to fetch the exact pool data you are looking for. DEXPools Cube can filter based on pool address, token addresses, DEX protocol, liquidity amounts, and more. |
116 | 122 |
|
117 | 123 | Everything inside the "where" clause filters; it follows the `AND` condition by default. |
118 | 124 |
|
| 125 | +## API Examples |
| 126 | +For blockchain-specific slippage API documentation, see: |
| 127 | + |
| 128 | +- [Arbitrum Slippage API](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-slippage-api/) |
| 129 | +- [Base Slippage API](https://docs.bitquery.io/docs/blockchain/Base/base-slippage-api/) |
| 130 | +- [BSC Slippage API](https://docs.bitquery.io/docs/blockchain/BSC/bsc-slippage-api/) |
| 131 | +- [Matic Slippage API](https://docs.bitquery.io/docs/blockchain/Matic/matic-slippage-api/) |
| 132 | + |
| 133 | +For blockchain-specific liquidity API documentation, see: |
| 134 | + |
| 135 | +- [Arbitrum Liquidity API](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-liquidity-api/) |
| 136 | +- [Base Liquidity API](https://docs.bitquery.io/docs/blockchain/Base/base-liquidity-api/) |
| 137 | +- [BSC Liquidity API](https://docs.bitquery.io/docs/blockchain/BSC/bsc-liquidity-api/) |
| 138 | +- [Ethereum Liquidity API](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/ethereum-liquidity-api/) |
| 139 | +- [Matic Liquidity API](https://docs.bitquery.io/docs/blockchain/Matic/matic-liquidity-api/) |
| 140 | + |
119 | 141 | ## Advanced Use Cases and Processing Patterns |
120 | 142 |
|
121 | 143 | ### Liquidity Depth Analysis |
|
0 commit comments