FinBlocks Tech
Market model

Sessions are configuration, not code.

A market model in Mehrex is a set of session types, a schedule that moves between them, and the rules each session applies to incoming orders. All of it is configured at market level with per-instrument overrides, so an IPO, a low-liquidity line and a mature blue chip can each follow their own day without a software change.

Session types
7
Order types
4
Validity options
5
Transition triggers
3

The trading day · select a session

Seven sessions, each with its own rules of engagement.

Most markets run an opening auction, continuous trading, a closing auction and a trade-at-last session. What each session admits — whether orders can be placed, whether anything executes, and which price is calculated — is what distinguishes them.

SessionRegular trading
Order placementPermitted
ExecutionContinuous
Calculated priceLTP, VWAP

Price–time priority. Price monitoring suspends automatic execution rather than print outside the configured tolerance.

Figure 1The trading day. Segment widths are proportional to duration except continuous trading, which is compressed — at true scale it is about 85% of the day and every auction would be a hairline. Sessions that execute carry a vermilion cap.
Session configuration. Order placement, execution, and the price each session calculates.
SessionTimeOrder placementExecutionCalculated price
Pre-Open08:30PermittedNoneIEP
Opening auction09:00HaltedUncrossingLTP, VWAP
Regular trading09:00–16:20PermittedContinuousLTP, VWAP
Pre-Close16:20PermittedNoneIEP
Closing auction16:30HaltedUncrossingClosing price
LPX16:30–16:40PermittedFixed priceLTP
Post-Trade16:40Locked outNone

Automated session timetables

Three ways a session transition can fire.

01

Exact time

The transition fires at a configured time. The plain case, and the right one for the open and close of most markets.

02

Randomized window

The transition fires at an undisclosed moment inside a published window — for example 09:30 plus up to 120 seconds. An established anti-gaming measure for auction uncrossings: nobody can time the last order into the book.

03

Chained

The transition fires when the preceding session completes, whenever that happens to be.


Order management

An order is its type and its validity.

Order types.
TypeBehaviour
MarketAn unpriced order that executes against the best available prices. Market orders have priority over all priced orders.
LimitAn anonymous priced order, fully displayed in the order book, that may execute at prices equal to or better than its limit price.
AuctionA priced order with price priority over all other priced orders during an auction. Any unexecuted remainder is deleted automatically when the auction completes.
IcebergPublicly displays only a portion — the peak — of its total volume. Hidden size never leaks into public market data, but participates fully in auction price discovery.
Validity, or time-in-force.
CodeBehaviour
DAYDay. Expires at the end of the day on which it was entered. Assumed when no validity is stated.
GTDGood Till Date. Expires at the end of trading on the specified day. Maximum expiry is the date of entry plus 89 calendar days.
GTCGood Till Cancelled. Rests across days until filled or cancelled.
IOCImmediate or Cancel. Executes on entry; any unexecuted volume expires immediately.
FOKFill or Kill. Executes in full on entry, or is immediately expired in full.

Combining type and validity

Not every combination makes sense in every session.

What each session admits. GTC follows the same rules as GTD for admission purposes.
SessionOrder typeDAYIOCFOKGTD
Auction callsMarketAllowedRejectedRejectedAllowed
LimitAllowedRejectedRejectedAllowed
IcebergAllowedRejectedRejectedAllowed
AuctionAllowedRejectedRejectedRejected
Regular tradingMarket / Limit / Iceberg / AuctionAllowedAllowedAllowedAllowed
LPX tradingMarket / Limit / IcebergAllowedAllowedAllowedAllowed
AuctionRejectedRejectedRejectedRejected

Additional rules

  • A GTD order with an expiry date beyond entry plus 89 calendar days is rejected. If the specified day is a non-business day, the order expires before the start of the next business day.
  • During auction call sessions, orders with IOC or FOK validity are rejected — there is nothing to execute against yet.
  • During auction call sessions, Auction orders are treated as Limit orders.

Auction price discovery

The equilibrium price is the one that trades the most volume.

