PineForge unreleased
Deterministic PineScript v6 backtest runtime — C ABI reference
Loading...
Searching...
No Matches
pf_native_margin_call_v1 Struct Reference

One kernel-issued liquidation that filled, whole — the C spelling of native_order::MarginCallEvent, copied out by strategy_native_margin_call_v1. More...

#include <native_c_api.h>

Data Fields

uint32_t struct_size
 sizeof(pf_native_margin_call_v1).
 
uint32_t version
 PF_NATIVE_API_VERSION.
 
uint64_t ordinal
 The call's event ordinal.
 
uint64_t incarnation
 The kernel's liquidation request.
 
uint64_t applied_ordinal
 The applied execution that booked it.
 
uint32_t side
 pf_native_side_t of the liquidated position.
 
uint32_t reserved0
 Always 0.
 
double mark
 The booked resolved price.
 
double equity
 Marked equity of the surviving book at mark.
 
double required
 Maintenance requirement of the surviving book at mark.
 
double liquidation_price
 The level re-solved for what is left.
 
double units
 Units liquidated.
 
double position_before
 Signed book before the reduction.
 
double position_after
 Signed book after it.
 
uint64_t cursor_ordinal
 
int64_t cursor_effective_time_ms
 
double cursor_t
 
int32_t cursor_interval_index
 
uint8_t cursor_provenance
 pf_native_price_provenance_t.
 
uint8_t cursor_path_phase
 pf_native_path_phase_t.
 
uint8_t reserved1 [2]
 Always 0.
 

Detailed Description

One kernel-issued liquidation that filled, whole — the C spelling of native_order::MarginCallEvent, copied out by strategy_native_margin_call_v1.

It carries the margin facts of that fill, so a host reconstructs the outcome without recomputing the account: mark is the booked resolved price, equity and required are the marked equity and the maintenance requirement of the SURVIVING book at that price, liquidation_price is the level re-solved for what is left, and position_before / position_after are the signed book on either side of the reduction. applied_ordinal names the PF_NATIVE_EVENT_APPLIED row that booked it; the cursor is the point it filled at. The PF_NATIVE_EVENT_MARGIN_CALL row of the same ordinal carries a subset of these facts.

Definition at line 2104 of file native_c_api.h.

Field Documentation

◆ struct_size

uint32_t pf_native_margin_call_v1::struct_size

sizeof(pf_native_margin_call_v1).

Definition at line 2105 of file native_c_api.h.

◆ version

uint32_t pf_native_margin_call_v1::version

PF_NATIVE_API_VERSION.

Definition at line 2106 of file native_c_api.h.

◆ ordinal

uint64_t pf_native_margin_call_v1::ordinal

The call's event ordinal.

Definition at line 2107 of file native_c_api.h.

◆ incarnation

uint64_t pf_native_margin_call_v1::incarnation

The kernel's liquidation request.

Definition at line 2108 of file native_c_api.h.

◆ applied_ordinal

uint64_t pf_native_margin_call_v1::applied_ordinal

The applied execution that booked it.

Definition at line 2109 of file native_c_api.h.

◆ side

uint32_t pf_native_margin_call_v1::side

pf_native_side_t of the liquidated position.

Definition at line 2110 of file native_c_api.h.

◆ reserved0

uint32_t pf_native_margin_call_v1::reserved0

Always 0.

Definition at line 2111 of file native_c_api.h.

◆ mark

double pf_native_margin_call_v1::mark

The booked resolved price.

Definition at line 2112 of file native_c_api.h.

◆ equity

double pf_native_margin_call_v1::equity

Marked equity of the surviving book at mark.

Definition at line 2113 of file native_c_api.h.

◆ required

double pf_native_margin_call_v1::required

Maintenance requirement of the surviving book at mark.

Definition at line 2114 of file native_c_api.h.

◆ liquidation_price

double pf_native_margin_call_v1::liquidation_price

The level re-solved for what is left.

Definition at line 2115 of file native_c_api.h.

◆ units

double pf_native_margin_call_v1::units

Units liquidated.

Definition at line 2116 of file native_c_api.h.

◆ position_before

double pf_native_margin_call_v1::position_before

Signed book before the reduction.

Definition at line 2117 of file native_c_api.h.

◆ position_after

double pf_native_margin_call_v1::position_after

Signed book after it.

Definition at line 2118 of file native_c_api.h.

◆ cursor_ordinal

uint64_t pf_native_margin_call_v1::cursor_ordinal

Definition at line 2119 of file native_c_api.h.

◆ cursor_effective_time_ms

int64_t pf_native_margin_call_v1::cursor_effective_time_ms

Definition at line 2120 of file native_c_api.h.

◆ cursor_t

double pf_native_margin_call_v1::cursor_t

Definition at line 2121 of file native_c_api.h.

◆ cursor_interval_index

int32_t pf_native_margin_call_v1::cursor_interval_index

Definition at line 2122 of file native_c_api.h.

◆ cursor_provenance

uint8_t pf_native_margin_call_v1::cursor_provenance

pf_native_price_provenance_t.

Definition at line 2123 of file native_c_api.h.

◆ cursor_path_phase

uint8_t pf_native_margin_call_v1::cursor_path_phase

pf_native_path_phase_t.

Definition at line 2124 of file native_c_api.h.

◆ reserved1

uint8_t pf_native_margin_call_v1::reserved1[2]

Always 0.

Definition at line 2125 of file native_c_api.h.


The documentation for this struct was generated from the following file: