All calls below use the base URL and header from Authentication:
export BASE_URL=https://api.scripxhq.com and X-ScripX-Key: $SCRIPX_KEY. Run the whole flow in the sandbox first with a scripx_test_… key.1. Register every entity in the group
Each company in the group is its own firm, keyed by its own IEC, registered and verified individually. A firm registers as the side it trades,exporter or importer.
2. Read the group book
GET /v1/group/positions returns your book aggregated by company and scheme, already shaped the way the netting plan expects it.
net_paise is surplus credit; negative is duty demand.
3. Compute the netting plan
Feed those positions toPOST /v1/group/net-plan. It returns the minimal set of internal transfers that squares the group, plus the residual left over.
4. Book each internal transfer
Execute each transfer in the plan as an intra-group cross withkind: "intra_group". Price it first so both legs are known before you commit.
5. Take the residual to market
Whatever the plan reports asresidual_paise is the group’s real market exposure. Trade it as an ordinary order on the side the residual falls, with a price floor or ceiling.
6. Reconcile across the whole group
- Statements itemise the period across every entity on your key.
- The audit export is hash-chained and verifiable offline, covering internal transfers and market trades alike.
- Each entity keeps its own
expiry_dateper credit, so watch validity before parking surplus inside the group.