Kusama accounts API
The accounts API from Kusama — 11 operation(s) for accounts.
The accounts API from Kusama — 11 operation(s) for accounts.
openapi: 3.0.0
info:
title: Substrate API Sidecar accounts API
description: '> ⚠️ **Deprecation Notice** — `substrate-api-sidecar` is deprecated in favor of
> [`polkadot-rest-api`](https://github.com/paritytech/polkadot-rest-api), a ground-up Rust rewrite
> built on [`subxt`](https://github.com/paritytech/subxt) with 1:1 API compatibility (endpoints
> served under `/v1/`, e.g. `/v1/blocks/head`), stable memory under sustained load, significantly
> lower latency and higher throughput, and native SCALE decoding via `parity-scale-codec`.
>
> **Migrate today:** Docker `paritytech/polkadot-rest-api:v0.1.0` ·
> [crate](https://crates.io/crates/polkadot-rest-api) ·
> [migration guide](https://github.com/paritytech/polkadot-rest-api/blob/main/docs/guides/MIGRATION.md) ·
> [docs](https://paritytech.github.io/polkadot-rest-api/) ·
> [issues](https://github.com/paritytech/polkadot-rest-api/issues)
Substrate API Sidecar is a REST service that makes it easy to interact with blockchain nodes
built using Substrate''s FRAME framework.
'
contact:
url: https://github.com/paritytech/substrate-api-sidecar
license:
name: GPL-3.0-or-later
url: https://github.com/paritytech/substrate-api-sidecar/blob/master/LICENSE
version: 20.14.1
servers:
- url: https://polkadot-public-sidecar.parity-chains.parity.io/
description: Polkadot Parity public sidecar
- url: https://kusama-public-sidecar.parity-chains.parity.io/
description: Kusama Parity public sidecar
- url: https://polkadot-asset-hub-public-sidecar.parity-chains.parity.io/
description: Polkadot Asset Hub Parity public sidecar
- url: https://kusama-asset-hub-public-sidecar.parity-chains.parity.io/
description: Kusama Asset Hub Parity public sidecar
- url: http://localhost:8080
description: Localhost
tags:
- name: accounts
paths:
/accounts/{accountId}/asset-balances:
get:
tags:
- accounts
summary: Get an array of asset-balances for an account.
description: Returns information about an account's asset-balances. This is specific to the assets pallet for parachains. If no `assets` query parameter is provided, all asset-balances for the given account will be returned.
operationId: getAssetBalances
parameters:
- name: accountId
in: path
description: SS58 address of the account.
required: true
schema:
type: string
format: SS58
- name: at
in: query
description: Block at which to query asset-balance info for the specified account.
required: false
schema:
type: string
description: Block height (as a positive integer) or hash (as a hex string).
format: unsignedInteger or $hex
- name: useRcBlock
in: query
description: When set to 'true', uses the relay chain block specified in the 'at' parameter to determine corresponding Asset Hub block(s). Only supported for Asset Hub endpoints. When used, returns an array of response objects (one for each Asset Hub block found) or empty array if none found.
required: false
schema:
type: boolean
description: When set to 'true', uses relay chain block mode with the 'at' parameter.
- name: useRcBlockFormat
in: query
description: Controls the response format when using 'useRcBlock=true'. When set to 'object', wraps the response in an object containing relay chain block info ('rcBlock') and the parachain data array ('parachainDataPerBlock'). When set to 'array' or omitted, returns the standard array format. Only valid when 'useRcBlock=true' is specified.
required: false
schema:
type: string
enum:
- array
- object
description: Response format - 'array' (default) returns standard array, 'object' wraps response with rcBlock info.
- name: assets
in: query
description: An array of AssetId's to be queried. If not supplied, defaults to providing all asset balances associated with the `accountId` will be returned. The array query param format follows Express 4.x API. ex:`?assets[]=1&assets[]=2&assets[]=3`.
required: false
schema:
type: array
items:
type: string
description: An array of assetId numbers represented as strings
format: Array of unsignedInteger's
responses:
'200':
description: successfull operation
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/AccountAssetsBalances'
- type: array
items:
$ref: '#/components/schemas/AccountAssetsBalances'
description: Returns a single object when using 'at' parameter or no query params. Returns an array when using 'useRcBlock' parameter (array contains one object per Asset Hub block found, or empty array if none found).
'400':
description: Invalid Address, invalid blockId supplied for at query param, or invalid parameter combination
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/accounts/{accountId}/asset-approvals:
get:
tags:
- accounts
summary: Get an asset approval for an account.
description: Returns information about an account's asset approval transaction. It is required to pass in a delegate and an assetId as query parameters.
operationId: getAssetApprovals
parameters:
- name: accountId
in: path
description: SS58 address of the account.
required: true
schema:
type: string
format: SS58
- name: at
in: query
description: Block at which to query asset approval info for the specified account.
required: false
schema:
type: string
description: Block height (as a non-negative integer) or hash (as a hex string).
format: unsignedInteger or $hex
- name: useRcBlock
in: query
description: When set to 'true', uses the relay chain block specified in the 'at' parameter to determine corresponding Asset Hub block(s). Only supported for Asset Hub endpoints. When used, returns an array of response objects (one for each Asset Hub block found) or empty array if none found.
required: false
schema:
type: boolean
description: When set to 'true', uses relay chain block mode with the 'at' parameter.
- name: useRcBlockFormat
in: query
description: Controls the response format when using 'useRcBlock=true'. When set to 'object', wraps the response in an object containing relay chain block info ('rcBlock') and the parachain data array ('parachainDataPerBlock'). When set to 'array' or omitted, returns the standard array format. Only valid when 'useRcBlock=true' is specified.
required: false
schema:
type: string
enum:
- array
- object
description: Response format - 'array' (default) returns standard array, 'object' wraps response with rcBlock info.
- name: assetId
in: query
description: The `assetId` associated with the asset-approval.
required: true
schema:
type: string
description: An assetId represented as an unsignedInteger.
format: unsignedInteger
- name: delegate
in: query
description: The delegate's `accountId` associated with an asset-approval.
required: true
schema:
type: string
format: SS58
responses:
'200':
description: successfull operation
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/AccountAssetsApproval'
- type: array
items:
$ref: '#/components/schemas/AccountAssetsApproval'
description: Returns a single object when using standard parameters. Returns an array when using 'useRcBlock' parameter (array contains one object per Asset Hub block found, or empty array if none found).
'400':
description: Invalid Address, invalid blockId supplied for at query param, or invalid parameter combination
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/accounts/{accountId}/balance-info:
get:
tags:
- accounts
summary: Get balance information for an account.
description: Returns information about an account's balance. Replaces `/balance/{address}` from versions < v1.0.0.
operationId: getAccountBalanceInfo
parameters:
- name: accountId
in: path
description: SS58 address of the account.
required: true
schema:
type: string
format: SS58
- name: at
in: query
description: Block at which to query balance info for the specified account.
required: false
schema:
type: string
description: Block height (as a non-negative integer) or hash (as a hex string).
format: unsignedInteger or $hex
- name: useRcBlock
in: query
description: When set to 'true', uses the relay chain block specified in the 'at' parameter to determine corresponding Asset Hub block(s) for retrieving balance info. Only supported for Asset Hub endpoints. Requires 'at' parameter to specify the relay chain block. When used, returns an array of response objects (one for each Asset Hub block found) or empty array if none found.
required: false
schema:
type: boolean
description: When set to 'true', uses relay chain block mode with the 'at' parameter.
- name: useRcBlockFormat
in: query
description: Controls the response format when using 'useRcBlock=true'. When set to 'object', wraps the response in an object containing relay chain block info ('rcBlock') and the parachain data array ('parachainDataPerBlock'). When set to 'array' or omitted, returns the standard array format. Only valid when 'useRcBlock=true' is specified.
required: false
schema:
type: string
enum:
- array
- object
description: Response format - 'array' (default) returns standard array, 'object' wraps response with rcBlock info.
- name: token
in: query
description: 'Token to query the balance of. If not specified it will query the chains native token (e.g. DOT for Polkadot). Note: this is only relevant for chains that support multiple tokens through the ORML tokens pallet.'
required: false
schema:
type: string
description: Token symbol
- name: denominated
in: query
description: When set to `true` it will denominate any balance's given atomic value using the chains given decimal value.
required: false
schema:
type: boolean
default: false
responses:
'200':
description: successful operation
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/AccountBalanceInfo'
- type: array
items:
$ref: '#/components/schemas/AccountBalanceInfo'
description: Returns a single object when using standard parameters. Returns an array when using 'useRcBlock' parameter (array contains one object per Asset Hub block found, or empty array if none found).
'400':
description: Invalid Address, invalid blockId supplied for at query param, or invalid parameter combination
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: account not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/accounts/{accountId}/convert:
get:
tags:
- accounts
summary: Convert a given AccountId to an SS58 address.
description: Returns the SS58 prefix, the network address format, the SS58 address, and the AccountId that was given as input parameter, the scheme that was used and if it is a public key or not (boolean).
operationId: accountConvert
parameters:
- name: accountId
in: path
description: AccountId or Public Key (hex).
required: true
schema:
format: AccountId or Hex
type: string
- name: scheme
in: query
description: The cryptographic scheme to be used in order to convert the AccountId to an SS58 address. It can take one of three values [sr25519, ed25519, ecdsa]. The default scheme that is used is `sr25519` (if it is not set in the query parameter).
required: false
schema:
type: string
format: string
default: sr25519
- name: prefix
in: query
description: The address prefix which can be one of the values found in the SS58-registry.
required: false
schema:
type: string
format: number
default: 42
- name: publicKey
in: query
description: Defines if the given value in the path parameter is a Public Key (hex) or not (hence AccountId).
required: false
schema:
type: string
format: boolean
default: true
responses:
'200':
description: successfully converted the AccountId and retrieved the address info.
content:
application/json:
schema:
$ref: '#/components/schemas/AccountConvert'
'400':
description: Invalid AccountId
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: AccountId not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/accounts/{accountId}/pool-asset-balances:
get:
tags:
- accounts
summary: Get an array of pool-asset-balances for an account.
description: Returns information about an account's pool-asset-balances. This is specific to the pool assets pallet for parachains. If no `assets` query parameter is provided, all pool-asset-balances for the given account will be returned.
operationId: getPoolAssetBalances
parameters:
- name: accountId
in: path
description: SS58 address of the account.
required: true
schema:
type: string
format: SS58
- name: at
in: query
description: Block at which to query pool-asset-balance info for the specified account.
required: false
schema:
type: string
description: Block height (as a positive integer) or hash (as a hex string).
format: unsignedInteger or $hex
- name: useRcBlock
in: query
description: When set to 'true', uses the relay chain block specified in the 'at' parameter to determine corresponding Asset Hub block(s) for retrieving pool-asset-balance info. Only supported for Asset Hub endpoints. Requires 'at' parameter to specify the relay chain block. When used, returns an array of response objects (one for each Asset Hub block found) or empty array if none found.
required: false
schema:
type: boolean
description: When set to 'true', uses relay chain block mode with the 'at' parameter.
- name: useRcBlockFormat
in: query
description: Controls the response format when using 'useRcBlock=true'. When set to 'object', wraps the response in an object containing relay chain block info ('rcBlock') and the parachain data array ('parachainDataPerBlock'). When set to 'array' or omitted, returns the standard array format. Only valid when 'useRcBlock=true' is specified.
required: false
schema:
type: string
enum:
- array
- object
description: Response format - 'array' (default) returns standard array, 'object' wraps response with rcBlock info.
- name: assets
in: query
description: An array of AssetId's to be queried. If not supplied, defaults to providing all asset balances associated with the `accountId` will be returned. The array query param format follows Express 4.x API. ex:`?assets[]=1&assets[]=2&assets[]=3`.
required: false
schema:
type: array
items:
type: string
description: A list of assetId numbers represented as strings
format: Array of unsignedInteger's
responses:
'200':
description: successfull operation
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/AccountPoolAssetsBalances'
- type: array
items:
$ref: '#/components/schemas/AccountPoolAssetsBalances'
description: Returns a single object when using standard parameters. Returns an array when using 'useRcBlock' parameter (array contains one object per Asset Hub block found, or empty array if none found).
'400':
description: Invalid Address, invalid blockId supplied for at query param, or invalid parameter combination
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/accounts/{accountId}/pool-asset-approvals:
get:
tags:
- accounts
summary: Get an asset approval for an account.
description: Returns information about an account's asset approval transaction. It is required to pass in a delegate and an assetId as query parameters.
operationId: getPoolAssetApprovals
parameters:
- name: accountId
in: path
description: SS58 address of the account.
required: true
schema:
type: string
format: SS58
- name: at
in: query
description: Block at which to query asset approval info for the specified account.
required: false
schema:
type: string
description: Block height (as a non-negative integer) or hash (as a hex string).
format: unsignedInteger or $hex
- name: useRcBlock
in: query
description: When set to 'true', uses the relay chain block specified in the 'at' parameter to determine corresponding Asset Hub block(s) for retrieving pool-asset-approval info. Only supported for Asset Hub endpoints. Requires 'at' parameter to specify the relay chain block. When used, returns an array of response objects (one for each Asset Hub block found) or empty array if none found.
required: false
schema:
type: boolean
description: When set to 'true', uses relay chain block mode with the 'at' parameter.
- name: useRcBlockFormat
in: query
description: Controls the response format when using 'useRcBlock=true'. When set to 'object', wraps the response in an object containing relay chain block info ('rcBlock') and the parachain data array ('parachainDataPerBlock'). When set to 'array' or omitted, returns the standard array format. Only valid when 'useRcBlock=true' is specified.
required: false
schema:
type: string
enum:
- array
- object
description: Response format - 'array' (default) returns standard array, 'object' wraps response with rcBlock info.
- name: assetId
in: query
description: The `assetId` associated with the asset-approval.
required: true
schema:
type: string
description: An assetId represented as an unsignedInteger.
format: unsignedInteger
- name: delegate
in: query
description: The delegate's `accountId` associated with an asset-approval.
required: true
schema:
type: string
format: SS58
responses:
'200':
description: successfull operation
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/AccountAssetsApproval'
- type: array
items:
$ref: '#/components/schemas/AccountAssetsApproval'
description: Returns a single object when using standard parameters. Returns an array when using 'useRcBlock' parameter (array contains one object per Asset Hub block found, or empty array if none found).
'400':
description: Invalid Address, invalid blockId supplied for at query param, or invalid parameter combination
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/accounts/{accountId}/foreign-asset-balances:
get:
tags:
- accounts
summary: Get an array of foreign-asset-balances for an account.
description: Returns information about an account's foreign-asset-balances. This is specific to the foreignAssets pallet for parachains. If no `foreignAssets` query parameter is provided, all foreign-asset-balances for the given account will be returned.
operationId: getForeignAssetBalances
parameters:
- name: accountId
in: path
description: SS58 address of the account.
required: true
schema:
type: string
format: SS58
- name: at
in: query
description: Block at which to query foreign-asset-balance info for the specified account.
required: false
schema:
type: string
description: Block height (as a positive integer) or hash (as a hex string).
format: unsignedInteger or $hex
- name: useRcBlock
in: query
description: When set to 'true', uses the relay chain block specified in the 'at' parameter to determine corresponding Asset Hub block(s) for retrieving foreign-asset-balance info. Only supported for Asset Hub endpoints. Requires 'at' parameter to specify the relay chain block. When used, returns an array of response objects (one for each Asset Hub block found) or empty array if none found.
required: false
schema:
type: boolean
description: When set to 'true', uses relay chain block mode with the 'at' parameter.
- name: useRcBlockFormat
in: query
description: Controls the response format when using 'useRcBlock=true'. When set to 'object', wraps the response in an object containing relay chain block info ('rcBlock') and the parachain data array ('parachainDataPerBlock'). When set to 'array' or omitted, returns the standard array format. Only valid when 'useRcBlock=true' is specified.
required: false
schema:
type: string
enum:
- array
- object
description: Response format - 'array' (default) returns standard array, 'object' wraps response with rcBlock info.
- name: foreignAssets
in: query
description: An array of multilocation JSON strings to be queried. If not supplied, all foreign asset balances associated with the `accountId` will be returned. The array query param format follows Express 4.x API. ex:`?foreignAssets[]={"parents":"1","interior":{"X1":{"Parachain":"2125"}}}&foreignAssets[]={"parents":"2","interior":{"X1":{"GlobalConsensus":"Polkadot"}}}`.
required: false
schema:
type: array
items:
type: string
description: An array of multilocation objects represented as JSON strings.
format: Array of JSON strings
responses:
'200':
description: successful operation
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/AccountForeignAssetsBalances'
- type: array
items:
$ref: '#/components/schemas/AccountForeignAssetsBalances'
description: Returns a single object when using standard parameters. Returns an array when using 'useRcBlock' parameter (array contains one object per Asset Hub block found, or empty array if none found).
'400':
description: Invalid Address, invalid blockId supplied for at query param, or invalid parameter combination
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/accounts/{accountId}/proxy-info:
get:
tags:
- accounts
summary: Get proxy account information.
description: Returns information about a proxy account. This will include delegated accounts and deposits held.
operationId: getProxyInfo
parameters:
- name: accountId
in: path
description: SS58 address of the account.
required: true
schema:
type: string
format: SS58
- name: at
in: query
description: Block at which to query proxy info for the specified account.
required: false
schema:
type: string
description: Block height (as a non-negative integer) or hash (as a hex string).
format: unsignedInteger or $hex
- name: useRcBlock
in: query
description: When set to 'true', uses the relay chain block specified in the 'at' parameter to determine corresponding Asset Hub block(s) for retrieving proxy info. Only supported for Asset Hub endpoints. Requires 'at' parameter to specify the relay chain block. When used, returns an array of response objects (one for each Asset Hub block found) or empty array if none found.
required: false
schema:
type: boolean
description: When set to 'true', uses relay chain block mode with the 'at' parameter.
- name: useRcBlockFormat
in: query
description: Controls the response format when using 'useRcBlock=true'. When set to 'object', wraps the response in an object containing relay chain block info ('rcBlock') and the parachain data array ('parachainDataPerBlock'). When set to 'array' or omitted, returns the standard array format. Only valid when 'useRcBlock=true' is specified.
required: false
schema:
type: string
enum:
- array
- object
description: Response format - 'array' (default) returns standard array, 'object' wraps response with rcBlock info.
responses:
'200':
description: successfull operation
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/AccountProxyInfo'
- type: array
items:
$ref: '#/components/schemas/AccountProxyInfo'
description: Returns a single object when using standard parameters. Returns an array when using 'useRcBlock' parameter (array contains one object per Asset Hub block found, or empty array if none found).
'400':
description: Invalid Address, invalid blockId supplied for at query param, or invalid parameter combination
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/accounts/{accountId}/vesting-info:
get:
tags:
- accounts
summary: Get vesting information for an account.
description: Returns the vesting schedule for an account. Replaces `/vesting/{address}` from versions < v1.0.0.
operationId: getVestingSummaryByAccountId
parameters:
- name: accountId
in: path
description: SS58 address of the account.
required: true
schema:
format: SS58
type: string
- name: at
in: query
description: Block at which to query the vesting info for the specified account.
required: false
schema:
type: string
description: Block identifier, as the block height or block hash.
format: unsignedInteger or $hex
- name: useRcBlock
in: query
description: When set to 'true', uses the relay chain block specified in the 'at' parameter to determine corresponding Asset Hub block(s) for retrieving vesting info. Only supported for Asset Hub endpoints. Requires 'at' parameter to specify the relay chain block. When used, returns an array of response objects (one for each Asset Hub block found) or empty array if none found.
required: false
schema:
type: boolean
description: When set to 'true', uses relay chain block mode with the 'at' parameter.
- name: useRcBlockFormat
in: query
description: Controls the response format when using 'useRcBlock=true'. When set to 'object', wraps the response in an object containing relay chain block info ('rcBlock') and the parachain data array ('parachainDataPerBlock'). When set to 'array' or omitted, returns the standard array format. Only valid when 'useRcBlock=true' is specified.
required: false
schema:
type: string
enum:
- array
- object
description: Response format - 'array' (default) returns standard array, 'object' wraps response with rcBlock info.
- name: includeClaimable
in: query
description: When set to 'true', calculates and includes vested amounts for each vesting schedule plus the claimable amount. For Asset Hub post-migration queries, this requires a relay chain connection since vesting schedules use relay chain block numbers.
required: false
schema:
type: boolean
responses:
'200':
description: successful operation
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/AccountVestingInfo'
- type: array
items:
$ref: '#/components/schemas/AccountVestingInfo'
description: Returns a single object when using standard parameters. Returns an array when using 'useRcBlock' parameter (array contains one object per Asset Hub block found, or empty array if none found).
'400':
description: Invalid Address, invalid blockId supplied for at query param, or invalid parameter combination
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: account not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/accounts/{address}/validate:
get:
tags:
- accounts
summary: Validate a given address.
description: Returns whether the given address is valid ss58 format, the ss58 prefix if the address has one, the network address format, and what the account ID is for this address.
operationId: getValidationByAccountId
parameters:
- name: address
in: path
description: SS58 or Hex address of the account.
required: true
schema:
format: SS58 or Hex
type: string
responses:
'200':
description: successfully retrieved address info
content:
application/json:
schema:
$ref: '#/components/schemas/AccountValidation'
/accounts/compare:
get:
tags:
- accounts
summary: Compares up to 30 SS58 addresses.
description: Returns if the given addresses are equal or not, along with details of each address. Equality is determined by comparing the accountId/publicKey of each address.
operationId: accountCompare
parameters:
- name: addresses
in: query
description: An array or a comma separated string of SS58 addresses. Provide up to 30 addresses using one of these formats `?addresses=...&
# --- truncated at 32 KB (49 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/kusama/refs/heads/main/openapi/kusama-accounts-api-openapi.yml