Batch Get Transactions By Hash#
This allows for querying transactions of up to 20 transaction at once.
Request Path#
GET
https://web3.okx200.com/api/v5/xlayer/transaction/transaction-multiRequest Parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
| chainShortName | String | Yes | The abbreviated name of the blockchain network, e.g. XLAYER |
| txId | Array | Yes | Transaction hash , multiple transactions separated by , Maximum 20 txIds |
Response Parameters#
| Parameter | Type | Description |
|---|---|---|
| txId | String | Transaction hash |
| blockHash | String | Block hash |
| height | String | Block height |
| transactionTime | String | Transaction time;Unix timestamp format in milliseconds |
| from | String | Sender address |
| to | String | Recipient address |
| isFromContract | Bol | Is the From address a contract address |
| isToContract | Bol | Is the To address a contract address |
| amount | String | Transaction amount |
| symbol | String | Token symbol |
| nonce | String | The number of transactions initiated by the sender's address |
| gasLimit | String | Gas limit |
| gasUsed | String | Actual amount of gas used |
| gasPrice | String | Gas price |
| txFee | String | Transaction Fees |
| state | String | Trading state |
| transactionType | String | Transaction type 0:original transaction 1:EIP2930 2:EIP1559 |
| methodId | String | Method ID |
| > isFromContract | Bol | Is the From address a contract address |
| > isToContract | Bol | Is the To address a contract address |
| > amount | String | Transaction amount |
| > state | String | trading state success fail pending |
| > method | String | Method ID |
| > symbol | String | Symbol |
| > nonce | String | Nonce |
| > gasUsed | String | Gas |
| > gasLimit | String | Gas limit |
| > gasPrice | String | Gas avg price |
| > txFee | String | Transaction Fees |
| > state | String | Transaction status success fail pending |
Request Example#
shell
curl --location --request GET 'https://web3.okx200.com/api/v5/xlayer/transaction/transaction-multi?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": [
{
"txId": "0x88c719ff4e6be26a81d642f5bbc6408e64dbd3dfdc9ef170a14d4fcf1c1db10c",
"methodId": "",
"blockHash": "0x3ad8f2db660966e4f5b1bc54fb16e7d10ce43d23831f3ded93f27b5f8e1fa343",
"height": "31136282",
"transactionTime": "1755493834000",
"from": "0x55bd572ece54c253888f96bb1722fbc237c6936f",
"to": "0xd6e86442e5227bd135cf656be48117d43ce92e3b",
"isFromContract": false,
"isToContract": false,
"amount": "0.258308590014360608",
"symbol": "OKB",
"nonce": "6",
"txFee": "0.000021",
"gasPrice": "1000000000",
"gasLimit": "21000",
"gasUsed": "21000",
"state": "success",
"transactionType": "0"
}
]
}