During an auction call the engine examines every price at which bids and offers overlap, accumulates demand downward from the highest price and supply upward from the lowest, and selects the price at which the greatest volume can be matched. Ties break on minimum surplus, then proximity to the reference price. Iceberg orders contribute their entire volume, not just the displayed peak.

Auction price discovery and the Indicative Equilibrium PriceA chart of cumulative demand and cumulative supply against limit price across eight ticks from 148.10 to 148.45. Cumulative demand falls from 14,400 to 400 as the price rises; cumulative supply rises from 500 to 11,700. Bars behind the curves show the executable volume at each price, which is the lesser of the two. The tallest bar, and therefore the Indicative Equilibrium Price, is 6,300 units at 148.25, leaving a surplus of 900 on the demand side.03,0006,0009,00012,00015,000IEP 148.256,300 executable900 surplus on the demand side148.10148.15148.20148.25148.30148.35148.40148.45Cumulative quantityLimit price · tick 0.05Cumulative demandCumulative supply
Cumulative demandCumulative supplyExecutable volume at that price
Figure 2Indicative Equilibrium Price. The bars are executable volume at each price — the lesser of cumulative demand and cumulative supply. The winning price is the tallest bar, not an assertion. This IEP is disseminated continuously through the call, and every crossable order executes at the final value.
Auction call book. Executable volume is the lesser of cumulative demand and cumulative supply; the engine selects the price that maximises it.
PriceBid qtyAsk qtyCumulative demandCumulative supplyExecutable
148.4540070040011,700400
148.409001,0001,30011,0001,300
148.351,2001,5002,50010,0002,500
148.302,1002,2004,6008,5004,600
148.25 IEP2,6002,8007,2006,3006,300
148.203,0001,90010,2003,5003,500
148.152,4001,10012,6001,6001,600
148.101,80050014,400500500

Prices and references

What a valid price is, and what it is measured against.

Tick size

The minimum valid increment in which prices can be entered and displayed, expressed as a multiple of the instrument’s listing currency, and able to vary by price band. An order whose price is not a multiple of the applicable tick is rejected on entry, before it can affect the market. Tick tables are configured per instrument from the Control Panel.

Dynamic reference price

The volume-weighted price of the last order-book execution, or the previous closing price if that is more recent, taken before the incoming order is submitted.

Static reference price

The most recent closing price from the previous business day. The operator can also set reference prices manually — for a newly listed instrument, or after a corporate action.

Trade types, stamped on every execution.
CodeMeaning
ATTrade in a regular (continuous) trading session.
UTTrade at the end of an auction (uncrossing).
PTTrade in a fixed-price session, such as trade-at-last after the closing auction.

Order entry

The fields on an order.

Order entry fields. Trading party is derived from the authenticated session and cannot be set by the member.
FieldRequiredDescriptionValues
InstrumentYesUnique identifier of the security: symbol or ISIN.
SideYesWhether the order is to buy or sell.Buy, Sell
Order TypeYesThe type of the order, in conjunction with display type.Market, Limit, Auction, Iceberg
Time in ForceNoThe duration the order is valid for; defaults to DAY.DAY, IOC, FOK, GTD, GTC
Clearing AccountYesIdentifies the clearing account for the order.Client, House
Order QuantityYesThe quantity to be bought or sold; a whole number greater than zero.
Disclosed QuantityNoMaximum quantity that may be displayed. For Iceberg orders, greater than zero and less than the order quantity.
PriceConditionalThe limit price; must be greater than zero and a multiple of the instrument’s tick. Required for Limit and Auction orders.
Expiry DateIf TIF = GTDThe date on which a GTD order expires.
Trading PartyYesThe trading member entering the order, derived from the authenticated session — it can never be forged.
Client ReferenceYesThe member’s own reference for the order, echoed on every report.
Next step

Tell us about your market. We will show you the engine matching.

A live demonstration runs about an hour: the order book, the Control Panel, an auction uncrossing, and a replay of the journal that produced it.