π―SDK Usage Guide
Learn how to use the Yoink SDK to interact with bonding curve tokens on Solana.
Basic Usage
Initializing the SDK
import { YoinkSDK } from "yoink-sdk";
import { Connection, Keypair, LAMPORTS_PER_SOL, PublicKey } from "@solana/web3.js";
import { AnchorProvider } from "@coral-xyz/anchor";
import NodeWallet from "@coral-xyz/anchor/dist/cjs/nodewallet";
// Setup connection and provider
const connection = new Connection("RPC_URL_LINK");
const wallet = new NodeWallet(yourKeypair);
const provider = new AnchorProvider(connection, wallet, { commitment: "confirmed" });
// Initialize SDK
const sdk = new YoinkSDK(provider);Core Features
π° Trading Operations
Buy Tokens
Sell Tokens
Get Price Quotes
π Market Data & Analytics
Get Bonding Curve Information
Get Protocol Information
Advanced Features
π Price Monitoring
π― Smart Trading with Price Checks
Error Handling
Common Error Patterns
Constants & Utilities
Available Constants
Helper Functions
Best Practices
π Security
Always validate mint addresses before trading
Use appropriate slippage settings for market conditions
Implement proper error handling for all operations
Never expose private keys in code
β‘ Performance
Cache bonding curve data when monitoring multiple tokens
Use batch requests when possible
Implement proper rate limiting to avoid RPC throttling
Handle network timeouts gracefully
Next Steps
π€ Build a Trading Bot
Last updated
