Skip to main content

A comprehensive Python SDK for accessing the Tel Aviv Stock Exchange (TASE) DataWise API

Project description

TasePy - TASE DataWise API Python SDK

A comprehensive Python SDK for accessing the Tel Aviv Stock Exchange (TASE) DataWise API. Provides typed clients, request builders, and response models for funds and indices data.

Scope and Limitations

This SDK currently implements the 4 free API endpoints from TASE DataHub:

  • Funds - Fund listings, classifications, and exposure data
  • Indices Basic - Index listings and components
  • Indices Online - Real-time index rates and intraday data
  • Securities Basic - Security listings, company data, and trading information

TASE DataHub offers additional premium API products beyond these free endpoints. For the complete catalog of available APIs and pricing, visit the official TASE DataHub.

Future versions of TasePy may expand to include additional endpoints based on community needs and contributions.

Quick Start

Installation

pip install tasepy

Requirements

Valid TASE DataWise API key, can be obtained at datahub

Basic Usage

import tasepy

# Create a client with default settings
client = tasepy.quick_client()

# Get list of all funds
funds = client.funds.get_funds()
print(f"Found {len(funds.results)} funds")

# Get basic indices information
indices = client.indices_basic.get_indices_list()
print(f"Found {len(indices.results)} indices")

API Key Setup

The SDK provides multiple flexible ways to configure your API key:

Quick Start (Default)

import tasepy
# Uses TASE_API_KEY environment variable by default
client = tasepy.quick_client()

All Configuration Options

1. Direct API Key

from tasepy.settings import SettingsBuilder
settings = SettingsBuilder().with_apikey(key="your-direct-api-key").build()
client = tasepy.quick_client(settings_instance=settings)

2. Custom Environment Variable

# You can use any environment variable name you prefer
settings = SettingsBuilder().with_apikey(environment="MY_CUSTOM_API_KEY").build()
client = tasepy.quick_client(settings_instance=settings)

3. YAML File

settings = SettingsBuilder().with_apikey(file_path="path/to/your/key.yaml").build()
client = tasepy.quick_client(settings_instance=settings)

4. Custom Provider Function

def get_api_key():
    # Your custom logic to retrieve API key
    return "your-api-key"

settings = SettingsBuilder().with_apikey(key_provider=get_api_key).build()
client = tasepy.quick_client(settings_instance=settings)

Environment Variable Setup

Default Environment Variable (TASE_API_KEY)

export TASE_API_KEY="your-tase-api-key"

Custom Environment Variable

export MY_CUSTOM_API_KEY="your-tase-api-key"

YAML File Format

Create a YAML file with this structure:

key: "your-tase-api-key"

Working with Funds

import tasepy

client = tasepy.quick_client()

# Get all funds
funds = client.funds.get_funds()

# Get fund classifications
fund_types = client.funds.get_types()
classifications = client.funds.get_mutual_fund_classifications()

# Get fund exposures and profiles
currency_exposure = client.funds.get_currency_exposure_profiles()
share_exposure = client.funds.get_share_exposure_profiles()

# Get fund operational data
exchanges = client.funds.get_stock_exchanges()
tax_statuses = client.funds.get_tax_statuses()

Working with Indices

import tasepy

client = tasepy.quick_client()

# Get all indices
indices = client.indices_basic.get_indices_list() 

# Get components of a specific index (requires date)
components = client.indices_basic.get_index_components(
    index_id=709,
    date=(27, 11, 2025)
)

Advanced Usage

Custom Configuration

from tasepy.settings import SettingsBuilder
from tasepy.client import Client
from tasepy.endpoints.factories.yaml_factory import YAMLFactory
from tasepy.requests_.urls import Endpoints

# Build custom settings
settings = SettingsBuilder().with_apikey(environment="CUSTOM_API_KEY").build()

# Create client with custom configuration
client = Client(
    settings,
    YAMLFactory(Endpoints, './endpoints.yaml')
)

# Or use quick_client with custom settings
client = tasepy.quick_client(settings_instance=settings)

API Reference

