Skip to content

Appendix J2: Market Scan Criteria

Each Criteria node is an array, where the first value is a string identifying the type of criteria, and subsequent values define the parameters.

There are three classifications: Logical, Matching, and Comparison.

Logical Criteria allow multiple filters to be combined to perform more complicated logic.

The And Criteria returns a valid match if all sub-criteria match.

["And",...]

The Or Criteria returns a valid match if one or more sub-criteria match.

["Or",...]

The Not Criteria returns a valid match if the sub-criteria does NOT match. Only one criteria can be specified.

["Not",[...]]

The Xor Criteria returns a valid match if only one sub-criteria matches. Exactly two criteria must be specified.

["Xor",[...],[...]]

Matching Criteria filter against specific fields on a Symbol or Asset. Some criteria are only valid for Asset-based scans, and are unavailable when scanning Symbols.

This table describes the simple matching criteria. Definitions for each type follow.

TypeStyleTypeAvailableDescription
AltCodeNamed TextTextSymbolChecks a named (market-specific) code.
AndLogicalN/AN/AChecks that all sub-criteria match.
AttributeNamed TextTextSymbolChecks a named (market-specific) attribute.
AuctionRangeNumericAssetChecks the Auction Price.
AuctionLastRangeNumericAssetChecks the Auction, Last, or Previous Closing Price.
AuctionQuantityRangeNumericAssetChecks the Auction Quantity.
BestAskCountRangeNumericAssetChecks the Best Ask Count.
BestAskPriceRangeNumericAssetChecks the Best Ask Price.
BestAskQuantityRangeNumericAssetChecks the Best Ask Quantity.
BestBidCountRangeNumericAssetChecks the Best Bid Count.
BestBidPriceRangeNumericAssetChecks the Best Bid Price.
BestBidQuantityRangeNumericAssetChecks the Best Bid Quantity.
BoardMultipleTextAssetChecks the Board identifier matches one of the given values. Case insensitive.
CallOrPutSingle (exists)TextSymbolChecks the Call or Put value. One of: Call, Put.
CategoryMultipleTextSymbolChecks the Category Codes match one of the given values. Case sensitive.
CFISingleTextSymbolChecks the CFI code matches the given mask. Spaces act as a wildcard.
ClassSingleTextSymbolChecks the symbol class. One of: Market
ClosePriceRangeNumericAssetChecks the day’s closing price (settlement price).
CodeTextTextSymbolChecks the symbol code.
ContractSizeRangeNumericSymbolChecks the contract size for the symbol.
CurrencyMultipleTextAssetChecks the currency being traded in matches one of the given values.
DataSingleTextSymbolChecks for the availability of a type of data. Case sensitive.
DateNamed RangeDateSymbolChecks a named (market-specific) date.
ExerciseTypeSingle (exists)TextSymbolChecks the exercise type for a derivative.
ExchangeMultipleTextSymbolChecks the issuing exchange identifier matches one of the given values. Case insensitive.
ExpiryDateRangeDateSymbolChecks the expiry date for the symbol.
HighPriceRangeNumericAssetChecks the High price for the day.
IsIndexSingle (default)BooleanSymbolChecks if the symbol is an Index or not.
LegSingleTextSymbolChecks the existence of a leg of a particular symbol code.
LastPriceRangeNumericAssetChecks the Last or Previous Closing Price.
LotSizeRangeNumericSymbolChecks the lot size for the symbol.
LowPriceRangeNumericAssetChecks the Low price for the day.
MarketMultipleTextSymbolChecks the listing market identifier matches one of the given values. Case insensitive.
NameTextTextSymbolChecks the symbol name.
NotLogicalN/AN/AChecks that the sub-criteria does not match. Only one sub-criteria is allowed.
OpenInterestRangeNumericAssetChecks the open interest on the symbol.
OpenPriceRangeNumericAssetChecks the Opening price for the day.
OrLogicalN/AN/AChecks that at least one sub-criteria matches.
PriceNamed RangeNumericAssetChecks a named (market-specific) price.
PreviousCloseRangeNumericAssetChecks the previous closing price.
QuotationBasisMultipleTextAssetChecks the quotation basis matches one of the given values. Case sensitive.
RemainderRangeNumericAssetChecks the Auction Remainder
ShareIssueRangeNumericAssetChecks the total shares on issue.
StateMultipleTextAssetChecks the security trading status matches one of the given values.
StateAllowsSingleTextAssetChecks whether an action is allowed in the current trading state.
StatusNoteMultipleTextAssetChecks the status note matches one of the given values. Case sensitive.
StrikePriceRangeNumericAssetChecks the strike price for a derivative.
TradesRangeNumericAssetChecks the number of trades for the day.
TradingMarketMultipleTextSymbolChecks the Trading Market identifier matches one of the given values. Case insensitive.
ValueTradedRangeNumericAssetChecks the total value traded for the day.
VolumeRangeNumericAssetChecks the volume of shares traded for the day.
VWAPRangeNumericAssetChecks the Volume-Weighted Average Price for the day.
XorLogicalN/AN/AChecks two sub-criteria and ensures only one matches.

