More resources
Get token tx events

Get token tx events#

Get BRC20 tx events by txid, returns a json object with the BRC20 tx info.

Request address#

GET http://{ip}:{port}/api/v1/brc20/tx/{txId}/events

Request param#

ParameterTypeDescriptionNotes
txIdStringThe btc transaction hash.[default to null]

Response param#

ParameterTypeDescription
codeIntegerThe response code.
msgStringA message describing the error.
dataObjectIt is a object with the transaction event info.
> eventsArrayThe brc20 event info list.
>> typeStringThe transaction type.
>> inscriptionIdStringThe inscription id.
>> inscriptionNumberNumberThe inscription number.
>> oldSatpointStringThe old sat position.
>> newSatpointStringThe new sat position.
>>> fromStringThe transaction from.
>>>> addressStringThe transaction from address.
>>>> scriptHashStringThe transaction's from script hash.
>>> toStringThe transaction to.
>>>> addressStringThe transaction to address.
>>>> scriptHashStringThe transaction's to script hash.
>>> validBooleanThe transaction status.
>>> msgStringThe transaction info.

Request example#

shell
curl --location --request GET 'http://{ip}:{token}/api/v1/brc20/tx/de4b3aada407fd58c2ac6b6b456301b80dcb67d60a53446631855de341ecedc6/events'

Response example#

200
{
    "code": 0,
    "msg": "ok",
    "data": {
        "events": [
            {
                "type": "transfer",
                "inscriptionId": "1f3f2cce7cbd043671ee3865503043f4973bbb8ba34b1ac94b8a498100c8f274i0",
                "inscriptionNumber": 4853820,
                "oldSatpoint": "1f3f2cce7cbd043671ee3865503043f4973bbb8ba34b1ac94b8a498100c8f274:0:0",
                "newSatpoint": "de4b3aada407fd58c2ac6b6b456301b80dcb67d60a53446631855de341ecedc6:0:0",
                "from": {
                    "address": "bc1qm2vnyxwpskrzwpcpgnlu49g3zyr3gnqpnf64wc"
                },
                "to": {
                    "address": "1ASNMdk2Fhindka7qrE6MFmdprvB9b8qJ6"
                },
                "valid": false,
                "msg": "transferable inscriptionId not found: 1f3f2cce7cbd043671ee3865503043f4973bbb8ba34b1ac94b8a498100c8f274i0"
            }
        ],
        "txid": "de4b3aada407fd58c2ac6b6b456301b80dcb67d60a53446631855de341ecedc6"
    }
}