Klayswap V3
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 Klayswap V3. For a complete list and more information, please see the DEX ID page.
Klayswap V3
Kaia Mainnet
3800
Endpoint Details
/getprice
Returns the swap quotation for a given token pair on Klayswap V3
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 3000.
https://api.expand.network/dex/getprice?path=0x19aac5f612f524b754ca7e7c41cbfa2e981a4432%2C0xe815a060b9279eba642f8c889fab7afc0d0aca63&amountIn=100000000000&vsCurrencies=inr&dexId=3800
/getindividualposition
Returns the liquidity position for a specified user address across all the pools for a given DEX.
GET
https://api.expand.network/dex/getindividualposition
Query Parameters
rpc
String
Remote procedural call URL.
poolAddresses*
String
The pool Addresses whose liquidity is to be fetched. (Comma-separated vaules)
address*
String
The public address of the liquidity holder.
https://api.expand.network/dex/getindividualposition?address=0xb6ab494d9b20ede5e57b42b6d7f058a9c802b0e2&poolAddresses=0x191a182fb17f2f675975e53ee879fac113e848ab&dexId=3800
/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?poolAddress=0x191a182fb17f2f675975e53ee879fac113e848ab&dexId=3800
/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?tokenA=0x19aac5f612f524b754ca7e7c41cbfa2e981a4432&tokenB=0xe815a060b9279eba642f8c889fab7afc0d0aca63&dexId=3800
/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=0x191a182fb17f2f675975e53ee879fac113e848ab&vsCurrencies=inr&dexId=3800
/swap
Initiate a swap transaction on a specified DEX.
POST
https://api.expand.network/dex/swap
Request Body
rpc
String
Remote procedural call URL.
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 a result of swap.
to*
String
Address of the recipient of the token.
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 3000.
gasPriority
String
low, medium, or high.
slippage
String
Percentage of total swap value. By default, 1.
0 <= slippage value <= 100
deadline*
String
Deadline for the transaction to be executed (UNIX Timestamp).
{
"path": [
"0x19aac5f612f524b754ca7e7c41cbfa2e981a4432",
"0xe815a060b9279eba642f8c889fab7afc0d0aca63"
],
"amountIn": "100000000000",
"deadline": "1799212923",
"to": "0xb6ab494d9b20ede5e57b42b6d7f058a9c802b0e2",
"from": "0xb6ab494d9b20ede5e57b42b6d7f058a9c802b0e2",
"amountOutMin": "10",
"gas": "1000000",
"poolFees": "100",
"gasPriority": "high",
"slippage": "30",
"dexId": "3800"
}
Last updated