> This page is for TWS API.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://interactivebrokers.com/docs/llms.txt.

# Market Order

A Market order is an order to buy or sell at the market bid or offer price. A market order may increase the likelihood of a fill and the speed of execution, but unlike the Limit order a Market order provides no price protection and may fill at a price far lower/higher than the current displayed bid/ask.

More on [Market Orders](https://www.interactivebrokers.com/en/index.php?f=602)

More on [Supported exchanges](https://www.interactivebrokers.com/en/index.php?f=3883?ot=mkt)

#### Python

```python
order = Order()
order.action = action
order.orderType = "MKT"
order.totalQuantity = quantity
```

#### Java

```java
Order order = new Order();
order.action(action);
order.orderType("MKT");
order.totalQuantity(quantity);
```

#### C++

```cpp
Order order;
order.action = action;
order.orderType = "MKT";
order.totalQuantity = quantity;
```

#### C\#

```csharp
Order order = new Order();
order.Action = action;
order.OrderType = "MKT";
order.TotalQuantity = quantity;
```

#### VB.NET

```vbnet
Dim order As Order = New Order
order.Action = action
order.OrderType = "MKT"
order.TotalQuantity = quantity
```