钱包 API

查询铭文交易#

根据交易哈希查询代币铭文交易明细

  • 支持查询 BTC 链 的 Runes、BRC-20、SRC-20、ARC-20、Ordinals NFT 的交易明细。
  • 支持 Fractal Bitcoin 链的 BRC-20 的交易明细。

请求路径#

GET https://www.okx.com/api/v5/wallet/post-transaction/inscription-transaction-detail-by-txhash

请求参数#

ParameterTypeRequiredDescription
chainIndexStringYes链唯一标识
txHashStringYes交易哈希
protocolStringYes协议类型
1:BRC-20
2:ARC-20
3:Runes
4:Ordinals NFT
5:SRC-20
不传默认为 BRC-20
cursorStringNo游标
limitStringNo返回条数,默认返回最近的 20 条,最多 100 条

响应参数#

ParameterTypeDescription
transactionDetailsArray交易详情
>txStatusString交易状态
成功success
失败:fail
暂不支持 pending 交易
>fromString发送方,多签地址,逗号分隔
>toString接收方,多签地址,逗号分隔
>eventTypeString交易类型
BRC-20 :deploymintinscribeTransfertransfer
Runes:EtchMintoutputBurninputMint
ARC-20:atomical-create-ftft-color-splitft-color-regulardistributed-mint
SRC-20:minttransferdeploy
Ordinals NFT:minttransfer
>protocolString协议类型
1:BRC-20
2:ARC-20
3:Runes
4:ordi_nft
5:SRC-20
>txHashString交易哈希
>blockHashString区块哈希
>heightString交易发生的区块高度
>txTimeString交易时间;Unix 时间戳的毫秒数格式,如 1597026383085
>amountString交易数量
>symbolString代币名称
>tokenInscriptionIdString铭文代币的铭文 ID
对于 Runes 符文,返回 Rune ID
对于 BRC-20 代币,返回代币的Inscription ID,通用代币的唯一标识
对于 ARC-20 代币,返回代币的 Atomical ID
其他铭文代币该字段返回空
>inscriptionNumberString每一次交易中涉及到的铭文编号
>outputIndexStringRunes 代币转账对应的 UTXO 索引,仅适用于 Runes 代币
cursorString游标

请求示例#

shell
curl --location --request GET 'https://www.okx.com/api/v5/wallet/post-transaction/inscription-transaction-detail-by-txhash?chainIndex=0&limit=10&txHash=18ccb1bc8c931cf4253065c2a5612fed7bd0eabd0a34139485b34305bcfc2b18&protocol=2'
--header 'Content-Type: application/json' \
--header 'OK-ACCESS-PROJECT: 86af********d1bc' \
--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'

响应示例#

200
{
    "code": "0",
    "msg": "success",
    "data": [
        {
            "cursor": "",
            "transactionDetails": [
                {
                    "txHash": "18ccb1bc8c931cf4253065c2a5612fed7bd0eabd0a34139485b34305bcfc2b18",
                    "blockHash": "00000000000000000000bcf4a44104b9cc54dc3a6e3b8a1007d73077e4fe224b",
                    "height": "854743",
                    "txTime": "1722394665000",
                    "from": "",
                    "to": "bc1pltwpza8fz00aqjf0s6z5pvhzrtwpj5nk75m5x7st7rqnq6tkqa2skhcs40",
                    "amount": "1454",
                    "symbol": "quark",
                    "eventType": "ft-color-regular",
                    "tokenInscriptionId": "9125f03bcf9325f6071762b9aee00b461a0b43ed157c336e2e89e07f47ea6f66i0",
                    "protocol": "2",
                    "txStatus": "success",
                    "inscriptionId": "",
                    "inscriptionNumber": "",
                    "outputIndex": ""
                },
                {
                    "txHash": "18ccb1bc8c931cf4253065c2a5612fed7bd0eabd0a34139485b34305bcfc2b18",
                    "blockHash": "00000000000000000000bcf4a44104b9cc54dc3a6e3b8a1007d73077e4fe224b",
                    "height": "854743",
                    "txTime": "1722394665000",
                    "from": "",
                    "to": "bc1pm7fxkgcrqghf2rtxdw4hupvdpqkped7azyrh2mukedrw2p0cj3hsxt8ph3",
                    "amount": "546",
                    "symbol": "quark",
                    "eventType": "ft-color-regular",
                    "tokenInscriptionId": "9125f03bcf9325f6071762b9aee00b461a0b43ed157c336e2e89e07f47ea6f66i0",
                    "protocol": "2",
                    "txStatus": "success",
                    "inscriptionId": "",
                    "inscriptionNumber": "",
                    "outputIndex": ""
                }
            ]
        }
    ]
}