Python SDK for AsterPay — EUR settlement for AI agent commerce via x402 protocol
Project description
asterpay
Python SDK for AsterPay — EUR settlement for AI agent commerce via x402 protocol.
What is AsterPay?
AsterPay is the EUR settlement layer for AI agent commerce. Convert USDC to EUR via SEPA Instant in under 5 seconds — on Base, MiCA-compliant, and listed in the Coinbase x402 ecosystem.
Key features:
- KYA (Know Your Agent) — 5-layer trust scoring (0-100) for AI agent wallets
- EUR Settlement — USDC/EURC → EUR via SEPA Instant
- LangChain + CrewAI — 20+ ready-made tools
- x402 Protocol — HTTP 402 pay-per-call with USDC
- Referenced in Google A2A spec for trust.signals[]
Install
pip install asterpay
Quick Start
from asterpay import AsterPay
client = AsterPay()
# Get a crypto price ($0.001 USDC)
price = client.market.price("bitcoin")
print(f"BTC: ${price['price']}")
# Get EUR settlement estimate (FREE)
quote = client.settlement.estimate(amount_usdc=100)
print(f"100 USDC → {quote['eur_amount']} EUR")
# AI text summarization ($0.01 USDC)
result = client.ai.summarize("Your long article text here...")
print(result['summary'])
# Check KYA trust score for an agent wallet (FREE)
kya = client.kya.score("0xAgentWallet...")
print(f"Trust Score: {kya['score']}/100 ({kya['tier']})")
LangChain Integration
pip install asterpay[langchain]
from asterpay.langchain import get_asterpay_tools
from langchain.agents import create_react_agent
# 18 tools — market data, AI, EUR settlement, crypto analytics
tools = get_asterpay_tools()
agent = create_react_agent(llm, tools)
# Or just the free tools (no x402 payment needed)
from asterpay.langchain import get_free_tools
free_tools = get_free_tools()
# Or just the KYA (trust scoring) tools
from asterpay.langchain import get_asterpay_kya_tools
kya_tools = get_asterpay_kya_tools()
CrewAI Integration
pip install asterpay[crewai]
from asterpay.crewai import get_asterpay_tools
from crewai import Agent
analyst = Agent(
role="Crypto Analyst",
goal="Analyze market trends and settle profits to EUR",
tools=get_asterpay_tools()
)
Both Frameworks
pip install asterpay[agents] # installs langchain + crewai support
Async Support
from asterpay import AsyncAsterPay
import asyncio
async def main():
async with AsyncAsterPay() as client:
price = await client.market.price("ethereum")
print(f"ETH: ${price['price']}")
asyncio.run(main())
Services
| Service | Endpoints | Pricing |
|---|---|---|
client.market |
price(), ohlcv(), trending() |
$0.001–$0.005 |
client.ai |
summarize(), sentiment(), translate(), code_review() |
$0.01–$0.05 |
client.crypto |
wallet_score(), token_analysis(), whale_alerts() |
$0.02–$0.10 |
client.utility |
qr_code(), screenshot(), pdf() |
$0.005–$0.03 |
client.settlement |
estimate(), quote(), transfer_status() |
FREE |
client.kya |
score(), report(), batch_score() |
FREE |
client.discovery |
resources() |
FREE |
KYA (Know Your Agent) Trust Scoring
Score AI agent wallets for trust and reputation:
| Layer | What it checks |
|---|---|
| Wallet Age | On-chain history and activity |
| Transaction Patterns | Behavior analysis |
| Protocol Compliance | x402/MCP adherence |
| Network Reputation | Cross-protocol signals |
| Risk Indicators | Fraud and abuse patterns |
# Score an agent wallet
score = client.kya.score("0xAgentWallet...")
print(f"Trust: {score['score']}/100")
EUR Settlement
AsterPay's core feature — USDC to EUR via SEPA Instant:
# 1. Get a quote
quote = client.settlement.estimate(amount_usdc=500)
print(f"500 USDC → {quote['eur_amount']} EUR (fee: {quote['fee']})")
# 2. Check Bridge provider health
health = client.settlement.bridge_health()
print(f"Bridge status: {health['status']}")
x402 Protocol
Paid endpoints use the x402 HTTP payment protocol. When a 402 response is returned, your x402-compatible wallet or agent framework handles the USDC micropayment automatically.
Also Available
- MCP Server:
npx @asterpay/mcp-server— for Claude, Cursor, and other AI tools - REST API: Direct HTTP access at
https://x402.asterpay.io
Links
- Website
- x402 Ecosystem
- MCP Server (npm)
- API Docs
- Agent skill (single-file install)
- Site index for AI agents
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file asterpay-0.2.2.tar.gz.
File metadata
- Download URL: asterpay-0.2.2.tar.gz
- Upload date:
- Size: 18.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57c9c1d03bb4d9ecea8c8069bb76aa7865fa887b58a934882c696325805272d3
|
|
| MD5 |
18e4b122a3e0387daee52cdadb998f2d
|
|
| BLAKE2b-256 |
1bd192b6dccf44a85c8183db32ef9e7c0b4d16e9cf3f71f7f06a805277d07a7f
|
File details
Details for the file asterpay-0.2.2-py3-none-any.whl.
File metadata
- Download URL: asterpay-0.2.2-py3-none-any.whl
- Upload date:
- Size: 21.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33323a81de4c118e7e367b88a3e19abc8ddd9a69cc02d717470709efa20d58da
|
|
| MD5 |
91ce195502983793af510c0341ca7365
|
|
| BLAKE2b-256 |
5ad059012ed2642c0a6996c78ca23c7dd03b2aa6f182930cce914ebccd6facb7
|