Matches based on the result of one (or more) sub-criteria.

// Matches when there's a Dividend date and the Expiry date is an exact value.
["And",["Date","Dividend"],["ExpiryDate","2024-01-01"]]
// Matches when the reference price is an exact value, or within a range.
["Or",["Price","Reference",3.0],["Price","Reference",{"Min":1.5,"Max":2.5}]]
// Matches when there is no Dividend date
["Not",["Date","Dividend"]]

Logical criteria can be nested.

// Matches when there's a Dividend date and reference price is either a specific value, or within a range
["And",["Date","Dividend"],["Or",["Price","Reference",3.0],["Price","Reference",{"Min":1.5,"Max":2.5}]]]
// Matches when there is no Dividend date, and when the Expiry date is different to the given value
["Not",["And",["Date","Dividend"],["ExpiryDate","2024-01-01"]]]

Matches against multiple values. Some criteria types expect an exact match, while others check for any overlap. Case sensitivity depends on the field.

First Form: Single value only.

For fields with a single value, expects an exact match. For fields with multiple values, expects the match to exist in the set.

// Checks if the Sharia category code is assigned
["Category","Sharia"]

Second Form: Multiple values.

For fields with a single value, expects an exact match with one of the values. For fields with multiple values, expects at least one match within the set.

// Checks if at least one of Sharia or Foreign category codes are assigned
["Category","Sharia","Foreign"]
// Matches symbols in the Malaysian Buy-In and Odd-Lot markets
["Market","MYX:BI","MYX:OD"]

Matches the named value against a range.

First Form: Name only.

Checks whether the named value is set or not.

// Checks whether there is a Dividend date
["Date","Dividend"]
// Checks whether there is a Reference Price
["Price","Reference"]

Second Form: Name and Value.

Checks whether the named value exactly matches the given value.

// Checks whether the Dividend date matches.
["Date","Dividend","2024-01-01"]
// Checks whether the Reference Price matches.
["Price","Reference",2.0]

Third Form: Name and Range.

Checks whether the named value is between the given values (inclusive). Values may be null.

// Dividend date between two values
["Date","Dividend","2023-01-01","2023-12-31"]
// Reference price less than or equal to the maximum
["Price","Reference",null,2.5]
// Start date greater than or equal to the minimum
["Date","Start","2023-01-01",null]

Fourth Form: Name and Named Parameters.

Behaves like either the Second or Third form depending on the supplied values.

// Dividend date exactly matches
["Date","Dividend",{"At":"2023-01-01"}]
// Reference price between two values
["Price","Reference",{"Min":1.5,"Max":2.5}]
// Dividend date less than or equal to the maximum
["Date","Dividend",{"Max":"2023-12-31"}]
// Dividend date greater than or equal to the minimum
["Date","Dividend",{"Min":"2023-01-01"}]

Matches the named string against a text value.

First Form: Name only.

Checks whether the named string is set or not.

// Whether an ISIN alternative code is set
["AltCode","ISIN"]
// Whether the Short attribute is set
["Attribute","Short"]

Second Form: Name and value.

Checks whether the named string contains the given value.

// Whether 'I' is within the Short attribute.
["Attribute","Short","I"]

Third Form: Name and value with parameters.

Alters the comparision in the Second form. Allows matching from the start or end, exact matching, and whether to be case sensitive or not.

CriteriaType, Name, Text[, As][, IgnoreCase]

