Shows transactions history for address, wallet or transaction by hash.
## Request Structure
`JSON object:`
```JSON
{
"method": "tx_history",
"subcommand": ["tx_history"],
"arguments": {
"addr | w | tx": "addr | wallet_name | tx_hash",
"net": "network_name",
"chain": "chain_name",
"limit": "number",
"offset": "number",
"head": "null",
"tail": "null"
},
"id": "1"
}
```
`Parameters:`
**`net (network_name)`** - name of the Cellframe Network. The list of networks can be found in the `<Config_dir> \ etc \ network` folder or received using - [[Node Command - NET LIST]] `optional`
**`addr | w | tx`** - shows tx_history for wallet using address or name, or for transaction using hash
**`chain`** - the name of the chain (`main` or `zerochain`)
**`limit`** - number of elements being printed `optional`
**`offset`** - number of the element from which printing will be started `optional`
**`head`** - shows transactions list starting from the first one `optional`
**`tail`** - shows transactions list startinf from the last one `optional`
### Curl Example
`Request:`
```actionscript
curl --unix-socket /opt/cellframe-node/var/run/node_cli -X POST http://localhost/connect -d '
{
"method": "tx_history",
"subcommand": ["tx_history"],
"arguments": {
"net": "Backbone",
"w": "CELLWALLET",
"tail": "null",
"limit": "5"
},
"id": "1"
}'
```
`Response:`
```json
{
"type": 2,
"result": [
[
{
"address": "Rj7J7MiX2bWy8sNyX332awQN5KEtihm3p7jwuemmRssX4otCGzoUWnfHf6XotbfjckLCyPgpZy8DM46G8LFDG6eVdfCUPUut7BD3pDFp"
},
{
"limit": 5
},
{
"status": "ACCEPTED",
"hash": "0x8BA2AD315346CC47EC035368DF7C623036149EE4AC96E9CD064B75D94E0831A7",
"atom_hash": "0xFEA4793E533A5CE3EEE246BE50D80A608CF88A7B6EA386639473A5B3CB9F4771",
"ret_code": 0,
"ret_code_str": "No error",
"action": "close",
"service": "xchange",
"batching": "false",
"tx_created": "Fri, 13 Dec 2024 13:50:52 +0700",
"data": [
{
"tx_type": "recv",
"recv_coins": "3.0",
"recv_datoshi": "3000000000000000000",
"token": "CELL",
"source_address": "Rj7J7MiX2bWy8sNyYF5njS2TWg97i4EtaViUAdri6qhjUN158aiGNAugRaqLjkSXA7Jq8xyrNiuzPgtyfQKeNxSDzWrCTngXJddfqKzK"
}
]
},
{
"status": "ACCEPTED",
"hash": "0xA69279E9EF405BC8B371BEE4757101B49665B6196249CDA9DB95A7A2E04BB8E4",
"atom_hash": "0xB335822ECC5D738E6F97C8045BFB1C36452E314927EA58A4EDF5FCA88FAEA567",
"ret_code": 0,
"ret_code_str": "No error",
"action": "use",
"service": "xchange",
"batching": "false",
"tx_created": "Fri, 13 Dec 2024 13:47:26 +0700",
"data": [
{
"tx_type": "recv",
"recv_coins": "1.0",
"recv_datoshi": "1000000000000000000",
"token": "CELL",
"source_address": "Rj7J7MiX2bWy8sNyYF5njS2TWg97i4EtaViUAdri6qhjUN158aiGNAugRaqLjkSXA7Jq8xyrNiuzPgtyfQKeNxSDzWrCTngXJddfqKzK"
}
]
},
{
"status": "ACCEPTED",
"hash": "0x905F3CBE65C216E2594F2A5BD89FD6386C0C139FA9A5DE91FC8A807A50BE980B",
"atom_hash": "0x2DA9B26ABE40CBF1103E901465DCEC4A1439B2851C6487AD4783492B435BBC84",
"ret_code": 0,
"ret_code_str": "No error",
"action": "use",
"service": "xchange",
"batching": "false",
"tx_created": "Fri, 13 Dec 2024 13:44:53 +0700",
"data": [
{
"tx_type": "recv",
"recv_coins": "1.0",
"recv_datoshi": "1000000000000000000",
"token": "CELL",
"source_address": "Rj7J7MiX2bWy8sNyYF5njS2TWg97i4EtaViUAdri6qhjUN158aiGNAugRaqLjkSXA7Jq8xyrNiuzPgtyfQKeNxSDzWrCTngXJddfqKzK"
}
]
},
{
"status": "ACCEPTED",
"hash": "0x668F7698E4821127A983F919CE66A4A68E123E9E189ECA0C28127531C491ED18",
"atom_hash": "0xDB400C5F7CDC45329571F53BA01BEC74CEE7DEE400F4F01B51034661319EDEC3",
"ret_code": 0,
"ret_code_str": "No error",
"action": "open",
"service": "xchange",
"batching": "false",
"tx_created": "Fri, 13 Dec 2024 13:42:54 +0700",
"data": [
{
"tx_type": "send",
"send_coins": "5.0",
"send_datoshi": "5000000000000000000",
"token": "KEL",
"destination_address": "DAP_CHAIN_TX_OUT_COND_SUBTYPE_SRV_XCHANGE"
},
{
"tx_type": "send",
"send_coins": "0.05",
"send_datoshi": "50000000000000000",
"token": "CELL",
"destination_address": "DAP_CHAIN_TX_OUT_COND_SUBTYPE_FEE"
}
]
},
{
"status": "ACCEPTED",
"hash": "0xA0EDE786E3B0F05008D776309F3C7C4B87EF28AC4ADFE47D58A11E8DE4CD1213",
"atom_hash": "0xD3FA6EAB9E7BD1431F95EDBDBA014DD1ABB83CF7C4DB3174A271C0B4BD33067D",
"ret_code": 0,
"ret_code_str": "No error",
"action": "close",
"service": "xchange",
"batching": "false",
"tx_created": "Thu, 12 Dec 2024 18:56:28 +0700",
"data": [
{
"tx_type": "send",
"send_coins": "1.0",
"send_datoshi": "1000000000000000000",
"token": "CELL",
"destination_address": "Rj7J7MiX2bWy8sNyYF5njS2TWg97i4EtaViUAdri6qhjUN158aiGNAugRaqLjkSXA7Jq8xyrNiuzPgtyfQKeNxSDzWrCTngXJddfqKzK"
},
{
"tx_type": "send",
"send_coins": "0.01",
"send_datoshi": "10000000000000000",
"token": "CELL",
"destination_address": "DAP_CHAIN_TX_OUT_COND_SUBTYPE_FEE"
},
{
"tx_type": "recv",
"recv_coins": "100.0",
"recv_datoshi": "100000000000000000000",
"token": "KEL",
"source_address": "DAP_CHAIN_TX_OUT_COND_SUBTYPE_SRV_XCHANGE"
}
]
}
],
{
"network": "Backbone",
"chain": "main",
"tx_sum": 5,
"accepted_tx": 5,
"rejected_tx": 0
}
],
"id": 1
}
```