dxFeed Graal Native SDK 3.13.0
Loading...
Searching...
No Matches
Schedule

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

Enumerations

enum  dxfg_session_type_t { DXFG_SESSION_TYPE_NO_TRADING = 0 , DXFG_SESSION_TYPE_PRE_MARKET , DXFG_SESSION_TYPE_REGULAR , DXFG_SESSION_TYPE_AFTER_MARKET }
enum  dxfg_session_filter_prepare_t {
  DXFG_SESSION_FILTER_ANY = 0 , DXFG_SESSION_FILTER_TRADING , DXFG_SESSION_FILTER_NON_TRADING , DXFG_SESSION_FILTER_NO_TRADING ,
  DXFG_SESSION_FILTER_PRE_MARKET , DXFG_SESSION_FILTER_REGULAR , DXFG_SESSION_FILTER_AFTER_MARKET
}
enum  dxfg_day_filter_prepare_t {
  DXFG_DAY_FILTER_ANY = 0 , DXFG_DAY_FILTER_TRADING , DXFG_DAY_FILTER_NON_TRADING , DXFG_DAY_FILTER_HOLIDAY ,
  DXFG_DAY_FILTER_SHORT_DAY , DXFG_DAY_FILTER_MONDAY , DXFG_DAY_FILTER_TUESDAY , DXFG_DAY_FILTER_WEDNESDAY ,
  DXFG_DAY_FILTER_THURSDAY , DXFG_DAY_FILTER_FRIDAY , DXFG_DAY_FILTER_SATURDAY , DXFG_DAY_FILTER_SUNDAY ,
  DXFG_DAY_FILTER_WEEK_DAY , DXFG_DAY_FILTER_WEEK_END
}

Functions

