Skip to main content
BlackSwan gives you three ways to integrate credit infrastructure into your application: the REST API (no install required), the JavaScript/TypeScript SDK, or the Python SDK. Choose the approach that matches your stack — all three expose the same underlying data and behave identically across supported testnets.

REST API

The REST API requires no installation, no SDK, and no authentication on testnet. Send standard HTTP requests from any environment — a browser, a server, a script, or a CI pipeline.
The API base URL is https://api.blackswanfinance.xyz. All endpoints accept GET requests and return JSON. See the API Reference for the full endpoint catalog.

JavaScript SDK

The JavaScript SDK supports Node.js 16+ and modern browsers. It ships with full TypeScript type definitions and exposes an async-first interface built on top of ethers.js. Requirements
  • Node.js 16 or higher
  • An RPC provider URL for the target network (Alchemy, Infura, QuickNode, or any compatible endpoint)
Install
Initialize the client
Fetch a credit dashboard

Python SDK

The Python SDK supports Python 3.8+ and is available on PyPI. It provides synchronous and async interfaces and is compatible with any WSGI or ASGI framework. Requirements
  • Python 3.8 or higher
  • An RPC provider URL for the target network
Install
Initialize the client
Fetch a credit dashboard

Both SDKs require an RPC provider URL to communicate with the underlying blockchain. You can get a free endpoint from Alchemy, Infura, or QuickNode. The RPC URL is only used for on-chain reads — no transactions or signing are required.