报名参加即将到来的黑客马拉松大赛!奖金为总额超过 25 万美元的 MANA 和 LAND 。
X
你好,请选择
语言:
关闭

LAND API 参考

URL: https://api.decentraland.org/ 指定版本: https://api.decentraland.org/v1

目录

出价

GET /bids/:id

说明

通过 id 返回出价。

URI 参数

name type description
id string The id of the bid

请求示例:

GET /bids/0xaac47013b34b4c9a568503db4e8c5b3a41764919ba26214491fb3e665282eaea

返回示例:

{
  "ok": true,
  "data": {
    "id": "0xaac47013b34b4c9a568503db4e8c5b3a41764919ba26214491fb3e665282eaea",
    "token_address": "0x124bf28a423b2ca80b3846c3aa0eb944fe7ebb95",
    "token_id": "31",
    "bidder": "0x87956abc4078a0cc3b89b419928b857b8af826ed",
    "seller": "0xe4d3ba99ffdae47c003f1756c01d8e7ee8fef7c9",
    "price": 2,
    "expires_at": "1551495590000",
    "fingerprint": "0x7bf0da414abc768d638b486dfc3330abd361aa7d7916d673072d4e3776ea9287",
    "status": "sold",
    "asset_id": "31",
    "asset_type": "estate",
    "block_number": 4924562,
    "block_time_created_at": "1548876122000",
    "block_time_updated_at": "1548876183000",
    "created_at": "2019-01-31T13:42:40.697Z",
    "updated_at": "2019-02-04T12:42:23.017Z"
  }
}
GET /addresses/:address/bids

说明

返回卖家或出价人给定地址的出价列表。

URI 参数

name type description
address string An Ethereum address

请求参数

name type default description
status enum all Filter estates by publications status: open, cancelled or sold

请求示例:

GET /addresses/0xe4d3ba99ffdae47c003f1756c01d8e7ee8fef7c9/bids

返回示例:

{
  "ok": true,
  "data": [
    {
      "id": "0xfbeb6c5f702d3be5564872cd68bc96c683b0029d8116feb79058669c6fe40d1d",
      "token_address": "0x7a73483784ab79257bb11b96fd62a2c3ae4fb75b",
      "token_id": "1.1579208923731619542357098500868790784067953708956584089131272353293770581592e+77",
      "bidder": "0xe4d3ba99ffdae47c003f1756c01d8e7ee8fef7c9",
      "seller": "0x87956abc4078a0cc3b89b419928b857b8af826ed",
      "price": 1,
      "expires_at": "1551409156000",
      "fingerprint": "0x",
      "status": "sold",
      "asset_id": "145,-79",
      "asset_type": "parcel",
      "block_number": 4918744,
      "block_time_created_at": "1548787699000",
      "block_time_updated_at": "1548787921000",
      "created_at": "2019-01-31T13:42:40.437Z",
      "updated_at": "2019-02-04T12:42:22.785Z"
    }
  ]
}
GET /parcels/:x/:y/bids

说明

Returns a list of bids placed on a given Parcel.

URI 参数

name type min max default description
x int -150 150 0 The X coord of the parcel
y int -150 150 0 The Y coord of the parcel

请求参数

name type default description
status enum all Filter estates by publications status: open, cancelled or sold
bidder string N/A The Ethereum address of the bidder
sanitize boolean true If false, will retrieve all the bids property

请求示例:

GET /parcels/145,-79/bids

返回示例:

{
  "ok": true,
  "data": [
    {
      "id": "0xfbeb6c5f702d3be5564872cd68bc96c683b0029d8116feb79058669c6fe40d1d",
      "token_address": "0x7a73483784ab79257bb11b96fd62a2c3ae4fb75b",
      "token_id": "1.1579208923731619542357098500868790784067953708956584089131272353293770581592e+77",
      "bidder": "0xe4d3ba99ffdae47c003f1756c01d8e7ee8fef7c9",
      "seller": "0x87956abc4078a0cc3b89b419928b857b8af826ed",
      "price": 1,
      "expires_at": "1551409156000",
      "fingerprint": "0x",
      "status": "sold",
      "asset_id": "145,-79",
      "asset_type": "parcel",
      "block_number": 4918744,
      "block_time_created_at": "1548787699000",
      "block_time_updated_at": "1548787921000",
      "created_at": "2019-01-31T13:42:40.437Z",
      "updated_at": "2019-02-04T12:42:22.785Z"
    }
  ]
}
GET /estates/:id/bids

