expand.network
  • Overview
  • Getting Started
  • 🔑How do I get my API Key?
  • 📑List of All Endpoints
  • ⚙️SDK
    • Overview
    • Getting Started
  • ⛓️INTEGRATIONS
    • ⚡Blockchains
      • EVM based blockchains
        • Ethereum
        • Binance Smart Chain
        • Avalanche - C
        • Avalanche - P
        • Avalanche - X
        • Polygon
        • Cronos
        • Arbitrum
        • Fantom
        • Optimism
        • Base
        • zkSync Era
        • Mantle
      • Non-EVM based chains
        • Tron
        • Solana
        • Near
        • Algorand
        • Aptos
        • Sui
        • Starknet
        • TON
        • Cosmos Hub
        • Osmosis
        • Stacks
        • Bitcoin
        • Stellar
          • Stellar RWA
        • XRP Ledger
          • XRP Ledger RWA
    • ⚡Bridges
      • Stargate
      • Stargate V2
      • Squid Router
      • Squid Router V2
      • Allbridge Classic
      • Allbridge Core
    • ⚡DEX & DEX Aggregators
      • Uniswap V2
      • Uniswap V3
      • Uniswap X
      • Sushiswap V2
      • PancakeSwap V2
      • PancakeSwap V3
      • Aerodrome
      • Camelot V3
      • Curve V2
      • Balancer V2
      • STON.fi
      • Trader Joe
      • Orca
      • Raydium
      • SDEX
      • Cetus
      • REF Finance
      • Liquidswap
      • Sologenic
      • Alex
      • 0x (Aggregator)
      • 1inch (Aggregator)
      • Kyberswap (Aggregator)
        • Kyberswap ( Limit Order Endpoints )
      • Jupiter (Aggregator)
    • ⚡Derivatives
      • dYdX V4
    • ⚡Fungible Tokens
      • ERC20
      • WETH
    • ⚡Lending Protocols
      • Aave V2
      • Aave V3
      • Compound V2
      • Compound V3
      • Morpho
    • ⚡Yield Aggregators
      • Yearn Finance V2
      • Harvest Finance
      • Pendle
    • ⚡Liquid Staking
      • Chorus One
      • Lido V2
      • Stader
      • Benqi
      • Jito
      • EigenLayer
    • ⚡Non Fungible Tokens
      • ERC721
      • ERC1155
      • Metaplex
    • ⚡Oracles
      • ChainLink
      • WinkLink
      • Pyth Network
      • RedStone
    • ⚡Stablecoins
      • EVM
    • ⚡Synthetics
      • Synthetix
    • ⚡Supported Wallets
      • MPC Wallets
        • DFNS
        • FORDEFI
        • FIREBLOCKS
        • CIRCLE
      • HD Wallets
        • PHANTOM
        • COINBASE
        • TON Wallet
      • Wallet Connect v2
  • How To
    • Execute a Local Swap
    • Execute a Cross Chain Swap
    • Use Limit Orders
    • Lend and Borrow
    • Provision Liquidity
      • Adding Liquidity
      • Removing liquidity
    • Yield Farm
    • Use Our Transaction Decoder
    • Submit an RFQ
    • Subscribe to Events
    • Stream Data (WebSocket)
      • Stream Transaction
      • Stream Trade
      • Stream Gas
      • Stream Ticker Price
    • Source Pricing
    • Track Memecoins
    • Manage Token Approvals
  • Use Cases
    • Trade Reconciliation
    • Portfolio Management
    • Trading Features
    • On-Chain Data: DEX Liquidity Pool Forensics
    • Transaction and Pool Analysis
  • Account Abstraction
    • Overview
      • User Endpoints
      • Paymaster Endpoint
      • Bundler Endpoint
    • ⚙️SDK - Overview
  • Additional Info
    • Error Messages
    • Client-Side Security Essentials
    • Compute Unit Costs
    • API Metadata
    • Audit Certificate
    • Brand Assets
    • FAQs
    • Quicknode Marketplace
      • DEX
      • Lending Protocols
  • ID's
    • Chain IDs
    • Bridge IDs
      • Internal Chain IDs for Bridges
    • DEX IDs
    • Lending Protocol IDs
    • Yield Aggregator ID
    • Liquid Staking IDs
    • Oracle IDs
    • Stablecoin IDs
    • Derivatives IDs
    • Synthetics IDs
  • Mapping
    • Blockchains
    • DEXs
      • Uniswap V2
      • Uniswap V3
      • Sushiswap
      • PancakeSwap
      • Curve
      • Balancer
    • Lending Protocols
      • Aave
      • Compound
  • Protocol Spender
    • Spender list
