openapi: 3.0.0 info: version: "1.7.0" title: M10 Block Explorer API description: '' license: name: MIT url: https://opensource.org/licenses/MIT servers: - url: https://app.dev.m10.net/block-explorer/api/v2 description: Autogenerated by build script security: [] paths: /accounts: get: summary: List accounts description: Retrieve a paginated list of accounts operationId: listAccounts tags: - Accounts parameters: - $ref: '#/components/parameters/pageNumberParam' - $ref: '#/components/parameters/pageLimitParam' - $ref: '#/components/parameters/sortingParam' - name: filter[id] in: query required: false description: Filter by account ID schema: type: string - name: filter[partial_id] in: query required: false description: Filter by partial account ID schema: type: string - name: filter[instrument_code] in: query required: false description: Filter by instrument code schema: type: string - name: filter[issuance] in: query required: false description: Filter by issuance status schema: type: boolean - name: filter[frozen] in: query required: false description: Filter by frozen status schema: type: boolean - name: filter[parent_id] in: query required: false description: Filter by parent account ID schema: type: string - name: filter[before_date] in: query required: false description: Filter by date before this timestamp schema: type: integer format: int64 - name: filter[after_date] in: query required: false description: Filter by date after this timestamp schema: type: integer format: int64 responses: '200': description: A paginated list of accounts content: application/vnd.api+json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/Account' links: $ref: '#/components/schemas/Links' meta: type: object included: type: array items: type: object required: - data '400': description: bad request content: application/vnd.api+json: schema: $ref: '#/components/schemas/Errors' '500': description: internal error content: application/vnd.api+json: schema: $ref: '#/components/schemas/Errors' /accounts/{id}: get: summary: Get an account by ID description: Retrieve a single account resource operationId: getAccount tags: - Accounts parameters: - in: path name: id required: true schema: type: string description: Account ID responses: '200': description: A single account content: application/vnd.api+json: schema: type: object properties: data: $ref: '#/components/schemas/Account' required: - data '400': description: bad request content: application/vnd.api+json: schema: $ref: '#/components/schemas/Errors' '404': description: not found '500': description: internal error content: application/vnd.api+json: schema: $ref: '#/components/schemas/Errors' /blocks: get: summary: List blocks description: Retrieve a paginated list of blocks operationId: listBlocks tags: - Blocks parameters: - $ref: '#/components/parameters/pageNumberParam' - $ref: '#/components/parameters/pageLimitParam' - $ref: '#/components/parameters/sortingParam' - name: filter[id] in: query required: false description: Filter by block ID schema: type: string - name: filter[partial_id] in: query required: false description: Filter by partial block ID schema: type: string - name: filter[hash] in: query required: false description: Filter by block hash schema: type: string - name: filter[status] in: query required: false description: Filter by block status schema: type: string - name: filter[proposer] in: query required: false description: Filter by block proposer schema: type: string responses: '200': description: A paginated list of blocks content: application/vnd.api+json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/Block' links: $ref: '#/components/schemas/Links' meta: type: object included: type: array items: type: object required: - data '400': description: bad request content: application/vnd.api+json: schema: $ref: '#/components/schemas/Errors' '500': description: internal error content: application/vnd.api+json: schema: $ref: '#/components/schemas/Errors' /blocks/{id}: get: summary: Get a block by ID description: Retrieve a single block resource operationId: getBlock tags: - Blocks parameters: - in: path name: id required: true schema: type: string description: The ID of the block to retrieve responses: '200': description: A single block content: application/vnd.api+json: schema: type: object properties: data: $ref: '#/components/schemas/Block' required: - data '400': description: bad request content: application/vnd.api+json: schema: $ref: '#/components/schemas/Errors' '404': description: not found '500': description: internal error content: application/vnd.api+json: schema: $ref: '#/components/schemas/Errors' /transactions: get: summary: List transactions description: Retrieve a paginated list of transactions operationId: listTransactions tags: - Transactions parameters: - $ref: '#/components/parameters/pageNumberParam' - $ref: '#/components/parameters/pageLimitParam' - $ref: '#/components/parameters/sortingParam' - name: filter[id] in: query required: false description: Filter by transaction ID schema: type: string - name: filter[partial_id] in: query required: false description: Filter by partial transaction ID schema: type: string - name: filter[from_account_id] in: query required: false description: Filter by sender account ID schema: type: string - name: filter[to_account_id] in: query required: false description: Filter by recipient account ID schema: type: string - name: filter[asset] in: query required: false description: Filter by asset ID schema: type: string - name: filter[block_id] in: query required: false description: Filter by block ID schema: type: string - name: filter[type] in: query required: false description: Filter by transaction type schema: type: string - name: filter[status] in: query required: false description: Filter by transaction status schema: type: string - name: filter[context_id] in: query required: false description: Filter by context ID schema: type: string - name: filter[signer_account_id] in: query required: false description: Filter by signer account ID schema: type: string - name: filter[signer_public_key] in: query required: false description: Filter by signer public key schema: type: string - name: filter[before_date] in: query required: false description: Filter by date before this timestamp schema: type: integer format: int64 - name: filter[after_date] in: query required: false description: Filter by date after this timestamp schema: type: integer format: int64 - name: filter[context_related] in: query required: false description: Filter by context related for sender and/or recipient schema: type: string enum: - sender - recipient - both responses: '200': description: A paginated list of transactions content: application/vnd.api+json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/Transaction' links: $ref: '#/components/schemas/Links' meta: type: object included: type: array items: type: object required: - data '400': description: bad request content: application/vnd.api+json: schema: $ref: '#/components/schemas/Errors' '500': description: internal error content: application/vnd.api+json: schema: $ref: '#/components/schemas/Errors' /transactions/{id}: get: summary: Get a transaction by ID description: Retrieve a single transaction resource operationId: getTransaction tags: - Transactions parameters: - in: path name: id required: true schema: type: string description: The ID of the transaction to retrieve responses: '200': description: A single transaction content: application/vnd.api+json: schema: type: object properties: data: $ref: '#/components/schemas/Transaction' required: - data '400': description: bad request content: application/vnd.api+json: schema: $ref: '#/components/schemas/Errors' '404': description: not found '500': description: internal error content: application/vnd.api+json: schema: $ref: '#/components/schemas/Errors' /transactions/metrics/{account_id}: get: summary: List transaction metrics description: Retrieve a paginated list of transactions metrics for a specific account. operationId: listTransactionMetrics tags: - Transactions parameters: - in: path name: account_id required: true schema: type: string description: Account ID - $ref: '#/components/parameters/pageNumberParam' - $ref: '#/components/parameters/pageLimitParam' - $ref: '#/components/parameters/sortingParam' - name: filter[date][from] in: query required: false description: Filter by date after this timestamp schema: type: integer format: int64 - name: filter[date][to] in: query required: false description: Filter by date before this timestamp schema: type: integer format: int64 - name: filter[interval] in: query required: false description: Filter by interval in milliseconds schema: type: integer format: int64 - name: filter[child_accounts] in: query required: false description: Sum child accounts metrics to the response schema: type: boolean responses: '200': description: A paginated list of transactions metrics content: application/vnd.api+json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/TransactionMetric' links: $ref: '#/components/schemas/Links' meta: type: object included: type: array items: type: object required: - data '400': description: bad request content: application/vnd.api+json: schema: $ref: '#/components/schemas/Errors' '500': description: internal error content: application/vnd.api+json: schema: $ref: '#/components/schemas/Errors' /assets/metrics/{account_id}: get: summary: List asset metrics description: Retrieve a paginated list of assets metrics for a specific account. operationId: listAssetMetrics tags: - Assets parameters: - in: path name: account_id required: true schema: type: string description: Account ID - $ref: '#/components/parameters/pageNumberParam' - $ref: '#/components/parameters/pageLimitParam' - $ref: '#/components/parameters/sortingParam' - name: filter[date][from] in: query required: false description: Filter by date after this timestamp schema: type: integer format: int64 - name: filter[date][to] in: query required: false description: Filter by date before this timestamp schema: type: integer format: int64 - name: filter[interval] in: query required: false description: Filter by interval in milliseconds schema: type: integer format: int64 responses: '200': description: A paginated list of assets metrics content: application/vnd.api+json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/AssetMetric' links: $ref: '#/components/schemas/Links' meta: type: object included: type: array items: type: object required: - data '400': description: bad request content: application/vnd.api+json: schema: $ref: '#/components/schemas/Errors' '500': description: internal error content: application/vnd.api+json: schema: $ref: '#/components/schemas/Errors' /search: get: summary: Search resources description: Search for accounts, transactions, blocks, or contexts based on various filters. operationId: search parameters: - $ref: '#/components/parameters/pageNumberParam' - $ref: '#/components/parameters/pageLimitParam' - $ref: '#/components/parameters/sortingParam' - name: filter[id] in: query required: false description: Filter by ID schema: type: string responses: '200': description: A paginated list of search results content: application/vnd.api+json: schema: type: object properties: data: type: array items: anyOf: - $ref: '#/components/schemas/TransactionUnified' - $ref: '#/components/schemas/ContextUnified' - $ref: '#/components/schemas/BlockUnified' - $ref: '#/components/schemas/AccountUnified' links: $ref: '#/components/schemas/Links' meta: type: object included: type: array items: type: object required: - data '400': description: bad request content: application/vnd.api+json: schema: $ref: '#/components/schemas/Errors' '500': description: internal error content: application/vnd.api+json: schema: $ref: '#/components/schemas/Errors' components: parameters: pageNumberParam: name: page[number] in: query description: Page number (zero-based) required: false schema: type: integer format: uint64 default: 0 pageLimitParam: name: page[limit] in: query description: Maximum number of items per page required: false schema: type: integer format: uint32 default: 15 sortingParam: name: sort in: query description: Sort the results by a specific field. Use a minus sign (-) to sort in descending order. required: false schema: type: string example: '-timestamp' schemas: AccountKey: type: object required: - id - type properties: id: type: string type: type: string enum: - account BalanceData: type: object description: Detailed balance information for an account properties: instrument_decimal_places: type: integer format: int32 description: Number of decimal places for the instrument instrument_code: type: string description: Instrument code display_code: type: string description: Display code for the instrument instrument_description: type: string description: Description of the instrument amount: type: string description: Balance amount as string locked_balance: type: string description: Amount locked in settlement operations available_balance: type: string description: Spendable balance (amount - locked_balance) required: - instrument_decimal_places - instrument_code - display_code - instrument_description - amount - locked_balance - available_balance Account: allOf: - $ref: '#/components/schemas/AccountKey' - type: object description: A single account resource required: - attributes properties: attributes: required: - tx_id - issuance - frozen - balance_limit - created_at properties: tx_id: type: string description: Transaction ID that created or last modified this account parent_id: type: string description: Parent account ID, if any issuance: type: boolean description: Whether this record is an issuance transaction frozen: type: boolean description: Whether the account is frozen balance_limit: type: string description: Balance limit for the account balance: $ref: '#/components/schemas/BalanceData' description: Current balance details (or omitted if none) created_at: type: integer format: int64 description: Creation timestamp, in milliseconds since epoch Links: type: object required: - self properties: self: type: string example: /api/v2/item?page[number]=1&page[limit]=15 description: Link to the current page prev: type: string example: /api/v2/item?page[number]=0&page[limit]=15 description: Previous page link next: type: string example: /api/v2/item?page[number]=2&page[limit]=15 description: Next page link Errors: description: Standard JSON:API error type: object required: - errors properties: errors: type: array description: Non empty array of errors occurred during request processing items: type: object required: - title - status properties: title: type: string description: Title is a short, human-readable summary of the problem example: Bad Request detail: type: string description: Detail is a human-readable explanation specific to this occurrence of the problem example: Request body was expected status: type: integer description: Status is the HTTP status code applicable to this problem example: 400 enum: - 400 - 401 - 403 - 404 - 409 - 500 BlockKey: type: object required: - id - type properties: id: type: string type: type: string enum: - block Block: allOf: - $ref: '#/components/schemas/BlockKey' - type: object description: A single block resource required: - attributes properties: attributes: required: - timestamp - proposer - status - tx_amount - size - hash properties: timestamp: type: integer format: int64 description: Block timestamp in milliseconds example: 1747309559057 proposer: type: integer description: Proposer ID example: 2 status: type: integer format: uint8 description: Block status example: 3 enum: - 1 - 2 - 3 - 4 x-enum-varnames: - Proposed - Notarized - Finalized - Orphaned tx_amount: type: integer description: Number of transactions in the block example: 10 size: type: integer description: Block size in bytes example: 83 hash: type: string description: Block hash example: 6509902bf9519c36ca4d81654dff38349e408029d90da611ab65acdf8dc378f0 TransactionKey: type: object required: - id - type properties: id: type: string type: type: string enum: - transaction Transaction: allOf: - $ref: '#/components/schemas/TransactionKey' - type: object description: A single transaction resource required: - attributes properties: attributes: required: - tx_type - timestamp - block_id - size - status - nonce - signer_public_key properties: tx_type: type: integer format: uint8 description: Type of transaction enum: - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 - 16 - 17 - 18 - 19 - 20 x-enum-varnames: - CreateTransfer - CreateLedgerAccount - SetFreezeState - DocumentOperations - InvokeAction - InitiateTransfer - CommitTransfer - SetInstrument - SetBalanceLimit - CreateToken - RedeemToken - RoleOperations - RoleBindingOperations - Bank - AccountMetadata - AccountSet - SetIssuanceLimit - CreateLock - ReleaseLock - RedeemLocksForCycle timestamp: type: integer format: int64 description: Transaction timestamp, in milliseconds since epoch block_id: type: integer format: int64 description: Block ID that contains this transaction from_account_id: type: string description: Sender account ID, if any to_account_id: type: string description: Recipient account ID, if any amount: type: string description: Amount involved in the transaction, if any asset: type: string description: Asset involved in the transaction, if any display_code: type: string description: Display code for the asset, if applicable decimal_places: type: integer format: int32 description: Number of decimal places for the asset, if applicable metadata: type: array items: type: string description: Metadata associated with the transaction size: type: integer format: int32 description: Size of the transaction in bytes status: type: integer format: uint8 description: Status of the transaction enum: - 1 - 2 x-enum-varnames: - Success - Failed error_code: type: integer description: Error code, if any enum: - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 10 - 11 - 12 - 20 - 21 - 22 - 23 - 24 - 25 - 26 - 27 - 28 - 30 - 40 - 41 - 42 - 43 - 44 - 45 x-enum-varnames: - Unknown - Unimplemented - NotFound - AlreadyExists - Unauthorized - BadRequest - InvalidRequestType - InvalidAccountId - InvalidTransfer - MessageTooLarge - InvalidSignature - VerificationFailed - ReplayProtection - InvalidExpression - IncorrectType - AccountFrozen - UnmodifiedState - InsufficientBalance - BalanceOverflow - AccountDepthExceeded - HoldingLimitExceeded - InvalidTarget - DisplayCodeConflict - InvalidDisplayCode - InsufficientAvailableBalance - LockNotFound - InvalidLockState - DuplicateLockId nonce: type: string description: Nonce value for the transaction signer_public_key: type: string description: Public key of the signer signer_account_id: type: string description: Account ID of the signer, if any context_id: type: string description: Context ID, if any TransactionMetricKey: type: object required: - id - type properties: id: type: string type: type: string enum: - transaction-metric TransactionMetric: allOf: - $ref: '#/components/schemas/TransactionMetricKey' - type: object description: A single transaction metric resource required: - attributes properties: attributes: required: - volume - count - mean_value - decimal_places - timestamp properties: volume: type: string description: The total volume of transactions in the metric example: '1000000' count: type: integer description: The number of transactions in the metric example: 100 mean_value: type: string description: The mean value of transactions in the metric example: '10000' decimal_places: type: integer description: The number of decimals places of the account balance example: 2 timestamp: type: integer format: int64 description: The timestamp of the metric in milliseconds since epoch example: 1633072800000 AssetMetricKey: type: object required: - id - type properties: id: type: string type: type: string enum: - asset-metric AssetMetric: allOf: - $ref: '#/components/schemas/AssetMetricKey' - type: object description: A single asset metric resource required: - attributes properties: attributes: required: - total_supply - circulating_supply - decimal_places - timestamp properties: total_supply: type: string description: The total supply of the asset example: '1000000' circulating_supply: type: string description: The circulating supply of the asset example: '800000' decimal_places: type: integer description: The number of decimals places of the account balance example: 2 timestamp: type: integer format: int64 description: The timestamp of the metric in milliseconds since epoch example: 1633072800000 TransactionUnifiedKey: title: TransactionUnifiedKey type: object required: - id - type properties: id: type: string type: type: string enum: - transaction_unified SearchUnifiedData: type: object description: Search result required: - attributes properties: attributes: required: - timestamp properties: timestamp: type: integer format: int64 description: Timestamp of the transaction, block, or context in milliseconds since epoch. example: 1747392351066 TransactionUnified: allOf: - $ref: '#/components/schemas/TransactionUnifiedKey' - $ref: '#/components/schemas/SearchUnifiedData' ContextUnifiedKey: title: ContextUnifiedKey type: object required: - id - type properties: id: type: string type: type: string enum: - context_unified ContextUnified: allOf: - $ref: '#/components/schemas/ContextUnifiedKey' - $ref: '#/components/schemas/SearchUnifiedData' BlockUnifiedKey: title: BlockUnifiedKey type: object required: - id - type properties: id: type: string type: type: string enum: - block_unified BlockUnified: allOf: - $ref: '#/components/schemas/BlockUnifiedKey' - $ref: '#/components/schemas/SearchUnifiedData' AccountUnifiedKey: title: AccountUnifiedKey type: object required: - id - type properties: id: type: string type: type: string enum: - account_unified AccountUnified: allOf: - $ref: '#/components/schemas/AccountUnifiedKey' - $ref: '#/components/schemas/SearchUnifiedData'