> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bulk.trade/llms.txt
> Use this file to discover all available pages before exploring further.

# Market Order

> Submit a market order with optional slippage and builder-code fees

> [!NOTE]
>
> Submit this action through the signed WebSocket `post` envelope. See the
> [request format](https://docs.bulk.trade/api-reference/ws-trading.md#post-request-format) and
> [Transaction Signing](https://docs.bulk.trade/api-reference/signing.md) for nonce, signature, and
> canonical encoding requirements. These examples contain illustrative nonces
> and placeholder signatures; sign the exact payload with a fresh nonce before use.

```json theme={null}
{
  "method": "post",
  "request": {
    "type": "action",
    "payload": {
      "actions": [
        {"m": {"c": "BTC-USD", "b": true, "sz": 0.1, "r": false, "i": false}}
      ],
      "nonce": "1704067200000000000",
      "account": "FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7",
      "signer": "FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7",
      "signature": "5j7s...base58..."
    }
  },
  "id": 2
}
```

**Market order (`m`) fields:** `c` (symbol), `b` (true = buy), `sz` (size), `r` (reduce-only), `i` (isolated routing flag, defaults to false), optional `slippage` in basis points, and optional builder-code fee in `builderCode` (`{to, fee}`; omit when absent).

`slippage` bounds adverse execution relative to fair price. Omission uses the
configured market default. An explicit value is part of the signed payload, so sign and
submit the same field presence and value. For example:

```json theme={null}
{"m":{"c":"BTC-USD","b":true,"sz":0.1,"r":false,"i":false,"slippage":50.0}}
```

With builder code:

```json theme={null}
{"m": {"c": "BTC-USD", "b": true, "sz": 0.1, "r": false, "i": false, "builderCode": {"to": "recipient_pubkey_base58", "fee": 5}}}
```

## Responses and errors

See the shared [response format](https://docs.bulk.trade/api-reference/ws-trading.md#response-format),
[status types](https://docs.bulk.trade/api-reference/ws-trading.md#status-types), and
[error handling](https://docs.bulk.trade/api-reference/ws-trading.md#error-handling). Follow subsequent
order and fill events through the [account stream](https://docs.bulk.trade/api-reference/ws-account.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.