Documentation · v1 · 32 articles

Tradient Docs

Guides / Build a bot with the SDK

Build a bot with the SDK

Use the same tools without an LLM — for Telegram bots, dashboards or automated strategies.

Install

The SDK is written in TypeScript and works with viem, ethers and Reown AppKit wallets.

npm install @tradient/sdk

Scan, then buy

A minimal script that refuses risky tokens:

import { Tradient, toViemTx } from "@tradient/sdk";

const t = new Tradient({ apiKey: process.env.TRADIENT_KEY!, baseUrl: "https://tradient.trade" });
const scan = await t.checkToken("0x…");
if (scan.score < 50) throw new Error(scan.verdict);

const { transactions } = await t.swap({ from: "USDG", to: "0x…", amount: "50", wallet: account.address });
for (const tx of transactions) await walletClient.sendTransaction(toViemTx(tx));

Read-only keys

Bots that only post prices or scan results should use a read-only key. It cannot prepare transactions even if leaked.