OpenPitParamLeverageLeverage multiplier for FFI payloads.
Uses fixed-point scale 10 in integer units:
10 means 1.0x11 means 1.1x1005 means 100.5xValid range: 10..=30000.
A value of OPENPIT_PARAM_LEVERAGE_NOT_SET (0) means leverage is not
specified.
typedef uint16_t OpenPitParamLeverage;
OPENPIT_PARAM_LEVERAGE_NOT_SETSentinel value indicating leverage is not set.
#define OPENPIT_PARAM_LEVERAGE_NOT_SET ((OpenPitParamLeverage) 0)
OPENPIT_PARAM_LEVERAGE_SCALEFixed-point scale used by leverage payloads.
#define OPENPIT_PARAM_LEVERAGE_SCALE ((OpenPitParamLeverage) 10)
OPENPIT_PARAM_LEVERAGE_MINMinimum leverage in whole units.
#define OPENPIT_PARAM_LEVERAGE_MIN ((OpenPitParamLeverage) 1)
OPENPIT_PARAM_LEVERAGE_MAXMaximum leverage in whole units.
#define OPENPIT_PARAM_LEVERAGE_MAX ((OpenPitParamLeverage) 3000)
OPENPIT_PARAM_LEVERAGE_STEPSupported leverage increment step.
#define OPENPIT_PARAM_LEVERAGE_STEP ((float) 0.1)
OpenPitParamAccountIdStable account identifier type for FFI payloads.
WARNING: Use exactly one account-id source model per runtime:
openpit_create_param_account_id_from_u64),openpit_create_param_account_id_from_str).Do not mix both models in the same runtime state. A hashed string value can coincide with a direct numeric ID, and then two distinct accounts become one logical key in maps and engine state.
typedef uint64_t OpenPitParamAccountId;
OpenPitParamSideOrder side.
typedef uint8_t OpenPitParamSide;
/**
* Value is absent.
*/
#define OpenPitParamSide_NotSet ((OpenPitParamSide) 0)
/**
* Buy side.
*/
#define OpenPitParamSide_Buy ((OpenPitParamSide) 1)
/**
* Sell side.
*/
#define OpenPitParamSide_Sell ((OpenPitParamSide) 2)
OpenPitParamPositionSidePosition direction.
typedef uint8_t OpenPitParamPositionSide;
/**
* Value is absent.
*/
#define OpenPitParamPositionSide_NotSet ((OpenPitParamPositionSide) 0)
/**
* Long exposure.
*/
#define OpenPitParamPositionSide_Long ((OpenPitParamPositionSide) 1)
/**
* Short exposure.
*/
#define OpenPitParamPositionSide_Short ((OpenPitParamPositionSide) 2)
OpenPitParamPositionModePosition accounting mode.
typedef uint8_t OpenPitParamPositionMode;
/**
* Value is absent.
*/
#define OpenPitParamPositionMode_NotSet ((OpenPitParamPositionMode) 0)
/**
* Opposite trades net into one position.
*/
#define OpenPitParamPositionMode_Netting ((OpenPitParamPositionMode) 1)
/**
* Long and short positions are tracked separately.
*/
#define OpenPitParamPositionMode_Hedged ((OpenPitParamPositionMode) 2)
OpenPitParamPositionEffectWhether a trade opens or closes exposure.
typedef uint8_t OpenPitParamPositionEffect;
/**
* Value is absent.
*/
#define OpenPitParamPositionEffect_NotSet ((OpenPitParamPositionEffect) 0)
/**
* The trade opens or increases exposure.
*/
#define OpenPitParamPositionEffect_Open ((OpenPitParamPositionEffect) 1)
/**
* The trade closes or reduces exposure.
*/
#define OpenPitParamPositionEffect_Close ((OpenPitParamPositionEffect) 2)
OpenPitParamTradeAmountKindSelects how one trade-amount numeric value should be interpreted.
typedef uint8_t OpenPitParamTradeAmountKind;
/**
* No amount field is selected.
*/
#define OpenPitParamTradeAmountKind_NotSet ((OpenPitParamTradeAmountKind) 0)
/**
* The value is instrument quantity.
*/
#define OpenPitParamTradeAmountKind_Quantity ((OpenPitParamTradeAmountKind) 1)
/**
* The value is settlement volume.
*/
#define OpenPitParamTradeAmountKind_Volume ((OpenPitParamTradeAmountKind) 2)
OpenPitParamRoundingStrategyDecimal rounding strategy for typed parameter constructors.
typedef uint8_t OpenPitParamRoundingStrategy;
/**
* Round half to nearest even number.
*/
#define OpenPitParamRoundingStrategy_MidpointNearestEven \
((OpenPitParamRoundingStrategy) 0)
/**
* Round half away from zero.
*/
#define OpenPitParamRoundingStrategy_MidpointAwayFromZero \
((OpenPitParamRoundingStrategy) 1)
/**
* Round towards positive infinity.
*/
#define OpenPitParamRoundingStrategy_Up ((OpenPitParamRoundingStrategy) 2)
/**
* Round towards negative infinity.
*/
#define OpenPitParamRoundingStrategy_Down ((OpenPitParamRoundingStrategy) 3)
OPENPIT_PARAM_ROUNDING_STRATEGY_DEFAULTDefault rounding strategy alias.
#define OPENPIT_PARAM_ROUNDING_STRATEGY_DEFAULT \
((OpenPitParamRoundingStrategy) OpenPitParamRoundingStrategy_MidpointNearestEven)
OPENPIT_PARAM_ROUNDING_STRATEGY_BANKERBanker’s rounding alias.
#define OPENPIT_PARAM_ROUNDING_STRATEGY_BANKER \
((OpenPitParamRoundingStrategy) OpenPitParamRoundingStrategy_MidpointNearestEven)
OPENPIT_PARAM_ROUNDING_STRATEGY_CONSERVATIVE_PROFITConservative profit rounding alias.
#define OPENPIT_PARAM_ROUNDING_STRATEGY_CONSERVATIVE_PROFIT \
((OpenPitParamRoundingStrategy) OpenPitParamRoundingStrategy_Down)
OPENPIT_PARAM_ROUNDING_STRATEGY_CONSERVATIVE_LOSSConservative loss rounding alias.
#define OPENPIT_PARAM_ROUNDING_STRATEGY_CONSERVATIVE_LOSS \
((OpenPitParamRoundingStrategy) OpenPitParamRoundingStrategy_Down)
OpenPitParamTradeAmountOne trade-amount value plus its interpretation mode.
The numeric value is interpreted according to kind:
Quantity means instrument quantity;Volume means settlement notional volume.typedef struct OpenPitParamTradeAmount {
OpenPitParamDecimal value;
OpenPitParamTradeAmountKind kind;
} OpenPitParamTradeAmount;
OpenPitTriBoolTri-state boolean value.
typedef uint8_t OpenPitTriBool;
/**
* Value is absent.
*/
#define OpenPitTriBool_NotSet ((OpenPitTriBool) 0)
/**
* Boolean false.
*/
#define OpenPitTriBool_False ((OpenPitTriBool) 1)
/**
* Boolean true.
*/
#define OpenPitTriBool_True ((OpenPitTriBool) 2)
OpenPitParamAdjustmentAmountKindSelects how an account-adjustment amount should be interpreted.
typedef uint8_t OpenPitParamAdjustmentAmountKind;
/**
* No amount is specified.
*/
#define OpenPitParamAdjustmentAmountKind_NotSet \
((OpenPitParamAdjustmentAmountKind) 0)
/**
* Change current state by the supplied signed amount.
*/
#define OpenPitParamAdjustmentAmountKind_Delta \
((OpenPitParamAdjustmentAmountKind) 1)
/**
* Set current state to the supplied signed amount.
*/
#define OpenPitParamAdjustmentAmountKind_Absolute \
((OpenPitParamAdjustmentAmountKind) 2)
OpenPitParamDecimalDecimal value represented as mantissa * 10^-scale.
typedef struct OpenPitParamDecimal {
int64_t mantissa_lo;
int64_t mantissa_hi;
int32_t scale;
} OpenPitParamDecimal;
OpenPitParamPnlValidated Pnl value wrapper.
typedef struct OpenPitParamPnl {
OpenPitParamDecimal _0;
} OpenPitParamPnl;
openpit_create_param_pnlValidates a decimal and returns a Pnl wrapper.
Meaning: Profit and loss value; positive means profit, negative means loss.
Success:
true and writes a validated wrapper to out.Error:
false when out is null or when the decimal does not satisfy the
rules of this type;out_error for the message.bool openpit_create_param_pnl(
OpenPitParamDecimal value,
OpenPitParamPnl * out,
OpenPitOutParamError out_error
);
openpit_param_pnl_get_decimalReturns the decimal stored in Pnl.
OpenPitParamDecimal openpit_param_pnl_get_decimal(
OpenPitParamPnl value
);
OpenPitParamPriceValidated Price value wrapper.
typedef struct OpenPitParamPrice {
OpenPitParamDecimal _0;
} OpenPitParamPrice;
openpit_create_param_priceValidates a decimal and returns a Price wrapper.
Meaning: Price per one instrument unit; may be negative in some derivative markets.
Success:
true and writes a validated wrapper to out.Error:
false when out is null or when the decimal does not satisfy the
rules of this type;out_error for the message.bool openpit_create_param_price(
OpenPitParamDecimal value,
OpenPitParamPrice * out,
OpenPitOutParamError out_error
);
openpit_param_price_get_decimalReturns the decimal stored in Price.
OpenPitParamDecimal openpit_param_price_get_decimal(
OpenPitParamPrice value
);
OpenPitParamQuantityValidated Quantity value wrapper.
typedef struct OpenPitParamQuantity {
OpenPitParamDecimal _0;
} OpenPitParamQuantity;
openpit_create_param_quantityValidates a decimal and returns a Quantity wrapper.
Meaning: Instrument quantity; non-negative amount in instrument units.
Success:
true and writes a validated wrapper to out.Error:
false when out is null or when the decimal does not satisfy the
rules of this type;out_error for the message.bool openpit_create_param_quantity(
OpenPitParamDecimal value,
OpenPitParamQuantity * out,
OpenPitOutParamError out_error
);
openpit_param_quantity_get_decimalReturns the decimal stored in Quantity.
OpenPitParamDecimal openpit_param_quantity_get_decimal(
OpenPitParamQuantity value
);
OpenPitParamVolumeValidated Volume value wrapper.
typedef struct OpenPitParamVolume {
OpenPitParamDecimal _0;
} OpenPitParamVolume;
openpit_create_param_volumeValidates a decimal and returns a Volume wrapper.
Meaning: Settlement notional volume; non-negative amount in settlement units.
Success:
true and writes a validated wrapper to out.Error:
false when out is null or when the decimal does not satisfy the
rules of this type;out_error for the message.bool openpit_create_param_volume(
OpenPitParamDecimal value,
OpenPitParamVolume * out,
OpenPitOutParamError out_error
);
openpit_param_volume_get_decimalReturns the decimal stored in Volume.
OpenPitParamDecimal openpit_param_volume_get_decimal(
OpenPitParamVolume value
);
OpenPitParamCashFlowValidated CashFlow value wrapper.
typedef struct OpenPitParamCashFlow {
OpenPitParamDecimal _0;
} OpenPitParamCashFlow;
openpit_create_param_cash_flowValidates a decimal and returns a CashFlow wrapper.
Meaning: Cash flow contribution; positive is inflow, negative is outflow.
Success:
true and writes a validated wrapper to out.Error:
false when out is null or when the decimal does not satisfy the
rules of this type;out_error for the message.bool openpit_create_param_cash_flow(
OpenPitParamDecimal value,
OpenPitParamCashFlow * out,
OpenPitOutParamError out_error
);
openpit_param_cash_flow_get_decimalReturns the decimal stored in CashFlow.
OpenPitParamDecimal openpit_param_cash_flow_get_decimal(
OpenPitParamCashFlow value
);
OpenPitParamPositionSizeValidated PositionSize value wrapper.
typedef struct OpenPitParamPositionSize {
OpenPitParamDecimal _0;
} OpenPitParamPositionSize;
openpit_create_param_position_sizeValidates a decimal and returns a PositionSize wrapper.
Meaning: Signed position size; long is positive, short is negative.
Success:
true and writes a validated wrapper to out.Error:
false when out is null or when the decimal does not satisfy the
rules of this type;out_error for the message.bool openpit_create_param_position_size(
OpenPitParamDecimal value,
OpenPitParamPositionSize * out,
OpenPitOutParamError out_error
);
openpit_param_position_size_get_decimalReturns the decimal stored in PositionSize.
OpenPitParamDecimal openpit_param_position_size_get_decimal(
OpenPitParamPositionSize value
);
OpenPitParamFeeValidated Fee value wrapper.
typedef struct OpenPitParamFee {
OpenPitParamDecimal _0;
} OpenPitParamFee;
openpit_create_param_feeValidates a decimal and returns a Fee wrapper.
Meaning: Fee amount; can be negative for rebates or reconciliation adjustments.
Success:
true and writes a validated wrapper to out.Error:
false when out is null or when the decimal does not satisfy the
rules of this type;out_error for the message.bool openpit_create_param_fee(
OpenPitParamDecimal value,
OpenPitParamFee * out,
OpenPitOutParamError out_error
);
openpit_param_fee_get_decimalReturns the decimal stored in Fee.
OpenPitParamDecimal openpit_param_fee_get_decimal(
OpenPitParamFee value
);
OpenPitParamNotionalValidated Notional value wrapper.
typedef struct OpenPitParamNotional {
OpenPitParamDecimal _0;
} OpenPitParamNotional;
openpit_create_param_notionalValidates a decimal and returns a Notional wrapper.
Meaning: Monetary position exposure for margin and risk calculation; always non-negative.
Success:
true and writes a validated wrapper to out.Error:
false when out is null or when the decimal does not satisfy the
rules of this type;out_error for the message.bool openpit_create_param_notional(
OpenPitParamDecimal value,
OpenPitParamNotional * out,
OpenPitOutParamError out_error
);
openpit_param_notional_get_decimalReturns the decimal stored in Notional.
OpenPitParamDecimal openpit_param_notional_get_decimal(
OpenPitParamNotional value
);
openpit_create_param_pnl_from_strbool openpit_create_param_pnl_from_str(
OpenPitStringView value,
OpenPitParamPnl * out,
OpenPitOutParamError out_error
);
openpit_create_param_pnl_from_f64bool openpit_create_param_pnl_from_f64(
double value,
OpenPitParamPnl * out,
OpenPitOutParamError out_error
);
openpit_create_param_pnl_from_i64bool openpit_create_param_pnl_from_i64(
int64_t value,
OpenPitParamPnl * out,
OpenPitOutParamError out_error
);
openpit_create_param_pnl_from_u64bool openpit_create_param_pnl_from_u64(
uint64_t value,
OpenPitParamPnl * out,
OpenPitOutParamError out_error
);
openpit_create_param_pnl_from_str_roundedbool openpit_create_param_pnl_from_str_rounded(
OpenPitStringView value,
uint32_t scale,
OpenPitParamRoundingStrategy rounding,
OpenPitParamPnl * out,
OpenPitOutParamError out_error
);
openpit_create_param_pnl_from_f64_roundedbool openpit_create_param_pnl_from_f64_rounded(
double value,
uint32_t scale,
OpenPitParamRoundingStrategy rounding,
OpenPitParamPnl * out,
OpenPitOutParamError out_error
);
openpit_create_param_pnl_from_decimal_roundedbool openpit_create_param_pnl_from_decimal_rounded(
OpenPitParamDecimal value,
uint32_t scale,
OpenPitParamRoundingStrategy rounding,
OpenPitParamPnl * out,
OpenPitOutParamError out_error
);
openpit_param_pnl_to_f64bool openpit_param_pnl_to_f64(
OpenPitParamPnl value,
double * out,
OpenPitOutParamError out_error
);
openpit_param_pnl_is_zerobool openpit_param_pnl_is_zero(
OpenPitParamPnl value,
bool * out,
OpenPitOutParamError out_error
);
openpit_param_pnl_comparebool openpit_param_pnl_compare(
OpenPitParamPnl lhs,
OpenPitParamPnl rhs,
int8_t * out,
OpenPitOutParamError out_error
);
openpit_param_pnl_to_stringOpenPitSharedString * openpit_param_pnl_to_string(
OpenPitParamPnl value,
OpenPitOutParamError out_error
);
openpit_param_pnl_checked_addbool openpit_param_pnl_checked_add(
OpenPitParamPnl lhs,
OpenPitParamPnl rhs,
OpenPitParamPnl * out,
OpenPitOutParamError out_error
);
openpit_param_pnl_checked_subbool openpit_param_pnl_checked_sub(
OpenPitParamPnl lhs,
OpenPitParamPnl rhs,
OpenPitParamPnl * out,
OpenPitOutParamError out_error
);
openpit_param_pnl_checked_mul_i64bool openpit_param_pnl_checked_mul_i64(
OpenPitParamPnl value,
int64_t multiplier,
OpenPitParamPnl * out,
OpenPitOutParamError out_error
);
openpit_param_pnl_checked_mul_u64bool openpit_param_pnl_checked_mul_u64(
OpenPitParamPnl value,
uint64_t multiplier,
OpenPitParamPnl * out,
OpenPitOutParamError out_error
);
openpit_param_pnl_checked_mul_f64bool openpit_param_pnl_checked_mul_f64(
OpenPitParamPnl value,
double multiplier,
OpenPitParamPnl * out,
OpenPitOutParamError out_error
);
openpit_param_pnl_checked_div_i64bool openpit_param_pnl_checked_div_i64(
OpenPitParamPnl value,
int64_t divisor,
OpenPitParamPnl * out,
OpenPitOutParamError out_error
);
openpit_param_pnl_checked_div_u64bool openpit_param_pnl_checked_div_u64(
OpenPitParamPnl value,
uint64_t divisor,
OpenPitParamPnl * out,
OpenPitOutParamError out_error
);
openpit_param_pnl_checked_div_f64bool openpit_param_pnl_checked_div_f64(
OpenPitParamPnl value,
double divisor,
OpenPitParamPnl * out,
OpenPitOutParamError out_error
);
openpit_param_pnl_checked_rem_i64bool openpit_param_pnl_checked_rem_i64(
OpenPitParamPnl value,
int64_t divisor,
OpenPitParamPnl * out,
OpenPitOutParamError out_error
);
openpit_param_pnl_checked_rem_u64bool openpit_param_pnl_checked_rem_u64(
OpenPitParamPnl value,
uint64_t divisor,
OpenPitParamPnl * out,
OpenPitOutParamError out_error
);
openpit_param_pnl_checked_rem_f64bool openpit_param_pnl_checked_rem_f64(
OpenPitParamPnl value,
double divisor,
OpenPitParamPnl * out,
OpenPitOutParamError out_error
);
openpit_param_pnl_checked_negbool openpit_param_pnl_checked_neg(
OpenPitParamPnl value,
OpenPitParamPnl * out,
OpenPitOutParamError out_error
);
openpit_create_param_price_from_strbool openpit_create_param_price_from_str(
OpenPitStringView value,
OpenPitParamPrice * out,
OpenPitOutParamError out_error
);
openpit_create_param_price_from_f64bool openpit_create_param_price_from_f64(
double value,
OpenPitParamPrice * out,
OpenPitOutParamError out_error
);
openpit_create_param_price_from_i64bool openpit_create_param_price_from_i64(
int64_t value,
OpenPitParamPrice * out,
OpenPitOutParamError out_error
);
openpit_create_param_price_from_u64bool openpit_create_param_price_from_u64(
uint64_t value,
OpenPitParamPrice * out,
OpenPitOutParamError out_error
);
openpit_create_param_price_from_str_roundedbool openpit_create_param_price_from_str_rounded(
OpenPitStringView value,
uint32_t scale,
OpenPitParamRoundingStrategy rounding,
OpenPitParamPrice * out,
OpenPitOutParamError out_error
);
openpit_create_param_price_from_f64_roundedbool openpit_create_param_price_from_f64_rounded(
double value,
uint32_t scale,
OpenPitParamRoundingStrategy rounding,
OpenPitParamPrice * out,
OpenPitOutParamError out_error
);
openpit_create_param_price_from_decimal_roundedbool openpit_create_param_price_from_decimal_rounded(
OpenPitParamDecimal value,
uint32_t scale,
OpenPitParamRoundingStrategy rounding,
OpenPitParamPrice * out,
OpenPitOutParamError out_error
);
openpit_param_price_to_f64bool openpit_param_price_to_f64(
OpenPitParamPrice value,
double * out,
OpenPitOutParamError out_error
);
openpit_param_price_is_zerobool openpit_param_price_is_zero(
OpenPitParamPrice value,
bool * out,
OpenPitOutParamError out_error
);
openpit_param_price_comparebool openpit_param_price_compare(
OpenPitParamPrice lhs,
OpenPitParamPrice rhs,
int8_t * out,
OpenPitOutParamError out_error
);
openpit_param_price_to_stringOpenPitSharedString * openpit_param_price_to_string(
OpenPitParamPrice value,
OpenPitOutParamError out_error
);
openpit_param_price_checked_addbool openpit_param_price_checked_add(
OpenPitParamPrice lhs,
OpenPitParamPrice rhs,
OpenPitParamPrice * out,
OpenPitOutParamError out_error
);
openpit_param_price_checked_subbool openpit_param_price_checked_sub(
OpenPitParamPrice lhs,
OpenPitParamPrice rhs,
OpenPitParamPrice * out,
OpenPitOutParamError out_error
);
openpit_param_price_checked_mul_i64bool openpit_param_price_checked_mul_i64(
OpenPitParamPrice value,
int64_t multiplier,
OpenPitParamPrice * out,
OpenPitOutParamError out_error
);
openpit_param_price_checked_mul_u64bool openpit_param_price_checked_mul_u64(
OpenPitParamPrice value,
uint64_t multiplier,
OpenPitParamPrice * out,
OpenPitOutParamError out_error
);
openpit_param_price_checked_mul_f64bool openpit_param_price_checked_mul_f64(
OpenPitParamPrice value,
double multiplier,
OpenPitParamPrice * out,
OpenPitOutParamError out_error
);
openpit_param_price_checked_div_i64bool openpit_param_price_checked_div_i64(
OpenPitParamPrice value,
int64_t divisor,
OpenPitParamPrice * out,
OpenPitOutParamError out_error
);
openpit_param_price_checked_div_u64bool openpit_param_price_checked_div_u64(
OpenPitParamPrice value,
uint64_t divisor,
OpenPitParamPrice * out,
OpenPitOutParamError out_error
);
openpit_param_price_checked_div_f64bool openpit_param_price_checked_div_f64(
OpenPitParamPrice value,
double divisor,
OpenPitParamPrice * out,
OpenPitOutParamError out_error
);
openpit_param_price_checked_rem_i64bool openpit_param_price_checked_rem_i64(
OpenPitParamPrice value,
int64_t divisor,
OpenPitParamPrice * out,
OpenPitOutParamError out_error
);
openpit_param_price_checked_rem_u64bool openpit_param_price_checked_rem_u64(
OpenPitParamPrice value,
uint64_t divisor,
OpenPitParamPrice * out,
OpenPitOutParamError out_error
);
openpit_param_price_checked_rem_f64bool openpit_param_price_checked_rem_f64(
OpenPitParamPrice value,
double divisor,
OpenPitParamPrice * out,
OpenPitOutParamError out_error
);
openpit_param_price_checked_negbool openpit_param_price_checked_neg(
OpenPitParamPrice value,
OpenPitParamPrice * out,
OpenPitOutParamError out_error
);
openpit_create_param_quantity_from_strbool openpit_create_param_quantity_from_str(
OpenPitStringView value,
OpenPitParamQuantity * out,
OpenPitOutParamError out_error
);
openpit_create_param_quantity_from_f64bool openpit_create_param_quantity_from_f64(
double value,
OpenPitParamQuantity * out,
OpenPitOutParamError out_error
);
openpit_create_param_quantity_from_i64bool openpit_create_param_quantity_from_i64(
int64_t value,
OpenPitParamQuantity * out,
OpenPitOutParamError out_error
);
openpit_create_param_quantity_from_u64bool openpit_create_param_quantity_from_u64(
uint64_t value,
OpenPitParamQuantity * out,
OpenPitOutParamError out_error
);
openpit_create_param_quantity_from_str_roundedbool openpit_create_param_quantity_from_str_rounded(
OpenPitStringView value,
uint32_t scale,
OpenPitParamRoundingStrategy rounding,
OpenPitParamQuantity * out,
OpenPitOutParamError out_error
);
openpit_create_param_quantity_from_f64_roundedbool openpit_create_param_quantity_from_f64_rounded(
double value,
uint32_t scale,
OpenPitParamRoundingStrategy rounding,
OpenPitParamQuantity * out,
OpenPitOutParamError out_error
);
openpit_create_param_quantity_from_decimal_roundedbool openpit_create_param_quantity_from_decimal_rounded(
OpenPitParamDecimal value,
uint32_t scale,
OpenPitParamRoundingStrategy rounding,
OpenPitParamQuantity * out,
OpenPitOutParamError out_error
);
openpit_param_quantity_to_f64bool openpit_param_quantity_to_f64(
OpenPitParamQuantity value,
double * out,
OpenPitOutParamError out_error
);
openpit_param_quantity_is_zerobool openpit_param_quantity_is_zero(
OpenPitParamQuantity value,
bool * out,
OpenPitOutParamError out_error
);
openpit_param_quantity_comparebool openpit_param_quantity_compare(
OpenPitParamQuantity lhs,
OpenPitParamQuantity rhs,
int8_t * out,
OpenPitOutParamError out_error
);
openpit_param_quantity_to_stringOpenPitSharedString * openpit_param_quantity_to_string(
OpenPitParamQuantity value,
OpenPitOutParamError out_error
);
openpit_param_quantity_checked_addbool openpit_param_quantity_checked_add(
OpenPitParamQuantity lhs,
OpenPitParamQuantity rhs,
OpenPitParamQuantity * out,
OpenPitOutParamError out_error
);
openpit_param_quantity_checked_subbool openpit_param_quantity_checked_sub(
OpenPitParamQuantity lhs,
OpenPitParamQuantity rhs,
OpenPitParamQuantity * out,
OpenPitOutParamError out_error
);
openpit_param_quantity_checked_mul_i64bool openpit_param_quantity_checked_mul_i64(
OpenPitParamQuantity value,
int64_t multiplier,
OpenPitParamQuantity * out,
OpenPitOutParamError out_error
);
openpit_param_quantity_checked_mul_u64bool openpit_param_quantity_checked_mul_u64(
OpenPitParamQuantity value,
uint64_t multiplier,
OpenPitParamQuantity * out,
OpenPitOutParamError out_error
);
openpit_param_quantity_checked_mul_f64bool openpit_param_quantity_checked_mul_f64(
OpenPitParamQuantity value,
double multiplier,
OpenPitParamQuantity * out,
OpenPitOutParamError out_error
);
openpit_param_quantity_checked_div_i64bool openpit_param_quantity_checked_div_i64(
OpenPitParamQuantity value,
int64_t divisor,
OpenPitParamQuantity * out,
OpenPitOutParamError out_error
);
openpit_param_quantity_checked_div_u64bool openpit_param_quantity_checked_div_u64(
OpenPitParamQuantity value,
uint64_t divisor,
OpenPitParamQuantity * out,
OpenPitOutParamError out_error
);
openpit_param_quantity_checked_div_f64bool openpit_param_quantity_checked_div_f64(
OpenPitParamQuantity value,
double divisor,
OpenPitParamQuantity * out,
OpenPitOutParamError out_error
);
openpit_param_quantity_checked_rem_i64bool openpit_param_quantity_checked_rem_i64(
OpenPitParamQuantity value,
int64_t divisor,
OpenPitParamQuantity * out,
OpenPitOutParamError out_error
);
openpit_param_quantity_checked_rem_u64bool openpit_param_quantity_checked_rem_u64(
OpenPitParamQuantity value,
uint64_t divisor,
OpenPitParamQuantity * out,
OpenPitOutParamError out_error
);
openpit_param_quantity_checked_rem_f64bool openpit_param_quantity_checked_rem_f64(
OpenPitParamQuantity value,
double divisor,
OpenPitParamQuantity * out,
OpenPitOutParamError out_error
);
openpit_create_param_volume_from_strbool openpit_create_param_volume_from_str(
OpenPitStringView value,
OpenPitParamVolume * out,
OpenPitOutParamError out_error
);
openpit_create_param_volume_from_f64bool openpit_create_param_volume_from_f64(
double value,
OpenPitParamVolume * out,
OpenPitOutParamError out_error
);
openpit_create_param_volume_from_i64bool openpit_create_param_volume_from_i64(
int64_t value,
OpenPitParamVolume * out,
OpenPitOutParamError out_error
);
openpit_create_param_volume_from_u64bool openpit_create_param_volume_from_u64(
uint64_t value,
OpenPitParamVolume * out,
OpenPitOutParamError out_error
);
openpit_create_param_volume_from_str_roundedbool openpit_create_param_volume_from_str_rounded(
OpenPitStringView value,
uint32_t scale,
OpenPitParamRoundingStrategy rounding,
OpenPitParamVolume * out,
OpenPitOutParamError out_error
);
openpit_create_param_volume_from_f64_roundedbool openpit_create_param_volume_from_f64_rounded(
double value,
uint32_t scale,
OpenPitParamRoundingStrategy rounding,
OpenPitParamVolume * out,
OpenPitOutParamError out_error
);
openpit_create_param_volume_from_decimal_roundedbool openpit_create_param_volume_from_decimal_rounded(
OpenPitParamDecimal value,
uint32_t scale,
OpenPitParamRoundingStrategy rounding,
OpenPitParamVolume * out,
OpenPitOutParamError out_error
);
openpit_param_volume_to_f64bool openpit_param_volume_to_f64(
OpenPitParamVolume value,
double * out,
OpenPitOutParamError out_error
);
openpit_param_volume_is_zerobool openpit_param_volume_is_zero(
OpenPitParamVolume value,
bool * out,
OpenPitOutParamError out_error
);
openpit_param_volume_comparebool openpit_param_volume_compare(
OpenPitParamVolume lhs,
OpenPitParamVolume rhs,
int8_t * out,
OpenPitOutParamError out_error
);
openpit_param_volume_to_stringOpenPitSharedString * openpit_param_volume_to_string(
OpenPitParamVolume value,
OpenPitOutParamError out_error
);
openpit_param_volume_checked_addbool openpit_param_volume_checked_add(
OpenPitParamVolume lhs,
OpenPitParamVolume rhs,
OpenPitParamVolume * out,
OpenPitOutParamError out_error
);
openpit_param_volume_checked_subbool openpit_param_volume_checked_sub(
OpenPitParamVolume lhs,
OpenPitParamVolume rhs,
OpenPitParamVolume * out,
OpenPitOutParamError out_error
);
openpit_param_volume_checked_mul_i64bool openpit_param_volume_checked_mul_i64(
OpenPitParamVolume value,
int64_t multiplier,
OpenPitParamVolume * out,
OpenPitOutParamError out_error
);
openpit_param_volume_checked_mul_u64bool openpit_param_volume_checked_mul_u64(
OpenPitParamVolume value,
uint64_t multiplier,
OpenPitParamVolume * out,
OpenPitOutParamError out_error
);
openpit_param_volume_checked_mul_f64bool openpit_param_volume_checked_mul_f64(
OpenPitParamVolume value,
double multiplier,
OpenPitParamVolume * out,
OpenPitOutParamError out_error
);
openpit_param_volume_checked_div_i64bool openpit_param_volume_checked_div_i64(
OpenPitParamVolume value,
int64_t divisor,
OpenPitParamVolume * out,
OpenPitOutParamError out_error
);
openpit_param_volume_checked_div_u64bool openpit_param_volume_checked_div_u64(
OpenPitParamVolume value,
uint64_t divisor,
OpenPitParamVolume * out,
OpenPitOutParamError out_error
);
openpit_param_volume_checked_div_f64bool openpit_param_volume_checked_div_f64(
OpenPitParamVolume value,
double divisor,
OpenPitParamVolume * out,
OpenPitOutParamError out_error
);
openpit_param_volume_checked_rem_i64bool openpit_param_volume_checked_rem_i64(
OpenPitParamVolume value,
int64_t divisor,
OpenPitParamVolume * out,
OpenPitOutParamError out_error
);
openpit_param_volume_checked_rem_u64bool openpit_param_volume_checked_rem_u64(
OpenPitParamVolume value,
uint64_t divisor,
OpenPitParamVolume * out,
OpenPitOutParamError out_error
);
openpit_param_volume_checked_rem_f64bool openpit_param_volume_checked_rem_f64(
OpenPitParamVolume value,
double divisor,
OpenPitParamVolume * out,
OpenPitOutParamError out_error
);
openpit_create_param_cash_flow_from_strbool openpit_create_param_cash_flow_from_str(
OpenPitStringView value,
OpenPitParamCashFlow * out,
OpenPitOutParamError out_error
);
openpit_create_param_cash_flow_from_f64bool openpit_create_param_cash_flow_from_f64(
double value,
OpenPitParamCashFlow * out,
OpenPitOutParamError out_error
);
openpit_create_param_cash_flow_from_i64bool openpit_create_param_cash_flow_from_i64(
int64_t value,
OpenPitParamCashFlow * out,
OpenPitOutParamError out_error
);
openpit_create_param_cash_flow_from_u64bool openpit_create_param_cash_flow_from_u64(
uint64_t value,
OpenPitParamCashFlow * out,
OpenPitOutParamError out_error
);
openpit_create_param_cash_flow_from_str_roundedbool openpit_create_param_cash_flow_from_str_rounded(
OpenPitStringView value,
uint32_t scale,
OpenPitParamRoundingStrategy rounding,
OpenPitParamCashFlow * out,
OpenPitOutParamError out_error
);
openpit_create_param_cash_flow_from_f64_roundedbool openpit_create_param_cash_flow_from_f64_rounded(
double value,
uint32_t scale,
OpenPitParamRoundingStrategy rounding,
OpenPitParamCashFlow * out,
OpenPitOutParamError out_error
);
openpit_create_param_cash_flow_from_decimal_roundedbool openpit_create_param_cash_flow_from_decimal_rounded(
OpenPitParamDecimal value,
uint32_t scale,
OpenPitParamRoundingStrategy rounding,
OpenPitParamCashFlow * out,
OpenPitOutParamError out_error
);
openpit_param_cash_flow_to_f64bool openpit_param_cash_flow_to_f64(
OpenPitParamCashFlow value,
double * out,
OpenPitOutParamError out_error
);
openpit_param_cash_flow_is_zerobool openpit_param_cash_flow_is_zero(
OpenPitParamCashFlow value,
bool * out,
OpenPitOutParamError out_error
);
openpit_param_cash_flow_comparebool openpit_param_cash_flow_compare(
OpenPitParamCashFlow lhs,
OpenPitParamCashFlow rhs,
int8_t * out,
OpenPitOutParamError out_error
);
openpit_param_cash_flow_to_stringOpenPitSharedString * openpit_param_cash_flow_to_string(
OpenPitParamCashFlow value,
OpenPitOutParamError out_error
);
openpit_param_cash_flow_checked_addbool openpit_param_cash_flow_checked_add(
OpenPitParamCashFlow lhs,
OpenPitParamCashFlow rhs,
OpenPitParamCashFlow * out,
OpenPitOutParamError out_error
);
openpit_param_cash_flow_checked_subbool openpit_param_cash_flow_checked_sub(
OpenPitParamCashFlow lhs,
OpenPitParamCashFlow rhs,
OpenPitParamCashFlow * out,
OpenPitOutParamError out_error
);
openpit_param_cash_flow_checked_mul_i64bool openpit_param_cash_flow_checked_mul_i64(
OpenPitParamCashFlow value,
int64_t multiplier,
OpenPitParamCashFlow * out,
OpenPitOutParamError out_error
);
openpit_param_cash_flow_checked_mul_u64bool openpit_param_cash_flow_checked_mul_u64(
OpenPitParamCashFlow value,
uint64_t multiplier,
OpenPitParamCashFlow * out,
OpenPitOutParamError out_error
);
openpit_param_cash_flow_checked_mul_f64bool openpit_param_cash_flow_checked_mul_f64(
OpenPitParamCashFlow value,
double multiplier,
OpenPitParamCashFlow * out,
OpenPitOutParamError out_error
);
openpit_param_cash_flow_checked_div_i64bool openpit_param_cash_flow_checked_div_i64(
OpenPitParamCashFlow value,
int64_t divisor,
OpenPitParamCashFlow * out,
OpenPitOutParamError out_error
);
openpit_param_cash_flow_checked_div_u64bool openpit_param_cash_flow_checked_div_u64(
OpenPitParamCashFlow value,
uint64_t divisor,
OpenPitParamCashFlow * out,
OpenPitOutParamError out_error
);
openpit_param_cash_flow_checked_div_f64bool openpit_param_cash_flow_checked_div_f64(
OpenPitParamCashFlow value,
double divisor,
OpenPitParamCashFlow * out,
OpenPitOutParamError out_error
);
openpit_param_cash_flow_checked_rem_i64bool openpit_param_cash_flow_checked_rem_i64(
OpenPitParamCashFlow value,
int64_t divisor,
OpenPitParamCashFlow * out,
OpenPitOutParamError out_error
);
openpit_param_cash_flow_checked_rem_u64bool openpit_param_cash_flow_checked_rem_u64(
OpenPitParamCashFlow value,
uint64_t divisor,
OpenPitParamCashFlow * out,
OpenPitOutParamError out_error
);
openpit_param_cash_flow_checked_rem_f64bool openpit_param_cash_flow_checked_rem_f64(
OpenPitParamCashFlow value,
double divisor,
OpenPitParamCashFlow * out,
OpenPitOutParamError out_error
);
openpit_param_cash_flow_checked_negbool openpit_param_cash_flow_checked_neg(
OpenPitParamCashFlow value,
OpenPitParamCashFlow * out,
OpenPitOutParamError out_error
);
openpit_create_param_position_size_from_strbool openpit_create_param_position_size_from_str(
OpenPitStringView value,
OpenPitParamPositionSize * out,
OpenPitOutParamError out_error
);
openpit_create_param_position_size_from_f64bool openpit_create_param_position_size_from_f64(
double value,
OpenPitParamPositionSize * out,
OpenPitOutParamError out_error
);
openpit_create_param_position_size_from_i64bool openpit_create_param_position_size_from_i64(
int64_t value,
OpenPitParamPositionSize * out,
OpenPitOutParamError out_error
);
openpit_create_param_position_size_from_u64bool openpit_create_param_position_size_from_u64(
uint64_t value,
OpenPitParamPositionSize * out,
OpenPitOutParamError out_error
);
openpit_create_param_position_size_from_str_roundedbool openpit_create_param_position_size_from_str_rounded(
OpenPitStringView value,
uint32_t scale,
OpenPitParamRoundingStrategy rounding,
OpenPitParamPositionSize * out,
OpenPitOutParamError out_error
);
openpit_create_param_position_size_from_f64_roundedbool openpit_create_param_position_size_from_f64_rounded(
double value,
uint32_t scale,
OpenPitParamRoundingStrategy rounding,
OpenPitParamPositionSize * out,
OpenPitOutParamError out_error
);
openpit_create_param_position_size_from_decimal_roundedbool openpit_create_param_position_size_from_decimal_rounded(
OpenPitParamDecimal value,
uint32_t scale,
OpenPitParamRoundingStrategy rounding,
OpenPitParamPositionSize * out,
OpenPitOutParamError out_error
);
openpit_param_position_size_to_f64bool openpit_param_position_size_to_f64(
OpenPitParamPositionSize value,
double * out,
OpenPitOutParamError out_error
);
openpit_param_position_size_is_zerobool openpit_param_position_size_is_zero(
OpenPitParamPositionSize value,
bool * out,
OpenPitOutParamError out_error
);
openpit_param_position_size_comparebool openpit_param_position_size_compare(
OpenPitParamPositionSize lhs,
OpenPitParamPositionSize rhs,
int8_t * out,
OpenPitOutParamError out_error
);
openpit_param_position_size_to_stringOpenPitSharedString * openpit_param_position_size_to_string(
OpenPitParamPositionSize value,
OpenPitOutParamError out_error
);
openpit_param_position_size_checked_addbool openpit_param_position_size_checked_add(
OpenPitParamPositionSize lhs,
OpenPitParamPositionSize rhs,
OpenPitParamPositionSize * out,
OpenPitOutParamError out_error
);
openpit_param_position_size_checked_subbool openpit_param_position_size_checked_sub(
OpenPitParamPositionSize lhs,
OpenPitParamPositionSize rhs,
OpenPitParamPositionSize * out,
OpenPitOutParamError out_error
);
openpit_param_position_size_checked_mul_i64bool openpit_param_position_size_checked_mul_i64(
OpenPitParamPositionSize value,
int64_t multiplier,
OpenPitParamPositionSize * out,
OpenPitOutParamError out_error
);
openpit_param_position_size_checked_mul_u64bool openpit_param_position_size_checked_mul_u64(
OpenPitParamPositionSize value,
uint64_t multiplier,
OpenPitParamPositionSize * out,
OpenPitOutParamError out_error
);
openpit_param_position_size_checked_mul_f64bool openpit_param_position_size_checked_mul_f64(
OpenPitParamPositionSize value,
double multiplier,
OpenPitParamPositionSize * out,
OpenPitOutParamError out_error
);
openpit_param_position_size_checked_div_i64bool openpit_param_position_size_checked_div_i64(
OpenPitParamPositionSize value,
int64_t divisor,
OpenPitParamPositionSize * out,
OpenPitOutParamError out_error
);
openpit_param_position_size_checked_div_u64bool openpit_param_position_size_checked_div_u64(
OpenPitParamPositionSize value,
uint64_t divisor,
OpenPitParamPositionSize * out,
OpenPitOutParamError out_error
);
openpit_param_position_size_checked_div_f64bool openpit_param_position_size_checked_div_f64(
OpenPitParamPositionSize value,
double divisor,
OpenPitParamPositionSize * out,
OpenPitOutParamError out_error
);
openpit_param_position_size_checked_rem_i64bool openpit_param_position_size_checked_rem_i64(
OpenPitParamPositionSize value,
int64_t divisor,
OpenPitParamPositionSize * out,
OpenPitOutParamError out_error
);
openpit_param_position_size_checked_rem_u64bool openpit_param_position_size_checked_rem_u64(
OpenPitParamPositionSize value,
uint64_t divisor,
OpenPitParamPositionSize * out,
OpenPitOutParamError out_error
);
openpit_param_position_size_checked_rem_f64bool openpit_param_position_size_checked_rem_f64(
OpenPitParamPositionSize value,
double divisor,
OpenPitParamPositionSize * out,
OpenPitOutParamError out_error
);
openpit_param_position_size_checked_negbool openpit_param_position_size_checked_neg(
OpenPitParamPositionSize value,
OpenPitParamPositionSize * out,
OpenPitOutParamError out_error
);
openpit_create_param_fee_from_strbool openpit_create_param_fee_from_str(
OpenPitStringView value,
OpenPitParamFee * out,
OpenPitOutParamError out_error
);
openpit_create_param_fee_from_f64bool openpit_create_param_fee_from_f64(
double value,
OpenPitParamFee * out,
OpenPitOutParamError out_error
);
openpit_create_param_fee_from_i64bool openpit_create_param_fee_from_i64(
int64_t value,
OpenPitParamFee * out,
OpenPitOutParamError out_error
);
openpit_create_param_fee_from_u64bool openpit_create_param_fee_from_u64(
uint64_t value,
OpenPitParamFee * out,
OpenPitOutParamError out_error
);
openpit_create_param_fee_from_str_roundedbool openpit_create_param_fee_from_str_rounded(
OpenPitStringView value,
uint32_t scale,
OpenPitParamRoundingStrategy rounding,
OpenPitParamFee * out,
OpenPitOutParamError out_error
);
openpit_create_param_fee_from_f64_roundedbool openpit_create_param_fee_from_f64_rounded(
double value,
uint32_t scale,
OpenPitParamRoundingStrategy rounding,
OpenPitParamFee * out,
OpenPitOutParamError out_error
);
openpit_create_param_fee_from_decimal_roundedbool openpit_create_param_fee_from_decimal_rounded(
OpenPitParamDecimal value,
uint32_t scale,
OpenPitParamRoundingStrategy rounding,
OpenPitParamFee * out,
OpenPitOutParamError out_error
);
openpit_param_fee_to_f64bool openpit_param_fee_to_f64(
OpenPitParamFee value,
double * out,
OpenPitOutParamError out_error
);
openpit_param_fee_is_zerobool openpit_param_fee_is_zero(
OpenPitParamFee value,
bool * out,
OpenPitOutParamError out_error
);
openpit_param_fee_comparebool openpit_param_fee_compare(
OpenPitParamFee lhs,
OpenPitParamFee rhs,
int8_t * out,
OpenPitOutParamError out_error
);
openpit_param_fee_to_stringOpenPitSharedString * openpit_param_fee_to_string(
OpenPitParamFee value,
OpenPitOutParamError out_error
);
openpit_param_fee_checked_addbool openpit_param_fee_checked_add(
OpenPitParamFee lhs,
OpenPitParamFee rhs,
OpenPitParamFee * out,
OpenPitOutParamError out_error
);
openpit_param_fee_checked_subbool openpit_param_fee_checked_sub(
OpenPitParamFee lhs,
OpenPitParamFee rhs,
OpenPitParamFee * out,
OpenPitOutParamError out_error
);
openpit_param_fee_checked_mul_i64bool openpit_param_fee_checked_mul_i64(
OpenPitParamFee value,
int64_t multiplier,
OpenPitParamFee * out,
OpenPitOutParamError out_error
);
openpit_param_fee_checked_mul_u64bool openpit_param_fee_checked_mul_u64(
OpenPitParamFee value,
uint64_t multiplier,
OpenPitParamFee * out,
OpenPitOutParamError out_error
);
openpit_param_fee_checked_mul_f64bool openpit_param_fee_checked_mul_f64(
OpenPitParamFee value,
double multiplier,
OpenPitParamFee * out,
OpenPitOutParamError out_error
);
openpit_param_fee_checked_div_i64bool openpit_param_fee_checked_div_i64(
OpenPitParamFee value,
int64_t divisor,
OpenPitParamFee * out,
OpenPitOutParamError out_error
);
openpit_param_fee_checked_div_u64bool openpit_param_fee_checked_div_u64(
OpenPitParamFee value,
uint64_t divisor,
OpenPitParamFee * out,
OpenPitOutParamError out_error
);
openpit_param_fee_checked_div_f64bool openpit_param_fee_checked_div_f64(
OpenPitParamFee value,
double divisor,
OpenPitParamFee * out,
OpenPitOutParamError out_error
);
openpit_param_fee_checked_rem_i64bool openpit_param_fee_checked_rem_i64(
OpenPitParamFee value,
int64_t divisor,
OpenPitParamFee * out,
OpenPitOutParamError out_error
);
openpit_param_fee_checked_rem_u64bool openpit_param_fee_checked_rem_u64(
OpenPitParamFee value,
uint64_t divisor,
OpenPitParamFee * out,
OpenPitOutParamError out_error
);
openpit_param_fee_checked_rem_f64bool openpit_param_fee_checked_rem_f64(
OpenPitParamFee value,
double divisor,
OpenPitParamFee * out,
OpenPitOutParamError out_error
);
openpit_param_fee_checked_negbool openpit_param_fee_checked_neg(
OpenPitParamFee value,
OpenPitParamFee * out,
OpenPitOutParamError out_error
);
openpit_create_param_notional_from_strbool openpit_create_param_notional_from_str(
OpenPitStringView value,
OpenPitParamNotional * out,
OpenPitOutParamError out_error
);
openpit_create_param_notional_from_f64bool openpit_create_param_notional_from_f64(
double value,
OpenPitParamNotional * out,
OpenPitOutParamError out_error
);
openpit_create_param_notional_from_i64bool openpit_create_param_notional_from_i64(
int64_t value,
OpenPitParamNotional * out,
OpenPitOutParamError out_error
);
openpit_create_param_notional_from_u64bool openpit_create_param_notional_from_u64(
uint64_t value,
OpenPitParamNotional * out,
OpenPitOutParamError out_error
);
openpit_create_param_notional_from_str_roundedbool openpit_create_param_notional_from_str_rounded(
OpenPitStringView value,
uint32_t scale,
OpenPitParamRoundingStrategy rounding,
OpenPitParamNotional * out,
OpenPitOutParamError out_error
);
openpit_create_param_notional_from_f64_roundedbool openpit_create_param_notional_from_f64_rounded(
double value,
uint32_t scale,
OpenPitParamRoundingStrategy rounding,
OpenPitParamNotional * out,
OpenPitOutParamError out_error
);
openpit_create_param_notional_from_decimal_roundedbool openpit_create_param_notional_from_decimal_rounded(
OpenPitParamDecimal value,
uint32_t scale,
OpenPitParamRoundingStrategy rounding,
OpenPitParamNotional * out,
OpenPitOutParamError out_error
);
openpit_param_notional_to_f64bool openpit_param_notional_to_f64(
OpenPitParamNotional value,
double * out,
OpenPitOutParamError out_error
);
openpit_param_notional_is_zerobool openpit_param_notional_is_zero(
OpenPitParamNotional value,
bool * out,
OpenPitOutParamError out_error
);
openpit_param_notional_comparebool openpit_param_notional_compare(
OpenPitParamNotional lhs,
OpenPitParamNotional rhs,
int8_t * out,
OpenPitOutParamError out_error
);
openpit_param_notional_to_stringOpenPitSharedString * openpit_param_notional_to_string(
OpenPitParamNotional value,
OpenPitOutParamError out_error
);
openpit_param_notional_checked_addbool openpit_param_notional_checked_add(
OpenPitParamNotional lhs,
OpenPitParamNotional rhs,
OpenPitParamNotional * out,
OpenPitOutParamError out_error
);
openpit_param_notional_checked_subbool openpit_param_notional_checked_sub(
OpenPitParamNotional lhs,
OpenPitParamNotional rhs,
OpenPitParamNotional * out,
OpenPitOutParamError out_error
);
openpit_param_notional_checked_mul_i64bool openpit_param_notional_checked_mul_i64(
OpenPitParamNotional value,
int64_t multiplier,
OpenPitParamNotional * out,
OpenPitOutParamError out_error
);
openpit_param_notional_checked_mul_u64bool openpit_param_notional_checked_mul_u64(
OpenPitParamNotional value,
uint64_t multiplier,
OpenPitParamNotional * out,
OpenPitOutParamError out_error
);
openpit_param_notional_checked_mul_f64bool openpit_param_notional_checked_mul_f64(
OpenPitParamNotional value,
double multiplier,
OpenPitParamNotional * out,
OpenPitOutParamError out_error
);
openpit_param_notional_checked_div_i64bool openpit_param_notional_checked_div_i64(
OpenPitParamNotional value,
int64_t divisor,
OpenPitParamNotional * out,
OpenPitOutParamError out_error
);
openpit_param_notional_checked_div_u64bool openpit_param_notional_checked_div_u64(
OpenPitParamNotional value,
uint64_t divisor,
OpenPitParamNotional * out,
OpenPitOutParamError out_error
);
openpit_param_notional_checked_div_f64bool openpit_param_notional_checked_div_f64(
OpenPitParamNotional value,
double divisor,
OpenPitParamNotional * out,
OpenPitOutParamError out_error
);
openpit_param_notional_checked_rem_i64bool openpit_param_notional_checked_rem_i64(
OpenPitParamNotional value,
int64_t divisor,
OpenPitParamNotional * out,
OpenPitOutParamError out_error
);
openpit_param_notional_checked_rem_u64bool openpit_param_notional_checked_rem_u64(
OpenPitParamNotional value,
uint64_t divisor,
OpenPitParamNotional * out,
OpenPitOutParamError out_error
);
openpit_param_notional_checked_rem_f64bool openpit_param_notional_checked_rem_f64(
OpenPitParamNotional value,
double divisor,
OpenPitParamNotional * out,
OpenPitOutParamError out_error
);
OpenPitParamNotionalOptionaltypedef struct OpenPitParamNotionalOptional {
OpenPitParamNotional value;
bool is_set;
} OpenPitParamNotionalOptional;
OpenPitParamPnlOptionaltypedef struct OpenPitParamPnlOptional {
OpenPitParamPnl value;
bool is_set;
} OpenPitParamPnlOptional;
OpenPitParamPriceOptionaltypedef struct OpenPitParamPriceOptional {
OpenPitParamPrice value;
bool is_set;
} OpenPitParamPriceOptional;
OpenPitParamQuantityOptionaltypedef struct OpenPitParamQuantityOptional {
OpenPitParamQuantity value;
bool is_set;
} OpenPitParamQuantityOptional;
OpenPitParamVolumeOptionaltypedef struct OpenPitParamVolumeOptional {
OpenPitParamVolume value;
bool is_set;
} OpenPitParamVolumeOptional;
OpenPitParamCashFlowOptionaltypedef struct OpenPitParamCashFlowOptional {
OpenPitParamCashFlow value;
bool is_set;
} OpenPitParamCashFlowOptional;
OpenPitParamPositionSizeOptionaltypedef struct OpenPitParamPositionSizeOptional {
OpenPitParamPositionSize value;
bool is_set;
} OpenPitParamPositionSizeOptional;
OpenPitParamFeeOptionaltypedef struct OpenPitParamFeeOptional {
OpenPitParamFee value;
bool is_set;
} OpenPitParamFeeOptional;
OpenPitParamAccountIdOptionaltypedef struct OpenPitParamAccountIdOptional {
OpenPitParamAccountId value;
bool is_set;
} OpenPitParamAccountIdOptional;
openpit_param_leverage_calculate_margin_requiredbool openpit_param_leverage_calculate_margin_required(
OpenPitParamLeverage leverage,
OpenPitParamNotional notional,
OpenPitParamNotional * out,
OpenPitOutParamError out_error
);
openpit_param_price_calculate_volumebool openpit_param_price_calculate_volume(
OpenPitParamPrice price,
OpenPitParamQuantity quantity,
OpenPitParamVolume * out,
OpenPitOutParamError out_error
);
openpit_param_quantity_calculate_volumebool openpit_param_quantity_calculate_volume(
OpenPitParamQuantity quantity,
OpenPitParamPrice price,
OpenPitParamVolume * out,
OpenPitOutParamError out_error
);
openpit_param_volume_calculate_quantitybool openpit_param_volume_calculate_quantity(
OpenPitParamVolume volume,
OpenPitParamPrice price,
OpenPitParamQuantity * out,
OpenPitOutParamError out_error
);
openpit_param_pnl_to_cash_flowbool openpit_param_pnl_to_cash_flow(
OpenPitParamPnl value,
OpenPitParamCashFlow * out,
OpenPitOutParamError out_error
);
openpit_param_pnl_to_position_sizebool openpit_param_pnl_to_position_size(
OpenPitParamPnl value,
OpenPitParamPositionSize * out,
OpenPitOutParamError out_error
);
openpit_param_pnl_from_feebool openpit_param_pnl_from_fee(
OpenPitParamFee fee,
OpenPitParamPnl * out,
OpenPitOutParamError out_error
);
openpit_param_cash_flow_from_pnlbool openpit_param_cash_flow_from_pnl(
OpenPitParamPnl pnl,
OpenPitParamCashFlow * out,
OpenPitOutParamError out_error
);
openpit_param_cash_flow_from_feebool openpit_param_cash_flow_from_fee(
OpenPitParamFee fee,
OpenPitParamCashFlow * out,
OpenPitOutParamError out_error
);
openpit_param_cash_flow_from_volume_inflowbool openpit_param_cash_flow_from_volume_inflow(
OpenPitParamVolume volume,
OpenPitParamCashFlow * out,
OpenPitOutParamError out_error
);
openpit_param_cash_flow_from_volume_outflowbool openpit_param_cash_flow_from_volume_outflow(
OpenPitParamVolume volume,
OpenPitParamCashFlow * out,
OpenPitOutParamError out_error
);
openpit_param_fee_to_pnlbool openpit_param_fee_to_pnl(
OpenPitParamFee fee,
OpenPitParamPnl * out,
OpenPitOutParamError out_error
);
openpit_param_fee_to_position_sizebool openpit_param_fee_to_position_size(
OpenPitParamFee fee,
OpenPitParamPositionSize * out,
OpenPitOutParamError out_error
);
openpit_param_fee_to_cash_flowbool openpit_param_fee_to_cash_flow(
OpenPitParamFee fee,
OpenPitParamCashFlow * out,
OpenPitOutParamError out_error
);
openpit_param_volume_to_cash_flow_inflowbool openpit_param_volume_to_cash_flow_inflow(
OpenPitParamVolume volume,
OpenPitParamCashFlow * out,
OpenPitOutParamError out_error
);
openpit_param_volume_to_cash_flow_outflowbool openpit_param_volume_to_cash_flow_outflow(
OpenPitParamVolume volume,
OpenPitParamCashFlow * out,
OpenPitOutParamError out_error
);
openpit_param_position_size_from_pnlbool openpit_param_position_size_from_pnl(
OpenPitParamPnl pnl,
OpenPitParamPositionSize * out,
OpenPitOutParamError out_error
);
openpit_param_position_size_from_feebool openpit_param_position_size_from_fee(
OpenPitParamFee fee,
OpenPitParamPositionSize * out,
OpenPitOutParamError out_error
);
openpit_param_position_size_from_quantity_and_sidebool openpit_param_position_size_from_quantity_and_side(
OpenPitParamQuantity quantity,
OpenPitParamSide side,
OpenPitParamPositionSize * out,
OpenPitOutParamError out_error
);
openpit_param_position_size_to_open_quantitybool openpit_param_position_size_to_open_quantity(
OpenPitParamPositionSize value,
OpenPitParamQuantity * out_quantity,
OpenPitParamSide * out_side,
OpenPitOutParamError out_error
);
openpit_param_position_size_to_close_quantitybool openpit_param_position_size_to_close_quantity(
OpenPitParamPositionSize value,
OpenPitParamQuantity * out_quantity,
OpenPitParamSide * out_side,
OpenPitOutParamError out_error
);
openpit_param_position_size_checked_add_quantitybool openpit_param_position_size_checked_add_quantity(
OpenPitParamPositionSize value,
OpenPitParamQuantity quantity,
OpenPitParamSide side,
OpenPitParamPositionSize * out,
OpenPitOutParamError out_error
);
openpit_param_price_calculate_notionalbool openpit_param_price_calculate_notional(
OpenPitParamPrice price,
OpenPitParamQuantity quantity,
OpenPitParamNotional * out,
OpenPitOutParamError out_error
);
openpit_param_quantity_calculate_notionalbool openpit_param_quantity_calculate_notional(
OpenPitParamQuantity quantity,
OpenPitParamPrice price,
OpenPitParamNotional * out,
OpenPitOutParamError out_error
);
openpit_param_notional_from_volumebool openpit_param_notional_from_volume(
OpenPitParamVolume volume,
OpenPitParamNotional * out,
OpenPitOutParamError out_error
);
openpit_param_notional_to_volumebool openpit_param_notional_to_volume(
OpenPitParamNotional notional,
OpenPitParamVolume * out,
OpenPitOutParamError out_error
);
openpit_param_notional_calculate_margin_requiredbool openpit_param_notional_calculate_margin_required(
OpenPitParamNotional notional,
OpenPitParamLeverage leverage,
OpenPitParamNotional * out,
OpenPitOutParamError out_error
);
openpit_param_volume_from_notionalbool openpit_param_volume_from_notional(
OpenPitParamNotional notional,
OpenPitParamVolume * out,
OpenPitOutParamError out_error
);
openpit_create_param_account_id_from_u64Constructs an account identifier from a 64-bit integer.
This is a direct numeric mapping with no collision risk.
WARNING: Do not mix IDs produced by this function with IDs produced by
openpit_create_param_account_id_from_str in the same runtime state.
Contract:
OpenPitParamAccountId openpit_create_param_account_id_from_u64(
uint64_t value
);
openpit_create_param_account_id_from_strConstructs an account identifier from a UTF-8 byte sequence.
The bytes are read only for the duration of the call. No trailing zero byte is required.
Collision note:
n distinct account strings the probability of at least one collision
is approximately n^2 / 2^65.openpit_create_param_account_id_from_u64.The previous sentence is why this helper is suitable for stable adapter-side mapping, but not for workflows that require guaranteed uniqueness.
WARNING: Do not mix IDs produced by this function with IDs produced by
openpit_create_param_account_id_from_u64 in the same runtime state.
Contract:
true and writes a stable account identifier to out on success;false on invalid input and optionally writes OpenPitParamError.value.ptr must be non-null and point to at least value.len readable UTF-8
bytes.
bool openpit_create_param_account_id_from_str(
OpenPitStringView value,
OpenPitParamAccountId * out,
OpenPitOutParamError out_error
);
openpit_create_param_asset_from_strValidates and copies an asset identifier into a caller-owned shared-string handle.
The returned handle must be destroyed with openpit_destroy_param_asset.
OpenPitSharedString * openpit_create_param_asset_from_str(
OpenPitStringView value,
OpenPitOutParamError out_error
);
openpit_destroy_param_assetDestroys a caller-owned asset handle created by
openpit_create_param_asset_from_str.
void openpit_destroy_param_asset(
OpenPitSharedString * handle
);
OpenPitParamErrorCodeParameter error code transported through FFI.
typedef uint32_t OpenPitParamErrorCode;
/**
* Error code is not specified.
*/
#define OpenPitParamErrorCode_Unspecified ((OpenPitParamErrorCode) 0)
/**
* Value must be non-negative.
*/
#define OpenPitParamErrorCode_Negative ((OpenPitParamErrorCode) 1)
/**
* Division by zero.
*/
#define OpenPitParamErrorCode_DivisionByZero ((OpenPitParamErrorCode) 2)
/**
* Arithmetic overflow.
*/
#define OpenPitParamErrorCode_Overflow ((OpenPitParamErrorCode) 3)
/**
* Arithmetic underflow.
*/
#define OpenPitParamErrorCode_Underflow ((OpenPitParamErrorCode) 4)
/**
* Invalid float value.
*/
#define OpenPitParamErrorCode_InvalidFloat ((OpenPitParamErrorCode) 5)
/**
* Invalid textual format.
*/
#define OpenPitParamErrorCode_InvalidFormat ((OpenPitParamErrorCode) 6)
/**
* Invalid price value.
*/
#define OpenPitParamErrorCode_InvalidPrice ((OpenPitParamErrorCode) 7)
/**
* Invalid leverage value.
*/
#define OpenPitParamErrorCode_InvalidLeverage ((OpenPitParamErrorCode) 8)
/**
* Asset identifier is empty.
*/
#define OpenPitParamErrorCode_AssetEmpty ((OpenPitParamErrorCode) 9)
/**
* Account identifier string is empty.
*/
#define OpenPitParamErrorCode_AccountIdEmpty ((OpenPitParamErrorCode) 10)
/**
* Catch-all code for unknown cases.
*/
#define OpenPitParamErrorCode_Other ((OpenPitParamErrorCode) 4294967295)
OpenPitParamErrorCaller-owned parameter error container.
typedef struct OpenPitParamError {
OpenPitParamErrorCode code;
OpenPitSharedString * message;
} OpenPitParamError;
OpenPitOutParamErrorParameter error out-pointer used by fallible param FFI calls.
typedef OpenPitParamError ** OpenPitOutParamError;
openpit_destroy_param_errorReleases a caller-owned parameter error container.
handle must be either null or a pointer returned by this library through
OpenPitOutParamError. The handle must be destroyed at most once.
void openpit_destroy_param_error(
OpenPitParamError * handle
);