Go SDK
Install
go get github.com/wheelx-fi/wheelx-sdk/go/wheelxgo get github.com/ethereum/go-ethereumQuick Start
package main
import (
"context"
"fmt"
"log"
"github.com/wheelx-fi/wheelx-sdk/go/wheelx"
)
func main() {
// Initialize SDK
sdk := wheelx.NewWheelXSDK("")
// Create quote request
req := wheelx.QuoteRequest{
FromChain: 1,
ToChain: 1,
FromToken: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC
ToToken: "0xdAC17F958D2ee523a2206206994597C13D831ec7", // USDT
FromAddress: "0x742d35Cc6634C0532925a3b8Dc9F6A7c5D3a7C6a",
ToAddress: "0x742d35Cc6634C0532925a3b8Dc9F6A7c5D3a7C6a",
Amount: 1000000, // 1 USDC (6 decimals)
Slippage: &[]int{50}[0],
}
// Get quote
ctx := context.Background()
quote, err := sdk.GetQuote(ctx, req)
if err != nil {
log.Fatalf("Failed to get quote: %v", err)
}
fmt.Printf("Quote received: %s tokens\n", quote.AmountOut)
fmt.Printf("Request ID: %s\n", quote.RequestId)
}Transaction Execution
API Reference
WheelXSDK
Method
Description
TransactionExecutor
Method
Description
Last updated
Was this helpful?