2.7.1Order types

The orderType of an FXB.Order can be any of the following members of the FXB.OrderTypes enumeration.

FXB.OrderTypes.

Trades and pending orders

BUY

Open or closed buy trade

SELL

Open or closed sell trade

BUY_LIMIT

Pending or cancelled buy-limit order

SELL_LIMIT

Pending or cancelled sell-limit order

BUY_STOP

Pending or cancelled buy-stop order

SELL_STOP

Pending or cancelled sell-stop order

BUY_STOP_LIMIT

Pending or cancelled buy-stop-limit order (see below)

SELL_STOP_LIMIT

Pending or cancelled sell-stop-limit order (see below)

FXB.OrderTypes.

Credit movements

DEPOSIT

Account deposit

WITHDRAWAL

Account withdrawal

TRANSFER

Internal credit transfer between accounts

COMMISSION

Commission debit or credit

DIVIDEND

Dividend

FINANCING

Financing - rollover/interest/swap

CREDIT

Account credit (typically a temporary incentive by the broker)

INTEREST

Interest payment or charge

TAX

Tax charge

BONUS

Bonus

OTHERCHARGE

Any credit movement not allocated to another category above

These values are numeric. You can reliably test for credit-movement types by looking at orderType >= FXB.OrderTypes.DEPOSIT - though it is more elegant to use the helper FXB.OrderTypes.IsCredit(orderType).

Granularity/accuracy of the subdivision between different types of credit movements depends on the broker platform. Some platforms will report everything as either only a deposit or withdrawal - i.e. a positive or negative movement, with no further detail.

Some platforms report commission and swap against individual orders, using the commission and swap properties, whereas others record these charges as credit movements against the account.

The FXB.OrderTypes enumeration is also used in relation to submitting trading requests, and has additional valid members in that context.

Stop-limit orders are not widely available. The account features indicate whether the account offers them.