DragonSwap
Supported Chains
Available on Kaia Mainnet.
Available Endpoints:
Click on the endpoint to jump to the section with full details
/getprice
GET- Returns the swap quotation for a given token pair on Klayswap V3./getuserliquidity
GET- Returns the balance of a particular token pair of accounts./getpoolliquidity
GET- Returns the total liquidity for a specified pool./gettokenliquidity
GET- Returns the individual token liquidity within the specified liquidity pool./swap
POST- Initiate a swap transaction on a specified DEX./addliquidity
POST- Add liquidity to a specified pool in a specified DEX./removeliquidity
POST- Remove liquidity from a specified pool in a specified DEX.
DEX IDs
Many endpoints have a parameter where you can provide a DEX ID.
Below is a list of DEX IDs related to DragonSwap V3. For a complete list and more information, please see the DEX ID page.
DragonSwap V3
Kaia Mainnet
3700
Endpoint Details
/getprice
Returns the swap quotation for the given token pair.
GET https://api.expand.network/dex/getprice
Query Parameters
rpc
String
Remote procedural call URL.
path*
String
Comma separated values of token addresses whose price is to be fetched.
amountIn*
String
Amount of token.
poolFees
String
Different pool based on the fees. By default, it is selected as 10000.
https://api.expand.network/dex/getprice?path=0x0BA2bA407E80bcb8a314649d9bC12efEECC81519,0xd077A400968890Eacc75cdc901F0356c943e4fDb&amountIn=1000000000000000000&vsCurrencies=inr&dexId=3700&poolFees=2000{
"status": 200,
"msg": "success",
"data": {
"amountIn": "1000000000000000000",
"path": [
"0x0BA2bA407E80bcb8a314649d9bC12efEECC81519",
"0xd077A400968890Eacc75cdc901F0356c943e4fDb"
],
"amountsOut": [
"1000000000000000000",
"303"
],
"prices": {
"usd": [
{
"0x0ba2ba407e80bcb8a314649d9bc12efeecc81519": "NA"
},
{
"0xd077a400968890eacc75cdc901f0356c943e4fdb": "1.0003293919119833"
}
],
"inr": [
{
"0x0ba2ba407e80bcb8a314649d9bc12efeecc81519": "NA"
},
{
"0xd077a400968890eacc75cdc901f0356c943e4fdb": "87.8000000868226"
}
]
}
}
}Returns the total liquidity for a specified pool.
GET https://api.expand.network/dex/getpoolliquidity
Query Parameters
rpc
String
Remote procedural call URL.
poolAddress*
String
Pool address whose liquidity is to be fetched.
https://api.expand.network/dex/getpoolliquidity?dexId=3700&poolAddress=0xe6FAcE64967c6CDd53651d6ac97a04Bc9ef305d6{
"status": 200,
"msg": "success",
"data": {
"totalLiquidity": "2411396765347967129"
}
}/gettokenliquidity
Returns the individual token liquidity within the specified liquidity pool.
GET https://api.expand.network/dex/gettokenliquidity
Query Parameters
rpc
String
Remote procedural call URL.
poolAddress*
String
The pool address.
https://api.expand.network/dex/gettokenliquidity?poolAddress=0xe6FAcE64967c6CDd53651d6ac97a04Bc9ef305d6&vsCurrencies=inr&dexId=3700{
"status": 200,
"msg": "success",
"data": {
"BOMB": "115964969965512332185276088",
"USD₮": "18672491500",
"prices": {
"usd": [
{
"BOMB": "NA"
},
{
"USD₮": "1.0003687497958833"
}
],
"inr": [
{
"BOMB": "NA"
},
{
"USD₮": "87.81829804266268"
}
]
}
}
}/getpoolliquidity
Returns the total liquidity for a specified pool.
GET https://api.expand.network/dex/getpoolliquidity
Query Parameters
rpc
String
Remote procedural call URL.
poolAddress*
String
Pool address whose liquidity is to be fetched.
https://api.expand.network/dex/getpoolliquidity?dexId=3700&poolAddress=0xe6FAcE64967c6CDd53651d6ac97a04Bc9ef305d6{
"status": 200,
"msg": "success",
"data": {
"totalLiquidity": "2413131228303615201"
}
}/getindividualposition
Returns the liquidity position for a specified user address across all the pools for the DEX.
GET https://api.expand.network/dex/getindividualposition
Query Parameters
rpc
String
Remote procedural call URL.
address*
String
The public address of the liquidity holder.
poolAddresses
String
The pool Addresses whose liquidity is to be fetched. (Comma-separated vaules)
https://api.expand.network/dex/getindividualposition?address=0x0ebc19619e8aa912d393ca321c0b6b4f7d98697d&dexId=3700{
"status": 200,
"msg": "success",
"data": {
"aggregatedLiquidity": "13220301478",
"poolAddresses": {
"WKLAYUSD₮": {
"0x938779A1989e7635fdac1E040631255C3555708e": "13220301478"
}
}
}
}/getpool
Returns poolAddress, tickSpacing, poolFees, tokensLiquidity and liquidity data based on tokenA and tokenB
GET https://api.expand.network/dex/getpool
Query Parameters
https://api.expand.network/dex/getpool?dexId=3700&tokenA=0x0BA2bA407E80bcb8a314649d9bC12efEECC81519&tokenB=0xd077A400968890Eacc75cdc901F0356c943e4fDb{
"status": 200,
"msg": "success",
"data": [
{
"poolAddress": "0xC4CE4D15E943a7556FD31311882c78329E7C6bCe",
"poolFees": "100",
"tickSpacing": "1",
"tokensLiquidity": {
"BOMB": "0",
"USD₮": "3"
},
"liquidity": "0"
},
{
"poolAddress": "0x23565CD113957Fd8F8792Ac1d8DC7e171770ba01",
"poolFees": "500",
"tickSpacing": "10",
"tokensLiquidity": {
"BOMB": "0",
"USD₮": "1"
},
"liquidity": "0"
},
{
"poolAddress": "0x7553E95a0F75Cd725877F2E46b1B3A92269340B4",
"poolFees": "1000",
"tickSpacing": "20",
"tokensLiquidity": {
"BOMB": "9",
"USD₮": "8"
},
"liquidity": "0"
},
{
"poolAddress": "0xe6FAcE64967c6CDd53651d6ac97a04Bc9ef305d6",
"poolFees": "2000",
"tickSpacing": "40",
"tokensLiquidity": {
"BOMB": "115964969965512332185276088",
"USD₮": "18672491500"
},
"liquidity": "2411396765347967129"
},
{
"poolAddress": "0x703F6f09003114bB4Ce09089D92b639e81e7939F",
"poolFees": "5000",
"tickSpacing": "100",
"tokensLiquidity": {
"BOMB": "24",
"USD₮": "23"
},
"liquidity": "0"
},
{
"poolAddress": "0x5f7259d3b662bd41d04955870C627f92197687a5",
"poolFees": "10000",
"tickSpacing": "200",
"tokensLiquidity": {
"BOMB": "8",
"USD₮": "12"
},
"liquidity": "0"
}
]
}/swap
Initiate a swap transaction on a specified DEX.
POST https://api.expand.network/dex/swap
Request Body
path*
Array
Comma-separated values of token addresses, inside an array, to swap.
amountIn*
String
Amount of token to be swapped.
amountOutmin*
String
Minimum amount accepted as the result of swap.
to*
String
Address of the recipient of the token.
deadline*
String
Deadline for the transaction to be executed (UNIX Timestamp).
from*
String
Address of the sender of the token.
gas*
String
Maximum gas limit provided by the sender, for the transaction.
poolFees
String
Different pool based on the fees. By default, it is selected as 10000.
gasPriority
String
low, medium, or high.
slippage
String
Percentage of total swap value. By default, 1.
0 <= slippage value <= 100
{
"path": [
"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee","0xd077A400968890Eacc75cdc901F0356c943e4fDb"
],
"amountIn": "1000000000000000000",
"deadline": "1799212923",
"to": "0x0eBc19619e8aA912d393Ca321c0B6b4f7d98697D",
"from": "0x0eBc19619e8aA912d393Ca321c0B6b4f7d98697D",
"gas": "1000000",
"poolFees": "1000",
"slippage": "10",
"dexId": "3700"
}
{
"status": 200,
"msg": "success",
"data": {
"chainId": "8217",
"from": "0x0eBc19619e8aA912d393Ca321c0B6b4f7d98697D",
"to": "0xA324880f884036E3d21a09B90269E1aC57c7EC8a",
"gas": "184337",
"value": "1000000000000000000",
"data": "0xac9650d800000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001800000000000000000000000000000000000000000000000000000000000000104414bf38900000000000000000000000019aac5f612f524b754ca7e7c41cbfa2e981a4432000000000000000000000000d077a400968890eacc75cdc901f0356c943e4fdb00000000000000000000000000000000000000000000000000000000000003e80000000000000000000000000ebc19619e8aa912d393ca321c0b6b4f7d98697d000000000000000000000000000000000000000000000000000000006b3dcf7b0000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000000000000018066000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000412210e8a00000000000000000000000000000000000000000000000000000000",
"gasPrice": "41250000000",
"estimationCheck": true,
"referenceId": "2470e3e3df964964b461f8a0afa449d0"
}
}With gasPriority:
{
"path": [
"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee","0xd077A400968890Eacc75cdc901F0356c943e4fDb"
],
"amountIn": "1000000000000000000",
"deadline": "1799212923",
"to": "0x0eBc19619e8aA912d393Ca321c0B6b4f7d98697D",
"from": "0x0eBc19619e8aA912d393Ca321c0B6b4f7d98697D",
"gas": "1000000",
"poolFees": "1000",
"gasPriority": "high",
"slippage": "10",
"dexId": "3700"
}
With gasPriority:
{
"status": 200,
"msg": "success",
"data": {
"chainId": "8217",
"from": "0x0eBc19619e8aA912d393Ca321c0B6b4f7d98697D",
"to": "0xA324880f884036E3d21a09B90269E1aC57c7EC8a",
"gas": "184337",
"value": "1000000000000000000",
"data": "0xac9650d800000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001800000000000000000000000000000000000000000000000000000000000000104414bf38900000000000000000000000019aac5f612f524b754ca7e7c41cbfa2e981a4432000000000000000000000000d077a400968890eacc75cdc901f0356c943e4fdb00000000000000000000000000000000000000000000000000000000000003e80000000000000000000000000ebc19619e8aa912d393ca321c0b6b4f7d98697d000000000000000000000000000000000000000000000000000000006b3dcf7b0000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000000000000018066000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000412210e8a00000000000000000000000000000000000000000000000000000000",
"gasPrice": "41250000000",
"estimationCheck": true,
"referenceId": "2470e3e3df964964b461f8a0afa449d0"
}
}With Slippage:
{
"path": [
"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee","0xd077A400968890Eacc75cdc901F0356c943e4fDb"
],
"amountIn": "1000000000000000000",
"deadline": "1799212923",
"to": "0x0eBc19619e8aA912d393Ca321c0B6b4f7d98697D",
"from": "0x0eBc19619e8aA912d393Ca321c0B6b4f7d98697D",
"gas": "1000000",
"poolFees": "1000",
"gasPriority": "high",
"slippage": "10",
"dexId": "3700"
}
With Slippage:
{
"status": 200,
"msg": "success",
"data": {
"chainId": "8217",
"from": "0x0eBc19619e8aA912d393Ca321c0B6b4f7d98697D",
"to": "0xA324880f884036E3d21a09B90269E1aC57c7EC8a",
"gas": "184337",
"value": "1000000000000000000",
"data": "0xac9650d800000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001800000000000000000000000000000000000000000000000000000000000000104414bf38900000000000000000000000019aac5f612f524b754ca7e7c41cbfa2e981a4432000000000000000000000000d077a400968890eacc75cdc901f0356c943e4fdb00000000000000000000000000000000000000000000000000000000000003e80000000000000000000000000ebc19619e8aa912d393ca321c0b6b4f7d98697d000000000000000000000000000000000000000000000000000000006b3dcf7b0000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000000000000018066000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000412210e8a00000000000000000000000000000000000000000000000000000000",
"gasPrice": "41250000000",
"estimationCheck": true,
"referenceId": "2470e3e3df964964b461f8a0afa449d0"
}
}Last updated