dxfg_session_filter_t * dxfg_SessionFilter_new (graal_isolatethread_t *thread, dxfg_session_filter_function filter)
dxfg_session_filter_t * dxfg_SessionFilter_getInstance (graal_isolatethread_t *thread, dxfg_session_filter_prepare_t filter)
dxfg_day_filter_t * dxfg_DayFilter_new (graal_isolatethread_t *thread, dxfg_day_filter_function filter)
dxfg_day_filter_t * dxfg_DayFilter_getInstance (graal_isolatethread_t *thread, dxfg_day_filter_prepare_t filter)
dxfg_schedule_t * dxfg_Schedule_getInstance (graal_isolatethread_t *thread, dxfg_instrument_profile_t *instrumentProfile)
dxfg_schedule_t * dxfg_Schedule_getInstance2 (graal_isolatethread_t *thread, const char *scheduleDefinition)
dxfg_schedule_t * dxfg_Schedule_getInstance3 (graal_isolatethread_t *thread, dxfg_instrument_profile_t *instrumentProfile, const char *venue)
dxfg_string_list * dxfg_Schedule_getTradingVenues (graal_isolatethread_t *thread, dxfg_instrument_profile_t *instrumentProfile)
int32_t dxfg_Schedule_downloadDefaults (graal_isolatethread_t *thread, const char *downloadConfig)
int32_t dxfg_Schedule_setDefaults (graal_isolatethread_t *thread, const char *data, int32_t size)
dxfg_session_t * dxfg_Schedule_getSessionByTime (graal_isolatethread_t *thread, dxfg_schedule_t *schedule, int64_t time)
dxfg_day_t * dxfg_Schedule_getDayByTime (graal_isolatethread_t *thread, dxfg_schedule_t *schedule, int64_t time)
dxfg_day_t * dxfg_Schedule_getDayById (graal_isolatethread_t *thread, dxfg_schedule_t *schedule, int32_t dayId)
dxfg_day_t * dxfg_Schedule_getDayByYearMonthDay (graal_isolatethread_t *thread, dxfg_schedule_t *schedule, int32_t yearMonthDay)
dxfg_session_t * dxfg_Schedule_getNearestSessionByTime (graal_isolatethread_t *thread, dxfg_schedule_t *schedule, int64_t time, dxfg_session_filter_t *filter)
dxfg_session_t * dxfg_Schedule_findNearestSessionByTime (graal_isolatethread_t *thread, dxfg_schedule_t *schedule, int64_t time, dxfg_session_filter_t *filter)
const char * dxfg_Schedule_getName (graal_isolatethread_t *thread, dxfg_schedule_t *schedule)
const char * dxfg_Schedule_getTimeZone (graal_isolatethread_t *thread, dxfg_schedule_t *schedule)
const char * dxfg_Schedule_getTimeZone_getID (graal_isolatethread_t *thread, dxfg_schedule_t *schedule)
int32_t dxfg_Schedule_getDefinition (graal_isolatethread_t *thread, dxfg_schedule_t *schedule, DXFG_OUT char **definition)
dxfg_day_t * dxfg_Session_getDay (graal_isolatethread_t *thread, dxfg_session_t *session)
int32_t dxfg_Session_getType (graal_isolatethread_t *thread, dxfg_session_t *session)
int32_t dxfg_Session_isTrading (graal_isolatethread_t *thread, dxfg_session_t *session)
int32_t dxfg_Session_isEmpty (graal_isolatethread_t *thread, dxfg_session_t *session)
int64_t dxfg_Session_getStartTime (graal_isolatethread_t *thread, dxfg_session_t *session)
int64_t dxfg_Session_getEndTime (graal_isolatethread_t *thread, dxfg_session_t *session)
int32_t dxfg_Session_containsTime (graal_isolatethread_t *thread, dxfg_session_t *session, int64_t time)
dxfg_session_t * dxfg_Session_getPrevSession (graal_isolatethread_t *thread, dxfg_session_t *session, dxfg_session_filter_t *filter)
dxfg_session_t * dxfg_Session_getNextSession (graal_isolatethread_t *thread, dxfg_session_t *session, dxfg_session_filter_t *filter)
dxfg_session_t * dxfg_Session_findPrevSession (graal_isolatethread_t *thread, dxfg_session_t *session, dxfg_session_filter_t *filter)
dxfg_session_t * dxfg_Session_findNextSession (graal_isolatethread_t *thread, dxfg_session_t *session, dxfg_session_filter_t *filter)
int32_t dxfg_Session_hashCode (graal_isolatethread_t *thread, dxfg_session_t *session)
int32_t dxfg_Session_equals (graal_isolatethread_t *thread, dxfg_session_t *session, dxfg_session_t *otherSession)
const char * dxfg_Session_toString (graal_isolatethread_t *thread, dxfg_session_t *session)
dxfg_schedule_t * dxfg_Day_getSchedule (graal_isolatethread_t *thread, dxfg_day_t *day)
int32_t dxfg_Day_getDayId (graal_isolatethread_t *thread, dxfg_day_t *day)
int32_t dxfg_Day_getYearMonthDay (graal_isolatethread_t *thread, dxfg_day_t *day)
int32_t dxfg_Day_getYear (graal_isolatethread_t *thread, dxfg_day_t *day)
int32_t dxfg_Day_getMonthOfYear (graal_isolatethread_t *thread, dxfg_day_t *day)
int32_t dxfg_Day_getDayOfMonth (graal_isolatethread_t *thread, dxfg_day_t *day)
int32_t dxfg_Day_getDayOfWeek (graal_isolatethread_t *thread, dxfg_day_t *day)
int32_t dxfg_Day_isHoliday (graal_isolatethread_t *thread, dxfg_day_t *day)
int32_t dxfg_Day_isShortDay (graal_isolatethread_t *thread, dxfg_day_t *day)
int32_t dxfg_Day_isTrading (graal_isolatethread_t *thread, dxfg_day_t *day)
int64_t dxfg_Day_getStartTime (graal_isolatethread_t *thread, dxfg_day_t *day)
int64_t dxfg_Day_getEndTime (graal_isolatethread_t *thread, dxfg_day_t *day)
int32_t dxfg_Day_containsTime (graal_isolatethread_t *thread, dxfg_day_t *day, int64_t time)
int64_t dxfg_Day_getResetTime (graal_isolatethread_t *thread, dxfg_day_t *day)
dxfg_session_list * dxfg_Day_getSessions (graal_isolatethread_t *thread, dxfg_day_t *day)
dxfg_session_t * dxfg_Day_getSessionByTime (graal_isolatethread_t *thread, dxfg_day_t *day, int64_t time)
dxfg_session_t * dxfg_Day_getFirstSession (graal_isolatethread_t *thread, dxfg_day_t *day, dxfg_session_filter_t *filter)
dxfg_session_t * dxfg_Day_getLastSession (graal_isolatethread_t *thread, dxfg_day_t *day, dxfg_session_filter_t *filter)
dxfg_session_t * dxfg_Day_findFirstSession (graal_isolatethread_t *thread, dxfg_day_t *day, dxfg_session_filter_t *filter)
dxfg_session_t * dxfg_Day_findLastSession (graal_isolatethread_t *thread, dxfg_day_t *day, dxfg_session_filter_t *filter)
dxfg_day_t * dxfg_Day_getPrevDay (graal_isolatethread_t *thread, dxfg_day_t *day, dxfg_day_filter_t *filter)
dxfg_day_t * dxfg_Day_getNextDay (graal_isolatethread_t *thread, dxfg_day_t *day, dxfg_day_filter_t *filter)
dxfg_day_t * dxfg_Day_findPrevDay (graal_isolatethread_t *thread, dxfg_day_t *day, dxfg_day_filter_t *filter)
dxfg_day_t * dxfg_Day_findNextDay (graal_isolatethread_t *thread, dxfg_day_t *day, dxfg_day_filter_t *filter)
int32_t dxfg_Day_hashCode (graal_isolatethread_t *thread, dxfg_day_t *day)
int32_t dxfg_Day_equals (graal_isolatethread_t *thread, dxfg_day_t *day, dxfg_day_t *otherDay)
const char * dxfg_Day_toString (graal_isolatethread_t *thread, dxfg_day_t *day)
int32_t dxfg_Day_release (graal_isolatethread_t *thread, dxfg_day_t *day)
int32_t dxfg_Session_release (graal_isolatethread_t *thread, dxfg_session_t *session)
int32_t dxfg_SessionList_wrapper_release (graal_isolatethread_t *thread, dxfg_session_list *sessions)
int32_t dxfg_Schedule_getInstance4 (graal_isolatethread_t *thread, dxfg_instrument_profile2_t *instrumentProfile, DXFG_OUT dxfg_schedule_t **schedule)
int32_t dxfg_Schedule_getInstance5 (graal_isolatethread_t *thread, dxfg_instrument_profile2_t *instrumentProfile, const char *venue, DXFG_OUT dxfg_schedule_t **schedule)
int32_t dxfg_Schedule_getTradingVenues2 (graal_isolatethread_t *thread, dxfg_instrument_profile2_t *instrumentProfile, DXFG_OUT dxfg_string_list **venues)