Powered by GitBook
On this page
  • /getprice
  • /getuserliquidity
  • /getpoolliquidity
  • /gettokenliquidity
  • /getliquidityholders
  • /swap
  • /addliquidity
  • /removeliquidity
  1. INTEGRATIONS
  2. DEX & DEX Aggregators

SDEX

/getprice

Returns the swap quotation for a given token pair.

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

Query Parameter

Name
Type
Description

rpc

String

Remote procedural call URL.

dexId*

String

amountIn*

String

Amount of token.

path*

String

Comma separated values of token addresses whose price is to be fetched.

https://api.expand.network/dex/getprice?dexId=2400&amountIn=100000000000000000&path=yUSDC%3AGDGTVWSM4MGS4T7Z6W4RPWOCHE2I6RDFCIFZGS3DOA63LWQTRNZNTTFF%2CXLM
{
    "status": 200,
    "msg": "success",
    "data": {
        "amountIn": "100000000000000000",
        "path": [
            "yUSDC:GDGTVWSM4MGS4T7Z6W4RPWOCHE2I6RDFCIFZGS3DOA63LWQTRNZNTTFF",
            "XLM"
        ],
        "amountsOut": [
            "100000000000000000",
            "6403037405751"
        ]
    }
}

/getuserliquidity

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

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

Query Parameter

Name
Type
Description

rpc

String

Remote procedural call URL.

dexId*

String

address*

String

Public address of liquidity provider.

path*

String

Comma separated values of token addresses whose price is to be fetched. Note: 1) Assets should be in lexicographic order. 2) For assets other than XLM (Native token), the token issuer is required.

https://api.expand.network/dex/getuserliquidity?address=GDZUSPMPAWY3JF6J4BEC7RVVVOUKCQZJRVA4NAA6HCS2GRG57DIMGCW3&dexId=2400&path=XBTC%3AGA7JNTXAHMMDUTLX72UM5PWHOAMJEDUQ6GREQZBLMAPVF5WM2JH4XBTC%2CyXLM%3AGARDNV3Q7YGT4AKSDF25LT32YSCCW4EV22Y2TV3I2PU2MMXJTEDL5T55
{
    "status": 200,
    "msg": "success",
    "data": {
        "pairAddress": "fd2b4dbb80fe7e2a93caf8ff42b1c6cc74c1c2b9c0b7cc41e1c21955b01fc1f5",
        "liquidity": "31306548835",
        "tokenA": "319735818813889",
        "tokenB": "11224502"
    }
}

/getpoolliquidity

Returns the total liquidity for a specified pool.

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

Query Parameter

Name
Type
Description

rpc

String

Remote procedural call URL.

dexId*

String

poolAddress*

String

Pool address whose liquidity is to be fetched.

https://api.expand.network/dex/getpoolliquidity?poolAddress=ffff7fe3743b3c63b12e80f22aed5e8799aa986e25fe155a19277b660d547e71&dexId=2400
{
    "status": 200,
    "msg": "success",
    "data": {
        "totalLiquidity": "313065488356"
    }
}

/gettokenliquidity

Returns the individual token liquidity within the specified liquidity pool.

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

Query Parameter

Name
Type
Description

rpc

String

Remote procedural call URL.

dexId*

String

