/algo-trading-skills:regional-broker-data-residency-constraintsfrom algo-trading-skills
Determines real broker data-residency constraints when deploying algorithmic trading processes. Distinguishes enforced controls (e.g. SEBI static-IP whitelisting) from non-binding hosting-region mandates.
Ships in algo-trading-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Use this skill when choosing where to run an algorithmic trading process that connects to a broker in a specific national market, and you need to know which of the constraints on that choice are real. It answers two separable questions: will the broker accept order flow from this deployment's network egress, and does any residency rule actually bind the entity doing the deploying. The first has a hard, in-force answer for Indian brokers — SEBI's 4 Feb 2025 retail-algo circular requires API order traffic to originate from a static IP whitelisted with the broker, phased in to all stock brokers by 1 Apr 2026. The second, for a client trading its own account, is usually "no": SEBI CSCRF's data-localisation standard PR.DS.S2 has been in abeyance since 31 Dec 2024, GDPR contains no localisation requirement, and SEC Rule 17a-4 imposes no hosting-region mandate.
data-localization-requirements-for-trade-records. For egress and PII minimization use cross-border-data-transfer-restrictions-for-trade-data.REVIEW_REQUIRED for those roles by design; it is a prompt for compliance, not a verdict.STATIC_DEDICATED, STATIC_SHARED (e.g. a NAT gateway shared with unrelated workloads), DYNAMIC, or UNKNOWN.CLIENT (trading its own account through the broker), REGULATED_ENTITY, or RE_VENDOR.AWS_REGION, GCP_REGION, or TRADING_HOST_REGION); probe_current_region() reads these and returns None rather than defaulting.probe_current_region() returns None when no region variable is set; an unresolved region yields REVIEW_REQUIRED, never an approval. Region names do not identify jurisdictions — eu-west-2 is London and eu-central-2 is Zurich, both outside the EEA — so the region is resolved through an explicit map and an unmapped region also escalates.requires_static_order_ip, an order-placing deployment on a DYNAMIC egress address is BLOCKED: the broker will reject the order requests regardless of what any residency analysis says. A STATIC_SHARED address is REVIEW_REQUIRED, not approved — Zerodha permits sharing a registered IP only with immediate family, and sharing beyond that risks suspension of the API key. UNKNOWN egress is likewise REVIEW_REQUIRED.places_orders=False, the static-IP requirement does not attach: market data, WebSocket, order book and position endpoints remain reachable from any address. Do not gate a data-only backfill job on an order-path control.CLIENT against the encoded brokers produces an advisory recording that no in-force mandate binds client-side hosting. REGULATED_ENTITY and RE_VENDOR produce REVIEW_REQUIRED with the jurisdiction's live obligations named — that escalation is the correct output, not a gap.us-east-1 is an ADVISORY finding about round-trip latency to the exchange, not a violation. Reporting it as a violation is how an agent learns a rule that does not exist.assert_deployable() raises BrokerDeploymentConstraintError unless the status is COMPLIANT; every non-compliant status carries is_deployable=False, so a caller that gates on that flag fails closed. Decisions are appended to engine.audit_trail as frozen records.Full procedure: see
references/workflows.md. Standards reference: seereferences/standards.md. Printable pre-flight checklist: seeassets/checklist.md.
us-east-1 for a Zerodha bot as a "SEBI data localisation violation" is regulatory misinformation: CSCRF PR.DS.S2 is in abeyance, the RBI localisation circular covers payment system data rather than client-side algo hosting, and Zerodha has stated the registered order IP need not be India-based. Fabricating the rule also hides the real one — the static IP.ap-south-1 when no region variable was set — two ways an unconfigured process passed the gate. Unknown must mean unresolved.degiro-unofficial-api-risk-assessment.BrokerDeploymentConstraintEngine. Evaluate DeploymentProfile(broker="zerodha", cloud_region="ap-south-1", egress_ip_type=EGRESS_STATIC_DEDICATED) and verify status="COMPLIANT".egress_ip_type to EGRESS_DYNAMIC and verify status="BLOCKED" with a DYNAMIC_EGRESS_IP finding; set places_orders=False on the same profile and verify it returns to COMPLIANT.us-east-1 with a dedicated static IP and verify status="COMPLIANT" with only a REGION_NOT_LATENCY_PREFERRED advisory — no blocking finding.None region, a blank region string, and "xx-nowhere-9" and verify all four return REVIEW_REQUIRED with is_deployable=False.broker="degiro", cloud_region="eu-west-2" and verify region_jurisdiction="UK", not "EU".deployer_role=ROLE_REGULATED_ENTITY and verify REVIEW_REQUIRED with a REGULATED_DEPLOYER_REVIEW finding.probe_current_region() returns None.python -m unittest discover -s skills/regional-broker-data-residency-constraints/scripts.data-localization-requirements-for-trade-recordscross-border-data-transfer-restrictions-for-trade-dataindia-sebi-algo-trading-tagging-requirementsdegiro-unofficial-api-risk-assessmentWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
broker-compliance, data-residency, static-ip, sebi, cloud-region
npx claudepluginhub himanshuj16/algo-trading-skills --plugin algo-trading-broker-integration36 skills in this plugin
/alpaca-paper-live-key-separationUse when a bot connects to the Alpaca Trading API and must never cross paper keys with the live endpoint; pins the base URL per environment, checks the key prefix, probes /v2/account and requires an explicit ALLOW_LIVE_TRADING flag./api-key-least-privilege-audit-toolUse before deploying a live bot, to audit existing broker API keys for scopes they do not need. Flags withdrawal, transfer and admin rights that turn a leaked execution key into theft./broker-account-margin-call-handlingUse when a bot trades a Reg T, portfolio or futures margin account and must act before the broker liquidates: tiered maintenance-margin warnings cross-checked against broker excess liquidity, initial-margin order gating and liquidity-aware de-leveraging.Other plugins' skills for the same job