Skip to main content

bankr-x402-sdk-dev Plugin

Web3 development integration for advanced use cases.

note

This plugin helps you build applications using the Bankr Agent API. If you want a simpler integration, use the bankr-agent plugin instead.

Installation

claude plugin install bankr-x402-sdk-dev

Capabilities

Market Analysis

Build features using market data:

"get token prices for my dashboard"
"implement trending tokens display"
"add technical analysis charts"

Portfolio Tracking

Track user portfolios:

"fetch user balances across chains"
"calculate portfolio value in USD"
"track position P&L"

Token Swaps

Implement swap functionality:

"add swap feature with 0x routing"
"implement cross-chain bridging"
"handle approval transactions"

Leveraged Trading

Integrate leverage trading via Hyperliquid or Avantis:

"implement leveraged positions"
"add stop-loss and take-profit"
"track open positions"

SDK Features

The plugin helps you implement:

FeatureSupported Chains
Prices & ChartsAll
Token SwapsEVM chains
Cross-chain BridgesEVM chains
Leveraged TradingHyperliquid (primary), Base via Avantis
Portfolio TrackingAll
NFT OperationsEVM chains

Example: Portfolio Dashboard

import { BankrClient } from "@bankr/sdk";

const client = new BankrClient({
privateKey: process.env.BANKR_PRIVATE_KEY as `0x${string}`,
walletAddress: process.env.BANKR_WALLET_ADDRESS,
});

// Query balances
const portfolio = await client.promptAndWait({
prompt: "What are my token balances?",
});
console.log(portfolio.response);

// Get token price
const price = await client.promptAndWait({
prompt: "What is the price of ETH?",
});
console.log(price.response);

// Execute a swap (returns transaction to sign with your wallet)
const swap = await client.promptAndWait({
prompt: "Swap 0.1 ETH to USDC on Base",
});
const tx = swap.transactions?.[0]?.metadata?.transaction;
// Execute tx with viem/ethers

For full feature access, see the Agent API documentation.