Solana
Versioned Transactions: Expand now supports both versioned and legacy transactions, allowing users to access all the enhanced functionality versioned transactions offers
/getbalance
Get the balance or number of the given token in the requested public address.
GET
https://api.expand.network/chain/getbalance
Query Parameters
https://api.expand.network/chain/getbalance/?address=GX6kCVtpvFTGsedV72nK5K6VzY1bTCvqFmrtHkuZHGsX&chainId=900
{
"status": 200,
"msg": "success",
"data": {
"balance": "21430014235"
}
}
/getblock
Get details of a block.
GET
https://historicallp.api.expand.network/chain/getblock
Query Parameters
https://historicallp.api.expand.network/chain/getblock?blockNumber=48208733&chainId=900
{
"status": 200,
"msg": "success",
"data": {
"difficulty": null,
"gasLimit": null,
"gasUsed": null,
"hash": "6ZR4pNgiDnHGBBHB3mE9x9bnyxg7kzD1yhxbYXyhvwSH",
"miner": null,
"nonce": null,
"number": 48208733,
"parentHash": "9tvBefL3pS8ybJjQwXRZCAbn8qZZRk3A6cxvrWBoZJ2Z",
"size": null,
"timestamp": 1605085817,
"totalDifficulty": null,
"transactions": [
{
"meta": {
"err": null,
"fee": 5000,
"innerInstructions": [],
"loadedAddresses": {
"readonly": [],
"writable": []
},
"logMessages": [
"Call BPF program EUqojwWA2rd19FZrzeBncJsm38Jm1hEhE3zsmX3bRc2o",
"BPF program consumed 2640 of 200000 units",
"BPF program EUqojwWA2rd19FZrzeBncJsm38Jm1hEhE3zsmX3bRc2o success"
],
"postBalances": [
22390653493680,
23357760,
3591360,
7299063360,
1554418560,
1
],
"postTokenBalances": [],
"preBalances": [
22390653498680,
23357760,
3591360,
7299063360,
1554418560,
1
],
"preTokenBalances": [],
"rewards": [],
"status": {
"Ok": null
}
},
"transaction": {
"message": {
"header": {
"numReadonlySignedAccounts": 0,
"numReadonlyUnsignedAccounts": 2,
"numRequiredSignatures": 1
},
"accountKeys": [
"D5Qh6N6UXVTifvebzqPHdHCeuQXWvoTx6eSZ9TEas661",
"2fTzeukxn72rBLKfJpL5sNcRxAQcHPbq3HHp2swZPjCv",
"FQbCNSVH3RgosCPB4CJRstkLh5hXkvuXzAjQzT11oMYo",
"CiGy4cBqRi7EdU8pmfvqx8TpjqVua7K8Ke8zo9nhhg1E",
"EUqojwWA2rd19FZrzeBncJsm38Jm1hEhE3zsmX3bRc2o",
"11111111111111111111111111111111"
],
"recentBlockhash": "Bzn13YwS1jQgd25FwQiF7eeMCwqmPsnkGZtaH664TXyB",
"instructions": [
{
"accounts": [
1,
2,
3,
2,
2
],
"data": "12VeXEVoV",
"programIdIndex": 4
},
{
"accounts": [
0,
0
],
"data": "3Bxs463y57eAuzS3",
"programIdIndex": 5
}
],
"indexToProgramIds": {}
},
"signatures": [
"5kQPso2etarC45fv6c412CphbPXH6sDq12n57f353BNqdV8DGDgPvRKzZpQwQLCVdvTaqWZrEFbBn83wH9PQ2Y6n"
]
}
}
],
"transactionsRoot": null,
"uncles": null
}
}
/gettransaction
Get details of a transaction.
GET
https://api.expand.network/chain/gettransaction
Query Parameters
https://api.expand.network/chain/gettransaction?chainId=900&transactionHash=Kth19WQW3AwhL4xz4Dko68eiNCwBQ65pXV6Wbm2Fwjx37pTD8DFNfk6Ga6FCQ9MthrwWybLyPDdwUEjEexaoLup
{
"status": 200,
"msg": "success",
"data": {
"hash": "Kth19WQW3AwhL4xz4Dko68eiNCwBQ65pXV6Wbm2Fwjx37pTD8DFNfk6Ga6FCQ9MthrwWybLyPDdwUEjEexaoLup",
"transactionStatus": null,
"blockNumber": 175446089,
"timestamp": 1675234161,
"from": "AGaSHpDpyveuLyiaocNXMMFCf1LCBBynyaKMJkL8AKK4",
"to": "3vxLXJqLqF3JG5TCbYycbKWRBbCJQLxQmBGCkyqEEefL",
"value": "0",
"transactionFees": 5000,
"gas": null,
"gasPrice": null,
"input": "null6mJFQCt94hG4CKNYKgVcwk2tyD9N3TUNEqiQRCfTJYmtTs3i8M7RHq",
"nonce": null,
"network": null
}
}
/portfolio
Get the comprehensive information about the assets/ tokens owned by a user.
GET
https://api.expand.network/chain/portfolio
Query Parameters
https://api.expand.network/chain/portfolio?chainId=900&address=CGUA416Urx9YrRZKgadyGrsuUi3JwzVo4RbfQK1JpW9S&availableOnly=true&assetType=fungible&pageToken=1
{
"status": 200,
"msg": "success",
"data": {
"native": "6003167868",
"splBalances": [
{
"name": "Blaze",
"symbol": "BLZE",
"assetType": "FungibleToken",
"balance": "4105202188334",
"address": "BLZEEuZUBVqFhj8adcCFPJvPVCiCyVmh3hkJMrU8KuJA",
"decimals": "9",
"USDPrice": "0.0029989965"
},
{
"name": "Saga-drop.com $SAGA AIRDROP",
"symbol": "SAGA",
"assetType": "FungibleToken",
"balance": "44",
"address": "73RF9z3CZCkviSBb5xwpcHUfdEcRGPUzaHnvUsnqegdC",
"decimals": "0",
"USDPrice": "NA"
},
{
"name": "Saga-drop.com $SAGA AIRDROP",
"symbol": "SAGA",
"assetType": "FungibleToken",
"balance": "27",
"address": "64a5pKqPAHxHoB64ChCvV2kb2di45Ry33tcTPc4PBham",
"decimals": "0",
"USDPrice": "NA"
},
{
"name": "memevipz.com 🎁 Airdrop",
"symbol": "MEMEDROP",
"assetType": "FungibleAsset",
"balance": "87019539",
"address": "4v3WvznZbvc8sXgykx1Us8mtQr3fGBH2vf3EMG6Xjs2E",
"decimals": "0",
"USDPrice": "NA"
}
]
}
}
/sendtransaction
Send transaction on the chain.
POST
https://api.expand.network/chain/sendtransaction
Request Body
{
"chainId": "900",
"rawTransaction": "AZ+tnha8KkJHUhonuRhExKKi/iUVxLPzSWUFg0I9jA8qnzI+VeF/srAbjCC1yRXZkSFIAiL674Ym3nQXknMYCwABAAEDjRyE59XRrMagBCI1SF13/RwKCo1S07RveObs+BVA09415JpoPP9KKUdrIVusGR4UYoAZhh30KfDMN9gGEun3ygAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZ0TH7GcLvfxR7z5m2gBeRh/PWkqISy7hwhr2FsIs19oBAgIAAQwCAAAAAOH1BQAAAAA="
}
{
"status": 200,
"msg": "success",
"data": {
"chainId": "900",
"transactionHash": "XLtvQ1Lr8RxVSD4YB4ptkY3XpB9UcCGktfhfBU4XNxQBwayuZ21BuFpa8vTm9q7i1eB5TsuQNVfAgndbZ5sXord"
}
}
/decodetransaction
Get the decoded transaction for the provided raw transaction.
POST
https://api.expand.network/chain/decodetransaction
Request Body
{
"chainId": "900",
"rawTransaction": "AZANUOpAHOdEZSKG5HuXe1QZ90kX2VULfpMIc7xpp/GoUYFWJ4CsaNokyrNa0u5qcfEdJI244WL5SZqZt1meEQoBAAECP0Qyw9NtTa7gVBomcZX4zRuYuCee7NvzTKGbbvggCLAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJ/CPjp2H4E3Y6Q3Sa1S+36peOFuNhP226cr6lgpMpGWAQECAAAMAgAAAID2SuHHAi0V"
}
{
"status": 200,
"msg": "success",
"data": {
"parsedTx": {
"recentBlockhash": "Bkdcaqq3yx8wNovuZEALhYrndAtcSNhw1SqqE3FxYg1K",
"feePayer": "5FxzzbvHSoa9WH4VrMChdp23CcacCpbfpmgKxMFYXJVM",
"nonceInfo": null,
"instructions": [
{
"keys": [
{
"pubkey": "5FxzzbvHSoa9WH4VrMChdp23CcacCpbfpmgKxMFYXJVM",
"isSigner": true,
"isWritable": true
},
{
"pubkey": "5FxzzbvHSoa9WH4VrMChdp23CcacCpbfpmgKxMFYXJVM",
"isSigner": true,
"isWritable": true
}
],
"programId": "11111111111111111111111111111111",
"data": [
2,
0,
0,
0,
128,
246,
74,
225,
199,
2,
45,
21
]
}
],
"signers": [
"5FxzzbvHSoa9WH4VrMChdp23CcacCpbfpmgKxMFYXJVM"
]
}
}
}
Last updated