# Trade Locking

Trade Locking is an important compliance feature in Molecule.

#### Definitions

When a trade is locked, it **cannot** be:

* edited from the Trade Edit screen
* edited as part of a batch from the Trades screen
* edited in-grid on the Trades screen
* changed via the API

A locked trade **can** be:

* Delivered against (via a Ticket)
* Actualized (via the Actualization screen, a Ticket, or As-Generated functionality)

<mark style="background-color:blue;">A frequent reason for a bulk or in-grid edit on the Trades screen to fail, is that the relevant trades are locked.</mark>

#### Actions

**Locking**

A trade can be locked in any of these ways:

* Manually, from the Trades or Trade Edit screen (by someone with the right permission)
* Automatically, based on a time of day set for your Account
* Automatically, based on the electronic source of the trade

<mark style="background-color:yellow;">If a lock time is set for your Account, any unlocked trades will re-lock at that time.</mark>

#### Unlocking

A trade can be unlocked manually from the Trade Edit screen:

<figure><img src="https://files.helpdocs.io/56bu62syz9/articles/0jgfj4ncor/1689890125258/screenshot-2023-07-20-at-4-54-45-pm.png" alt="Unlocking a Single Trade" width="563"><figcaption></figcaption></figure>

Alternatively, one or more trades can be unlocked in a batch, from the Trades screen:

<figure><img src="https://files.helpdocs.io/56bu62syz9/articles/0jgfj4ncor/1689890033612/image.png" alt="Bulk Unlocking Trades" width="563"><figcaption></figcaption></figure>

When a trade is unlocked, its Trader will receive an in-app notification that the trade is unlocked for editing:

<figure><img src="https://files.helpdocs.io/56bu62syz9/articles/0jgfj4ncor/1689890927315/image.png" alt="Unlock Notification" width="563"><figcaption></figcaption></figure>

#### Viewing Status

On the Trades screen, the Status column will read `Locked` for locked trades. This column is the same on the API. On a Trade Edit screen, a yellow lock will appear in multiple places, and the header makes clear that the trade is locked:

<figure><img src="https://files.helpdocs.io/56bu62syz9/articles/0jgfj4ncor/1689890170113/image.png" alt="Viewing Lock Status" width="563"><figcaption></figcaption></figure>

#### Interactions

The Workflows feature is a more advanced, customizable compliance feature in Molecule. Locking or unlocking a trade can trigger a Workflow status change. This is managed on the Workflows screen.

#### Permissions

The permission that controls locking and unlocking is `Edit Trade Status`.

#### Setup

Molecule’s Customer Success team is able to set up the locking feature, as well as the criteria that should trigger automatic locking.


---

# 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://help.molecule.io/core-functionality/core-features/specialized-features/trades/trade-workflows/trade-locking.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.
