Get Transaction Details By Hash#
Get the basic transaction information on the chains.
Request Path#
GET
https://web3.okx200.com/api/v5/xlayer/transaction/transaction-fillsRequest Parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
| chainShortName | String | Yes | The abbreviated name of the blockchain network, e.g, XLAYER |
| txid | String | Yes | Transaction hash, batch query up to 20 transactions, separated by English commas. |
Response Parameters#
| Parameter | Type | Description |
|---|---|---|
| chainFullName | String | The full name of the blockchain network, e.g. X Layer |
| chainShortName | String | The abbreviated name of the blockchain network, e.g. XLAYER |
| txid | String | Transaction hash |
| height | String | Block height of the transaction |
| transactionTime | String | The Unix timestamp of the transaction time, in milliseconds format, e.g., 1597026383085 |
| transactionType | String | Transaction type 0:original transaction 1:EIP2930 2:EIP1559 |
| amount | String | Transaction amount |
| methodId | String | Method ID |
| errorLog | String | Transaction failure logs |
| inputData | String | Input data |
| transactionSymbol | String | Token symbol of the transaction |
| txfee | String | Transaction fee |
| index | String | The position index of the transaction in the block |
| confirm | String | Confirmed block count |
| inputDetails | Array | Input details |
| > inputHash | String | The hash address that initiated the transaction |
| > isContract | Bol | Contract address truefalse |
| > amount | String | Transaction amount |
| outputDetails | Array | Output details |
| > outputHash | String | The hash address to receive the transaction |
| > isContract | Bol | Contract address truefalse |
| > amount | String | Transaction amount |
| state | String | Transaction state success fail pending |
| gasLimit | String | Gas limit |
| gasUsed | String | Actual amount of gas used |
| gasPrice | String | Gas price |
| totalTransactionSize | String | Total transaction size |
| virtualSize | String | Virtual size |
| weight | String | Weight |
| nonce | String | The number of transactions initiated by the sender's address |
| isAaTransaction | Bol | Whether it is an AA transaction |
| tokenTransferDetails | Array | Token transfer details. Request the new interface GET /api/v5/xlayer/transaction/internal-transaction-detail and GET /api/v5/xlayer/transaction/token-transaction-detail to query more transaction data |
| > index | String | The positional index of the transaction in the block |
| > token | String | Token name |
| > tokenContractAddress | String | Token contract address |
| > symbol | String | Token symbol |
| > from | String | Token transfer out address |
| > to | String | Token arrival address |
| > isFromContract | Bol | Is the transfer out token address a contract address |
| > isToContract | Bol | Whether the receiving token address is a contract address |
| > tokenId | String | NFT token id |
| > amount | String | Token transfer amount |
| contractDetails | Array | Contract call transfer details |
| > index | String | The positional index of the transaction in the block |
| > from | String | Token transfer out address |
| > to | String | Token arrival address |
| > isFromContract | Bol | Is the transfer out token address a contract address |
| > isToContract | Bol | Is the receiving token address a contract address |
| > amount | String | Transaction amount |
| > gasLimit | String | Gas limit |
Request Example#
shell
curl --location --request GET 'https://web3.okx200.com/api/v5/xlayer/transaction/transaction-fills?chainShortName=xlayer&txid=0x88c719ff4e6be26a81d642f5bbc6408e64dbd3dfdc9ef170a14d4fcf1c1db10c' \
--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": [
{
"chainFullName": "X Layer",
"chainShortName": "XLAYER",
"txid": "0x88c719ff4e6be26a81d642f5bbc6408e64dbd3dfdc9ef170a14d4fcf1c1db10c",
"height": "31136282",
"transactionTime": "1755493834000",
"amount": "0.25830859001436063",
"transactionSymbol": "OKB",
"txfee": "0.000021",
"index": "2",
"confirm": "7",
"inputDetails": [
{
"inputHash": "0x55bd572ece54c253888f96bb1722fbc237c6936f",
"isContract": false,
"amount": ""
}
],
"outputDetails": [
{
"outputHash": "0xd6e86442e5227bd135cf656be48117d43ce92e3b",
"isContract": false,
"amount": ""
}
],
"state": "success",
"gasLimit": "21000",
"gasUsed": "21000",
"gasPrice": "0.000000001",
"totalTransactionSize": "",
"virtualSize": "428",
"weight": "",
"nonce": "6",
"transactionType": "0",
"methodId": "",
"errorLog": "",
"inputData": "0x",
"isAaTransaction": false,
"tokenTransferDetails": [],
"contractDetails": []
}
]
}
