
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
The official Python SDK for the Laplace stock data platform. Get easy access to stock data, collections, financials, funds, and AI-powered insights.
pip install laplace-python-sdk
from laplace import LaplaceClient
# Initialize the client
client = LaplaceClient(api_key="your-api-key")
# Get stock details
stock = client.stocks.get_detail_by_symbol(symbol="AAPL", region="us")
print(f"{stock.name}: {stock.description}")
# Get all stocks in a region
stocks = client.stocks.get_all(region="us", page=1, page_size=10)
for stock in stocks:
print(f"{stock.symbol}: {stock.name}")
# Get collections
collections = client.collections.get_collections(region="tr", locale="en")
for collection in collections:
print(f"{collection.title}: {collection.num_stocks} stocks")
# Get collection details
collection_detail = client.collections.get_collection_detail(
collection_id="620f455a0187ade00bb0d55f",
region="tr"
)
print(f"Stocks in {collection_detail.title}:")
for stock in collection_detail.stocks:
print(f" {stock.symbol}: {stock.name}")
# Get all stocks with pagination
stocks = client.stocks.get_all(region="us", page=1, page_size=10)
# Get stock detail by symbol
stock = client.stocks.get_detail_by_symbol(symbol="AAPL", region="us", asset_class="equity")
# Get stock detail by ID
stock = client.stocks.get_detail_by_id(stock_id="stock-id", locale="en")
# Get historical prices
prices = client.stocks.get_price(region="us", symbols=["AAPL", "GOOGL"], keys=["1D", "1W"])
# Get historical prices with custom interval
from datetime import datetime
from laplace.stocks import HistoricalPriceInterval
prices = client.stocks.get_price_with_interval(
symbol="AAPL",
region="us",
from_date=datetime(2024, 1, 1),
to_date=datetime(2024, 1, 31),
interval=HistoricalPriceInterval.ONE_DAY
)
# Get tick rules (Turkey only)
rules = client.stocks.get_tick_rules(region="tr")
# Get restrictions (Turkey only)
restrictions = client.stocks.get_restrictions(region="tr")
# Get all collections
collections = client.collections.get_collections(region="tr", locale="en")
# Get collection detail
detail = client.collections.get_collection_detail(collection_id="id", region="tr")
# Get themes
themes = client.collections.get_themes(region="tr", locale="en")
# Get theme detail
theme_detail = client.collections.get_theme_detail(theme_id="id", region="tr")
# Get industries
industries = client.collections.get_industries(region="tr", locale="en")
# Get industry detail
industry_detail = client.collections.get_industry_detail(industry_id="id", region="tr")
# Get sectors
sectors = client.collections.get_sectors(region="tr", locale="en")
# Get sector detail
sector_detail = client.collections.get_sector_detail(sector_id="id", region="tr")
from laplace import LaplaceClient, LaplaceAPIError
client = LaplaceClient(api_key="your-api-key")
try:
stock = client.stocks.get_detail_by_symbol(symbol="INVALID", region="us")
except LaplaceAPIError as e:
print(f"API Error: {e}")
print(f"Status Code: {e.status_code}")
print(f"Response: {e.response}")
Get your API key from the Laplace platform and initialize the client:
client = LaplaceClient(api_key="your-api-key-here")
git clone https://github.com/Laplace-Analytics/laplace-python-sdk.git
cd laplace-python-sdk
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -e ".[dev]"
# Run all tests
pytest
# Run with coverage
pytest --cov=laplace
# Run integration tests (requires API key)
LAPLACE_API_KEY=your-key pytest -m integration
Full API documentation is available at laplace.finfree.co/en/docs
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
Python SDK for Laplace stock data platform
We found that laplace-python-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.ย It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.