Skip to main content

ZARQ risk intelligence tool for LangChain agents — trust scores, crash probability, and structural risk for 205 crypto tokens.

Project description

ZARQ LangChain Tool

Add crypto risk intelligence to any LangChain agent. Check if a token is safe before trading.

Quick Start (3 lines)

from zarq_langchain import ZARQRiskCheck

tools = [ZARQRiskCheck()]
agent = initialize_agent(tools, llm, agent=AgentType.OPENAI_FUNCTIONS)

Installation

pip install zarq-langchain

Dependencies: langchain-core, httpx, pydantic

Usage

As a standalone tool

from zarq_langchain import ZARQRiskCheck

tool = ZARQRiskCheck()
print(tool.run("bitcoin"))
# ZARQ Risk Check: Bitcoin (BTC)
# Verdict: WARNING
# Trust Score: 74.52/100 (Rating: A2)
# Crash Probability: 0.3177
# Distance to Default: 3.03
# ...

In a LangChain agent

from langchain_openai import ChatOpenAI
from langchain.agents import initialize_agent, AgentType
from zarq_langchain import ZARQRiskCheck

llm = ChatOpenAI(model="gpt-4")
tools = [ZARQRiskCheck()]
agent = initialize_agent(tools, llm, agent=AgentType.OPENAI_FUNCTIONS)

result = agent.run("Is it safe to buy solana right now?")

With LangGraph

from zarq_langchain import ZARQRiskCheck
from langgraph.prebuilt import create_react_agent

tools = [ZARQRiskCheck()]
agent = create_react_agent(model, tools)

Async support

result = await tool.arun("ethereum")

Custom API endpoint

# Point to a local instance or proxy
tool = ZARQRiskCheck(api_base="http://localhost:8000")

What the tool returns

The tool returns a formatted string that any LLM can reason about:

ZARQ Risk Check: Bitcoin (BTC)
Verdict: WARNING
Trust Score: 74.52/100 (Rating: A2)
Crash Probability: 0.3177
Distance to Default: 3.03
Structural Weakness: Yes
Price: $70825.0
CAUTION: Elevated risk. Proceed with reduced position size.

Verdicts:

  • SAFE — No structural issues detected
  • WARNING — Elevated risk, structural weakness present
  • CRITICAL — Structural collapse detected, avoid trading

API Details

  • Endpoint: GET https://zarq.ai/v1/check/{token}
  • Auth: None required
  • Rate limit: 5,000 calls/day per IP (free forever)
  • Coverage: 205 tokens
  • Latency: <100ms typical

Links

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

zarq_langchain-0.1.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

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

zarq_langchain-0.1.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for zarq_langchain-0.1.0.tar.gz
Algorithm Hash digest
SHA256 95c1902f4073d3540855a74b2bda8db4ae79bc91472a61233ab3156bcf315db0
MD5 706173ba11eec08f47c3679041013eba
BLAKE2b-256 dd54f0877e76f76b38633b867b62249ec7e7261805776120de8ce12cb341f2d8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zarq_langchain-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for zarq_langchain-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b3da93da073401b4ecac816237151bf100ccafe5c76c9c5a13727866f973d769
MD5 2be1232451bdf99c608b018eb89a53f2
BLAKE2b-256 ba78e39cf6eb01a5b64f7addd9884215b1b081271a8928a383332a737877aacc

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