Skip to main content

Swedish Market Insights

SMI is a small package for fetching inside trades made in Sweden. The data is collected with requests and parsed with BeautifulSoup4 and returned as a pandas.DataFrame.

All data is publicly available on Finansinspektionen's website.

Installation

pip install swedish-market-insights

Usage

from swedish_market_insights.inside_trades import InsideTradesAPI
from swedish_market_insights.short_positions import ShortPositionsAPI

recent_inside_trades = InsideTradesAPI.get_trades_by_transaction_date()
current_short_positions = ShortPositionsAPI.get_current_short_positions()

Features

Inside Trades

  • Fetch inside trades by transaction date
  • Fetch inside trades by publication date

Short Positions

  • Fetch current short positions
  • Fetch historical short positions
  • Fetch aggregated short positions

Examples

Fetch inside trades by transaction date

from swedish_market_insights.inside_trades import InsideTradesAPI
from datetime import date

trades = InsideTradesAPI.get_trades_by_transaction_date(
    from_date=date(2020, 1, 1),
    to_date=date(2020, 1, 31))

Fetch inside trades by publication date

from swedish_market_insights.inside_trades import InsideTradesAPI
from datetime import date

trades = InsideTradesAPI.get_trades_by_publish_date(
    from_date=date(2022, 10, 8),
    to_date=date(2022, 10, 10))

Fetch current short positions

from swedish_market_insights.short_positions import ShortPositionsAPI

current_short_positions = ShortPositionsAPI.get_current_short_positions()

Contributing

Contributions are welcome! Please open an issue or submit a pull request on GitHub if you have any suggestions or improvements.

License

This project is licensed under the MIT License.

Metadata

Release files for swedish-market-insights 0.3.0

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

Source distribution (sdist)

Source distribution for swedish-market-insights 0.3.0
File Size Uploaded Provenance
swedish_market_insights-0.3.0.tar.gz 3.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for swedish-market-insights 0.3.0
File Interpreter ABI Platform
swedish_market_insights-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.9 kB

Release files / swedish_market_insights-0.3.0.tar.gz

Download URL swedish_market_insights-0.3.0.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
da108937dd6b3ce1fa4647cea05b47bbb6f9f071d752003ce0e4ab7962c8e76d
BLAKE2b-256 checksum
How to use checksums
503fd092619c0f07ccb616906f0154c61edb784dd7dc666d00e2022bb18d234b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.2 CPython/3.9.16 Linux/5.15.0-1036-azure

Release files / swedish_market_insights-0.3.0-py3-none-any.whl

Download URL swedish_market_insights-0.3.0-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
82cb41835d89e233c64bba2b46e3808d1ab67536c1209aa891c1736ad060729f
BLAKE2b-256 checksum
How to use checksums
ec8ed53898d0a19f5aab14e573ed517704e0ebb3de2cf43383af97d75b214d92
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.2 CPython/3.9.16 Linux/5.15.0-1036-azure

Security for swedish-market-insights 0.3.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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