poolAddress*

String

Pool address whose liquidity is to be fetched.

https://api.expand.network/dex/gettokenliquidity?poolAddress=843659d3962c3193a16388d60702e725940d36ec534727dc2308e8e7e427dbdd&dexId=2400
{
    "status": 200,
    "msg": "success",
    "data": {
        "native": "222295315",
        "BTC:GBWCFQGDIUJ35X3VTUDB2LHCJFIPZJGDE3XOGMKPWA2D3EZPL2LBNBTC": "2467709804653380"
    }
}

/getliquidityholders

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

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

Query Parameter

Name
Type
Description

rpc

String

Remote procedural call URL.

dexId*

String

poolAddress*

String

Pool address whose liquidity is to be fetched.

https://api.expand.network/dex/getliquidityholders?poolAddress=66b2286fa2cabdf1914abea058e3a18b1267643d818ae76dc1a5994fb22b9886&dexId=2400
{
    "status": 200,
    "msg": "success",
    "data": {
        "totalTokenHolders": "803"
    }
}

/swap

Initiate a swap transaction on a specified DEX.

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

Request Body

Name
Type
Description

rpc

String

Remote procedural call URL.

dexId*

String

path*

String

Comma-separated values of token addresses, inside an array, to swap. Note: For assets other than XLM (Native token), the token issuer is required.

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.

slippage

String

Percentage of total swap value. By default, 1.

0 <= slippage value <= 10

{
    "amountIn": "150000000",
    "amountOutMin": "12",
    "from": "GARNHXH36IUZE4F5MON5XBQX37OGVFGCOPOPN7CPQL3TP7VX2XI35QUJ",
    "slippage": "10",
    "dexId": "2400",
    "path": [
      "XLM",
      "apUSDC:GALLBRBQHAPW5FOVXXHYWR6J4ZDAQ35BMSNADYGBW25VOUHUYRZM4XIL"
    ]
}
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1500",
        "from": "GARNHXH36IUZE4F5MON5XBQX37OGVFGCOPOPN7CPQL3TP7VX2XI35QUJ",
        "gas": "100",
        "data": "AAAAAgAAAAAi09z78imScL1jm9uGF9/capTCc9z2/E+C9zf+t9XRvgAAAGQDC8UiAAAACQAAAAEAAAAAAAAAAAAAAABmxhT0AAAAAAAAAAEAAAAAAAAADQAAAAAAAAAACPDRgAAAAAAi09z78imScL1jm9uGF9/capTCc9z2/E+C9zf+t9XRvgAAAAJhcFVTREMAAAAAAAAAAAAAFrDEMDgfbpXVvc+LR8nmRghvoWSaAeDBtrtXUPTEcs4AAAAAAAAACwAAAAAAAAAAAAAAAA==",
        "referenceId": "3b37b58444cf4d8fbdf81437adf4d547"
    }
}

/addliquidity

Add liquidity to a specified pool in a specified DEX.

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

Request Body

Name
Type
Description

rpc

String

Remote procedural call URL.

dexId*

String

path*

String

Comma-separated values of token addresses, inside an array, to swap. Note: For assets other than XLM (Native token), the token issuer is required.

amountIn*

String

Amount of token to be swapped.

slippage

String

Percentage of total swap value. By default, 1.

0 <= slippage value <= 10

from*

String

Address of the sender of the token.

