LogoLogo
  • 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
  • /getbalance
  • /getblock
  • /getgasprice
  • /gettransaction
  • /getusertransactions
  • /portfolio
  • /getstakepositions
  1. INTEGRATIONS
  2. Blockchains
  3. Non-EVM based chains

TON

/getbalance

Get the balance or number of the given token in the requested public address.

GET https://api.expand.network/chain/getbalance

Query Parameters

Name
Type
Description

rpc

String

Remote procedural call URL

chainId*

String

chainSymbol

String

address*

String

The public address to get the balance of.

tokenAddress

String

The address of token to get the balance of.

https://api.expand.network/chain/getbalance/?address=UQAxmMo2wxu_yQTySoV7u7-Con2csmcBloW0CrflBCQEr-7R&chainId=1100
{
    "status": 200,
    "msg": "success",
    "data": {
        "balance": "496234820"
    }
}

/getblock

Get details of a block.

GET https://historicallp.api.expand.network/chain/getblock

Query Parameters

Name
Type
Description

rpc

String

Remote procedural call URL.

chainId*

String

chainSymbol

String

blockNumber*

String

The block(sequence) number.

https://historicallp.api.expand.network/chain/getblock?blockNumber=37530079&chainId=1100
{
  "status": 200,
  "msg": "success",
  "data": {
    "shards": [
      {
        "workchain": -1,
        "seqno": 37530079,
        "shard": "-9223372036854775808",
        "rootHash": "lzfewtlwNxzWAM2zwXXDDTwdQLopMh+gbVTTSWn84+M=",
        "fileHash": "gbj4ltNQ/I+uzMKdda6HjAzEEV338aNN6OSRSyN+TNo=",
        "transactions": [
          {
            "account": "Ef8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM0vF",
            "lt": "46117591000001",
            "hex": "cc351b1a06dbb2786081e46c20ae374dea3e3d8069020a5caaef085adcfb40b2",
            "transactionHash": "zDUbGgbbsnhggeRsIK43Teo+PYBpAgpcqu8IWtz7QLI="
          },
          {
            "account": "Ef8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM0vF",
            "lt": "46117591000002",
            "hex": "5044b5c128f592b20a74d2d35e90de7ba12eadc13333bb5d51d3a2265494ce36",
            "transactionHash": "UES1wSj1krIKdNLTXpDee6EurcEzM7tdUdOiJlSUzjY="
          },
          {
            "account": "Ef9VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVbxn",
            "lt": "46117591000003",
            "hex": "a434d5bb171a630afa7e1c6556ffb3d5f2325b4ea17d2dd46c9aca77ddac036b",
            "transactionHash": "pDTVuxcaYwr6fhxlVv+z1fIyW06hfS3UbJrKd92sA2s="
          }
        ]
      }
    ]
  }
}

/getgasprice

Get the current gas price from the network.

GET https://api.expand.network/chain/getgasprice

Query Parameters

Name
Type
Description

rpc

String

Remote procedural call URL.

chainId*

String

chainSymbol

String

https://api.expand.network/chain/getgasprice?chainId=1100
{
    "status": 200,
    "msg": "success",
    "data": {
        "gasPrice": "3308000"
    }
}

/gettransaction

Get details of a transaction.

GET https://api.expand.network/chain/gettransaction

Query Parameters

Name
Type
Description

rpc

String

Remote procedural call URL.

chainId*

String

chainSymbol

String

transactionHash*

String

The transaction(digest) hash.

address*

String

Sender's public address.