说明

返回给定连块土地上的出价列表。

URI 参数

name type description
id string The id of the estate

请求参数

name type default description
status enum all Filter estates by publications status: open, cancelled or sold
bidder string N/A The Ethereum address of the bidder
sanitize boolean true If false, will retrieve all the bids property

请求示例:

GET /estates/1/bids

返回示例:

{
  "ok": true,
  "data": [
    {
      "id": "0xaac47013b34b4c9a568503db4e8c5b3a41764919ba26214491fb3e665282eaea",
      "token_address": "0x124bf28a423b2ca80b3846c3aa0eb944fe7ebb95",
      "token_id": "1",
      "bidder": "0x87956abc4078a0cc3b89b419928b857b8af826ed",
      "seller": "0xe4d3ba99ffdae47c003f1756c01d8e7ee8fef7c9",
      "price": 2,
      "expires_at": "1551495590000",
      "fingerprint": "0x7bf0da414abc768d638b486dfc3330abd361aa7d7916d673072d4e3776ea9287",
      "status": "sold",
      "asset_id": "1",
      "asset_type": "estate",
      "block_number": 4924562,
      "block_time_created_at": "1548876122000",
      "block_time_updated_at": "1548876183000",
      "created_at": "2019-01-31T13:42:40.697Z",
      "updated_at": "2019-02-04T12:42:23.017Z"
    }
  ]
}
GET /bids/:address/assets

说明

返回卖家或出价人给定地址的出价列表。

URI 参数

name type description
address string An Ethereum address

请求参数

name type default description
status enum all Filter estates by publications status: open, cancelled or sold

请求示例:

GET /bids/0xe4d3ba99ffdae47c003f1756c01d8e7ee8fef7c9/assets

返回示例:

{
  "ok": true,
  "data": [
    {
      "id": "12345",
      "owner": "0xe0653744f2d6a388f1fc7496e085156418a9f5ed",
      "data": {
        "ipns": "",
        "name": "My Estate",
        "parcels": [{ "x": -30, "y": -121 }, { "x": -29, "y": -121 }],
        "version": 0,
        "description": "My estate is awesome"
      },
      "last_transferred_at": "1548929430000",
      "tx_hash": "0x6d1f7cad7419af31b6b1f65205c5336200a1662e35ed9083d5f4323f95cb9dd6",
      "token_id": "12345",
      "update_operator": "0x0000000000000000000000000000000000000000"
    },
    {
      "id": "-74,-52",
      "x": -74,
      "y": -52,
      "auction_price": 2443,
      "district_id": null,
      "owner": "0xdeadbeeffaceb00c",
      "data": {
        "version": 0,
        "name": "My Parcel",
        "description": "My parcel is awesome",
        "ipns": ""
      },
      "auction_owner": "0xdeadbeeffaceb00c",
      "tags": {},
      "last_transferred_at": null,
      "in_estate": false
    }
  ]
}

小区地块数

GET /addresses/:address/contributions

说明

返回指定地址的小区地块数

URI 参数

名称 类型 说明
address string 以太地址

返回示例

{
  "ok": true,
  "data": [
    {
      "address": "0x374cc898638940452b6d7b34f6063170976026f0",
      "district_id": "219ac351-e6ce-4e17-8b84-eb008afddf69",
      "land_count": "5"
    },
    {
      "address": "0x374cc898638940452b6d7b34f6063170976026f0",
      "district_id": "d9bfa18a-c856-457d-8d85-e2dc3b7648a1",
      "land_count": "15"
    },
    {
      "address": "0x374cc898638940452b6d7b34f6063170976026f0",
      "district_id": "f5d8e722-fdce-4d41-b38b-adfed2e0cf6c",
      "land_count": "10"
    }
  ]
}

