dxFeed Graal Native SDK 3.16.0-rc1
Loading...
Searching...
No Matches
PriceLevelService' functions

The functions that create, query and close the client of the price level service. More...

Functions

int32_t dxfg_PriceLevelService_new (graal_isolatethread_t *thread, const char *address, DXFG_OUT dxfg_price_level_service_t **service)
 Creates a client of the price level service and connects it to an RMI endpoint.
int32_t dxfg_PriceLevelService_getOrders (graal_isolatethread_t *thread, dxfg_price_level_service_t *service, dxfg_symbol_t *candleSymbol, dxfg_indexed_event_source_t *orderSource, int64_t from, int64_t to, const char *caller, DXFG_OUT dxfg_event_type_list **orders)
 Returns the price levels (orders) of a candle symbol within a time range.
int32_t dxfg_PriceLevelService_getOrders2 (graal_isolatethread_t *thread, dxfg_price_level_service_t *service, dxfg_symbol_t *candleSymbol, dxfg_indexed_event_source_t *orderSource, int64_t from, int64_t to, DXFG_OUT dxfg_event_type_list **orders)
 Returns the price levels (orders) of a candle symbol within a time range for the default caller.
int32_t dxfg_PriceLevelService_getAuthOrderSource (graal_isolatethread_t *thread, dxfg_price_level_service_t *service, DXFG_OUT dxfg_auth_order_source_t **authOrderSource)
 Returns the order sources and the symbols of each order source that are available to the client.
int32_t dxfg_PriceLevelService_getQuotes (graal_isolatethread_t *thread, dxfg_price_level_service_t *service, dxfg_symbol_t *candleSymbol, int64_t from, int64_t to, const char *caller, DXFG_OUT dxfg_event_type_list **quotes)
 Returns the quotes of a candle symbol within a time range.
int32_t dxfg_PriceLevelService_getQuotes2 (graal_isolatethread_t *thread, dxfg_price_level_service_t *service, dxfg_symbol_t *candleSymbol, int64_t from, int64_t to, DXFG_OUT dxfg_event_type_list **quotes)
 Returns the quotes of a candle symbol within a time range for the default caller.
int32_t dxfg_PriceLevelService_close (graal_isolatethread_t *thread, dxfg_price_level_service_t *service)
 Closes the client of the price level service and its RMI endpoint.

Detailed Description

The functions that create, query and close the client of the price level service.

Function Documentation

◆ dxfg_PriceLevelService_close()

int32_t dxfg_PriceLevelService_close ( graal_isolatethread_t * thread,
dxfg_price_level_service_t * service )

Closes the client of the price level service and its RMI endpoint.

Do not use the client after the call; release its handle with dxfg_JavaObjectHandler_release().

Java: PriceLevelServiceHolder.close() (the SDK class that closes its RMIEndpoint).

Deprecated
Use dxfg_v4_PriceLevelService_close().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]serviceThe PriceLevelService.
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_PriceLevelService_getAuthOrderSource()

int32_t dxfg_PriceLevelService_getAuthOrderSource ( graal_isolatethread_t * thread,
dxfg_price_level_service_t * service,
DXFG_OUT dxfg_auth_order_source_t ** authOrderSource )

Returns the order sources and the symbols of each order source that are available to the client.

The order sources and the symbols are filtered according to the permissions of the client. The view is built as of now: the result contains only the existing data (for example, no symbols that were delisted). Read the result with dxfg_AuthOrderSource_getByIds() or dxfg_AuthOrderSource_getByOrderSources().

Java: PriceLevelService.getAuthOrderSource().

Deprecated
Use dxfg_v4_PriceLevelService_getAuthOrderSource().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]serviceThe PriceLevelService.
[out]authOrderSourceThe AuthOrderSource (release the handle with dxfg_JavaObjectHandler_release()).
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_PriceLevelService_getOrders()

int32_t dxfg_PriceLevelService_getOrders ( graal_isolatethread_t * thread,
dxfg_price_level_service_t * service,
dxfg_symbol_t * candleSymbol,
dxfg_indexed_event_source_t * orderSource,
int64_t from,
int64_t to,
const char * caller,
DXFG_OUT dxfg_event_type_list ** orders )

Returns the price levels (orders) of a candle symbol within a time range.

The orders are sorted in ascending order by time.

The candle symbol shall contain a supported CandlePeriod and a custom attribute called granularity with the key GRANULARITY_ATTRIBUTE_KEY ("gr"). The granularity value shall be an integer in seconds; the minimal value is 1 second. If the CandlePeriod or the granularity is not supported by the service, the result is an empty list.

Java: PriceLevelService.getOrders(CandleSymbol, int, long, long, String), the order source is passed by its id.

Deprecated
Use dxfg_v4_PriceLevelService_getOrdersWithCaller().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]serviceThe PriceLevelService.
[in]candleSymbolThe candle symbol to request: a dxfg_candle_symbol_t (type CANDLE); the call fails for another kind of symbol. The caller keeps its ownership.
[in]orderSourceThe order source to request: a dxfg_indexed_event_source_t of the type ORDER_SOURCE; the call fails for another kind of source. The caller keeps its ownership.
[in]fromThe "from" time in UTC (the unit is not stated by the Java documentation).
[in]toThe "to" time in UTC (the unit is not stated by the Java documentation).
[in]callerThe caller identifier: a UTF-8 null-terminated string that is passed to the service as is.
[out]ordersThe list of the order events (dxfg_event_type_list), possibly empty. Release it with dxfg_CList_EventType_release().
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_PriceLevelService_getOrders2()