https://api.expand.network/chain/gettransaction?chainId=1100&transactionHash=whPbUe52HoCgrmkd9n1DpEmPC00rt5IqMb0NxdsjJec&address=UQAxmMo2wxu_yQTySoV7u7-Con2csmcBloW0CrflBCQEr-7R
{
    "status": 200,
    "msg": "success",
    "data": {
        "@type": "raw.transaction",
        "address": {
            "@type": "accountAddress",
            "account_address": "EQAxmMo2wxu_yQTySoV7u7-Con2csmcBloW0CrflBCQEr7MU"
        },
        "utime": 1707378056,
        "data": "te6cckECBwEAAaQAA7VzGYyjbDG7/JBPJKhXu7v4KifZyyZwGWhbQKt+UEJASvAAAoc6sapEOtKW9AAdZAcbY46vM/ezW4lAeTLXpAsgL2TzT+x1uW2wAAKHIDIuADZcSFiAABRh5/1oAQIDAQGgBACCcmg71vLS+ZR3K7oq8Ku7shAhrC5E1x4q4buP3YBxyUZiyJ9ah8PG0skx0/zqz2Am0tDouaGuy3fgOaxRurkruAsCFwyINMjD0JAYYePjEQUGANVIAPFLwHy4w4LZWhR+6u+SLQ0K7iJqOaEEMnHS76yXRXljAAxmMo2wxu/yQTySoV7u7+Con2csmcBloW0CrflBCQErzD0JAAYUWGAAAFDnVjVIhMuJCxAAAAAANDSQMzk3tpA0Mrawtzo0QACcQHvoD6AAAAAAAAAAAB0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFvAAAAAAAAAAAAAAAABLUUtpEnlC4z33SeGHxRhIq/htUa7i3D8ghbwxhQTn44E/NZboQ==",
        "transaction_id": {
            "@type": "internal.transactionId",
            "lt": "44477257000003",
            "hash": "HgLzLs1zrDiXTIEyLZG9LiKDoMVI/tfDZkn/8C0fA6A="
        },
        "fee": "999403",
        "storage_fee": "8403",
        "other_fee": "991000",
        "in_msg": {
            "@type": "raw.message",
            "source": "EQB4peA-XGHBbK0KP3V3yRaGhXcRNRzQghk46XfWS6K8sZn4",
            "destination": "EQAxmMo2wxu_yQTySoV7u7-Con2csmcBloW0CrflBCQEr7MU",
            "value": "1000000",
            "fwd_fee": "666672",
            "ihr_fee": "0",
            "created_lt": "44477257000002",
            "body_hash": "ZZQlYDzGKugPE21+I1c4bkJeaSpQoXGEHT4g6dEyJTE=",
            "msg_data": {
                "@type": "msg.dataText",
                "text": "aGkgZnJvbSBoZW1hbnRo"
            },
            "message": "Hello from expand.network"
        },
        "out_msgs": []
    }
}

/getusertransactions

Get the historical transaction details for a specific user address.

GET https://historicallp.api.expand.network/chain/getusertransactions

Query Parameters

Name
Type
Description

rpc

String

Remote procedural call URL.

chainId

String

chainSymbol

String

address*

String

The public address of the user.

limit

String

Maximum number of transactions in response. Maximum: 5

