|
dxFeed Graal Native SDK 3.11.0
|
The checker of the consistency of a list of orders. More...
Functions | |
| int32_t | dxfg_PriceLevelChecker_validate (graal_isolatethread_t *thread, dxfg_event_type_list *orders, int64_t timeGapBound, int32_t printQuotes, DXFG_OUT int32_t *isValid) |
| Checks the consistency of a list of orders. | |
The checker of the consistency of a list of orders.
| int32_t dxfg_PriceLevelChecker_validate | ( | graal_isolatethread_t * | thread, |
| dxfg_event_type_list * | orders, | ||
| int64_t | timeGapBound, | ||
| int32_t | printQuotes, | ||
| DXFG_OUT int32_t * | isValid ) |
Checks the consistency of a list of orders.
PriceLevelChecker is a utility to check that in each moment of time the bid price of the orders is lower than the ask price. The check goes through the orders in the order of the list, so pass a list that is sorted by time, as dxfg_PriceLevelService_getOrders() returns it. Besides the result, the check reports to the Java log (not to the caller) the additional information:
The orders are not valid if the check finds a crossing of the bid and ask prices, or if the greatest gap between two subsequent orders is greater than timeGapBound. A list without orders is valid. Note that in some cases it is normal when the bid is greater than or equal to the ask.
Java: PriceLevelChecker.validate(List, long, boolean).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | orders | The list of the orders (events that are orders, for example the list that dxfg_PriceLevelService_getOrders() returned); the call fails for another kind of event. The caller keeps its ownership. |
| [in] | timeGapBound | The greatest allowed gap between the times of two subsequent orders, in milliseconds (the unit of the time of an order). |
| [in] | printQuotes | Non-zero to log the quotes during the check, 0 not to. |
| [out] | isValid | Set to 1 if the orders are valid, 0 otherwise. |