> For the complete documentation index, see [llms.txt](https://docs.regionx.tech/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.regionx.tech/docs/build/market-pallet.md).

# Market pallet

This section of the wiki will list all of the extrinsics provided by the market pallet.

### [`list_region`](https://github.com/RegionX-Labs/RegionX-Node/blob/1887388bc496d0ff4dafd51ece4329a9647a609f/pallets/market/src/lib.rs#L158)

Extrinsic for listing a region on sale.

Arguments:

* `region_id`: The region that the caller intends to list for sale.
* `timeslice_price`: The price per a single timeslice.
* `sale_recipient`: The \`AccountId\` receiving the payment from the sale. If not specified this will be the caller.

```rust
pub fn list_region(
	origin: OriginFor<T>,
	region_id: RegionId,
	timeslice_price: BalanceOf<T>,
	sale_recipient: Option<T::AccountId>,
) -> DispatchResult { }
```

### [`unlist_region`](https://github.com/RegionX-Labs/RegionX-Node/blob/1887388bc496d0ff4dafd51ece4329a9647a609f/pallets/market/src/lib.rs#L202)

Extrinsic for unlisting a region from sale.

Arguments:

* `region_id`: The region that the caller intends to unlist from sale.

```rust
pub fn unlist_region(origin: OriginFor<T>, region_id: RegionId) -> DispatchResult { }
```

### [`update_region_price`](https://github.com/RegionX-Labs/RegionX-Node/blob/1887388bc496d0ff4dafd51ece4329a9647a609f/pallets/market/src/lib.rs#L228)

Extrinsic for updating the price of a region listed on sale.

Arguments:

* `region_id`: The region for which we want to update the timeslice price.
* `new_timeslice_price`: The new timeslice price.

<pre class="language-rust"><code class="lang-rust">pub fn update_region_price(
	origin: OriginFor&#x3C;T>,
	region_id: RegionId,
	new_timeslice_price: BalanceOf&#x3C;T>,
<strong>) -> DispatchResult { }
</strong></code></pre>

### [`purchase_region`](https://github.com/RegionX-Labs/RegionX-Node/blob/1887388bc496d0ff4dafd51ece4329a9647a609f/pallets/market/src/lib.rs#L260C10-L260C25)

Extrinsic for purchasing a region listed on sale.

Arguments:

* `region_id`: The region that is listed on sale.
* `max_price`: The maximum price the buyer is willing to pay for the region. If the actual price exceeds this amount, the purchase will not be executed. The region price is linearly decreasing for currently active(i.e. usable) regions.

```rust
pub fn purchase_region(
	origin: OriginFor<T>,
	region_id: RegionId,
	max_price: BalanceOf<T>,
) -> DispatchResult { }
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.regionx.tech/docs/build/market-pallet.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