https://historicallp.api.expand.network/chain/getusertransactions?address=UQBmgNkHklxoS8WMjirAAuOkNNBZboTDWrjWORNA1Xv9EmRx&chainId=1100
{
  "status": 200,
  "msg": "success",
  "data": {
    "transactions": [
      {
        "@type": "raw.transaction",
        "address": {
          "@type": "accountAddress",
          "account_address": "EQBmgNkHklxoS8WMjirAAuOkNNBZboTDWrjWORNA1Xv9Ejm0"
        },
        "utime": 1714125058,
        "data": "te6cckECDAEAAwsAA7V2aA2QeSXGhLxYyOKsAC46Q00FluhMNauNY5E0DVe/0SAAAp8anhuoHRdrIfFGBWgJ0ujAJxaKJOm0ZMRehMSrUNJo94f6lKdQAAKfGiXx8DZit5AgADRlI2xoAQIDAgHgBAUAgnKNGWWE6qfORKwBzZkE3SbweVQTfssTCSXUd8ZS3azWqh0ZfkoBrB2WlXhhLDE+Pm1oC82fiMh2fu+ktRjwLyVrAg8MX0YYoYYEQAoLAeGIAM0Bsg8kuNCXixkcVYAFx0hpoLLdCYa1caxyJoGq9/okBfEp7mJ7p3/xL9HlN5+w0ib1jvNNsvB+ySMlgZibad1GFzLh0q1PUGBoe5ieue9BbsVLRENoj1IFe3ZeBryPOBlNTRi7MVvRUAAA3aAAHAYBAd8HAdViAAioWoxZMTVqjEz8xEP8QSW4AyorIq+/8UCfgJNM0gMPpgjz0AAAAAAAAAAAAAAAAAAAD4p+pQAaM4c3aZHJSy0F4AgA7zuZAqJxsqAciTilI8/iTnGEeq62piAAHtRKd6wOcJwQOThwAwkBsWgAzQGyDyS40JeLGRxVgAXHSGmgst0JhrVxrHImgar3+iUABFQtRiyYmrVGJn5iIf4gktwBlRWRV9/4oE/ASaZpAYfTBHnoAAYSYDQAAFPjU8N1BMxW8gTACAFtD4p+pQAaM4c3aZHJSy0F4AgA7zuZAqJxsqAciTilI8/iTnGEeq62piAAHtRKd6wOcJwQOThwAwkAmyWThWGAE/MfYd8/locz2KCBc6ZRFQsTITW89oBO3rJtNvV4fE1MAhOHaL8RABmgNkHklxoS8WMjirAAuOkNNBZboTDWrjWORNA1Xv9EkACdQZ2DE4gAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIABvyYbkEEwSYBgAAAAAAAIAAAAAAAO5PNSg+1BpnnaqhnojBcWdZ+wqfccJ/fUK1KOen//8pEDQNxwaDoEu",
        "transaction_id": {
          "@type": "internal.transactionId",
          "lt": "46117914000001",
          "hash": "8R5O0EmQPx7SfGNG8hC0/OeGII229QD23BqDZFUU9nA="
        },
        "fee": "3296125",
        "storage_fee": "125",
        "other_fee": "3296000",
        "in_msg": {
          "@type": "raw.message",
          "source": "",
          "destination": "EQBmgNkHklxoS8WMjirAAuOkNNBZboTDWrjWORNA1Xv9Ejm0",
          "value": "0",
          "fwd_fee": "0",
          "ihr_fee": "0",
          "created_lt": "0",
          "body_hash": "tGDq3Y4mgE4kxnExg+qCjK7/qmpYnK+RWGu0RzIYW/Q=",
          "msg_data": {
            "@type": "msg.dataRaw",
            "body": "te6cckECAwEAAQ8AAZy+JT3MT3Tv/iX6PKbz9hpE3rHeabZeD9kkZLAzE207qMLmXDpVqeoMDQ9zE9c96C3YqWiIbRHqQK9uy8DXkecDKamjF2YreioAABu0AAMBAdViAAioWoxZMTVqjEz8xEP8QSW4AyorIq+/8UCfgJNM0gMPpgjz0AAAAAAAAAAAAAAAAAAAD4p+pQAaM4c3aZHJSy0F4AgA7zuZAqJxsqAciTilI8/iTnGEeq62piAAHtRKd6wOcJwQOThwAwIAmyWThWGAE/MfYd8/locz2KCBc6ZRFQsTITW89oBO3rJtNvV4fE1MAhOHaL8RABmgNkHklxoS8WMjirAAuOkNNBZboTDWrjWORNA1Xv9EkOY8aAY=",
            "init_state": ""
          },
          "message": "viU9zE907/4l+jym8/YaRN6x3mm2Xg/ZJGSwMxNtO6jC5lw6VanqDA0PcxPXPegt2KloiG0R6kCv\nbsvA15HnAympoxdmK3oqAAAbtAAD\n"
        },
        "out_msgs": [
          {
            "@type": "raw.message",
            "source": "EQBmgNkHklxoS8WMjirAAuOkNNBZboTDWrjWORNA1Xv9Ejm0",
            "destination": "EQARULUYsmJq1RiZ-YiH-IJLcAZUVkVff-KBPwEmmaQGH6aC",
            "value": "3240000000",
            "fwd_fee": "602138",
            "ihr_fee": "0",
            "created_lt": "46117914000002",
            "body_hash": "qT1itc3NrlKqjJjCe4ZZVysIaR8THuAhj4o3Z0had/0=",
            "msg_data": {
              "@type": "msg.dataRaw",
              "body": "te6cckEBAgEAigABbQ+KfqUAGjOHN2mRyUstBeAIAO87mQKicbKgHIk4pSPP4k5xhHqutqYgAB7USnesDnCcEDk4cAMBAJslk4VhgBPzH2HfP5aHM9iggXOmURULEyE1vPaATt6ybTb1eHxNTAITh2i/EQAZoDZB5JcaEvFjI4qwALjpDTQWW6Ew1q41jkTQNV7/RJBPnect",
              "init_state": ""
            },
            "message": "D4p+pQAaM4c3aZHJSy0F4AgA7zuZAqJxsqAciTilI8/iTnGEeq62piAAHtRKd6wOcJwQOThwAg==\n"
          }
        ]
      }
    ]
  }
}

