Near
/getbalance
Get the balance or number of the given token in the requested public address.
GET https://api.expand.network/chain/getbalance
Query Parameters
rpc
String
Remote procedural call URL
address*
String
The public address to get the balance of.
tokenAddress
String
The address of token to get the balance of.
networkId*
String
Contains the network Id (testnet or mainnet).
https://api.expand.network/chain/getbalance/?address=app.nearcrowd.near&chainId=1200{
"status": 200,
"msg": "success",
"data": {
"balance": "276604143416550089062799879"
}
}/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=1200{
"status": 200,
"msg": "success",
"data": {
"difficulty": null,
"gasLimit": null,
"gasUsed": "100000000",
"hash": "EH2EUAcfQuVtwgjbSy1cYSWxTqnuoE6hB7Qs3yUkwtTi",
"miner": null,
"nonce": null,
"number": "48208733",
"parentHash": "A4DPUSm6WCm34LTRLHrmVdVDobC37PjHqACd2srWGXeQ",
"size": null,
"timestamp": 1632130984114315800,
"totalDifficulty": null,
"transactions": [
{
"balance_burnt": "4794491933184300000000",
"chunk_hash": "J4SbJiazEWAHnNLHTEq6FvCQbfNP2zoQjeUXDhJ7sDPz",
"encoded_length": 3630,
"encoded_merkle_root": "CegYTGt7DA7RTmAAvH7Vr4ZLdzocMXN4AYzZPmcp7P1m",
"gas_limit": 1000000000000000,
"gas_used": 64561954584952,
"height_created": 48208733,
"height_included": 48208733,
"outcome_root": "81Ces8UVPcU2KqHJs3Pa3vJWgHZDyh8stsUfrPYRY3jo",
"outgoing_receipts_root": "Fq3y8c1vT5E6erZL6VwNegmcbXMUsozfychmFDhiHpie",
"prev_block_hash": "A4DPUSm6WCm34LTRLHrmVdVDobC37PjHqACd2srWGXeQ",
"prev_state_root": "2MLkUCQj4sHVGuVTqwKgTh47Q1fsGSXBc2RSopEUzFx2",
"rent_paid": "0",
"shard_id": 0,
"signature": "ed25519:35FPeXGCemZeajdr1D99LGFAibHZNpGQY5LPt5N3aAYxT3xqZyTSJ6S8CxTvRqxMBGnrDz7WALVLcksmdjkrHNvh",
"tx_root": "6RyWHXk3ygrJTWUvF1BC955Fo2oC1HXKZJKp6daXFSes",
"validator_proposals": [],
"validator_reward": "0"
}
],
"transactionsRoot": "HDgRo5ZfnEW49HbYK6FrVzovDKvxDnexTvsNHmKtkXT2",
"uncles": null
}
}/gettransaction
Get details of a transaction.
GET https://api.expand.network/chain/gettransaction
Query Parameters
https://api.expand.network/chain/gettransaction?chainId=1200&transactionHash=28CYUY3Jcmjjy19rx5x4GUp7kWKSuxgTuzsnm6WbjqgR{
"status": 200,
"msg": "success",
"data": {
"hash": "28CYUY3Jcmjjy19rx5x4GUp7kWKSuxgTuzsnm6WbjqgR",
"blockNumber": "D2rC8zK6JkFDXuewMH3g15S71whhjJ6arr6ATHLXGQUF",
"timestamp": null,
"from": "app.nearcrowd.near",
"to": "app.nearcrowd.near",
"value": null,
"transactionFees": 2428517994378,
"gas": null,
"gasPrice": null,
"input": [
{
"FunctionCall": {
"args": "eyJ0YXNrX29yZGluYWwiOjEsImlzX2hvbmV5cG90IjpmYWxzZSwiaG9uZXlwb3RfcHJlaW1hZ2UiOlsxMDQsOTksMTAzLDExMCwxMTMsMTA4LDExMiwxMTEsMTA4LDExOCwxMDYsOTgsMTE5LDExNSwxMjEsMTE5XSwidGFza19wcmVpbWFnZSI6WzcwLDU3LDIwMSwxMjQsMTE0LDI0NSwxMjQsMTk1LDE5MiwxOTYsMzAsMjM5LDIyMCw0NywxODgsNTQsMTIxLDk1LDM2LDIxMywxNzEsMTI5LDEwMCw1MSwxODMsNjQsMjgsMTI2LDExNSwxMjEsMjQxLDEzNl19",
"deposit": "0",
"gas": 200000000000000,
"method_name": "challenge"
}
}
],
"network": null
}
}/portfolio
Get the comprehensive information about the assets/ tokens owned by a user.
GET https://api.expand.network/chain/portfolio
Query Parameters
rpc
String
Remote procedural call URL.
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, true. If true, tokens with balance > 0 will be listed.
https://api.expand.network/chain/portfolio?chainId=1200&address=spin.sweat&availableOnly=true{
"status": 200,
"msg": "success",
"data": {
"native": "657102532292146469652654940",
"nep141": [
{
"name": "SWEAT",
"symbol": "SWEAT",
"address": "token.sweat",
"balance": "4478246379997954161168780",
"USDPrice": "0.009696888755975658"
}
]
}
}/getstakepositions
This endpoint retrieves information about staked native asset positions for a specified address, including the total staked amount across all validators as well as the individual positions staked with each validator.
GET https://api.expand.network/chain/getstakepositions
Query Parameters
https://api.expand.network/chain/getstakepositions?address=5d405172e96927a7a6de6ec95c3879345a47b3c0cf6d97653d76c61f5c1262b9&chainId=1200&validatorAddress=astro-stakers.poolv1.near{
"status": 200,
"msg": "success",
"data": {
"activeStake": "2.902585808691909e+25",
"stakePositions": [
{
"stake": "2.902585808691909e+25",
"staker": "5d405172e96927a7a6de6ec95c3879345a47b3c0cf6d97653d76c61f5c1262b9",
"withdrawer": "5d405172e96927a7a6de6ec95c3879345a47b3c0cf6d97653d76c61f5c1262b9",
"validator": "astro-stakers.poolv1.near"
}
]
}
}/sendtransaction
Send transaction on the chain.
POST https://api.expand.network/chain/sendtransaction
Request Body
{
"chainId": "1200",
"rawTransaction": "FAAAAG1hZGh1dXV1dXV1ci50ZXN0bmV0AEkY3+wQ0vYMKdwUWiNMqpXqdeiHfeC+xzYEoSqBUbe8TokHDDheAAAUAAAAbXl0ZXN0bWFkaHVyLnRlc3RuZXQgoucUF/0pEF1+QF3rfhesMNR8DoSo9kOwUtA8jxglZgEAAAADAABAvYtbk2tsAAAAAAAAAADmi3KGo3Rw3x4pIwf/oub5d1VdfIcrgeEOgOBRs9qnXm3zZ4UQzheNJZ3om271QiMXw0hK/lFQMEWtKGOK8Z0A"
}{
"status": 200,
"msg": "success",
"data": {
"chainId": "1200",
"transactionHash": "FVgzzKafnM8FT6y3r86s2nDCyYbiqkEsFrZ6371b3uxs"
}
}/decodetransaction
Get the decoded transaction for the provided raw transaction.
POST https://api.expand.network/chain/decodetransaction
Request Body
{
"chainId": "1200",
"rawTransaction": "EQAAAGhrMTY0NjQ1NS50ZXN0bmV0AI5NZ/HOf9Z3lhnFXWzGKLlpQquoZ0koM9NwA6pyady3wVPUJFiBAAARAAAAaGsxNjQ2NDU1LnRlc3RuZXRRcSU8anY2BbU3Hdp6nFc800OP06VcXt9Y6zi7bNKS6wEAAAADAADoiQQjx4oAAAAAAAAAAACFkU6wouNgPzyGby4Ab7qs8YLUuTmgLVoihNVoUp/pNTyZT/5TC6ozr2tAIfbMxmrAEzqpxqZFEgd/p0U+zfoC"
}{
"status": 200,
"msg": "success",
"data": {
"parsedTx": {
"transaction": {
"signerId": "hk1646455.testnet",
"publicKey": {
"keyType": 0,
"data": {
"0": 142,
"1": 77,
"2": 103,
"3": 241,
"4": 206,
"5": 127,
"6": 214,
"7": 119,
"8": 150,
"9": 25,
"10": 197,
"11": 93,
"12": 108,
"13": 198,
"14": 40,
"15": 185,
"16": 105,
"17": 66,
"18": 171,
"19": 168,
"20": 103,
"21": 73,
"22": 40,
"23": 51,
"24": 211,
"25": 112,
"26": 3,
"27": 170,
"28": 114,
"29": 105,
"30": 220,
"31": 183
}
},
"nonce": "815824d453c1",
"receiverId": "hk1646455.testnet",
"blockHash": {
"0": 81,
"1": 113,
"2": 37,
"3": 60,
"4": 106,
"5": 118,
"6": 54,
"7": 5,
"8": 181,
"9": 55,
"10": 29,
"11": 218,
"12": 122,
"13": 156,
"14": 87,
"15": 60,
"16": 211,
"17": 67,
"18": 143,
"19": 211,
"20": 165,
"21": 92,
"22": 94,
"23": 223,
"24": 88,
"25": 235,
"26": 56,
"27": 187,
"28": 108,
"29": 210,
"30": 146,
"31": 235
},
"actions": [
{
"transfer": {
"deposit": "8ac7230489e80000"
},
"enum": "transfer"
}
]
},
"signature": {
"keyType": 0,
"data": {
"0": 133,
"1": 145,
"2": 78,
"3": 176,
"4": 162,
"5": 227,
"6": 96,
"7": 63,
"8": 60,
"9": 134,
"10": 111,
"11": 46,
"12": 0,
"13": 111,
"14": 186,
"15": 172,
"16": 241,
"17": 130,
"18": 212,
"19": 185,
"20": 57,
"21": 160,
"22": 45,
"23": 90,
"24": 34,
"25": 132,
"26": 213,
"27": 104,
"28": 82,
"29": 159,
"30": 233,
"31": 53,
"32": 60,
"33": 153,
"34": 79,
"35": 254,
"36": 83,
"37": 11,
"38": 170,
"39": 51,
"40": 175,
"41": 107,
"42": 64,
"43": 33,
"44": 246,
"45": 204,
"46": 198,
"47": 106,
"48": 192,
"49": 19,
"50": 58,
"51": 169,
"52": 198,
"53": 166,
"54": 69,
"55": 18,
"56": 7,
"57": 127,
"58": 167,
"59": 69,
"60": 62,
"61": 205,
"62": 250,
"63": 2
}
}
}
}
}Last updated

