diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index 1e05d7e..f38c5b2 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -20,8 +20,8 @@ jobs: with: commit_message: Update ISIN Data commit_author: 'github-actions[bot] ' - file_pattern: "*.csv" - status_options: '--untracked-files=no' + file_pattern: "IN*.csv" + status_options: '--untracked-files=yes' tagging_message: "v${{ steps.update_data.outputs.version }}" - name: Create Release run: | diff --git a/Makefile b/Makefile index 8692d26..58999c7 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,20 @@ SHELL=/bin/bash version=`date +%Y.%-m.%-d` -all: INE INF IN9 update -INE INF IN9: +all: INE INF IN9 IN0 IN1 IN2 IN3 IN4 update + +INE INF IN9 IN0 IN1 IN2 IN3 IN4: ./fetch.sh $@ old: git show HEAD^:INE.csv > /tmp/INE.csv git show HEAD^:INF.csv > /tmp/INF.csv git show HEAD^:IN9.csv > /tmp/IN9.csv + git show HEAD^:IN0.csv > /tmp/IN0.csv + git show HEAD^:IN1.csv > /tmp/IN1.csv + git show HEAD^:IN2.csv > /tmp/IN2.csv + git show HEAD^:IN3.csv > /tmp/IN3.csv + git show HEAD^:IN4.csv > /tmp/IN4.csv release.md: old python3 diff.py > release.md diff --git a/README.md b/README.md index bd5bcca..aecfcf5 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ Automatically updated every midnight (IST). `INE.csv`|Company, Statuatory Corporation, Banking Company|Yes `INF.csv`|Mutual Funds|Yes `IN9.csv`|Partly paid up shares|Yes +`IN0.csv`|Government Securities|Yes **Note**: The [NSDL Website][nsdl] returns zero valid results for `INA, INB`, so those are not tracked. @@ -121,6 +122,11 @@ Union Territories|`D` Company, Statuatory Corporation, Banking Company|`E` Mutual Funds|`F` Partly Paidup Shares|`G` +Central Government Security|`0` +State Government Security|`1` +State Government Security|`2` +State Government Security|`3` +State Government Security|`4` ### Issuer Code diff --git a/datapackage.json b/datapackage.json index a3c9166..73106d2 100644 --- a/datapackage.json +++ b/datapackage.json @@ -164,7 +164,247 @@ } ] }, - "title": "India ISIN (Company, Statuatory Corporation, Banking Company)" + "title": "India ISIN (Partly Paid up shares)" + }, + { + "description": "Indian ISINs for Central Government Securities. These are ISINs starting with IN0.", + "encoding": "utf-8", + "format": "csv", + "mediatype": "text/csv", + "name": "india-isin-in0", + "path": "IN0.csv", + "schema": { + "fields": [ + { + "description": "ISIN code for the security", + "example": "INF00XX01093", + "name": "ISIN", + "title": "ISIN Code", + "type": "string" + }, + { + "description": "Description for the security", + "example": "UTI MUTUAL FUND LIQUID FUND REG GROWTH", + "name": "Description", + "title": "Security Description", + "type": "string" + }, + { + "description": "Name of the issuer that issued this security", + "example": "UTI MUTUAL FUND", + "name": "Issuer", + "title": "Name of the Issuer", + "type": "string" + }, + { + "description": "Description of the type of security", + "example": "MUTUAL FUND UNIT (TRASE)", + "name": "Type", + "title": "Issuer Type", + "type": "string" + }, + { + "description": "ISIN Status (such as Deleted, Active, Suspended)", + "example": "ACTIVE", + "name": "Status", + "title": "Security Status", + "type": "string" + } + ] + }, + "title": "India ISIN (Central Government Securities)" + }, + { + "description": "Indian ISINs for State Government Securities. These are ISINs starting with IN1.", + "encoding": "utf-8", + "format": "csv", + "mediatype": "text/csv", + "name": "india-isin-in1", + "path": "IN1.csv", + "schema": { + "fields": [ + { + "description": "ISIN code for the security", + "example": "INF00XX01093", + "name": "ISIN", + "title": "ISIN Code", + "type": "string" + }, + { + "description": "Description for the security", + "example": "UTI MUTUAL FUND LIQUID FUND REG GROWTH", + "name": "Description", + "title": "Security Description", + "type": "string" + }, + { + "description": "Name of the issuer that issued this security", + "example": "UTI MUTUAL FUND", + "name": "Issuer", + "title": "Name of the Issuer", + "type": "string" + }, + { + "description": "Description of the type of security", + "example": "MUTUAL FUND UNIT (TRASE)", + "name": "Type", + "title": "Issuer Type", + "type": "string" + }, + { + "description": "ISIN Status (such as Deleted, Active, Suspended)", + "example": "ACTIVE", + "name": "Status", + "title": "Security Status", + "type": "string" + } + ] + }, + "title": "India ISIN (State Government Securities)" + }, + { + "description": "Indian ISINs for State Government Securities. These are ISINs starting with IN2.", + "encoding": "utf-8", + "format": "csv", + "mediatype": "text/csv", + "name": "india-isin-in2", + "path": "IN2.csv", + "schema": { + "fields": [ + { + "description": "ISIN code for the security", + "example": "INF00XX01093", + "name": "ISIN", + "title": "ISIN Code", + "type": "string" + }, + { + "description": "Description for the security", + "example": "UTI MUTUAL FUND LIQUID FUND REG GROWTH", + "name": "Description", + "title": "Security Description", + "type": "string" + }, + { + "description": "Name of the issuer that issued this security", + "example": "UTI MUTUAL FUND", + "name": "Issuer", + "title": "Name of the Issuer", + "type": "string" + }, + { + "description": "Description of the type of security", + "example": "MUTUAL FUND UNIT (TRASE)", + "name": "Type", + "title": "Issuer Type", + "type": "string" + }, + { + "description": "ISIN Status (such as Deleted, Active, Suspended)", + "example": "ACTIVE", + "name": "Status", + "title": "Security Status", + "type": "string" + } + ] + }, + "title": "India ISIN (State Government Securities - 2)" + }, + { + "description": "Indian ISINs for State Government Securities. These are ISINs starting with IN3.", + "encoding": "utf-8", + "format": "csv", + "mediatype": "text/csv", + "name": "india-isin-in3", + "path": "IN3.csv", + "schema": { + "fields": [ + { + "description": "ISIN code for the security", + "example": "INF00XX01093", + "name": "ISIN", + "title": "ISIN Code", + "type": "string" + }, + { + "description": "Description for the security", + "example": "UTI MUTUAL FUND LIQUID FUND REG GROWTH", + "name": "Description", + "title": "Security Description", + "type": "string" + }, + { + "description": "Name of the issuer that issued this security", + "example": "UTI MUTUAL FUND", + "name": "Issuer", + "title": "Name of the Issuer", + "type": "string" + }, + { + "description": "Description of the type of security", + "example": "MUTUAL FUND UNIT (TRASE)", + "name": "Type", + "title": "Issuer Type", + "type": "string" + }, + { + "description": "ISIN Status (such as Deleted, Active, Suspended)", + "example": "ACTIVE", + "name": "Status", + "title": "Security Status", + "type": "string" + } + ] + }, + "title": "India ISIN (State Government Securities - 3)" + }, + { + "description": "Indian ISINs for State Government Securities. These are ISINs starting with IN4.", + "encoding": "utf-8", + "format": "csv", + "mediatype": "text/csv", + "name": "india-isin-in4", + "path": "IN4.csv", + "schema": { + "fields": [ + { + "description": "ISIN code for the security", + "example": "INF00XX01093", + "name": "ISIN", + "title": "ISIN Code", + "type": "string" + }, + { + "description": "Description for the security", + "example": "UTI MUTUAL FUND LIQUID FUND REG GROWTH", + "name": "Description", + "title": "Security Description", + "type": "string" + }, + { + "description": "Name of the issuer that issued this security", + "example": "UTI MUTUAL FUND", + "name": "Issuer", + "title": "Name of the Issuer", + "type": "string" + }, + { + "description": "Description of the type of security", + "example": "MUTUAL FUND UNIT (TRASE)", + "name": "Type", + "title": "Issuer Type", + "type": "string" + }, + { + "description": "ISIN Status (such as Deleted, Active, Suspended)", + "example": "ACTIVE", + "name": "Status", + "title": "Security Status", + "type": "string" + } + ] + }, + "title": "India ISIN (State Government Securities - 4)" } ], "sources": [ diff --git a/diff.py b/diff.py index 0b1cfc4..0a8bea8 100644 --- a/diff.py +++ b/diff.py @@ -11,7 +11,7 @@ def chunks(lst, n): for i in range(0, len(lst), n): yield lst[i:i + n] -for i in ['E', 'F', '9']: +for i in ['E', 'F', '9', '0', '1', '2', '3', '4']: diff = compare( load_csv(open("/tmp/IN%s.csv" % i), key="ISIN"), load_csv(open("IN%s.csv" % i), key="ISIN"),