Funds Methods

  • get_funds(listing_status_id=None) - Get all available funds
  • get_types() - Get fund type classifications
  • get_mutual_fund_classifications() - Get mutual fund classifications
  • get_currency_exposure_profiles() - Get currency exposure profiles
  • get_share_exposure_profiles() - Get share exposure profiles
  • get_stock_exchanges() - Get stock exchange information
  • get_tax_statuses() - Get tax status classifications
  • get_listing_statuses() - Get listing status information
  • get_payment_policies() - Get payment policy information
  • get_commissions() - Get distribution commission data
  • get_tracking_funds_classifications() - Get tracking fund classifications
  • get_underlying_assets() - Get underlying asset information

Indices Basic Methods

  • get_indices_list() - Get all available indices
  • get_index_components(index_id, date) - Get components of a specific index for a given date

Indices Online Methods

  • get_intraday(index_id=None, start_time=None) - Get intraday index prices with real-time monitoring data
  • get_last_rate(index_id=None) - Get latest price updates for online indices with current rates and changes
  • get_trading_rate_types() - Get index trading rate type classifications

Securities Basic Methods

  • get_trade_securities_list(year, month, day) - Get traded securities list for a specific date with extensive trading data
  • get_delisted_securities_list(year, month) - Get delisted securities list for a specific year and month period
  • get_companies_list() - Get companies list for securities listed on the Tel Aviv Stock Exchange
  • get_illiquid_maintenance_suspension_list() - Get maintenance, suspension and illiquid securities lists for next trading day
  • get_trading_code_list() - Get trading codes list providing reference codes for securities trading operations
  • get_securities_types() - Get securities types classifications for different security instruments traded on TASE

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

We welcome contributions to TasePy! Here's how you can help:

Getting Started

  1. Fork the repository on GitHub
  2. Clone your fork locally:
    git clone https://github.com/your-username/tasepy.git
    cd tasepy
    
  3. Set up development environment:
    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    pip install -r requirements.txt
    pip install -r dev-requirements.txt
    

Running Tests

This package has been validated across Python versions 3.10-3.13 using GitHub Codespaces for consistent, isolated testing environments.

# Install development dependencies
pip install -r dev-requirements.txt

# Run all tests
pytest

# Run specific test categories
pytest tests/unit/          # Unit tests only
pytest tests/integration/   # Integration tests (requires API key)

Multi-Version Testing

For contributors interested in cross-version validation, we maintain a testing repository configured with GitHub Codespaces environments for Python 3.10-3.13 testing.

AI Coding Assistance

If you're using AI coding agents (like Claude Code), this repository includes helpful configuration:

  • CLAUDE.md: Contains project-specific instructions, development commands, architecture overview, and coding guidelines for AI assistants
  • .claude/ folder: Contains specialized commands and templates for common development tasks

These files help AI assistants understand the project structure, testing procedures, and development workflows, making AI-assisted development more effective.

Code of Conduct

This project follows a standard Code of Conduct. Please be respectful and constructive in all interactions.

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

tasepy-0.2.1.tar.gz (25.9 kB view details)

Uploaded Source

Built Distribution

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

tasepy-0.2.1-py3-none-any.whl (40.2 kB view details)

Uploaded Python 3

File details

Details for the file tasepy-0.2.1.tar.gz.

File metadata

  • Download URL: tasepy-0.2.1.tar.gz
  • Upload date:
  • Size: 25.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for tasepy-0.2.1.tar.gz
Algorithm Hash digest
SHA256 3215d5e1b7b3a7e8650a9d4b4e60b5e77f0ae81aad60b3e1c3811c4af028ee11
MD5 dd6a2589e76dcfbb0f3efd38d189157c
BLAKE2b-256 8cf75ea7ef9c08a3f8618206454a69ccdefa92c2f7895070242bb2fd15c9c3bf

See more details on using hashes here.

File details

Details for the file tasepy-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: tasepy-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 40.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for tasepy-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1060698f74360969d9fc2410758eb2aed2bf6766f74b0a381e15b2a6968bace3
MD5 c74e1410fa705ae544188f177ac00b68
BLAKE2b-256 b141777b219cf426a131737e870c000f644eec6249d5b7540b52caac277d80f3

See more details on using hashes here.

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