STON.fi

/getprice

Returns the swap quotation for the given token pairs.

GET https://api.expand.network/dex/getprice

Query Parameters

NameTypeDescription

rpc

String

Remote procedural call URL.

dexId*

String

Refer to the DEX ID page for details.

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=2300&path=EQBynBO23ywHy_CgarY9NK9FTz0yDsG82PtcbSTQgGoXwiuA,EQB5Wjo7yXdaB70yBoN2YEv8iVPjAdMObf_Dq40ELLaPllNb&amountIn=1

/getuserliquidity

Returns the balance of a particular token pair of an account.

GET https://api.expand.network/dex/getuserliquidity

Query Parameters

NameTypeDescription

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.

https://api.expand.network/dex/getuserliquidity?tokenA=EQBT2Ee4Lx5w9uI7oMly5upXNs3ABWL_Fwk1uiM74gZCGaYt&tokenB=EQC47093oX5Xhb0xuk2lCr2RhS8rj-vul61u4W2UH5ORmG_O&address=UQAAjw7MBB_2-DvNKsjtOAPJBeqTK8iiDl8Xyv37zbIRbKrt&dexId=2300

/getpoolliquidity

Returns the total liquidity for a specified pool.

GET https://api.expand.network/dex/getpoolliquidity

Query Parameters

NameTypeDescription

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?poolAddress=EQAZFS5dJ8STrKcn5VnptYsoKILXbAYaDhdJJjbzUrNkDdH_&dexId=2300

/gettokenliquidity

Returns the individual token liquidity within the specified liquidity pool.

GET https://api.expand.network/dex/gettokenliquidity

Query Parameters

NameTypeDescription

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?poolAddress=EQD1c0gDs91J-9FzeiC_V9VbizFxDUs09P6eIO4Fe4l2WDbm&dexId=2300

/getliquidityholders

Returns the total number of liquidity holders in the specified pool.

GET https://api.expand.network/dex/getliquidityholders

Query Parameters

NameTypeDescription

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?poolAddress=EQAZFS5dJ8STrKcn5VnptYsoKILXbAYaDhdJJjbzUrNkDdH_&dexId=2300

/swap

Initiate a swap transaction on a specified DEX.

POST https://api.expand.network/dex/swap

Request Body

NameTypeDescription

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 the 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.

involveBaseToken

String

If a base token is involved in the swap; 0 for jetton -> jetton, 1 for native -> jetton, 2 for jetton -> native.

By default, 0 .

slippage

String

Percentage of total swap value. By default, 1.

0 <= slippage value <= 10

referralAddress

String

The referral address.

queryId

String

The query id, used to identify your transaction.

{
    "dexId": "2300",
    "amountIn": "100",
    "amountOutMin": "0",
    "path": [
        "EQBynBO23ywHy_CgarY9NK9FTz0yDsG82PtcbSTQgGoXwiuA",
        "EQA2kCVNwVsil2EM2mB0SkXytxCqQjS4mttjDpnXmwG9T6bO"
    ],
    "from": "UQAxmMo2wxu_yQTySoV7u7-Con2csmcBloW0CrflBCQEr-7R",
    "referralAddress": "UQAxmMo2wxu_yQTySoV7u7-Con2csmcBloW0CrflBCQEr-7R",
    "queryId": "1",
    "involveBaseToken": "0",
    "gas": "123"
}

With Slippage:

{
    "dexId": "2300",
    "amountIn": "100",
    "amountOutMin": "0",
    "path": [
        "EQBynBO23ywHy_CgarY9NK9FTz0yDsG82PtcbSTQgGoXwiuA",
        "EQA2kCVNwVsil2EM2mB0SkXytxCqQjS4mttjDpnXmwG9T6bO"
    ],
    "from": "UQAxmMo2wxu_yQTySoV7u7-Con2csmcBloW0CrflBCQEr-7R",
    "referralAddress": "UQAxmMo2wxu_yQTySoV7u7-Con2csmcBloW0CrflBCQEr-7R",
    "queryId": "1",
    "slippage": "10",
    "involveBaseToken": "0",
    "gas": "123"
}

/addliquidity

Add liquidity to a specified pool in a specified DEX.

POST https://api.expand.network/dex/addliquidity

Request Body

NameTypeDescription

dexId*

String

Refer to the DEX ID page for details.

tokenA*

String

Address of the first token being added.

tokenB*

String

Address of the second token being added.

amountADesired*

String

Desired amount of token A.

amountBDesired*

String

Desired amount of token B.

amountAMin*

String

Minimum amount of token A.

amountBMin*

String

Minimum amount of token B.

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

queryId

String

The query id, used to identify your transaction.

{
    "dexId": "2300",
    "tokenA": "EQBynBO23ywHy_CgarY9NK9FTz0yDsG82PtcbSTQgGoXwiuA",
    "tokenB": "EQA2kCVNwVsil2EM2mB0SkXytxCqQjS4mttjDpnXmwG9T6bO",
    "amountADesired": "1100",
    "amountBDesired": "411858",
    "amountAMin": "1",
    "amountBMin": "1",
    "queryId": "166978170",
    "from": "UQAxmMo2wxu_yQTySoV7u7-Con2csmcBloW0CrflBCQEr-7R",
    "gas": "230000"
}

With Slippage:

{
    "dexId": "2300",
    "tokenA": "EQBynBO23ywHy_CgarY9NK9FTz0yDsG82PtcbSTQgGoXwiuA",
    "tokenB": "EQA2kCVNwVsil2EM2mB0SkXytxCqQjS4mttjDpnXmwG9T6bO",
    "amountADesired": "1100",
    "amountBDesired": "411858",
    "amountAMin": "1",
    "amountBMin": "1",
    "slippage": "1",
    "queryId": "166978170",
    "from": "UQAxmMo2wxu_yQTySoV7u7-Con2csmcBloW0CrflBCQEr-7R",
    "gas": "230000"
}

/removeliquidity

Remove liquidity from a specified pool for a specified DEX.

POST https://api.expand.network/dex/removeliquidity

Request Body

NameTypeDescription

dexId*

String

Refer to the DEX ID page for details.

tokenA*

String

Address of the first token being removed.

tokenB*

String

Address of the second token being removed.

liquidity*

String

Total amount of liquidity to be removed from the given pool.

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.

queryId

String

The query id, used to identify your transaction.

{
    "dexId": "2300",
    "tokenA": "EQBynBO23ywHy_CgarY9NK9FTz0yDsG82PtcbSTQgGoXwiuA",
    "tokenB": "EQA2kCVNwVsil2EM2mB0SkXytxCqQjS4mttjDpnXmwG9T6bO",
    "liquidity": "20",
    "queryId": "0",
    "from": "UQAxmMo2wxu_yQTySoV7u7-Con2csmcBloW0CrflBCQEr-7R",
    "gas": "230000"
}

Last updated

#553: ENC-2526-LIDO

Change request updated