{"schema_version":"1.1.0","service":"Orcpin","description":"Agent-native x402 API: factual, block-anchored on-chain wallet and DeFi position snapshots on Base; x402 endpoint-reliability pre-flight checks (uptime, valid-402 rate, latency) so agents can verify an endpoint before paying it; deterministic trade-log calculators; and the books an agent wallet does not keep — a local meter (orcpin-ledger), a signed statement of account read independently from the chain, and a signed four-part audit of any x402 endpoint. Facts, never advice.","base_url":"https://orcpin.dev","payment":{"protocol":"x402","version":2,"currency":"USDC","network":"eip155:8453","testnet":false,"unpaid_dev_mode":false},"disclaimer":"Responses are informational snapshots of public Base on-chain data, served directly from chain. Not financial advice. Lawful use only; no reselling, redistribution, or implied endorsement. See /terms.","methodology":{"url":"https://orcpin.dev/methodology","description":"Exact formulas for every metric in data.derived. Free to fetch — audit the math before paying."},"endpoints":[{"name":"health","method":"GET","path":"/health","payment_required":false},{"name":"service_catalog","method":"GET","path":"/catalog","payment_required":false},{"name":"x402_directory","method":"GET","path":"/v1/x402/discovery/resources","payment_required":false,"description":"FREE searchable index of public x402 resources listed on the CDP Bazaar, ordered by 30-day unique payers and re-crawled weekly. The upstream catalog has no text search and no lookup-by-URL; this one does. Filter with q (text), network, max_price (USD), and paginate with limit/offset. Each entry reports whether Orcpin holds reliability measurements for it — the measured facts themselves are the paid /v1/endpoint-reliability route.","parameters":[{"name":"q","in":"query","required":false,"description":"Case-insensitive text match over the resource URL, service name and description.","schema":{"type":"string"}},{"name":"network","in":"query","required":false,"description":"Exact network id as the Bazaar reports it (e.g. base, eip155:8453, solana). Matched exactly, not as a substring — base and eip155:8453 are distinct upstream ids.","schema":{"type":"string"}},{"name":"max_price","in":"query","required":false,"description":"Ceiling on the advertised price, in USD. Entries with no advertised price are excluded rather than assumed cheap.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Page size. Default 50, maximum 200.","schema":{"type":"integer"}},{"name":"offset","in":"query","required":false,"description":"Pagination offset into the filtered result set.","schema":{"type":"integer"}}],"example":"https://orcpin.dev/v1/x402/discovery/resources?q=search&network=base&max_price=0.01"},{"name":"landing","method":"GET","path":"/","payment_required":false,"description":"Human-readable marketing page at orcpin.com (orcpin.dev redirects / to /catalog)."},{"name":"terms","method":"GET","path":"/terms","payment_required":false},{"name":"wallet_snapshot","method":"GET","path":"/v1/wallet-snapshot","payment_required":true,"description":"On-chain wallet snapshot on Base: native ETH and tracked ERC-20 token balances (USDC, WETH) plus account flags (contract status, transaction count) and derived metrics (wallet type, activity tier, gas runway), anchored to a specific block. Factual wallet balance and holdings lookup for AI agents — portfolio and on-chain data API.","x402":{"scheme":"exact","price":"$0.02","network":"eip155:8453","pay_to":"0x8B1CF12e7efe6AEA59cD1124eBbe7709E3Ac6085"},"parameters":[{"name":"address","in":"query","required":true,"description":"EVM wallet address to snapshot (0x...).","schema":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}}],"response":{"schema_version":"1.1.0","as_of":"block","fields":["address","block_number","data.account.is_contract","data.account.transaction_count","data.native_balance","data.token_balances","data.derived.wallet_type","data.derived.activity_tier","data.derived.gas_runway","sources","disclaimer"],"derived_methodology":"https://orcpin.dev/methodology"},"example":"https://orcpin.dev/v1/wallet-snapshot?address=0x0000000000000000000000000000000000000001"},{"name":"defi_snapshot","method":"GET","path":"/v1/defi-snapshot","payment_required":true,"description":"DeFi position and wallet risk snapshot on Base: token balances, account flags, and live Aave v3 collateral, debt, borrowing power, and health factor read directly from the protocol at a specific block, plus derived risk metrics — net equity, LTV utilization, leverage multiplier, health-factor band, and collateral drawdown tolerance (how far collateral can fall before liquidation). For agents assessing portfolio exposure and liquidation risk.","x402":{"scheme":"exact","price":"$0.05","network":"eip155:8453","pay_to":"0x8B1CF12e7efe6AEA59cD1124eBbe7709E3Ac6085"},"parameters":[{"name":"address","in":"query","required":true,"description":"EVM wallet address to snapshot (0x...).","schema":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}}],"response":{"schema_version":"1.1.0","as_of":"block","fields":["address","block_number","data.account","data.native_balance","data.token_balances","data.derived.wallet_type","data.derived.activity_tier","data.derived.gas_runway","data.aave_v3.total_collateral","data.aave_v3.total_debt","data.aave_v3.available_borrows","data.aave_v3.loan_to_value_bps","data.aave_v3.current_liquidation_threshold_bps","data.aave_v3.health_factor","data.aave_v3.no_outstanding_debt","data.derived.aave.net_equity","data.derived.aave.unused_borrow_power","data.derived.aave.ltv_utilization_pct","data.derived.aave.leverage_multiplier","data.derived.aave.health_factor_band","data.derived.aave.collateral_drawdown_tolerance_pct","sources","disclaimer"],"derived_methodology":"https://orcpin.dev/methodology"},"example":"https://orcpin.dev/v1/defi-snapshot?address=0x0000000000000000000000000000000000000001"},{"name":"batch_snapshot","method":"GET","path":"/v1/batch-snapshot","payment_required":true,"description":"Batch wallet snapshots for multiple Base addresses in one paid call, all anchored to a single block: native and ERC-20 balances, account flags, and derived metrics per address. Efficient multi-wallet portfolio and balances lookup for AI agents. Billed per address, with volume discounts at 10+/50+/100+ addresses. Up to 1000 addresses per call; one bad address returns a per-item error without failing the batch. Per-address rate $0.02, discounted 20% at 10+, 30% at 50+, 40% at 100+; the 402 advertises the exact total for the count sent ($0.16 is the 10-address starting price).","x402":{"scheme":"exact","price":"$0.16","network":"eip155:8453","pay_to":"0x8B1CF12e7efe6AEA59cD1124eBbe7709E3Ac6085"},"limits":{"max_addresses":1000},"parameters":[{"name":"addresses","in":"query","required":true,"description":"Comma-separated EVM addresses (0x...), max per batch config.","schema":{"type":"string"}}],"response":{"schema_version":"1.1.0","as_of":"block","fields":["block_number","count","results[].address","results[].data","results[].error","sources","disclaimer"]},"example":"https://orcpin.dev/v1/batch-snapshot?addresses=0x0000000000000000000000000000000000000001,0x0000000000000000000000000000000000000002"},{"name":"endpoint_reliability","method":"GET","path":"/v1/endpoint-reliability","payment_required":true,"description":"x402 endpoint reliability pre-flight: factual service-delivery measurements of a target x402 endpoint before an agent pays it — reachability/uptime rate, valid-402 rate, response latency (p50/p95/p99), last status, and sampled paid delivery verification. Facts only (no trust score, no 'scam' label). Check whether an endpoint is live and delivers before spending on it.","x402":{"scheme":"exact","price":"$0.01","network":"eip155:8453","pay_to":"0x8B1CF12e7efe6AEA59cD1124eBbe7709E3Ac6085"},"parameters":[{"name":"url","in":"query","required":true,"description":"Target x402 endpoint URL to read reliability facts for.","schema":{"type":"string","format":"uri"}}],"response":{"schema_version":"0.1.0","as_of":"rolling_probes","fields":["url","status","sample_size","first_seen","last_verified","facts.reachable_rate","facts.http_success_rate","facts.valid_402_rate","facts.latency_ms","facts.last_status","facts.consecutive_failures","facts.delivery_verified","flags","methodology","disclaimer"],"derived_methodology":"https://orcpin.dev/methodology#endpoint_reliability"},"example":"https://orcpin.dev/v1/endpoint-reliability?url=https://example.com/v1/some-resource"},{"name":"endpoint_reliability_batch","method":"GET","path":"/v1/endpoint-reliability/batch","payment_required":true,"description":"Batch x402 endpoint reliability: factual delivery measurements (uptime, valid-402 rate, latency, last status) for an agent's whole tool list of x402 endpoints in one paid call. Endpoints with no stored history are probed live, so every billed URL returns real facts. Sweep every endpoint you depend on before relying on them. Billed per endpoint, with volume discounts at 10+/50+/100+ URLs. Facts only — not an endorsement or rating. Up to 150 URLs per call; any endpoint we hold no measurement for is probed live so every billed URL returns real facts. Per-endpoint rate $0.01, discounted 20% at 10+, 30% at 50+, 40% at 100+; the 402 advertises the exact total for the count sent ($0.08 is the 10-endpoint starting price).","x402":{"scheme":"exact","price":"$0.08","network":"eip155:8453","pay_to":"0x8B1CF12e7efe6AEA59cD1124eBbe7709E3Ac6085"},"limits":{"max_urls":150},"parameters":[{"name":"urls","in":"query","required":true,"description":"Comma-separated x402 endpoint URLs, max per batch config.","schema":{"type":"string"}}],"response":{"schema_version":"0.1.0","as_of":"rolling_probes","fields":["count","results[].url","results[].status","results[].sample_size","results[].facts","results[].flags","methodology","disclaimer"]},"example":"https://orcpin.dev/v1/endpoint-reliability/batch?urls=https://example.com/v1/a,https://example.org/v1/b"},{"name":"holding_period","method":"POST","path":"/v1/holding-period","payment_required":true,"description":"Trade-lot holding-period and realized-gain calculator for trading agents: per-lot days held, the exact date each lot's gain character turns long-term, and FIFO / specific-identification allocation of a proposed sell with realized gain per lot and per-character totals. Deterministic arithmetic on caller-supplied lots with the published threshold cited (IRC §1222: held more than one year) — counts, dates, and dollars only, never advice. Nothing is stored. Up to 500 lots per call. Request body is computed on and never stored.","x402":{"scheme":"exact","price":"$0.02","network":"eip155:8453","pay_to":"0x8B1CF12e7efe6AEA59cD1124eBbe7709E3Ac6085"},"limits":{"max_lots":500},"request_body":{"type":"object","properties":{"asOf":{"type":"string","description":"Evaluation date, YYYY-MM-DD (UTC calendar days; no server clock is used)."},"lots":{"type":"array","description":"Tax lots to evaluate. costBasis (total USD for the lot) is optional — absent means gain math is omitted for that lot.","items":{"type":"object","properties":{"symbol":{"type":"string"},"acquireDate":{"type":"string","description":"YYYY-MM-DD"},"quantity":{"type":"number"},"costBasis":{"type":"number"},"account":{"type":"string"}},"required":["symbol","acquireDate","quantity"]}},"sell":{"type":"object","description":"Optional proposed sell to allocate across the lots (FIFO or as_supplied). price (per share USD) optional.","properties":{"symbol":{"type":"string"},"tradeDate":{"type":"string","description":"YYYY-MM-DD"},"quantity":{"type":"number"},"price":{"type":"number"},"method":{"type":"string","enum":["fifo","as_supplied"]}},"required":["symbol","tradeDate","quantity"]}},"required":["asOf","lots"]},"response":{"schema_version":"lotmath-v1","as_of":"caller-supplied asOf date","fields":["as_of","lots[].daysHeld","lots[].longTermFrom","lots[].character","lots[].daysUntilLongTerm","sell.method","sell.allocations[].quantity","sell.allocations[].daysHeld","sell.allocations[].character","sell.allocations[].costBasis","sell.allocations[].proceeds","sell.allocations[].realizedGain","sell.totals","explanation","methodology","disclaimer"],"derived_methodology":"https://orcpin.dev/methodology#trade_log"},"example":"POST https://orcpin.dev/v1/holding-period with JSON body {\"asOf\":\"2026-07-02\",\"lots\":[{\"symbol\":\"XYZ\",\"acquireDate\":\"2025-01-10\",\"quantity\":100,\"costBasis\":500}],\"sell\":{\"symbol\":\"XYZ\",\"tradeDate\":\"2026-07-02\",\"quantity\":100,\"price\":12}}"},{"name":"settlement_dates","method":"POST","path":"/v1/settlement-dates","payment_required":true,"description":"T+1 settlement-date calculator for trading agents: the settlement date for each caller-supplied equity trade and whether it has settled as of a given date, on the versioned NYSE holiday calendar, with SEC Rule 15c6-1 cited as a published rule. Dates and counts only, never a violation determination. Nothing is stored. Up to 1000 trades per call. Request body is computed on and never stored.","x402":{"scheme":"exact","price":"$0.02","network":"eip155:8453","pay_to":"0x8B1CF12e7efe6AEA59cD1124eBbe7709E3Ac6085"},"limits":{"max_trades":1000},"request_body":{"type":"object","properties":{"asOf":{"type":"string","description":"Date to evaluate settled/unsettled against, YYYY-MM-DD."},"trades":{"type":"array","items":{"type":"object","properties":{"symbol":{"type":"string"},"side":{"type":"string","enum":["buy","sell"]},"tradeDate":{"type":"string","description":"YYYY-MM-DD"},"amount":{"type":"number","description":"Optional USD amount, echoed back untouched."},"account":{"type":"string"}},"required":["symbol","side","tradeDate"]}}},"required":["asOf","trades"]},"response":{"schema_version":"settlement-v1","as_of":"caller-supplied asOf date","fields":["calendar_version","trades[].settlementDate","trades[].settledAsOf","trades[].tradingDaysUntilSettlement","settled_count","unsettled_count","rule_citation","explanation","methodology","disclaimer"],"derived_methodology":"https://orcpin.dev/methodology#trade_log"},"example":"POST https://orcpin.dev/v1/settlement-dates with JSON body {\"asOf\":\"2026-07-02\",\"trades\":[{\"symbol\":\"XYZ\",\"side\":\"sell\",\"tradeDate\":\"2026-07-02\"}]}"},{"name":"settlement_date","method":"GET","path":"/v1/settlement-date","payment_required":true,"description":"Single-trade T+1 settlement date, as a one-line GET: given a trade date and an as-of date, returns the settlement date and whether it has settled, on the versioned NYSE holiday calendar with SEC Rule 15c6-1 cited. The low-integration sibling of the batch settlement-dates route — no request body. A dates fact, never a violation determination. Nothing is stored.","x402":{"scheme":"exact","price":"$0.02","network":"eip155:8453","pay_to":"0x8B1CF12e7efe6AEA59cD1124eBbe7709E3Ac6085"},"parameters":[{"name":"trade_date","in":"query","required":true,"description":"Execution date of the trade, YYYY-MM-DD.","schema":{"type":"string"}},{"name":"as_of","in":"query","required":true,"description":"Date to evaluate settled/unsettled against, YYYY-MM-DD.","schema":{"type":"string"}},{"name":"symbol","in":"query","required":false,"description":"Optional ticker, echoed back untouched.","schema":{"type":"string"}}],"response":{"schema_version":"settlement-v1","as_of":"caller-supplied as_of date","fields":["trade_date","settlement_date","settled","trading_days_until_settlement","calendar_version","rule_citation","explanation","methodology","disclaimer"],"derived_methodology":"https://orcpin.dev/methodology#trade_log"},"example":"https://orcpin.dev/v1/settlement-date?trade_date=2026-07-02&as_of=2026-07-02"},{"name":"wash_sale_status","method":"POST","path":"/v1/wash-sale-status","payment_required":true,"description":"Wash-sale preflight for trading agents: evaluates a proposed buy against the operator's realized-loss sales across ALL accounts (caller-supplied) for the 61-day IRC §1091 window — would_trigger with the matched loss sales, an honest clear, or insufficient_data naming the gap. Tax status with the rule cited, never advisability; a disallowed loss defers, not forfeits. Exact-ticker v1; nothing stored. Agent account silos can't see the cross-account window — this check can. Up to 1000 sales per call. Request body is computed on and never stored.","x402":{"scheme":"exact","price":"$0.05","network":"eip155:8453","pay_to":"0x8B1CF12e7efe6AEA59cD1124eBbe7709E3Ac6085"},"limits":{"max_sales":1000},"request_body":{"type":"object","properties":{"order":{"type":"object","description":"The proposed order. v1 evaluates buys; a sell returns not_applicable with guidance.","properties":{"symbol":{"type":"string"},"side":{"type":"string","enum":["buy","sell"]},"tradeDate":{"type":"string","description":"Intended trade date, YYYY-MM-DD (UTC calendar days)."},"quantity":{"type":"number"}},"required":["symbol","side","tradeDate"]},"recentSales":{"type":"array","description":"The operator's realized-loss sales across ALL accounts. realizedLoss is a positive USD magnitude; zero/absent = not a loss sale (ignored).","items":{"type":"object","properties":{"symbol":{"type":"string"},"tradeDate":{"type":"string","description":"YYYY-MM-DD"},"realizedLoss":{"type":"number"},"quantity":{"type":"number"},"account":{"type":"string","description":"Free-form label, echoed in matches."}},"required":["symbol","tradeDate"]}},"salesCoverageFrom":{"type":"string","description":"Earliest date the supplied sales cover (YYYY-MM-DD); short coverage is flagged, never hidden."}},"required":["order","recentSales"]},"response":{"schema_version":"washsale-v1","as_of":"the order's tradeDate anchors the ±30-day window","fields":["status","matches[].saleDate","matches[].realizedLoss","matches[].daysFromOrder","window.start","window.end","coverage.complete","evaluated_loss_sales","rule_citation","explanation","methodology","disclaimer"],"derived_methodology":"https://orcpin.dev/methodology#trade_log"},"example":"POST https://orcpin.dev/v1/wash-sale-status with JSON body {\"order\":{\"symbol\":\"XYZ\",\"side\":\"buy\",\"tradeDate\":\"2026-07-02\"},\"recentSales\":[{\"symbol\":\"XYZ\",\"tradeDate\":\"2026-06-12\",\"realizedLoss\":450}],\"salesCoverageFrom\":\"2026-06-01\"}"},{"name":"statement","method":"POST","path":"/v1/statement","payment_required":true,"description":"Signed statement of account for an agent wallet: every outgoing USDC settlement in a window, read independently from the public Base chain, totalled by counterparty and by day, block-anchored and ed25519-signed so anyone can verify it without Orcpin. Optionally attests the requester's own meter figures as reported, by digest, kept apart from the verified chain facts. The books a wallet does not keep. Counts and amounts only, never advice; nothing stored. Window up to 366 days; send both bounds, or neither for the last 30 days. Priced by window: $5 up to 31 days, $10 up to 92, $30 up to 366 — the 402 quotes the exact amount for the window sent. Request body is computed on and never stored. Ask with Accept: text/html to receive the readable statement (https://orcpin.dev/statement) with the signed JSON embedded; the page verifies the document in the browser.","x402":{"scheme":"exact","price":"$5","network":"eip155:8453","pay_to":"0x8B1CF12e7efe6AEA59cD1124eBbe7709E3Ac6085"},"request_body":{"type":"object","properties":{"wallet":{"type":"string","description":"The agent wallet, 0x + 40 hex."},"since":{"type":"string","description":"Window start, YYYY-MM-DD (UTC). Requires `until`. Default: 30 days before `until`."},"until":{"type":"string","description":"Window end, YYYY-MM-DD (UTC). Default: today — only when `since` is also omitted; send both bounds or neither."},"representations":{"type":"object","description":"Optional figures from the requester's own meter, attested as reported by digest and never verified: sha256 of the meter records in the window, metered call count, delivered call count, delivered USD.","properties":{"meter_digest":{"type":"string"},"metered_calls":{"type":"number"},"delivered_calls":{"type":"number"},"delivered_usd":{"type":"number"}},"required":["meter_digest","metered_calls","delivered_calls","delivered_usd"]}},"required":["wallet"]},"response":{"schema_version":"statement-v1","as_of":"block number at issue time","fields":["verified.settlements","verified.usd","verified.by_counterparty[].seller","verified.by_counterparty[].resources[].price_usd","verified.by_counterparty[].resources[].matches_settlement_amounts","verified.by_counterparty[].resources[].reliability","verified.by_day[]","enrichment.resolved","representations","reconciliation.unaccounted_usd","signed","signature.public_key","signature.signature","signature.verify","disclaimer"],"derived_methodology":"https://orcpin.dev/methodology#statement"},"example":"POST https://orcpin.dev/v1/statement with JSON body {\"wallet\":\"0x54e100000000000000000000000000000000f4e0\",\"since\":\"2026-09-01\",\"until\":\"2026-09-30\"}"},{"name":"door-report","method":"POST","path":"/v1/door-report","payment_required":true,"description":"Signed four-part audit of one x402 endpoint, by buying from it: the quote (what the 402 asks, and whether the seller's manifest and public catalog agree), real purchases with Orcpin's audit wallet (quoted vs signed vs settled vs chain vs delivered; replay and bad-payment behaviour), the door's inbound books from the chain (settlements, revenue, distinct and repeat payers), and unit cost against priced doors listed. Ed25519-signed and logged; facts, no verdict. No purchase settled, no charge. One price, $50; the audit's own purchases (up to 5, within a $2.5 budget) come out of it. A URL that does not present a valid 402 on eip155:8453 is refused with the free probe and nothing is charged, as is a door where no purchase can be settled at all. Request body is computed on and never stored. Ask with Accept: text/html to receive the readable report (https://orcpin.dev/door-report) with the signed JSON embedded; the page verifies the document in the browser.","x402":{"scheme":"exact","price":"$50","network":"eip155:8453","pay_to":"0x8B1CF12e7efe6AEA59cD1124eBbe7709E3Ac6085"},"request_body":{"type":"object","properties":{"url":{"type":"string","description":"The x402 endpoint to audit — a public http(s) URL that answers an unpaid request with a 402 challenge."},"purchases":{"type":"integer","description":"Real purchases to make, 1–5. Default 3. Their total must fit the audit's purchase budget."},"method":{"type":"string","enum":["GET","POST"],"description":"The door's verb. Default: GET, retried as POST if GET looks like the wrong verb."},"body":{"type":"object","description":"JSON body to send to a POST door (the request an agent would actually make). Implies method POST."}},"required":["url"]},"response":{"schema_version":"door-report-v1","as_of":"block number at issue time","fields":["door.seller","door.pay_to","door.price_usd","quote.price_sources[]","quote.price_consistent","quote.pay_to_consistent","purchase.records[]","purchase.receipts.confirmed_on_chain","purchase.replay","purchase.malformed_payment","books.settlements","books.payers","books.repeat_payers","books.single_settlement_payers_at_this_price","cost.this_audit.usd_per_delivered_response","cost.catalog.share_priced_below","attention[]","signed","signature.verify","disclaimer"],"derived_methodology":"https://orcpin.dev/methodology#door_report"},"example":"POST https://orcpin.dev/v1/door-report with JSON body {\"url\":\"https://orcpin.dev/v1/endpoint-reliability?url=https://example.com/v1/x\",\"purchases\":3}"}],"agent_integration":{"caller_library":"@x402/fetch","flow":["GET endpoint without payment header","Receive HTTP 402 with x402 payment requirements","Sign and send USDC payment on configured network","Retry GET with x402 payment header","Receive JSON snapshot"],"test_script":"npm run test:agent","samples":{"ledger_library":{"description":"A paid client that meters itself: every Orcpin endpoint by name, x402 payment with your key, and a local record of every paid call (quote, signature, settlement receipt, response) that buyStatement carries into a signed statement and verifies on return. Hand it your own fetch and it meters calls to any x402 door.","package":"orcpin-ledger","install":"npm i orcpin-ledger","code":["import { createClient } from \"orcpin-ledger/client\";","const orcpin = await createClient({ baseUrl: \"https://orcpin.dev\", network: \"eip155:8453\" }); // ORCPIN_PRIVATE_KEY from env","const check = await orcpin.call(\"endpoint-reliability\", { url: \"https://example.com/v1/x\" });","const books = await orcpin.buyStatement({ since: \"2026-09-01\", until: \"2026-09-30\" });","console.log(books.verification); // signature_valid, key_status, logged"],"endpoints_by_name":"orcpin.endpoints — the same table the CLI prints with `orcpin-ledger endpoints`"},"ledger_cli":{"description":"The same client from a terminal or a cron. JSON to stdout, progress to stderr; the key comes from ORCPIN_PRIVATE_KEY, never an argument. `verify` needs no key.","package":"orcpin-ledger","commands":["npx orcpin-ledger endpoints","npx orcpin-ledger call endpoint-reliability --url https://example.com/v1/x","npx orcpin-ledger call door-report --url https://example.com/v1/x --purchases 3","npx orcpin-ledger report --since 2026-09-01 --until 2026-09-30","npx orcpin-ledger statement --since 2026-09-01 --until 2026-09-30 > sept.json","npx orcpin-ledger verify sept.json"]},"mcp":{"description":"Drop-in MCP server — native tools for Claude Desktop, Cursor, and agent runtimes. Handles x402 payment for you. orcpin_x402_directory is free and works with no wallet configured, so the server is useful before it is funded.","package":"orcpin-mcp","config":{"mcpServers":{"orcpin":{"command":"npx","args":["-y","orcpin-mcp"],"env":{"ORCPIN_PRIVATE_KEY":"0xYOUR_FUNDED_BASE_WALLET_KEY","X402_NETWORK":"eip155:8453"}}}},"tools":["orcpin_x402_directory","orcpin_wallet_snapshot","orcpin_defi_snapshot","orcpin_batch_snapshot","orcpin_endpoint_reliability","orcpin_endpoint_reliability_batch","orcpin_holding_period","orcpin_settlement_dates","orcpin_wash_sale_status","orcpin_statement","orcpin_door_report"],"toolsets":"Optional ORCPIN_TOOLSETS env (\"defi\", \"trading\", comma-separated) exposes a subset of the PAID tools; default is all. orcpin_x402_directory is free and always exposed."},"raw_x402_fetch":{"description":"Raw client: wrap fetch so 402s are paid and retried automatically (gasless USDC, no ETH needed).","install":"npm i @x402/fetch @x402/evm viem","code":"import { wrapFetchWithPaymentFromConfig } from \"@x402/fetch\";\nimport { ExactEvmScheme } from \"@x402/evm\";\nimport { privateKeyToAccount } from \"viem/accounts\";\n\nconst account = privateKeyToAccount(process.env.EVM_PRIVATE_KEY);\nconst fetchWithPay = wrapFetchWithPaymentFromConfig(fetch, {\n  schemes: [{ network: \"eip155:8453\", client: new ExactEvmScheme(account) }],\n});\n\nconst res = await fetchWithPay(\"https://orcpin.dev/v1/wallet-snapshot?address=0xYourTarget\");\nconst snapshot = await res.json();"},"vercel_ai_sdk_tool":{"description":"Expose Orcpin as a Vercel AI SDK tool. Reuses fetchWithPay from the raw sample above.","install":"npm i ai zod @x402/fetch @x402/evm viem","code":"import { tool } from \"ai\";\nimport { z } from \"zod\";\n// fetchWithPay: see raw_x402_fetch sample\n\nexport const orcpinWalletSnapshot = tool({\n  description: \"Block-anchored wallet snapshot on Base: balances + derived metrics.\",\n  parameters: z.object({\n    address: z.string().describe(\"0x EVM address to snapshot\"),\n  }),\n  execute: async ({ address }) => {\n    const res = await fetchWithPay(`https://orcpin.dev/v1/wallet-snapshot?address=${address}`);\n    return await res.json();\n  },\n});"},"langchain_tool":{"description":"Expose Orcpin as a LangChain (JS) tool for agents built on LangChain or LangGraph. Reuses fetchWithPay from the raw sample above.","install":"npm i @langchain/core zod @x402/fetch @x402/evm viem","code":"import { tool } from \"@langchain/core/tools\";\nimport { z } from \"zod\";\n// fetchWithPay: see raw_x402_fetch sample\n\nexport const orcpinWalletSnapshot = tool(\n  async ({ address }) => {\n    const res = await fetchWithPay(`https://orcpin.dev/v1/wallet-snapshot?address=${address}`);\n    return JSON.stringify(await res.json());\n  },\n  {\n    name: \"orcpin_wallet_snapshot\",\n    description: \"Block-anchored wallet snapshot on Base: balances + derived metrics. Paid per call via x402 (USDC).\",\n    schema: z.object({ address: z.string().describe(\"EVM address, 0x...\") }),\n  },\n);\n// Bind alongside your other tools: createReactAgent({ llm, tools: [orcpinWalletSnapshot] })"},"reliability_preflight":{"description":"Pre-flight an x402 endpoint before paying it: fetch reliability facts (uptime, valid-402 rate, latency) and let your own policy decide. Facts only — apply your own thresholds. Reuses fetchWithPay from the raw sample above.","code":"// fetchWithPay: see raw_x402_fetch sample\nconst target = \"https://some-endpoint.example/v1/resource\";\nconst res = await fetchWithPay(`https://orcpin.dev/v1/endpoint-reliability?url=${encodeURIComponent(target)}`);\nconst { facts, sample_size, flags } = await res.json();\n// Your policy, your call — e.g. require evidence before trusting it:\nconst trustworthy =\n  sample_size >= 20 &&\n  (facts.http_success_rate ?? 0) >= 0.95 &&\n  !flags.includes(\"consecutive_failures\");"}}},"discovery":{"bazaar":true,"service":{"serviceName":"Orcpin","tags":["wallet","defi","base","snapshot","aave","portfolio","risk","health-factor","balances","erc20","onchain","usdc","x402","reliability","uptime","endpoint-monitoring"],"iconUrl":"https://orcpin.com/orcpin-logo.png"},"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402","cdp_bazaar":{"resources":"https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources","search":"https://api.cdp.coinbase.com/platform/v2/x402/discovery/search","merchant":"https://api.cdp.coinbase.com/platform/v2/x402/discovery/merchant","lookup_by":"payTo","note":"Indexed after the first successful CDP settlement per route. For reliable lookup, GET search or merchant with ?payTo=<pay_to from any paid endpoint x402 block>. Semantic text search (?q=...) may lag for new listings."}}}