Detailed Description

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 Documentation

◆ dxfg_day_filter_function

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.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day to test.
Returns
1 if the day is accepted; any other value rejects it.

◆ 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).

Javadoc

◆ dxfg_day_filter_t

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.

Javadoc

◆ dxfg_day_t

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.

Javadoc

◆ dxfg_schedule_t

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.

Javadoc

◆ dxfg_session_filter_function

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.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]sessionThe session to test.
Returns
1 if the session is accepted; any other value rejects it.

◆ dxfg_session_filter_prepare_t

◆ dxfg_session_filter_t

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.

Javadoc

◆ dxfg_session_list

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(), or release the list together with its sessions with dxfg_v4_session_list_release().

◆ dxfg_session_t

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).

Javadoc

◆ dxfg_session_type_t

The type of a trading session: what kind of trading activity is allowed in it, if any.

Javadoc

Enumeration Type Documentation

◆ 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).

Javadoc

Enumerator
DXFG_DAY_FILTER_ANY 

Accepts any day.

DXFG_DAY_FILTER_TRADING 

Accepts trading days only.

DXFG_DAY_FILTER_NON_TRADING 

Accepts non-trading days only.

DXFG_DAY_FILTER_HOLIDAY 

Accepts holidays only.

DXFG_DAY_FILTER_SHORT_DAY 

Accepts short days only.

DXFG_DAY_FILTER_MONDAY 

Accepts Mondays only.

DXFG_DAY_FILTER_TUESDAY 

Accepts Tuesdays only.

DXFG_DAY_FILTER_WEDNESDAY 

Accepts Wednesdays only.

DXFG_DAY_FILTER_THURSDAY 

Accepts Thursdays only.

DXFG_DAY_FILTER_FRIDAY 

Accepts Fridays only.

DXFG_DAY_FILTER_SATURDAY 

Accepts Saturdays only.

DXFG_DAY_FILTER_SUNDAY 

Accepts Sundays only.

DXFG_DAY_FILTER_WEEK_DAY 

Accepts week days only: Monday to Friday.

DXFG_DAY_FILTER_WEEK_END 

Accepts weekends only: Saturday and Sunday.

◆ dxfg_session_filter_prepare_t

The predefined session filters, see dxfg_SessionFilter_getInstance().

Javadoc

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.

◆ dxfg_session_type_t

The type of a trading session: what kind of trading activity is allowed in it, if any.

Javadoc

Enumerator
DXFG_SESSION_TYPE_NO_TRADING 

A non-trading session: a period of time during which trading is not allowed.

DXFG_SESSION_TYPE_PRE_MARKET 

A pre-market session: extended trading before the regular trading hours.

DXFG_SESSION_TYPE_REGULAR 

A regular session: the regular trading hours.

DXFG_SESSION_TYPE_AFTER_MARKET 

An after-market session: extended trading after the regular trading hours.

Function Documentation

◆ dxfg_Day_containsTime()

int32_t dxfg_Day_containsTime ( graal_isolatethread_t * thread,
dxfg_day_t * day,
int64_t time )

Checks whether a time belongs to a day.

Deprecated
Use dxfg_v4_Day_containsTime().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day.
[in]timeThe time to check, in UTC milliseconds.
Returns
1 if the time belongs to the day, 0 if not, or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_get_and_clear_thread_exception_t() to get the exception.

Java: Day.containsTime(long).

◆ dxfg_Day_equals()

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.

Deprecated
Use dxfg_v4_Day_equals().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day.
[in]otherDayThe day to compare with.
Returns
1 if the days are equal, 0 if not, or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_get_and_clear_thread_exception_t() to get the exception.

Java: Day.equals(Object).

◆ dxfg_Day_findFirstSession()

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.

Deprecated
Use dxfg_v4_Day_findFirstSession().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day.
[in]filterThe filter that tests the sessions.
Returns
The session (release it with dxfg_Session_release()), or NULL if no session is found or on error. Use dxfg_get_and_clear_thread_exception_t() to get the exception: it is NULL if no session is found.

Java: Day.findFirstSession(SessionFilter).

◆ dxfg_Day_findLastSession()

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.

Deprecated
Use dxfg_v4_Day_findLastSession().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day.
[in]filterThe filter that tests the sessions.
Returns
The session (release it with dxfg_Session_release()), or NULL if no session is found or on error. Use dxfg_get_and_clear_thread_exception_t() to get the exception: it is NULL if no session is found.

Java: Day.findLastSession(SessionFilter).

◆ dxfg_Day_findNextDay()

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.

Deprecated
Use dxfg_v4_Day_findNextDay().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day to start from.
[in]filterThe filter that tests the days.
Returns
The nearest following day accepted by the filter (release it with dxfg_Day_release()), or NULL if no day is found or on error. Use dxfg_get_and_clear_thread_exception_t() to get the exception: it is NULL if no day is found.

