/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?path=So11111111111111111111111111111111111111112,EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&amountIn=100000&dexId=2500
{
"status": 200,
"msg": "success",
"data": {
"amountIn": "100000",
"path": [
"So11111111111111111111111111111111111111112",
"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
],
"amountsOut": [
"100000",
"16887"
]
}
}
/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?dexId=2500&positionNFT=45z3G8PxyTuFa9tbr9QMmscGVHvZir4vQK1U5LRKeSQd
{
"status": 200,
"msg": "success",
"data": {
"positionNFT": "45z3G8PxyTuFa9tbr9QMmscGVHvZir4vQK1U5LRKeSQd",
"liquidity": "479818718",
"tokenA": "37396067",
"tokenB": "60553520"
}
}
/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=2500&poolAddress=Hp53XEtt4S8SvPCXarsLSdGfZBuUr5mMmZmX2DRNXQKp
{
"status": 200,
"msg": "success",
"data": {
"totalLiquidity": "279772744620096455"
}
}
/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=2500&poolAddress=8phK65jxmTPEN158xLgSr4oZvssw9SyTErpNZj3g7px4
{
"status": 200,
"msg": "success",
"data": {
"SOL": "5322375483983",
"bSo13r4TkiE4KumL71LsHTPpL2euBYLFx6h9HP3piy1": "22791743147075"
}
}
/swap
Initiate a swap transaction on a specified DEX.
POST
https://api.expand.network/dex/swap
Request Body
{
"dexId": "2500",
"from": "6r3DSYWNRw437o6cZfe9CnygqoeFDZbnxiqf5xhFMMD9",
"amountIn": "100000",
"closeWSolAccount": false,
"path": [
"So11111111111111111111111111111111111111112",
"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"
]
}
{
"status": 200,
"msg": "success",
"data": {
"chainId": "900",
"from": "6r3DSYWNRw437o6cZfe9CnygqoeFDZbnxiqf5xhFMMD9",
"to": "whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc",
"data": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAYNVtpl8POZ0xSmnip918JAP2s4C8zuKOSvcufD/BU4AFBepPxHNefL9YwJYgNOb0o4xCm3Lov/fWjGxQTCgIOa0IbZXG8GwNAiiSt7zweHFw1BGCusKj8tC//dDIn7Y+56lMthC2WflKoBh1VmZ4e4IJH/3p3doAciTYfdF4M2+MaYNcB/TmTZaFqUQToaR2z6CMEE1iGBrnHHDUflJ71kYb4adiZd1OmZBusqiSjlYUolJWfwJb6CIMDHQQscLrUR3gPhC53oE8dClmlADPxIvu8CZMrNCAwh+bYGtjhcvKEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIyXJY9OJInxuz0QKRSODYMLWhOZ2v8QhASOe9jb6fhZpajhwAtNSA2GxLWleoIz8sZ6xYm4bCGYbf6MlWJvIpIGm4hX/quBhPtof2NGGMA12sQ53BrrO1WYoPAAAAAAAQbd9uHXZaGT2cvhRs7reawctIXtX1s3kTqM9YV+/wCpDgNoX46QkFPkWBIcZvWnau3HcGqhHIL4qpUqjyt4ean216u9TdRc/dpmjBGy5hSS58hkIHLdaFTeNyBc8pjClQQIBgAFAAoHCwAHAgAFDAIAAACghgEAAAAAAAsBBQERDAsLAAYFBAEDAgICCSr4xp6R4XWHyKCGAQAAAAAAwDYAAAAAAABQOwEAAQAAAAAAAAAAAAAAAQE=",
"referenceId": "cb4b64b1b54a481e85e87a492da45f49"
}
}
With Slippage:
{
"dexId": "2500",
"from": "6r3DSYWNRw437o6cZfe9CnygqoeFDZbnxiqf5xhFMMD9",
"amountIn": "100000",
"slippage": "3",
"path": [
"So11111111111111111111111111111111111111112",
"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"
]
}
With Slippage:
{
"status": 200,
"msg": "success",
"data": {
"chainId": "900",
"from": "6r3DSYWNRw437o6cZfe9CnygqoeFDZbnxiqf5xhFMMD9",
"to": "whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc",
"data": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAYNVtpl8POZ0xSmnip918JAP2s4C8zuKOSvcufD/BU4AFBepPxHNefL9YwJYgNOb0o4xCm3Lov/fWjGxQTCgIOa0IbZXG8GwNAiiSt7zweHFw1BGCusKj8tC//dDIn7Y+56lMthC2WflKoBh1VmZ4e4IJH/3p3doAciTYfdF4M2+MaYNcB/TmTZaFqUQToaR2z6CMEE1iGBrnHHDUflJ71kYb4adiZd1OmZBusqiSjlYUolJWfwJb6CIMDHQQscLrUR3gPhC53oE8dClmlADPxIvu8CZMrNCAwh+bYGtjhcvKEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIyXJY9OJInxuz0QKRSODYMLWhOZ2v8QhASOe9jb6fhZpajhwAtNSA2GxLWleoIz8sZ6xYm4bCGYbf6MlWJvIpIGm4hX/quBhPtof2NGGMA12sQ53BrrO1WYoPAAAAAAAQbd9uHXZaGT2cvhRs7reawctIXtX1s3kTqM9YV+/wCpDgNoX46QkFPkWBIcZvWnau3HcGqhHIL4qpUqjyt4ealzXN5b59bgz6SPtLOzbsB2VTx+5vVvTvlV5oc8KD4/5wQIBgAFAAoHCwAHAgAFDAIAAACghgEAAAAAAAsBBQERDAsLAAYFBAEDAgICCSr4xp6R4XWHyKCGAQAAAAAAJzUAAAAAAABQOwEAAQAAAAAAAAAAAAAAAQE=",
"referenceId": "80f7607613fd485389543466c56a532d"
}
}
/addliquidity
Add liquidity to a specified pool in a specified DEX.
POST
https://api.expand.network/dex/addliquidity
Request Body
{
"dexId": "2500",
"from": "6r3DSYWNRw437o6cZfe9CnygqoeFDZbnxiqf5xhFMMD9",
"amountIn": [
"100000",
"100000"
],
"path": [
"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"
]
}
{
"status": 200,
"msg": "success",
"data": {
"chainId": "900",
"from": "6r3DSYWNRw437o6cZfe9CnygqoeFDZbnxiqf5xhFMMD9",
"to": "whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc",
"positionNFT": "4jdtkCCzy5szqqPy6EyRWBcRpKnA1B1cowLg4foCSdK2",
"data": "AgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAFEFbaZfDzmdMUpp4qfdfCQD9rOAvM7ijkr3Lnw/wVOABQsfOiFyLplqXsjNd+Wxabz0hda685KctfQogjS1BX7zM16Ihsf5MisfzTwyjrjLU1xRNe+FMjL81KQs/iHPE+gjaKd+ulpv4PyVjdyfS4prEPvBs1A7XYgTG+s9RAdMMTN38rOZV2g16P6dKC0TizYH5zzQ5D+cr15A4i7nQ1F304fteoFh4Sj2MAndOGy1mxcxXcJpSqJC9rsam5rwfmTUMJ0joDUVWgc6VQWgLF0mLNEwI4K4U+oMZS6ImrDniUXqT8RzXny/WMCWIDTm9KOMQpty6L/31oxsUEwoCDmtBuJLJgYS6zQsoqLNnXe3on2he8XZI6A+Z0DaVUD6lnHbBYbGeABj5Nz1geq2VgDysQBfnSllJWDi2miS9iGiDutIrDOB2TpEph6dRhXOaiTlU9G6GC/0jZjEo5RTGQtcUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIyXJY9OJInxuz0QKRSODYMLWhOZ2v8QhASOe9jb6fhZBqfVFxksXFEhjMlMPUrxf1ja7gibof1E49vZigAAAAAG3fbh12Whk9nL4UbO63msHLSF7V9bN5E6jPWFfv8AqQ4DaF+OkJBT5FgSHGb1p2rtx3BqoRyC+KqVKo8reHmpYWUWqSghGo7MghMBGUb6A9w/JJrAfOfIZqGyAK3HMi0CDwoAAAQBBgMOCw0MEYeAL00PmPAx/gns//8jDQAADwsDDgAEBgoHBQIJCCgunPN2Dc37sovaCQAAAAAAAAAAAAAAAACghgEAAAAAAJ04AgAAAAAA",
"additionalSigners": "HQoJnK8oHeaGvE8jRmzCn3nr3qnabwpirZvxhm5L7aau9K3QvTYJaa53vHYsGTGYogWHMz8yyNBQ9cPP28h8Gbk",
"referenceId": "ca006bb595674902992771a1c11d7870"
}
}
With Slippage:
{
"dexId": "2500",
"from": "6r3DSYWNRw437o6cZfe9CnygqoeFDZbnxiqf5xhFMMD9",
"amountIn": [
"100000",
"100000"
],
"slippage": "3",
"path": [
"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"
]
}
With Slippage:
{
"status": 200,
"msg": "success",
"data": {
"chainId": "900",
"from": "6r3DSYWNRw437o6cZfe9CnygqoeFDZbnxiqf5xhFMMD9",
"to": "whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc",
"positionNFT": "3wXUwQEapeTzAEygEwXQYfznV18MrSH1nNdAbPbNBvx4",
"data": "AgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAFEFbaZfDzmdMUpp4qfdfCQD9rOAvM7ijkr3Lnw/wVOABQprbpHI1HlJAfAvlzhf5X8F379Qq5HbyvyFRyiiDrLoArrzQLVimeA2MfkJGrxaTpxa2Lcbqq9l9LtYVeGu/XjTXoiGx/kyKx/NPDKOuMtTXFE174UyMvzUpCz+Ic8T6CNop366Wm/g/JWN3J9LimsQ+8GzUDtdiBMb6z1EB0wxM4fteoFh4Sj2MAndOGy1mxcxXcJpSqJC9rsam5rwfmTUlTBtXyJncetZwvOL5Q4lg3rryxl7FTox0RM2HE6FbYXqT8RzXny/WMCWIDTm9KOMQpty6L/31oxsUEwoCDmtBuJLJgYS6zQsoqLNnXe3on2he8XZI6A+Z0DaVUD6lnHbBYbGeABj5Nz1geq2VgDysQBfnSllJWDi2miS9iGiDutIrDOB2TpEph6dRhXOaiTlU9G6GC/0jZjEo5RTGQtcUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIyXJY9OJInxuz0QKRSODYMLWhOZ2v8QhASOe9jb6fhZBqfVFxksXFEhjMlMPUrxf1ja7gibof1E49vZigAAAAAG3fbh12Whk9nL4UbO63msHLSF7V9bN5E6jPWFfv8AqQ4DaF+OkJBT5FgSHGb1p2rtx3BqoRyC+KqVKo8reHmpDXh+26+mRYSCx+2MZ2XUylWjMc5Xo/bYBsIYVIzSUswCDwoAAAIBBgQOCw0MEYeAL00PmPAx/wns//8jDQAADwsEDgACBgoHBQMJCCgunPN2Dc37sovaCQAAAAAAAAAAAAAAAABYkgEAAAAAAKtJAgAAAAAA",
"additionalSigners": "4wtzp48yxPTbPM9ZLyse2mbZWk7s3KnCwNsdyHRcKUJYpoWMEU98z3fjR1KasCVrqwAfC9necJz11zeHCA4NASRu",
"referenceId": "54ac39351ee94b4fa312025fe0208fdb"
}
}
/removeliquidity
Remove liquidity from a specified pool for a specified DEX.
POST
https://api.expand.network/dex/removeliquidity
Request Body
{
"dexId": "2500",
"from": "6r3DSYWNRw437o6cZfe9CnygqoeFDZbnxiqf5xhFMMD9",
"liquidity": "16056",
"positionNFT": "2mMzQ1s29HkC2b5VWiwWdciy7TUo2jx5BV1F2aXNYA2q",
"path": [
"So11111111111111111111111111111111111111112",
"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
]
}
{
"status": 200,
"msg": "success",
"data": {
"chainId": "900",
"from": "6r3DSYWNRw437o6cZfe9CnygqoeFDZbnxiqf5xhFMMD9",
"to": "whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc",
"data": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAMMVtpl8POZ0xSmnip918JAP2s4C8zuKOSvcufD/BU4AFAaOPm9IhrjvgNHo0MUbw17gpJGi/+43JHcSsJDP4fDVhZflXLFqWqlAt1REFSiam0ljvfB1tbBruEpGRTcUQIyh5IoWbAxpqPocPBaisXfUtRflvLedpwmqb4un2MOUqWyNpDX0HWNHV2LiVDOx6m018ea6P+1xroNvWKhmDeTW7SKwzgdk6RKYenUYVzmok5VPRuhgv9I2YxKOUUxkLXFvhp2Jl3U6ZkG6yqJKOVhSiUlZ/AlvoIgwMdBCxwutRG/QeYuOV6j2Wh+LxfGuroGHM1G+pzDBJb3SjDNuW8sCshN8kM4mDvkqFswl7r0C8lXEQjSiawAs2jfF11Edc96m+b82m2P2SiTZVAfxwv5FACLrsi3Xw6KU3bdnFw5RkgG3fbh12Whk9nL4UbO63msHLSF7V9bN5E6jPWFfv8AqQ4DaF+OkJBT5FgSHGb1p2rtx3BqoRyC+KqVKo8reHmpW1E7mSCPKy8b5yzr/9AjdhRJM/k2snOETZFMGiMrVOIBCwsECgABCQYFCAIHAyigJtBvaFssAbg+AAAAAAAAAAAAAAAAAAA1JAAAAAAAAN8DAAAAAAAA",
"referenceId": "ab5a5b4f948b4080a6eec68b634e20f6"
}
}
With Slippage:
{
"dexId": "2500",
"from": "6r3DSYWNRw437o6cZfe9CnygqoeFDZbnxiqf5xhFMMD9",
"liquidity": "16056",
"positionNFT": "2mMzQ1s29HkC2b5VWiwWdciy7TUo2jx5BV1F2aXNYA2q",
"path": [
"So11111111111111111111111111111111111111112",
"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
],
"slippage": "10"
}
With Slippage:
{
"status": 200,
"msg": "success",
"data": {
"chainId": "900",
"from": "6r3DSYWNRw437o6cZfe9CnygqoeFDZbnxiqf5xhFMMD9",
"to": "whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc",
"data": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAMMVtpl8POZ0xSmnip918JAP2s4C8zuKOSvcufD/BU4AFAaOPm9IhrjvgNHo0MUbw17gpJGi/+43JHcSsJDP4fDVhZflXLFqWqlAt1REFSiam0ljvfB1tbBruEpGRTcUQIyh5IoWbAxpqPocPBaisXfUtRflvLedpwmqb4un2MOUqWyNpDX0HWNHV2LiVDOx6m018ea6P+1xroNvWKhmDeTW7SKwzgdk6RKYenUYVzmok5VPRuhgv9I2YxKOUUxkLXFvhp2Jl3U6ZkG6yqJKOVhSiUlZ/AlvoIgwMdBCxwutRG/QeYuOV6j2Wh+LxfGuroGHM1G+pzDBJb3SjDNuW8sCshN8kM4mDvkqFswl7r0C8lXEQjSiawAs2jfF11Edc96m+b82m2P2SiTZVAfxwv5FACLrsi3Xw6KU3bdnFw5RkgG3fbh12Whk9nL4UbO63msHLSF7V9bN5E6jPWFfv8AqQ4DaF+OkJBT5FgSHGb1p2rtx3BqoRyC+KqVKo8reHmptQSzx3cbgGID+WQ2Ral+AmW46xBRwR7mKSXA/VDNV0kBCwsECgABCQYFCAIHAyigJtBvaFssAbg+AAAAAAAAAAAAAAAAAADqIAAAAAAAAIQDAAAAAAAA",
"referenceId": "e520830924b840b792dd53f33efd9a41"
}
}