小区

GET /districts

返回创世纪城所有的的小区

返回示例

{
  "ok": true,
  "data": [
    {
      "id": "106f1557-4a92-41a4-9f18-40fcb90b4031",
      "name": "Dragon City",
      "description": "A perfect combination of China’s ancient culture and Western modernization, a reflection of both the Eastern and Western civilizations.",
      "link": "https://github.com/decentraland/districts/issues/30",
      "public": true,
      "parcel_count": "6485",
      "center": "105,-89"
    },
    {
      "id": "219ac351-e6ce-4e17-8b84-eb008afddf69",
      "name": "AETHERIAN project",
      "description": "Aetherian City will be one of the main attractions for visitors and dwellers of Decentraland, as it intends to be the largest cyberpunk-agglomeration of the metaverse.",
      "link": "https://github.com/decentraland/districts/issues/33",
      "public": true,
      "parcel_count": "10005",
      "center": "106,105"
    }
  ]
}

地产

GET /estates

说明

返回打包的土地(地产)列表,根据使用的查询参数进行分页、排序和筛选。

名称 类型 缺省 说明
status enum open 根据地产出售状态筛选: open, cancelled or sold
sort_by enum created_at 排序方式: price, created_at, block_time_updated_atexpires_at
sort_order enum depends on sort_by 排序类型: ascdesc
limit int 20 返回记录数
offset int 0 眺过 offset 条记录 (用于分页)

返回示例

{
  "ok": true,
  "data": {
    "estates": [
      {
        "id": "12345",
        "owner": "0xe0653744f2d6a388f1fc7496e085156418a9f5ed",
        "data": {
          "ipns": "",
          "name": "My Estate",
          "parcels": [
            { "x": -30, "y": -121 },
            { "x": -29, "y": -121 },
            { "x": -29, "y": -122 },
            { "x": -30, "y": -122 }
          ],
          "version": 0,
          "description": "My estate is awesome"
        },
        "last_transferred_at": "1548929430000",
        "tx_hash": "0x6d1f7cad7419af31b6b1f65205c5336200a1662e35ed9083d5f4323f95cb9dd6",
        "token_id": "12345",
        "update_operator": "0x0000000000000000000000000000000000000000",
        "publication": {
          "tx_hash": "0xbcad5e05351972174c05633e8965de0b05a5a0ce4c5415c1a392ffae20b1cab2",
          "tx_status": "confirmed",
          "owner": "0xf631c1ba09ee33e7649cac62ccb6d0f410f5647a",
          "price": 39500,
          "expires_at": 1554210000000,
          "status": "sold",
          "buyer": "0xe0653744f2d6a388f1fc7496e085156418a9f5ed",
          "contract_id": "0xfe8288241f94ebf31c132b85eb9ee6b834fb27b4c564eab6ba18b3813fafda38",
          "block_number": 7151964,
          "block_time_created_at": 1548906378000,
          "block_time_updated_at": 1548929430000,
          "asset_type": "estate",
          "asset_id": "12345",
          "marketplace_address": "0x8e5660b4ab70168b5a6feea0e0315cb49c8cd539"
        }
      }
    ],
    "total": 80
  }
}
GET /addresses/:address/estates

说明

返回指定地址所有打包的土地

URI 参数

名称 类型 说明
address string 以太坊地址

地图

GET /map

说明

返回指定地区所有的地块或地产

查询参数

名称 类型 最小值 最大值 说明
nw int -150 150 西北的坐标
se int -150 150 东南的坐标

请求示例:

GET /map?nw=-10,10&se=10,-10

返回结果

{
  "data": {
    "assets": {
      "parcels": [
        /* parcels */
        ],
      "estates": [
        /* estates */
        ]
    },
    "total": 441
  }
}
GET /map.png

说明

以 PNG 图像返回创世纪城地图的一部分