Java: Day.findNextDay(DayFilter).

◆ dxfg_Day_findPrevDay()

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.

Deprecated
Use dxfg_v4_Day_findPrevDay().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day to start from.
[in]filterThe filter that tests the days.
Returns
The nearest previous day accepted by the filter (release it with dxfg_Day_release()), or NULL if no day is found or on error. Use dxfg_get_and_clear_thread_exception_t() to get the exception: it is NULL if no day is found.

Java: Day.findPrevDay(DayFilter).

◆ dxfg_Day_getDayId()

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.

Deprecated
Use dxfg_v4_Day_getDayId().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day.
Returns
The day identifier, or -1 on error. -1 is also a valid identifier (1969-12-31), so use dxfg_get_and_clear_thread_exception_t() to find out whether an exception was thrown.

Java: Day.getDayId().

◆ dxfg_Day_getDayOfMonth()

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.

Deprecated
Use dxfg_v4_Day_getDayOfMonth().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day.
Returns
The day of the month, or -1 on error (it is not a valid value). Use dxfg_get_and_clear_thread_exception_t() to get the exception.

Java: Day.getDayOfMonth().

◆ dxfg_Day_getDayOfWeek()

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).

Deprecated
Use dxfg_v4_Day_getDayOfWeek().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day.
Returns
The day of the week, or -1 on error (it is not a valid value). Use dxfg_get_and_clear_thread_exception_t() to get the exception.

Java: Day.getDayOfWeek().

◆ dxfg_Day_getEndTime()

int64_t dxfg_Day_getEndTime ( graal_isolatethread_t * thread,
dxfg_day_t * day )

Returns the end time of a day (exclusive).

Deprecated
Use dxfg_v4_Day_getEndTime().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day.
Returns
The end time in UTC milliseconds, or -1 on error. -1 is also a valid time (1969-12-31T23:59:59.999Z), so use dxfg_get_and_clear_thread_exception_t() to find out whether an exception was thrown.

Java: Day.getEndTime().

◆ dxfg_Day_getFirstSession()

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().

Deprecated
Use dxfg_v4_Day_getFirstSession().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day.
[in]filterThe filter that tests the sessions.
Returns
The session (release it with dxfg_Session_release()), or NULL on error. Use dxfg_get_and_clear_thread_exception_t() to get the exception.

Java: Day.getFirstSession(SessionFilter).

◆ dxfg_Day_getLastSession()

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().

Deprecated
Use dxfg_v4_Day_getLastSession().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day.
[in]filterThe filter that tests the sessions.
Returns
The session (release it with dxfg_Session_release()), or NULL on error. Use dxfg_get_and_clear_thread_exception_t() to get the exception.

Java: Day.getLastSession(SessionFilter).

◆ dxfg_Day_getMonthOfYear()

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).

Deprecated
Use dxfg_v4_Day_getMonthOfYear().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day.
Returns
The month number, or -1 on error (it is not a valid month). Use dxfg_get_and_clear_thread_exception_t() to get the exception.

Java: Day.getMonthOfYear().

◆ dxfg_Day_getNextDay()

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().

Deprecated
Use dxfg_v4_Day_getNextDay().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day to start from.
[in]filterThe filter that tests the days.
Returns
The nearest following day accepted by the filter (release it with dxfg_Day_release()), or NULL on error. Use dxfg_get_and_clear_thread_exception_t() to get the exception.

Java: Day.getNextDay(DayFilter).

◆ dxfg_Day_getPrevDay()

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().

Deprecated
Use dxfg_v4_Day_getPrevDay().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day to start from.
[in]filterThe filter that tests the days.
Returns
The nearest previous day accepted by the filter (release it with dxfg_Day_release()), or NULL on error. Use dxfg_get_and_clear_thread_exception_t() to get the exception.

Java: Day.getPrevDay(DayFilter).

◆ dxfg_Day_getResetTime()

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.

Deprecated
Use dxfg_v4_Day_getResetTime().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day.
Returns
The reset time in UTC milliseconds, or -1 on error. -1 is also a valid time (1969-12-31T23:59:59.999Z), so use dxfg_get_and_clear_thread_exception_t() to find out whether an exception was thrown.

Java: Day.getResetTime().

◆ dxfg_Day_getSchedule()

dxfg_schedule_t * dxfg_Day_getSchedule ( graal_isolatethread_t * thread,
dxfg_day_t * day )

Returns the schedule to which a day belongs.

Deprecated
Use dxfg_v4_Day_getSchedule().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day.
Returns
The schedule (release it with dxfg_JavaObjectHandler_release()), or NULL on error. Use dxfg_get_and_clear_thread_exception_t() to get the exception.

Java: Day.getSchedule().

◆ dxfg_Day_getSessionByTime()

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.

Deprecated
Use dxfg_v4_Day_getSessionByTime().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day.
[in]timeThe time to search for, in UTC milliseconds.
Returns
The session (release it with dxfg_Session_release()), or NULL on error. Use dxfg_get_and_clear_thread_exception_t() to get the exception.

Java: Day.getSessionByTime(long).

◆ dxfg_Day_getSessions()

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.

