> For the complete documentation index, see [llms.txt](https://trader-docs.b2trader.b2broker.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://trader-docs.b2trader.b2broker.com/knowledge-base/time-in-force.md).

# Time in force

The following time-in-force settings can be specified for orders:

* **FOK** (fill-or-kill): Such orders are either filled instantly or killed (cancelled). In other words, a fill-or-kill order must be fulfilled instantly or not executed at all. FOK orders are used when partial delivery of assets isn't acceptable for any reason.
* **IOC** (immediate-or-cancel): This setting implies that any part of an order that can't be filled instantly must be cancelled. Upon placing an IOC order, an attempt will be made to instantly execute it (in full or in part) at the best possible price, after which any remaining, unfilled part will be cancelled. If no amount is available at a specified price upon placing such order, it's cancelled instantly.
* **GTC** (good-‘til-cancelled): The default setting applied to all limit orders. Open GTC orders are awaiting execution until they are cancelled explicitly by a trader or filled.
* **GTD** (good-‘til-date): Can be applied to limit and stop limit orders. Such orders remain listed in the order book until a specified date or until they are cancelled by a trader. By that time the order can be partially executed.
* **DAY**: Can be applied to limit and stop limit orders. Such orders remain listed in the order book until 23:59 of the current day or until they are cancelled by a trader. By that time the order can be partially executed.

{% hint style="info" %}
The order expiration time is defined by the time settings specified for the BP, without taking into account the time settings of the devices from which the BP is accessed.
{% endhint %}


---

# 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://trader-docs.b2trader.b2broker.com/knowledge-base/time-in-force.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.
