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 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.
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.
dexId*
String
Refer to DEX ID page for details.
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.
dexId*
String
Refer to DEX ID page for details.
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.
dexId*
String
Refer to DEX ID page for details.
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.
dexId*
String
Refer to DEX ID page for details.
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.
dexId*
String
Refer to DEX ID page for details.
https://api.expand.network/dex/getindividualposition?address=0x9bb98140F36553dB71fe4a570aC0b1401BC61B4F&dexId=1500
/gethistoricalpoolchartdata
Get the data the OHCLV (Open, High, Close, Low, and Volume) within the specified time interval for pool on Curve V2. Available on Ethereum only.
GET
https://api.expand.network/dex/gethistoricalpoolchartdata
Query Parameter
dexId*
String
Refer to DEX ID page for details.
interval
String
15 mins(by default), 30 mins, 60 mins, and 90 mins.
limit
String
No of iteration. Start limit is 100 and maximum limit is 500.
poolAddress*
String
Pool address whose transactions is to be fetched. Note: We supported pool mentioned in the list.
rpc
String
Remote procedural call URL.
https://api.expand.network/dex/gethistoricalpoolchartdata?dexId=1500&poolAddress=0xdc24316b9ae028f1497c275eb9192a3ea0f67022&interval=15m&limit=100
/swap
Initiate a swap transaction on a specified DEX.
POST
https://api.expand.network/dex/swap
Request Body
dexId*
String
Refer to the DEX ID page for details.
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 <= 100
ofacCheck
Boolean
if true,
provides insights of the contract and tokens involved in the transaction.
By Default, false
Available on Ethereum, Polygon, BSC, Avalanche, Arbitrum and Optimism Mainnet
{
"dexId": "1500",
"path": [
"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
"0xae7ab96520de3a18e5e111b5eaab095312d7fe84"
],
"amountIn": "1000000000000",
"amountOutMin": "101368",
"gas": "800000",
"from": "0x6Fb447Ae94F5180254D436A693907a1f57696900"
}
With gasPriority:
{
"dexId": "1500",
"path": [
"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
"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",
"slippage": "4"
}
With ofacCheck:
{
"dexId": "1500",
"amountIn": "1000000",
"amountOutMin": "949846",
"path": [
"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"0xdAC17F958D2ee523a2206206994597C13D831ec7"
],
"to": "0x22cf65ae3fa16d6379e72f4b4c2401c1b7c69731",
"deadline": "1711931771",
"from": "0x22cf65ae3fa16d6379e72f4b4c2401c1b7c69731",
"gas": "933376",
"slippage": "4",
"ofacCheck": true
}
/addliquidity
Add liquidity to a specified pool in a specified DEX.
POST
https://api.expand.network/dex/addliquidity
Request Body
dexId*
String
Refer to the DEX ID page for details.
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 <= 100
gasPriority
String
low, medium, or high.
ofacCheck
Boolean
if true,
provides insights of the contract and tokens involved in the transaction.
By Default, false
Available on Ethereum, Polygon, BSC, Avalanche, Arbitrum and Optimism Mainnet
{
"dexId": "1500",
"path": [ "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", "0xae7ab96520de3a18e5e111b5eaab095312d7fe84" ],
"amountIn": [ "100000000000000", "10000000000000" ],
"amountOut": "10136848990976",
"gas": "800000",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006"
}
With gasPriority:
{
"dexId": "1500",
"path": [
"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
"0xae7ab96520de3a18e5e111b5eaab095312d7fe84"
],
"amountIn": [
"100000000000000",
"10000000000000"
],
"amountOut": "10136848990976",
"gas": "800000",
"gasPriority": "high",
"from": "0x6Fb447Ae94F5180254D436A693907a1f57696900"
}
With slippage:
{
"dexId": "1500",
"path": [ "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", "0xae7ab96520de3a18e5e111b5eaab095312d7fe84" ],
"amountIn": [ "100000000000000", "10000000000000" ],
"amountOut": "10136848990976",
"gas": "800000",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"slippage":"2.0001"
}
With ofacCheck:
{
"dexId": "1500",
"path": [ "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", "0xae7ab96520de3a18e5e111b5eaab095312d7fe84" ],
"amountIn": [ "100000000000000", "10000000000000" ],
"amountOut": "10136848990976",
"gas": "800000",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"slippage":"2.0001",
"ofacCheck": true
}
/removeliquidity
Remove liquidity from a specified pool for a specified DEX.
POST
https://api.expand.network/dex/removeliquidity
Request Body
dexId*
String
Refer to the DEX ID page for details.
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.
ofacCheck
Boolean
if true,
provides insights of the contract and tokens involved in the transaction.
By Default, false
Available on Ethereum, Polygon, BSC, Avalanche, Arbitrum and Optimism Mainnet
{
"dexId": "1500",
"path": [
"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
"0xae7ab96520de3a18e5e111b5eaab095312d7fe84"
],
"amountIn": "1000000",
"amountOut": [
"100000000000000",
"10000000000000"
],
"gas": "800000",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006"
}
With gasPriority:
{
"dexId": "1500",
"path": [
"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
"0xae7ab96520de3a18e5e111b5eaab095312d7fe84"
],
"amountIn": "1000000",
"amountOut": [
"100000000000000",
"10000000000000"
],
"gas": "800000",
"gasPriority": "medium",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006"
}
With Slippage:
{
"dexId": "1500",
"path": [
"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
"0xae7ab96520de3a18e5e111b5eaab095312d7fe84"
],
"amountIn": "1000000",
"amountOut": [
"100000000000000",
"10000000000000"
],
"gas": "800000",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"slippage": "10"
}
With ofacCheck:
{
"dexId": "1500",
"path": [
"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
"0xae7ab96520de3a18e5e111b5eaab095312d7fe84"
],
"amountIn": "1000000",
"amountOut": [
"100000000000000",
"10000000000000"
],
"gas": "800000",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"slippage": "10",
"ofacCheck": true
}
Last updated