Deprecated
Use dxfg_v4_Day_getSessions().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day.
Returns
The list of the sessions, or NULL on error. Release each session with dxfg_Session_release() and then the list with dxfg_SessionList_wrapper_release(). Use dxfg_get_and_clear_thread_exception_t() to get the exception.

Java: Day.getSessions().

◆ dxfg_Day_getStartTime()

int64_t dxfg_Day_getStartTime ( graal_isolatethread_t * thread,
dxfg_day_t * day )

Returns the start time of a day (inclusive).

Deprecated
Use dxfg_v4_Day_getStartTime().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day.
Returns
The start time in UTC milliseconds, or -1 on error. -1 is also a valid time (1969-12-31T23:59:59.999Z), so use dxfg_get_and_clear_thread_exception_t() to find out whether an exception was thrown.

Java: Day.getStartTime().

◆ dxfg_Day_getYear()

int32_t dxfg_Day_getYear ( graal_isolatethread_t * thread,
dxfg_day_t * day )

Returns the calendar year of a day, for example 1977.

Deprecated
Use dxfg_v4_Day_getYear().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day.
Returns
The year, or -1 on error (it is not a valid year). Use dxfg_get_and_clear_thread_exception_t() to get the exception.

Java: Day.getYear().

◆ dxfg_Day_getYearMonthDay()

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.

Deprecated
Use dxfg_v4_Day_getYearMonthDay().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day.
Returns
The packed year, month and day numbers, or -1 on error (it is not a valid value). Use dxfg_get_and_clear_thread_exception_t() to get the exception.

Java: Day.getYearMonthDay().

◆ dxfg_Day_hashCode()

int32_t dxfg_Day_hashCode ( graal_isolatethread_t * thread,
dxfg_day_t * day )

Returns the hash code of a day.

Deprecated
Use dxfg_v4_Day_hashCode().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day.
Returns
The hash code, or -1 on error. -1 can also be a valid hash code, so use dxfg_get_and_clear_thread_exception_t() to find out whether an exception was thrown.

Java: Day.hashCode().

◆ dxfg_Day_isHoliday()

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.

Deprecated
Use dxfg_v4_Day_isHoliday().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day.
Returns
1 if the day is a holiday, 0 if not, or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_get_and_clear_thread_exception_t() to get the exception.

Java: Day.isHoliday().

◆ dxfg_Day_isShortDay()

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.

Deprecated
Use dxfg_v4_Day_isShortDay().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day.
Returns
1 if the day is a short day, 0 if not, or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_get_and_clear_thread_exception_t() to get the exception.

Java: Day.isShortDay().

◆ dxfg_Day_isTrading()

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.

Deprecated
Use dxfg_v4_Day_isTrading().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day.
Returns
1 if trading activity is allowed within the day, 0 if not, or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_get_and_clear_thread_exception_t() to get the exception.

Java: Day.isTrading().

◆ dxfg_Day_release()

int32_t dxfg_Day_release ( graal_isolatethread_t * thread,
dxfg_day_t * day )

Releases a day handle.

Deprecated
Use dxfg_v4_Day_release().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day handle to release. Do not use it afterwards.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_get_and_clear_thread_exception_t() to determine if an exception was thrown.

◆ dxfg_Day_toString()

const char * dxfg_Day_toString ( graal_isolatethread_t * thread,
dxfg_day_t * day )

Returns the string representation of a day.

Deprecated
Use dxfg_v4_Day_toString().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day.
Returns
The string representation, a null-terminated UTF-8 string (release it with dxfg_String_release()), or NULL on error. Use dxfg_get_and_clear_thread_exception_t() to get the exception.

Java: Day.toString().

◆ dxfg_DayFilter_getInstance()

dxfg_day_filter_t * dxfg_DayFilter_getInstance ( graal_isolatethread_t * thread,
dxfg_day_filter_prepare_t filter )

Returns a predefined day filter.

Deprecated
Use dxfg_v4_DayFilter_getInstance().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]filterThe predefined filter to return.
Returns
The day filter (release it with dxfg_JavaObjectHandler_release()), or NULL on error. Use dxfg_get_and_clear_thread_exception_t() to get the exception.

Java: DayFilter.ANY, DayFilter.TRADING, DayFilter.NON_TRADING, DayFilter.HOLIDAY, DayFilter.SHORT_DAY, DayFilter.MONDAY ... DayFilter.SUNDAY, DayFilter.WEEK_DAY, DayFilter.WEEK_END.

◆ dxfg_DayFilter_new()

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.

Deprecated
Use dxfg_v4_DayFilter_new().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]filterThe function that tests a day: it returns 1 to accept the day.
Returns
The new day filter (release it with dxfg_JavaObjectHandler_release()), or NULL on error. Use dxfg_get_and_clear_thread_exception_t() to get the exception.

Java: new DayFilter(int, Boolean, Boolean, Boolean) with DayFilter.accept(Day) overridden to call filter.

◆ dxfg_Schedule_downloadDefaults()

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.

Deprecated
Use dxfg_v4_Schedule_downloadDefaults().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]downloadConfigThe 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).
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_get_and_clear_thread_exception_t() to determine if an exception was thrown.

Java: Schedule.downloadDefaults(String).

◆ dxfg_Schedule_findNearestSessionByTime()

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.

