We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug I got an error when using the trade method to buy or sell tokens.
My code is this
import { PublicKey } from "@solana/web3.js"; import {SolanaAgentKit} from "solana-agent-kit"; import {mainPrivateKey, openaiApiKey, rpcUrl} from "./config.js"; const client = new SolanaAgentKit( mainPrivateKey, rpcUrl, openaiApiKey ); const signature = await client.trade( new PublicKey("So11111111111111111111111111111111111111112"), // SOL 100000, // 100000 Fartgoat new PublicKey("BhKTb3L8yDKBY3erBiiYWfvyEUddzBWJnvELCsiYpump"), // USDC 100 // 1% slippage ); console.log("Token Mint Address:", signature);
Expected behavior It should exchange tokens.
Screenshots
Additional context An error occurred.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
I got an error when using the trade method to buy or sell tokens.
My code is this
Expected behavior
It should exchange tokens.
Screenshots
Additional context
An error occurred.
The text was updated successfully, but these errors were encountered: