openapi: 3.1.0 info: title: Polkadot REST Account Xcm 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: Xcm paths: /api/scan/xcm/bridge_stat: post: consumes: - application/json description: '**PRO API**: Requires a [Pro plan](http://pro.subscan.io/). Returns bridge-type XCM statistics grouped by time format.' parameters: - description: params in: body name: params required: true schema: $ref: '#/definitions/internal_server_http.BridgeStatParams' produces: - application/json responses: '200': description: OK schema: allOf: - $ref: '#/definitions/internal_server_http.J' - properties: data: additionalProperties: items: $ref: '#/definitions/subscan_internal_model.BridgeStatStatJson' type: array type: object type: object summary: '[PRO] Get XCM bridge statistics' tags: - Xcm x-synonyms: - xcm - bridge - statistics - pro - scan - stat - cross-chain - cross chain - bridge message /api/scan/xcm/channel: post: consumes: - application/json description: '**PRO API**: Requires a [Pro plan](http://pro.subscan.io/). Returns one XCM/HRMP channel by sender and recipient parachain IDs.' parameters: - description: params in: body name: params required: true schema: $ref: '#/definitions/internal_server_http.XcmChannelInfoParams' produces: - application/json responses: '200': description: OK schema: allOf: - $ref: '#/definitions/internal_server_http.J' - properties: data: $ref: '#/definitions/subscan_internal_model.HrmpChannel' type: object summary: '[PRO] Get XCM channel details' tags: - Xcm x-synonyms: - xcm - channel - pro - scan - cross-chain - cross chain - bridge message /api/scan/xcm/channels: post: consumes: - application/json description: '**PRO API**: Requires a [Pro plan](http://pro.subscan.io/). Returns XCM/HRMP channel list filtered by sender, recipient, status, or para_id.' parameters: - description: params in: body name: params required: true schema: $ref: '#/definitions/internal_server_http.XcmChannelParams' produces: - application/json responses: '200': description: OK schema: allOf: - $ref: '#/definitions/internal_server_http.J' - properties: data: properties: list: items: $ref: '#/definitions/subscan_internal_model.HrmpChannel' type: array type: object type: object summary: '[PRO] List XCM channels' tags: - Xcm x-synonyms: - xcm - channels - pro - scan - cross-chain - cross chain - bridge message /api/scan/xcm/check_hash: post: consumes: - application/json description: '**PRO API**: Requires a [Pro plan](http://pro.subscan.io/). Returns the XCM message unique ID from origin or destination event/hash inputs.' parameters: - description: params in: body name: params required: true schema: $ref: '#/definitions/internal_server_http.XcmHashParams' produces: - application/json responses: '200': description: OK schema: allOf: - $ref: '#/definitions/internal_server_http.J' - properties: data: type: string type: object summary: '[PRO] Find XCM message ID by hash' tags: - Xcm x-synonyms: - find - xcm - message - id - hash - pro - scan - check - cross-chain - cross chain - bridge message /api/scan/xcm/info: post: consumes: - application/json description: '**PRO API**: Requires a [Pro plan](http://pro.subscan.io/). Returns detailed information for one XCM message by unique_id or origin identifiers.' parameters: - description: params in: body name: params required: true schema: $ref: '#/definitions/internal_server_http.XcmMessageDetailParams' produces: - application/json responses: '200': description: OK schema: allOf: - $ref: '#/definitions/internal_server_http.J' - properties: data: $ref: '#/definitions/subscan_internal_model.ParaXcmMessageJson' type: object summary: '[PRO] Get XCM message details' tags: - Xcm x-synonyms: - xcm - message - pro - scan - cross-chain - cross chain - bridge message /api/scan/xcm/list: post: consumes: - application/json description: '**PRO API**: Requires a [Pro plan](http://pro.subscan.io/). Returns paginated XCM messages with protocol, status, asset, and block-range filters.' parameters: - description: params in: body name: params required: true schema: $ref: '#/definitions/internal_server_http.XcmMessageParams' 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.ParaXcmMessageJson' type: array type: object type: object summary: '[PRO] List XCM messages' tags: - Xcm x-synonyms: - xcm - messages - pro - scan - cross-chain - cross chain - bridge message /api/scan/xcm/meta: post: consumes: - application/json description: '**PRO API**: Requires a [Pro plan](http://pro.subscan.io/). Returns XCM metadata and parachain statistics, optionally filtered by para_id.' parameters: - description: params in: body name: params required: true schema: $ref: '#/definitions/internal_server_http.XcmMetaParams' produces: - application/json responses: '200': description: OK schema: allOf: - $ref: '#/definitions/internal_server_http.J' - properties: data: $ref: '#/definitions/subscan_internal_model.XcmMeta' type: object summary: '[PRO] Get XCM metadata' tags: - Xcm x-synonyms: - xcm - metadata - pro - scan - meta - cross-chain - cross chain - bridge message - chain info /api/scan/xcm/parachain/stat: post: consumes: - application/json description: '**PRO API**: Requires a [Pro plan](http://pro.subscan.io/). Returns XCM parachain send/receive statistics with optional direction and date filters.' parameters: - description: params in: body name: params required: true schema: $ref: '#/definitions/internal_server_http.xcmSenderStatParams' produces: - application/json responses: '200': description: OK schema: allOf: - $ref: '#/definitions/internal_server_http.J' - properties: data: items: $ref: '#/definitions/subscan_internal_model.XcmMessageCountStatJson' type: array type: object summary: '[PRO] Get XCM parachain statistics' tags: - Xcm x-synonyms: - xcm - parachain - statistics - pro - scan - stat - cross-chain - cross chain - bridge message - para chain - relaychain shard /api/scan/xcm/stat: post: consumes: - application/json description: '**PRO API**: Requires a [Pro plan](http://pro.subscan.io/). Returns XCM traffic statistics for a date range and optional parachain filter.' parameters: - description: params in: body name: params required: true schema: $ref: '#/definitions/internal_server_http.XcmStatParams' produces: - application/json responses: '200': description: OK schema: allOf: - $ref: '#/definitions/internal_server_http.J' - properties: data: properties: all: items: $ref: '#/definitions/subscan_internal_model.XcmMessageStatJson' type: array receiver: items: $ref: '#/definitions/subscan_internal_model.XcmMessageStatJson' type: array send: items: $ref: '#/definitions/subscan_internal_model.XcmMessageStatJson' type: array type: object type: object summary: '[PRO] Get XCM statistics' tags: - Xcm x-synonyms: - xcm - statistics - pro - scan - stat - cross-chain - cross chain - bridge message /api/v2/scan/xcm/list: post: consumes: - application/json description: '**PRO API**: Requires a Pro plan. Returns paginated XCM messages with protocol, status, asset, and block-range filters.' parameters: - description: params in: body name: params required: true schema: $ref: '#/definitions/internal_server_http.XcmMessageV2Params' produces: - application/json responses: '200': description: OK schema: allOf: - $ref: '#/definitions/internal_server_http.J' - properties: data: properties: count: type: integer daily: items: $ref: '#/definitions/subscan_internal_model.ParaXcmMessageTokenDailyCountJson' type: array list: items: $ref: '#/definitions/subscan_internal_model.ParaXcmMessageJson' type: array total: items: $ref: '#/definitions/subscan_internal_model.ParaXcmMessageTokenTotalJson' type: array type: object type: object summary: '[PRO] List XCM messages' tags: - Xcm x-synonyms: - xcm - messages - pro - scan - cross-chain - cross chain - bridge message definitions: subscan_internal_model.MultiAssets: properties: amount: type: string asset_module: type: string asset_unique_id: type: string current_currency_amount: type: string decimals: type: integer enum_key: type: string history_currency_amount: type: string network: type: string raw: {} symbol: type: string version: type: string type: object internal_server_http.XcmMessageDetailParams: properties: origin_event_id: description: sender event id, need with origin_para_id type: string origin_para_id: description: sender parachain id, need with origin_event_id type: integer unique_id: description: unique id of the message 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_internal_model.XcmMessageStatJson: properties: message_total: type: integer time_utc: type: string total: type: integer type: object subscan_internal_model.XcmErrorMsg: properties: doc: type: string name: type: string type: object subscan_internal_model.XcmMessageCountStatJson: properties: message_total: type: integer recipient: type: integer sender: type: integer transfer_total: type: integer type: object subscan_internal_model.ParaXcmMessageTokenDailyCountJson: properties: count: type: integer time: type: string type: object subscan_internal_model.ExtrinsicParam: properties: name: type: string type: type: string type_name: type: string value: {} type: object internal_server_http.XcmChannelParams: properties: filter_para_id: description: filter by parachain id(sender or recipient) minimum: 1 type: integer recipient: description: HRMP recipient parachain id minimum: 1 type: integer sender: description: HRMP sender parachain id minimum: 1 type: integer status: description: filter by status enum: - closed - accepted - canceled - requested type: string type: object subscan_internal_model.HrmpChannel: properties: active_at: type: integer message_count: type: integer proposed_max_capacity: type: integer proposed_max_message_size: type: integer recipient: type: integer sender: type: integer status: type: string transfer_count: type: integer type: object internal_server_http.xcmSenderStatParams: properties: direction: enum: - in - out type: string end: description: 'end date, format: 2006-01-02' type: string filter_para_id: description: filter by parachain id, optional,if filter_para_id =-1 ,return all parachain send stat minimum: -1 type: integer start: description: 'start date, format: 2006-01-02' type: string type: object subscan_internal_model.ExecutionFee: properties: asset_unique_id: type: string decimals: type: integer estimate_fee: type: string symbol: type: string type: object subscan_internal_model.BridgeStatStatJson: properties: time_utc: type: string total: type: integer type: object internal_server_http.XcmChannelInfoParams: properties: recipient: description: HRMP recipient parachain id minimum: 1 type: integer sender: description: HRMP sender parachain id minimum: 1 type: integer type: object subscan_internal_model.ParaXcmMessageJson: properties: assets: items: $ref: '#/definitions/subscan_internal_model.MultiAssets' type: array block_num: description: relay chain block num type: integer bridge_type: description: bridge type, like e2s(ethereum to substrate), s2e(substrate to ethereum), s2s(substrate to substrate) type: string call_data: description: xcm transact call data items: $ref: '#/definitions/subscan_internal_model.BoxProposal' type: array child_dest: type: string child_message: $ref: '#/definitions/subscan_internal_model.XcmMessageEmbeddedJson' child_para_id: type: integer confirm_block_timestamp: type: integer cross_chain_status: description: 'cross chain status, 0: not cross chain, 1: cross chain unconfirmed, 2: cross chain confirmed, 3: cross chain completed' type: integer dest_chain: description: dest chain, like Polkadot.kusama,Ethereum type: string dest_event_index: description: receive message event index type: string dest_extrinsic_index: description: receive message extrinsic index type: string dest_para_id: description: eq 0 if to relay chain type: integer dest_raw: {} error_msg: allOf: - $ref: '#/definitions/subscan_internal_model.XcmErrorMsg' description: message dispatch error msg extrinsic_index: description: Send message extrinsic index type: string fee_asset: $ref: '#/definitions/subscan_internal_model.ExecutionFee' from_account_id: description: sender address type: string from_chain: description: source chain, like Polkadot.kusama,Ethereum type: string message_hash: description: xcm message hash, type: string message_relay_chain: description: message relay chain name type: string message_type: description: transfer/message type: string metadata: $ref: '#/definitions/subscan_internal_model.CrossChainMetadata' origin_block_timestamp: type: integer origin_event_index: description: send message event index type: string origin_para_id: description: origin parachain id type: integer protocol: allOf: - $ref: '#/definitions/subscan_internal_model.CrossChainProtocol' description: UMP/DMP/HRMP relayed_block_timestamp: type: integer relayed_event_index: description: relaychain include message event index,only for HRMP protocol type: string relayed_extrinsic_index: description: relaychain include message extrinsic index,only for HRMP protocol type: string s2s_dest_para_id: description: s2s dest parachain id type: integer status: description: pending, success, failed type: string to_account_id: description: receiver address type: string to_account_raw: {} unique_id: description: global xcm message unique id type: string used_fee: description: used gas type: string xcm_version: description: xcm version type: integer type: object subscan_internal_model.CrossChainProtocol: enum: - UMP - DMP - HRMP - SnowBridge - SnowbridgeTanssi type: string x-enum-varnames: - UMPProtocol - DMPProtocol - HRMPProtocol - SnowBridge - SnowbridgeTanssi subscan_internal_model.ParaXcmMessageTokenTotalJson: properties: count: type: integer decimals: type: integer symbol: type: string unique_id: type: string value: type: string type: object internal_server_http.XcmMessageV2Params: properties: address: description: filter by address type: string after_id: description: Pagination, the last message id of the previous page type: string block_range: description: 'filter by block range,eg: 1000-2000' example: 20000-30000 type: string bridge_type: description: filter by bridge type items: type: string type: array dest_para_id: description: filter by receiver parachain id type: integer extrinsic_index: description: filter by send extrinsic index type: string filter_para_id: description: filter by parachain id(sender or receiver) minimum: 1 type: integer filter_symbol: description: filter by asset symbol type: string include_total: type: boolean message_hash: description: filter by message hash type: string message_type: description: filter by message type enum: - transfer - message type: string origin_para_id: description: filter by sender origin parachain id type: integer page: description: page number, start from 0 minimum: 0 type: integer protocol: description: filter by XCM protocol enum: - HRMP - VMP - UMP - DMP type: string row: description: page size maximum: 100 minimum: 0 type: integer status: description: filter by status enum: - pending - relayed - success - failed type: string type: object subscan_internal_model.XcmMessageEmbeddedJson: properties: block_num: description: relay chain block num type: integer bridge_type: description: bridge type, like e2s(ethereum to substrate), s2e(substrate to ethereum), s2s(substrate to substrate) type: string call_data: description: xcm transact call data items: $ref: '#/definitions/subscan_internal_model.BoxProposal' type: array child_dest: type: string child_message: $ref: '#/definitions/subscan_internal_model.XcmMessageEmbeddedJson' child_para_id: type: integer confirm_block_timestamp: type: integer cross_chain_status: description: 'cross chain status, 0: not cross chain, 1: cross chain unconfirmed, 2: cross chain confirmed, 3: cross chain completed' type: integer dest_chain: description: dest chain, like Polkadot.kusama,Ethereum type: string dest_event_index: description: receive message event index type: string dest_extrinsic_index: description: receive message extrinsic index type: string dest_para_id: description: eq 0 if to relay chain type: integer dest_raw: {} error_msg: allOf: - $ref: '#/definitions/subscan_internal_model.XcmErrorMsg' description: message dispatch error msg extrinsic_index: description: Send message extrinsic index type: string fee_asset: $ref: '#/definitions/subscan_internal_model.ExecutionFee' from_account_id: description: sender address type: string from_chain: description: source chain, like Polkadot.kusama,Ethereum type: string message_hash: description: xcm message hash, type: string message_relay_chain: description: message relay chain name type: string message_type: description: transfer/message type: string metadata: $ref: '#/definitions/subscan_internal_model.CrossChainMetadata' origin_block_timestamp: type: integer origin_event_index: description: send message event index type: string origin_para_id: description: origin parachain id type: integer protocol: allOf: - $ref: '#/definitions/subscan_internal_model.CrossChainProtocol' description: UMP/DMP/HRMP relayed_block_timestamp: type: integer relayed_event_index: description: relaychain include message event index,only for HRMP protocol type: string relayed_extrinsic_index: description: relaychain include message extrinsic index,only for HRMP protocol type: string s2s_dest_para_id: description: s2s dest parachain id type: integer status: description: pending, success, failed type: string to_account_id: description: receiver address type: string to_account_raw: {} unique_id: description: global xcm message unique id type: string used_fee: description: used gas type: string xcm_version: description: xcm version type: integer type: object internal_server_http.XcmStatParams: properties: end: description: 'end date, format: 2006-01-02' type: string filter_para_id: description: filter by parachain id, optional minimum: 1 type: integer start: description: 'start date, format: 2006-01-02' type: string required: - end - start type: object subscan_internal_model.XcmMeta: properties: all_channel: type: integer connected_parachain_count: type: integer online_parachain: type: integer open_channel: type: integer parachain_count_with_requested: type: integer received_xcm_message_count: type: integer received_xcm_transfer_count: type: integer relayed_message_count: type: integer relayed_transfer_count: type: integer send_xcm_message_count: type: integer send_xcm_transfer_count: type: integer support_parachain: type: integer type: object internal_server_http.XcmMetaParams: properties: para_id: description: optional, if not set or set 0, will return all parachain statistics type: integer type: object internal_server_http.XcmMessageParams: properties: address: description: filter by address type: string after_id: description: Pagination, the last message id of the previous page type: string block_range: description: 'filter by block range,eg: 1000-2000' example: 20000-30000 type: string bridge_type: description: filter by bridge type items: type: string type: array dest_para_id: description: filter by receiver parachain id type: integer extrinsic_index: description: filter by send extrinsic index type: string filter_para_id: description: filter by parachain id(sender or receiver) minimum: 1 type: integer filter_symbol: description: filter by asset symbol type: string message_hash: description: filter by message hash type: string message_type: description: filter by message type enum: - transfer - message type: string origin_para_id: description: filter by sender origin parachain id type: integer page: description: page number, start from 0 minimum: 0 type: integer protocol: description: filter by XCM protocol enum: - HRMP - VMP - UMP - DMP type: string row: description: page size maximum: 100 minimum: 1 type: integer status: description: filter by status enum: - pending - relayed - success - failed type: string type: object subscan_internal_model.BoxProposal: properties: call_index: type: string call_module: type: string call_name: type: string params: items: $ref: '#/definitions/subscan_internal_model.ExtrinsicParam' type: array type: object subscan_internal_model.CrossChainMetadata: properties: lane_id: description: s2s message laneId type: string message_id: description: ethBridge messageId type: string nonce: description: s2s message nonce type: integer send_at: description: ethBridge send time or received time type: integer tx_hash: description: ethBridge transaction hash type: string type: object internal_server_http.BridgeStatParams: properties: end: description: 'end date, format: 2006-01-02' type: string format: description: json result format, default is day enum: - hour - day - 6hour type: string start: description: 'start date, format: 2006-01-02' type: string required: - end - start type: object internal_server_http.XcmHashParams: properties: dest_event_id: description: receiver event id type: string dest_para_id: description: receiver parachain id type: integer message_hash: description: message hash type: string origin_event_id: description: sender event id type: string origin_para_id: description: sender parachain id type: integer type: object