{
    "dexId": "2400",
    "amountIn": [
        "1000000",
        "1000000"
    ],
    "from": "GARNHXH36IUZE4F5MON5XBQX37OGVFGCOPOPN7CPQL3TP7VX2XI35QUJ",
    "path": [
        
        "XBTC:GA7JNTXAHMMDUTLX72UM5PWHOAMJEDUQ6GREQZBLMAPVF5WM2JH4XBTC",
        "yXLM:GARDNV3Q7YGT4AKSDF25LT32YSCCW4EV22Y2TV3I2PU2MMXJTEDL5T55"
    ],
    "slippage": "10"
}
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1500",
        "from": "GARNHXH36IUZE4F5MON5XBQX37OGVFGCOPOPN7CPQL3TP7VX2XI35QUJ",
        "gas": "100",
        "data": "AAAAAgAAAAAi09z78imScL1jm9uGF9/capTCc9z2/E+C9zf+t9XRvgAAAZADC8UiAAAACQAAAAEAAAAAAAAAAAAAAABmxhUEAAAAAAAAAAQAAAAAAAAABgAAAAMAAAAAAAAAAVhCVEMAAAAAPpbO4DsYOk13/qjOvsdwGJIOkPGiSGQrYB9S9szST8sAAAABeVhMTQAAAAAiNtdw/g0+AVIZddXPesSEK3CV1rGp12jT6aYy6ZkGvgAAAB4AAAAAfSt1AAAAAAAAAAAGAAAAAVhCVEMAAAAAPpbO4DsYOk13/qjOvsdwGJIOkPGiSGQrYB9S9szST8sAAAAAAA9CQAAAAAAAAAAGAAAAAXlYTE0AAAAAIjbXcP4NPgFSGXXVz3rEhCtwldaxqddo0+mmMumZBr4AAAAAAA9CQAAAAAAAAAAW/StNu4D+fiqTyvj/QrHGzHTBwrnAt8xB4cIZVbAfwfUAAAAAAA9CQAAAAAAAD0JAAAAAAQAAAAoAAAATAAAACgAAAAAAAAAA",
        "referenceId": "aae58191213a4f7c89e1511487e02946"
    }
}

/removeliquidity

Remove liquidity from a specified pool for a specified DEX.

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

Request Body

Name
Type
Description

rpc

String

Remote procedural call URL.

dexId*

String

path*

String

Comma-separated values of token addresses, inside an array, to swap. Note: For assets other than XLM (Native token), the token issuer is required.

amountOutMin*

String

Minimum amount to be received.

slippage

String

Percentage of total swap value. By default, 1.

0 <= slippage value <= 10

from*

String

Address of the sender of the token.

liquidity*

String

The liquidity to be removed.

{
    "dexId": "2400",
    "from": "GARNHXH36IUZE4F5MON5XBQX37OGVFGCOPOPN7CPQL3TP7VX2XI35QUJ",
    "path": [
        "XBTC:GA7JNTXAHMMDUTLX72UM5PWHOAMJEDUQ6GREQZBLMAPVF5WM2JH4XBTC",
        "yXLM:GARDNV3Q7YGT4AKSDF25LT32YSCCW4EV22Y2TV3I2PU2MMXJTEDL5T55"
    ],
    "liquidity": "100000",
    "amountOutMin": [
        "32",
        "32"
    ],
    "slippage": "10"
}
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1500",
        "from": "GARNHXH36IUZE4F5MON5XBQX37OGVFGCOPOPN7CPQL3TP7VX2XI35QUJ",
        "gas": "100",
        "data": "AAAAAgAAAAAi09z78imScL1jm9uGF9/capTCc9z2/E+C9zf+t9XRvgAAAGQDC8UiAAAACQAAAAEAAAAAAAAAAAAAAABmxhUUAAAAAAAAAAEAAAAAAAAAF/0rTbuA/n4qk8r4/0Kxxsx0wcK5wLfMQeHCGVWwH8H1AAAAAAABhqAAAAAAAAAAHQAAAAAAAAAdAAAAAAAAAAA=",
        "referenceId": "83a42ff85f7045829ec2f8809102caa6"
    }
}
PreviousRaydiumNextCetus

Last updated 5 months ago

Refer to the page for details.

Refer to the page for details.

Refer to the page for details.

Refer to the page for details.

Refer to the page for details.

Refer to the page for details.

Refer to the page for details.

Refer to the page for details.

⛓️
⚡
DEX ID
DEX ID
DEX ID
DEX ID
DEX ID
DEX ID
DEX ID
DEX ID