NameTypeDescription
AsStringThe position the match must occur in. If omitted, defaults to None. One of the following:
None: Text can exist anywhere in the value.
FromStart: Text must match from the start.
FromEnd: Text must match from the end.
Exact: Text must match exactly.
IgnoreCaseBooleanWhether to ignore casing. If omitted, defaults to false.
// Whether the Underlying alternative code starts with 'BHP'
["AltCode","Underlying","BHP","FromStart"]
// Whether 'i' is within the Short attribute, ignoring case.
["Attribute","Short","i",true]
// Whether the Underlying alternative code starts with 'bhp', ignoring case.
["AltCode","Underlying","bhp","FromStart",true]

Fourth Form: Name and value with named parameters.

Alters the comparision in the Second form using named parameters. Allows to match from the start, end, or exact, and whether to be case sensitive or not.

Parameters are the same as in the Third form.

// Matches whenever the Underlying code exactly matches the string 'BHP'.
["AltCode","Underlying","BHP",{"As":"Exact"}]
// Matches whenever the Underlying code starts with 'bhp', ignoring case.
["AltCode","Underlying","bhp",{"As":"FromStart","IgnoreCase":true}]

Matches the target value against a range.

First Form: No Parameters.

Checks whether the target value is set or not.

// Checks if a symbol has an expiry date
["ExpiryDate"]
// Checks if the symbol has traded today
["LastPrice"]
// If there are no parameters, you can also just specify the criteria type directly inside another criteria
["And","ExpiryDate","LastPrice"]

Second Form: Single Value.

Checks whether the target value exactly matches the given value.

// Checks if the expiry date matches
["ExpiryDate","2024-01-01"]
// Checks if the lot size matches
["LotSize",100]

Third Form: Range.

Checks whether the target value is between the given values (inclusive). Values may be null.

// Expiry date between two values
["ExpiryDate","2023-01-01","2023-12-31"]
// Previous Close less than or equal to the maximum
["PreviousClose",null,2.0]
// Strike Price greater than or equal to the minimum
["StrikePrice",10.5,null]

Fourth Form: Named Parameters.

Behaves like either the Second or Third form depending on the supplied values.

// Expiry date exactly matches
["ExpiryDate",{"At":"2023-01-01"}]
// Previous Close between two values
["PreviousClose",{"Min":8,"Max":10}]
// Strike Price less than or equal to the maximum
["StrikePrice",{"Max":10}]
// Strike Price greater than or equal to the minimum
["StrikePrice",{"Min":8}]

Matches against a specific value. Some criteria types expect an exact match, while others check for the given value within a set.

First Form: Value only.

This form is supported by all criteria types using this style.

// Checks if the symbol is not an index
["IsIndex",false]

Second Form: Default value.

This short form is supported by some criteria types, where a default value makes sense.

// Checks if the symbol is an index
["IsIndex"]
// If there are no parameters, you can also just specify the criteria type directly inside another criteria
["And","IsIndex","LastPrice"]

Third Form: Value exists.

This form is supported by some criteria types, where the value can be unset.

// Checks if the symbol has a CallOrPut value.
["CallOrPut"]

Matches the string against a text value.

First Form: Value only.

Checks whether the string contains the given value.

// Whether 'LIMITED' is within the Name.
["Name","LIMITED"]

Second Form: Value with parameters.

Alters the comparision in the First form. Allows matching from the start or end, exact matching, and whether to be case sensitive or not.

CriteriaType, Text[, As][, IgnoreCase]

NameTypeDescription
AsStringThe position the match must occur in. If omitted, defaults to None. One of the following:
None: Text can exist anywhere in the value.
FromStart: Text must match from the start.
FromEnd: Text must match from the end.
Exact: Text must match exactly.
IgnoreCaseBooleanWhether to ignore casing. If omitted, defaults to false.
// Whether the Code starts with 'BHP'
["Code","BHP","FromStart"]
// Whether 'ltd' is within the Name, ignoring case.
["Name","ltd",true]
// Whether the Name starts with 'Tel', ignoring case.
["Name","Tel","FromStart",true]

Third Form: Value with named parameters.

Alters the comparision in the First form using named parameters. Allows to match from the start, end, or exact, and whether to be case sensitive or not.

Parameters are the same as in the Second form.

// Matches whenever the Name exactly matches the string 'BHP'.
["Name","BHP",{"As":"Exact"}]
// Matches whenever the Name starts with 'bhp', ignoring case.
["Name","bhp",{"As":"FromStart","IgnoreCase":true}]

Comparison Criteria allow more flexibility in comparisons, such as comparing two numeric fields, and performing calculations. These criteria only operate on Asset-based scans.

This table describes the advanced comparison criteria.

TypeStyleDescription
AllEmptyMatches all symbols.
=BinaryMatches when two values are equal.
>BinaryMatches when the first value is greater than the second.
>=BinaryMatches when the first value is greater than or equal to the second.
<BinaryMatches when the first value is less than the second.
<=BinaryMatches when the first value is less than or equal to the second.
NoneEmptyMatches no symbols.
!=BinaryMatches when two values are not equal.

This table lists the symbol fields that can be compared.

TypeDescription
AuctionChecks the Auction Price.
AuctionLastChecks the Auction, Last, or Previous Closing Price.
AuctionQuantityChecks the Auction Quantity.
BestAskCountChecks the Best Ask Count.
BestAskPriceChecks the Best Ask Price.
BestAskQuantityChecks the Best Ask Quantity.
BestBidCountChecks the Best Bid Count.
BestBidPriceChecks the Best Bid Price.
BestBidQuantityChecks the Best Bid Quantity.
ClosePriceChecks the day’s closing price (settlement price).
ContractSizeChecks the contract size for the symbol.
ExtendedChecks a named (market-specific) extended price.
HighPriceChecks the High price for the day.
LastPriceChecks the Last or Previous Closing Price.
LotSizeChecks the lot size for the symbol.
LowPriceChecks the Low price for the day.
OpenInterestChecks the open interest on the symbol.
OpenPriceChecks the Opening price for the day.
PreviousCloseChecks the previous closing price.
RemainderChecks the Auction Remainder
ShareIssueChecks the total shares on issue.
StrikePriceChecks the strike price for a derivative.
TradesChecks the number of trades for the day.
ValueTradedChecks the total value traded for the day.
VolumeChecks the volume of shares traded for the day.
VWAPChecks the Volume-Weighted Average Price for the day.

This table lists the calculations that can be used with comparison values.

TypeStyleDescription
AbsUnaryCalculates the absolute of a value.
+, AddBinaryAdds two values.
/, DivBinaryDivides two values.
IfVariableSelects a value based on a comparison
%, ModBinaryCalculates the modulus (division remainder) of two values.
* MulBinaryMultiplies two values.
-, SubBinarySubtracts two values.
-, NegUnaryNegates a single value.
+, PosUnaryMakes a single value positive.

Matches by comparing two values. Each value can be a number, the name of an symbol field, or a calculation.

/* Check whether the Last Price equals 10 */
["=","LastPrice",10.0]
/* Check whether the Last Price is less than the Auction Price */
["<","LastPrice","Auction"]
/* Check whether the Last Price is twice the Previous Closing Price or more */
[">","LastPrice",["*","PreviousClose",2]]

Matches without any parameters.

/* Match all symbols */
["All"]
/* Match no symbols */
["None"]

Performs a calculation with two values. Each value can be a number, the name of an symbol field, or a calculation.

/* Adds 10 to the last price */
["+","LastPrice",10.0]
/* Adds 10 to the last price */
["Add","LastPrice",10.0]
/* Multiplies the previous close by 1.5 */
["*","PreviousClose",1.5]
/* Multiplies the previous close by 1.5 */
["Mul",1.5,"PreviousClose"]

Calculates based on a single value. This value can be a number, the name of a symbol field, or another calculation.

/* Negates the auction remainder */
["-","Remainder"]
/* Returns the absolute value of the auction remainder */
["Abs","Remainder"]

Selects a value to return based on one or more comparisons.

Parameters should be supplied as a search Criteria, followed by a Result that can be a number, the name of a symbol field, or a calculation.

Any number of Criteria and Result pairs can be provided, ending with a final Result that is returned when no Criteria match.

Criteria are evaluated in the order they are supplied.

/* No criteria pair. Always returns -1 */
["If",-1.0]
/* One criteria pair. If the Market is ASX, returns 1, otherwise returns -1 */
["If",["Market","ASX"],1.0, -1.0]
/* Two criteria pairs. If the Market is ASX, returns 1, if the Market is CXA returns 2, otherwise returns -1 */
["If",["Market","ASX"],1.0,["Market","CXA"],2.0, -1]
/* If the Market is ASX, returns the Last Price + 10, otherwise returns the last Price - 10 */
["If",["Market","ASX"],["+","LastPrice",10.0],["-","LastPrice",10.0]]
/* If the Market is MYX, returns the Extended Reference Price, otherwise returns the Previous Close */
["If",["Market","MYX"],["Extended","Reference"],"PreviousClose"]