# techfanetechnologies/zerodhastrikesallowedtotrade architecture

> Architecture diagram of the GitHub repository techfanetechnologies/zerodhastrikesallowedtotrade, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/techfanetechnologies/zerodhastrikesallowedtotrade
- Repository: https://github.com/techfanetechnologies/zerodhastrikesallowedtotrade

## Overview

This small Python script fetches Zerodha’s allowed-contract data for Bank Nifty, Nifty, and FinNifty, parses the page, converts each instrument’s NRML/MIS ranges into structured data, and writes the result to StrikesAllowed.json. The README describes twice-daily updates, but the supplied excerpts do not show how they are scheduled or published, so those connections are not inferred.

Main entry points: [`main.py`](https://github.com/techfanetechnologies/zerodhastrikesallowedtotrade/blob/main/main.py) (Fetch allowed lists), [`StrikesAllowed.json`](https://github.com/techfanetechnologies/zerodhastrikesallowedtotrade/blob/main/StrikesAllowed.json) (Allowed strikes JSON)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Data generation"]
  node_fetch["Fetch allowed lists<br/>[main.py]"]
  node_parse["Parse strike ranges<br/>[main.py]"]
  node_output["Allowed strikes JSON"]
end

node_runner(("Script invocation"))
node_zerodha["Zerodha page"]

node_runner -->|"runs script"| node_fetch
node_fetch -->|"requests page"| node_zerodha
node_fetch -->|"returns lists"| node_parse
node_parse -->|"writes JSON"| node_output

click node_fetch "https://github.com/techfanetechnologies/zerodhastrikesallowedtotrade/blob/main/main.py"
click node_parse "https://github.com/techfanetechnologies/zerodhastrikesallowedtotrade/blob/main/main.py"
click node_output "https://github.com/techfanetechnologies/zerodhastrikesallowedtotrade/blob/main/StrikesAllowed.json"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_fetch,node_parse,node_output toneBlue
class node_runner,node_zerodha toneIndigo
```

## Components

### Data generation

- [Fetch allowed lists](https://github.com/techfanetechnologies/zerodhastrikesallowedtotrade/blob/main/main.py): `main.py`
- [Parse strike ranges](https://github.com/techfanetechnologies/zerodhastrikesallowedtotrade/blob/main/main.py): `main.py`
- [Allowed strikes JSON](https://github.com/techfanetechnologies/zerodhastrikesallowedtotrade/blob/main/StrikesAllowed.json): `StrikesAllowed.json`

### Other components

- **Script invocation**
- **Zerodha page**

## Connections

- Script invocation → Fetch allowed lists: runs script (evidence: `main.py`)
- Fetch allowed lists → Zerodha page: requests page (evidence: `main.py`)
- Fetch allowed lists → Parse strike ranges: returns lists (evidence: `main.py`)
- Parse strike ranges → Allowed strikes JSON: writes JSON (evidence: `main.py`)
