sochain-com Transactions API

The Transactions API from sochain-com — 2 operation(s) for transactions.

Operations 2

GET /transaction/{network}/{hash} One transaction #
GET /transaction_status/{network}/{hash} Whether a transaction is pending, mined, replaced or dropped #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/sochain-com:sochain-com-transactions-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

sochain-com-transactions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Sochain Com Transactions API
  version: '3'
  description: 'Operations tagged Transactions across 3 of this provider''s published API definitions: sochain-com-openapi.json, dev-sochain-com-openapi.json, sochain-com-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://sochain.com/api/v3
- url: https://dev.sochain.com/api/v3
security:
- ApiKey: []
- ApiKeyQuery: []
tags:
- name: Transactions
paths:
  /transaction/{network}/{hash}:
    get:
      operationId: get_transaction
      tags:
      - Transactions
      summary: One transaction
      description: Confirmations, size, fee, and every input and output.
      parameters:
      - $ref: '#/components/parameters/network'
      - $ref: '#/components/parameters/hash'
      - $ref: '#/components/parameters/currency'
      security:
      - {}
      - ApiKey: []
      - ApiKeyQuery: []
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                - data
                properties:
                  status:
                    const: success
                  data:
                    $ref: '#/components/schemas/Transaction'
              example:
                status: success
                data:
                  hash: 597bafa25fcbb081467bdeb030a42bf441dbfcc054bdcfad31a829d7db5d931f
                  confirmations: 199329
                  size: 380
                  vsize: 190
                  weight: 758
                  version: 1
                  locktime: 0
                  block_hash: 0000000000000000000717afe429887e2967094d6e17c2b22b54cf0e33debb69
                  block_height: 769781
                  time: 1672525387
                  inputs_n: 1
                  outputs_n: 2
                  inputs_value: '0.66579765'
                  outputs_value: '0.66489765'
                  fee: '0.00090000'
                  price:
                    value: '16603.67470264'
                    currency: USD
                  kind: payment
                  inputs:
                  - index: 0
                    value: '0.66579765'
                    address: bc1qwqdg6squsna38e46795at95yu9atm8azzmyvckulcc7kytlcckxswvvzej
                    scriptSig:
                      hex: ''
                      asm: ''
                    witness:
                    - ''
                    - 30440220018433af266f34446613cf4f476c97211e35b006c648510c6e4f4f52479503b702206490e52f7ae42fcc932ee1cc8c1b4d2db44bbc89267a535ed52d5438cb4ed9d201
                    - 30440220084e1f306aecec3c797b1097908b74e0e706cdd508e7a74833f02b1450336067022063523e4519446d1591367fc9695f5996020fdd3a075aa1a5cf671610a860c70701
                    - 52210375e00eb72e29da82b89367947f29ef34afb75e8654f6ea368e0acdfd92976b7c2103a1b26313f430c4b15bb1fdce663207659d8cac749a0e53d70eff01874496feff2103c96d495bfdd5ba4145e3e046fee45e84a8a48ad05bd8dbb395c011a32cf9f88053ae
                    previous_output:
                      hash: eb4fdf3627d92379557cfbc296c520271378978d4a9204a5ce13b51a6bb40b81
                      index: 1
                    sequence: 4294967295
                  outputs:
                  - index: 0
                    value: '0.15526090'
                    address: 39KPyDkWXeEE9UXkSNPXkv5tbgqZfxHhqv
                    type: scripthash
                    script:
                      hex: a91453aa4220caf513cc2850ed4deb2662a729350a5987
                      asm: OP_HASH160 53aa4220caf513cc2850ed4deb2662a729350a59 OP_EQUAL
                    spent:
                      hash: 2fbe643e9bf9370d08786f9146b9032f355558f5d50e6f367e76bfdc65b44bf6
                      index: 3
                    is_change: null
                  - index: 1
                    value: '0.50963675'
                    address: bc1qwqdg6squsna38e46795at95yu9atm8azzmyvckulcc7kytlcckxswvvzej
                    type: witness_v0_scripthash
                    script:
                      hex: 0020701a8d401c84fb13e6baf169d59684e17abd9fa216c8cc5b9fc63d622ff8c58d
                      asm: 0 701a8d401c84fb13e6baf169d59684e17abd9fa216c8cc5b9fc63d622ff8c58d
                    spent:
                      hash: 01344f7472a5ebb31c3b76e1eabbd2e827a5c1ee45017287dcc743d769939e88
                      index: 0
                    is_change: true
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: 'Not found: an unknown network, or an argument the network doesn''t know.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Fail'
              examples:
                legacy:
                  summary: This endpoint's message
                  value:
                    status: fail
                    data:
                      error_message: Transaction data not found.
                network:
                  summary: Unknown network code
                  value:
                    status: fail
                    data:
                      error_message: Unsupported network. Use BTC, LTC, DOGE, ZEC, BTCTEST, LTCTEST, DOGETEST or ZECTEST.
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/Unavailable'
      externalDocs:
        url: https://sochain.com/docs/transaction
    servers:
    - url: https://sochain.com/api/v3
  /transaction_status/{network}/{hash}:
    get:
      operationId: get_transaction_status
      tags:
      - Transactions
      summary: Whether a transaction is pending, mined, replaced or dropped
      description: A transaction is replaced when another one spends one of its inputs (a fee bump, a double spend, or a transaction it spends from being replaced) and dropped when the mempool lets it go unconfirmed. SoChain remembers a transaction that left the mempool for about a day; after that, or for one SoChain never saw, the status is unknown.
      parameters:
      - $ref: '#/components/parameters/network'
      - $ref: '#/components/parameters/hash'
      security:
      - {}
      - ApiKey: []
      - ApiKeyQuery: []
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                - data
                properties:
                  status:
                    const: success
                  data:
                    $ref: '#/components/schemas/TransactionStatus'
              example:
                status: success
                data:
                  network: BTC
                  hash: 83cbaaf42c2339d61718e7fa21c9c0d2b0d8649d65106346ba466a2f82323be9
                  status: replaced
                  block_height: null
                  confirmations: null
                  replaced_by: 7a7a9ac9df7fce28fec8d6285498f1149dafc4935f9ec513c7b4ce1c7cded300
                  replaced_by_status: pending
                  replaced_by_height: null
                  replaced_ancestor: null
                  removed_at: 1790738337
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: 'Not found: an unknown network, or not a transaction ID. A well-formed hash always gets 200.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Fail'
              examples:
                legacy:
                  summary: A malformed hash
                  value:
                    status: fail
                    data:
                      error_message: Transaction hash must be 64 hexadecimal characters.
                network:
                  summary: Unknown network code
                  value:
                    status: fail
                    data:
                      error_message: Unsupported network. Use BTC, LTC, DOGE, ZEC, BTCTEST, LTCTEST, DOGETEST or ZECTEST.
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/Unavailable'
      externalDocs:
        url: https://sochain.com/docs/transaction_status
    servers:
    - url: https://sochain.com/api/v3
