Current Orders

The Current Orders table explains the order details of both master and coverage accounts. The fields for the CurrentOrders table are:

Table Name: CurrentOrders

Column Name

Data Type

Valid Values

Allow Nulls

Description

PK_OrderID

bigint identity

No

Order ID

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

1 = MARKET

2 = LIMIT

3 = STOP

4 = STOP-LIMIT

FK_OrderStatusID

int

No

1 = NEW

2 = PARTIALLY_FILLED

3 = FILLED

4 = CANCEL

5 = CANCEL_ACK

6 = REPLACED

7 = PENDING_CANCEL

8 = REJECTED

9 = PENDING_NEW

10 = EXPIRED

11 = PENDING_REPLACE

12 = UNDEFINED

13 = ORDER_NOT_FOUND

FK_Side

int

No

1 = BUY

2 = SELL

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

O = Open

C = Closed

LinkedOrderID

varchar

('')

Yes

It is the PK order ID of Coverage and Slave order tables.

SL

decimal

Yes

Stop loss

TP

decimal

Yes

Take profit

ClosePrice

decimal

Yes

Close price

Commission

decimal

Yes

Commission

CommissionAgent

decimal

Yes

Commission agent

Swap

decimal

Yes

Swap

Taxes

decimal

Yes

Taxes

Comment

varchar

Yes

Comment

Synced

bit

((0))

Yes

UsedMargin

decimal

((0))

No

Margin amount used in opening a trade.

ContractSize

decimal

((0))

No

Position size

Digit

int

((0))

No

digit

ReturnPerc

decimal

((0))

No

Return value displayed in percentage.

VAMI

decimal

((0))

No

This field lists the VAMI, i.e., a measure to track the monthly performance of an investment.

Equity

decimal

((0))

No

This field lists the equity, i.e., the amount of funds in an account that includes all open trades.

EquityUSD

decimal

((0))

No

Profit_Mode

int

((0))

No

Profit mode

ContractSizeUSD

decimal

((0))

No

Last updated

Was this helpful?