API Samples

Atomicals ElectrumX endpoint samples

Endpoints generally support GET/POST requests, and can decode parameters with the query parameter params using GET or the params field in the JSON payload using POST. For example:

  • With GET: /proxy/blockchain.atomicals.get_global?params=[10]

  • With POST: /proxy/blockchain.atomicals.get_global + JSON {"params": [10]}

All listed parameters should follow their positions.

Head over to https://github.com/atomicals/atomicals-electrumx/blob/master/electrumx/server/session.py and search set_request_handlers for all endpoint definitions.

All below endpoints start with /proxy. If your endpoint is ep.wizz.cash, then a destination would be https://ep.wizz.cash/proxy/blockchain.atomical.get_global.

blockchain.atomicals.get_global

POST /proxy/blockchain.atomicals.get_global

Obtains the global state of the Atomicals and the indexer.

global includes in most of the endpoints, we didn't duplicate list them below.

Params

Name
Type
Description

hashes_count

number

(Defaults to 10) Total hashes returned.

Response

{
  "success": true,
  "response": {
    "global": {
      "atomical_count": 1835,
      "atomicals_block_hashes": {
        "2585939": "189b5c3537c9c7c6f73c102bba44ac1e9b214ba773f79bae6236d64ea04258fb",
        "2585940": "87a84e410ab220f673200093ddc2f04e14e74c7ce15973e3f140db3357cc41f0",
        "2585941": "5bd26a477722cf7facbe9327c8c89092733e72727345f2a2f102a7393cd123c6",
        "2585942": "7eaef92d5d4dc0ec002a2adc0c8ee27229fa23e96b0657a14263b3a4aa70fada",
        "2585943": "c09e502dd9ff755b8610ba03878aefa86b0e70f9a563a6a497b6b266edbabf8d",
        "2585944": "cdf15031fae78ada51dac7bd314b3bdd92d8ee7f572a5cc27f3ce5ab77deb425",
        "2585945": "074727d33124a0c89cf09d550b8151ffa686233adb14f1acbf8f8ea3fedaa813",
        "2585946": "c68e56d6b863d3deb75237ea2b4c014dbcd48035e4edbce3f89fe52467782511",
        "2585947": "07d39ce2986d0b73339325b1e2b20e66ff7a9402297a266152f004df0e7ee6b5",
        "2585948": "cfe96bc0c17b8de03a10037f2dfd3f183b4701263137091c722d520fc9734e76"
      },
      "atomicals_block_tip": "cfe96bc0c17b8de03a10037f2dfd3f183b4701263137091c722d520fc9734e76",
      "block_tip": "0000000000000024202a60bb52aeec89eb8c496da1cc3d21ae7f63051e07595b",
      "coin": "BitcoinTestnet",
      "height": 2585948,
      "network": "testnet",
      "server_time": "2024-04-11T08:51:47.403135"
    }
  }
}

blockchain.atomicals.listscripthash

POST /proxy/blockchain.atomicals.listscripthash

Gets all Atomcials assets and UTXOs owned by the output script including unconfirmed.

Params

Name
Type
Description

script_hash

string

The output script hex string of an address.

verbose

boolean

(Defaults to false) Whether to return UTXO details when it has no Atomicals.

Response

Check the link as an example https://ep.wizz.cash/proxy/blockchain.atomicals.listscripthash?params=[%2285ad9aff17bddddb4379eb6631a7cf9f4f0cf4220463b94435642aa27897dab3%22,true]

blockchain.atomicals.validate

POST /proxy/blockchain.atomicals.validate

Validate if any tokens will be burned during the transaction.

Params

Name
Type
Description

raw_tx

string

PSBT tx in HEX string.

Response

blockchain.atomicals.get

POST /proxy/blockchain.atomicals.get

Obtain the Atomicals info from the given Atomicals ID.

Params

Name
Type
Description

id

string

The Atomicals ID.

Response

blockchain.atomicals.get_state

POST /proxy/blockchain.atomicals.get_state

Obtain the latest additional state of an Atomicals. This is typically useful for Containers or DMint collections.

Params

Name
Type
Description

id

string

The Atomicals ID.

Response

blockchain.atomicals.get_location

POST /proxy/blockchain.atomicals.get_location

Obtain the location info with the given Atomicals ID.

Params

Name
Type
Description

id

string

The Atomicals ID.

Response

blockchain.atomicals.get_ft_balances_scripthash

POST /proxy/blockchain.atomicals.get_ft_balances_scripthash

Params

Name
Type
Description

script_hash

string

The output script hex string of an address.

Response

blockchain.atomicals.transaction

POST /proxy/blockchain.atomicals.transaction

Obtain the Atomicals transaction details of the given TxID with only Atomicals info (inputs, outputs, burned tokens).

Params

Name
Type
Description

tx_id

string

The Transaction ID.

Response

blockchain.atomicals.transaction_by_height

POST /proxy/blockchain.atomicals.transaction_by_height

Obtain all Atomicals-related transaction info that is sent in the given block height.

Params

Name
Type
Description

height

int

The block height.

Response

blockchain.atomicals.transaction_by_scripthash

POST /proxy/blockchain.atomicals.transaction_by_scripthash

Obtain paginated Atomicals-related transactions with the given output script.

Params

Name
Type
Description

script_hash

string

The output script hex string of an address.

limit

int

(Defaults to 10) The pagination limit.

Response

blockchain.atomicals.transaction_by_atomical_id

POST /proxy/blockchain.atomicals.transaction_by_atomical_id

Obtain paginated Atomicals-related transactions related to the given Atomical ID.

Params

Name
Type
Description

id

string

The Atomicals ID.

limit

int

(Defaults to 10) The pagination limit.

Response

Last updated