FastNEAR View Account API
The View Account API from FastNEAR — 1 operation(s) for view account.
The View Account API from FastNEAR — 1 operation(s) for view account.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/fastnear:fastnear-view-account-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: FastNEAR RPC View Account API
description: 'NEAR Protocol JSON RPC
Send your FastNEAR API key as an `Authorization: Bearer` header (preferred) or an `apiKey` query parameter. An unrecognized key is rejected with 403.
For exhaustive list of endpoints, refer to the NEAR documentation.'
version: 1.0.0
servers:
- url: https://rpc.mainnet.fastnear.com
description: Mainnet
- url: https://rpc.testnet.fastnear.com
description: Testnet
- url: https://archival-rpc.mainnet.fastnear.com
description: Mainnet Archival
- url: https://archival-rpc.testnet.fastnear.com
description: Testnet Archival
security:
- {}
- BearerAuth: []
- ApiKeyAuth: []
tags:
- name: View Account
paths:
/view_account:
post:
operationId: view_account
summary: View account
description: Fetch an account's balance, storage usage, and code hash at a chosen block or finality.
x-fastnear-interaction:
kind: rpc-view-account
x-hideReplay: true
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- jsonrpc
- id
- method
- params
properties:
jsonrpc:
type: string
enum:
- '2.0'
id:
type: string
example: fastnear
method:
type: string
enum:
- query
params:
type: object
properties:
account_id:
type: string
description: NEAR account ID
request_type:
type: string
enum:
- view_account
finality:
type: string
enum:
- final
- near-final
- optimistic
description: Block finality
required:
- request_type
- account_id
- finality
examples:
mainnet:
summary: View account (Mainnet)
value:
jsonrpc: '2.0'
id: fastnear
method: query
params:
account_id: root.near
request_type: view_account
finality: final
testnet:
summary: View account (Testnet)
value:
jsonrpc: '2.0'
id: fastnear
method: query
params:
account_id: root.testnet
request_type: view_account
finality: final
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/JsonRpcResponse_view_account'
'403':
description: The supplied API key was not recognized.
content:
text/plain:
schema:
type: string
example: Invalid API key
tags:
- View Account
components:
schemas:
JsonRpcResponse_view_account:
type: object
required:
- jsonrpc
- id
properties:
jsonrpc:
type: string
enum:
- '2.0'
id:
oneOf:
- type: string
- type: number
result:
type: object
description: A view of the account
properties:
amount:
type: string
description: Amount in yoctoNEAR
bootstrap_nonce:
type:
- integer
- 'null'
description: 'The nonce an uninitialized account''s own transactions must use, present
only while it is uninitialized. A self-signed state init is the one
transaction such an account can send, and this is the only way for a
client to learn the nonce it must carry: there is no access key to query.'
format: uint64
minimum: 0
code_hash:
type: string
description: Base58-encoded hash
global_contract_account_id:
type:
- string
- 'null'
description: NEAR account ID
global_contract_hash:
type:
- string
- 'null'
description: Base58-encoded hash
locked:
type: string
description: Amount in yoctoNEAR
state:
type: string
enum:
- initialized
- uninitialized
description: 'Whether an account''s state has been installed.
Only universal accounts can be uninitialized: they come into existence when
a transfer funds a `0u` id whose state init has not been applied yet. A
deterministic `0s` account waiting for its state init is an ordinary V1
account with no contract, not this.'
storage_paid_at:
type: integer
description: Deprecated and unused; nodes always return 0.
format: uint64
default: 0
minimum: 0
storage_usage:
type: integer
description: Total storage used by the account, in bytes.
format: uint64
minimum: 0
required:
- amount
- locked
- code_hash
- storage_usage
error:
type: object
properties:
code:
type: integer
message:
type: string
data:
type: object
securitySchemes:
BearerAuth:
type: http
scheme: bearer
description: 'FastNEAR API key as an `Authorization: Bearer` header. Preferred for backends, workers, and proxies because it keeps the key out of URLs and logs.'
ApiKeyAuth:
type: apiKey
in: query
name: apiKey
description: FastNEAR API key as the `apiKey` query parameter. Handy for curl or clients that cannot set headers, but the key can end up in URLs, logs, and shell history.