For the complete documentation index, see llms.txt. This page is also available as Markdown.

Historical

Holdings at a past Ethereum block, for the DAO voting power

List the Ethereum NFTs some accounts held at a past block

post
/v1/historical/nfts

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.

Authorizations
AuthorizationstringRequired

The token of the subgraph worker, the only caller of the /v1/historical endpoints (HISTORICAL_API_TOKEN). Without one configured, those endpoints are off.

Body
blockinteger · min: 1 · max: 2147483647Required

The Ethereum block to read the holdings at.

ownersstring[] · max: 10000Required

The accounts whose NFTs to list (case insensitive).

categorystring · enumOptionalPossible values:
contractAddressesstring[] · max: 100Optional
estateSizeGtintegerOptional

Only estates whose size at the block is above this.

idGtstringOptional

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>).

firstinteger · max: 1000OptionalDefault: 100
skipintegerOptionalDefault: 0
Responses
200

A page of the NFTs the accounts held at the block

application/json
okbooleanRequired
post/v1/historical/nfts
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
    }
  ]
}

Get the size of some estates at a past block

post
/v1/historical/estates

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.

Authorizations
AuthorizationstringRequired

The token of the subgraph worker, the only caller of the /v1/historical endpoints (HISTORICAL_API_TOKEN). Without one configured, those endpoints are off.

Body
blockinteger · min: 1 · max: 2147483647Required
tokenIdsstring[] · max: 10000Required
sizeGtintegerOptional

Only estates whose size at the block is above this.

firstinteger · max: 1000OptionalDefault: 100
skipintegerOptionalDefault: 0
Responses
200

A page of the estates and their size at the block

application/json
okbooleanRequired
post/v1/historical/estates
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

post
/v1/historical/rental-assets

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.

Authorizations
AuthorizationstringRequired

The token of the subgraph worker, the only caller of the /v1/historical endpoints (HISTORICAL_API_TOKEN). Without one configured, those endpoints are off.

Body
blockinteger · min: 1 · max: 2147483647Required
lessorsstring[] · max: 10000Required
contractAddressesstring[] · max: 100Optional
isClaimedbooleanOptional
firstinteger · max: 1000OptionalDefault: 100
skipintegerOptionalDefault: 0
Responses
200

A page of the assets in the Rentals contract at the block

application/json
okbooleanRequired
post/v1/historical/rental-assets
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
    }
  ]
}

List third parties as they were at a past Polygon block

post
/v1/historical/third-parties

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.

Authorizations
AuthorizationstringRequired

The token of the subgraph worker, the only caller of the /v1/historical endpoints (HISTORICAL_API_TOKEN). Without one configured, those endpoints are off.

Body
blockinteger · min: 1 · max: 2147483647Required
idsstring[] · max: 10000Required
isApprovedbooleanOptional
firstinteger · max: 1000OptionalDefault: 100
skipintegerOptionalDefault: 0
Responses
200

A page of the third parties at the block

application/json
okbooleanRequired
post/v1/historical/third-parties
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
    }
  ]
}

Get the block a squid has indexed up to on a chain

post
/v1/historical/head

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.

Authorizations
AuthorizationstringRequired

The token of the subgraph worker, the only caller of the /v1/historical endpoints (HISTORICAL_API_TOKEN). Without one configured, those endpoints are off.

Body
squidstring · enumRequiredPossible values:
chainstring · enumRequiredPossible values:
processorstring,null · enum · nullableOptional

A processor other than the chain's; vesting is registry-squid's, on Ethereum

Possible values:
Responses
200

The block the squid has indexed up to

application/json
okbooleanRequired
post/v1/historical/head
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