Skip to main content

pyjpx-etf

PyPI Python License Docs

A clean, beginner-friendly Python library for fetching JPX ETF portfolio composition (PCF) data, ranking ETFs by returns, and analyzing holdings.

Installation

pip install pyjpx-etf

Quick Start

import pyjpx_etf as etf

# ETF lookup (auto-syncs local DB on first use)
e = etf.ETF("1306")
print(e.info.name)       # "TOPIX連動型上場投資信託"
print(e.nav)             # total fund NAV in yen
print(e.fee)             # trust fee (%) e.g. 0.06
print(e.holdings[:3])
# [Holding(code='7203', name='トヨタ自動車', ...),
#  Holding(code='8306', name='三菱UFJフィナンシャル・グループ', ...),
#  Holding(code='6758', name='ソニーグループ', ...)]

Python API

ETF Ranking

etf.ranking()              # top 10 by 1-month return
etf.ranking("1y", n=20)    # top 20 by 1-year return
etf.ranking("ytd", n=-5)   # worst 5 by ytd return
etf.search("6857")         # which ETFs hold Advantest?
etf.search("7203", n=5)    # top 5 ETFs holding Toyota

Weight History

etf.history("1306", "6857")  # Advantest weight in TOPIX over time
etf.history("1306")          # top holdings with weight change

Language & Config

etf.config.lang = "en"          # "ja" (default) or "en"
etf.config.timeout = 60         # HTTP timeout in seconds
etf.config.request_delay = 0.5  # delay between retries

CLI

ETF Lookup

$ etf 1306

1306 — TOPIX連動型上場投資信託 (2026-02-27)
Nav: 5170億  信託報酬: 0.06%

 Code   Name                                Weight
─────  ──────────────────────────────────  ──────
 7203   トヨタ自動車                          3.7%
 8306   三菱UFJフィナンシャル・グループ    3.3%
 6501   日立製作所                            2.4%
 ...
$ etf topix --en -a     # English, all holdings
$ etf 1306 --live       # skip local DB, fetch live

ETF Ranking

$ etf rank                # top 10 by 1-month return
$ etf rank 20 1y          # top 20 by 1-year return
$ etf rank -5 ytd --en    # worst 5 by ytd, English names

Available periods: 1m (default), 3m, 6m, 1y, 3y, 5y, 10y, ytd

$ etf find 6857            # ETFs holding Advantest
$ etf find 7203 5          # top 5 ETFs holding Toyota
$ etf find 6857 --en       # English names

Weight History

$ etf history 1306 6857    # Advantest weight in TOPIX over time
$ etf history 1306         # top holdings with weight change
$ etf history 1306 --en    # English names

Database Sync

The local database auto-syncs on first use each day. To force a refresh:

$ etf sync                 # download/update
$ etf sync --force         # force re-download

ETF Screener

Screen all ETFs by trading activity, volatility, fund size, or fees. Requires the optional screen extra:

pip install 'pyjpx-etf[screen]'
$ etf screen                    # top 20 by range_pct
$ etf screen --by vol_ratio     # volume surges
$ etf screen --by aum --top 10  # top 10 by fund size

Aliases

Alias Code ETF
etf topix 1306 TOPIX連動型上場投資信託
etf 225 1321 日経225連動型上場投資信託
etf core30 1311 TOPIX Core30連動型上場投資信託
etf div50 1489 日経平均高配当株50指数連動型ETF
etf div70 1577 野村日本株高配当70連動型ETF
etf pbr 2080 PBR1倍割れ解消推進ETF
etf sox 2243 Global X 半導体 ETF
etf jpsox1 200A 日経半導体株 ETF
etf jpsox2 2644 Global X 半導体関連-日本株式 ETF

Options

$ etf --help               # show all commands
$ etf --version            # show version

Documentation

Full documentation

Open In Colab

Metadata

Release files for pyjpx-etf 0.6.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyjpx-etf 0.6.1
File Size Uploaded Provenance
pyjpx_etf-0.6.1.tar.gz 173.2 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pyjpx-etf 0.6.1
File Interpreter ABI Platform
pyjpx_etf-0.6.1-py3-none-any.whl Python 3 none any Details

Total release size: 215.5 kB

Release files / pyjpx_etf-0.6.1.tar.gz

Download URL pyjpx_etf-0.6.1.tar.gz
Size 173.2 kB
Tags Source
SHA-256 checksum
How to use checksums
89f50d9750bdf25b253a960239272742df65546e5468202602613b9639a2db71
BLAKE2b-256 checksum
How to use checksums
793fcb11a50c20aff7f8540997e88d59ef62444204c34aac74822909ae2674b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 2, 2026.

Transparency log

Release files / pyjpx_etf-0.6.1-py3-none-any.whl

Download URL pyjpx_etf-0.6.1-py3-none-any.whl
Size 42.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
417326b6298d908d608d16f8d30e6203a3416760460cc5f82a4f379f2f258872
BLAKE2b-256 checksum
How to use checksums
d3009425e53c82a6626e7167dbb4be27802f5fcc867bb0152940eb8a7b538fcc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 2, 2026.

Transparency log

Security for pyjpx-etf 0.6.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pyjpx_etf-0.6.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 2, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page