Aptos
/getbalance
Get the balance or number of the native token in the requested public address.
GET
https://api.expand.network/chain/getbalance
Query Parameters
rpc
String
Remote procedural call URL.
chainId*
String
chainSymbol
String
address*
String
The public address to get the balance of.
https://api.expand.network/chain/getbalance?address=0xccd1f5fae72dfe1f2f41c425e77170e2c3aef3d1e7f9f301453806bfbf565177&chainId=1400
{
"status": 200,
"msg": "success",
"data": {
"balance": "1071721119"
}
}
/getblock
Get details of a block.
GET
https://historicallp.api.expand.network/chain/getblock
Query Parameters
rpc
String
Remote procedural call URL.
chainId*
String
chainSymbol
String
blockNumber*
String
The block number or block hash.
https://historicallp.api.expand.network/chain/getblock?blockNumber=47654752&chainId=1400
{
"status": 200,
"msg": "success",
"data": {
"difficulty": null,
"gasLimit": null,
"gasUsed": null,
"hash": "0xc177dd30b5e2e68e6f8a80469a82c447f8786afc1341a11183ad570f0112affe",
"miner": null,
"nonce": null,
"number": "47654752",
"parentHash": null,
"size": null,
"timestamp": "1681636026911155",
"totalDifficulty": null,
"transactions": [
{
"version": "122660455",
"hash": "0xe2ae82c6c29ea7ab9aa66bdb8d9153a188b653498fefa0e51347419a3e79efed",
"state_change_hash": "0x47b9b8f124d155c55c396ac6047909312106186646738c12f150f3721f928fbc",
"event_root_hash": "0x3abbe8ac0d24cf244d33ff1242113abcccabc5724d1517f5ad0b38877ac4d630",
"state_checkpoint_hash": null,
"gas_used": "0",
"success": true,
"vm_status": "Executed successfully",
"accumulator_root_hash": "0xbe2434630c973a72e4b61c1bf4f18b6357352e0da1939f51f1b3f466f6705329",
"changes": [
{
"address": "0x1",
"state_key_hash": "0x5ddf404c60e96e9485beafcabb95609fed8e38e941a725cae4dcec8296fb32d7",
"data": {
"type": "0x1::block::BlockResource",
"data": {
"epoch_interval": "7200000000",
"height": "47654752",
"new_block_events": {
"counter": "47654753",
"guid": {
"id": {
"addr": "0x1",
"creation_num": "3"
}
}
},
"update_epoch_interval_events": {
"counter": "0",
"guid": {
"id": {
"addr": "0x1",
"creation_num": "4"
}
}
}
}
},
"type": "write_resource"
},
{
"address": "0x1",
"state_key_hash": "0x8048c954221814b04533a9f0a9946c3a8d472ac62df5accb9f47c097e256e8b6",
"data": {
"type": "0x1::stake::ValidatorPerformance",
"data": {
"validators": [
{
"failed_proposals": "0",
"successful_proposals": "10"
}
]
}
},
"type": "write_resource"
},
{
"address": "0x1",
"state_key_hash": "0x7b1615bf012d3c94223f3f76287ee2f7bdf31d364071128b256aeff0841b626d",
"data": {
"type": "0x1::timestamp::CurrentTimeMicroseconds",
"data": {
"microseconds": "1681636026911155"
}
},
"type": "write_resource"
}
],
"id": "0xc177dd30b5e2e68e6f8a80469a82c447f8786afc1341a11183ad570f0112affe",
"epoch": "2231",
"round": "11072",
"events": [
{
"guid": {
"creation_number": "3",
"account_address": "0x1"
},
"sequence_number": "47654752",
"type": "0x1::block::NewBlockEvent",
"data": {
"epoch": "2231",
"failed_proposer_indices": [],
"hash": "0xc177dd30b5e2e68e6f8a80469a82c447f8786afc1341a11183ad570f0112affe",
"height": "47654752",
"previous_block_votes_bitvec": "0x81ff97eeff69ef7e8fe5bdff7c",
"proposer": "0xb4a4f1ef8b0702d85547dc444571a473f736e1205a86db36dad13815ad9bbbf6",
"round": "11072",
"time_microseconds": "1681636026911155"
}
}
],
"previous_block_votes_bitvec": [
129,
255,
151,
238,
255,
105,
239,
126,
143,
229,
189,
255,
124
],
"proposer": "0xb4a4f1ef8b0702d85547dc444571a473f736e1205a86db36dad13815ad9bbbf6",
"failed_proposer_indices": [],
"timestamp": "1681636026911155",
"type": "block_metadata_transaction"
}
]
}
}
/gettransaction
Get details of a transaction.
GET
https://api.expand.network/chain/gettransaction
Query Parameters
rpc
String
Remote procedural call URL.
chainId*
String
chainSymbol
String
transactionHash*
String
The transaction hash.
https://api.expand.network/chain/gettransaction?chainId=1400&transactionHash=0xe2532049fca2c58bab4f32778469f8b4de47e15fed0de40e0c24eb2be226c82d
{
"status": 200,
"msg": "success",
"data": {
"hash": "0xe2532049fca2c58bab4f32778469f8b4de47e15fed0de40e0c24eb2be226c82d",
"transactionStatus": true,
"timestamp": "1687506074530639",
"from": "0x7ea47ff5231ccc1fa81bd90fc8367d7bdb8e25daa2b8294dff93715420ab5ba3",
"to": null,
"value": null,
"transactionFees": "323",
"gas": "200000",
"gasPrice": "100",
"input": null,
"nonce": null,
"network": null
}
}
/getusertransactions
Get the historical transaction details for a specific user address.
GET
https://historicallp.api.expand.network/chain/getusertransactions
Query Parameters
rpc
String
Remote procedural call URL.
chainId
String
chainSymbol
String
address*
String
The public address of the user.
pageSize
String
The page size. By Default 30 and Max 100
pageToken
String
The page token or page number
sortOrder
String
The transaction sorting order. asc or desc. By default, desc.
https://historicallp.api.expand.network/chain/getusertransactions?chainId=1400&address=0xdf5b1f3305301245bf8d629cb0e193c49ad90fb12ed412bb6e4c2eba221a1c43&pageToken=2&sortOrder=desc&pageSize=30
{
"status": 200,
"msg": "success",
"data": {
"totalPages": "165926",
"currentPage": "2",
"transactions": [
{
"version": "2545137957",
"hash": "0x7d81cfc8234ebfba8fdbf624b9ed4a0d9959e49265f9a12de324f08bb5592e6c",
"state_change_hash": "0x7bf3bbd782cef78dbfc73fdeb6d32105c1b500dfaee00767e301d8e1b2fbd539",
"event_root_hash": "0x5b00633969394263f1a54519aa7a9ad85a75a2bc6d5b9786cbf42476841aa332",
"state_checkpoint_hash": null,
"gas_used": "16",
"success": true,
"vm_status": "Executed successfully",
"accumulator_root_hash": "0xb4f9b97aabbe5a1e204b249a9ad4f3ed2621079c2f53409d0ef27f26e0e55898",
"changes": [
{
"address": "0x7558b46813454b5ae58b49b4c183c7d643ebf9793e89377ae84d640e52bf7a42",
"state_key_hash": "0x1f22a8f69fb4ff5f6494cc44f18d4672b48e27d307d809adb131af582a47f626",
"data": {
"type": "0x1::fungible_asset::FungibleStore",
"data": {
"balance": "0",
"frozen": false,
"metadata": {
"inner": "0xbae207659db88bea0cbead6da0ed00aac12edcdda169e591cd41c94180b46f3b"
}
}
},
"type": "write_resource"
},
{
"address": "0x7558b46813454b5ae58b49b4c183c7d643ebf9793e89377ae84d640e52bf7a42",
"state_key_hash": "0x1f22a8f69fb4ff5f6494cc44f18d4672b48e27d307d809adb131af582a47f626",
"data": {
"type": "0x1::object::ObjectCore",
"data": {
"allow_ungated_transfer": false,
"guid_creation_num": "1125899906842625",
"owner": "0xdf5b1f3305301245bf8d629cb0e193c49ad90fb12ed412bb6e4c2eba221a1c43",
"transfer_events": {
"counter": "0",
"guid": {
"id": {
"addr": "0x7558b46813454b5ae58b49b4c183c7d643ebf9793e89377ae84d640e52bf7a42",
"creation_num": "1125899906842624"
}
}
}
}
},
"type": "write_resource"
},
{
"address": "0x7558b46813454b5ae58b49b4c183c7d643ebf9793e89377ae84d640e52bf7a42",
"state_key_hash": "0x1f22a8f69fb4ff5f6494cc44f18d4672b48e27d307d809adb131af582a47f626",
"data": {
"type": "0x1::object::Untransferable",
"data": {
"dummy_field": false
}
},
"type": "write_resource"
},
{
"address": "0xcd62a4687c6e227de4b4b2c077793615ed584bd0cf120ad028ec98c5e1d7d04e",
"state_key_hash": "0x648f00722680b73d26901cd791995cee83b4fba2eff85cffb53f2b734af6e505",
"data": {
"type": "0x1::fungible_asset::FungibleStore",
"data": {
"balance": "5453111475",
"frozen": false,
"metadata": {
"inner": "0xbae207659db88bea0cbead6da0ed00aac12edcdda169e591cd41c94180b46f3b"
}
}
},
"type": "write_resource"
},
{
"address": "0xcd62a4687c6e227de4b4b2c077793615ed584bd0cf120ad028ec98c5e1d7d04e",
"state_key_hash": "0x648f00722680b73d26901cd791995cee83b4fba2eff85cffb53f2b734af6e505",
"data": {
"type": "0x1::object::ObjectCore",
"data": {
"allow_ungated_transfer": false,
"guid_creation_num": "1125899906842625",
"owner": "0xe31f10af9feab4259ef092d478180dd5cf64be43032a840597ab93ae13208a5e",
"transfer_events": {
"counter": "0",
"guid": {
"id": {
"addr": "0xcd62a4687c6e227de4b4b2c077793615ed584bd0cf120ad028ec98c5e1d7d04e",
"creation_num": "1125899906842624"
}
}
}
}
},
"type": "write_resource"
},
{
"address": "0xcd62a4687c6e227de4b4b2c077793615ed584bd0cf120ad028ec98c5e1d7d04e",
"state_key_hash": "0x648f00722680b73d26901cd791995cee83b4fba2eff85cffb53f2b734af6e505",
"data": {
"type": "0x1::object::Untransferable",
"data": {
"dummy_field": false
}
},
"type": "write_resource"
},
{
"address": "0xdf5b1f3305301245bf8d629cb0e193c49ad90fb12ed412bb6e4c2eba221a1c43",
"state_key_hash": "0x225dc453b6f2359a4fc3d36a17985d46f60c4f714c5d38b59dc805e08f0a2db6",
"data": {
"type": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>",
"data": {
"coin": {
"value": "20796419478"
},
"deposit_events": {
"counter": "99020",
"guid": {
"id": {
"addr": "0xdf5b1f3305301245bf8d629cb0e193c49ad90fb12ed412bb6e4c2eba221a1c43",
"creation_num": "2"
}
}
},
"frozen": false,
"withdraw_events": {
"counter": "138203",
"guid": {
"id": {
"addr": "0xdf5b1f3305301245bf8d629cb0e193c49ad90fb12ed412bb6e4c2eba221a1c43",
"creation_num": "3"
}
}
}
}
},
"type": "write_resource"
},
{
"address": "0xdf5b1f3305301245bf8d629cb0e193c49ad90fb12ed412bb6e4c2eba221a1c43",
"state_key_hash": "0x1a99836dc88b7339049bcdbd0f2c3a50e1a078cc1eeb58d46a2ba6b055c7baad",
"data": {
"type": "0x1::account::Account",
"data": {
"authentication_key": "0xdf5b1f3305301245bf8d629cb0e193c49ad90fb12ed412bb6e4c2eba221a1c43",
"coin_register_events": {
"counter": "2",
"guid": {
"id": {
"addr": "0xdf5b1f3305301245bf8d629cb0e193c49ad90fb12ed412bb6e4c2eba221a1c43",
"creation_num": "0"
}
}
},
"guid_creation_num": "6",
"key_rotation_events": {
"counter": "0",
"guid": {
"id": {
"addr": "0xdf5b1f3305301245bf8d629cb0e193c49ad90fb12ed412bb6e4c2eba221a1c43",
"creation_num": "1"
}
}
},
"rotation_capability_offer": {
"for": {
"vec": []
}
},
"sequence_number": "165925",
"signer_capability_offer": {
"for": {
"vec": []
}
}
}
},
"type": "write_resource"
},
{
"state_key_hash": "0x6e4b28d40f98a106a65163530924c0dcb40c1349d3aa915d108b4d6cfc1ddb19",
"handle": "0x1b854694ae746cdbd8d44186ca4929b2b337df21d1c74633be19b2710552fdca",
"key": "0x0619dc29a0aac8fa146714058e8dd6d2d0f3bdf5f6331907bf91f3acd81e6935",
"value": "0x09634b8f953797010000000000000000",
"data": null,
"type": "write_table_item"
}
],
"sender": "0xdf5b1f3305301245bf8d629cb0e193c49ad90fb12ed412bb6e4c2eba221a1c43",
"sequence_number": "165924",
"max_gas_amount": "8000",
"gas_unit_price": "100",
"expiration_timestamp_secs": "1743438740",
"payload": {
"function": "0x1::primary_fungible_store::transfer",
"type_arguments": [
"0x1::fungible_asset::Metadata"
],
"arguments": [
{
"inner": "0xbae207659db88bea0cbead6da0ed00aac12edcdda169e591cd41c94180b46f3b"
},
"0xe31f10af9feab4259ef092d478180dd5cf64be43032a840597ab93ae13208a5e",
"2558998256"
],
"type": "entry_function_payload"
},
"signature": {
"public_key": "0x806fb260a1679724a345f417c83f9148b8dd5c7eb7d76e497103f217b1ce25a4",
"signature": "0xa0ea1a9da83ebae4b0af6b95e17f9502c97ca1000f319f2d6a2985573a58e4039e1cc66ae18cb43ec34306f3513c3f4e230a758081d6aab2cdedd003f50b580e",
"type": "ed25519_signature"
},
"events": [
{
"guid": {
"creation_number": "0",
"account_address": "0x0"
},
"sequence_number": "0",
"type": "0x1::fungible_asset::Withdraw",
"data": {
"amount": "2558998256",
"store": "0x7558b46813454b5ae58b49b4c183c7d643ebf9793e89377ae84d640e52bf7a42"
}
},
{
"guid": {
"creation_number": "0",
"account_address": "0x0"
},
"sequence_number": "0",
"type": "0xe5c5befe31ce06bc1f2fd31210988aac08af6d821b039935557a6f14c03471be::stablecoin::Withdraw",
"data": {
"amount": "2558998256",
"store": "0x7558b46813454b5ae58b49b4c183c7d643ebf9793e89377ae84d640e52bf7a42",
"store_owner": "0xdf5b1f3305301245bf8d629cb0e193c49ad90fb12ed412bb6e4c2eba221a1c43"
}
},
{
"guid": {
"creation_number": "0",
"account_address": "0x0"
},
"sequence_number": "0",
"type": "0x1::fungible_asset::Deposit",
"data": {
"amount": "2558998256",
"store": "0xcd62a4687c6e227de4b4b2c077793615ed584bd0cf120ad028ec98c5e1d7d04e"
}
},
{
"guid": {
"creation_number": "0",
"account_address": "0x0"
},
"sequence_number": "0",
"type": "0xe5c5befe31ce06bc1f2fd31210988aac08af6d821b039935557a6f14c03471be::stablecoin::Deposit",
"data": {
"amount": "2558998256",
"store": "0xcd62a4687c6e227de4b4b2c077793615ed584bd0cf120ad028ec98c5e1d7d04e",
"store_owner": "0xe31f10af9feab4259ef092d478180dd5cf64be43032a840597ab93ae13208a5e"
}
},
{
"guid": {
"creation_number": "0",
"account_address": "0x0"
},
"sequence_number": "0",
"type": "0x1::transaction_fee::FeeStatement",
"data": {
"execution_gas_units": "8",
"io_gas_units": "9",
"storage_fee_octas": "0",
"storage_fee_refund_octas": "0",
"total_charge_gas_units": "16"
}
}
],
"timestamp": "1743435140748297",
"type": "user_transaction"
}
]
}
}
/getgasprice
Get the current gas price from the network.
GET
https://api.expand.network/chain/getgasprice
Query Parameters
rpc
String
Remote procedural call URL.
chainId*
String
chainSymbol
String
https://api.expand.network/chain/getgasprice?chainSymbol=APT
{
"status": 200,
"msg": "success",
"data": {
"gasPrice": "100"
}
}
/sendtransaction
Send transaction on the chain.
POST
https://api.expand.network/chain/sendtransaction
Request Body
chainId*
String
chainSymbol
String
rawTransaction*
String
The encoded transaction, obtained from signed transaction.
rpc
String
Remote procedural call URL.
Good to know: While signing the transaction with our SDK, please ensure you have passed the correct sequence number(the sequence number of last transaction+1).
{
"chainId": "1400",
"rawTransaction": "gDjn3zwy3kvqbul7NgB81Ce5fZ9B1y3L508UwTV2ZVIeAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQRjb2luCHRyYW5zZmVyAQcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQphcHRvc19jb2luCUFwdG9zQ29pbgACIM0mOLBts6prchQV2uykOl5NrjQrmdPLAJGO04eAMDw7CExLTAAAAAAA6AMAAAAAAABkAAAAAAAAABFtiWQAAAAAAgAgjhPwSNdxs13Zr3j92aNnTHzkrsJJzIh51gi/xKNaUw9AeqtnqL1X6gXm6GcPhf9jiO6ma+YOYhOGFh8F1XGMQg8IxOFBDVF2g1EToVMUSfUEzvdZk/AzgwZB8yTHoZjVDA=="
}
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1400",
"transactionHash": "0x0df58478f17d3e94a1f033ee981ef7c34bd34f8e2ae4572915062a3575f8bbe2"
}
}
Last updated