> For the complete documentation index, see [llms.txt](https://rwaperp-1.gitbook.io/rwaperp-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://rwaperp-1.gitbook.io/rwaperp-docs/rwa-perp-b2b-api/rest-api-reference/trading-and-orders/post-v1-order.md).

# post v1 order

`POST /v1/order`

**Authentication:** RWA

**Rate limit:** 10 requests per second

## Description

Places a maker or taker order. Execution updates are delivered through the WebSocket stream. The endpoint responds immediately after the order is created.

`MARKET` type order behavior: it matches until the full size is executed. If the size is too large (larger than whole book) or the matching price exceeds the price limit (refer to `price_range`), then the remaining quantity will be cancelled.

`IOC` type order behavior: it matches as much as possible at the order\_price. If not fully executed, then remaining quantity will be cancelled.

`FOK` type order behavior: if the order can be fully executed at the order\_price then the order gets fully executed otherwise it is cancelled without any execution.

`POST_ONLY` type order behavior: if the order will be executed with any maker trades at the time of placement, then it will be cancelled without any execution. If a `POST_ONLY` order would match only with hidden quantity at the price level, the incoming `POST_ONLY` order is treated as the maker side for that execution and the resting hidden order is treated as the taker side.

`ASK` type order behavior: the order price is guaranteed to be the best ask price of the orderbook at the time it gets accepted.

`BID` type order behavior: the order price is guaranteed to be the best bid price of the orderbook at the time it gets accepted.

`visible_quantity` behavior: it sets the maximum quantity to be shown on orderbook. By default, it is equal to order\_quantity, negative values and values larger than `order_quantity` is not allowed. If it sets to 0, the order would be hidden from the orderbook. It doesn't work for `MARKET`/`IOC`/`FOK` orders since orders with these types would be executed and cancelled immediately and not be shown on orderbook. For `LIMIT` order, as long as it's not complete, `visible_quantity` is the maximum quantity shown on orderbook. When hidden quantity is matched by a new incoming order, the hidden side is marked as taker and charged the taker fee. If an order has both hidden and visible quantity, the hidden quantity is matched before the visible quantity.

`order_quantity` values are provided. The precision of the number should be within 8 digits.

`client_order_id` behavior: customized order\_id, a unique id among open orders. Orders with the same `client_order_id` can be accepted only when the previous one is completed, otherwise the order will be rejected.

{% hint style="info" %}
This endpoint requires `trading` scope in API key.
{% endhint %}

## Parameters

| Name            | Location | Type   | Required | Description                                                                                 | Example |
| --------------- | -------- | ------ | -------- | ------------------------------------------------------------------------------------------- | ------- |
| `x-recv-window` | header   | number | No       | Use this parameter to control the timeout threshold for placing order, unit in milliseconds | `20`    |

## Request body

| Field              | Type                 | Required | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ------------------ | -------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `symbol`           | string               | Yes      | Example: `PERP_ETH_USDC`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `client_order_id`  | string               | No       | 36 length, accepts hyphen but cannot be the first character, default: null                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `order_type`       | string               | Yes      | `LIMIT`/`MARKET`/`IOC`/`FOK`/`POST_ONLY`/`ASK`/`BID`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `order_price`      | number               | No       | If order\_type is MARKET/ASK/BID, then is not required, otherwise this parameter is required.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `order_quantity`   | number               | No       | —                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `order_amount`     | number               | No       | For MARKET/ASK/BID order, the order size in terms of quote currency                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `visible_quantity` | number               | No       | The order quantity shown on orderbook. (default: equal to order\_quantity) Visible quantity is not supported for post-only orders.                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `side`             | string               | Yes      | `SELL`/`BUY`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `reduce_only`      | boolean              | No       | Default false                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `slippage`         | number               | No       | `MARKET` orders beyond this slippage will not be executed                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `order_tag`        | string               | No       | Optional tag for the order. Supports two formats: - Referral code: plain string (e.g., `REFERRAL2026`) - overrides referral relationship - Custom trading fee: `enum:<owning_broker_id>:<enum_id>` (e.g., `enum:broker_b:GRID_PRO`) - adds the custom fee and preserves the existing referral relationship New custom-fee-tagged orders must use the current three-segment format. Legacy `enum:<enum_id>` tags are supported only on orders accepted before cutover. Maximum length: 128 characters. Cannot be modified after order placement. Example: `enum:broker_b:GRID_PRO` |
| `level`            | number               | No       | Integer value from `0` to `4`. This parameter controls whether to present the price of bid0 to bid4 or ask0 to ask4. Only allowed when `order_type` is `BID` or `ASK`.                                                                                                                                                                                                                                                                                                                                                                                                            |
| `post_only_adjust` | boolean              | No       | If set to true, then price will be adjusted to 1 tick close to current best price. Only supported for `POST_ONLY` type orders                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `margin_mode`      | `CROSS` / `ISOLATED` | No       | Margin mode for the order. Default: the symbol's current default margin mode.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |

## Responses

### HTTP 200

OK

| Field                  | Type    | Required | Description                                                   |
| ---------------------- | ------- | -------- | ------------------------------------------------------------- |
| `success`              | boolean | Yes      | Indicates whether the request was successful. Example: `True` |
| `timestamp`            | integer | No       | Server timestamp in milliseconds. Example: `1702989203989`    |
| `data`                 | object  | Yes      | —                                                             |
| `data.order_id`        | number  | No       | Example: `13`                                                 |
| `data.client_order_id` | string  | No       | Example: `testclientid`                                       |
| `data.order_type`      | string  | No       | Example: `LIMIT`                                              |
| `data.order_price`     | number  | No       | Example: `100.12`                                             |
| `data.order_quantity`  | number  | No       | Example: `0.987654`                                           |
| `data.error_message`   | string  | No       | Example: `none`                                               |


---

# 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://rwaperp-1.gitbook.io/rwaperp-docs/rwa-perp-b2b-api/rest-api-reference/trading-and-orders/post-v1-order.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.
