History API

get_account_history(account, stop, limit, start)

Get operations relevant to the specificed account.

Parameters

Option
Description
account_id_type account
The account whose history should be queried
operation_history_id_type stop
ID of the earliest operation to retrieve
unsigned limit
Maximum number of operations to retrieve (must not exceed 100)
operation_history_id_type start
ID of the most recent operation to retrieve

Example

1
{
2
"id": 3,
3
"method": "call",
4
"params": [
5
HISTORY_API_ID,
6
"get_account_history",
7
[
8
"1.2.12",
9
"1.6.0",
10
"100",
11
"1.6.10"
12
]
13
]
14
}
Copied!

Returns

A list of operations performed by account, ordered from most recent to oldest.
1
{
2
"id": 3,
3
"jsonrpc": "2.0",
4
"result": [
5
{
6
"id": "1.6.4",
7
"op": [
8
0,
9
{
10
"fee": {
11
"amount": 20,
12
"asset_id": "1.3.0"
13
},
14
"from": "1.2.15",
15
"to": "1.2.12",
16
"amount": {
17
"amount": "1000000000000",
18
"asset_id": "1.3.0"
19
},
20
"extensions": []
21
}
22
],
23
"result": [
24
0,
25
{}
26
],
27
"block_num": 2269,
28
"trx_in_block": 0,
29
"op_in_trx": 0,
30
"virtual_op": 33,
31
"extensions": []
32
}
33
]
34
}
Copied!

get_account_history_operations(account, operation_id, start, stop, limit)

Get only asked operations relevant to the specified account.

Parameters

Option
Description
account_id_type account
The account whose history should be queried
int operation_id
The ID of the operation we want to get operations in the account( 0 = transfer , 1 = limit order create, ...)
operation_history_id_type start
ID of the most recent operation to retrieve
operation_history_id_type stop
ID of the earliest operation to retrieve
unsigned limit
Maximum number of operations to retrieve (must not exceed 100)

Example

1
{
2
"id": 3,
3
"method": "call",
4
"params": [
5
HISTORY_API_ID,
6
"get_account_history_operations",
7
[
8
"1.2.0",
9
"0",
10
"1.6.0",
11
"1.6.10",
12
"100"
13
]
14
]
15
}
Copied!

Returns

A list of operations performed by account, ordered from most recent to oldest.
1
{
2
"id": 3,
3
"jsonrpc": "2.0",
4
"result": [
5
{
6
"id": "1.6.3623",
7
"op": [
8
0,
9
{
10
"fee": {
11
"amount": 20,
12
"asset_id": "1.3.0"
13
},
14
"from": "1.2.15",
15
"to": "1.2.0",
16
"amount": {
17
"amount": "10000000000",
18
"asset_id": "1.3.0"
19
},
20
"extensions": []
21
}
22
],
23
"result": [
24
0,
25
{}
26
],
27
"block_num": 732031,
28
"trx_in_block": 1,
29
"op_in_trx": 0,
30
"virtual_op": 3652,
31
"extensions": []
32
}
33
]
34
}
Copied!

get_account_address_history(address, start, stop, limit)

Get only transfers of to the specified address.

Parameters

Option
Description
ripemd160 address
The address whose history should be queried
operation_history_id_type start
ID of the most recent operation to retrieve
operation_history_id_type stop
ID of the earliest operation to retrieve
unsigned limit
Maximum number of operations to retrieve (must not exceed 100)

Example

1
{
2
"id": 3,
3
"method": "call",
4
"params": [
5
HISTORY_API_ID,
6
"get_account_address_history",
7
[
8
"f149bd2883b1179965bd6706092573be4d68fec8",
9
"0",
10
"1.6.0",
11
"1.6.10",
12
"100"
13
]
14
]
15
}
Copied!

Returns

A list of operations performed by address, ordered from most recent to oldest.
1
{
2
"id": 3,
3
"jsonrpc": "2.0",
4
"result": [
5
{
6
"id": "1.6.24",
7
"op": [
8
1,
9
{
10
"fee": {
11
"amount": 20,
12
"asset_id": "1.3.0"
13
},
14
"from": "1.2.11",
15
"to": "f149bd2883b1179965bd6706092573be4d68fec8",
16
"amount": {
17
"amount": 300000000,
18
"asset_id": "1.3.0"
19
},
20
"extensions": [
21
22
]
23
}
24
],
25
"result": [
26
0,
27
{
28
29
}
30
],
31
"block_num": 68,
32
"trx_in_block": 0,
33
"op_in_trx": 0,
34
"virtual_op": 77,
35
"extensions": [
36
37
]
38
}
39
]
40
}
Copied!

get_relative_account_history(account, stop, limit, start)

Get operations relevant to the specified account referenced by an event numbering specific to the account. The current number of operations for the account can be found in the account statistics (or use 0 for start).

Parameters

