Portail dév.
Thème

Get Transaction List#

Get the TradeZone transaction list, optionally filtered by block hash, transaction hash, or block height.

Request Path#

GET
https://web3.okx.com/api/v5/xlayer/tz/transaction/transaction-list

Request Parameters#

ParameterTypeRequiredDescription
chainShortNameStringYesThe abbreviated name of the blockchain network, e.g, TRADE_ZONE
blockHashStringNoFilter by block hash
heightIntegerNoFilter by block height
limitIntegerNoThe number of results returned per request. The maximum is 100. The default is 20.
pageIntegerNoPage number, default 1

Response Parameters#

ParameterTypeDescription
pageStringCurrent page number
limitStringNumber of results per page
totalPageStringTotal number of pages
totalStringTotal number of records
dataArrayTransaction list
> hashStringTransaction hash
> blockHeightStringBlock height
> blockHashStringBlock hash
> blockTimeStringBlock time (ms)
> statusStringTransaction status: 0x1 success / 0x0 failure
> fromStringBusiness executing user address
> actionTypeStringAction type
> indexStringExecution order
> valueStringTransaction amount (token precision applied)
> valueRawStringTransaction amount (raw integer, smallest unit)

Request Example#

shell
curl --location --request GET 'https://web3.okx.com/api/v5/xlayer/tz/transaction/transaction-list?chainShortName=TRADE_ZONE&limit=1' \
--header 'OK-ACCESS-KEY: 37c541a1-****-****-****-10fe7a038418' \
--header 'OK-ACCESS-SIGN: leaV********3uw=' \
--header 'OK-ACCESS-PASSPHRASE: 1****6' \
--header 'OK-ACCESS-TIMESTAMP: 2023-10-18T12:21:41.274Z'

Response Example#

json
{
    "code": "0",
    "msg": "",
    "data": [
        {
            "page": "1",
            "limit": "1",
            "totalPage": "4479103",
            "total": "4479103",
            "data": [
                {
                    "hash": "0x3f0519739cbbc1583e1c10c4028300176a82ec910f7a72e31b1a59c2236565e9",
                    "blockHeight": "21326728",
                    "blockHash": "0xe7ecaea8cbbe2d54ec29db5068f50ce21829aeee09cac0ce2e51d42ead34908e",
                    "blockTime": "1779167674517",
                    "status": "0x1",
                    "from": "0x7ad674c0595de0885f7335b8dcaa91ca5d1723e5",
                    "actionType": "updateOwner",
                    "index": "3",
                    "value": "",
                    "valueRaw": ""
                }
            ]
        }
    ]
}