Skip to content

Commit 1ccac97

Browse files
Merge pull request #181 from Divyn/main
EVM Chain Slippage API Updates
2 parents 0b25c9c + c37d14a commit 1ccac97

File tree

3 files changed

+31
-8
lines changed

3 files changed

+31
-8
lines changed

docs/blockchain/BSC/bsc-slippage-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ subscription {
108108

109109
This query retrieves the latest slippage data for a specific DEX pool on BSC. Use this to check current liquidity depth and price impact for a particular token pair.
110110

111-
You can find the query [here](https://ide.bitquery.io/Latest-slippage-of-a-pool-on-Uniswap-v3)
111+
You can find the query [here](https://ide.bitquery.io/Latest-slippage-of-a-pool-on-Pancakeswap)
112112

113113
```graphql
114114
query {

docs/cubes/evm-dexpool.md

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,10 @@
33
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.
44

55
> **Note:** In GraphQL, DEXPools data is accessed through two schema cubes:
6+
>
67
> - **`DEXPoolEvents`**: Provides pool event data (swaps, mints, burns, etc.)
78
> - **`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+
1410

1511
import VideoPlayer from "../../src/components/videoplayer.js";
1612

@@ -81,6 +77,14 @@ Each price entry in the arrays contains:
8177
- **`MinAmountOut`**: Minimum output amount guaranteed at this slippage level
8278
- **`Price`**: Average execution price for swaps at this slippage level
8379

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+
8488
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.
8589

8690
## When is a new DEXPool record emitted in the APIs & Streams?
@@ -110,12 +114,30 @@ The following events trigger a new DEXPool entry:
110114
- `ModifyLiquidity(bytes32,address,int24,int24,int256,bytes32)` - Emitted when liquidity is modified in the pool
111115
- `Swap(bytes32,address,int128,int128,uint160,uint128,int24,uint24)` - Emitted when tokens are swapped in the pool
112116

117+
> Note: Forks of Uniswap can also be tracked with these APIs if the signature is exactly the same.
118+
113119
## Filtering in DEXPools Cube
114120

115121
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.
116122

117123
Everything inside the "where" clause filters; it follows the `AND` condition by default.
118124

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+
119141
## Advanced Use Cases and Processing Patterns
120142

121143
### Liquidity Depth Analysis

docs/streams/protobuf/chains/EVM-protobuf.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ The EVM Protobuf Streams provide three main message types for different use case
1515
- `BlockMessage`: Full blocks with detailed transaction traces
1616
- `TokenBlockMessage`: Focused on token transfers with currency metadata
1717
- `DexBlockMessage`: Specialized for DEX (Decentralized Exchange) trading activity
18+
- `DexPoolBlockMessage` - Focused on real-time slippage at multiple bps and liquidity from Uniswap Pools
1819

1920
### Block-Level Data
2021

@@ -143,7 +144,7 @@ The `DexBlockMessage` stream specializes in DEX trading activity:
143144
- `OrderId`: Identifier for the order
144145
- `Assets`: What was traded
145146

146-
#### DEXPools
147+
### DEXPools
147148

148149
DEXPools provide real-time liquidity pool data for decentralized exchanges, including current token reserves, price calculations at different slippage tolerances, and pool state information. DEXPools data is available via Kafka streams and GraphQL APIs, and is emitted when specific events occur that change pool liquidity (such as swaps, mints, burns, or liquidity modifications depending on the protocol version).
149150

0 commit comments

Comments
 (0)