查询参数

名称 类型 最小值 最大值 缺省 说明
width int 32 2048 500 PNG 图像宽度,单位 pixels
height int 32 2048 500 PNG 图像高度,单位 pixels
size int 5 40 10 地块显示的大小 (例 10 则使用 10x10 象素显示地块)
center 坐标 -150,-150 150,150 0,0 地图中心点坐标
selected 坐标列表 N/A N/A N/A 由分号分隔的坐标列表,这些将显示为“已选中”
publications boolean N/A N/A false 设为 true 时在售的地块会被突出显示

限制

单个 PNG 中最多只能显示 15,000 个地块,如果请求超过此阈值,API 将返回 500,并显示如下消息:

过多的地块。 您正在尝试显示 42436 块地,允许的最大值为 15000。

请求示例:

GET /map.png?width=500&height=500&size=10&center=20,21&selected=20,20;20,21;20,22;20,23;19,21;21,21

Result:

map-1

GET /parcels/:x/:y/map.png

说明

返回以指定地块为中心的一部分 PNG 地图

URI 参数

名称 类型 最小值 最大值 缺省 说明
x int -150 150 0 地块的 X 坐标值
y int -150 150 0 地块的 Y 坐标值

查询参数

名称 类型 最小值 最大值 缺省 说明
width int 32 2048 500 PNG 图像宽度,单位 pixels
height int 32 2048 500 PNG 图像高度,单位 pixels
size int 5 40 10 地块显示的大小 (例 10 则使用 10x10 象素显示地块)
publications boolean N/A N/A false 设为 true 时在售的地块会被突出显示

限制

单个 PNG 中最多只能显示 15,000 个地块,如果请求超过此阈值,API 将返回 500,并显示如下消息:

过多的地块。 您正在尝试显示 42436 块地,允许的最大值为 15000。

请求示例:

GET /parcels/-36/-125/map.png?height=500&width=500&size=10&publications=true

Result:

map-1

GET /estates/:id/map.png

说明

如同 /parcels/:x/:y/map.png 一样,不过这里采用 id 来标识地产,而不是用 xy 坐标。返回以指定地产为中心的一部分 PNG 地图。

URI 参数

名称 类型 说明
id string 地产 ID

查询参数

名称 类型 最小值 最大值 缺省 说明
width int 32 2048 500 PNG 图像宽度,单位 pixels
height int 32 2048 500 PNG 图像高度,单位 pixels
size int 5 40 10 地块显示的大小 (例 10 则使用 10x10 象素显示地块)
publications boolean N/A N/A false 设为 true 时在售的地块会被突出显示

限制

单个 PNG 中最多只能显示 15,000 个地块,如果请求超过此阈值,API 将返回 500,并显示如下消息:

过多的地块。 您正在尝试显示 42436 块地,允许的最大值为 15000。

请求示例:

GET /estates/23/map.png?height=500&width=500&size=10&publications=true

Result:

map-2

抵押

GET /mortgages/:address/parcels

说明

返回包含给定地址抵押的地块列表。

URI 参数

name type description
address string 以太地址

请求示例:

GET /mortgages/0x374cc898638940452b6d7b34f6063170976026f0/parcels

请求示例:

{
  "ok": true,
  "data": [
    {
      "id": "-44,-144",
      "x": -44,
      "y": -144,
      "auction_price": null,
      "district_id": null,
      "owner": "0xaf592460d6a44517aba2fb0bcb02ee8f4103b502",
      "data": { "version": 0 },
      "auction_owner": null,
      "tags": {},
      "last_transferred_at": "1548424046000",
      "estate_id": null,
      "update_operator": "0xe4d3ba99ffdae47c003f1756c01d8e7ee8fef7c9",
      "auction_timestamp": null,
      "publication": null
    }
  ]
}
GET /addresses/:address/mortgages

说明

返回给定地址所有抵押

URI 参数

name type description
address string 以太地址

Query 参数

name type default description
status enum all Filter parcels by publications status: pending, cancelled, ongoing, paid, defaulted or claimed

