Skip to main content

langchain-convexlake

LangChain tools for ConvexLake — a market-data API covering prediction markets (Polymarket, Kalshi, Limitless, Predict.fun) and crypto derivatives (Deribit, Binance, Hyperliquid, OKX, Bybit, Bitfinex).

Installation

pip install langchain-convexlake

Get a free API key at convexlake.com.

Quick start

import os
from langchain.agents import create_agent
from langchain_convexlake import get_tools

tools = get_tools(api_key=os.environ["CONVEXLAKE_API_KEY"])
agent = create_agent(model="anthropic:claude-sonnet-5-5", tools=tools)

result = agent.invoke({
    "messages": [{"role": "user", "content": "Who are the top Polymarket traders today?"}]
})
print(result["messages"][-1].content)

Tools

Tool Description
convexlake_catalog Browse available exchanges, tickers, dates, and file slugs
convexlake_trades Trade history for prediction markets and options
convexlake_candles OHLCV candle data for prediction markets and crypto perpetuals
convexlake_surface Implied-volatility surface snapshots (Deribit, Binance, OKX, Bybit)
convexlake_leaderboard Daily trader leaderboard (Polymarket, Limitless, Predict)
convexlake_leaderboard_trades Individual trader fill history
convexlake_orderbook_summary Orderbook statistics: message types, timestamps, best BBO

Tools that return tabular data use response_format="content_and_artifact": the LLM receives a text summary while ToolMessage.artifact holds the full pandas DataFrame.

Individual tool usage

from langchain_convexlake import ConvexLakeCatalog, ConvexLakeTrades

catalog = ConvexLakeCatalog(api_key="do_...")
print(catalog.invoke({}))                               # list exchanges
print(catalog.invoke({"exchange": "kalshi"}))           # list tickers

trades = ConvexLakeTrades(api_key="do_...")
summary, df = trades.func(
    exchange="kalshi", ticker="crypto",
    date="2026-10-01", slug="KXBTC15M-26OCT01-trades.csv",
)

Development

uv sync --dev
make test_unit
make test_integration   # requires CONVEXLAKE_API_KEY

License

MIT

Metadata

Release files for langchain-convexlake 0.1.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 langchain-convexlake 0.1.0
File Size Uploaded Provenance Actions
langchain_convexlake-0.1.0.tar.gz 7.4 kB Without provenance Details for langchain_convexlake-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for langchain-convexlake 0.1.0
File Interpreter ABI Platform Actions
langchain_convexlake-0.1.0-py3-none-any.whl Python 3 none any Details for langchain_convexlake-0.1.0-py3-none-any.whl

Total release size: 15.5 kB

Release files / langchain_convexlake-0.1.0.tar.gz

Download URL langchain_convexlake-0.1.0.tar.gz
Size 7.4 kB
Tags Source
SHA-256 checksum
How to use checksums
018c41cc8c2c8085e60963bc0c544a92e6da21c29ccd86c2a728678913a60bf6
BLAKE2b-256 checksum
How to use checksums
3a5b60c272cf6bb7637573c3d36d9ed7ba060f20d61346d188421cdb9efb6d2b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.5

Release files / langchain_convexlake-0.1.0-py3-none-any.whl

Download URL langchain_convexlake-0.1.0-py3-none-any.whl
Size 8.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d0f2283d8c95eca997016006197addbf38361f2df7b08a1fe8ef44c765e635cb
BLAKE2b-256 checksum
How to use checksums
a1e43e14c399d0c20b44ecf9e44f6d94f67cdcd8a7bcd7670d978c5dfad83b71
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.5

Security for langchain-convexlake 0.1.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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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