---
# System prepended metadata

title: How to fetch transaction data for X1 Testnet

---

# How to fetch transaction data for X1 Testnet

## Useful links
[Fetch transaction detalis](https://www.oklink.com/docs/en/#blockchain-general-api-transaction-query-transaction-details)
[Fetch transactions for an address](https://www.oklink.com/docs/en/#blockchain-general-api-address-query-address-transaction-list-information)

## Authorization

**Header**
```
Key: Ok-Access-Key
Value: 4aa1d357-c612-4d5d-b39e-e763145067e3
```

## Examples

### Fetch transaction for an address

```
Request
https://www.oklink.com/api/v5/explorer/address/transaction-list?chainShortName=X1_TEST&address=0xb107c568224F4CD0619b40D5d91237A512B6f2F5

Response:

{
	"code": "0",
	"msg": "",
	"data": [
		{
			"page": "1",
			"limit": "20",
			"totalPage": "1",
			"chainFullName": "X1_TEST",
			"chainShortName": "X1_TEST",
			"transactionLists": [
				{
					"txId": "0xb315644d4a01b5a1fca11a7363efb7846d5d1d7e8704697e43ea6572438bfb95",
					"methodId": "",
					"blockHash": "0xf1de42899311f8c41e7845a8431a422caab5109dd112accb2a4d2c5161d49032",
					"height": "2365350",
					"transactionTime": "1703069039000",
					"from": "0x09b801903bc286a3ce46d1653756d17d1f152a8b",
					"to": "0xb107c568224f4cd0619b40d5d91237a512b6f2f5",
					"isFromContract": false,
					"isToContract": false,
					"amount": "0.01",
					"transactionSymbol": "OKB",
					"txFee": "0.003549",
					"state": "success",
					"tokenId": "",
					"tokenContractAddress": "",
					"challengeStatus": "",
					"l1OriginHash": ""
				}
			]
		}
	]
}

```

### Fetch transaction details

```
Request
https://www.oklink.com/api/v5/explorer/transaction/transaction-fills?chainShortName=X1_TEST&txid=0xb315644d4a01b5a1fca11a7363efb7846d5d1d7e8704697e43ea6572438bfb95

Response
{
	"code": "0",
	"msg": "",
	"data": [
		{
			"chainFullName": "X1_TEST",
			"chainShortName": "X1_TEST",
			"txid": "0xb315644d4a01b5a1fca11a7363efb7846d5d1d7e8704697e43ea6572438bfb95",
			"height": "2365350",
			"transactionTime": "1703069039000",
			"amount": "0.01",
			"transactionSymbol": "OKB",
			"txfee": "0.003549",
			"index": "0",
			"confirm": "216765",
			"inputDetails": [
				{
					"inputHash": "0x09b801903bc286a3ce46d1653756d17d1f152a8b",
					"isContract": false,
					"amount": ""
				}
			],
			"outputDetails": [
				{
					"outputHash": "0xb107c568224f4cd0619b40d5d91237a512b6f2f5",
					"isContract": false,
					"amount": ""
				}
			],
			"state": "success",
			"gasLimit": "21000",
			"gasUsed": "21000",
			"gasPrice": "0.000000169",
			"totalTransactionSize": "",
			"virtualSize": "425",
			"weight": "",
			"nonce": "3",
			"transactionType": "0",
			"methodId": "",
			"errorLog": "",
			"inputData": "0x",
			"tokenTransferDetails": [],
			"contractDetails": []
		}
	]
}
```