请求示例:

GET /addresses/0x374cc898638940452b6d7b34f6063170976026f0/mortgages

Result:

{
  "ok": true,
  "data": [
    {
      "tx_hash": "0xf67f78f63a116fb14a5a119c73505822beddab16c7f3c736e2f88fc48009760f",
      "tx_status": "confirmed",
      "block_number": 4929341,
      "status": "cancelled",
      "asset_id": "-102,-77",
      "asset_type": "parcel",
      "borrower": "0x374cc898638940452b6d7b34f6063170976026f0",
      "lender": null,
      "loan_id": 685,
      "mortgage_id": 16,
      "amount": 10,
      "is_due_at": "0",
      "expires_at": "1551571200000",
      "block_time_created_at": "1548943095000",
      "block_time_updated_at": "1548944551000",
      "created_at": "2019-01-31T13:58:53.067Z",
      "updated_at": "2019-02-04T12:42:23.047Z",
      "outstanding_amount": 0,
      "payable_at": "777600",
      "interest_rate": 15552000000000,
      "punitory_interest_rate": 10367989632000,
      "paid": 0,
      "started_at": null
    }
  ]
}
GET /parcels/:x/:y/mortgages

说明

返回给定土地的抵押情况。

URI 参数

name type min max default description
x int -150 150 0 The X coord of the parcel
y int -150 150 0 The Y coord of the parcel

Query 参数

name type default description
status enum all Filter parcels by publications status: pending, cancelled, ongoing, paid, defaulted or claimed

请求示例:

GET /parcels/-102/-77/mortgages

Result:

{
  "ok": true,
  "data": [
    {
      "tx_hash": "0xf67f78f63a116fb14a5a119c73505822beddab16c7f3c736e2f88fc48009760f",
      "tx_status": "confirmed",
      "block_number": 4929341,
      "status": "cancelled",
      "asset_id": "-102,-77",
      "asset_type": "parcel",
      "borrower": "0xe4d3ba99ffdae47c003f1756c01d8e7ee8fef7c9",
      "lender": null,
      "loan_id": 685,
      "mortgage_id": 16,
      "amount": 10,
      "is_due_at": "0",
      "expires_at": "1551571200000",
      "block_time_created_at": "1548943095000",
      "block_time_updated_at": "1548944551000",
      "created_at": "2019-01-31T13:58:53.067Z",
      "updated_at": "2019-02-04T12:42:23.047Z",
      "outstanding_amount": 0,
      "payable_at": "777600",
      "interest_rate": 15552000000000,
      "punitory_interest_rate": 10367989632000,
      "paid": 0,
      "started_at": null
    }
  ]
}

地块

GET /parcels

返回地块列表,根据使用的查询参数进行分页、排序和筛选。

查询参数

名称 类型 缺省 说明
status enum open 根据地产出售状态筛选: open, cancelled or sold
sort_by enum created_at 排序方式: price, created_at, block_time_updated_atexpires_at
sort_order enum depends on sort_by 排序类型: ascdesc
limit int 20 返回记录数
offset int 0 眺过 offset 条记录 (用于分页)

返回示例

{
  "ok": true,
  "data": {
    "parcels": [
      {
        "id": "-74,-52",
        "x": -74,
        "y": -52,
        "auction_price": 2443,
        "district_id": null,
        "owner": "0xdeadbeeffaceb00c",
        "data": {
          "version": 0,
          "name": "My Parcel",
          "description": "My parcel is awesome",
          "ipns": ""
        },
        "auction_owner": "0xdeadbeeffaceb00c",
        "tags": {
          "proximity": {
            "plaza": {
              "district_id": "55327350-d9f0-4cae-b0f3-8745a0431099",
              "distance": 2
            },
            "road": {
              "district_id": "f77140f9-c7b4-4787-89c9-9fa0e219b079",
              "distance": 0
            }
          }
        },
        "last_transferred_at": null,
        "in_estate": false,
        "publication": {
          "tx_hash": "0xdeadbeeffaceb00c",
          "tx_status": "confirmed",
          "owner": "0xdeadbeeffaceb00c",
          "price": 60000,
          "status": "open",
          "buyer": null,
          "contract_id": "0xdeadbeeffaceb00c",
          "block_number": 5812730,
          "expires_at": 1533081600000,
          "block_time_created_at": 1529352925000,
          "block_time_updated_at": null,
          "type": "parcel",
          "asset_id": "-74,-52",
          "marketplace_id": "0xdeadbeeffaceb00c"
        }
      }
    ],
    "total": 2
  }
}
GET /addresses/:address/parcels