Option
Description
account_id_type account
The account whose history should be queried
uint32_t stop
Sequence number of earliest operation. 0 is default and will query 'limit' number of operations
unsigned limit
Maximum number of operations to retrieve (must not exceed 100)
uint32_t start
Sequence number of the most recent operation to retrieve. 0 is default, which will start querying from the most recent operation

Example

1
{
2
"id": 3,
3
"method": "call",
4
"params": [
5
HISTORY_API_ID,
6
"get_relative_account_history",
7
[
8
"1.2.6",
9
"0",
10
"1",
11
"10"
12
]
13
]
14
}
Copied!

Returns

A list of operations performed by account, ordered from most recent to oldest.
1
{
2
"id": 3,
3
"jsonrpc": "2.0",
4
"result": [
5
{
6
"id": "1.6.163",
7
"op": [
8
20,
9
{
10
"fee": {
11
"amount": 0,
12
"asset_id": "1.3.0"
13
},
14
"committee_member_id": "1.2.6",
15
"malicious_committeemen": [],
16
"account": "1.2.46",
17
"eth_addr": "aCf5E99Db1b408E9CF5C2643CD9059D7E0fa6264",
18
"extensions": []
19
}
20
],
21
"result": [
22
0,
23
{}
24
],
25
"block_num": 4550,
26
"trx_in_block": 18,
27
"op_in_trx": 0,
28
"virtual_op": 192,
29
"extensions": []
30
}
31
]
32
}
Copied!

get_contract_history(contract, stop, limit, start)

Get operations relevant to the specificed contract.

Parameters

Option
Description
contract_id_type contract
The contract whose history should be queried
operation_history_id_type stop
ID of the earliest operation to retrieve
unsigned limit
Maximum number of operations to retrieve (must not exceed 100)
operation_history_id_type start
ID of the most recent operation to retrieve

Example

1
{
2
"id": 3,
3
"method": "call",
4
"params": [
5
HISTORY_API_ID,
6
"get_contract_history",
7
[
8
"1.11.0",
9
"1.6.0",
10
"1",
11
"1.6.20"
12
]
13
]
14
}
Copied!

Returns

A list of operations performed by contract, ordered from most recent to oldest.
1
{
2
"id": 3,
3
"jsonrpc": "2.0",
4
"result": [
5
{
6
"id": "1.6.0",
7
"op": [
8
34,
9
{
10
"fee": {
11
"amount": 0,
12
"asset_id": "1.3.0"
13
},
14
"deposit_to_account": "1.2.15",
15
"balance_to_claim": "1.13.0",
16
"balance_owner_key": "ECHO3BhH6nPrPmh6wAtsNphRTcreo2uzZLxSP8JyNJoiRD6Q",
17
"total_claimed": {
18
"amount": "1000000000000000",
19
"asset_id": "1.3.0"
20
},
21
"extensions": []
22
}
23
],
24
"result": [
25
0,
26
{}
27
],
28
"block_num": 2250,
29
"trx_in_block": 0,
30
"op_in_trx": 0,
31
"virtual_op": 29,
32
"extensions": []
33
}
34
]
35
}
Copied!

get_relative_contract_history(contract, stop, limit, start)

Get operations relevant to the specified contract referenced by an event numbering specific to the contract. The current number of operations for the contract can be found in the contract statistics (or use 0 for start).

Parameters

Option
Description
contract_id_type contract
The contract whose history should be queried
uint32_t stop
Sequence number of earliest operation. 0 is default and will query 'limit' number of operations
unsigned limit
Maximum number of operations to retrieve (must not exceed 100)
uint32_t start
Sequence number of the most recent operation to retrieve. 0 is default, which will start querying from the most recent operation

Example

1
{
2
"id": 3,
3
"method": "call",
4
"params": [
5
HISTORY_API_ID,
6
"get_relative_contract_history",
7
[
8
"1.11.0",
9
"0",
10
"1",
11
"10"
12
]
13
]
14
}
Copied!

Returns

A list of operations performed by contract, ordered from most recent to oldest.
1
{
2
"id": 3,
3
"jsonrpc": "2.0",
4
"result": [
5
{
6
"id": "1.6.0",
7
"op": [
8
34,
9
{
10
"fee": {
11
"amount": 0,
12
"asset_id": "1.3.0"
13
},
14
"deposit_to_account": "1.2.15",
15
"balance_to_claim": "1.13.0",
16
"balance_owner_key": "ECHO3BhH6nPrPmh6wAtsNphRTcreo2uzZLxSP8JyNJoiRD6Q",
17
"total_claimed": {
18
"amount": "1000000000000000",
19
"asset_id": "1.3.0"
20
},
21
"extensions": []
22
}
23
],
24
"result": [
25
0,
26
{}
27
],
28
"block_num": 2250,
29
"trx_in_block": 0,
30
"op_in_trx": 0,
31
"virtual_op": 29,
32
"extensions": []
33
}
34
]
35
}
Copied!
Last modified 11mo ago