DFB API v2 SDKs wrap the HTTP contract with typed request helpers and consistent error handling. They default to https://api.dfb.network.

TypeScript

Use the TypeScript SDK in browsers, Node.js backends, and wallet apps.
npm install @dfb-network/api-v2
yarn add @dfb-network/api-v2
pnpm add @dfb-network/api-v2
import { DfbApiV2Client } from "@dfb-network/api-v2";

const dfb = new DfbApiV2Client();
const quote = await dfb.createSwapQuote({
  network: "polygon",
  fromToken: "0x...",
  toToken: "0x...",
  amount: "1000000000000000000",
  address: "0x..."
});
const action = await dfb.createSwapAction(quote.quoteId);

Python

Use the Python SDK in backend jobs, API servers, and analytics pipelines.
pip install dfb-api-v2
from dfb_api_v2 import DfbApiV2Client

client = DfbApiV2Client()
health = client.health()

Go

Use the Go SDK in services and workers.
go get github.com/dfb-network/dfb-api-v2-go
client := dfbapiv2.NewClient(nil)
health, err := client.Health(ctx)

Rust

Use the Rust SDK in backend services and trading infrastructure.
cargo add dfb-api-v2
let client = dfb_api_v2::Client::new();
let health = client.health()?;