⚠️Blast API (blastapi.io) ends Oct 31. Migrate to Dwellir and skip Alchemy's expensive compute units.
Switch Today →
Skip to main content

accounts_resource

Overview

Fetch a specific resource under an account by its full type string.

Endpoint

GET /v1/accounts/{address}/resource/{resource_type}

Aptos-Specific Notes

  • Encode generic types using fully qualified type strings.

Request

Path Parameters

NameTypeRequiredDescription
addressstringYesAccount address
resource_typestringYesType tag, e.g. 0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>

Query Parameters

NameTypeRequiredDescription
ledger_versionstringNoHistorical version read

Request Body

None.

Response

{
"type": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>",
"data": { "coin": { "value": "123" } }
}

Code Examples

cURL

curl -s "https://api-aptos-mainnet.n.dwellir.com/YOUR_API_KEY/v1/accounts/0x1/resource/0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>"

TypeScript

const r = await aptos.getAccountResource({
accountAddress: "0x1",
resourceType: "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>",
});

Python

resource = client.account_resource(
"0x1",
"0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>"
)

Rust

let r = client.get_account_resource("0x1", "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>").await?;