STAS Tokens (Beta)

STAS is a token protocol that consists of a bitcoin script for locking/unlocking bitcoin transaction outputs.

More details here.

Get all Tokens

This endpoint retrieves a list of supported tokens along with the relevant metadata.

HTTP Request
GET https://api.whatsonchain.com/v1/bsv/<network>/tokens
cURL
curl --location --request GET "https://api.whatsonchain.com/v1/bsv/main/tokens"
Response JSON structure
{
    "tokens": [
        {
            "description": "-",
            "image": "https://firebasestorage.googleapis.com/v0/b/musicartstaging/o/nftAssets%2F3e75ba7e-fa51-4efb-a483-3b2c71bab180_250x250?alt=media",
            "name": "fdsfs",
            "properties": {
                "issuer": {
                    "email": "info@musicart.io",
                    "governing_law": "England and Wales",
                    "issuer_country": "UK",
                    "jurisdiction": "UK",
                    "legal_form": "Limited",
                    "organisation": "Calekta Limited"
                },
                "legal": {
                    "terms": "\u00a9 2020 TAAL TECHNOLOGIES SEZC\nALL RIGHTS RESERVED. ANY USE OF THIS SOFTWARE IS SUBJECT TO TERMS AND CONDITIONS OF LICENSE. USE OF THIS SOFTWARE WITHOUT LICENSE CONSTITUTES INFRINGEMENT OF INTELLECTUAL PROPERTY. FOR LICENSE DETAILS OF THE SOFTWARE, PLEASE REFER TO: www.taal.com/stas-token-license-agreement"
                }
            },
            "protocol": "STAS",
            "schema_id": "NFT1.0/MA",
            "symbol": "ujtVA5",
            "token_id": "7bfb2ae7e878d107191259c1be72cf116da3f59d"
        },
        {
            "token_id": "2",
            "protocol": "STAS",
            "ticker": "CIPS",
            ....
        }
        ]
}

URL Parameters

ParameterDescription

network

The selected network: main.

Get Token by Id

This endpoint retrieves the token metadata including contract and issuance details.

HTTP Request
GET https://api.whatsonchain.com/v1/bsv/<network>/token/<tokenId>/<symbol>
cURL
curl --location --request GET "https://api.whatsonchain.com/v1/bsv/main/token/c402bc341157265f5f8a747c11099847056a229a/test1124"
Response JSON structure
{
    "token": {
        "contract_txs": [
            "72ae93f5fdc5a4fa5abfab780d7d1c8ad988d25ae34578b80dce5ff9e5c3db03"
        ],
        "description": "generating stas token",
        "image": "https://firebasestorage.googleapis.com/v0/b/nftdev/o/nftTemp%2FWL1DdD?alt=media",
        "issuance_txs": [
            "b00bcc9dfc7dd483ff989f3d1d3f091b23e88ca2207c9e15788e3e84a5b10c8b"
        ],
        "name": "test",
        "properties": {
            "issuer": {
                "email": "info@vaionex.com",
                "governing_law": "US",
                "issuer_country": "US",
                "jurisdiction": "US",
                "legal_form": "Limited",
                "organisation": "vaionex corp."
            },
            "legal": {
                "terms": "test"
            }
        },
        "protocol": "STAS",
        "schema_id": "NFT1.0/MA",
        "symbol": "test1124",
        "token_id": "c402bc341157265f5f8a747c11099847056a229a",
        "tx_count": 3
    }
}

URL Parameters

ParameterDescription

network

The selected network: main.

tokenId

The unique ID of the token.

symbol

The symbol used in the registration of the token.

Get Token UTXOs for Address

This endpoint retrieves the token UTXOs for a given address.

