|
PineForge unreleased
Deterministic PineScript v6 backtest runtime — C ABI 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. | |
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.
| 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.
| uint32_t pf_native_margin_call_v1::version |
PF_NATIVE_API_VERSION.
Definition at line 2106 of file native_c_api.h.
| uint64_t pf_native_margin_call_v1::ordinal |
The call's event ordinal.
Definition at line 2107 of file native_c_api.h.
| uint64_t pf_native_margin_call_v1::incarnation |
The kernel's liquidation request.
Definition at line 2108 of file native_c_api.h.
| 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.
| 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.
| uint32_t pf_native_margin_call_v1::reserved0 |
Always 0.
Definition at line 2111 of file native_c_api.h.
| double pf_native_margin_call_v1::mark |
The booked resolved price.
Definition at line 2112 of file native_c_api.h.
| 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.
| 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.
| 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.
| double pf_native_margin_call_v1::units |
Units liquidated.
Definition at line 2116 of file native_c_api.h.
| double pf_native_margin_call_v1::position_before |
Signed book before the reduction.
Definition at line 2117 of file native_c_api.h.
| double pf_native_margin_call_v1::position_after |
Signed book after it.
Definition at line 2118 of file native_c_api.h.
| uint64_t pf_native_margin_call_v1::cursor_ordinal |
Definition at line 2119 of file native_c_api.h.
| int64_t pf_native_margin_call_v1::cursor_effective_time_ms |
Definition at line 2120 of file native_c_api.h.
| double pf_native_margin_call_v1::cursor_t |
Definition at line 2121 of file native_c_api.h.
| int32_t pf_native_margin_call_v1::cursor_interval_index |
Definition at line 2122 of file native_c_api.h.
| uint8_t pf_native_margin_call_v1::cursor_provenance |
Definition at line 2123 of file native_c_api.h.
| uint8_t pf_native_margin_call_v1::cursor_path_phase |
Definition at line 2124 of file native_c_api.h.
| uint8_t pf_native_margin_call_v1::reserved1[2] |
Always 0.
Definition at line 2125 of file native_c_api.h.