PancakeSwap V2
Supported Chains
Available on Aptos, Binance Mainnet, and Binance 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./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./getliquidityholders
GET
- Returns the swap quotation for a given token pair. - Returns the total number of liquidity holders in the specified pool. Currently Available on Binance./getindividualposition
GET
- Returns the swap quotation for a given token pair. - Returns the total number of liquidity holders in the specified pool. Currently Available on Binance./gethistoricaltimeseries
GET
- Returns the swap quotation for a given token pair. - Returns the total number of liquidity holders in the specified pool. Currently Available on Binance./gethistoricaltransactions
GET
- Returns the swap quotation for a given token pair. - Returns the total number of liquidity holders in the specified pool. Currently Available on Binance./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 PancakeSwap V3. Please see the DEX ID page for a complete DEX ID list and more information.
Endpoint Details
/getprice
Returns the swap quotation for the given token pair.
GET
https://api.expand.network/dex/getprice
Query Parameters
https://api.expand.network/dex/getprice?dexId=1200&path=0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c,0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82&amountIn=10000000000000000000
{
"status": 200,
"msg": "success",
"data": {
"amountIn": "10000000000000000000",
"path": [
"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
"0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82"
],
"amountsOut": [
"10000000000000000000",
"771915564765835452853"
]
}
}
/getuserliquidity
Returns the balance of a particular token pair of an account.
GET
https://api.expand.network/dex/getuserliquidity
Query Parameters
https://api.expand.network/dex/getuserliquidity?address=0x6fb447ae94f5180254d436a693907a1f57696900&dexId=1200&tokenA=0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c&tokenB=0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82
{
"status": 200,
"msg": "success",
"data": {
"pairAddress": "0x0eD7e52944161450477ee417DE9Cd3a859b14fD0",
"liquidity": "0",
"tokenA": "0",
"tokenB": "0"
}
}
Query Parameters for APTOS
https://api.expand.network/dex/getuserliquidity?dexId=2901&poolAddress=0xc7efb4076dbe143cbcd98cfaaa929ecfc8f299203dfff63b95ccb6bfe19850fa%3A%3Aswap%3A%3ALPToken%3C0x1%3A%3Aaptos_coin%3A%3AAptosCoin%2C0x8c805723ebc0a7fc5b7d3e7b75d567918e806b3461cb9fa21941a9edc0220bf%3A%3Adevnet_coins%3A%3ADevnetBNB%3E&address=0xa182b65f4bf10be7ef870496893c170af3079a2540c63b470445417fcfb21c5b
{
"status": 200,
"msg": "success",
"data": {
"pairAddress": "0xc7efb4076dbe143cbcd98cfaaa929ecfc8f299203dfff63b95ccb6bfe19850fa::swap::LPToken<0x1::aptos_coin::AptosCoin,0x8c805723ebc0a7fc5b7d3e7b75d567918e806b3461cb9fa21941a9edc0220bf::devnet_coins::DevnetBNB>",
"liquidity": "3000",
"tokenA": "2138066",
"tokenB": "20"
}
}
/getpoolliquidity
Returns the total liquidity for a specified pool.
GET
https://api.expand.network/dex/getpoolliquidity
Query Parameters
https://api.expand.network/dex/getpoolliquidity?dexId=1200&poolAddress=0x460b4193Ec4C1a17372Aa5FDcd44c520ba658646
{
"status": 200,
"msg": "success",
"data": {
"totalLiquidity": "2790235114583215"
}
}
/gettokenliquidity
Returns the individual token liquidity within the specified liquidity pool.
GET
https://api.expand.network/dex/gettokenliquidity
Query Parameters
https://api.expand.network/dex/gettokenliquidity?dexId=1200&poolAddress=0x460b4193Ec4C1a17372Aa5FDcd44c520ba658646
{
"status": 200,
"msg": "success",
"data": {
"CTK": "73040589498",
"WBNB": "163589136764841979343"
}
}
/getliquidityholders
Returns the total number of liquidity holders in the specified pool. Currently Available on Binance.
GET
https://api.expand.network/dex/getliquidityholders
Query Parameters
https://api.expand.network/dex/getliquidityholders?dexId=1200&poolAddress=0x460b4193Ec4C1a17372Aa5FDcd44c520ba658646
{
"status": 200,
"msg": "success",
"data": {
"totalTokenHolders": "40"
}
}
/getindividualposition
Returns the liquidity position for a specified user address across all the pools for the DEX. Currently available on Binance
GET
https://api.expand.network/dex/getindividualposition
Query Parameters
https://api.expand.network/dex/getindividualposition?poolAddresses=0xC05654C66756eBB82c518598c5f1ea1a0199a563&address=0x8f295a22a4a5ef346192d2b2d4c483d9f76b2a67&poolSize=1000&dexId=1200
{
"status": 200,
"msg": "success",
"data": {
"aggregatedLiquidity": "0",
"poolAddresses": {
"USTmAMZN": {
"0xC05654C66756eBB82c518598c5f1ea1a0199a563": "0"
}
}
}
}
/gethistoricaltimeseries
Get the historical time series transactions for a specific pool address. Currently available on Binance
GET
https://historicaltrade.api.expand.network/dex/gethistoricaltimeseries
Query Parameters
https://historicaltrade.api.expand.network/dex/gethistoricaltimeseries?dexId=1200&poolAddress=0x16b9a82891338f9ba80e2d6970fdda79d1eb0dae&startBlock=18675000&endBlock=18675639
{
"status": 200,
"msg": "success",
"data": {
"pair": "USDT/WBNB",
"priceData": [
{
"hash": "0xa4e7be3c64891136a667454270401c96862b530242a8b66d2935512d26eea240",
"timestamp": 1655192852,
"price": "0.004358852942015572"
},
{
"hash": "0xfc445916adc369b5a7717808b2d2380407aa707d7b81bcda9705b9ac0cc43caf",
"timestamp": 1655192852,
"price": "0.004337034359420212"
},
{
"hash": "0x05c2f77bc5157eba0db611c967955be3e54c15abf61a6e655010449336291651",
"timestamp": 1655192852,
"price": "0.004337047750174369"
},
{
"hash": "0x91adb38cf7f98fc03960c26ec4085c771561475788990af71dfa9012975a4d4d",
"timestamp": 1655192852,
"price": "0.004337070125743882"
},
{
"hash": "0xd0e91cd038b18db3ea774d25375143e920613e18229cc6f1a41255b276c54eff",
"timestamp": 1655192852,
"price": "0.004358845309343015"
},
{
"hash": "0xbcbd869b9279b615fe448cceb49658effd9a200e277edeb2739744b93f65f23d",
"timestamp": 1655192849,
"price": "0.0043588399027473515"
},
{
"hash": "0x454ebac31c3be6ea198b44a50ae2ca51ee6e5c944a2de0602a67b9ec08bcdbd2",
"timestamp": 1655192849,
"price": "0.004358806972252251"
},
{
"hash": "0xdf459434fd3742280d7974148d081f6299574b5157f84f157b21c10085fcf8e5",
"timestamp": 1655192849,
"price": "0.004358688622314105"
},
{
"hash": "0x8361faaf2587cdec84f2a0ea41242d001b5f929d890051b602d7de4eeb9a497c",
"timestamp": 1655192849,
"price": "0.0043368340207808895"
},
{
"hash": "0x0be5699c728432639245b5a6c4695438bfe3224e4eec2b327dab1c45eee6710f",
"timestamp": 1655192849,
"price": "0.004336857766910803"
},
{
"hash": "0xc848656fe95f61858d8ff8c4910bc5b69e198653ebc21034b2ae045d65ac0521",
"timestamp": 1655192846,
"price": "0.004358629672082426"
},
{
"hash": "0x791aae590fefadb4fb3422a216aed0e55b271df12062291aebc3e53745388f23",
"timestamp": 1655192846,
"price": "0.004336885209614627"
},
{
"hash": "0xf948b7e4479f12509de652876faa6ad6ff80e9b93ed7c13d30bb879dbce71095",
"timestamp": 1655192846,
"price": "0.00433692364846471"
},
{
"hash": "0x2d15e55b576aa93dc56e2c0cb40f39603ba3bfea7fd8f8127f3703ef19037dbf",
"timestamp": 1655192846,
"price": "0.004336941452759448"
},
{
"hash": "0xda519c4ad1ac81eef91d811070c2ce7aaaf73c26130fff0c2d75e4060320219c",
"timestamp": 1655192846,
"price": "0.0043369887652104176"
},
{
"hash": "0x23aff53216899aa1487850ea5f5bf612809a0e54f9249038a59d22df5b3479d0",
"timestamp": 1655192843,
"price": "0.004337022248686662"
},
{
"hash": "0x6578930cb092f99ebc02e0d953c7af541376bdd032b9ba0f451836c14ae9a052",
"timestamp": 1655192843,
"price": "0.004358738297104802"
},
{
"hash": "0x4f7f69ece57edb492c9bc3843b937e5738e6c28b24a2932b7587a2900b2cdb4d",
"timestamp": 1655192843,
"price": "0.004358637548123467"
},
{
"hash": "0xd6569ff1abc750321dd683d2b9ce0d7b6f0d1dae7905e206a1d9b75315f425ac",
"timestamp": 1655192831,
"price": "0.00435856778887612"
},
{
"hash": "0x798aa48de7896143e1626e60150c67692792f0b55667e697af6df4fdb8f505ab",
"timestamp": 1655192831,
"price": "0.004336801456985259"
},
{
"hash": "0x798aa48de7896143e1626e60150c67692792f0b55667e697af6df4fdb8f505ab",
"timestamp": 1655192831,
"price": "0.004336801501292449"
},
{
"hash": "0xbb9864acf695370b923afc0129311e66b8acf069bddcd8e9c33b32cefa793a11",
"timestamp": 1655192831,
"price": "0.0043368030469385695"
},
{
"hash": "0x1d2889468b253063a8064379b449d4c832dd711643822e00b77c1a7faa6ee12d",
"timestamp": 1655192831,
"price": "0.004358566285450221"
},
{
"hash": "0x11c01dafcd48e5dda30fc69a49ec88432a891b195227c32506e9748f7d3bff72",
"timestamp": 1655192831,
"price": "0.004336847740684698"
},
{
"hash": "0x487ec3d3d56d518067fe0389bb10ab94f378e78f97919c5d6598a6a68eed8d25",
"timestamp": 1655192831,
"price": "0.0043608408925375165"
},
{
"hash": "0xf4ebb66455d4a7cad46aec25fc8685e7910494d46ff6bda3a1951182d879194b",
"timestamp": 1655192831,
"price": "0.004336938355279746"
},
{
"hash": "0xdb3670b569d0a9ee510cbcdf7aabc88b600503c094770204ae67e3c3e3b7114a",
"timestamp": 1655192828,
"price": "0.0043587619240398195"
},
{
"hash": "0xe127e43a7a0bf909779bf022f271cbce881bde0b91cbec2e2a45580f086c8d17",
"timestamp": 1655192828,
"price": "0.004337185440945262"
},
{
"hash": "0xb7e91a51e4e4dbaac8e9c5020a55573b34733d58f94c75c0b558d329553920de",
"timestamp": 1655192828,
"price": "0.004337380650207665"
},
{
"hash": "0x239065c70237bdf70c71d8c9f32507ccffd7b8ae6f1307d1767a8f3e5f1c6594",
"timestamp": 1655192828,
"price": "0.004337441760628281"
},
{
"hash": "0x485528434a50577fb8edb887581d53a4a31b359cf1b20a8048381911e053608d",
"timestamp": 1655192828,
"price": "0.004359260988922678"
},
{
"hash": "0xf44680d3d3dcd9abbeec85d595ba14bb67b79f6c2f72b2fe38e708f756efa81d",
"timestamp": 1655192828,
"price": "0.004359242173012291"
},
{
"hash": "0x8c3555fd7abad3acb109716ce549e328693ce357da69e9a54c7a37a0f7c7e927",
"timestamp": 1655192828,
"price": "0.004337469152200651"
},
{
"hash": "0x8557537d52021cb4e2ebf0389de962f2affbbd1578e9e9d91674596de84a8b13",
"timestamp": 1655192825,
"price": "0.0043374792948373915"
},
{
"hash": "0xd4b5151b9a5a07e49024186dacff0b7a8d23198f917c093cf583c4771ec9d422",
"timestamp": 1655192825,
"price": "0.004359240929032785"
},
{
"hash": "0x67604272ca2b8b89e33b1e6a1b9c89db75635e1d78f5cf2c8e49b9f3a21c1b2f",
"timestamp": 1655192825,
"price": "0.004337933190955034"
},
{
"hash": "0x865fb5fcb394c48fd40557768f08f3d69bd7c87f607ec44f13b0b2eeada11c80",
"timestamp": 1655192822,
"price": "0.004360170392030563"
},
{
"hash": "0xffd100d86343e20788a8abb48660d40b6714b8b20ef1d47a98b8cc99b8257231",
"timestamp": 1655192822,
"price": "0.004360163275274439"
},
{
"hash": "0x494090254f82033f54aa5308e5d9a83e3d78a2408eb2538e03ff46397341afd4",
"timestamp": 1655192822,
"price": "0.004338392721513588"
},
{
"hash": "0xe6e38a577cef9a729697c8ad08e14de932fd12bc896821d13f5dbb6c6dbf1f33",
"timestamp": 1655192822,
"price": "0.004338399897695004"
},
{
"hash": "0x2a649227209c1016e18c5c01019578ae79f00c64aff230fe1e2fcd855662c3f9",
"timestamp": 1655192822,
"price": "0.004360024464759858"
},
{
"hash": "0x51bf4d9c11fd14e26ddd84e918dcb015cdc98da31f707ed4ecab24ad0a057da0",
"timestamp": 1655192822,
"price": "0.004359871750374781"
}
]
}
}
/gethistoricaltransactions
Get the historical transactions focusing on swaps associated with a specific pool address. Currently available on Binance
GET
https://historicaltrade.api.expand.network/dex/gethistoricaltransactions
Query Parameters
https://historicaltrade.api.expand.network/dex/gethistoricaltransactions?poolAddress=0x05616b7b6da03fb4c773b76663816b360ccaede4&dexId=1200&startBlock=34544519&endBlock=34548560
{
"status": 200,
"msg": "success",
"data": {
"pair": "TOKEN/WBNB",
"transactions": [
{
"transactionHash": "0x0e0333c6bcdcf9a09841e815bdaffc55b1a069f78c33541918f8aa800ce5327a",
"transactionDetails": {
"blockHash": "0x3a9f5de42cdaddbeea0f6c40ed4d991dd9fd3aaf0831dfa08719c552c60ba1cf",
"blockNumber": "34548096",
"from": "0x055a3b37957bfbd3345bed9968e7e8dd56d67066",
"gas": "1827825",
"gasPrice": "3150000000",
"hash": "0x0e0333c6bcdcf9a09841e815bdaffc55b1a069f78c33541918f8aa800ce5327a",
"input": "0x5c11d7950000000000000000000000000000000000000000000000000000085413a733ff0000000000000000000000000000000000000000000000000f5980b344c4c06400000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000055a3b37957bfbd3345bed9968e7e8dd56d67066000000000000000000000000000000000000000000000000000000006584352500000000000000000000000000000000000000000000000000000000000000020000000000000000000000004507cef57c46789ef8d1a19ea45f4216bae2b528000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c",
"nonce": "435338",
"to": "0x10ed43c718714eb63d5aa57b78b54704e256024e",
"transactionIndex": "99",
"value": "0",
"type": "0",
"chainId": "56",
"v": "0x94",
"r": "0x9c5367e8276ca0c88cd100418d73a4c04adf8e4718a88ee29fac96b695cd504b",
"s": "0x664a7ddf2587ec3ea192682053a2502280be34ff5088dce30621655aa27d965f"
}
},
{
"transactionHash": "0x110647ed390ad69b08e40d1432aa4c402df4506ae5f9f897860ea4e241c78dd6",
"transactionDetails": {
"blockHash": "0xfdc0e116f2a20e13cca8be61c46ee1ad214ae628aca4cbff508f5d6bcf5a663d",
"blockNumber": "34548119",
"from": "0x055a3b37957bfbd3345bed9968e7e8dd56d67066",
"gas": "1827825",
"gasPrice": "3150000000",
"hash": "0x110647ed390ad69b08e40d1432aa4c402df4506ae5f9f897860ea4e241c78dd6",
"input": "0x5c11d795000000000000000000000000000000000000000000000000000007b28e1f777f0000000000000000000000000000000000000000000000000e28e19e4a923e9200000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000055a3b37957bfbd3345bed9968e7e8dd56d67066000000000000000000000000000000000000000000000000000000006584356d00000000000000000000000000000000000000000000000000000000000000020000000000000000000000004507cef57c46789ef8d1a19ea45f4216bae2b528000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c",
"nonce": "435345",
"to": "0x10ed43c718714eb63d5aa57b78b54704e256024e",
"transactionIndex": "73",
"value": "0",
"type": "0",
"chainId": "56",
"v": "0x93",
"r": "0x7477029e608e4d564193bb46c7a4044d4ef1a0c3bf7687433fbd181a2131b245",
"s": "0x5767ce7bf8f51df4c456045d909af1742d2d0df4d6163a78c4430d1129c9ff26"
}
},
{
"transactionHash": "0xe769eff1adc2a66523b3d6a05cfd1b21dd94868fdb8877211a885d80bd7bf08b",
"transactionDetails": {
"blockHash": "0xd1a4f2635e456989f625a79c6bff75a4a40820141b66f12f0300764360e24795",
"blockNumber": "34548323",
"from": "0x055a3b37957bfbd3345bed9968e7e8dd56d67066",
"gas": "1827825",
"gasPrice": "3150000000",
"hash": "0xe769eff1adc2a66523b3d6a05cfd1b21dd94868fdb8877211a885d80bd7bf08b",
"input": "0x5c11d795000000000000000000000000000000000000000000000000000012a0a5755eff00000000000000000000000000000000000000000000000022132516d135029700000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000055a3b37957bfbd3345bed9968e7e8dd56d6706600000000000000000000000000000000000000000000000000000000658437d100000000000000000000000000000000000000000000000000000000000000020000000000000000000000004507cef57c46789ef8d1a19ea45f4216bae2b528000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c",
"nonce": "435378",
"to": "0x10ed43c718714eb63d5aa57b78b54704e256024e",
"transactionIndex": "57",
"value": "0",
"type": "0",
"chainId": "56",
"v": "0x94",
"r": "0xf6c95a653ee9dd9f04728440793c74b6e3ca49eee205995962b80de99f006e8e",
"s": "0x5b635a90c526104ad6d3b472337c0dc44e36318bb51cbd87b918c276e484de5a"
}
},
{
"transactionHash": "0xa08b6126adc8fdf526282c08c7598cca0d9660cf032bf7e2625dd1d3c3c02646",
"transactionDetails": {
"blockHash": "0x011eb51371dc7fab04aec4747e39f1b19157cedaf7aa46ea359f2b81bc139056",
"blockNumber": "34548078",
"from": "0x055a3b37957bfbd3345bed9968e7e8dd56d67066",
"gas": "1827825",
"gasPrice": "3150000000",
"hash": "0xa08b6126adc8fdf526282c08c7598cca0d9660cf032bf7e2625dd1d3c3c02646",
"input": "0x5c11d7950000000000000000000000000000000000000000000000000000071f616e4fff0000000000000000000000000000000000000000000000000d1d45cca8f0270100000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000055a3b37957bfbd3345bed9968e7e8dd56d6706600000000000000000000000000000000000000000000000000000000658434f200000000000000000000000000000000000000000000000000000000000000020000000000000000000000004507cef57c46789ef8d1a19ea45f4216bae2b528000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c",
"nonce": "435333",
"to": "0x10ed43c718714eb63d5aa57b78b54704e256024e",
"transactionIndex": "89",
"value": "0",
"type": "0",
"chainId": "56",
"v": "0x93",
"r": "0xd47769d5b84274a60e08883f55134123c07ba0b49ab6633e6ead301bbfbe3de7",
"s": "0x4fae3d9c98bbef24a76cb8827f08fae2d1ea3c647a8f9416cca379e463d0957c"
}
},
{
"transactionHash": "0x8b8c30a219f64ab57b08795bb42cc31b92e6abb9af1f8f553cbfda629f95643e",
"transactionDetails": {
"blockHash": "0x6f4462177d6bddbc9983699e8c47428378a076a6ac5dd18b991c806361197dad",
"blockNumber": "34548558",
"from": "0x05d99efbc49b74751521234ce0509c9ffcc6d2b7",
"gas": "600000",
"gasPrice": "3000000001",
"hash": "0x8b8c30a219f64ab57b08795bb42cc31b92e6abb9af1f8f553cbfda629f95643e",
"input": "0x95435ac9000000000000000000000000000000000000000000000000000005b0462445570000000000000000000000000000000000000171007ac8f660d8c2f3a24076f60000000000000000000000004507cef57c46789ef8d1a19ea45f4216bae2b5280000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000001847000000000000000000000000005616b7b6da03fb4c773b76663816b360ccaede40000000000000000000000000000000000000000000000000000000065843a88",
"nonce": "9739",
"to": "0x802b65b5d9016621e66003aed0b16615093f328b",
"transactionIndex": "97",
"value": "0",
"type": "0",
"chainId": "56",
"v": "0x94",
"r": "0x5999271baa6c0d69f286aca11f07f58f1f5d82a4b583a03f705813bba2a4cec0",
"s": "0x679efd2ccddd7c6e123062129a2b4f1536a160b506e701282a5b4550fdff61e7"
}
}
]
}
}
/swap
Initiate a swap transaction on a specified DEX.
POST
https://api.expand.network/dex/swap
Request Body
{
"dexId": "1200",
"amountIn": "120000000",
"amountOutMin": "0",
"path": ["0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c", "0xCC42724C6683B7E57334c4E856f4c9965ED682bD"],
"to": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"deadline": "1664529286",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"gas": "29880"
}
{
"status": 200,
"msg": "success",
"data": {
"chainId": "56",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"to": "0x10ED43C718714eb63d5aA57B78B54704E256024E",
"value": "0",
"gas": "29880",
"data": "0x38ed17390000000000000000000000000000000000000000000000000000000007270e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000063056e00436da25bcf48a40dfbbdcc7089351006000000000000000000000000000000000000000000000000000000006336b3860000000000000000000000000000000000000000000000000000000000000002000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c000000000000000000000000cc42724c6683b7e57334c4e856f4c9965ed682bd",
"referenceId": "b26f6954ac4b4741a7dda8287698f4ce"
}
}
With gasPriority:
{
"dexId": "1200",
"amountIn": "120000000",
"amountOutMin": "0",
"path": [
"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
"0xCC42724C6683B7E57334c4E856f4c9965ED682bD"
],
"to": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"deadline": "1704529286",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"gas": "298800",
"gasPriority": "medium"
}
With gasPriority:
{
"status": 200,
"msg": "success",
"data": {
"chainId": "56",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"to": "0x10ED43C718714eb63d5aA57B78B54704E256024E",
"value": "0",
"gas": "298800",
"data": "0x38ed17390000000000000000000000000000000000000000000000000000000007270e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000063056e00436da25bcf48a40dfbbdcc70893510060000000000000000000000000000000000000000000000000000000065990d860000000000000000000000000000000000000000000000000000000000000002000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c000000000000000000000000cc42724c6683b7e57334c4e856f4c9965ed682bd",
"gasPrice": "1200000000",
"referenceId": "db29de70d363415284684288344c7b05"
}
}
Request Body for APTOS
{
"amountIn": "100000000",
"from": "0x1c3266eca38df87026255884192b5979eac24cf0dac7a33cfa7af0d27651fb4c",
"path": [
"0x1::aptos_coin::AptosCoin",
"0xf22bede237a07e121b56d91a491eb7bcdfd1f5907926a9e58338f964a01b17fa::asset::USDC"
],
"slippage": "100",
"dexId": "2900",
"gas": "1000"
}
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1400",
"from": "0x1c3266eca38df87026255884192b5979eac24cf0dac7a33cfa7af0d27651fb4c",
"to": "0xc7efb4076dbe143cbcd98cfaaa929ecfc8f299203dfff63b95ccb6bfe19850fa",
"data": "HDJm7KON+HAmJViEGStZeerCTPDax6M8+nrw0nZR+0x0mwAAAAAAAALH77QHbb4UPLzZjPqqkp7PyPKZID3/9juVzLa/4ZhQ+gZyb3V0ZXIQc3dhcF9leGFjdF9pbnB1dAIHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEKYXB0b3NfY29pbglBcHRvc0NvaW4AB/Ir7eI3oH4SG1bZGkket7zf0fWQeSap5YM4+WSgGxf6BWFzc2V0BFVTREMAAggA4fUFAAAAAAgAAAAAAAAAAOgDAAAAAAAAZAAAAAAAAADXZCpnAAAAAAE=",
"referenceId": "ad8bf08874b74aa3ab28e07d08817833"
}
}
/addliquidity
Add liquidity to a specified pool in a specified DEX.
POST
https://api.expand.network/dex/addliquidity
Request Body
{
"dexId": "1200",
"tokenA": "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
"tokenB": "0xCC42724C6683B7E57334c4E856f4c9965ED682bD",
"amountADesired": "50000000000000000",
"amountBDesired": "77926115",
"amountAMin": "0",
"amountBMin": "0",
"to": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"deadline": "1663181575",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"gas": "2307200"
}
{
"status": 200,
"msg": "success",
"data": {
"chainId": "56",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"to": "0x10ED43C718714eb63d5aA57B78B54704E256024E",
"value": "0",
"gas": "2307200",
"data": "0xe8e33700000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c000000000000000000000000cc42724c6683b7e57334c4e856f4c9965ed682bd00000000000000000000000000000000000000000000000000b1a2bc2ec500000000000000000000000000000000000000000000000000000000000004a50ee30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000063056e00436da25bcf48a40dfbbdcc70893510060000000000000000000000000000000000000000000000000000000063222307",
"referenceId": "a2e6a4c61ef14fcc9edfe40b28866b2e"
}
}
With gasPriority:
{
"dexId": "1200",
"tokenA": "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
"tokenB": "0xCC42724C6683B7E57334c4E856f4c9965ED682bD",
"amountADesired": "50000000000000000",
"amountBDesired": "77926115",
"amountAMin": "0",
"amountBMin": "0",
"to": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"deadline": "1663181575",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"gas": "2307200",
"gasPriority": "medium"
}
With gasPriority:
{
"status": 200,
"msg": "success",
"data": {
"chainId": "56",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"to": "0x10ED43C718714eb63d5aA57B78B54704E256024E",
"value": "0",
"gas": "2307200",
"data": "0xe8e33700000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c000000000000000000000000cc42724c6683b7e57334c4e856f4c9965ed682bd00000000000000000000000000000000000000000000000000b1a2bc2ec500000000000000000000000000000000000000000000000000000000000004a50ee30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000063056e00436da25bcf48a40dfbbdcc70893510060000000000000000000000000000000000000000000000000000000063222307",
"gasPrice": "1200000000",
"referenceId": "a156e92fdc4c46b083decc0d54f2d511"
}
}
Request Body for APTOS
{
"amountIn": ["10000000","15299"],
"from": "0x1c3266eca38df87026255884192b5979eac24cf0dac7a33cfa7af0d27651fb4c",
"path": [
"0x1::aptos_coin::AptosCoin",
"0xf22bede237a07e121b56d91a491eb7bcdfd1f5907926a9e58338f964a01b17fa::asset::USDC"
],
"slippage": "100",
"dexId": "2900",
"gas":"1000"
}
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1400",
"from": "0x1c3266eca38df87026255884192b5979eac24cf0dac7a33cfa7af0d27651fb4c",
"to": "0xc7efb4076dbe143cbcd98cfaaa929ecfc8f299203dfff63b95ccb6bfe19850fa",
"data": "HDJm7KON+HAmJViEGStZeerCTPDax6M8+nrw0nZR+0x0mwAAAAAAAALH77QHbb4UPLzZjPqqkp7PyPKZID3/9juVzLa/4ZhQ+gZyb3V0ZXINYWRkX2xpcXVpZGl0eQIHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEKYXB0b3NfY29pbglBcHRvc0NvaW4AB/Ir7eI3oH4SG1bZGkket7zf0fWQeSap5YM4+WSgGxf6BWFzc2V0BFVTREMABAiAlpgAAAAAAAjDOwAAAAAAAAgAAAAAAAAAAAgAAAAAAAAAAOgDAAAAAAAAZAAAAAAAAABGZypnAAAAAAE=",
"referenceId": "5eda11210b804dceb98d5edc2b95d39f"
}
}
/removeliquidity
Remove liquidity from a specified pool for a specified DEX.
POST
https://api.expand.network/dex/removeliquidity
Request Body
{
"dexId": "1200",
"tokenA": "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
"tokenB": "0xCC42724C6683B7E57334c4E856f4c9965ED682bD",
"liquidity": "163742355742154761",
"amountAMin": "0",
"amountBMin": "0",
"to": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"deadline": "1663231732",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"gas": "842720"
}
{
"status": 200,
"msg": "success",
"data": {
"chainId": "56",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"to": "0x10ED43C718714eb63d5aA57B78B54704E256024E",
"value": "0",
"gas": "842720",
"data": "0xbaa2abde000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c000000000000000000000000cc42724c6683b7e57334c4e856f4c9965ed682bd0000000000000000000000000000000000000000000000000245bace14b260090000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000063056e00436da25bcf48a40dfbbdcc7089351006000000000000000000000000000000000000000000000000000000006322e6f4",
"referenceId": "ae5c692da558439f957a79b02f643ff3"
}
}
With gasPriority:
{
"dexId": "1200",
"tokenA": "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
"tokenB": "0xCC42724C6683B7E57334c4E856f4c9965ED682bD",
"liquidity": "163742355742154761",
"amountAMin": "0",
"amountBMin": "0",
"to": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"deadline": "1703231732",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"gas": "842720",
"gasPriority": "medium"
}
With gasPriority:
{
"status": 200,
"msg": "success",
"data": {
"chainId": "56",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"to": "0x10ED43C718714eb63d5aA57B78B54704E256024E",
"value": "0",
"gas": "842720",
"data": "0xbaa2abde000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c000000000000000000000000cc42724c6683b7e57334c4e856f4c9965ed682bd0000000000000000000000000000000000000000000000000245bace14b260090000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000063056e00436da25bcf48a40dfbbdcc708935100600000000000000000000000000000000000000000000000000000000658540f4",
"gasPrice": "1200000000",
"referenceId": "e26f31fe348b4e0f908d43a0bbee737b"
}
}
Request Body for APTOS
{
"liquidity": "1000",
"from": "0x1c3266eca38df87026255884192b5979eac24cf0dac7a33cfa7af0d27651fb4c",
"path": [
"0x1::aptos_coin::AptosCoin",
"0xf22bede237a07e121b56d91a491eb7bcdfd1f5907926a9e58338f964a01b17fa::asset::USDC"
],
"slippage": "10",
"dexId": "2900",
"gas":"1000"
}
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1400",
"from": "0x1c3266eca38df87026255884192b5979eac24cf0dac7a33cfa7af0d27651fb4c",
"to": "0xc7efb4076dbe143cbcd98cfaaa929ecfc8f299203dfff63b95ccb6bfe19850fa",
"data": "HDJm7KON+HAmJViEGStZeerCTPDax6M8+nrw0nZR+0x1mwAAAAAAAALH77QHbb4UPLzZjPqqkp7PyPKZID3/9juVzLa/4ZhQ+gZyb3V0ZXIQcmVtb3ZlX2xpcXVpZGl0eQIHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEKYXB0b3NfY29pbglBcHRvc0NvaW4AB/Ir7eI3oH4SG1bZGkket7zf0fWQeSap5YM4+WSgGxf6BWFzc2V0BFVTREMAAwjoAwAAAAAAAAgAAAAAAAAAAAgAAAAAAAAAAOgDAAAAAAAAZAAAAAAAAACnaCpnAAAAAAE=",
"referenceId": "74b41523d0d74d21920f02974ece488a"
}
}
Last updated