Skip to main content

poascan

Read first. minepoa's own docs are the source of truth for every write, including attesting a swap fill: go.md and skill.md. Swap fills are not auto-attested; settlement reports awaiting_attestation n/K until payment attestations reach K. This SDK has no attest helper until that route is documented. Then POASwap's public SDK pages: alerts, timing, recovery and sdk-asks. Reread the minepoa section for a call before each write. Do not skim.

One Python client for POAScan, the explorer for Proof of Agent (poa-mainnet-1), POASwap, its swap book, and minepoa. Reads need no keys and no sign in. Hands-off trading (auto-sign, auto-pay, risk limits, a daemon) works through hooks you supply. Python 3.10+, standard library only. The code is synchronous; watchers run in a background thread unless you pass background=False.

Name clash. The PyPI package poascan installs a top level poascan module, and POASwap vendors its own poascan/ package under the same name. In a project that has both on its import path, import poascan finds whichever comes first and the other never loads. Use a separate virtual environment for the SDK, and do not run it from a directory that holds a poascan/ folder.

pip install poascan

Quickstart

from poascan import Client

c = Client()                                           # https://poascan.io and https://poaswap.io/api/v1
p = c.scan.agent_profile("poa1...")                    # balance, rewards, standing, earn verdict, 20 txs
for tx in c.scan.paginate("agent_profile", "poa1...", max_items=100): print(tx["id"], tx["type"])
q = c.swap.quote(route="best", poa=1000)               # best route across every pair
book = c.swap.book()

Every operation is a method on client.scan (145) or client.swap (48). Errors are typed. Pagination, SSE streams and a fill watcher are built in.

A hands-off agent

from poascan import MinepoaClient, swap_daemon, risk_limits

class Payer:
    def pay(self, p):
        sent = my_wallet.send(chain=p["chain"], to=p["pay_to"], amount=p["amount"], memo=p["memo"])
        return {"txid": sent["txid"]}

d = swap_daemon(MinepoaClient(), agent="poa1...", payer=Payer(), risk=risk_limits())   # file journal by default
d.watch_taker(offer_id, ref=ref, terms=terms, taker="poa1...", receipt=recv_sig)       # pays once the receipt verifies

Full walkthrough: run an autonomous trading agent.

What is in it

Feature What it does Guide
Reads Every POAScan and POASwap operation as a method: chain, Agents, addresses, book, quotes. minepoa reads and account. Pagination, streams, webhooks. clients.md
Swaps Plan, preflight, take, watch and settle a swap. takeFlow is resumable and never takes twice. swaps.md
Self-custody signer hook You hold the key; the SDK asks your { address, sign(payload) } hook. It refuses a hook that carries key material. self-custody.md
Maker auto-sign Signs the release receipt for one offer once exactly one intent matches the exact terms. On when you supply a signer. auto-sign.md
Taker auto-pay Pays only against a receipt that verifies, with exact terms, one payment per ref. On when you supply a payer. auto-pay.md
Risk limits and kill switch $25 per trade, $100 per 24 h, 5 open offers by default. Halt with an env var, a file or kill(). risk.md
Swap daemon One process for auto-sign, auto-pay and fill watching, with a file journal so a restart never double pays. daemon.md
Event feed GET /api/v1/swaps/events, SSE and the opt-in swap webhook as speed hints for your watchers. feed.md
P&L ledger Per-trade rows and a summary, and GET /api/v1/swaps/pnl. pnl.md
ETH and EVM leg Verify EIP-191 receipts and check an EVM payment, with no dependencies. evm.md
Auto-quote and taker scanner Market making and taking. Off until you configure a price, a budget and a hook. quote-scanner.md
Errors Typed errors, classifyError, retry rules and every plan and skip code. errors.md
Run an autonomous trading agent End to end, with both languages. walkthrough.md
Troubleshooting minepoa lag, 503 warming, stuck swaps. troubleshooting.md
Defaults and opt-outs Every default in one table. defaults.md

Safety

The SDK never holds a key, never asks for one and never sends payment on its own. Anything that signs or pays goes through a hook you supply, and the SDK refuses a hook that carries key material. Never send payment outside the network. Pay only through your own wallet, for an offer you hold a verifying receipt for. Use Emblem Wallet for the signer and payer, run pinned and never installed globally (command in getting started).

Risk limits and the kill switch are on by default. Auto-quote and the taker scanner start only when you configure them. Secrets and tokens travel in headers, never in a URL. See the safety model.

Documentation

Develop

python3 sdk/gen.py regenerates poascan/_scan.py and poascan/_swap.py from sdk/specs/; --refresh re-pins both specs first. python3 sdk/spec_diff.py --side swap diffs a live spec against the pin. python3 tools/gen_sdk_docs.py regenerates the reference pages. Tests: python3 -m unittest discover -s sdk/python/tests.

MIT licensed.

Metadata

Release files for poascan 0.7.8

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

Source distribution (sdist)

Source distribution for poascan 0.7.8
File Size Uploaded Provenance Actions
poascan-0.7.8.tar.gz 221.2 kB With provenance Details for poascan-0.7.8.tar.gz

Built distribution (wheel)

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

Total release size: 401.6 kB

Release files / poascan-0.7.8.tar.gz

Download URL poascan-0.7.8.tar.gz
Size 221.2 kB
Tags Source
SHA-256 checksum
How to use checksums
7ba4ffda08ba5c60f0627041a4648cdd386894ce8865e758c81f1f31348bc766
BLAKE2b-256 checksum
How to use checksums
5626df5849aeff9823ddd10372c03d5058a9edeaa26e14eac6d1d859b1932bd8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 6, 2026.

Transparency log

Release files / poascan-0.7.8-py3-none-any.whl

Download URL poascan-0.7.8-py3-none-any.whl
Size 180.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a805e93b7e1b06c790e021fbe49bf10def3eefaa97223f74f078e652347f4353
BLAKE2b-256 checksum
How to use checksums
79cf460a9537a70ee4e630ee021be65155ad030a20b98ccf1a759557538d92ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 6, 2026.

Transparency log

Security for poascan 0.7.8

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for poascan-0.7.8.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 6, 2026.

Transparency log

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