说明

返回指定地址所拥有的地块

GET /parcels/:x/:y

说明

返回坐标指定的地块

URI 参数

name type min max default description
x int -150 150 0 The X coord of the parcel
y int -150 150 0 The Y coord of the parcel

请求示例:

GET /parcels/-48/-29

返回示例

{
  "ok": true,
  "data": {
    "id": "-48,-29",
    "x": -48,
    "y": -29,
    "auction_price": 2443,
    "district_id": null,
    "owner": "0xdeadbeeffaceb00c",
    "data": {
      "version": 0,
      "name": "My Parcel",
      "description": "My parcel is awesome",
      "ipns": ""
    },
    "auction_owner": "0xdeadbeeffaceb00c",
    "tags": {
      "proximity": {
        "plaza": {
          "district_id": "55327350-d9f0-4cae-b0f3-8745a0431099",
          "distance": 2
        },
        "road": {
          "district_id": "f77140f9-c7b4-4787-89c9-9fa0e219b079",
          "distance": 0
        }
      }
    },
    "last_transferred_at": null,
    "in_estate": false
  }
}
GET /parcels/:tokenId

说明

通过其区块链 id(token id)返回单个地块

URI 参数

name type default description
tokenId int, hex   The parcel blockchain id

请求示例:

GET /parcels/115792089237316195423570985008687907837276713420356456256678977458620023701475
GET /parcels/0xffffffffffffffffffffffffffffffd0ffffffffffffffffffffffffffffffe3

返回示例

### Response Example

```json
{
  "ok": true,
  "data": {
    "id": "-74,-52",
    "x": -74,
    "y": -52,
    "auction_price": 2443,
    "district_id": null,
    "owner": "0xdeadbeeffaceb00c",
    "data": {
      "version": 0,
      "name": "My Parcel",
      "description": "My parcel is awesome",
      "ipns": ""
    },
    "auction_owner": "0xdeadbeeffaceb00c",
    "tags": {
      "proximity": {
        "plaza": {
          "district_id": "55327350-d9f0-4cae-b0f3-8745a0431099",
          "distance": 2
        },
        "road": {
          "district_id": "f77140f9-c7b4-4787-89c9-9fa0e219b079",
          "distance": 0
        }
      }
    },
    "last_transferred_at": null,
    "in_estate": false
  }
}
GET /parcels/:x/:y/encodedId

说明

Returns the blockchain id (token id) by the parcel coordinates 通过土地坐标返回区块链 ID(token id)

URI 参数

name type min max default description
x int -150 150 0 The X coord of the parcel
y int -150 150 0 The Y coord of the parcel

请求示例:

GET /parcels/-48/-29/encodedId

返回示例

{
  "ok": true,
  "data": {
    "encoded_id": "0xffffffffffffffffffffffffffffffd0ffffffffffffffffffffffffffffffe3"
  }
}

发布

GET /parcels/:x/:y/publications

说明

返回给定地块存在的发布情况

URI 参数

名称 类型 最小值 最大值 缺省 说明
x int -150 150 0 地块 X 坐标值
y int -150 150 0 地块 Y 坐标值
GET /publications/:txHash

说明

通过交易哈希返回特定发布

URI 参数

名称 类型 说明
txHash string 发布的交易哈希

翻译

GET /translations/:locale

说明

返回指定 locale 的翻译

URI 参数

名称 类型 说明
locale enum 以下语言中的一种: en, es, fr, ko or zh