Supported Chains
Available on Arbitrum Mainnet and Testnet.
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 Camelot V3.
/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 Camelot V3. For a complete list and more information, please see the DEX ID page.
Endpoint Details
/getprice
Returns the swap quotation for a given token pair on Camelot V3
GET
https://api.expand.network/dex/getprice
Query Parameters
Remote procedural call URL.
Comma separated values of token addresses whose price is to be fetched.
Sample Request Sample Response
Copy https://api.expand.network/dex/getprice?dexId=3000&path=0x82aF49447D8a07e3bd95BD0d56f35241523fBab1%2C0xaf88d065e77c8cC2239327C5EDb3A432268e5831&amountIn=100000000000000000
Copy {
"status" : 200 ,
"msg" : "success" ,
"data" : {
"amountIn" : "100000000000000000" ,
"path" : [
"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1" ,
"0xaf88d065e77c8cC2239327C5EDb3A432268e5831"
] ,
"amountsOut" : [
"100000000000000000" ,
"291735930"
]
}
}
back to top
/getuserliquidity
Returns the balance of a particular token pair of an account.
GET
https://api.expand.network/dex/getuserliquidity
Query Parameters
Remote procedural call URL.
The token ID for Camelot V3 liquidity position.
Sample Request Sample Response
Copy https://api.expand.network/dex/getuserliquidity?dexId=3000&tokenId=164692
Copy {
"status" : 200 ,
"msg" : "success" ,
"data" : {
"liquidity" : "0" ,
"tokenV3" : "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"
}
}
back to top
/getpoolliquidity
Returns the total liquidity for a specified pool.
GET
https://api.expand.network/dex/getpoolliquidity
Query Parameters
Remote procedural call URL.
Pool address whose liquidity is to be fetched.
Sample Request Sample Response
Copy https://api.expand.network/dex/getpoolliquidity?dexId=3000&poolAddress=0x28ADaC57728a7fB7A52d3B51F31992f404E7B010
Copy {
"status" : 200 ,
"msg" : "success" ,
"data" : {
"totalLiquidity" : "560979530528078399256"
}
}
back to top
/gettokenliquidity
Returns the individual token liquidity within the specified liquidity pool.
GET
https://api.expand.network/dex/gettokenliquidity
Query Parameters
Remote procedural call URL.
Sample Request Sample Response
Copy https://api.expand.network/dex/gettokenliquidity?dexId=3000&poolAddress=0x28ADaC57728a7fB7A52d3B51F31992f404E7B010
Copy {
"status" : 200 ,
"msg" : "success" ,
"data" : {
"USDY" : "9757072351229292430752246" ,
"USDC" : "1157179943379"
}
}
back to top
/swap
Initiate a swap transaction on a specified DEX.
POST
https://api.expand.network/dex/swap
Request Body
Remote procedural call URL.
Comma-separated values of token addresses, inside an array, to swap.
Amount of token to be swapped.
Minimum amount accepted as a result of swap.
Address of the recipient of the token.
Address of the sender of the token.
Maximum gas limit provided by the sender, for the transaction.
If a base token is involved in the swap;
0
for erc20 -> erc20,
1
for base -> erc20 ("from" address should be of equivalent wrapped token) ,
2
for erc20 -> base ("to" address should be of equivalent wrapped token) .
By default, 0.
Different pool based on the fees. By default, it is selected as 3000.
Percentage of total swap value.
By default, 1.
0 <= slippage value <= 100
Sample Request Sample Response
Copy {
"dexId" : "3000" ,
"path" : [
"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1" ,
"0xaf88d065e77c8cC2239327C5EDb3A432268e5831"
] ,
"amountIn" : "100000000000000" ,
"amountOutMin" : "143003" ,
"gas" : "800000" ,
"from" : "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402" ,
"to" : "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402" ,
"deadline" : "1740727106" ,
"involveBaseToken" : "1"
}
Copy {
"status" : 200 ,
"msg" : "success" ,
"data" : {
"chainId" : "42161" ,
"from" : "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402" ,
"to" : "0x1F721E2E82F6676FCE4eA07A5958cF098D339e18" ,
"value" : "100000000000000" ,
"gas" : "393223" ,
"data": "0xac9650d8000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000000e4bc65118800000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab1000000000000000000000000af88d065e77c8cc2239327c5edb3a432268e5831000000000000000000000000dae2f6eddda6fb4fb60cc02633de27e2b431b4020000000000000000000000000000000000000000000000000000000067c1634200000000000000000000000000000000000000000000000000005af3107a40000000000000000000000000000000000000000000000000000000000000022e9b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044186527000000000000000000000000000000000000000000000000000000000",
"estimationCheck" : true ,
"referenceId" : "a0ffe21d76de421cbf7e3e8e9ecbd5cd"
}
}
Sample Request Sample Response
With gasPriority (medium):
Copy {
"dexId" : "3000" ,
"path" : [
"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1" ,
"0xaf88d065e77c8cC2239327C5EDb3A432268e5831"
] ,
"amountIn" : "100000000000000" ,
"amountOutMin" : "143003" ,
"gas" : "800000" ,
"gasPriority" : "high" ,
"from" : "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402" ,
"to" : "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402" ,
"deadline" : "1740727106" ,
"involveBaseToken" : "1"
}
With gasPriority:
Copy {
"status" : 200 ,
"msg" : "success" ,
"data" : {
"chainId" : "42161" ,
"from" : "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402" ,
"to" : "0x1F721E2E82F6676FCE4eA07A5958cF098D339e18" ,
"value" : "100000000000000" ,
"gas" : "393223" ,
"data": "0xac9650d8000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000000e4bc65118800000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab1000000000000000000000000af88d065e77c8cc2239327c5edb3a432268e5831000000000000000000000000dae2f6eddda6fb4fb60cc02633de27e2b431b4020000000000000000000000000000000000000000000000000000000067c1634200000000000000000000000000000000000000000000000000005af3107a40000000000000000000000000000000000000000000000000000000000000022e9b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044186527000000000000000000000000000000000000000000000000000000000",
"gasPrice" : "15000000" ,
"estimationCheck" : true ,
"referenceId" : "52580b418aec4162bb37a8ad89cf4612"
}
}
back to top
/addliquidity
Add liquidity to a specified pool in a specified DEX.
POST
https://api.expand.network/dex/addliquidity
Request Body
Address of the first token being added.
Address of the second token being added.
Desired amount of token A.
Desired amount of token B.
Minimum amount of token A.
Minimum amount of token B.
Deadline for the transaction to be executed (UNIX Timestamp).
Address of the recipient of the token.
Address of the sender of the token.
Maximum gas limit provided by the sender, for the transaction.
Remote procedural call URL.
The token ID for Camelot V3 liquidity position.
Note- tokenId is required while adding liquidity in the same position.
Percentage of total value.
By default, 1.
0 <= slippage value <= 100
Sample Request Sample Response
Copy {
"dexId" : "3000" ,
"tokenA" : "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1" ,
"tokenB" : "0xaf88d065e77c8cC2239327C5EDb3A432268e5831" ,
"amountADesired" : "10000000000000" ,
"amountBDesired" : "24437" ,
"amountAMin" : "0" ,
"amountBMin" : "0" ,
"gas" : "800000" ,
"from" : "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402" ,
"to" : "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402" ,
"deadline" : "1740727106" ,
"tokenId" : "164692"
}
Copy {
"status" : 200 ,
"msg" : "success" ,
"data" : {
"chainId" : "42161" ,
"from" : "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402" ,
"to" : "0x00c7f3082833e796A5b3e4Bd59f6642FF44DCD15" ,
"value" : "0" ,
"gas" : "800000" ,
"data": "0xac9650d8000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000c4219f5d170000000000000000000000000000000000000000000000000000000000028354000000000000000000000000000000000000000000000000000009184e72a0000000000000000000000000000000000000000000000000000000000000005f75000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000067c163420000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044186527000000000000000000000000000000000000000000000000000000000",
"estimationCheck" : true ,
"referenceId" : "b1c1943fbb5c47a8a13ef4a3057cb90e"
}
}
Sample Request Sample Response
With gasPriority (medium):
Copy {
"dexId" : "3000" ,
"tokenA" : "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1" ,
"tokenB" : "0xaf88d065e77c8cC2239327C5EDb3A432268e5831" ,
"amountADesired" : "10000000000000" ,
"amountBDesired" : "24437" ,
"amountAMin" : "0" ,
"amountBMin" : "0" ,
"gas" : "800000" ,
"gasPriority" : "high" ,
"from" : "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402" ,
"to" : "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402" ,
"deadline" : "1740727106" ,
"tokenId" : "164692"
}
With gasPriority:
Copy {
"status" : 200 ,
"msg" : "success" ,
"data" : {
"chainId" : "42161" ,
"from" : "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402" ,
"to" : "0x00c7f3082833e796A5b3e4Bd59f6642FF44DCD15" ,
"value" : "0" ,
"gas" : "800000" ,
"data": "0xac9650d8000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000c4219f5d170000000000000000000000000000000000000000000000000000000000028354000000000000000000000000000000000000000000000000000009184e72a0000000000000000000000000000000000000000000000000000000000000005f75000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000067c163420000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044186527000000000000000000000000000000000000000000000000000000000",
"gasPrice" : "15000000" ,
"estimationCheck" : true ,
"referenceId" : "740fe260aeba44e3a60b7fb0aaa60a5e"
}
}
back to top
/removeliquidity
Remove liquidity from a specified pool for a specified DEX.
POST
https://api.expand.network/dex/removeliquidity
Request Body
The token ID for Camelot V3 liquidity position.
Deadline for the transaction to be executed (UNIX Timestamp).
Address of the sender of the token.
Maximum gas limit provided by the sender, for the transaction.
Remote procedural call URL.
The liquidity to be removed.
Percentage of total value.
By default, 1.
0 <= slippage value <= 100
Sample Request Sample Response
Copy {
"dexId" : "3000" ,
"liquidity" : "155231340559" ,
"tokenId" : "164018" ,
"gas" : "800000" ,
"from" : "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402" ,
"deadline" : "1740727106" ,
"slippage" : "10"
}
Copy {
"status" : 200 ,
"msg" : "success" ,
"data" : {
"chainId" : "42161" ,
"from" : "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402" ,
"to" : "0x00c7f3082833e796A5b3e4Bd59f6642FF44DCD15" ,
"value" : "0" ,
"gas" : "501591" ,
"data": "0xac9650d80000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000002a000000000000000000000000000000000000000000000000000000000000000a40c49ccbe00000000000000000000000000000000000000000000000000000000000280b2000000000000000000000000000000000000000000000000000000242482480f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000067c16342000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000084fc6f786500000000000000000000000000000000000000000000000000000000000280b2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffff00000000000000000000000000000000ffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004469bc35b20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000dae2f6eddda6fb4fb60cc02633de27e2b431b402000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064df2ab5bb00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000dae2f6eddda6fb4fb60cc02633de27e2b431b40200000000000000000000000000000000000000000000000000000000",
"estimationCheck" : true ,
"referenceId" : "9d0c1d0bef37470c8e51dd1e9867b028"
}
}
Sample Request Sample Response
With gasPriority:
Copy {
"dexId" : "3000" ,
"liquidity" : "155231340559" ,
"tokenId" : "164018" ,
"gas" : "800000" ,
"gasPriority" : "high" ,
"from" : "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402" ,
"deadline" : "1740727106" ,
"slippage" : "10"
}
With gasPriority:
Copy {
"status" : 200 ,
"msg" : "success" ,
"data" : {
"chainId" : "42161" ,
"from" : "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402" ,
"to" : "0x00c7f3082833e796A5b3e4Bd59f6642FF44DCD15" ,
"value" : "0" ,
"gas" : "501591" ,
"data": "0xac9650d80000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000002a000000000000000000000000000000000000000000000000000000000000000a40c49ccbe00000000000000000000000000000000000000000000000000000000000280b2000000000000000000000000000000000000000000000000000000242482480f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000067c16342000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000084fc6f786500000000000000000000000000000000000000000000000000000000000280b2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffff00000000000000000000000000000000ffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004469bc35b20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000dae2f6eddda6fb4fb60cc02633de27e2b431b402000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064df2ab5bb00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000dae2f6eddda6fb4fb60cc02633de27e2b431b40200000000000000000000000000000000000000000000000000000000",
"gasPrice" : "15000000" ,
"estimationCheck" : true ,
"referenceId" : "9d0c1d0bef37470c8e51dd1e9867b028"
}
}
back to top