openapi: 3.1.0 info: title: Polkadot REST Account Extrinsic API description: High-performance Rust REST API for Substrate/Polkadot blockchain data. Drop-in replacement for substrate-api-sidecar. contact: url: https://github.com/paritytech/polkadot-rest-api license: name: GPL-3.0-or-later version: 0.1.3 servers: - url: http://localhost:8080/v1 description: Localhost tags: - name: Extrinsic paths: /api/scan/extrinsic: post: description: Returns extrinsic details by extrinsic_index or hash, with optional event and parameter controls. parameters: - description: params in: body name: params required: true schema: $ref: '#/definitions/internal_server_http.ExtrinsicDetailParams' produces: - application/json responses: '200': description: OK schema: allOf: - $ref: '#/definitions/internal_server_http.J' - properties: data: $ref: '#/definitions/subscan_internal_model.ExtrinsicDetail' type: object summary: Get extrinsic details tags: - Extrinsic x-synonyms: - extrinsic - scan - transaction - tx - on-chain call /api/scan/extrinsic/params: post: consumes: - application/json description: Returns parsed parameter payloads for up to 100 extrinsic indexes. parameters: - description: params in: body name: params required: true schema: $ref: '#/definitions/internal_server_http.extrinsicParamsParams' produces: - application/json responses: '200': description: OK schema: allOf: - $ref: '#/definitions/internal_server_http.J' - properties: data: items: $ref: '#/definitions/subscan_internal_model.ChainExtrinsicParams' type: array type: object summary: Get extrinsic parameters tags: - Extrinsic x-synonyms: - extrinsic - parameters - scan - params - transaction - tx - on-chain call /api/scan/extrinsic/reward: post: consumes: - application/json description: 'Returns the reward records associated with one extrinsic index. This API only supports networks with staking frame or parachain-staking pallet' parameters: - description: params in: body name: params required: true schema: $ref: '#/definitions/internal_server_http.extrinsicRewardParams' produces: - application/json responses: '200': description: OK schema: allOf: - $ref: '#/definitions/internal_server_http.J' - properties: data: properties: count: type: integer list: items: $ref: '#/definitions/subscan_internal_model.ExtrinsicRewardJson' type: array type: object type: object summary: List extrinsic reward records tags: - Extrinsic x-synonyms: - extrinsic - reward - scan - transaction - tx - on-chain call /api/scan/getRawTx: post: consumes: - application/json description: Returns the raw transaction hex for an extrinsic index or extrinsic hash. parameters: - description: params in: body name: params required: true schema: $ref: '#/definitions/internal_server_http.rawTxParams' produces: - application/json responses: '200': description: OK schema: allOf: - $ref: '#/definitions/internal_server_http.J' - properties: data: type: string type: object summary: Get raw extrinsic transaction tags: - Extrinsic x-synonyms: - raw - extrinsic - transaction - scan - getrawtx - tx - on-chain call /api/scan/pendingExtrinsics: post: consumes: - application/json description: Returns currently pending extrinsics in the mempool. produces: - application/json responses: '200': description: OK schema: allOf: - $ref: '#/definitions/internal_server_http.J' - properties: data: properties: extrinsics: items: $ref: '#/definitions/subscan_internal_model.ChainExtrinsicJson' type: array type: object type: object summary: List pending extrinsics tags: - Extrinsic x-synonyms: - pending - extrinsics - extrinsic - scan - pendingextrinsics - transaction - tx - on-chain call /api/v2/scan/extrinsics: post: consumes: - application/json description: Returns paginated extrinsics with module/call, signer, success, and block-range filters. parameters: - description: params in: body name: params required: true schema: $ref: '#/definitions/internal_server_http.extrinsicsParams' produces: - application/json responses: '200': description: OK schema: allOf: - $ref: '#/definitions/internal_server_http.J' - properties: data: properties: count: type: integer extrinsics: items: $ref: '#/definitions/subscan_internal_model.ChainExtrinsicV2Json' type: array type: object type: object summary: List extrinsics tags: - Extrinsic x-synonyms: - extrinsics - extrinsic - scan - transaction - tx - on-chain call definitions: subscan_internal_model.AccountParentJson: properties: address: type: string display: type: string identity: type: boolean sub_symbol: type: string type: object subscan_internal_model.TransferJson: properties: amount: type: string asset_symbol: type: string from: type: string hash: type: string module: type: string success: type: boolean to: type: string to_account_display: $ref: '#/definitions/subscan_internal_model.AccountDisplay' type: object subscan_internal_model.ExtrinsicSubCallJson: properties: account: $ref: '#/definitions/subscan_internal_model.AccountDisplay' exec_result: $ref: '#/definitions/subscan_libs_substrate.MetadataModuleError' exec_status: type: string module: type: string multisig: $ref: '#/definitions/subscan_internal_model.MultisigJson' name: type: string param: {} sub_calls: items: $ref: '#/definitions/subscan_internal_model.ExtrinsicSubCallJson' type: array type: object subscan_internal_model.ExtrinsicDetail: properties: account_display: $ref: '#/definitions/subscan_internal_model.AccountDisplay' account_id: type: string additional_meta: additionalProperties: true type: object asset_fee: $ref: '#/definitions/subscan_internal_model.ExtrinsicAssetFee' block_hash: type: string block_num: type: integer block_timestamp: type: integer call_module: type: string call_module_function: type: string error: $ref: '#/definitions/subscan_internal_model.ExtrinsicError' event: items: $ref: '#/definitions/subscan_internal_model.ChainEventJson' type: array event_count: type: integer extrinsic_hash: type: string extrinsic_index: type: string fee: type: string fee_used: type: string finalized: type: boolean lifetime: $ref: '#/definitions/subscan_internal_model.Lifetime' multisig: items: $ref: '#/definitions/subscan_internal_model.MultisigJson' type: array nonce: type: integer params: items: $ref: '#/definitions/subscan_internal_model.ExtrinsicParam' type: array pending: type: boolean signature: type: string sub_calls: items: $ref: '#/definitions/subscan_internal_model.ExtrinsicSubCallJson' type: array success: type: boolean tip: type: string transfer: $ref: '#/definitions/subscan_internal_model.TransferJson' type: object internal_server_http.moduleCallFilterParams: properties: call: type: string module: type: string type: object internal_server_http.J: properties: code: example: 0 type: integer data: {} generated_at: example: 1699600641 type: integer message: example: Success type: string type: object subscan_libs_substrate.MetadataModuleError: properties: doc: items: type: string type: array module: type: string name: type: string value: type: string type: object internal_server_http.extrinsicParamsParams: properties: extrinsic_index: items: type: string type: array required: - extrinsic_index type: object subscan_internal_model.AccountDisplay: properties: account_index: type: string address: description: Current network account type: string display: type: string evm_address: type: string evm_contract: $ref: '#/definitions/subscan_internal_model.EvmAccountDisplay' identity: type: boolean judgements: items: $ref: '#/definitions/subscan_internal_model.RegistrationJudgementJson' type: array merkle: $ref: '#/definitions/subscan_internal_model.MerkleTag' parent: allOf: - $ref: '#/definitions/subscan_internal_model.AccountParentJson' description: Parent account people: $ref: '#/definitions/subscan_internal_model.SampleIdentity' type: object subscan_internal_model.MerkleTag: properties: address_type: type: string tag_name: type: string tag_subtype: type: string tag_type: type: string type: object subscan_internal_model.ExtrinsicParam: properties: name: type: string type: type: string type_name: type: string value: {} type: object subscan_internal_model.SampleIdentity: properties: display: type: string identity: type: boolean judgements: items: $ref: '#/definitions/subscan_internal_model.RegistrationJudgementJson' type: array parent: $ref: '#/definitions/subscan_internal_model.AccountParentJson' type: object internal_server_http.extrinsicRewardParams: properties: extrinsic_index: type: string page: description: Page number, starting from 0 example: 0 minimum: 0 type: integer row: description: Data size per page example: 10 maximum: 100 minimum: 1 type: integer required: - extrinsic_index type: object subscan_internal_model.MultisigJson: properties: call_hash: type: string call_module: type: string call_module_function: type: string error: $ref: '#/definitions/subscan_internal_model.ExtrinsicError' extrinsic_index: type: string multi_id: type: string multisig_account_display: $ref: '#/definitions/subscan_internal_model.AccountDisplay' multisig_status: $ref: '#/definitions/subscan_internal_model.MultiAction' processing: type: integer threshold: type: integer type: object internal_server_http.extrinsicsParams: properties: address: type: string after_id: type: integer block_num: minimum: 0 type: integer block_range: type: string call: type: string module: type: string module_call: items: $ref: '#/definitions/internal_server_http.moduleCallFilterParams' type: array order: enum: - asc - desc type: string page: description: Page number, starting from 0 example: 0 minimum: 0 type: integer row: description: Data size per page example: 10 maximum: 100 minimum: 1 type: integer signed: type: string success: type: boolean timeout: type: integer type: object subscan_internal_model.EvmAccountDisplay: properties: contract_name: type: string verify_source: type: string type: object subscan_internal_model.ChainExtrinsicV2Json: properties: account_display: $ref: '#/definitions/subscan_internal_model.AccountDisplay' additional_meta: additionalProperties: true type: object block_num: type: integer block_timestamp: type: integer call_module: type: string call_module_function: type: string extrinsic_hash: type: string extrinsic_index: type: string fee: type: string fee_used: type: string finalized: type: boolean id: type: integer nonce: type: integer success: type: boolean tip: type: string type: object subscan_internal_model.Lifetime: properties: birth: type: integer death: type: integer type: object internal_server_http.rawTxParams: properties: extrinsic_index: description: Optional, extrinsic index type: string hash: description: Optional, extrinsic hash type: string type: object subscan_internal_model.ExtrinsicAssetFee: properties: decimal: type: integer fee: type: string fee_used: type: string symbol: type: string token_unique_id: type: string type: object subscan_internal_model.ChainExtrinsicJson: properties: account_display: $ref: '#/definitions/subscan_internal_model.AccountDisplay' account_id: type: string account_index: type: string block_num: type: integer block_timestamp: type: integer call_module: type: string call_module_function: type: string extrinsic_hash: type: string extrinsic_index: type: string fee: type: string fee_used: type: string finalized: type: boolean from_hex: type: string nonce: type: integer params: type: string signature: type: string success: type: boolean type: object subscan_internal_model.ChainExtrinsicParams: properties: extrinsic_index: type: string params: items: $ref: '#/definitions/subscan_internal_model.ExtrinsicParam' type: array type: object subscan_internal_model.MultiAction: enum: - Approval - Executed - Cancelled - Failed type: string x-enum-varnames: - MultiActionApproval - MultiActionExecuted - MultiActionCancelled - MultiActionExecuteFailed subscan_internal_model.ChainEventJson: properties: block_num: type: integer block_timestamp: type: integer event_id: type: string event_idx: type: integer event_index: type: string extrinsic_hash: type: string extrinsic_idx: type: integer finalized: type: boolean module_id: type: string params: type: string phase: type: integer type: object subscan_internal_model.ExtrinsicError: properties: batch_index: type: integer doc: type: string module: type: string name: type: string value: type: string version: type: integer type: object subscan_internal_model.RegistrationJudgementJson: properties: index: type: integer judgement: type: string type: object internal_server_http.ExtrinsicDetailParams: properties: events_limit: type: integer extrinsic_index: type: string hash: type: string hide_events: description: hide events in response type: boolean type: object subscan_internal_model.ExtrinsicRewardJson: properties: account: $ref: '#/definitions/subscan_internal_model.AccountDisplay' amount: type: string type: object