Deprecated
Use dxfg_v4_Schedule_findNearestSessionByTime().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]scheduleThe schedule.
[in]timeThe time to search for, in UTC milliseconds.
[in]filterThe filter that tests the sessions.
Returns
The session (release it with dxfg_Session_release()), or NULL if no session is found or on error. Use dxfg_get_and_clear_thread_exception_t() to get the exception: it is NULL if no session is found.

Java: Schedule.findNearestSessionByTime(long, SessionFilter).

◆ dxfg_Schedule_getDayById()

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.

Deprecated
Use dxfg_v4_Schedule_getDayById().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]scheduleThe schedule.
[in]dayIdThe 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().
Returns
The day (release it with dxfg_Day_release()), or NULL on error. Use dxfg_get_and_clear_thread_exception_t() to get the exception.

Java: Schedule.getDayById(int).

◆ dxfg_Schedule_getDayByTime()

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.

Deprecated
Use dxfg_v4_Schedule_getDayByTime().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]scheduleThe schedule.
[in]timeThe time to search for, in UTC milliseconds.
Returns
The day (release it with dxfg_Day_release()), or NULL on error. Use dxfg_get_and_clear_thread_exception_t() to get the exception.

Java: Schedule.getDayByTime(long).

◆ dxfg_Schedule_getDayByYearMonthDay()

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.

Deprecated
Use dxfg_v4_Schedule_getDayByYearMonthDay().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]scheduleThe schedule.
[in]yearMonthDayThe year, month and day numbers packed as year * 10000 + month * 100 + day; for example, 19770928 is September 28, 1977. See dxfg_Day_getYearMonthDay().
Returns
The day (release it with dxfg_Day_release()), or NULL on error. Use dxfg_get_and_clear_thread_exception_t() to get the exception.

Java: Schedule.getDayByYearMonthDay(int).

◆ dxfg_Schedule_getDefinition()

int32_t dxfg_Schedule_getDefinition ( graal_isolatethread_t * thread,
dxfg_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_Schedule_getInstance2(), or of the trading hours of the instrument profile, that defines this schedule.

Deprecated
Use dxfg_v4_Schedule_getDefinition().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]scheduleThe schedule.
[out]definitionThe definition, a null-terminated UTF-8 string (release it with dxfg_String_release()). It is written on success only.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error (also when definition is NULL). Use dxfg_get_and_clear_thread_exception_t() to determine if an exception was thrown.

Java: Schedule.getDefinition().

◆ dxfg_Schedule_getInstance()

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.

Deprecated
Use dxfg_v4_Schedule_getInstanceByProfileHandle().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]instrumentProfileThe instrument profile whose schedule is requested.
Returns
The schedule (release it with dxfg_JavaObjectHandler_release()), or NULL on error. Use dxfg_get_and_clear_thread_exception_t() to get the exception.

Java: Schedule.getInstance(InstrumentProfile).

◆ dxfg_Schedule_getInstance2()

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.

Deprecated
Use dxfg_v4_Schedule_getInstanceByDefinition().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]scheduleDefinitionThe schedule definition, a null-terminated UTF-8 string.
Returns
The schedule (release it with dxfg_JavaObjectHandler_release()), or NULL on error. Use dxfg_get_and_clear_thread_exception_t() to get the exception.

Java: Schedule.getInstance(String).

◆ dxfg_Schedule_getInstance3()

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.

Deprecated
Use dxfg_v4_Schedule_getInstanceByProfileHandleWithVenue().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]instrumentProfileThe instrument profile whose schedule is requested.
[in]venueThe trading venue, a null-terminated UTF-8 string.
Returns
The schedule (release it with dxfg_JavaObjectHandler_release()), or NULL on error. Use dxfg_get_and_clear_thread_exception_t() to get the exception.

Java: Schedule.getInstance(InstrumentProfile, String).

◆ dxfg_Schedule_getInstance4()

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.

Deprecated
Use dxfg_v4_Schedule_getInstance().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]instrumentProfileThe instrument profile.
[out]scheduleThe new schedule instance.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_get_and_clear_thread_exception_t() to determine if an exception was thrown. Use dxfg_JavaObjectHandler_release() to free the object handle.

Java: Schedule.getInstance(InstrumentProfile).

◆ dxfg_Schedule_getInstance5()

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.

Deprecated
Use dxfg_v4_Schedule_getInstanceWithVenue().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]instrumentProfileThe instrument profile.
[in]venueThe venue, a null-terminated UTF-8 string.
[out]scheduleThe new schedule instance.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_get_and_clear_thread_exception_t() to determine if an exception was thrown. Use dxfg_JavaObjectHandler_release() to free the object handle.

Java: Schedule.getInstance(InstrumentProfile, String).

◆ dxfg_Schedule_getName()

const char * dxfg_Schedule_getName ( graal_isolatethread_t * thread,
dxfg_schedule_t * schedule )

Returns the name of a schedule.

Deprecated
Use dxfg_v4_Schedule_getName().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]scheduleThe schedule.
Returns
The name, a null-terminated UTF-8 string (release it with dxfg_String_release()), or NULL on error. Use dxfg_get_and_clear_thread_exception_t() to get the exception.

Java: Schedule.getName().

◆ dxfg_Schedule_getNearestSessionByTime()

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().

