OpenPitParamAdjustmentAmountOne amount component inside an account adjustment.
The numeric value is interpreted according to kind:
Delta means “change current state by this signed amount”;Absolute means “set current state to this signed amount”.typedef struct OpenPitParamAdjustmentAmount {
OpenPitParamPositionSize value;
OpenPitParamAdjustmentAmountKind kind;
} OpenPitParamAdjustmentAmount;
OpenPitAccountAdjustmentBalanceOperationBalance-operation payload for account adjustment.
typedef struct OpenPitAccountAdjustmentBalanceOperation {
OpenPitStringView asset;
OpenPitParamPriceOptional average_entry_price;
} OpenPitAccountAdjustmentBalanceOperation;
OpenPitAccountAdjustmentPositionOperationPosition-operation payload for account adjustment.
typedef struct OpenPitAccountAdjustmentPositionOperation {
OpenPitInstrument instrument;
OpenPitStringView collateral_asset;
OpenPitParamPriceOptional average_entry_price;
OpenPitParamLeverage leverage;
OpenPitParamPositionMode mode;
} OpenPitAccountAdjustmentPositionOperation;
OpenPitAccountAdjustmentBalanceOperationOptionaltypedef struct OpenPitAccountAdjustmentBalanceOperationOptional {
OpenPitAccountAdjustmentBalanceOperation value;
bool is_set;
} OpenPitAccountAdjustmentBalanceOperationOptional;
OpenPitAccountAdjustmentPositionOperationOptionaltypedef struct OpenPitAccountAdjustmentPositionOperationOptional {
OpenPitAccountAdjustmentPositionOperation value;
bool is_set;
} OpenPitAccountAdjustmentPositionOperationOptional;
OpenPitAccountAdjustmentAmountOptional amount-change group for account adjustment.
The group is absent when every field is absent.
typedef struct OpenPitAccountAdjustmentAmount {
OpenPitParamAdjustmentAmount total;
OpenPitParamAdjustmentAmount reserved;
OpenPitParamAdjustmentAmount pending;
} OpenPitAccountAdjustmentAmount;
OpenPitAccountAdjustmentBoundsOptional bounds group for account adjustment.
The group is absent when every bound is absent.
typedef struct OpenPitAccountAdjustmentBounds {
OpenPitParamPositionSizeOptional total_upper;
OpenPitParamPositionSizeOptional total_lower;
OpenPitParamPositionSizeOptional reserved_upper;
OpenPitParamPositionSizeOptional reserved_lower;
OpenPitParamPositionSizeOptional pending_upper;
OpenPitParamPositionSizeOptional pending_lower;
} OpenPitAccountAdjustmentBounds;
OpenPitAccountAdjustmentFull caller-owned account-adjustment payload.
typedef struct OpenPitAccountAdjustment {
OpenPitAccountAdjustmentBalanceOperationOptional balance_operation;
OpenPitAccountAdjustmentPositionOperationOptional position_operation;
OpenPitAccountAdjustmentAmountOptional amount;
OpenPitAccountAdjustmentBoundsOptional bounds;
void * user_data;
} OpenPitAccountAdjustment;
OpenPitAccountAdjustmentApplyStatusResult of openpit_engine_apply_account_adjustment.
typedef uint8_t OpenPitAccountAdjustmentApplyStatus;
/**
* The call failed before the batch could be evaluated.
*/
#define OpenPitAccountAdjustmentApplyStatus_Error \
((OpenPitAccountAdjustmentApplyStatus) 0)
/**
* The batch was accepted and applied.
*/
#define OpenPitAccountAdjustmentApplyStatus_Applied \
((OpenPitAccountAdjustmentApplyStatus) 1)
/**
* The batch was evaluated and rejected by policy or validation logic.
*/
#define OpenPitAccountAdjustmentApplyStatus_Rejected \
((OpenPitAccountAdjustmentApplyStatus) 2)
OpenPitAccountAdjustmentAmountOptionaltypedef struct OpenPitAccountAdjustmentAmountOptional {
OpenPitAccountAdjustmentAmount value;
bool is_set;
} OpenPitAccountAdjustmentAmountOptional;
OpenPitAccountAdjustmentBoundsOptionaltypedef struct OpenPitAccountAdjustmentBoundsOptional {
OpenPitAccountAdjustmentBounds value;
bool is_set;
} OpenPitAccountAdjustmentBoundsOptional;