PineForge unreleased
Deterministic PineScript v6 backtest runtime — C ABI reference
Loading...
Searching...
No Matches
pf_native_request_v1 Struct 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.
 
double trail_best_seed
 TRAIL: where the running best starts — a floor on it, the favourable one of this level and the arm's own print.
 
uint8_t trail_has_best_seed
 TRAIL: trail_best_seed is set.
 
uint8_t reserved2 [7]
 Must be 0.
 
uint32_t arm_first_match
 pf_native_arm_first_match_t.
 
uint32_t arm_scope
 pf_native_arm_scope_t.
 

Detailed Description

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 FIVE 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), that plus L3b's sizing detail size_price, reduce_basis (PF_NATIVE_REQUEST_V1_SIZING_SIZE), that plus E14's trail seed (trail_best_seed, trail_has_best_seed; PF_NATIVE_REQUEST_V1_SEED_SIZE), and the current one, which appends the arm relation (arm_first_match, arm_scope). A caller compiled against an earlier layout keeps working unchanged and simply gets the later tails' defaults (RAW, WORKING, RESOLVED, AT_MATCH, no seed, AT_ARM_PRINT, OWNER_LOT). Any other struct_size is PF_NATIVE_E_STRUCT. Every tail is append-only: nothing above it moved.

Definition at line 2144 of file native_c_api.h.

Field Documentation

◆ struct_size

uint32_t pf_native_request_v1::struct_size

sizeof(pf_native_request_v1).

Definition at line 2145 of file native_c_api.h.

◆ version

uint32_t pf_native_request_v1::version

PF_NATIVE_API_VERSION.

Definition at line 2146 of file native_c_api.h.

◆ intent

uint32_t pf_native_request_v1::intent

pf_native_intent_t.

Definition at line 2149 of file native_c_api.h.

◆ reduce_size

uint32_t pf_native_request_v1::reduce_size

pf_native_reduction_t, REDUCE only.

Definition at line 2150 of file native_c_api.h.

◆ reduce_claim

uint32_t pf_native_request_v1::reduce_claim

pf_native_scope_claim_t, SCOPE_FRACTION only.

Definition at line 2151 of file native_c_api.h.

◆ side

uint32_t pf_native_request_v1::side

pf_native_side_t, SIZED only.

Definition at line 2152 of file native_c_api.h.

◆ size_basis

uint32_t pf_native_request_v1::size_basis

pf_native_size_basis_t, SIZED only.

Definition at line 2153 of file native_c_api.h.

◆ size_time

uint32_t pf_native_request_v1::size_time

pf_native_size_time_t, SIZED only.

Definition at line 2154 of file native_c_api.h.

◆ grid_policy

uint32_t pf_native_request_v1::grid_policy

pf_native_grid_policy_t, SIZED only.

Definition at line 2155 of file native_c_api.h.

◆ reserve_percent_fee

uint32_t pf_native_request_v1::reserve_percent_fee

0/1, SIZED only.

Definition at line 2156 of file native_c_api.h.

◆ intent_value

double pf_native_request_v1::intent_value

The intent's own scalar; see pf_native_intent_t.

Definition at line 2157 of file native_c_api.h.

◆ trigger

uint32_t pf_native_request_v1::trigger

pf_native_trigger_t.

Definition at line 2160 of file native_c_api.h.

◆ anchor

uint32_t pf_native_request_v1::anchor

pf_native_anchor_t (L7).

Definition at line 2161 of file native_c_api.h.

◆ p1

double pf_native_request_v1::p1

Limit/stop price, or trail offset.

Definition at line 2162 of file native_c_api.h.

◆ p2

double pf_native_request_v1::p2

Stop-limit limit, or trail arm price.

Definition at line 2163 of file native_c_api.h.

◆ anchor_offset

double pf_native_request_v1::anchor_offset

FROM_OWNER_FILL: signed offset.

Definition at line 2164 of file native_c_api.h.

◆ fill_through

uint8_t pf_native_request_v1::fill_through

LIMIT only: market-if-touched.

Definition at line 2165 of file native_c_api.h.

◆ trail_offset_in_ticks

uint8_t pf_native_request_v1::trail_offset_in_ticks

TRAIL: p1 is a tick count, not a distance.