/portfolio

Get the comprehensive information about the assets/ tokens owned by a user.

GET https://api.expand.network/chain/portfolio

Query Parameters

Name
Type
Description

rpc

String

Remote procedural call URL.

chainId

String

chainSymbol

String

address*

String

Public addess of the user.

tokens

String

Comma-separated value of tokens to get value of. Maximum 10 at a time.

availableOnly

Boolean

By default, false. If true, tokens with balance > 0 will be listed.

https://api.expand.network/chain/portfolio?chainId=1100&address=UQAxmMo2wxu_yQTySoV7u7-Con2csmcBloW0CrflBCQEr-7R
{
    "status": 200,
    "msg": "success",
    "data": {
        "native": "496234820",
        "jettons": [
            {
                "name": "GAGARIN",
                "symbol": "GGR",
                "address": "EQDetcmWrfHLPRPVh3LoFvwso0zsjFnpmmXTKWj7s1ycNgu2",
                "balance": "0",
                "USDPrice": "0.09126314435356501"
            },
            {
                "name": "WEMIX",
                "symbol": "oWEMIX",
                "address": "EQCf7Nb341dxOE3N0jimngRxGEV8T3zo-eU2EZVs_nchNhhZ",
                "balance": "0",
                "USDPrice": "NA"
            },
            {
                "name": "Mantle",
                "symbol": "jMNT",
                "address": "EQAEuikLQVh2lDMrV99nTHqFL_TXEyCEJ1xKMuPT60tfvdps",
                "balance": "0",
                "USDPrice": "0.7233562122618723"
            }
        ]
    }
}

/getstakepositions

This endpoint fetches the TON staking balance of the address using TON-listed apps and Nominator pool.

GET https://api.expand.network/chain/getstakepositions

Query Parameters

Name
Type
Description

rpc

String

Remote procedural call URL.

chainId*

String

chainSymbol

String

address*

String

Public addess of the user.

https://api.expand.network/chain/getstakepositions?address=UQB4JObGeYc-wG2nxsmbzBVfICAm_BoAFAQk-iJGm7jEdw44&chainId=1100
{
  "status": 200,
  "msg": "success",
  "data": {
    "activeStake": "3019411596649599",
    "stakePositions": [
      {
        "pool": "Bemo liquid staking",
        "balance": "719225507420430"
      },
      {
        "pool": "Nominator Pools",
        "balance": "2300186089229169"
      }
    ]
  }
}
PreviousStarknetNextCosmos Hub

Last updated 2 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.

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.

⛓️
⚡
Chain ID
Chain ID
Chain ID
Chain ID
Chain ID
Chain ID
Chain ID
Chain ID
Chain ID
Chain ID
Chain ID
Chain ID
Chain ID
Chain ID