Deprecated
Use dxfg_v4_Schedule_getNearestSessionByTime().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]scheduleThe schedule.
[in]timeThe time to search for, in UTC milliseconds.
[in]filterThe filter that tests the sessions.
Returns
The session (release it with dxfg_Session_release()), or NULL on error. Use dxfg_get_and_clear_thread_exception_t() to get the exception.

Java: Schedule.getNearestSessionByTime(long, SessionFilter).

◆ dxfg_Schedule_getSessionByTime()

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.

Deprecated
Use dxfg_v4_Schedule_getSessionByTime().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]scheduleThe schedule.
[in]timeThe time to search for, in UTC milliseconds.
Returns
The session (release it with dxfg_Session_release()), or NULL on error. Use dxfg_get_and_clear_thread_exception_t() to get the exception.

Java: Schedule.getSessionByTime(long).

◆ dxfg_Schedule_getTimeZone()

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().

Deprecated
Use dxfg_v4_Schedule_getTimeZone().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]scheduleThe schedule.
Returns
The display name, a null-terminated UTF-8 string (release it with dxfg_String_release()), or NULL on error. Use dxfg_get_and_clear_thread_exception_t() to get the exception.

Java: Schedule.getTimeZone(), TimeZone.getDisplayName().

◆ dxfg_Schedule_getTimeZone_getID()

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.

Deprecated
Use dxfg_v4_Schedule_getTimeZone_getID().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]scheduleThe schedule.
Returns
The time zone identifier, a null-terminated UTF-8 string (release it with dxfg_String_release()), or NULL on error. Use dxfg_get_and_clear_thread_exception_t() to get the exception.

Java: Schedule.getTimeZone(), TimeZone.getID().

◆ dxfg_Schedule_getTradingVenues()

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.

Deprecated
Use dxfg_v4_Schedule_getTradingVenuesByProfileHandle().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]instrumentProfileThe instrument profile whose venues are requested.
Returns
The list of the venue names (release it with dxfg_CList_String_release()), or NULL on error. Use dxfg_get_and_clear_thread_exception_t() to get the exception.

Java: Schedule.getTradingVenues(InstrumentProfile).

◆ dxfg_Schedule_getTradingVenues2()

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.

Deprecated
Use dxfg_v4_Schedule_getTradingVenues().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]instrumentProfileThe instrument profile.
[out]venuesReturned list of venues.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_get_and_clear_thread_exception_t() to determine if an exception was thrown. Use dxfg_CList_String_release() to free the result.

Java: Schedule.getTradingVenues(InstrumentProfile).

◆ dxfg_Schedule_setDefaults()

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.

Deprecated
Use dxfg_v4_Schedule_setDefaults().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dataThe content of the default data. Compressed data is detected by its header.
[in]sizeThe size of data in bytes.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_get_and_clear_thread_exception_t() to determine if an exception was thrown.

Java: Schedule.setDefaults(byte[]).

◆ dxfg_Session_containsTime()

int32_t dxfg_Session_containsTime ( graal_isolatethread_t * thread,
dxfg_session_t * session,
int64_t time )

Checks whether a time belongs to a session.

Deprecated
Use dxfg_v4_Session_containsTime().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]sessionThe session.
[in]timeThe time to check, in UTC milliseconds.
Returns
1 if the time belongs to the session, 0 if not, or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_get_and_clear_thread_exception_t() to get the exception.

Java: Session.containsTime(long).

◆ dxfg_Session_equals()

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.

Deprecated
Use dxfg_v4_Session_equals().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]sessionThe session.
[in]otherSessionThe session to compare with.
Returns
1 if the sessions are equal, 0 if not, or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_get_and_clear_thread_exception_t() to get the exception.

Java: Session.equals(Object).

◆ dxfg_Session_findNextSession()

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.

Deprecated
Use dxfg_v4_Session_findNextSession().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]sessionThe session to start from.
[in]filterThe filter that tests the sessions.
Returns
The nearest following session accepted by the filter (release it with dxfg_Session_release()), or NULL if no session is found or on error. Use dxfg_get_and_clear_thread_exception_t() to get the exception: it is NULL if no session is found.

Java: Session.findNextSession(SessionFilter).

◆ dxfg_Session_findPrevSession()

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.

Deprecated
Use dxfg_v4_Session_findPrevSession().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]sessionThe session to start from.
[in]filterThe filter that tests the sessions.
Returns
The nearest previous session accepted by the filter (release it with dxfg_Session_release()), or NULL if no session is found or on error. Use dxfg_get_and_clear_thread_exception_t() to get the exception: it is NULL if no session is found.

Java: Session.findPrevSession(SessionFilter).

◆ dxfg_Session_getDay()

dxfg_day_t * dxfg_Session_getDay ( graal_isolatethread_t * thread,
dxfg_session_t * session )

Returns the day to which a session belongs.

Deprecated
Use dxfg_v4_Session_getDay().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]sessionThe session.
Returns
The day (release it with dxfg_Day_release()), or NULL on error. Use dxfg_get_and_clear_thread_exception_t() to get the exception.

Java: Session.getDay().

◆ dxfg_Session_getEndTime()

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.

Deprecated
Use dxfg_v4_Session_getEndTime().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]sessionThe session.
Returns
The end time in UTC milliseconds, or -1 on error. -1 is also a valid time (1969-12-31T23:59:59.999Z), so use dxfg_get_and_clear_thread_exception_t() to find out whether an exception was thrown.

Java: Session.getEndTime().

◆ dxfg_Session_getNextSession()

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().

Deprecated
Use dxfg_v4_Session_getNextSession().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]sessionThe session to start from.
[in]filterThe filter that tests the sessions.
Returns
The nearest following session accepted by the filter (release it with dxfg_Session_release()), or NULL on error. Use dxfg_get_and_clear_thread_exception_t() to get the exception.

Java: Session.getNextSession(SessionFilter).

◆ dxfg_Session_getPrevSession()

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().

Deprecated
Use dxfg_v4_Session_getPrevSession().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]sessionThe session to start from.
[in]filterThe filter that tests the sessions.
Returns
The nearest previous session accepted by the filter (release it with dxfg_Session_release()), or NULL on error. Use dxfg_get_and_clear_thread_exception_t() to get the exception.

Java: Session.getPrevSession(SessionFilter).

◆ dxfg_Session_getStartTime()

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.

Deprecated
Use dxfg_v4_Session_getStartTime().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]sessionThe session.
Returns
The start time in UTC milliseconds, or -1 on error. -1 is also a valid time (1969-12-31T23:59:59.999Z), so use dxfg_get_and_clear_thread_exception_t() to find out whether an exception was thrown.

Java: Session.getStartTime().

◆ dxfg_Session_getType()

int32_t dxfg_Session_getType ( graal_isolatethread_t * thread,
dxfg_session_t * session )

Returns the type of a session.

Deprecated
Use dxfg_v4_Session_getType().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]sessionThe session.
Returns
The type of the session, a dxfg_session_type_t value, or -1 on error (it is not a valid session type). Use dxfg_get_and_clear_thread_exception_t() to get the exception.

Java: Session.getType().

◆ dxfg_Session_hashCode()

int32_t dxfg_Session_hashCode ( graal_isolatethread_t * thread,
dxfg_session_t * session )

Returns the hash code of a session.

Deprecated
Use dxfg_v4_Session_hashCode().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]sessionThe session.
Returns
The hash code, or -1 on error. -1 can also be a valid hash code, so use dxfg_get_and_clear_thread_exception_t() to find out whether an exception was thrown.

Java: Session.hashCode().

◆ dxfg_Session_isEmpty()

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.

Deprecated
Use dxfg_v4_Session_isEmpty().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]sessionThe session.
Returns
1 if the session has zero duration, 0 if not, or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_get_and_clear_thread_exception_t() to get the exception.

Java: Session.isEmpty().

◆ dxfg_Session_isTrading()

int32_t dxfg_Session_isTrading ( graal_isolatethread_t * thread,
dxfg_session_t * session )

Checks whether trading activity is allowed within a session.

Deprecated
Use dxfg_v4_Session_isTrading().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]sessionThe session.
Returns
1 if trading activity is allowed within the session, 0 if not, or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_get_and_clear_thread_exception_t() to get the exception.

Java: Session.isTrading().

◆ dxfg_Session_release()

int32_t dxfg_Session_release ( graal_isolatethread_t * thread,
dxfg_session_t * session )

Releases a session handle.

Deprecated
Use dxfg_v4_Session_release().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]sessionThe session handle to release. Do not use it afterwards.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_get_and_clear_thread_exception_t() to determine if an exception was thrown.

◆ dxfg_Session_toString()

const char * dxfg_Session_toString ( graal_isolatethread_t * thread,
dxfg_session_t * session )

Returns the string representation of a session.

Deprecated
Use dxfg_v4_Session_toString().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]sessionThe session.
Returns
The string representation, a null-terminated UTF-8 string (release it with dxfg_String_release()), or NULL on error. Use dxfg_get_and_clear_thread_exception_t() to get the exception.

Java: Session.toString().

◆ dxfg_SessionFilter_getInstance()

dxfg_session_filter_t * dxfg_SessionFilter_getInstance ( graal_isolatethread_t * thread,
dxfg_session_filter_prepare_t filter )

Returns a predefined session filter.

Deprecated
Use dxfg_v4_SessionFilter_getInstance().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]filterThe predefined filter to return.
Returns
The session filter (release it with dxfg_JavaObjectHandler_release()), or NULL on error. Use dxfg_get_and_clear_thread_exception_t() to get the exception.

Java: SessionFilter.ANY, SessionFilter.TRADING, SessionFilter.NON_TRADING, SessionFilter.NO_TRADING, SessionFilter.PRE_MARKET, SessionFilter.REGULAR, SessionFilter.AFTER_MARKET.

◆ dxfg_SessionFilter_new()

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.

Deprecated
Use dxfg_v4_SessionFilter_new().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]filterThe function that tests a session: it returns 1 to accept the session.
Returns
The new session filter (release it with dxfg_JavaObjectHandler_release()), or NULL on error. Use dxfg_get_and_clear_thread_exception_t() to get the exception.

Java: new SessionFilter(SessionType, Boolean) with SessionFilter.accept(Session) overridden to call filter.

◆ dxfg_SessionList_wrapper_release()

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.

Deprecated
Use dxfg_v4_session_list_wrapper_release().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]sessionsThe list to release; must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_get_and_clear_thread_exception_t() to determine if an exception was thrown.