Historical
Holdings at a past Ethereum block, for the DAO voting power
Who owned each Ethereum NFT at the given block, read from its last transfer up to that block, for the NFTs the given accounts held then. Estates come with their size at that block. This is what the DAO's voting power strategies read at the block of each proposal.
Results are ordered by <contractAddress>-<tokenId>, the id the subgraphs give these NFTs, so they can be paged with idGt as well as with first and skip. A category or some contractAddresses are required: the owners at a block are read over every NFT they cover, and kept, so reading them again for another batch of accounts is cheap. A block the chain has not reached, or one less than three minutes old, gets a 503 with a Retry-After, and so does one the marketplace squid (and, for estates, registry-squid) has not indexed yet, or reads when too many are already running.
The token of the subgraph worker, the only caller of the /v1/historical endpoints (HISTORICAL_API_TOKEN). Without one configured, those endpoints are off.
The Ethereum block to read the holdings at.
The accounts whose NFTs to list (case insensitive).
Only estates whose size at the block is above this.
Only NFTs whose <contractAddress>-<tokenId> sorts after this, in lowercase and without the
category prefix the marketplace subgraph puts in its ids (estate-<contractAddress>-<tokenId>).
1000A page of the NFTs the accounts held at the block
Invalid request body, or neither a category nor contracts to narrow it
The token is missing or wrong
The holdings could not be read
The block is too recent, or a squid has not indexed it yet (code is block-too-recent); too
many reads are running (code is busy); or the RPC or a squid's indexed height did not answer
(code is unavailable).
POST /v1/historical/nfts HTTP/1.1
Host: marketplace-api.decentraland.org
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 156
{
"block": 1,
"owners": [
"text"
],
"category": "parcel",
"contractAddresses": [
"text"
],
"itemTypes": [
"undefined"
],
"estateSizeGt": 1,
"idGt": "text",
"first": 100,
"skip": 0
}{
"ok": true,
"data": [
{
"contractAddress": "text",
"tokenId": "text",
"category": "text",
"owner": "text",
"itemType": null,
"searchWearableRarity": null,
"searchEstateSize": null
}
]
}The size of each given estate at the given block: the parcels added to it up to then, minus those removed. Estates that had no parcel added or removed by the block are left out. Results are ordered by token id as a string. A block the chain has not reached, one less than three minutes old, or one registry-squid has not indexed yet, gets a 503 with a Retry-After.
The token of the subgraph worker, the only caller of the /v1/historical endpoints (HISTORICAL_API_TOKEN). Without one configured, those endpoints are off.
Only estates whose size at the block is above this.
1000A page of the estates and their size at the block
Invalid request body
The token is missing or wrong
The holdings could not be read
The block is too recent, or a squid has not indexed it yet (code is block-too-recent); too
many reads are running (code is busy); or the RPC or a squid's indexed height did not answer
(code is unavailable).
POST /v1/historical/estates HTTP/1.1
Host: marketplace-api.decentraland.org
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 63
{
"block": 1,
"tokenIds": [
"text"
],
"sizeGt": 1,
"first": 100,
"skip": 0
}{
"ok": true,
"data": [
{
"tokenId": "text",
"size": 1
}
]
}List the LAND and estates some accounts had in the Rentals contract at a past block
The assets the given lessors had put in the Rentals contract and not claimed back by the given block. An asset claimed back by then has no lessor any more, as on the rentals subgraph, so it is never listed for one, and isClaimed: true lists nothing. Results are ordered by <contractAddress>-<tokenId>. A block the chain has not reached, one less than three minutes old, or one registry-squid has not indexed yet, gets a 503 with a Retry-After.
The token of the subgraph worker, the only caller of the /v1/historical endpoints (HISTORICAL_API_TOKEN). Without one configured, those endpoints are off.
1000A page of the assets in the Rentals contract at the block
Invalid request body
The token is missing or wrong
The holdings could not be read
The block is too recent, or a squid has not indexed it yet (code is block-too-recent); too
many reads are running (code is busy); or the RPC or a squid's indexed height did not answer
(code is unavailable).
POST /v1/historical/rental-assets HTTP/1.1
Host: marketplace-api.decentraland.org
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 97
{
"block": 1,
"lessors": [
"text"
],
"contractAddresses": [
"text"
],
"isClaimed": true,
"first": 100,
"skip": 0
}{
"ok": true,
"data": [
{
"contractAddress": "text",
"tokenId": "text",
"lessor": null,
"isClaimed": true
}
]
}Each third party asked for, with the merkle root and approval its last review up to the given Polygon block left it. A third party is approved only by a review, so one never reviewed by the block is not listed. Content servers read the root of an approved third party at the block a wearable was deployed at. Results are ordered by id. A block registry-squid has not finalized yet, usually a few seconds old, gets a 503 with a Retry-After.
The token of the subgraph worker, the only caller of the /v1/historical endpoints (HISTORICAL_API_TOKEN). Without one configured, those endpoints are off.
1000A page of the third parties at the block
Invalid request body
The token is missing or wrong
The third parties could not be read
registry-squid has not finalized the block yet (code is block-too-recent); or its height or
the third parties' reviews could not be read (code is unavailable).
POST /v1/historical/third-parties HTTP/1.1
Host: marketplace-api.decentraland.org
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 65
{
"block": 1,
"ids": [
"text"
],
"isApproved": true,
"first": 100,
"skip": 0
}{
"ok": true,
"data": [
{
"id": "text",
"root": "text",
"isApproved": true
}
]
}The highest block the live deployment of a squid has indexed on a chain, hot or finalized, with its hash and timestamp. The subgraph gateway answers a subgraph's _meta { block } with it. It is read again every few seconds. It is the chain's processor's head, or with processor: vesting that of registry-squid's vesting processor, which reads Ethereum apart. The timestamp comes from the chain's RPC, read by the block's hash, and is null when the RPC does not answer for it. A squid that has not indexed any block yet, or whose state cannot be read for now, gets a 503 with a Retry-After.
The token of the subgraph worker, the only caller of the /v1/historical endpoints (HISTORICAL_API_TOKEN). Without one configured, those endpoints are off.
A processor other than the chain's; vesting is registry-squid's, on Ethereum
The block the squid has indexed up to
Invalid request body
The token is missing or wrong
The squid's state is not where it should be, or it has no such processor on the chain
The squid has not indexed any block yet, or its state could not be read (code is unavailable).
POST /v1/historical/head HTTP/1.1
Host: marketplace-api.decentraland.org
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 64
{
"squid": "marketplace",
"chain": "ethereum",
"processor": "vesting"
}{
"ok": true,
"data": {
"number": 1,
"hash": "text",
"timestamp": null
}
}Last updated