Skip to main content

LangChain integration for Pythia Oracle — on-chain calculated crypto indicators (EMA, RSI, Bollinger, Volatility) via Chainlink

Project description

langchain-pythia

PyPI License: MIT

LangChain integration for Pythia Oracle — on-chain calculated crypto indicators via Chainlink.

Access EMA, RSI, Bollinger Bands, Volatility, and more for 22 crypto tokens directly from your LangChain agents. Pythia is the first oracle delivering calculated technical indicators on-chain, not just prices. Includes Pythia Events (indicator alert subscriptions) and Pythia Visions (AI-calibrated market intelligence).

Installation

pip install langchain-pythia

Quick Start

from langchain_pythia import PythiaListTokensTool, PythiaTokenFeedsTool

# Use with any LangChain agent
tools = [PythiaListTokensTool(), PythiaTokenFeedsTool()]

# Or call directly
list_tool = PythiaListTokensTool()
print(list_tool.invoke(""))

feeds_tool = PythiaTokenFeedsTool()
print(feeds_tool.invoke({"engine_id": "bitcoin"}))

With a LangChain Agent

from langchain_openai import ChatOpenAI
from langgraph.prebuilt import create_react_agent
from langchain_pythia import (
    PythiaListTokensTool,
    PythiaTokenFeedsTool,
    PythiaHealthCheckTool,
    PythiaContractsTool,
    PythiaPricingTool,
    PythiaEventsInfoTool,
    PythiaSubscribeInfoTool,
    PythiaVisionsInfoTool,
    PythiaVisionHistoryTool,
)

tools = [
    PythiaListTokensTool(),
    PythiaTokenFeedsTool(),
    PythiaHealthCheckTool(),
    PythiaContractsTool(),
    PythiaPricingTool(),
    PythiaEventsInfoTool(),
    PythiaSubscribeInfoTool(),
    PythiaVisionsInfoTool(),
    PythiaVisionHistoryTool(),
]

llm = ChatOpenAI(model="gpt-4o")
agent = create_react_agent(llm, tools)

# Ask about on-chain indicators
response = agent.invoke(
    {"messages": [{"role": "user", "content": "What RSI feeds does Pythia have for Bitcoin?"}]}
)

Available Tools

Tool Description
PythiaListTokensTool List all 22 tracked tokens with status, uptime, and data sources
PythiaTokenFeedsTool Get all indicator feed names (EMA, RSI, Bollinger, Volatility) for a token
PythiaHealthCheckTool Per-token 30-day uptime, data source health, incident report
PythiaContractsTool Contract addresses (operator, consumers, faucet, LINK) for on-chain integration
PythiaPricingTool Pricing tiers and free trial faucet info
PythiaEventsInfoTool Pythia Events overview — indicator alert subscriptions
PythiaSubscribeInfoTool Plan a specific event subscription with cost and exact calls
PythiaVisionsInfoTool Pythia Visions overview — 6 backtested patterns, accuracy, integration guide
PythiaVisionHistoryTool Recent Visions fired for a token with pattern breakdown

What Pythia Provides

  • 484 indicator feeds across 22 tokens (BTC, SOL, TAO, RENDER, ONDO, AAVE, UNI, and more)
  • 5 indicator types: EMA, RSI, Bollinger (upper/lower), Volatility, USD Price
  • 4 timeframes: 5-minute, 1-hour, 1-day, 1-week
  • On-chain delivery via Chainlink on Polygon
  • Free trial via PythiaFaucet — no LINK needed, 5 requests/day
  • Pythia Events: Subscribe to indicator conditions (ABOVE/BELOW thresholds), get triggered on-chain
  • Pythia Visions: AI-calibrated market intelligence — 6 backtested patterns with 74-89% accuracy, FREE

Use Cases

  • AI trading agents that need on-chain technical signals
  • DeFi vault rebalancing based on RSI or volatility thresholds
  • Risk management using Bollinger Band width
  • Portfolio analysis with real-time calculated metrics

Related

License

MIT

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

langchain_pythia-0.3.0.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

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

langchain_pythia-0.3.0-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file langchain_pythia-0.3.0.tar.gz.

File metadata

  • Download URL: langchain_pythia-0.3.0.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for langchain_pythia-0.3.0.tar.gz
Algorithm Hash digest
SHA256 016191b63afda4e67d3cfd4e975d5a6b734e3b9fa9c88257c75b79bdb643febf
MD5 afaf3c562a3d747165dca1b6797c98f9
BLAKE2b-256 99919762b26897bf6faf23a1bbb3dd88335df2784f880b8ccd2ad86b2ef5c775

See more details on using hashes here.

File details

Details for the file langchain_pythia-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for langchain_pythia-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 96eb022885a258ff45aa7f66f24d5bdc1d8a790753505283875189bcbcf1b2f0
MD5 40bad4d3989696fc876d6a32cf1137ec
BLAKE2b-256 ae085c09eab963c4fa2d2af3741a99f816c489afb77d6ebb96598be668ce7fc2

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