HTTP Request
GET https://api.whatsonchain.com/v1/bsv/<network>/address/<address>/tokens/unspent
cURL
curl --location --request GET "https://api.whatsonchain.com/v1/bsv/main/address/1GJ3x5bcEnKMnzNFPPELDfXUCwKEaLHM5H/tokens/unspent"
Response JSON structure
{
    "address": "1JsQieDaYUg5pSRtpeEQhTv3buHvSX7WH4",
    "utxos": [
        {
            "amount": 2000,
            "index": 1,
            "redeemAddr": "c402bc341157265f5f8a747c11099847056a229a",
            "symbol": "test1124",
            "txid": "cf3968e6950286cf94aa9efb7a1cc1b9c74190d159ff6d2a4dc7d9feb6e50c55"
        }
    ]
}

URL Parameters

ParameterDescription

network

The selected network: main.

address

The address

Get Address Token Balance

This endpoint retrieves the token balances for a given address.

HTTP Request
GET https://api.whatsonchain.com/v1/bsv/<network>/address/<address>/tokens
cURL
curl --location --request GET "https://api.whatsonchain.com/v1/bsv/main/address/1JsQieDaYUg5pSRtpeEQhTv3buHvSX7WH4/tokens"
Response JSON structure
{
    "address": "1JsQieDaYUg5pSRtpeEQhTv3buHvSX7WH4",
    "tokens": [
        {
            "balance": 0,
            "image": "https://firebasestorage.googleapis.com/v0/b/nftdev/o/nftTemp%2FWL1DdD?alt=media",
            "protocol": "STAS",
            "redeemAddr": "c402bc341157265f5f8a747c11099847056a229a",
            "symbol": "test2"
        },
        {
            "balance": -2000,
            "image": "https://firebasestorage.googleapis.com/v0/b/nftdev/o/nftTemp%2FWL1DdD?alt=media",
            "protocol": "STAS",
            "redeemAddr": "c402bc341157265f5f8a747c11099847056a229a",
            "symbol": "test1124"
        }
    ]
}

URL Parameters

ParameterDescription

network

The selected network: main.

address

The address

Get Token Transactions

This endpoint retrieves the transactions for a given token.

HTTP Request
GET https://api.whatsonchain.com/v1/bsv/<network>/token/<tokenId>/<symbol>/tx
cURL
curl --location --request GET "https://api.whatsonchain.com/v1/bsv/main/token/c402bc341157265f5f8a747c11099847056a229a/test1124/tx"
Response JSON structure
{
    "redeem_addr": "c402bc341157265f5f8a747c11099847056a229a",
    "symbol": "test1124",
    "txs": [
        "cf3968e6950286cf94aa9efb7a1cc1b9c74190d159ff6d2a4dc7d9feb6e50c55",
        "b00bcc9dfc7dd483ff989f3d1d3f091b23e88ca2207c9e15788e3e84a5b10c8b",
        "72ae93f5fdc5a4fa5abfab780d7d1c8ad988d25ae34578b80dce5ff9e5c3db03"
    ]
}

URL Parameters

ParameterDescription

network

The selected network: main.

tokenId

The unique ID of the token.

symbol

The symbol used in the registration of the token.

Get Token Output Details

This endpoint returns the details of a valid token output or Not Found (404) for an invalid token output.

HTTP Request
GET https://api.whatsonchain.com/v1/bsv/<network>/token/tx/<txid>/out/<index>
cURL
curl --location --request GET "wget -O- https://api.whatsonchain.com/v1/bsv/main/token/tx/cf3968e6950286cf94aa9efb7a1cc1b9c74190d159ff6d2a4dc7d9feb6e50c55/out/1"
Response JSON structure
{
    "has_data": true,
    "icon_url": "https://firebasestorage.googleapis.com/v0/b/nftdev/o/nftTemp%2FWL1DdD?alt=media",
    "index": 1,
    "is_splittable": true,
    "symbol": "test1124",
    "token_id": "c402bc341157265f5f8a747c11099847056a229a",
    "txid": "cf3968e6950286cf94aa9efb7a1cc1b9c74190d159ff6d2a4dc7d9feb6e50c55",
    "value": 2000
}

URL Parameters

ParameterDescription

network

The selected network: main.

hash

The hash/txId of the transaction.

index

The Output/Vout index.

Last updated