Sparkscan API
Sparkscan API

Tx

Endpoint:https://api.sparkscan.io

Operations related to transactions


Get Latest Transactions

GET
https://api.sparkscan.io
/v1/tx/latest

Get Latest Transactionsquery Parameters

  • networkstring · enum · required
    Enum values:
    REGTEST
    MAINNET
  • limitinteger · min: 1 · max: 500
    Default: 10
  • offsetinteger · min: 0
    Default: 0
  • from_timestampstring | null · date-time

    Return transactions created at or after this ISO timestamp

  • to_timestampstring | null · date-time

    Return transactions created at or before this ISO timestamp

  • sortstring · enum

    Field to sort by (created_at or updated_at)

    Field to sort by (created_at or updated_at)

    Enum values:
    created_at
    updated_at
    Default: created_at
  • orderstring · enum

    Sort direction (asc or desc)

    Sort direction (asc or desc)

    Enum values:
    asc
    desc
    Default: desc

Get Latest Transactions Responses

Successful Response

  • idstring · required

    Transaction ID (UUID for Spark/LN, hash for BTC/Token)

  • typestring · enum · required
    Enum values:
    bitcoin_deposit
    bitcoin_withdrawal
    spark_transfer
    lightning_payment
    token_mint
    token_transfer
    token_burn
    token_multi_transfer
  • statusstring · enum · required
    Enum values:
    confirmed
    pending
    sent
    failed
    expired
  • valueUsdnumber · float · required
  • createdAtstring | null · date-time

    When the transaction was first recorded/broadcast.

  • updatedAtstring | null · date-time

    Last update / completion timestamp.

  • amountSatsinteger | null
  • tokenAmountinteger | null
  • tokenMetadataobject
  • multiIoDetailsobject
  • fromobject
  • toobject
  • bitcoinTxidstring | null

Get Transaction Details by ID

GET
https://api.sparkscan.io
/v1/tx/{txid}

Retrieves detailed information about a specific transaction (Spark, Bitcoin, Lightning, or Token) by its ID or hash.

Get Transaction Details by IDpath Parameters

  • txidstring · required

Get Transaction Details by IDquery Parameters

  • networkstring | null · enum

    Filter by network. If specified, only returns the transaction if it matches this network.

    Enum values:
    REGTEST
    MAINNET

Get Transaction Details by ID Responses

Successful Response

anyOf
At least one variant must match. Multiple variants may match simultaneously.

Decision Table

VariantMatching Criteria
type = object · requires: id, type, status +2 more
type = object · requires: id, type, status +3 more
Properties for TxV1Response:
  • idstring · required
  • typestring · required
  • statusstring · enum · required
    Enum values:
    confirmed
    pending
    sent
    failed
    expired
  • amountSatsinteger · required
  • valueUsdnumber · float · required
  • createdAtstring | null · date-time

    When the transaction was first recorded/initiated.

  • updatedAtstring | null · date-time

    Last update / completion timestamp.

  • fromobject
  • toobject
  • timeTakenSecondsnumber | null · float

    Duration of the transaction in seconds (from creation to completion). Null if start time is unavailable.

  • txidstring | null
  • bitcoinTxDataobject