Curve v2
Below is the list of tokens we currently support for these endpoints. We are happy to add support for additional tokens upon request.
/getprice
Returns the swap quotation for the given token pairs.
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.
https://api.expand.network/dex/getprice?dexId=1500&path=0x6b175474e89094c44da98b954eedeac495271d0f,0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48&amountIn=10000000000000000000
/getuserliquidity
Returns the balance of a particular token pair of an account.
GET
https://api.expand.network/dex/getuserliquidity
Query Parameters
rpc
String
Remote procedural call URL.
tokenA*
String
Address of token.
address*
String
Public address of liquidity provider.
tokenB*
String
Address of token.
tokenC
String
Address of token.
tokenD
String
Address of token.
https://api.expand.network/dex/getuserliquidity?address=0x6fb447ae94f5180254d436a693907a1f57696900&dexId=1500&tokenA=0x6b175474e89094c44da98b954eedeac495271d0f&tokenB=0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48&tokenC=0xdac17f958d2ee523a2206206994597c13d831ec7
/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=1500&poolAddress=0xc5424b857f758e906013f3555dad202e4bdb4567
/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?dexId=1500&poolAddress=0xdebf20617708857ebe4f679508e7b7863a8a8eee
/getliquidityholders
Returns the total number of liquidity holders in the specified pool.
GET
https://api.expand.network/dex/getliquidityholders
Query Parameters
rpc
String
Remote procedural call URL.
poolAddress*
String
The pool address.
https://api.expand.network/dex/getliquidityholders?dexId=1500&poolAddress=0xed279fdd11ca84beef15af5d39bb4d4bee23f0ca
/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=0x9bb98140F36553dB71fe4a570aC0b1401BC61B4F&dexId=1500
/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 a result of swap.
from*
String
Address of the sender of the token.
gas*
String
Maximum gas limit provided by the sender, for the transaction.
rpc
String
Remote procedural call URL.
gasPriority
String
low, medium, or high.
slippage
String
Percentage of total swap value. By default, 1.
0 <= slippage value <= 10
{
"dexId": "1500",
"path": [ "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", "0xae7ab96520de3a18e5e111b5eaab095312d7fe84" ],
"amountIn": "1000000000000000",
"amountOutMin": "10136848990976",
"gas": "800000",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006"
}
With gasPriority:
{
"dexId": "1500",
"path": [ "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", "0xae7ab96520de3a18e5e111b5eaab095312d7fe84" ],
"amountIn": "1000000000000",
"amountOutMin": "101368",
"gas": "800000",
"from": "0x6Fb447Ae94F5180254D436A693907a1f57696900" ,
"gasPriority":"medium"
}
With Slippage:
{
"dexId": "1500",
"amountIn": "1000000",
"amountOutMin": "949846",
"path": [
"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"0xdAC17F958D2ee523a2206206994597C13D831ec7"
],
"to": "0x22cf65ae3fa16d6379e72f4b4c2401c1b7c69731",
"deadline": "1711931771",
"from": "0x22cf65ae3fa16d6379e72f4b4c2401c1b7c69731",
"gas": "933376",
"gasPriority": "high",
"slippage": "4"
}
/addliquidity
Add liquidity to a specified pool in a specified DEX.
POST
https://api.expand.network/dex/addliquidity
Request Body
path*
Array
Comma separated values of token addresses.
amountIn*
Array
Amount of tokens to add liquidity.
amountOut*
String
Amount of tokens accepted as a result of the transaction.
from*
String
Address of the sender of the token.
gas*
String
Maximum gas limit provided by the sender, for the transaction.
rpc
String
Remote procedural call URL.
slippage
String
Percentage of total value. By default, 1.
0 <= slippage value <= 10
gasPriority
String
low, medium, or high.
{
"dexId": "1500",
"path": [ "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", "0xae7ab96520de3a18e5e111b5eaab095312d7fe84" ],
"amountIn": [ "100000000000000", "10000000000000" ],
"amountOut": "10136848990976",
"gas": "800000",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006"
}
With gasPriority:
{
"dexId": "1500",
"path": [
"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"0xae7ab96520de3a18e5e111b5eaab095312d7fe84"
],
"amountIn": [
"100000000000000",
"10000000000000"
],
"amountOut": "10136848990976",
"gas": "800000",
"gasPriority": "high",
"from": "0x6Fb447Ae94F5180254D436A693907a1f57696900"
}
With slippage:
{
"dexId": "1500",
"path": [ "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", "0xae7ab96520de3a18e5e111b5eaab095312d7fe84" ],
"amountIn": [ "100000000000000", "10000000000000" ],
"amountOut": "10136848990976",
"gas": "800000",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"slippage":"2.0001"
}
/removeliquidity
Remove liquidity from a specified pool for a specified DEX.
POST
https://api.expand.network/dex/removeliquidity
Request Body
path*
Array
Comma separated values of token addresses.
amountIn*
String
Amount of tokens to remove liquidity.
amountOut*
Array
Amount of tokens accepted as a result of the transaction.
from*
String
Address of the sender of the token.
gas*
String
Maximum gas limit provided by the sender, for the transaction.
rpc
String
Remote procedural call URL.
slippage
String
Percentage of total value. By default, 1. 0 <= slippage value <= 10
gasPriority
String
low, medium, or high.
{
"dexId": "1500",
"path": [ "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", "0xae7ab96520de3a18e5e111b5eaab095312d7fe84" ],
"amountIn": "1000000",
"amountOut": [ "100000000000000", "10000000000000" ],
"gas": "800000",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006"
}
With gasPriority:
{
"dexId": "1500",
"path": [
"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"0xae7ab96520de3a18e5e111b5eaab095312d7fe84"
],
"amountIn": "1000000",
"amountOut": [
"100000000000000",
"10000000000000"
],
"gas": "800000",
"gasPriority": "medium",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006"
}
With Slippage:
{
"dexId": "1500",
"path": [
"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"0xae7ab96520de3a18e5e111b5eaab095312d7fe84"
],
"amountIn": "1000000",
"amountOut": [
"100000000000000",
"10000000000000"
],
"gas": "800000",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"slippage": "10"
}
Last updated