components:
  responses:
    Unauthorized:
      description: An invalid key, no key where one is needed (buckets, webhooks, /account_info), a locked account or expired plan, or both the month's requests and the keyless rate used up. Kept as 401, with this message, for v3 compatibility.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Fail'
          example:
            status: fail
            data:
              error_message: API Key invalid, account access expired, or this account's daily request limit has been exhausted.
    Unavailable:
      description: Briefly unavailable; retry with backoff. May carry Retry-After.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Fail'
          example:
            status: fail
            data:
              error_message: Temporarily unavailable. Try again in a few minutes.
    BadRequest:
      description: A bad parameter or body; the message says which.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Fail'
    TooManyRequests:
      description: 'Without a key, past the day''s 2,500 lookups from this IP while SoChain is busy (Retry-After: 60), or past the day''s most (Retry-After: seconds to 00:00 UTC). With or without one, too many requests in flight at once (Retry-After: 1, not counted).'
      headers:
        Retry-After:
          schema:
            type: integer
          description: Seconds to wait.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Fail'
          example:
            status: fail
            data:
              error_message: 'Lookups without a key are 2,500 a day per IP, and today''s are used up; they reset at 00:00 UTC. A free API key gives you 75,000 a month: https://sochain.com/signin?from=limit'
    TooManyRequests_2:
      description: 'Without a key, past the day''s 2,500 lookups from this IP while SoChain is busy (Retry-After: 60), or past the day''s most (Retry-After: seconds to 00:00 UTC). With or without one, too many requests in flight at once (Retry-After: 1, not counted).'
      headers:
        Retry-After:
          schema:
            type: integer
          description: Seconds to wait.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Fail'
          example:
            status: fail
            data:
              error_message: 'Lookups without a key are 2,500 a day per IP, and today''s are used up; they reset at 00:00 UTC. A free API key gives you 75,000 a month: https://dev.sochain.com/signin?from=limit'
  schemas:
    Script:
      type: object
      required:
      - hex
      - asm
      properties:
        hex:
          type: string
        asm:
          type: string
    Price:
      type: object
      required:
      - value
      - currency
      description: 'Price per coin, 8 decimals: in US dollars, or in the currency asked for. Always 0.00000000 on testnets.'
      properties:
        value:
          $ref: '#/components/schemas/Amount'
        currency:
          type: string
          description: USD, or the currency asked for.
    TransactionInput:
      type: object
      required:
      - index
      - value
      - address
      - scriptSig
      - witness
      - previous_output
      properties:
        index:
          type: integer
        value:
          $ref: '#/components/schemas/Amount'
        address:
          type:
          - string
          - 'null'
          description: Null for a coinbase or a script without an address.
        scriptSig:
          $ref: '#/components/schemas/Script'
        witness:
          type: array
          items:
            type: string
          description: Witness items, hex.
        previous_output:
          oneOf:
          - $ref: '#/components/schemas/Outpoint'
          - type: 'null'
          description: Null for a coinbase.
        sequence:
          type: integer
          description: 'The input''s nSequence: 4294967295 is final; below 4294967294 signals replace-by-fee where the network allows it, and it can set a relative timelock (BIP 68).'
        mweb:
          enum:
          - pool
          - pegin
          description: 'Litecoin only: pool when it spends the MWEB pool, pegin when it spends a peg-in. Absent otherwise.'
    Transaction:
      type: object
      required:
      - hash
      - confirmations
      - size
      - vsize
      - weight
      - version
      - locktime
      - block_hash
      - block_height
      - time
      - inputs_n
      - outputs_n
      - inputs_value
      - outputs_value
      - fee
      - price
      - kind
      - heuristic
      - inputs
      - outputs
      properties:
        hash:
          type: string
        confirmations:
          type: integer
          description: 0 while in the mempool.
        size:
          type: integer
        vsize:
          type: integer
        weight:
          type: integer
        version:
          type: integer
        locktime:
          type: integer
        block_hash:
          type:
          - string
          - 'null'
        block_height:
          type:
          - integer
          - 'null'
        time:
          type: integer
        inputs_n:
          type: integer
        outputs_n:
          type: integer
        inputs_value:
          $ref: '#/components/schemas/Amount'
        outputs_value:
          $ref: '#/components/schemas/Amount'
        fee:
          $ref: '#/components/schemas/Amount'
        price:
          anyOf:
          - $ref: '#/components/schemas/Price'
          - type: 'null'
          description: 'The price at the time, as Price; null where there''s no price: before the network''s price history (Bitcoin''s starts 13 Jul 2010), or a block stamped ahead of the clock. Testnets: always 0.'
        facts:
          type: object
          properties:
            bridge:
              type: string
            protocol:
              type: string
          description: 'Only for a bridge''s or a protocol''s transaction: the name of its bridge (sBTC, Liquid, …) or protocol (babylon, counterparty, …).'
        kind:
          type:
          - string
          - 'null'
          enum:
          - payment
          - batch_payout
          - consolidation
          - coinjoin
          - inscription
          - data
          - lightning_close
          - fee_bumped
          - mweb_peg_in
          - large_script
          - transparent
          - shielding
          - deshielding
          - shielded
          - rune
          - bridge
          - token
          - staking
          - anchoring
          - other
          - null
          description: What kind of transaction it is (inscription, rune, …), named as in a block's kinds (BlockKinds says what each is); null when not classified.
        heuristic:
          type:
          - boolean
          - 'null'
          description: true when the kind is a guess (a CoinJoin, a cooperative Lightning close, a child paying its parent's fee); null with no kind.
        inputs:
          type: array
          items:
            $ref: '#/components/schemas/TransactionInput'
        outputs:
          type: array
          items:
            $ref: '#/components/schemas/TransactionOutput'
        mweb:
          enum:
          - hogex
          - pegin
          description: 'Litecoin only: hogex for each block''s MWEB transaction (its first output is the pool), pegin when it moves coins into MWEB. Absent otherwise.'
        shielded:
          type: object
          description: 'Zcash only: the value each shielded pool released into the transparent side (positive) or took from it (negative). Shielded inputs and outputs themselves are private: inputs and outputs list the transparent side only, and fee already accounts for this.'
          required:
          - sprout
          - sapling
          - orchard
          - ironwood
          - net
          properties:
            sprout:
              $ref: '#/components/schemas/Amount'
            sapling:
              $ref: '#/components/schemas/Amount'
            orchard:
              $ref: '#/components/schemas/Amount'
            ironwood:
              $ref: '#/components/schemas/Amount'
            net:
              $ref: '#/components/schemas/Amount'
              description: 'Their sum: outputs_value + fee − inputs_value.'
    Outpoint:
      type: object
      required:
      - hash
      - index
      properties:
        hash:
          type: string
          description: Transaction ID.
        index:
          type: integer
    TransactionOutput:
      type: object
      required:
      - index
      - value
      - address
      - type
      - script
      - spent
      - is_change
      properties:
        index:
          type: integer
        value:
          $ref: '#/components/schemas/Amount'
        address:
          type:
          - string
          - 'null'
          description: '"op_return" for an OP_RETURN (nulldata) output, as v3 always said; null for other nonstandard scripts.'
        type:
          type: string
          description: pubkeyhash, scripthash, witness_v0_keyhash, witness_v0_scripthash, witness_v1_taproot, nulldata, …
        script:
          $ref: '#/components/schemas/Script'
        spent:
          oneOf:
          - $ref: '#/components/schemas/Outpoint'
          - type: 'null'
          description: The spending input; null while unspent.
        is_change:
          type:
          - boolean
          - 'null'
          description: true when it pays one of the transaction's own input addresses; otherwise null (never false).
        mweb:
          enum:
          - pegin
          - pool
          - pegout
          description: 'Litecoin only: pegin (moves coins into MWEB), pool (the MWEB pool, carried to the next block) or pegout (coins leaving MWEB). Absent otherwise.'
    Fail:
      type: object
      required:
      - status
      - data
      properties:
        status:
          const: fail
        data:
          type: object
          required:
          - error_message
          properties:
            error_message:
              type: string
    Amount:
      type: string
      pattern: ^-?[0-9]+\.[0-9]{8}$
      description: An exact decimal amount of coins with 8 decimals. Signed amounts may start with '-'. Parse as an integer of the smallest unit, not a float.
      examples:
      - '0.00024300'
    TransactionStatus:
      type: object
      required:
      - network
      - hash
      - status
      - block_height
      - confirmations
      - replaced_by
      - replaced_by_status
      - replaced_by_height
      - replaced_ancestor
      - removed_at
      properties:
        network:
          enum:
          - BTC
          - LTC
          - DOGE
          - ZEC
          - BTCTEST
          - LTCTEST
          - DOGETEST
          - ZECTEST
        hash:
          type: string
          description: The transaction ID.
        status:
          enum:
          - pending
          - mined
          - replaced
          - dropped
          - expired
          - unknown
          description: 'pending: waiting in the mempool. mined: in a block. replaced: another transaction spends one of its inputs. dropped: it left the mempool unconfirmed. expired (Zcash): it passed its expiry height unmined. unknown: SoChain can''t tell (it never saw it, or it left the mempool too long ago).'
        block_height:
          type:
          - integer
          - 'null'
          description: The block it's in, once mined.
        confirmations:
          type:
          - integer
          - 'null'
          description: 0 while pending, 1 or more once mined; null otherwise.
        replaced_by:
          type:
          - string
          - 'null'
          description: The transaction that now spends one of its inputs (the last one, after several quick replacements).
        replaced_by_status:
          enum:
          - pending
          - mined
          - unknown
          - null
          description: 'unknown: the replacement left the mempool unconfirmed too.'
        replaced_by_height:
          type:
          - integer
          - 'null'
          description: The replacement's block, once mined.
        replaced_ancestor:
          type:
          - string
          - 'null'
          description: 'Set when it was replaced because a transaction it spends from was: that transaction.'
        removed_at:
          type:
          - integer
          - 'null'
          description: When it left the mempool (Unix time).
  parameters:
    currency:
      name: currency
      in: query
      required: false
      description: 'Prices in this currency instead of US dollars (any case). Not a filter: on the paged endpoints it keeps the form you''d get without it.'
      schema:
        type: string
        enum:
        - AUD
        - BRL
        - CAD
        - CHF
        - CNY
        - CZK
        - DKK
        - EUR
        - GBP
        - HKD
        - HUF
        - IDR
        - ILS
        - INR
        - ISK
        - JPY
        - KRW
        - MXN
        - MYR
        - NOK
        - NZD
        - PHP
        - PLN
        - RON
        - SEK
        - SGD
        - THB
        - TRY
        - USD
        - ZAR
    hash:
      name: hash
      in: path
      required: true
      description: 'Transaction ID: 64 hex characters (any case).'
      schema:
        type: string
        pattern: ^[0-9a-fA-F]{64}$
      example: 597bafa25fcbb081467bdeb030a42bf441dbfcc054bdcfad31a829d7db5d931f
    network:
      name: network
      in: path
      required: true
      description: Network code (any case).
      schema:
        enum:
        - BTC
        - LTC
        - DOGE
        - ZEC
        - BTCTEST
        - LTCTEST
        - DOGETEST
        - ZECTEST
      example: BTC
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: API-KEY
      description: Your key, from the dashboard.
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api_key
      description: Your key as a URL parameter, for lookups (GET) from tools that can't send a header, such as spreadsheets. Best a read-only key.
x-refined-from:
- sochain-com-openapi.json
- dev-sochain-com-openapi.json
- sochain-com-openapi.json