# BlackSwan ## Docs - [GET /v1/apr/{wallet} — Wallet Annual Percentage Rate](https://blackswan-23965643.mintlify.app/api/apr.md): GET /v1/apr/{wallet} — Returns the current APR in basis points for any EVM wallet. Divide by 1000 to convert to a human-readable percentage. - [GET /v1/credit/{wallet} — Full Wallet Credit Profile](https://blackswan-23965643.mintlify.app/api/credit.md): GET /v1/credit/{wallet} — Returns complete credit profile including trust ratio, tier, APR, loan totals, and default count for any EVM wallet. - [GET /health — BlackSwan API Health Check Endpoint](https://blackswan-23965643.mintlify.app/api/health.md): GET /health — Returns API availability status and a Unix timestamp. Use this endpoint to verify the BlackSwan REST API is online and reachable. - [GET /v1/history/{wallet} — On-Chain Loan History](https://blackswan-23965643.mintlify.app/api/history.md): GET /v1/history/{wallet} — Returns total loans, successful repayments, and default count for any EVM wallet address on the BlackSwan protocol. - [GET /v1/reputation/{wallet} — Wallet Reputation Score](https://blackswan-23965643.mintlify.app/api/reputation.md): GET /v1/reputation/{wallet} — Returns repaid loan volume, total loan count, and trust ratio score for any EVM wallet address on BlackSwan. - [GET /v1/tier/{wallet} — Wallet Credit Tier (A–E)](https://blackswan-23965643.mintlify.app/api/tier.md): GET /v1/tier/{wallet} — Returns the credit tier letter (A through E) assigned to a wallet based on its on-chain BlackSwan trust ratio score. - [BlackSwan Changelog: API, SDK, and Protocol Updates](https://blackswan-23965643.mintlify.app/changelog.md): Release history for BlackSwan. See what was added, changed, or fixed in each version of the REST API, JavaScript SDK, and Python SDK. - [APR Calculation and Trust-Based Pricing in BlackSwan](https://blackswan-23965643.mintlify.app/concepts/apr.md): BlackSwan calculates APR dynamically based on a wallet's trust tier. Higher trust scores result in lower borrowing costs. APR is returned in basis points. - [Understanding BlackSwan Credit Scores and Trust Tiers](https://blackswan-23965643.mintlify.app/concepts/credit-score.md): BlackSwan credit scores are derived from real on-chain lending behavior. Learn what metrics make up a credit score and how tiers are assigned. - [How Loan Defaults Impact Your BlackSwan Credit Score](https://blackswan-23965643.mintlify.app/concepts/default-handling.md): A default occurs when a loan is not repaid by the deadline. Understand how defaults are recorded, how they impact your trust score, and how to recover. - [Loan History: Complete Borrowing Record for Any Wallet](https://blackswan-23965643.mintlify.app/concepts/loan-history.md): BlackSwan tracks total loans, successful repayments, and defaults for every wallet. Query loan history to assess borrower risk before lending. - [Soulbound Token: Your Permanent On-Chain Credit Identity](https://blackswan-23965643.mintlify.app/concepts/soulbound-token.md): A Soulbound Token (SBT) is a non-transferable NFT that represents your credit identity on BlackSwan. It is minted automatically on your first loan. - [BlackSwan Trust Ratio: On-Chain Creditworthiness Score](https://blackswan-23965643.mintlify.app/concepts/trust-ratio.md): The Trust Ratio is BlackSwan's core creditworthiness metric — a score from 0 to 10,000 derived entirely from on-chain lending behavior. - [Contact BlackSwan: Discord, Email, and GitHub Links](https://blackswan-23965643.mintlify.app/contact.md): Get help with BlackSwan through our developer Discord or email. Reach out for production API access, technical questions, and partnership inquiries. - [BlackSwan FAQ: Networks, Wallets, and Trust Scores](https://blackswan-23965643.mintlify.app/faq.md): Answers to common questions about BlackSwan: supported networks, wallet compatibility, API keys, trust ratio calculation, and production readiness. - [BlackSwan API Access: Authentication and Rate Limits](https://blackswan-23965643.mintlify.app/getting-started/api-key.md): BlackSwan's testnet REST API requires no API key. Learn about rate limits, production access, and how to contact us for higher limits. - [Install the BlackSwan JavaScript or Python SDK Today](https://blackswan-23965643.mintlify.app/getting-started/installation.md): Install and configure the BlackSwan JavaScript or Python SDK, or call the REST API directly with no setup. Node.js 16+ or Python 3.8+ required. - [BlackSwan Quickstart: Fetch Your First Credit Score](https://blackswan-23965643.mintlify.app/getting-started/quickstart.md): Fetch a wallet's trust ratio, credit tier, and APR recommendation from BlackSwan using the REST API, JavaScript SDK, or Python SDK in under 2 minutes. - [BlackSwan: On-Chain Credit Infrastructure for Web3](https://blackswan-23965643.mintlify.app/introduction.md): BlackSwan is decentralized credit infrastructure that exposes wallet reputation, trust scores, APR, and lending history through REST APIs and SDKs. - [BlackSwan Protocol Architecture: Components and Flow](https://blackswan-23965643.mintlify.app/protocol/architecture.md): How BlackSwan's components fit together: SDKs, REST API, smart contracts, and Soulbound Tokens working in concert to provide on-chain credit data. - [BlackSwan Roadmap: Current Features and Planned Releases](https://blackswan-23965643.mintlify.app/protocol/roadmap.md): See what's live in BlackSwan v1.0 and what's planned for v1.1 and v2.0 — mainnet support, webhook notifications, GraphQL API, and more. - [BlackSwan Smart Contract Addresses, ABIs, and Networks](https://blackswan-23965643.mintlify.app/protocol/smart-contracts.md): Deployed BlackSwan contract addresses on Polygon Amoy and Ethereum Sepolia testnets, with links to block explorers and ABI access via the SDK. - [BlackSwan Trust Model: Ratios, Credit Tiers, and APR](https://blackswan-23965643.mintlify.app/protocol/trust-model.md): How BlackSwan calculates trust ratios, assigns credit tiers, and determines APR. Understand the scoring system to build better lending applications. - [Configure the BlackSwan JavaScript Client and Contracts](https://blackswan-23965643.mintlify.app/sdks/javascript/configuration.md): Initialize BlackSwanClient with your network and RPC URL. Supports Polygon Amoy and Ethereum Sepolia testnets. Access contract addresses as named exports. - [BlackSwan JavaScript SDK Examples and Integrations](https://blackswan-23965643.mintlify.app/sdks/javascript/examples.md): Step-by-step BlackSwan SDK examples for React, Next.js, Node.js, and Express. Includes credit dashboard, trust score, and APR display code. - [Install the BlackSwan JavaScript SDK with npm, yarn, pnpm](https://blackswan-23965643.mintlify.app/sdks/javascript/installation.md): Install blackswan-sdk with npm, yarn, or pnpm to query on-chain credit profiles, trust scores, APRs, and loan history. Requires Node.js 16+. - [All BlackSwan JavaScript SDK Methods and Return Types](https://blackswan-23965643.mintlify.app/sdks/javascript/methods.md): Full reference for all BlackSwanClient methods: getCreditDashboard, getTrustRatio, getCurrentApr, getReputation, getCreditHistory, and more. - [BlackSwan Python SDK Configuration Reference](https://blackswan-23965643.mintlify.app/sdks/python/configuration.md): Configure the BlackSwan Python SDK client with your chosen network and RPC endpoint to start reading on-chain credit data. - [BlackSwan Python SDK Integration Examples](https://blackswan-23965643.mintlify.app/sdks/python/examples.md): Practical BlackSwan Python SDK examples for FastAPI and Flask — fetch credit dashboards, trust ratios, and APR data in your own backend. - [BlackSwan Python SDK Installation Guide](https://blackswan-23965643.mintlify.app/sdks/python/installation.md): Install the BlackSwan Python SDK via pip and get your environment ready to query on-chain credit data in minutes. - [BlackSwan Python SDK Methods Reference](https://blackswan-23965643.mintlify.app/sdks/python/methods.md): Full reference for all six BlackSwan Python SDK methods: credit dashboard, trust ratio, APR, SBT balance, reputation, and credit history. - [Check Borrower Loan Eligibility with the BlackSwan SDK](https://blackswan-23965643.mintlify.app/tutorials/borrower-eligibility.md): Learn how to check if a wallet qualifies for a loan using the BlackSwan SDK, including tier checks, APR calculation, and default history. - [Build a Real-Time BlackSwan Credit Dashboard in React](https://blackswan-23965643.mintlify.app/tutorials/credit-dashboard.md): Learn how to build a complete credit dashboard displaying trust score, current APR, and loan history using the BlackSwan JavaScript SDK in React. - [BlackSwan SDK Next.js App Router Integration Guide](https://blackswan-23965643.mintlify.app/tutorials/nextjs-integration.md): Integrate the BlackSwan SDK into a Next.js App Router project with a server-side API route and a client component for credit data display. - [BlackSwan Python SDK Flask and FastAPI Integration](https://blackswan-23965643.mintlify.app/tutorials/python-backend.md): Learn how to integrate the BlackSwan Python SDK into Flask and FastAPI backends to serve credit dashboard and eligibility data via REST APIs. - [BlackSwan SDK React Integration Guide for Developers](https://blackswan-23965643.mintlify.app/tutorials/react-integration.md): Step-by-step guide to integrating the BlackSwan SDK into a React application using a custom hook with loading and error state handling. - [Display a Wallet Trust Score with the BlackSwan SDK](https://blackswan-23965643.mintlify.app/tutorials/trust-score.md): Learn how to fetch and display a wallet's trust score and tier using the BlackSwan SDK, with visual indicator and progress bar components.