Skip to main content

Python SDK for the hosted safin Seeking Alpha market-data API.

Project description

safin Python SDK

Python SDK for safin, the hosted Seeking Alpha market-data API.

pip install safin
from safin import Client

sa = Client(contact="you@example.com")

quote = sa.quote("GRAB")
ratios = sa.metrics_ratios("GRAB", fields=["pe_ratio", "ps_ratio"])
valuation = sa.valuation("GRAB")
history = sa.historical_prices("GRAB", start="2026-04-01", end="2026-05-05")
chain = sa.options_chain(ticker_id=605799, expiration_date="2026-05-15")

The default base URL is the verified Worker deployment:

https://safin-api.crombiesamuel.workers.dev

Override it with SAFIN_BASE_URL or Client(base_url=...). The configured custom domain target is https://api.safin.bluedoor.sh once DNS is live.

Public Methods

  • Discovery: health(), endpoints(), openapi()
  • Quotes: quote(symbol), quotes(symbols), quotes_by_id(sa_ids)
  • Options: options_by_symbols(symbols), options_chain(ticker_id, expiration_date), options_expirations(symbol)
  • Metrics and fundamentals: metrics_ratios(symbol), metrics_market(symbol), symbol_data(symbol), valuation(symbol), estimates(ticker_id), fundamentals(symbol), fundamentals_metrics(symbol)
  • History and ownership: historical_prices(symbol), shares(symbol)
  • News: news(symbol)

All methods return the hosted API's JSON envelope as a dict.

Identity

  • Anonymous: works without configuration.
  • Contact tier: Client(contact="you@example.com") sends X-Safin-Contact.
  • Manual API key tier: Client(api_key="...") sends Authorization: Bearer ....

Environment variables: SAFIN_BASE_URL, SAFIN_CONTACT, SAFIN_API_KEY.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

safin-0.1.0.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

safin-0.1.0-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file safin-0.1.0.tar.gz.

File metadata

  • Download URL: safin-0.1.0.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for safin-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b900358bd04b19865f3c85d295e8e1fddd2709e61d7138b5bfd754b3efec7017
MD5 79c39c0a3757f404b5c564cbe1648de2
BLAKE2b-256 95c71dce94d462040f87a30f0408c8076d5deb6a7a2203f6a9ca05cc178ab437

See more details on using hashes here.

Provenance

The following attestation bundles were made for safin-0.1.0.tar.gz:

Publisher: publish-safin-python.yml on bluedoor-ai/safin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file safin-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: safin-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for safin-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 68b64d2f7268a45c7648e2d8a5c83baaf9a5c096fbaf6fe85d8b1681f0521c81
MD5 7ff5d9601572e3eb84a1cbbd6f201180
BLAKE2b-256 37570fe7bde74143836fc18a54e0ab1fd21b73761e6d592172b516a33787d89c

See more details on using hashes here.

Provenance

The following attestation bundles were made for safin-0.1.0-py3-none-any.whl:

Publisher: publish-safin-python.yml on bluedoor-ai/safin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page