# Coverage Orders

The Coverage Orders table explains the order details of coverage accounts. The fields for the CoverageOrders table are:

**Table Name:&#x20;*****CoverageOrders***

| **Column Name**        | **Data Type**   | **Valid Values** | **Allow Nulls** | **Description**                                                                                                                                                                                                                                                                            |
| ---------------------- | --------------- | ---------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| PK\_OrderID            | bigint identity |                  | No              | OrderID                                                                                                                                                                                                                                                                                    |
| LPOrdID                | varchar         |                  | Yes             | It is used in the case of partial close, it contains the ID of the original PK Order ID. Default it is kept as null                                                                                                                                                                        |
| OrigOrdID              | varchar         |                  | Yes             | External order ID of Abook (master). Bbook (inhouse order ID in the case of web trading platform)                                                                                                                                                                                          |
| FK\_AccountID          | int             |                  | No              | Account ID (TS ID)                                                                                                                                                                                                                                                                         |
| PositionSize           | bigint          |                  | Yes             | Order quantity                                                                                                                                                                                                                                                                             |
| Price                  | decimal         |                  | Yes             | request price of the symbol                                                                                                                                                                                                                                                                |
| FK\_OrderType          | int             |                  | No              | <p>1 = MARKET</p><p>2 = LIMIT</p><p>3 = STOP</p><p>4 = STOP-LIMIT</p>                                                                                                                                                                                                                      |
| FK\_OrderStatusID      | int             |                  | No              | <p>1 = NEW</p><p>2 = PARTIALLY\_FILLED</p><p>3 = FILLED</p><p>4 = CANCEL</p><p>5 = CANCEL\_ACK</p><p>6 = REPLACED</p><p>7 = PENDING\_CANCEL</p><p>8 = REJECTED</p><p>9 = PENDING\_NEW</p><p>10 = EXPIRED</p><p>11 = PENDING\_REPLACE</p><p>12 = UNDEFINED</p><p>13 = ORDER\_NOT\_FOUND</p> |
| FK\_Side               | int             |                  | No              | <p>1 = BUY      </p><p>2 = SELL     </p>                                                                                                                                                                                                                                                   |
| OrderDateTimeRequested | datetime        | (getutcdate())   | Yes             | Time when the order is placed. In UTC format.                                                                                                                                                                                                                                              |
| Contract               | varchar         |                  | No              | Symbols                                                                                                                                                                                                                                                                                    |
| Product                | varchar         |                  | No              | Symbols                                                                                                                                                                                                                                                                                    |
| LastUpdateTime         | datetime        | (getutcdate())   | Yes             | The time when the last update took place.                                                                                                                                                                                                                                                  |
| FilledQty              | int             |                  | Yes             | Filled position size                                                                                                                                                                                                                                                                       |
| AvgFillPRice           | decimal         |                  | Yes             | Open price                                                                                                                                                                                                                                                                                 |
| CancelQty              | int             |                  | Yes             | At the event of a partial close, the remaining position size that will be opened as a new trade is the cancel quantity.                                                                                                                                                                    |
| ProfitValue            | decimal         |                  | Yes             | Profit value                                                                                                                                                                                                                                                                               |
| Reason                 | varchar         |                  | Yes             | In case of trade rejection, error codes are listed here.                                                                                                                                                                                                                                   |
| CloseQty               | int             |                  | Yes             | At the event of a partial close, the position size closed partially is the closed quantity.                                                                                                                                                                                                |
| PositionEffect         | char            |                  | Yes             | <p>O = Open</p><p>C = Closed</p>                                                                                                                                                                                                                                                           |
| LinkedOrderID          | varchar         | ('')             | Yes             | It is the PK order ID of the coverage in current orders table.                                                                                                                                                                                                                             |
| SL                     | decimal         |                  | Yes             |                                                                                                                                                                                                                                                                                            |
| TP                     | decimal         |                  | Yes             |                                                                                                                                                                                                                                                                                            |
| ClosePrice             | decimal         |                  | Yes             | Close price                                                                                                                                                                                                                                                                                |
| ClosePriceRequested    | decimal         |                  | Yes             | Requested close price                                                                                                                                                                                                                                                                      |
| ContractSize           | decimal         |                  | Yes             | Position size                                                                                                                                                                                                                                                                              |
| Digit                  | int             |                  | Yes             | digit                                                                                                                                                                                                                                                                                      |
| OpenOrigIDFix          | varchar         |                  | Yes             | External FIX ID generated when trade opens.                                                                                                                                                                                                                                                |
| CloseOrigIDFix         | varchar         |                  | Yes             | FIX ID generated when trade is closed.                                                                                                                                                                                                                                                     |


---

# 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://tradesocio-2.gitbook.io/database/-M0zsOmLRwjq8DxZcb4l/database-design/primary-tables/coverage-orders.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.
