# Order pallet

The order pallet is mainly meant for parachains looking to interact with the market. Therefore, teams looking to deploy their parachain on Polkadot should look into procuring Coretime by accessing the Market pallet.

Nevertheless, if they cannot find Coretime on the market that meets their requirements, they can create an order. This way, they will signal to Coretime traders that there is demand for a region that meets the specified requirements.

### `create_order`

Extrinsic for creating an order.

Arguments:

* `para_id`: The para id to which Coretime will be allocated.
* `requirements`: Region requirements of the order.

```rust
pub fn create_order(
	origin: OriginFor<T>,
	para_id: ParaId,
	requirements: Requirements,
) -> DispatchResult {
```

### `cancel_order`

Extrinsic for cancelling an order.

If the region requirements on which the order was based are for an expired region, anyone can cancel the order.

Only expired orders can be cancelled.

Arguments:

* `order_id`: The order the caller wants to cancel.

```rust
pub fn cancel_order(origin: OriginFor<T>, order_id: OrderId) -> DispatchResult { }
```

### `contribute`

Extrinsic for contributing to an order.

Arguments:

* `order_id`: The order to which the caller wants to contribute.
* `amount`: The amount of tokens the user wants to contribute. This amount will be reserved and will only be spent if the order gets fulfilled.

```rust
pub fn contribute(
	origin: OriginFor<T>,
	order_id: OrderId,
	amount: BalanceOf<T>,
) -> DispatchResult { }
```

### `remove_contribution`

Extrinsic for removing contributions from a cancelled order.

Arguments:

* `order_id`: The cancelled order from which the user wants to claim back their contribution.

```rust
pub fn remove_contribution(origin: OriginFor<T>, order_id: OrderId) -> DispatchResult { }
```


---

# Agent Instructions: 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:

```
GET https://docs.regionx.tech/docs/build/order-pallet.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