Definition at line 2166 of file native_c_api.h.

◆ trail_has_arm_price

uint8_t pf_native_request_v1::trail_has_arm_price

TRAIL: p2 is the arm price.

Definition at line 2167 of file native_c_api.h.

◆ anchor_offset_in_ticks

uint8_t pf_native_request_v1::anchor_offset_in_ticks

FROM_OWNER_FILL: the offset is a tick count.

Definition at line 2168 of file native_c_api.h.

◆ capacity

uint32_t pf_native_request_v1::capacity

pf_native_capacity_t.

Definition at line 2171 of file native_c_api.h.

◆ capacity_units

double pf_native_request_v1::capacity_units

POINT_BUDGET only.

Definition at line 2172 of file native_c_api.h.

◆ owner

uint32_t pf_native_request_v1::owner

pf_native_owner_t.

Definition at line 2175 of file native_c_api.h.

◆ owner_n

uint32_t pf_native_request_v1::owner_n

Length of owner_incarnations.

Definition at line 2176 of file native_c_api.h.

◆ owner_incarnations

const uint64_t* pf_native_request_v1::owner_incarnations

Borrowed for the call only.

Definition at line 2177 of file native_c_api.h.

◆ owner_cycle

int64_t pf_native_request_v1::owner_cycle

BIND_OPENING / BIND_OPENINGS.

Definition at line 2178 of file native_c_api.h.

◆ cohort

uint64_t pf_native_request_v1::cohort

BIND_COHORT.

Definition at line 2179 of file native_c_api.h.

◆ group_kind

uint32_t pf_native_request_v1::group_kind

pf_native_group_t.

Definition at line 2182 of file native_c_api.h.

◆ group_effect

uint32_t pf_native_request_v1::group_effect

pf_native_group_effect_t.

Definition at line 2183 of file native_c_api.h.

◆ group_id

uint64_t pf_native_request_v1::group_id

MEMBER only.

Definition at line 2184 of file native_c_api.h.

◆ group_cohort

int64_t pf_native_request_v1::group_cohort

MEMBER only.

Definition at line 2185 of file native_c_api.h.

◆ label

const char* pf_native_request_v1::label

Definition at line 2189 of file native_c_api.h.

◆ comment

const char* pf_native_request_v1::comment

Definition at line 2190 of file native_c_api.h.

◆ anchor_rounding

uint32_t pf_native_request_v1::anchor_rounding

pf_native_anchor_rounding_t, FROM_OWNER_FILL only.

Definition at line 2195 of file native_c_api.h.

◆ visibility

uint32_t pf_native_request_v1::visibility

pf_native_arm_visibility_t, WAIT_FOR_APPLIED only.

Definition at line 2196 of file native_c_api.h.

◆ size_price

uint32_t pf_native_request_v1::size_price

pf_native_size_price_t, SIZED only.

Definition at line 2202 of file native_c_api.h.

◆ reduce_basis

uint32_t pf_native_request_v1::reduce_basis

pf_native_scope_basis_t, SCOPE_FRACTION only.

Definition at line 2203 of file native_c_api.h.

◆ trail_best_seed

double pf_native_request_v1::trail_best_seed

TRAIL: where the running best starts — a floor on it, the favourable one of this level and the arm's own print.

Absolute (an anchor moves the arm threshold, not this), finite and positive, else PF_NATIVE_E_REJECTED. It is a submission input: the working readback carries the live best, not the seed — see the asymmetry note above.

Definition at line 2209 of file native_c_api.h.

◆ trail_has_best_seed

uint8_t pf_native_request_v1::trail_has_best_seed

TRAIL: trail_best_seed is set.

Definition at line 2218 of file native_c_api.h.

◆ reserved2

uint8_t pf_native_request_v1::reserved2[7]

Must be 0.

The seed layout's own padding, named so the tail below starts where that layout's sizeof ended.

Definition at line 2219 of file native_c_api.h.

◆ arm_first_match

uint32_t pf_native_request_v1::arm_first_match

pf_native_arm_first_match_t.

Definition at line 2227 of file native_c_api.h.

◆ arm_scope

uint32_t pf_native_request_v1::arm_scope

pf_native_arm_scope_t.

Definition at line 2228 of file native_c_api.h.


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