|
dxFeed Graal Native SDK 3.11.0
|
| int32_t dxfg_PriceIncrements_EMPTY | ( | graal_isolatethread_t * | thread, |
| DXFG_OUT dxfg_price_increments_t ** | emptyPriceIncrements ) |
Returns an empty price increments - it has empty text and sole increment with value 0. The handle of this instance will be written to the passed pointer.
Sample:
| [in] | thread | The current GraalVM Isolate's thread. |
| [out] | emptyPriceIncrements | The pointer to result's handle. |
| int32_t dxfg_PriceIncrements_getPriceIncrement | ( | graal_isolatethread_t * | thread, |
| dxfg_price_increments_t * | priceIncrements, | ||
| DXFG_OUT double * | priceIncrement ) |
Returns first price increment (for price range adjacent to 0), usually the smallest one. Returns 0 for EMPTY price increments.
Sample:
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | priceIncrements | The price increments handle. |
| [out] | priceIncrement | A pointer to the result. |
| int32_t dxfg_PriceIncrements_getPriceIncrement2 | ( | graal_isolatethread_t * | thread, |
| dxfg_price_increments_t * | priceIncrements, | ||
| double | price, | ||
| DXFG_OUT double * | priceIncrement ) |
Returns price increment which shall be applied to the specified price. If price is Not-a-Number (NaN) then first price increment is returned. If price is a breakpoint between two ranges then minimum of upward and downward increments is returned. This method is equivalent to calling dxfg_PriceIncrements_getPriceIncrement3(thread, price_increments, price, 0, &price_increment).
Sample:
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | priceIncrements | The price increments handle. |
| [in] | price | The price. |
| [out] | priceIncrement | A pointer to the result. |
| int32_t dxfg_PriceIncrements_getPriceIncrement3 | ( | graal_isolatethread_t * | thread, |
| dxfg_price_increments_t * | priceIncrements, | ||
| double | price, | ||
| int32_t | direction, | ||
| DXFG_OUT double * | priceIncrement ) |
Returns price increment which shall be applied to the specified price in the specified direction. If price is Not-a-Number (NaN) then first price increment is returned. If price is a breakpoint between two ranges and direction is 0 then minimum of upward and downward increments is returned.
Sample:
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | priceIncrements | The price increments handle. |
| [in] | price | The price. |
| [in] | direction | The direction. |
| [out] | priceIncrement | A pointer to the result. |
| int32_t dxfg_PriceIncrements_getPriceIncrements | ( | graal_isolatethread_t * | thread, |
| dxfg_price_increments_t * | priceIncrements, | ||
| DXFG_OUT double ** | increments, | ||
| DXFG_OUT int32_t * | size ) |
Returns internal representation of price increments as a single array of double values. This array specifies all numbers from textual representation (see dxfg_PriceIncrements_getText()) in the same order. Therefore numbers at even positions are increments and numbers at odd positions are upper limits. The array always has odd length - the infinite upper limit of last range is always omitted and the first increment (for price range adjacent to 0) is always included even for EMPTY value.
Sample:
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | priceIncrements | The price increments handle. |
| [out] | increments | A pointer to the result. |
| [out] | size | A pointer to the result size. |
| int32_t dxfg_PriceIncrements_getPricePrecision | ( | graal_isolatethread_t * | thread, |
| dxfg_price_increments_t * | priceIncrements, | ||
| DXFG_OUT int32_t * | pricePrecision ) |
Returns first price precision (for price range adjacent to 0), usually the largest one. Returns 0 for EMPTY price increments.
Sample:
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | priceIncrements | The price increments handle. |
| [out] | pricePrecision | A pointer to the result. |
| int32_t dxfg_PriceIncrements_getPricePrecision2 | ( | graal_isolatethread_t * | thread, |
| dxfg_price_increments_t * | priceIncrements, | ||
| double | price, | ||
| DXFG_OUT int32_t * | pricePrecision ) |
Returns price precision for the price range which contains specified price. Price precision is a number of decimal digits after decimal point that are needed to represent all valid prices in the given price range. This method returns price precision in the interval [0, 18] inclusive. If price is Not-a-Number (NaN) then first price precision is returned. If price is a breakpoint between two ranges then precision of lower range is returned.
Sample:
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | priceIncrements | The price increments handle. |
| [in] | price | The price. |
| [out] | pricePrecision | A pointer to the result. |
| int32_t dxfg_PriceIncrements_getText | ( | graal_isolatethread_t * | thread, |
| dxfg_price_increments_t * | priceIncrements, | ||
| DXFG_OUT char ** | text ) |
Returns textual representation of price increments in the format:
TEXT ::= "" | LIST LIST ::= INCREMENT | RANGE "; " LIST RANGE ::= INCREMENT " " UPPER_LIMIT
Where INCREMENT is a price increment in the given price range and UPPER_LIMIT is the upper bound of that range. All ranges are listed in the ascending order of upper limits and the last range is considered to extend toward infinity and is therefore specified without upper limit. All increments and limits are finite positive numbers. The case with empty text is a special stub used for EMPTY value, it uses sole increment with value 0.
Sample:
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | priceIncrements | The price increments handle. |
| [out] | text | A pointer to the textual representation of the price increments. |
| int32_t dxfg_PriceIncrements_incrementPrice | ( | graal_isolatethread_t * | thread, |
| dxfg_price_increments_t * | priceIncrements, | ||
| double | price, | ||
| int32_t | direction, | ||
| DXFG_OUT double * | incrementedPrice ) |
Returns specified price incremented in the specified direction by appropriate increment and then rounded to nearest valid value. If price is Not-a-Number (NaN) then NaN is returned. If appropriate price increment is 0 then specified price is returned as is. This method is equivalent to calling dxfg_PriceIncrements_incrementPrice2(thread, priceIncrements, price, direction, 0, &incrementedPrice).
Sample:
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | priceIncrements | The price increments handle. |
| [in] | price | The price. |
| [in] | direction | The direction. |
| [out] | incrementedPrice | A pointer to the result. |
| int32_t dxfg_PriceIncrements_incrementPrice2 | ( | graal_isolatethread_t * | thread, |
| dxfg_price_increments_t * | priceIncrements, | ||
| double | price, | ||
| int32_t | direction, | ||
| double | step, | ||
| DXFG_OUT double * | incrementedPrice ) |
Returns specified price incremented in the specified direction by the maximum of specified step and appropriate increment, and then rounded to nearest valid value. If price is Not-a-Number (NaN) then NaN is returned. If both step and appropriate price increment are 0 then specified price is returned as is. Note that step must be positive even for negative directions.
Sample:
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | priceIncrements | The price increments handle. |
| [in] | price | The price. |
| [in] | direction | The direction. |
| [in] | step | The step. |
| [out] | incrementedPrice | A pointer to the result. |
| int32_t dxfg_PriceIncrements_roundPrice | ( | graal_isolatethread_t * | thread, |
| dxfg_price_increments_t * | priceIncrements, | ||
| double | price, | ||
| DXFG_OUT double * | roundedPrice ) |
Returns specified price rounded to nearest valid value. If price is Not-a-Number (NaN) then NaN is returned. If appropriate price increment is 0 then specified price is returned as is. This method is equivalent to calling dxfg_PriceIncrements_roundPrice2(isolate_thread, price_increments, price, 0, &rounded_price).
Sample:
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | priceIncrements | The price increments handle. |
| [in] | price | The price. |
| [out] | roundedPrice | A pointer to the result. |
| int32_t dxfg_PriceIncrements_roundPrice2 | ( | graal_isolatethread_t * | thread, |
| dxfg_price_increments_t * | priceIncrements, | ||
| double | price, | ||
| int32_t | direction, | ||
| DXFG_OUT double * | roundedPrice ) |
Returns specified price rounded in the specified direction to nearest value that is valid according to price increment rules. If price is Not-a-Number (NaN) then NaN is returned. If appropriate price increment is 0 then specified price is returned as is. If direction is 0 then price is rounded to nearest valid value.
Sample:
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | priceIncrements | The price increments handle. |
| [in] | price | The price. |
| [in] | direction | The direction. |
| [out] | roundedPrice | A pointer to the result. |
| int32_t dxfg_PriceIncrements_roundPrice3 | ( | graal_isolatethread_t * | thread, |
| dxfg_price_increments_t * | priceIncrements, | ||
| double | price, | ||
| dxfg_rounding_mode_t | roundingMode, | ||
| DXFG_OUT double * | roundedPrice ) |
Returns specified price rounded according to specified rounding mode to nearest value that is valid according to price increment rules. If price is Not-a-Number (NaN) then NaN is returned. If appropriate price increment is 0 then specified price is returned as is.
Sample:
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | priceIncrements | The price increments handle. |
| [in] | price | The price. |
| [in] | roundingMode | The rounding mode. |
| [out] | roundedPrice | A pointer to the result. |
| int32_t dxfg_PriceIncrements_valueOf | ( | graal_isolatethread_t * | thread, |
| const char * | text, | ||
| DXFG_OUT dxfg_price_increments_t ** | priceIncrements ) |
Returns an instance of price increments for specified textual representation. The handle of this instance will be written to the passed pointer.
See dxfg_PriceIncrements_getText() for format specification.
Sample:
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | text | The textual representation. |
| [out] | priceIncrements | The pointer to result's handle (price increments for specified textual representation) |
| int32_t dxfg_PriceIncrements_valueOf2 | ( | graal_isolatethread_t * | thread, |
| double | increment, | ||
| DXFG_OUT dxfg_price_increments_t ** | priceIncrements ) |
Returns an instance of price increments for specified single increment.
Sample:
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | increment | The single increment. |
| [out] | priceIncrements | The pointer to result's handle. |
| int32_t dxfg_PriceIncrements_valueOf3 | ( | graal_isolatethread_t * | thread, |
| const double * | increments, | ||
| int32_t | size, | ||
| DXFG_OUT dxfg_price_increments_t ** | priceIncrements ) |
Returns an instance of price increments for specified internal representation. See dxfg_PriceIncrements_getPriceIncrements() for details about internal representation.
Sample:
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | increments | The array of increments in internal representation. |
| [in] | size | A size of the array. |
| [out] | priceIncrements | The pointer to result's handle. |