Skip to main content

asterpay

Python SDK for AsterPay — EUR settlement for AI agent commerce via x402 protocol.

PyPI Python License

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

License

MIT

Metadata

Release files for asterpay 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for asterpay 0.2.2
File Size Uploaded Provenance Actions
asterpay-0.2.2.tar.gz 18.3 kB Without provenance Details for asterpay-0.2.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for asterpay 0.2.2
File Interpreter ABI Platform Actions
asterpay-0.2.2-py3-none-any.whl Python 3 none any Details for asterpay-0.2.2-py3-none-any.whl

Total release size: 39.4 kB

Release files / asterpay-0.2.2.tar.gz

Download URL asterpay-0.2.2.tar.gz
Size 18.3 kB
Tags Source
SHA-256 checksum
How to use checksums
57c9c1d03bb4d9ecea8c8069bb76aa7865fa887b58a934882c696325805272d3
BLAKE2b-256 checksum
How to use checksums
1bd192b6dccf44a85c8183db32ef9e7c0b4d16e9cf3f71f7f06a805277d07a7f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / asterpay-0.2.2-py3-none-any.whl

Download URL asterpay-0.2.2-py3-none-any.whl
Size 21.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
33323a81de4c118e7e367b88a3e19abc8ddd9a69cc02d717470709efa20d58da
BLAKE2b-256 checksum
How to use checksums
5ad059012ed2642c0a6996c78ca23c7dd03b2aa6f182930cce914ebccd6facb7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Security for asterpay 0.2.2

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.

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