|
PineForge v0.13.1-379-g9b50973
Deterministic PineScript v6 backtest runtime — C ABI reference
|
One order request. More...
#include <native_c_api.h>
Data Fields | |
| uint32_t | struct_size |
| sizeof(pf_native_request_v1). | |
| uint32_t | version |
| PF_NATIVE_API_VERSION. | |
| uint32_t | intent |
| pf_native_intent_t. | |
| uint32_t | reduce_size |
| pf_native_reduction_t, REDUCE only. | |
| uint32_t | reduce_claim |
| pf_native_scope_claim_t, SCOPE_FRACTION only. | |
| uint32_t | side |
| pf_native_side_t, SIZED only. | |
| uint32_t | size_basis |
| pf_native_size_basis_t, SIZED only. | |
| uint32_t | size_time |
| pf_native_size_time_t, SIZED only. | |
| uint32_t | grid_policy |
| pf_native_grid_policy_t, SIZED only. | |
| uint32_t | reserve_percent_fee |
| 0/1, SIZED only. | |
| double | intent_value |
| The intent's own scalar; see pf_native_intent_t. | |
| uint32_t | trigger |
| pf_native_trigger_t. | |
| uint32_t | anchor |
| pf_native_anchor_t (L7). | |
| double | p1 |
| Limit/stop price, or trail offset. | |
| double | p2 |
| Stop-limit limit, or trail arm price. | |
| double | anchor_offset |
| FROM_OWNER_FILL: signed offset. | |
| uint8_t | fill_through |
| LIMIT only: market-if-touched. | |
| uint8_t | trail_offset_in_ticks |
| TRAIL: p1 is a tick count, not a distance. | |
| uint8_t | trail_has_arm_price |
| TRAIL: p2 is the arm price. | |
| uint8_t | anchor_offset_in_ticks |
| FROM_OWNER_FILL: the offset is a tick count. | |
| uint32_t | capacity |
| pf_native_capacity_t. | |
| double | capacity_units |
| POINT_BUDGET only. | |
| uint32_t | owner |
| pf_native_owner_t. | |
| uint32_t | owner_n |
Length of owner_incarnations. | |
| const uint64_t * | owner_incarnations |
| Borrowed for the call only. | |
| int64_t | owner_cycle |
| BIND_OPENING / BIND_OPENINGS. | |
| uint64_t | cohort |
| BIND_COHORT. | |
| uint32_t | group_kind |
| pf_native_group_t. | |
| uint32_t | group_effect |
| pf_native_group_effect_t. | |
| uint64_t | group_id |
| MEMBER only. | |
| int64_t | group_cohort |
| MEMBER only. | |
| const char * | label |
| const char * | comment |
| uint32_t | anchor_rounding |
| pf_native_anchor_rounding_t, FROM_OWNER_FILL only. | |
| uint32_t | visibility |
| pf_native_arm_visibility_t, WAIT_FOR_APPLIED only. | |
| uint32_t | size_price |
| pf_native_size_price_t, SIZED only. | |
| uint32_t | reduce_basis |
| pf_native_scope_basis_t, SCOPE_FRACTION only. | |
One order request.
Translated field by field into native_order::Request; it is never cast. Zero-initialise it, set struct_size and version, then set only the fields the chosen intent and trigger document.
This struct has THREE published layouts and the runtime accepts any of them: the base layout the L13 lane first shipped (PF_NATIVE_REQUEST_V1_BASE_SIZE), that layout plus L7b's anchored-leg tail (PF_NATIVE_REQUEST_V1_ANCHOR_SIZE), and the current one, which appends L3b's sizing detail (size_price, reduce_basis). A caller compiled against an earlier layout keeps working unchanged and simply gets the later tails' defaults (RAW, WORKING, RESOLVED, AT_MATCH). Any other struct_size is PF_NATIVE_E_STRUCT. Both tails are append-only: nothing above them moved.
Definition at line 992 of file native_c_api.h.
| uint32_t pf_native_request_v1::struct_size |
sizeof(pf_native_request_v1).
Definition at line 993 of file native_c_api.h.
| uint32_t pf_native_request_v1::version |
PF_NATIVE_API_VERSION.
Definition at line 994 of file native_c_api.h.
| uint32_t pf_native_request_v1::intent |
Definition at line 997 of file native_c_api.h.
| uint32_t pf_native_request_v1::reduce_size |
pf_native_reduction_t, REDUCE only.
Definition at line 998 of file native_c_api.h.
Referenced by submit().
| uint32_t pf_native_request_v1::reduce_claim |
pf_native_scope_claim_t, SCOPE_FRACTION only.
Definition at line 999 of file native_c_api.h.
| uint32_t pf_native_request_v1::side |
pf_native_side_t, SIZED only.
Definition at line 1000 of file native_c_api.h.
| uint32_t pf_native_request_v1::size_basis |
pf_native_size_basis_t, SIZED only.
Definition at line 1001 of file native_c_api.h.
| uint32_t pf_native_request_v1::size_time |
pf_native_size_time_t, SIZED only.
Definition at line 1002 of file native_c_api.h.
| uint32_t pf_native_request_v1::grid_policy |
pf_native_grid_policy_t, SIZED only.
Definition at line 1003 of file native_c_api.h.
| uint32_t pf_native_request_v1::reserve_percent_fee |
0/1, SIZED only.
Definition at line 1004 of file native_c_api.h.
| double pf_native_request_v1::intent_value |
The intent's own scalar; see pf_native_intent_t.
Definition at line 1005 of file native_c_api.h.
| uint32_t pf_native_request_v1::trigger |
| uint32_t pf_native_request_v1::anchor |
pf_native_anchor_t (L7).
Definition at line 1009 of file native_c_api.h.
| double pf_native_request_v1::p1 |
Limit/stop price, or trail offset.
Definition at line 1010 of file native_c_api.h.
Referenced by submit().
| double pf_native_request_v1::p2 |
Stop-limit limit, or trail arm price.
Definition at line 1011 of file native_c_api.h.
| double pf_native_request_v1::anchor_offset |
FROM_OWNER_FILL: signed offset.
Definition at line 1012 of file native_c_api.h.
| uint8_t pf_native_request_v1::fill_through |
LIMIT only: market-if-touched.
Definition at line 1013 of file native_c_api.h.
| uint8_t pf_native_request_v1::trail_offset_in_ticks |
TRAIL: p1 is a tick count, not a distance.
Definition at line 1014 of file native_c_api.h.
| uint8_t pf_native_request_v1::trail_has_arm_price |
TRAIL: p2 is the arm price.
Definition at line 1015 of file native_c_api.h.
| uint8_t pf_native_request_v1::anchor_offset_in_ticks |
FROM_OWNER_FILL: the offset is a tick count.
Definition at line 1016 of file native_c_api.h.
| uint32_t pf_native_request_v1::capacity |
Definition at line 1019 of file native_c_api.h.
| double pf_native_request_v1::capacity_units |
POINT_BUDGET only.
Definition at line 1020 of file native_c_api.h.
| uint32_t pf_native_request_v1::owner |
Definition at line 1023 of file native_c_api.h.
| uint32_t pf_native_request_v1::owner_n |
Length of owner_incarnations.
Definition at line 1024 of file native_c_api.h.
| const uint64_t* pf_native_request_v1::owner_incarnations |
Borrowed for the call only.
Definition at line 1025 of file native_c_api.h.
| int64_t pf_native_request_v1::owner_cycle |
BIND_OPENING / BIND_OPENINGS.
Definition at line 1026 of file native_c_api.h.
| uint64_t pf_native_request_v1::cohort |
BIND_COHORT.
Definition at line 1027 of file native_c_api.h.
| uint32_t pf_native_request_v1::group_kind |
Definition at line 1030 of file native_c_api.h.
| uint32_t pf_native_request_v1::group_effect |
Definition at line 1031 of file native_c_api.h.
| uint64_t pf_native_request_v1::group_id |
MEMBER only.
Definition at line 1032 of file native_c_api.h.
| int64_t pf_native_request_v1::group_cohort |
MEMBER only.
Definition at line 1033 of file native_c_api.h.
| const char* pf_native_request_v1::label |
Definition at line 1037 of file native_c_api.h.
| const char* pf_native_request_v1::comment |
Definition at line 1038 of file native_c_api.h.
Referenced by submit().
| uint32_t pf_native_request_v1::anchor_rounding |
pf_native_anchor_rounding_t, FROM_OWNER_FILL only.
Definition at line 1043 of file native_c_api.h.
| uint32_t pf_native_request_v1::visibility |
pf_native_arm_visibility_t, WAIT_FOR_APPLIED only.
Definition at line 1044 of file native_c_api.h.
| uint32_t pf_native_request_v1::size_price |
pf_native_size_price_t, SIZED only.
Definition at line 1050 of file native_c_api.h.
| uint32_t pf_native_request_v1::reduce_basis |
pf_native_scope_basis_t, SCOPE_FRACTION only.
Definition at line 1051 of file native_c_api.h.