int32_t dxfg_PriceLevelService_getOrders2 ( graal_isolatethread_t * thread,
dxfg_price_level_service_t * service,
dxfg_symbol_t * candleSymbol,
dxfg_indexed_event_source_t * orderSource,
int64_t from,
int64_t to,
DXFG_OUT dxfg_event_type_list ** orders )

Returns the price levels (orders) of a candle symbol within a time range for the default caller.

It is the same as dxfg_PriceLevelService_getOrders() with the caller identifier "dxfg": see that function for the requirements on the candle symbol and the granularity, and for the empty list.

Java: PriceLevelService.getOrders(CandleSymbol, int, long, long, String) with the caller "dxfg" (the SDK method PriceLevelServiceHolder.getOrders(CandleSymbol, OrderSource, long, long)).

Deprecated
Use dxfg_v4_PriceLevelService_getOrders().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]serviceThe PriceLevelService.
[in]candleSymbolThe candle symbol to request: a dxfg_candle_symbol_t (type CANDLE); the call fails for another kind of symbol. The caller keeps its ownership.
[in]orderSourceThe order source to request: a dxfg_indexed_event_source_t of the type ORDER_SOURCE; the call fails for another kind of source. The caller keeps its ownership.
[in]fromThe "from" time in UTC (the unit is not stated by the Java documentation).
[in]toThe "to" time in UTC (the unit is not stated by the Java documentation).
[out]ordersThe list of the order events (dxfg_event_type_list), possibly empty. Release it with dxfg_CList_EventType_release().
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_PriceLevelService_getQuotes()

int32_t dxfg_PriceLevelService_getQuotes ( graal_isolatethread_t * thread,
dxfg_price_level_service_t * service,
dxfg_symbol_t * candleSymbol,
int64_t from,
int64_t to,
const char * caller,
DXFG_OUT dxfg_event_type_list ** quotes )

Returns the quotes of a candle symbol within a time range.

The quotes are sorted in ascending order by time (see the Java documentation).

Java: PriceLevelService.getQuotes(CandleSymbol, long, long, String).

Deprecated
Use dxfg_v4_PriceLevelService_getQuotesWithCaller().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]serviceThe PriceLevelService.
[in]candleSymbolThe candle symbol to request: a dxfg_candle_symbol_t (type CANDLE); the call fails for another kind of symbol. The caller keeps its ownership.
[in]fromThe "from" time in UTC (the unit is not stated by the Java documentation).
[in]toThe "to" time in UTC (the unit is not stated by the Java documentation).
[in]callerThe caller identifier: a UTF-8 null-terminated string that is passed to the service as is.
[out]quotesThe list of the quote events (dxfg_event_type_list), possibly empty. Release it with dxfg_CList_EventType_release().
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_PriceLevelService_getQuotes2()

int32_t dxfg_PriceLevelService_getQuotes2 ( graal_isolatethread_t * thread,
dxfg_price_level_service_t * service,
dxfg_symbol_t * candleSymbol,
int64_t from,
int64_t to,
DXFG_OUT dxfg_event_type_list ** quotes )

Returns the quotes of a candle symbol within a time range for the default caller.

It is the same as dxfg_PriceLevelService_getQuotes() with the caller identifier "dxfg".

Java: PriceLevelService.getQuotes(CandleSymbol, long, long, String) with the caller "dxfg" (the SDK method PriceLevelServiceHolder.getQuotes(CandleSymbol, long, long)).

Deprecated
Use dxfg_v4_PriceLevelService_getQuotes().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]serviceThe PriceLevelService.
[in]candleSymbolThe candle symbol to request: a dxfg_candle_symbol_t (type CANDLE); the call fails for another kind of symbol. The caller keeps its ownership.
[in]fromThe "from" time in UTC (the unit is not stated by the Java documentation).
[in]toThe "to" time in UTC (the unit is not stated by the Java documentation).
[out]quotesThe list of the quote events (dxfg_event_type_list), possibly empty. Release it with dxfg_CList_EventType_release().
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_PriceLevelService_new()

int32_t dxfg_PriceLevelService_new ( graal_isolatethread_t * thread,
const char * address,
DXFG_OUT dxfg_price_level_service_t ** service )

Creates a client of the price level service and connects it to an RMI endpoint.

The client is an RMI client endpoint that is connected to the address; the service is its proxy. The handle of the client is written to service. Close the connection with dxfg_PriceLevelService_close().

Java: new PriceLevelServiceHolder(String) (the SDK class that wraps RMIEndpoint and PriceLevelService).

Deprecated
Use dxfg_v4_PriceLevelService_new().
Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]addressThe RMI endpoint's address: a UTF-8 null-terminated string; the caller keeps its ownership.
[out]serviceThe new client (release the handle with dxfg_JavaObjectHandler_release()).
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.