|
dxFeed Graal Native SDK 3.10.0
|
Data Structures | |
| struct | dxfg_schedule_t |
| A handle of a Java Schedule object; release it with dxfg_JavaObjectHandler_release(). More... | |
| struct | dxfg_session_t |
| A handle of a Java Session object; release it with dxfg_Session_release(). More... | |
| struct | dxfg_session_list |
| struct | dxfg_day_t |
| A handle of a Java Day object; release it with dxfg_Day_release(). More... | |
| struct | dxfg_session_filter_t |
| A handle of a Java SessionFilter object; release it with dxfg_JavaObjectHandler_release(). More... | |
| struct | dxfg_day_filter_t |
| A handle of a Java DayFilter object; release it with dxfg_JavaObjectHandler_release(). More... | |
Typedefs | |
| typedef struct dxfg_schedule_t | dxfg_schedule_t |
| A handle of a Java Schedule object; release it with dxfg_JavaObjectHandler_release(). | |
| typedef enum dxfg_session_type_t | dxfg_session_type_t |
| typedef struct dxfg_session_t | dxfg_session_t |
| A handle of a Java Session object; release it with dxfg_Session_release(). | |
| typedef struct dxfg_session_list | dxfg_session_list |
| typedef struct dxfg_day_t | dxfg_day_t |
| A handle of a Java Day object; release it with dxfg_Day_release(). | |
| typedef int32_t(*) | dxfg_session_filter_function(graal_isolatethread_t *thread, dxfg_session_t *session) |
| typedef struct dxfg_session_filter_t | dxfg_session_filter_t |
| A handle of a Java SessionFilter object; release it with dxfg_JavaObjectHandler_release(). | |
| typedef enum dxfg_session_filter_prepare_t | dxfg_session_filter_prepare_t |
| typedef int32_t(*) | dxfg_day_filter_function(graal_isolatethread_t *thread, dxfg_day_t *day) |
| typedef struct dxfg_day_filter_t | dxfg_day_filter_t |
| A handle of a Java DayFilter object; release it with dxfg_JavaObjectHandler_release(). | |
| typedef enum dxfg_day_filter_prepare_t | dxfg_day_filter_prepare_t |
Trading schedules of exchanges and instruments: schedules, days, sessions and the filters to search them.
All times are UTC milliseconds since the Unix epoch (1970-01-01T00:00:00Z). The supported date range is from 0001-01-02 to 9999-12-30.
Every function that returns a handle (a schedule, a day, a session or a filter) creates a new handle that the caller owns, even if the same Java object has been returned before: release it with the function named in its description.
| typedef int32_t(*) dxfg_day_filter_function(graal_isolatethread_t *thread, dxfg_day_t *day) |
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. |
| typedef enum dxfg_day_filter_prepare_t dxfg_day_filter_prepare_t |
The predefined day filters, see dxfg_DayFilter_getInstance().
The days of the week are numbered from 1 (Monday) to 7 (Sunday).
| typedef struct dxfg_day_filter_t dxfg_day_filter_t |
A handle of a Java DayFilter object; release it with dxfg_JavaObjectHandler_release().
A filter for days used by the search functions.
| typedef struct dxfg_day_t dxfg_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 struct dxfg_schedule_t dxfg_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.
| typedef int32_t(*) dxfg_session_filter_function(graal_isolatethread_t *thread, dxfg_session_t *session) |
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().
| typedef struct dxfg_session_filter_t dxfg_session_filter_t |
A handle of a Java SessionFilter object; release it with dxfg_JavaObjectHandler_release().
A filter for sessions used by the search functions.
| typedef struct dxfg_session_list dxfg_session_list |
A list of session handles, returned by dxfg_Day_getSessions().
Release the sessions with dxfg_Session_release() one by one and then the list itself with dxfg_SessionList_wrapper_release(). There is no function that releases the list and its sessions together.
| typedef struct dxfg_session_t dxfg_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).
| typedef enum dxfg_session_type_t dxfg_session_type_t |
The type of a trading session: what kind of trading activity is allowed in it, if any.
The predefined day filters, see dxfg_DayFilter_getInstance().
The days of the week are numbered from 1 (Monday) to 7 (Sunday).
The predefined session filters, see dxfg_SessionFilter_getInstance().
| Enumerator | |
|---|---|
| DXFG_SESSION_FILTER_ANY | Accepts any session. |
| DXFG_SESSION_FILTER_TRADING | Accepts trading sessions only. |
| DXFG_SESSION_FILTER_NON_TRADING | Accepts non-trading sessions only. |
| DXFG_SESSION_FILTER_NO_TRADING | Accepts the sessions of type DXFG_SESSION_TYPE_NO_TRADING. |
| DXFG_SESSION_FILTER_PRE_MARKET | Accepts the sessions of type DXFG_SESSION_TYPE_PRE_MARKET. |
| DXFG_SESSION_FILTER_REGULAR | Accepts the sessions of type DXFG_SESSION_TYPE_REGULAR. |
| DXFG_SESSION_FILTER_AFTER_MARKET | Accepts the sessions of type DXFG_SESSION_TYPE_AFTER_MARKET. |
| enum dxfg_session_type_t |
The type of a trading session: what kind of trading activity is allowed in it, if any.
| int32_t dxfg_Day_containsTime | ( | graal_isolatethread_t * | thread, |
| dxfg_day_t * | day, | ||
| int64_t | time ) |
Checks whether a time belongs to a day.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day. |
| [in] | time | The time to check, in UTC milliseconds. |
Java: Day.containsTime(long).
| int32_t dxfg_Day_equals | ( | graal_isolatethread_t * | thread, |
| dxfg_day_t * | day, | ||
| dxfg_day_t * | otherDay ) |
Checks whether two days are equal.
Days are equal if they belong to equal schedules and have the same day identifier.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day. |
| [in] | otherDay | The day to compare with. |
Java: Day.equals(Object).
| dxfg_session_t * dxfg_Day_findFirstSession | ( | graal_isolatethread_t * | thread, |
| dxfg_day_t * | day, | ||
| dxfg_session_filter_t * | filter ) |
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 returned without an exception if no such session is found within the day.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day. |
| [in] | filter | The filter that tests the sessions. |
Java: Day.findFirstSession(SessionFilter).
| dxfg_session_t * dxfg_Day_findLastSession | ( | graal_isolatethread_t * | thread, |
| dxfg_day_t * | day, | ||
| dxfg_session_filter_t * | filter ) |
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 returned without an exception if no such session is found within the day.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day. |
| [in] | filter | The filter that tests the sessions. |
Java: Day.findLastSession(SessionFilter).
| dxfg_day_t * dxfg_Day_findNextDay | ( | graal_isolatethread_t * | thread, |
| dxfg_day_t * | day, | ||
| dxfg_day_filter_t * | filter ) |
Returns the following day accepted by a filter, or NULL if there is none.
The search looks up to a year ahead. NULL is returned without an exception if no such day is found.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day to start from. |
| [in] | filter | The filter that tests the days. |
Java: Day.findNextDay(DayFilter).
| dxfg_day_t * dxfg_Day_findPrevDay | ( | graal_isolatethread_t * | thread, |
| dxfg_day_t * | day, | ||
| dxfg_day_filter_t * | filter ) |
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 returned without an exception if no such day is found.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day to start from. |
| [in] | filter | The filter that tests the days. |
Java: Day.findPrevDay(DayFilter).
| int32_t dxfg_Day_getDayId | ( | graal_isolatethread_t * | thread, |
| dxfg_day_t * | day ) |
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.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day. |
Java: Day.getDayId().
| int32_t dxfg_Day_getDayOfMonth | ( | graal_isolatethread_t * | thread, |
| dxfg_day_t * | day ) |
Returns the ordinal number of a day in its month, starting with 1 for the first day of the month.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day. |
Java: Day.getDayOfMonth().
| int32_t dxfg_Day_getDayOfWeek | ( | graal_isolatethread_t * | thread, |
| dxfg_day_t * | day ) |
Returns the ordinal number of a day in its week, from 1 (Monday) to 7 (Sunday).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day. |
Java: Day.getDayOfWeek().
| int64_t dxfg_Day_getEndTime | ( | graal_isolatethread_t * | thread, |
| dxfg_day_t * | day ) |
Returns the end time of a day (exclusive).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day. |
Java: Day.getEndTime().
| dxfg_session_t * dxfg_Day_getFirstSession | ( | graal_isolatethread_t * | thread, |
| dxfg_day_t * | day, | ||
| dxfg_session_filter_t * | filter ) |
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 NULL and an exception is set. To get NULL without an exception when no session is found, use dxfg_Day_findFirstSession().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day. |
| [in] | filter | The filter that tests the sessions. |
Java: Day.getFirstSession(SessionFilter).
| dxfg_session_t * dxfg_Day_getLastSession | ( | graal_isolatethread_t * | thread, |
| dxfg_day_t * | day, | ||
| dxfg_session_filter_t * | filter ) |
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 NULL and an exception is set. To get NULL without an exception when no session is found, use dxfg_Day_findLastSession().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day. |
| [in] | filter | The filter that tests the sessions. |
Java: Day.getLastSession(SessionFilter).
| int32_t dxfg_Day_getMonthOfYear | ( | graal_isolatethread_t * | thread, |
| dxfg_day_t * | day ) |
Returns the calendar month number of a day, from 1 (January) to 12 (December).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day. |
Java: Day.getMonthOfYear().
| dxfg_day_t * dxfg_Day_getNextDay | ( | graal_isolatethread_t * | thread, |
| dxfg_day_t * | day, | ||
| dxfg_day_filter_t * | filter ) |
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 NULL and an exception is set. To get NULL without an exception when no day is found, use dxfg_Day_findNextDay().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day to start from. |
| [in] | filter | The filter that tests the days. |
Java: Day.getNextDay(DayFilter).
| dxfg_day_t * dxfg_Day_getPrevDay | ( | graal_isolatethread_t * | thread, |
| dxfg_day_t * | day, | ||
| dxfg_day_filter_t * | filter ) |
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 NULL and an exception is set. To get NULL without an exception when no day is found, use dxfg_Day_findPrevDay().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day to start from. |
| [in] | filter | The filter that tests the days. |
Java: Day.getPrevDay(DayFilter).
| int64_t dxfg_Day_getResetTime | ( | graal_isolatethread_t * | thread, |
| dxfg_day_t * | day ) |
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.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day. |
Java: Day.getResetTime().
| dxfg_schedule_t * dxfg_Day_getSchedule | ( | graal_isolatethread_t * | thread, |
| dxfg_day_t * | day ) |
Returns the schedule to which a day belongs.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day. |
Java: Day.getSchedule().
| dxfg_session_t * dxfg_Day_getSessionByTime | ( | graal_isolatethread_t * | thread, |
| dxfg_day_t * | day, | ||
| int64_t | time ) |
Returns the session of a day that contains a time.
The function fails if no such session is found within the day; it returns NULL and an exception is set.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day. |
| [in] | time | The time to search for, in UTC milliseconds. |
Java: Day.getSessionByTime(long).
| dxfg_session_list * dxfg_Day_getSessions | ( | graal_isolatethread_t * | thread, |
| dxfg_day_t * | day ) |
Returns the sessions that constitute a day, in the order in which they follow one another.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day. |
Java: Day.getSessions().
| int64_t dxfg_Day_getStartTime | ( | graal_isolatethread_t * | thread, |
| dxfg_day_t * | day ) |
Returns the start time of a day (inclusive).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day. |
Java: Day.getStartTime().
| int32_t dxfg_Day_getYear | ( | graal_isolatethread_t * | thread, |
| dxfg_day_t * | day ) |
Returns the calendar year of a day, for example 1977.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day. |
Java: Day.getYear().
| int32_t dxfg_Day_getYearMonthDay | ( | graal_isolatethread_t * | thread, |
| dxfg_day_t * | day ) |
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.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day. |
Java: Day.getYearMonthDay().
| int32_t dxfg_Day_hashCode | ( | graal_isolatethread_t * | thread, |
| dxfg_day_t * | day ) |
Returns the hash code of a day.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day. |
Java: Day.hashCode().
| int32_t dxfg_Day_isHoliday | ( | graal_isolatethread_t * | thread, |
| dxfg_day_t * | day ) |
Checks whether a day is an exchange holiday.
Usually no trading takes place on a holiday.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day. |
Java: Day.isHoliday().
| int32_t dxfg_Day_isShortDay | ( | graal_isolatethread_t * | thread, |
| dxfg_day_t * | day ) |
Checks whether a day is a short day.
Usually trading stops earlier on a short day.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day. |
Java: Day.isShortDay().
| int32_t dxfg_Day_isTrading | ( | graal_isolatethread_t * | thread, |
| dxfg_day_t * | day ) |
Checks whether trading activity is allowed within a day.
A trading day has at least one trading session.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day. |
Java: Day.isTrading().
| int32_t dxfg_Day_release | ( | graal_isolatethread_t * | thread, |
| dxfg_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. |
| const char * dxfg_Day_toString | ( | graal_isolatethread_t * | thread, |
| dxfg_day_t * | day ) |
Returns the string representation of a day.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | day | The day. |
Java: Day.toString().
| dxfg_day_filter_t * dxfg_DayFilter_getInstance | ( | graal_isolatethread_t * | thread, |
| dxfg_day_filter_prepare_t | filter ) |
Returns a predefined day filter.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | filter | The predefined filter to return. |
Java: DayFilter.ANY, DayFilter.TRADING, DayFilter.NON_TRADING, DayFilter.HOLIDAY, DayFilter.SHORT_DAY, DayFilter.MONDAY ... DayFilter.SUNDAY, DayFilter.WEEK_DAY, DayFilter.WEEK_END.
| dxfg_day_filter_t * dxfg_DayFilter_new | ( | graal_isolatethread_t * | thread, |
| dxfg_day_filter_function | filter ) |
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.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | filter | The function that tests a day: it returns 1 to accept the day. |
Java: new DayFilter(int, Boolean, Boolean, Boolean) with DayFilter.accept(Day) overridden to call filter.
| int32_t dxfg_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).
| dxfg_session_t * dxfg_Schedule_findNearestSessionByTime | ( | graal_isolatethread_t * | thread, |
| dxfg_schedule_t * | schedule, | ||
| int64_t | time, | ||
| dxfg_session_filter_t * | filter ) |
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 returned without an exception if no session accepted by the filter is found within one year. The function fails (NULL and an exception) if the time is outside the supported date range.
| [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. |
Java: Schedule.findNearestSessionByTime(long, SessionFilter).
| dxfg_day_t * dxfg_Schedule_getDayById | ( | graal_isolatethread_t * | thread, |
| dxfg_schedule_t * | schedule, | ||
| int32_t | dayId ) |
Returns the day of a schedule with a day identifier.
The function fails if the day identifier is outside the supported date range.
| [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_Day_getDayId(). |
Java: Schedule.getDayById(int).
| dxfg_day_t * dxfg_Schedule_getDayByTime | ( | graal_isolatethread_t * | thread, |
| dxfg_schedule_t * | schedule, | ||
| int64_t | time ) |
Returns the day of a schedule that contains a time.
The function fails if the time is outside the supported date range.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | schedule | The schedule. |
| [in] | time | The time to search for, in UTC milliseconds. |
Java: Schedule.getDayByTime(long).
| dxfg_day_t * dxfg_Schedule_getDayByYearMonthDay | ( | graal_isolatethread_t * | thread, |
| dxfg_schedule_t * | schedule, | ||
| int32_t | yearMonthDay ) |
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.
| [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_Day_getYearMonthDay(). |
Java: Schedule.getDayByYearMonthDay(int).
| dxfg_schedule_t * dxfg_Schedule_getInstance | ( | graal_isolatethread_t * | thread, |
| dxfg_instrument_profile_t * | instrumentProfile ) |
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.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | instrumentProfile | The instrument profile whose schedule is requested. |
Java: Schedule.getInstance(InstrumentProfile).
| dxfg_schedule_t * dxfg_Schedule_getInstance2 | ( | graal_isolatethread_t * | thread, |
| const char * | scheduleDefinition ) |
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.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | scheduleDefinition | The schedule definition, a null-terminated UTF-8 string. |
Java: Schedule.getInstance(String).
| dxfg_schedule_t * dxfg_Schedule_getInstance3 | ( | graal_isolatethread_t * | thread, |
| dxfg_instrument_profile_t * | instrumentProfile, | ||
| const char * | venue ) |
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.
| [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. |
Java: Schedule.getInstance(InstrumentProfile, String).
| int32_t dxfg_Schedule_getInstance4 | ( | graal_isolatethread_t * | thread, |
| dxfg_instrument_profile2_t * | instrumentProfile, | ||
| DXFG_OUT dxfg_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_Schedule_getInstance5 | ( | graal_isolatethread_t * | thread, |
| dxfg_instrument_profile2_t * | instrumentProfile, | ||
| const char * | venue, | ||
| DXFG_OUT dxfg_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).
| const char * dxfg_Schedule_getName | ( | graal_isolatethread_t * | thread, |
| dxfg_schedule_t * | schedule ) |
Returns the name of a schedule.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | schedule | The schedule. |
Java: Schedule.getName().
| dxfg_session_t * dxfg_Schedule_getNearestSessionByTime | ( | graal_isolatethread_t * | thread, |
| dxfg_schedule_t * | schedule, | ||
| int64_t | time, | ||
| dxfg_session_filter_t * | filter ) |
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 NULL and an exception is set. To get NULL without an exception when no session is found, use dxfg_Schedule_findNearestSessionByTime().
| [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. |
Java: Schedule.getNearestSessionByTime(long, SessionFilter).
| dxfg_session_t * dxfg_Schedule_getSessionByTime | ( | graal_isolatethread_t * | thread, |
| dxfg_schedule_t * | schedule, | ||
| int64_t | time ) |
Returns the session of a schedule that contains a time.
The function fails if the time is outside the supported date range.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | schedule | The schedule. |
| [in] | time | The time to search for, in UTC milliseconds. |
Java: Schedule.getSessionByTime(long).
| const char * dxfg_Schedule_getTimeZone | ( | graal_isolatethread_t * | thread, |
| dxfg_schedule_t * | schedule ) |
Returns the display name of the time zone in which a schedule is defined.
To get the identifier of the time zone, use dxfg_Schedule_getTimeZone_getID().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | schedule | The schedule. |
Java: Schedule.getTimeZone(), TimeZone.getDisplayName().
| const char * dxfg_Schedule_getTimeZone_getID | ( | graal_isolatethread_t * | thread, |
| dxfg_schedule_t * | schedule ) |
Returns the identifier of the time zone in which a schedule is defined.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | schedule | The schedule. |
Java: Schedule.getTimeZone(), TimeZone.getID().
| dxfg_string_list * dxfg_Schedule_getTradingVenues | ( | graal_isolatethread_t * | thread, |
| dxfg_instrument_profile_t * | instrumentProfile ) |
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.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | instrumentProfile | The instrument profile whose venues are requested. |
Java: Schedule.getTradingVenues(InstrumentProfile).
| int32_t dxfg_Schedule_getTradingVenues2 | ( | graal_isolatethread_t * | thread, |
| dxfg_instrument_profile2_t * | instrumentProfile, | ||
| DXFG_OUT dxfg_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_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_Session_containsTime | ( | graal_isolatethread_t * | thread, |
| dxfg_session_t * | session, | ||
| int64_t | time ) |
Checks whether a time belongs to a session.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | session | The session. |
| [in] | time | The time to check, in UTC milliseconds. |
Java: Session.containsTime(long).
| int32_t dxfg_Session_equals | ( | graal_isolatethread_t * | thread, |
| dxfg_session_t * | session, | ||
| dxfg_session_t * | otherSession ) |
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.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | session | The session. |
| [in] | otherSession | The session to compare with. |
Java: Session.equals(Object).
| dxfg_session_t * dxfg_Session_findNextSession | ( | graal_isolatethread_t * | thread, |
| dxfg_session_t * | session, | ||
| dxfg_session_filter_t * | filter ) |
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 returned without an exception if no such session is found.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | session | The session to start from. |
| [in] | filter | The filter that tests the sessions. |
Java: Session.findNextSession(SessionFilter).
| dxfg_session_t * dxfg_Session_findPrevSession | ( | graal_isolatethread_t * | thread, |
| dxfg_session_t * | session, | ||
| dxfg_session_filter_t * | filter ) |
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 returned without an exception if no such session is found.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | session | The session to start from. |
| [in] | filter | The filter that tests the sessions. |
Java: Session.findPrevSession(SessionFilter).
| dxfg_day_t * dxfg_Session_getDay | ( | graal_isolatethread_t * | thread, |
| dxfg_session_t * | session ) |
Returns the day to which a session belongs.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | session | The session. |
Java: Session.getDay().
| int64_t dxfg_Session_getEndTime | ( | graal_isolatethread_t * | thread, |
| dxfg_session_t * | session ) |
Returns the end time of a session (exclusive).
For an empty session the end time equals the start time.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | session | The session. |
Java: Session.getEndTime().
| dxfg_session_t * dxfg_Session_getNextSession | ( | graal_isolatethread_t * | thread, |
| dxfg_session_t * | session, | ||
| dxfg_session_filter_t * | filter ) |
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 NULL and an exception is set. To get NULL without an exception when no session is found, use dxfg_Session_findNextSession().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | session | The session to start from. |
| [in] | filter | The filter that tests the sessions. |
Java: Session.getNextSession(SessionFilter).
| dxfg_session_t * dxfg_Session_getPrevSession | ( | graal_isolatethread_t * | thread, |
| dxfg_session_t * | session, | ||
| dxfg_session_filter_t * | filter ) |
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 NULL and an exception is set. To get NULL without an exception when no session is found, use dxfg_Session_findPrevSession().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | session | The session to start from. |
| [in] | filter | The filter that tests the sessions. |
Java: Session.getPrevSession(SessionFilter).
| int64_t dxfg_Session_getStartTime | ( | graal_isolatethread_t * | thread, |
| dxfg_session_t * | session ) |
Returns the start time of a session (inclusive).
For an empty session the start time equals the end time.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | session | The session. |
Java: Session.getStartTime().
| int32_t dxfg_Session_getType | ( | graal_isolatethread_t * | thread, |
| dxfg_session_t * | session ) |
Returns the type of a session.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | session | The session. |
Java: Session.getType().
| int32_t dxfg_Session_hashCode | ( | graal_isolatethread_t * | thread, |
| dxfg_session_t * | session ) |
Returns the hash code of a session.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | session | The session. |
Java: Session.hashCode().
| int32_t dxfg_Session_isEmpty | ( | graal_isolatethread_t * | thread, |
| dxfg_session_t * | session ) |
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.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | session | The session. |
Java: Session.isEmpty().
| int32_t dxfg_Session_isTrading | ( | graal_isolatethread_t * | thread, |
| dxfg_session_t * | session ) |
Checks whether trading activity is allowed within a session.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | session | The session. |
Java: Session.isTrading().
| int32_t dxfg_Session_release | ( | graal_isolatethread_t * | thread, |
| dxfg_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. |
| const char * dxfg_Session_toString | ( | graal_isolatethread_t * | thread, |
| dxfg_session_t * | session ) |
Returns the string representation of a session.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | session | The session. |
Java: Session.toString().
| dxfg_session_filter_t * dxfg_SessionFilter_getInstance | ( | graal_isolatethread_t * | thread, |
| dxfg_session_filter_prepare_t | filter ) |
Returns a predefined session filter.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | filter | The predefined filter to return. |
Java: SessionFilter.ANY, SessionFilter.TRADING, SessionFilter.NON_TRADING, SessionFilter.NO_TRADING, SessionFilter.PRE_MARKET, SessionFilter.REGULAR, SessionFilter.AFTER_MARKET.
| dxfg_session_filter_t * dxfg_SessionFilter_new | ( | graal_isolatethread_t * | thread, |
| dxfg_session_filter_function | filter ) |
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.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | filter | The function that tests a session: it returns 1 to accept the session. |
Java: new SessionFilter(SessionType, Boolean) with SessionFilter.accept(Session) overridden to call filter.
| int32_t dxfg_SessionList_wrapper_release | ( | graal_isolatethread_t * | thread, |
| dxfg_session_list * | sessions ) |
Releases the dxfg_session_list structure and its array of elements and keeps the sessions themselves.
Release the sessions with dxfg_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. |