Domain History
Retrieves the historical log of operations (such as registration and updates) performed on a specific PIVX name.
Endpoint
POST https://indexer.pivx.name/v1.0/history/richard.pivx
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
domain_name | string | Yes | The PIVX domain to query history for (e.g., richard.pivx). |
Request Body
The request body must be a JSON object containing the following parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
count | integer | 100 | The most rows to return, up to 500: a larger count is cut to 500. |
from_block_id | integer | None | Return only rows after this block: from later blocks with asc, from earlier ones with desc; the block itself is left out. Without it, the list starts at the oldest row (asc) or the newest (desc). |
from_nonce | integer | None | Only together with from_block_id: the nonce of the last row you have. The list then goes on right after that row rather than after its whole block; see Paging. |
order | string | desc | The sorting order: asc or desc. Rows are sorted by block, then by nonce. |
Code Examples
- cURL
- JavaScript
- Python
- PHP
curl -X POST https://indexer.pivx.name/v1.0/history/richard.pivx \
-H "Content-Type: application/json" \
-d '{
"count": 10,
"from_block_id": 5537000,
"order": "asc"
}'
const url = 'https://indexer.pivx.name/v1.0/history/richard.pivx';
const data = {
count: 10,
from_block_id: 5537000,
order: 'asc'
};
fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(data)
})
.then(response => response.json())
.then(result => console.log(result))
.catch(error => console.error('Error:', error));
import requests
url = "https://indexer.pivx.name/v1.0/history/richard.pivx"
payload = {
"count": 10,
"from_block_id": 5537000,
"order": "asc"
}
headers = {
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
<?php
$url = 'https://indexer.pivx.name/v1.0/history/richard.pivx';
$data = [
'count' => 10,
'from_block_id' => 5537000,
'order' => 'asc'
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Content-Type: application/json'
]);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
print_r($result);
Response Example
{
"response": [
{
"domain_block_id": 5537326,
"domain_ts": 1784808285,
"target_address": "ps1f84lvgj0awz2yf2zha5d5gddhd4j88g0kzj5cwp776vhxp5fdjqe7e95cdx2qs5e7fcvg3ds3yq",
"owner_pubkey": "3757ee1a8b3f10353ca6edd47b66920392b02e323dca3f3edddb5de142079a53",
"domain_tx": "388241ffc5bf8ba3d7633d132298d157e26d6ac127ff8d162f26e7203084df08",
"op": "REG",
"nonce": 1784808228,
"price": 0
},
{
"domain_block_id": 5537369,
"domain_ts": 1784812590,
"target_address": "ps1f84lvgj0awz2yf2zha5d5gddhd4j88g0kzj5cwp776vhxp5fdjqe7e95cdx2qs5e7fcvg3ds3yq",
"owner_pubkey": "3757ee1a8b3f10353ca6edd47b66920392b02e323dca3f3edddb5de142079a53",
"domain_tx": "4d5419af400966616ba9325f78bb3cac2ff1229fd4d39ed022a9fc113ee4b67e",
"op": "LST",
"nonce": 1784812534,
"price": 200000
},
{
"domain_block_id": 5537421,
"domain_ts": 1784815647,
"target_address": "ps1yq6m9k7hn4wzp3gv5xun8kf0eq2dm3ay5r7vc6t9jl0sxh2pw8dz4knmg7uve3cqr6t5hxj9fda",
"owner_pubkey": "66a998241f62b4c8e4340f6e840b4570ac1d2d9840e2e42f62e713a34244f098",
"domain_tx": "3834eb36ca816f1bd9074c546ec64b3a361aca67e88c35b1586fe4ec1ae60095",
"op": "BUY",
"nonce": 1784815586,
"price": 0
},
{
"domain_block_id": 5538248,
"domain_ts": 1784878331,
"target_address": "ps1yq6m9k7hn4wzp3gv5xun8kf0eq2dm3ay5r7vc6t9jl0sxh2pw8dz4knmg7uve3cqr6t5hxj9fda",
"owner_pubkey": "66a998241f62b4c8e4340f6e840b4570ac1d2d9840e2e42f62e713a34244f098",
"domain_tx": "3c08640ed394b1a270abddcc3ca873c13793629c6a148ad0b5585003ca9e632a",
"op": "LST",
"nonce": 1784878114,
"price": 10012345678
},
{
"domain_block_id": 5538248,
"domain_ts": 1784878331,
"target_address": "ps1yq6m9k7hn4wzp3gv5xun8kf0eq2dm3ay5r7vc6t9jl0sxh2pw8dz4knmg7uve3cqr6t5hxj9fda",
"owner_pubkey": "66a998241f62b4c8e4340f6e840b4570ac1d2d9840e2e42f62e713a34244f098",
"domain_tx": "9ad75f893c002f21e9bbc3c6cdf4e151477293d64a013aa773db26598c1d5d11",
"op": "ULT",
"nonce": 1784878293,
"price": 0
}
]
}
| Field | Type | Description |
|---|---|---|
domain_block_id | int | The PIVX block that holds the operation |
domain_ts | int | The time of that block, in Unix seconds |
target_address | string | The address the name resolves to after the operation |
op | string | The operation: REG, UPD, CHG, LST, ULT or BUY |
owner_pubkey | string | The public key of the name's owner after the operation |
domain_tx | string | The hash of the PIVX transaction that carried the operation |
nonce | int | The operation's nonce: a timestamp that grows with every operation on the name |
price | int | The sale price after the operation, in satoshi: the listing price for LST, otherwise 0. A BUY row shows 0, as the name is no longer for sale; the price paid is that of the latest LST before it |
Paging
To read a long history page by page, send the last row of each page back as the cursor: its domain_block_id as from_block_id and its nonce as from_nonce. Send both: one block can hold several operations on the same name (in the example above, the LST and the ULT in block 5538248), and a page can end between them. With from_block_id alone, the next page would start at the next block and skip the rest of that one. A page with fewer rows than you asked for (or than 500, if you asked for more) is the last one.
A from_nonce without from_block_id, or one that is not a non-negative integer, is answered with the error One or several params provided have wrong value, as is a count that is negative or not a whole number.