# Simple Ordering

{% hint style="success" %}
You can use variables **$size** and **$entry** wherever you see \<size> and \<price>. You can  enter \<size> as the base / the underlying asset, in USD value (using "$") or as a percentage of the available balance (using "%"). \<price> can be specified as an absolute price or as a distance from last price (relative or in %). See [Variables](/documentation/terminal-cli/overview.md#variables) for more details
{% endhint %}

### Market Orders

| Command Text             | Description                                                 | Example                                  |
| ------------------------ | ----------------------------------------------------------- | ---------------------------------------- |
| **`buy <size>`**         | Market buy immediately 100 of the underlying                | *`buy 100`*                              |
| **`buy <size>`**         | Market buy immediately with a size worth 1000 USD           | *`buy 1000$`*                            |
| **`buy <size>`**         | Market buy immediately with an amount of available balance  | *`buy 10%`*, *`buy 100%`*                |
| **`sell <size>`**        | Market sell immediately 0.1 of the underlying               | *`sell 0.1`*                             |
| **`sell <size>`**        | Market sell immediately with a size worth 5000 USD          | *`sell 5000$`*                           |
| **`sell <size>`**        | Market sell immediately with an amount of available balance | *`sell 10%`*, *`sell 50%`*               |
| **`buy <size> reduce`**  | Market buy with reduce e.g. unwind a short position         | *`buy 100 reduce`*, *`buy 50% reduce`*   |
| **`sell <size> reduce`** | Market sell with reduce e.g. unwind a long position         | *`sell 10 reduce`*, *`sell 100$ reduce`* |

### Limit Orders

| Command Text                        | Description                                                                  | Example                                                                                                                                        |
| ----------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| **`buy <size> at <price>`**         | Place a limit buy order for the given size at a specified price or distance  | <p><em><code>buy 100 at 13789</code></em><br><em><code>buy 10% at -250</code></em><br><em><code>buy 1000$ at -1%</code></em></p>               |
| **`sell <size> at <price>`**        | Place a limit sell order for the given size at a specified price or distance | <p><em><code>sell 0.5 at 64000</code></em><br><em><code>sell 25% at +100</code></em><br><em><code>sell 1000$ at 0.1%</code></em></p>           |
| **`buy <size> at <price> reduce`**  | Place a reduce limit buy order at the price                                  | <p><em><code>buy 10 at 11000 reduce</code></em><br><em><code>buy 100% at -1% reduce</code></em></p>                                            |
| **`sell <size> at <price> reduce`** | Place a reduce limit sell order at the price                                 | <p><em><code>sell 100$ at 456 reduce</code></em><br><em><code>sell 50% at +300 reduce</code></em></p>                                          |
| **`buy <size> best`**               | Enter the size at the best price in the orderbook (quote)                    | <p><em><code>buy 0.1 best</code></em><br><em><code>buy 1000$ best</code></em><br><em><code>buy 100% best</code></em></p>                       |
| **`sell <size> best`**              | Enter the size at the best price in the orderbook (quote)                    | <p><em><code>sell 100 best</code></em><br><em><code>sell 10000$ best</code></em><br><em><code>sell 10% best</code></em></p>                    |
| **`buy <size> best reduce`**        | Close / reduce a position at best price                                      | <p><em><code>buy 0.25 best reduce</code></em><br><em><code>buy 100% best reduce</code></em><br><em><code>buy 500$ best reduce</code></em></p>  |
| **`sell <size> best reduce`**       | Close / reduce a position at best price                                      | <p><em><code>sell 25 best reduce</code></em><br><em><code>sell 50% best reduce</code></em><br><em><code>sell 5000$ best reduce</code></em></p> |


---

# 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.insilicoterminal.com/documentation/terminal-cli/simple-ordering.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.
