|
dxFeed Graal Native SDK 3.12.0
|
The v4 functions and type names of the group Schedule. Every function returns DXFG_EXECUTE_SUCCESSFULLY or DXFG_EXECUTE_FAIL and writes its result to a DXFG_OUT parameter, see The v4 functions. More...
Typedefs | |
| typedef dxfg_schedule_t | dxfg_v4_schedule_t |
| A handle of a Java Schedule object; release it with dxfg_JavaObjectHandler_release(). | |
| typedef dxfg_session_type_t | dxfg_v4_session_type_t |
| typedef dxfg_session_t | dxfg_v4_session_t |
| A handle of a Java Session object; release it with dxfg_Session_release(). | |
| typedef dxfg_session_list | dxfg_v4_session_list |
| typedef dxfg_day_t | dxfg_v4_day_t |
| A handle of a Java Day object; release it with dxfg_Day_release(). | |
| typedef dxfg_session_filter_function | dxfg_v4_session_filter_function |
| typedef dxfg_session_filter_t | dxfg_v4_session_filter_t |
| A handle of a Java SessionFilter object; release it with dxfg_JavaObjectHandler_release(). | |
| typedef dxfg_session_filter_prepare_t | dxfg_v4_session_filter_prepare_t |
| typedef dxfg_day_filter_function | dxfg_v4_day_filter_function |
| typedef dxfg_day_filter_t | dxfg_v4_day_filter_t |
| A handle of a Java DayFilter object; release it with dxfg_JavaObjectHandler_release(). | |
| typedef dxfg_day_filter_prepare_t | dxfg_v4_day_filter_prepare_t |
The v4 functions and type names of the group Schedule. Every function returns DXFG_EXECUTE_SUCCESSFULLY or DXFG_EXECUTE_FAIL and writes its result to a DXFG_OUT parameter, see The v4 functions.
A custom day filter function: tests whether a day is an acceptable result of a search.
The function is called by the search function that uses the filter (for example dxfg_Day_findNextDay()), on the thread that called that search function, possibly several times during the call.
The day handle is created for this call and the SDK does not release it afterwards: release it with dxfg_Day_release() unless it is needed later.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day to test. |
The predefined day filters, see dxfg_DayFilter_getInstance().
The days of the week are numbered from 1 (Monday) to 7 (Sunday).
A handle of a Java DayFilter object; release it with dxfg_JavaObjectHandler_release().
A filter for days used by the search functions.
| typedef dxfg_day_t dxfg_v4_day_t |
A handle of a Java Day object; release it with dxfg_Day_release().
A day is a continuous period of time about 24 hours long, aligned to the business hours of the schedule, so days start and end at various local times. Days do not overlap: they form a chain of adjacent periods, and the point on the border belongs to the day that starts there. A day consists of sessions and is a trading day if at least one of them is a trading session.
| typedef dxfg_schedule_t dxfg_v4_schedule_t |
A handle of a Java Schedule object; release it with dxfg_JavaObjectHandler_release().
A schedule describes the trading schedule of some class of instruments, for example NYSE stocks or CME corn futures. It splits the whole time scale into consecutive days.
A custom session filter function: tests whether a session is an acceptable result of a search.
The function is called by the search function that uses the filter (for example dxfg_Day_findFirstSession()), on the thread that called that search function, possibly several times during the call.
The session handle is created for this call and the SDK does not release it afterwards: release it with dxfg_Session_release() unless it is needed later.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | session | The session to test. |
The predefined session filters, see dxfg_SessionFilter_getInstance().
A handle of a Java SessionFilter object; release it with dxfg_JavaObjectHandler_release().
A filter for sessions used by the search functions.
A list of session handles, returned by dxfg_v4_Day_getSessions().
Release the list together with its sessions with dxfg_v4_session_list_release(). To keep the sessions, release the list itself with dxfg_v4_session_list_wrapper_release() and then each session with dxfg_v4_Session_release().
| typedef dxfg_session_t dxfg_v4_session_t |
A handle of a Java Session object; release it with dxfg_Session_release().
A session is a continuous period of time with the same rules for trading activity. It is either trading or non-trading and lies inside one day. Sessions do not overlap: they form a chain of adjacent periods, and the point on the border belongs to the session that starts there. A session may have zero duration (an empty session).
The type of a trading session: what kind of trading activity is allowed in it, if any.
| int32_t dxfg_v4_Day_containsTime | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_day_t * | day, | ||
| int64_t | time, | ||
| DXFG_OUT int32_t * | contains ) |
Checks whether a time belongs to a day.
Java: Day.containsTime(long).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day. |
| [in] | time | The time to check, in UTC milliseconds. |
| [out] | contains | The pointer to the variable that receives 1 if the time belongs to the day, 0 if not; must not be NULL. |
| int32_t dxfg_v4_Day_equals | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_day_t * | day, | ||
| dxfg_v4_day_t * | otherDay, | ||
| DXFG_OUT int32_t * | equal ) |
Checks whether two days are equal.
Days are equal if they belong to equal schedules and have the same day identifier.
Java: Day.equals(Object).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day. |
| [in] | otherDay | The day to compare with. |
| [out] | equal | The pointer to the variable that receives 1 if the days are equal, 0 if not; must not be NULL. |
| int32_t dxfg_v4_Day_findFirstSession | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_day_t * | day, | ||
| dxfg_v4_session_filter_t * | filter, | ||
| DXFG_OUT dxfg_v4_session_t ** | session ) |
Returns the first session of a day that is accepted by a filter, or NULL if there is none.
The search does not cross the day boundary. NULL is written and the function succeeds if no such session is found within the day.
Java: Day.findFirstSession(SessionFilter).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day. |
| [in] | filter | The filter that tests the sessions. |
| [out] | session | The pointer to the variable that receives the session (release it with dxfg_v4_Session_release()), or NULL if no session is found; must not be NULL. |
| int32_t dxfg_v4_Day_findLastSession | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_day_t * | day, | ||
| dxfg_v4_session_filter_t * | filter, | ||
| DXFG_OUT dxfg_v4_session_t ** | session ) |
Returns the last session of a day that is accepted by a filter, or NULL if there is none.
The search does not cross the day boundary. NULL is written and the function succeeds if no such session is found within the day.
Java: Day.findLastSession(SessionFilter).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day. |
| [in] | filter | The filter that tests the sessions. |
| [out] | session | The pointer to the variable that receives the session (release it with dxfg_v4_Session_release()), or NULL if no session is found; must not be NULL. |
| int32_t dxfg_v4_Day_findNextDay | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_day_t * | day, | ||
| dxfg_v4_day_filter_t * | filter, | ||
| DXFG_OUT dxfg_v4_day_t ** | nextDay ) |
Returns the following day accepted by a filter, or NULL if there is none.
The search looks up to a year ahead. NULL is written and the function succeeds if no such day is found.
Java: Day.findNextDay(DayFilter).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day to start from. |
| [in] | filter | The filter that tests the days. |
| [out] | nextDay | The pointer to the variable that receives the nearest following day accepted by the filter (release it with dxfg_v4_Day_release()), or NULL if no day is found; must not be NULL. |
| int32_t dxfg_v4_Day_findPrevDay | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_day_t * | day, | ||
| dxfg_v4_day_filter_t * | filter, | ||
| DXFG_OUT dxfg_v4_day_t ** | prevDay ) |
Returns the previous day accepted by a filter, or NULL if there is none.
The search looks up to a year back in time. NULL is written and the function succeeds if no such day is found.
Java: Day.findPrevDay(DayFilter).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day to start from. |
| [in] | filter | The filter that tests the days. |
| [out] | prevDay | The pointer to the variable that receives the nearest previous day accepted by the filter (release it with dxfg_v4_Day_release()), or NULL if no day is found; must not be NULL. |
| int32_t dxfg_v4_Day_getDayId | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_day_t * | day, | ||
| DXFG_OUT int32_t * | dayId ) |
Returns the identifier of a day: the number of the day since 1970-01-01, which has the identifier 0. The previous days have negative identifiers.
Java: Day.getDayId().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day. |
| [out] | dayId | The pointer to the variable that receives the day identifier. -1 is also a valid identifier (1969-12-31); must not be NULL. |
| int32_t dxfg_v4_Day_getDayOfMonth | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_day_t * | day, | ||
| DXFG_OUT int32_t * | dayOfMonth ) |
Returns the ordinal number of a day in its month, starting with 1 for the first day of the month.
Java: Day.getDayOfMonth().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day. |
| [out] | dayOfMonth | The pointer to the variable that receives the day of the month; must not be NULL. |
| int32_t dxfg_v4_Day_getDayOfWeek | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_day_t * | day, | ||
| DXFG_OUT int32_t * | dayOfWeek ) |
Returns the ordinal number of a day in its week, from 1 (Monday) to 7 (Sunday).
Java: Day.getDayOfWeek().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day. |
| [out] | dayOfWeek | The pointer to the variable that receives the day of the week; must not be NULL. |
| int32_t dxfg_v4_Day_getEndTime | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_day_t * | day, | ||
| DXFG_OUT int64_t * | endTime ) |
Returns the end time of a day (exclusive).
Java: Day.getEndTime().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day. |
| [out] | endTime | The pointer to the variable that receives the end time in UTC milliseconds. -1 is also a valid time (1969-12-31T23:59:59.999Z); must not be NULL. |
| int32_t dxfg_v4_Day_getFirstSession | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_day_t * | day, | ||
| dxfg_v4_session_filter_t * | filter, | ||
| DXFG_OUT dxfg_v4_session_t ** | session ) |
Returns the first session of a day that is accepted by a filter.
The search does not cross the day boundary. The function fails if no such session is found within the day; it returns DXFG_EXECUTE_FAIL. To get NULL instead of a failure when no session is found, use dxfg_v4_Day_findFirstSession().
Java: Day.getFirstSession(SessionFilter).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day. |
| [in] | filter | The filter that tests the sessions. |
| [out] | session | The pointer to the variable that receives the session (release it with dxfg_v4_Session_release()); must not be NULL. |
| int32_t dxfg_v4_Day_getLastSession | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_day_t * | day, | ||
| dxfg_v4_session_filter_t * | filter, | ||
| DXFG_OUT dxfg_v4_session_t ** | session ) |
Returns the last session of a day that is accepted by a filter.
The search does not cross the day boundary. The function fails if no such session is found within the day; it returns DXFG_EXECUTE_FAIL. To get NULL instead of a failure when no session is found, use dxfg_v4_Day_findLastSession().
Java: Day.getLastSession(SessionFilter).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day. |
| [in] | filter | The filter that tests the sessions. |
| [out] | session | The pointer to the variable that receives the session (release it with dxfg_v4_Session_release()); must not be NULL. |
| int32_t dxfg_v4_Day_getMonthOfYear | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_day_t * | day, | ||
| DXFG_OUT int32_t * | monthOfYear ) |
Returns the calendar month number of a day, from 1 (January) to 12 (December).
Java: Day.getMonthOfYear().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day. |
| [out] | monthOfYear | The pointer to the variable that receives the month number; must not be NULL. |
| int32_t dxfg_v4_Day_getNextDay | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_day_t * | day, | ||
| dxfg_v4_day_filter_t * | filter, | ||
| DXFG_OUT dxfg_v4_day_t ** | nextDay ) |
Returns the following day accepted by a filter.
The search looks up to a year ahead. The function fails if no such day is found; it returns DXFG_EXECUTE_FAIL. To get NULL instead of a failure when no day is found, use dxfg_v4_Day_findNextDay().
Java: Day.getNextDay(DayFilter).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day to start from. |
| [in] | filter | The filter that tests the days. |
| [out] | nextDay | The pointer to the variable that receives the nearest following day accepted by the filter (release it with dxfg_v4_Day_release()); must not be NULL. |
| int32_t dxfg_v4_Day_getPrevDay | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_day_t * | day, | ||
| dxfg_v4_day_filter_t * | filter, | ||
| DXFG_OUT dxfg_v4_day_t ** | prevDay ) |
Returns the previous day accepted by a filter.
The search looks up to a year back in time. The function fails if no such day is found; it returns DXFG_EXECUTE_FAIL. To get NULL instead of a failure when no day is found, use dxfg_v4_Day_findPrevDay().
Java: Day.getPrevDay(DayFilter).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day to start from. |
| [in] | filter | The filter that tests the days. |
| [out] | prevDay | The pointer to the variable that receives the nearest previous day accepted by the filter (release it with dxfg_v4_Day_release()); must not be NULL. |
| int32_t dxfg_v4_Day_getResetTime | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_day_t * | day, | ||
| DXFG_OUT int64_t * | resetTime ) |
Returns the reset time of a day.
The daily data is reset on trading days only; the result has no meaning for non-trading days.
Java: Day.getResetTime().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day. |
| [out] | resetTime | The pointer to the variable that receives the reset time in UTC milliseconds. -1 is also a valid time (1969-12-31T23:59:59.999Z); must not be NULL. |
| int32_t dxfg_v4_Day_getSchedule | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_day_t * | day, | ||
| DXFG_OUT dxfg_v4_schedule_t ** | schedule ) |
Returns the schedule to which a day belongs.
Java: Day.getSchedule().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day. |
| [out] | schedule | The pointer to the variable that receives the schedule (release it with dxfg_v4_JavaObjectHandler_release()); must not be NULL. |
| int32_t dxfg_v4_Day_getSessionByTime | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_day_t * | day, | ||
| int64_t | time, | ||
| DXFG_OUT dxfg_v4_session_t ** | session ) |
Returns the session of a day that contains a time.
The function fails if no such session is found within the day; it returns DXFG_EXECUTE_FAIL.
Java: Day.getSessionByTime(long).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day. |
| [in] | time | The time to search for, in UTC milliseconds. |
| [out] | session | The pointer to the variable that receives the session (release it with dxfg_v4_Session_release()); must not be NULL. |
| int32_t dxfg_v4_Day_getSessions | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_day_t * | day, | ||
| DXFG_OUT dxfg_v4_session_list ** | sessions ) |
Returns the sessions that constitute a day, in the order in which they follow one another.
Java: Day.getSessions().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day. |
| [out] | sessions | The pointer to the variable that receives the list of the sessions (release it with dxfg_v4_session_list_release(), or release each session with dxfg_v4_Session_release() and then the list with dxfg_v4_session_list_wrapper_release()); must not be NULL. |
| int32_t dxfg_v4_Day_getStartTime | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_day_t * | day, | ||
| DXFG_OUT int64_t * | startTime ) |
Returns the start time of a day (inclusive).
Java: Day.getStartTime().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day. |
| [out] | startTime | The pointer to the variable that receives the start time in UTC milliseconds. -1 is also a valid time (1969-12-31T23:59:59.999Z); must not be NULL. |
| int32_t dxfg_v4_Day_getYear | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_day_t * | day, | ||
| DXFG_OUT int32_t * | year ) |
Returns the calendar year of a day, for example 1977.
Java: Day.getYear().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day. |
| [out] | year | The pointer to the variable that receives the year; must not be NULL. |
| int32_t dxfg_v4_Day_getYearMonthDay | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_day_t * | day, | ||
| DXFG_OUT int32_t * | yearMonthDay ) |
Returns the year, month and day numbers of a day packed as year * 10000 + month * 100 + day.
For example, September 28, 1977 has the value 19770928.
Java: Day.getYearMonthDay().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day. |
| [out] | yearMonthDay | The pointer to the variable that receives the packed year, month and day numbers; must not be NULL. |
| int32_t dxfg_v4_Day_hashCode | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_day_t * | day, | ||
| DXFG_OUT int32_t * | hashCode ) |
Returns the hash code of a day.
Java: Day.hashCode().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day. |
| [out] | hashCode | The pointer to the variable that receives the hash code. -1 can also be a valid hash code; must not be NULL. |
| int32_t dxfg_v4_Day_isHoliday | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_day_t * | day, | ||
| DXFG_OUT int32_t * | holiday ) |
Checks whether a day is an exchange holiday.
Usually no trading takes place on a holiday.
Java: Day.isHoliday().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day. |
| [out] | holiday | The pointer to the variable that receives 1 if the day is a holiday, 0 if not; must not be NULL. |
| int32_t dxfg_v4_Day_isShortDay | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_day_t * | day, | ||
| DXFG_OUT int32_t * | shortDay ) |
Checks whether a day is a short day.
Usually trading stops earlier on a short day.
Java: Day.isShortDay().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day. |
| [out] | shortDay | The pointer to the variable that receives 1 if the day is a short day, 0 if not; must not be NULL. |
| int32_t dxfg_v4_Day_isTrading | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_day_t * | day, | ||
| DXFG_OUT int32_t * | trading ) |
Checks whether trading activity is allowed within a day.
A trading day has at least one trading session.
Java: Day.isTrading().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day. |
| [out] | trading | The pointer to the variable that receives 1 if trading activity is allowed within the day, 0 if not; must not be NULL. |
| int32_t dxfg_v4_Day_release | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_day_t * | day ) |
Releases a day handle.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day handle to release. Do not use it afterwards. |
| int32_t dxfg_v4_Day_toString | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_day_t * | day, | ||
| DXFG_OUT const char ** | string ) |
Returns the string representation of a day.
Java: Day.toString().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day. |
| [out] | string | The pointer to the variable that receives the string representation, a null-terminated UTF-8 string (release it with dxfg_v4_String_release()); must not be NULL. |
| int32_t dxfg_v4_DayFilter_getInstance | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_day_filter_prepare_t | filter, | ||
| DXFG_OUT dxfg_v4_day_filter_t ** | dayFilter ) |
Returns a predefined day filter.
Java: DayFilter.ANY, DayFilter.TRADING, DayFilter.NON_TRADING, DayFilter.HOLIDAY, DayFilter.SHORT_DAY, DayFilter.MONDAY ... DayFilter.SUNDAY, DayFilter.WEEK_DAY, DayFilter.WEEK_END.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | filter | The predefined filter to return. |
| [out] | dayFilter | The pointer to the variable that receives the day filter (release it with dxfg_v4_JavaObjectHandler_release()); must not be NULL. |
| int32_t dxfg_v4_DayFilter_new | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_day_filter_function | filter, | ||
| DXFG_OUT dxfg_v4_day_filter_t ** | dayFilter ) |
Creates a day filter that calls a custom function to test days.
The function pointer must stay valid as long as the filter may be used by search functions.
Java: new DayFilter(int, Boolean, Boolean, Boolean) with DayFilter.accept(Day) overridden to call filter.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | filter | The function that tests a day: it returns 1 to accept the day. |
| [out] | dayFilter | The pointer to the variable that receives the new day filter (release it with dxfg_v4_JavaObjectHandler_release()); must not be NULL. |
| int32_t dxfg_v4_Schedule_downloadDefaults | ( | graal_isolatethread_t * | thread, |
| const char * | downloadConfig ) |
Downloads the default schedule data and optionally starts the periodic download.
The first download is done before the function returns. A failure of the download itself is logged and does not make the function fail.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | downloadConfig | The download config, a null-terminated UTF-8 string, one of: an empty string or NULL (stop the periodic download); a URL (download once from the URL and stop the periodic download); URL,period (start the periodic download from the URL); auto (start the periodic download from the default location). |
Java: Schedule.downloadDefaults(String).
| int32_t dxfg_v4_Schedule_findNearestSessionByTime | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_schedule_t * | schedule, | ||
| int64_t | time, | ||
| dxfg_v4_session_filter_t * | filter, | ||
| DXFG_OUT dxfg_v4_session_t ** | session ) |
Returns the session of a schedule that is nearest to a time and is accepted by a filter, or NULL if there is none.
NULL is written and the function succeeds if no session accepted by the filter is found within one year. The function fails (DXFG_EXECUTE_FAIL) if the time is outside the supported date range.
Java: Schedule.findNearestSessionByTime(long, SessionFilter).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | schedule | The schedule. |
| [in] | time | The time to search for, in UTC milliseconds. |
| [in] | filter | The filter that tests the sessions. |
| [out] | session | The pointer to the variable that receives the session (release it with dxfg_v4_Session_release()), or NULL if no session is found; must not be NULL. |
| int32_t dxfg_v4_Schedule_getDayById | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_schedule_t * | schedule, | ||
| int32_t | dayId, | ||
| DXFG_OUT dxfg_v4_day_t ** | day ) |
Returns the day of a schedule with a day identifier.
The function fails if the day identifier is outside the supported date range.
Java: Schedule.getDayById(int).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | schedule | The schedule. |
| [in] | dayId | The day identifier: the number of the day since 1970-01-01, which has the identifier 0; the previous days have negative identifiers. See dxfg_v4_Day_getDayId(). |
| [out] | day | The pointer to the variable that receives the day (release it with dxfg_v4_Day_release()); must not be NULL. |
| int32_t dxfg_v4_Schedule_getDayByTime | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_schedule_t * | schedule, | ||
| int64_t | time, | ||
| DXFG_OUT dxfg_v4_day_t ** | day ) |
Returns the day of a schedule that contains a time.
The function fails if the time is outside the supported date range.
Java: Schedule.getDayByTime(long).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | schedule | The schedule. |
| [in] | time | The time to search for, in UTC milliseconds. |
| [out] | day | The pointer to the variable that receives the day (release it with dxfg_v4_Day_release()); must not be NULL. |
| int32_t dxfg_v4_Schedule_getDayByYearMonthDay | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_schedule_t * | schedule, | ||
| int32_t | yearMonthDay, | ||
| DXFG_OUT dxfg_v4_day_t ** | day ) |
Returns the day of a schedule with year, month and day numbers.
If the day does not exist, the day with the lowest valid yearMonthDay that is greater than the specified one is returned. The function fails if the value is outside the supported date range.
Java: Schedule.getDayByYearMonthDay(int).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | schedule | The schedule. |
| [in] | yearMonthDay | The year, month and day numbers packed as year * 10000 + month * 100 + day; for example, 19770928 is September 28, 1977. See dxfg_v4_Day_getYearMonthDay(). |
| [out] | day | The pointer to the variable that receives the day (release it with dxfg_v4_Day_release()); must not be NULL. |
| int32_t dxfg_v4_Schedule_getDefinition | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_schedule_t * | schedule, | ||
| DXFG_OUT char ** | definition ) |
Returns the definition of a schedule: its name and its properties in parentheses, e.g. NYSE(...). It is the part of the string given to dxfg_v4_Schedule_getInstanceByDefinition(), or of the trading hours of the instrument profile, that defines this schedule.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | schedule | The schedule. |
| [out] | definition | The definition, a null-terminated UTF-8 string (release it with dxfg_v4_String_release()). It is written on success only. |
Java: Schedule.getDefinition().
| int32_t dxfg_v4_Schedule_getInstance | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_instrument_profile_data_t * | instrumentProfile, | ||
| DXFG_OUT dxfg_v4_schedule_t ** | schedule ) |
Creates a schedule instance based on a instrument profile.
The schedule is defined by the trading hours of the profile. The function fails if the trading hours contain no parenthesized schedule definition.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | instrumentProfile | The instrument profile. |
| [out] | schedule | The new schedule instance. |
Java: Schedule.getInstance(InstrumentProfile).
| int32_t dxfg_v4_Schedule_getInstanceByDefinition | ( | graal_isolatethread_t * | thread, |
| const char * | scheduleDefinition, | ||
| DXFG_OUT dxfg_v4_schedule_t ** | schedule ) |
Returns the default schedule for a schedule definition.
The definition has the form of the trading hours of an instrument profile. The first parenthesized part of it is used. The function fails if the definition contains no parenthesized part.
Java: Schedule.getInstance(String).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | scheduleDefinition | The schedule definition, a null-terminated UTF-8 string. |
| [out] | schedule | The pointer to the variable that receives the schedule (release it with dxfg_v4_JavaObjectHandler_release()); must not be NULL. |
| int32_t dxfg_v4_Schedule_getInstanceByProfileHandle | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_instrument_profile_t * | instrumentProfile, | ||
| DXFG_OUT dxfg_v4_schedule_t ** | schedule ) |
Returns the default schedule for an instrument profile.
The schedule is defined by the trading hours of the profile. The function fails if the trading hours contain no parenthesized schedule definition.
Java: Schedule.getInstance(InstrumentProfile).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | instrumentProfile | The instrument profile whose schedule is requested. |
| [out] | schedule | The pointer to the variable that receives the schedule (release it with dxfg_v4_JavaObjectHandler_release()); must not be NULL. |
| int32_t dxfg_v4_Schedule_getInstanceByProfileHandleWithVenue | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_instrument_profile_t * | instrumentProfile, | ||
| const char * | venue, | ||
| DXFG_OUT dxfg_v4_schedule_t ** | schedule ) |
Returns the schedule for an instrument profile and a trading venue.
The venue is the name that precedes the schedule definition in parentheses in the trading hours of the profile. The function fails if the trading hours contain no schedule for the venue.
Java: Schedule.getInstance(InstrumentProfile, String).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | instrumentProfile | The instrument profile whose schedule is requested. |
| [in] | venue | The trading venue, a null-terminated UTF-8 string. |
| [out] | schedule | The pointer to the variable that receives the schedule (release it with dxfg_v4_JavaObjectHandler_release()); must not be NULL. |
| int32_t dxfg_v4_Schedule_getInstanceWithVenue | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_instrument_profile_data_t * | instrumentProfile, | ||
| const char * | venue, | ||
| DXFG_OUT dxfg_v4_schedule_t ** | schedule ) |
Creates a schedule instance based on a instrument profile and a venue.
The venue is the name that precedes the schedule definition in parentheses in the trading hours of the profile. The function fails if the trading hours contain no schedule for the venue.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | instrumentProfile | The instrument profile. |
| [in] | venue | The venue, a null-terminated UTF-8 string. |
| [out] | schedule | The new schedule instance. |
Java: Schedule.getInstance(InstrumentProfile, String).
| int32_t dxfg_v4_Schedule_getName | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_schedule_t * | schedule, | ||
| DXFG_OUT const char ** | name ) |
Returns the name of a schedule.
Java: Schedule.getName().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | schedule | The schedule. |
| [out] | name | The pointer to the variable that receives the name, a null-terminated UTF-8 string (release it with dxfg_v4_String_release()); must not be NULL. |
| int32_t dxfg_v4_Schedule_getNearestSessionByTime | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_schedule_t * | schedule, | ||
| int64_t | time, | ||
| dxfg_v4_session_filter_t * | filter, | ||
| DXFG_OUT dxfg_v4_session_t ** | session ) |
Returns the session of a schedule that is nearest to a time and is accepted by a filter.
The function fails if the time is outside the supported date range or if no session accepted by the filter is found within one year; in both cases it returns DXFG_EXECUTE_FAIL. To get NULL instead of a failure when no session is found, use dxfg_v4_Schedule_findNearestSessionByTime().
Java: Schedule.getNearestSessionByTime(long, SessionFilter).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | schedule | The schedule. |
| [in] | time | The time to search for, in UTC milliseconds. |
| [in] | filter | The filter that tests the sessions. |
| [out] | session | The pointer to the variable that receives the session (release it with dxfg_v4_Session_release()); must not be NULL. |
| int32_t dxfg_v4_Schedule_getSessionByTime | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_schedule_t * | schedule, | ||
| int64_t | time, | ||
| DXFG_OUT dxfg_v4_session_t ** | session ) |
Returns the session of a schedule that contains a time.
The function fails if the time is outside the supported date range.
Java: Schedule.getSessionByTime(long).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | schedule | The schedule. |
| [in] | time | The time to search for, in UTC milliseconds. |
| [out] | session | The pointer to the variable that receives the session (release it with dxfg_v4_Session_release()); must not be NULL. |
| int32_t dxfg_v4_Schedule_getTimeZone | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_schedule_t * | schedule, | ||
| DXFG_OUT const char ** | timeZoneDisplayName ) |
Returns the display name of the time zone in which a schedule is defined.
To get the identifier of the time zone, use dxfg_v4_Schedule_getTimeZone_getID().
Java: Schedule.getTimeZone(), TimeZone.getDisplayName().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | schedule | The schedule. |
| [out] | timeZoneDisplayName | The pointer to the variable that receives the display name, a null-terminated UTF-8 string (release it with dxfg_v4_String_release()); must not be NULL. |
| int32_t dxfg_v4_Schedule_getTimeZone_getID | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_schedule_t * | schedule, | ||
| DXFG_OUT const char ** | timeZoneId ) |
Returns the identifier of the time zone in which a schedule is defined.
Java: Schedule.getTimeZone(), TimeZone.getID().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | schedule | The schedule. |
| [out] | timeZoneId | The pointer to the variable that receives the time zone identifier, a null-terminated UTF-8 string (release it with dxfg_v4_String_release()); must not be NULL. |
| int32_t dxfg_v4_Schedule_getTradingVenues | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_instrument_profile_data_t * | instrumentProfile, | ||
| DXFG_OUT dxfg_v4_string_list ** | venues ) |
Returns trading venues by an instrument profile.
The list is empty (size 0, elements NULL) if the trading hours of the profile contain no venues.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | instrumentProfile | The instrument profile. |
| [out] | venues | Returned list of venues. |
Java: Schedule.getTradingVenues(InstrumentProfile).
| int32_t dxfg_v4_Schedule_getTradingVenuesByProfileHandle | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_instrument_profile_t * | instrumentProfile, | ||
| DXFG_OUT dxfg_v4_string_list ** | venues ) |
Returns the trading venues of an instrument profile.
The list is empty (size 0, elements NULL) if the trading hours of the profile contain no venues.
Java: Schedule.getTradingVenues(InstrumentProfile).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | instrumentProfile | The instrument profile whose venues are requested. |
| [out] | venues | The pointer to the variable that receives the list of the venue names (release it with dxfg_v4_string_list_release()); must not be NULL. |
| int32_t dxfg_v4_Schedule_setDefaults | ( | graal_isolatethread_t * | thread, |
| const char * | data, | ||
| int32_t | size ) |
Sets the shared defaults that are used by the schedule instances.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | data | The content of the default data. Compressed data is detected by its header. |
| [in] | size | The size of data in bytes. |
Java: Schedule.setDefaults(byte[]).
| int32_t dxfg_v4_Session_containsTime | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_session_t * | session, | ||
| int64_t | time, | ||
| DXFG_OUT int32_t * | contains ) |
Checks whether a time belongs to a session.
Java: Session.containsTime(long).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | session | The session. |
| [in] | time | The time to check, in UTC milliseconds. |
| [out] | contains | The pointer to the variable that receives 1 if the time belongs to the session, 0 if not; must not be NULL. |
| int32_t dxfg_v4_Session_equals | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_session_t * | session, | ||
| dxfg_v4_session_t * | otherSession, | ||
| DXFG_OUT int32_t * | equal ) |
Checks whether two sessions are equal.
Sessions are equal if they belong to equal days and have the same type, start time and end time.
Java: Session.equals(Object).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | session | The session. |
| [in] | otherSession | The session to compare with. |
| [out] | equal | The pointer to the variable that receives 1 if the sessions are equal, 0 if not; must not be NULL. |
| int32_t dxfg_v4_Session_findNextSession | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_session_t * | session, | ||
| dxfg_v4_session_filter_t * | filter, | ||
| DXFG_OUT dxfg_v4_session_t ** | nextSession ) |
Returns the following session accepted by a filter, or NULL if there is none.
The search may cross the day boundary and look up to a year ahead. NULL is written and the function succeeds if no such session is found.
Java: Session.findNextSession(SessionFilter).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | session | The session to start from. |
| [in] | filter | The filter that tests the sessions. |
| [out] | nextSession | The pointer to the variable that receives the nearest following session accepted by the filter (release it with dxfg_v4_Session_release()), or NULL if no session is found; must not be NULL. |
| int32_t dxfg_v4_Session_findPrevSession | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_session_t * | session, | ||
| dxfg_v4_session_filter_t * | filter, | ||
| DXFG_OUT dxfg_v4_session_t ** | prevSession ) |
Returns the previous session accepted by a filter, or NULL if there is none.
The search may cross the day boundary and look up to a year back in time. NULL is written and the function succeeds if no such session is found.
Java: Session.findPrevSession(SessionFilter).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | session | The session to start from. |
| [in] | filter | The filter that tests the sessions. |
| [out] | prevSession | The pointer to the variable that receives the nearest previous session accepted by the filter (release it with dxfg_v4_Session_release()), or NULL if no session is found; must not be NULL. |
| int32_t dxfg_v4_Session_getDay | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_session_t * | session, | ||
| DXFG_OUT dxfg_v4_day_t ** | day ) |
Returns the day to which a session belongs.
Java: Session.getDay().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | session | The session. |
| [out] | day | The pointer to the variable that receives the day (release it with dxfg_v4_Day_release()); must not be NULL. |
| int32_t dxfg_v4_Session_getEndTime | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_session_t * | session, | ||
| DXFG_OUT int64_t * | endTime ) |
Returns the end time of a session (exclusive).
For an empty session the end time equals the start time.
Java: Session.getEndTime().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | session | The session. |
| [out] | endTime | The pointer to the variable that receives the end time in UTC milliseconds. -1 is also a valid time (1969-12-31T23:59:59.999Z); must not be NULL. |
| int32_t dxfg_v4_Session_getNextSession | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_session_t * | session, | ||
| dxfg_v4_session_filter_t * | filter, | ||
| DXFG_OUT dxfg_v4_session_t ** | nextSession ) |
Returns the following session accepted by a filter.
The search may cross the day boundary and look up to a year ahead. The function fails if no such session is found; it returns DXFG_EXECUTE_FAIL. To get NULL instead of a failure when no session is found, use dxfg_v4_Session_findNextSession().
Java: Session.getNextSession(SessionFilter).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | session | The session to start from. |
| [in] | filter | The filter that tests the sessions. |
| [out] | nextSession | The pointer to the variable that receives the nearest following session accepted by the filter (release it with dxfg_v4_Session_release()); must not be NULL. |
| int32_t dxfg_v4_Session_getPrevSession | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_session_t * | session, | ||
| dxfg_v4_session_filter_t * | filter, | ||
| DXFG_OUT dxfg_v4_session_t ** | prevSession ) |
Returns the previous session accepted by a filter.
The search may cross the day boundary and look up to a year back in time. The function fails if no such session is found; it returns DXFG_EXECUTE_FAIL. To get NULL instead of a failure when no session is found, use dxfg_v4_Session_findPrevSession().
Java: Session.getPrevSession(SessionFilter).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | session | The session to start from. |
| [in] | filter | The filter that tests the sessions. |
| [out] | prevSession | The pointer to the variable that receives the nearest previous session accepted by the filter (release it with dxfg_v4_Session_release()); must not be NULL. |
| int32_t dxfg_v4_Session_getStartTime | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_session_t * | session, | ||
| DXFG_OUT int64_t * | startTime ) |
Returns the start time of a session (inclusive).
For an empty session the start time equals the end time.
Java: Session.getStartTime().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | session | The session. |
| [out] | startTime | The pointer to the variable that receives the start time in UTC milliseconds. -1 is also a valid time (1969-12-31T23:59:59.999Z); must not be NULL. |
| int32_t dxfg_v4_Session_getType | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_session_t * | session, | ||
| DXFG_OUT dxfg_v4_session_type_t * | type ) |
Returns the type of a session.
Java: Session.getType().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | session | The session. |
| [out] | type | The pointer to the variable that receives the type of the session, a dxfg_v4_session_type_t value; must not be NULL. |
| int32_t dxfg_v4_Session_hashCode | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_session_t * | session, | ||
| DXFG_OUT int32_t * | hashCode ) |
Returns the hash code of a session.
Java: Session.hashCode().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | session | The session. |
| [out] | hashCode | The pointer to the variable that receives the hash code. -1 can also be a valid hash code; must not be NULL. |
| int32_t dxfg_v4_Session_isEmpty | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_session_t * | session, | ||
| DXFG_OUT int32_t * | empty ) |
Checks whether a session has zero duration.
Empty sessions are used for example for indices that post a value once a day. They can be of any type.
Java: Session.isEmpty().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | session | The session. |
| [out] | empty | The pointer to the variable that receives 1 if the session has zero duration, 0 if not; must not be NULL. |
| int32_t dxfg_v4_Session_isTrading | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_session_t * | session, | ||
| DXFG_OUT int32_t * | trading ) |
Checks whether trading activity is allowed within a session.
Java: Session.isTrading().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | session | The session. |
| [out] | trading | The pointer to the variable that receives 1 if trading activity is allowed within the session, 0 if not; must not be NULL. |
| int32_t dxfg_v4_session_list_release | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_session_list * | sessions ) |
Releases a list of sessions that a function returned (dxfg_v4_Day_getSessions()): releases every session handle, frees the array of the handles and the list itself. To keep the sessions, release the list with dxfg_v4_session_list_wrapper_release() instead.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | sessions | The list to release. If it is NULL, nothing is done. |
| int32_t dxfg_v4_session_list_wrapper_release | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_session_list * | sessions ) |
Releases the dxfg_v4_session_list structure and its array of elements and keeps the sessions themselves.
Release the sessions with dxfg_v4_Session_release() separately; the list must not be used afterwards.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | sessions | The list to release; must not be NULL. |
| int32_t dxfg_v4_Session_release | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_session_t * | session ) |
Releases a session handle.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | session | The session handle to release. Do not use it afterwards. |
| int32_t dxfg_v4_Session_toString | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_session_t * | session, | ||
| DXFG_OUT const char ** | string ) |
Returns the string representation of a session.
Java: Session.toString().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | session | The session. |
| [out] | string | The pointer to the variable that receives the string representation, a null-terminated UTF-8 string (release it with dxfg_v4_String_release()); must not be NULL. |
| int32_t dxfg_v4_SessionFilter_getInstance | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_session_filter_prepare_t | filter, | ||
| DXFG_OUT dxfg_v4_session_filter_t ** | sessionFilter ) |
Returns a predefined session filter.
Java: SessionFilter.ANY, SessionFilter.TRADING, SessionFilter.NON_TRADING, SessionFilter.NO_TRADING, SessionFilter.PRE_MARKET, SessionFilter.REGULAR, SessionFilter.AFTER_MARKET.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | filter | The predefined filter to return. |
| [out] | sessionFilter | The pointer to the variable that receives the session filter (release it with dxfg_v4_JavaObjectHandler_release()); must not be NULL. |
| int32_t dxfg_v4_SessionFilter_new | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_session_filter_function | filter, | ||
| DXFG_OUT dxfg_v4_session_filter_t ** | sessionFilter ) |
Creates a session filter that calls a custom function to test sessions.
The function pointer must stay valid as long as the filter may be used by search functions.
Java: new SessionFilter(SessionType, Boolean) with SessionFilter.accept(Session) overridden to call filter.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | filter | The function that tests a session: it returns 1 to accept the session. |
| [out] | sessionFilter | The pointer to the variable that receives the new session filter (release it with dxfg_v4_JavaObjectHandler_release()); must not be NULL. |