Commit Graph

353 Commits

Author SHA1 Message Date
ysq 020187a57a feat: add trade type parameter and bump version to 1.1.1 2025-09-22 01:25:32 +08:00
ysq 334e685104 feat: upgrade to v1.1.0 and add universal token swap functionality
- Version bump: upgrade from 1.0.2 to 1.1.0
- Add TradeSwapParams struct for universal token-to-token swapping
- Update bonk_copy_trading example to use new swap method instead of buy/sell
- Expand trading parameters documentation with TradeSwapParams details
- Fix SOL_TOKEN_ACCOUNT constant definition
- Add USD1 token support (Bonk protocol only)
- Enhance account management and optimization options for token swaps
2025-09-22 01:09:41 +08:00
ysq 4780e71c11 refactor: unify trading parameters and add USD1 token pool support
- Merge BuyParams and SellParams into unified SwapParams structure
- Add USD1 token pool support with related constants and configurations
- Refactor trade executor by combining buy_with_tip and sell_with_tip into swap method
- Update all protocol instruction builders to support new parameter structure
- Standardize ATA creation/closing parameter naming conventions
- Update example code to use new API interfaces
- Optimize trading logic with automatic direction detection based on input token type
2025-09-22 00:05:20 +08:00
ysq f8891f3147 refactor: simplify trading parameters API and nonce handling
- Change recent_blockhash from required to optional parameter
- Replace separate nonce_account and current_nonce with unified durable_nonce
- Update all examples and documentation to reflect API changes
- Improve nonce cache usage pattern for better developer experience

BREAKING CHANGE: TradeBuyParams and TradeSellParams API has changed
- recent_blockhash is now Option<Hash> instead of Hash
- nonce_account and current_nonce fields replaced with durable_nonce: Option<DurableNonceInfo>
2025-09-21 21:56:17 +08:00
ysq b4769749f5 Merge commit 'dbde80b4282767f219bac2b92ece85e0e747ce42' 2025-09-21 21:35:04 +08:00
ysq 9ba8e3b3e7 refactor(gas-fee): Refactor Gas Fee Strategy API
- Rename add_* methods to set_* for clarity
- Simplify normal strategy API (remove TradeType param)
- Expose set/del methods for flexible strategy management
- Update docs and examples to match new API

BREAKING CHANGE: Method names changed for Gas Fee Strategy
2025-09-21 21:34:19 +08:00
wood dbde80b428 update dedicated tip account for temporal 2025-09-21 20:47:36 +08:00
wood 0ac710ce75 fix build warn 2025-09-21 02:56:02 +08:00
wood b46582a273 rebuild nonce and swqos strategy 2025-09-20 14:00:45 +08:00
ysq 4df22f2057 feat: upgrade to v1.0.2 2025-09-20 00:52:37 +08:00
ysq afc34f57fc Merge commit 'd1c001df368e2ecf517e3ff7b8a8f5c46d7b8ad7' 2025-09-20 00:27:28 +08:00
ysq d1c001df36 refactor: move set_global_gas_fee_strategy to GasFeeStrategy struct 2025-09-19 23:59:52 +08:00
ysq e4a6b49aab refactor(gas-fee): replace init_builtin_fee_strategies with set_global_strategy
- Add customizable cu_limit, cu_price, buy_tip, sell_tip parameters
- Update all examples and documentation
- Simplify strategy configuration API
2025-09-19 23:31:41 +08:00
ysq 4907aafead feat: add flexible nonce parameter support
- Add nonce_account and current_nonce to trade parameters
- Remove hardcoded NonceCache dependency from nonce_manager
- Update examples and documentation for new nonce usage
- Fix nonce documentation errors and improve clarity
2025-09-19 18:02:11 +08:00
ysq a53038855e feat: add gas fee strategy system with examples
- Add GasFeeStrategy module supporting normal and high-low fee strategies
- Initialize gas fee strategies in all examples
- Update documentation and README with gas fee strategy configuration
- Improve nonce cache documentation emphasizing latest nonce usage
- Adjust default gas fee configuration parameters
- Remove duplicate imports and unused constant references
2025-09-19 15:46:51 +08:00
ysq e8abb65e2e refactor: simplify GasFeeStrategy from singleton to static methods
- Replace OnceLock singleton pattern with LazyLock static storage
- Convert instance methods to static methods for better performance
- Remove enabled/disabled strategy type management complexity
- Update parallel execution to use new static API
2025-09-19 11:35:13 +08:00
ysq 006686e8a3 feat: major gas fee strategy and documentation overhaul
- feat(gas): add comprehensive gas fee strategy management system
  * Implement GasFeeStrategyType with Default/LowTipHighCuPrice/HighTipLowCuPrice strategies
  * Add dynamic gas fee configuration per SWQOS service and trade type
  * Integrate arc-swap for thread-safe strategy updates

- docs: restructure documentation with dedicated guides
  * Add ADDRESS_LOOKUP_TABLE.md/CN.md for lookup table configuration
  * Add NONCE_CACHE.md/CN.md for nonce management documentation
  * Add TRADING_PARAMETERS.md/CN.md for comprehensive parameter guides
  * Simplify main README.md with focused overview

- refactor: update all examples with new gas fee strategy integration
  * Modernize 14 trading examples with consistent parameter handling
  * Improve error handling and configuration management
  * Enhance parallel trading implementation
2025-09-19 00:49:45 +08:00
ysq fad343ffbf Rollback 2025-09-17 11:14:15 +08:00
ysq da28f40889 feat: v1.0.1 - add custom compute unit limit support
Add custom_cu_limit parameter to parallel trading functions, allowing users to override default compute unit limits for both buy and sell operations.
2025-09-17 00:26:51 +08:00
ysq c5ff7c1cbb refactor: Refactor SDK core architecture and trading parameter system
- Refactor SolanaTrade main class structure with improved modular design
- Refactor trading parameter system: BuyParams/SellParams -> InternalBuyParams/InternalSellParams
- Remove deprecated PriorityFee and related utility functions
- Add SwqosSettings to replace legacy SwqosConfig
- Add comprehensive technical documentation:
  • Address Lookup Table usage guide (EN/CN)
  • Nonce Cache mechanism documentation (EN/CN)
  • Trading Parameters documentation (EN/CN)
- Refactor all example code to adapt to new API interfaces
- Optimize public API design and code comments
- Clean up redundant utility functions and type definitions

Impact: 43 files changed, 2013 insertions(+), 1735 deletions(-)
2025-09-17 00:10:33 +08:00
ysq 943c2627f3 feat: upgrade to v0.6.15 2025-09-15 22:47:07 +08:00
ysq 558188bb38 feat: Add CLI trading tool with multi-DEX support 2025-09-15 21:12:42 +08:00
ysq 8aecc039b1 feat: upgrade to v0.6.13 2025-09-15 00:02:21 +08:00
ysq 1192730e22 feat: upgrade to v0.6.12 2025-09-14 23:28:45 +08:00
ysq 206baca025 feat: bump to v0.6.11 with dependency updates
- Update solana-streamer-sdk to 0.4.9
- Increase transaction confirmation timeout to 10s
- Update documentation version references
2025-09-14 01:21:28 +08:00
sgxiang e52841dc73 Update README.md 2025-09-13 21:09:18 +08:00
ysq f273cf2c82 feat: upgrade to v0.6.10 2025-09-13 17:12:03 +08:00
ysq a1895b1ac2 feat: upgrade to v0.6.9 2025-09-13 00:15:18 +08:00
ysq bbad566c3b fixed 2025-09-12 10:13:21 +08:00
wood 008694daf8 fix swqos tips index errors 2025-09-12 04:29:47 +08:00
ysq 40b4541036 feat: deprecate legacy utility functions and bump version to 0.6.7
- Add deprecation warnings to PumpFun and PumpSwap utility functions
- Update version from 0.6.6 to 0.6.7 in Cargo.toml and documentation
- Add .claude/ directory to .gitignore
- Mark legacy price calculation and data retrieval functions as deprecated
2025-09-11 17:17:58 +08:00
ysq fce043f087 feat: upgrade to v0.6.6 with improved tip transfer logic 2025-09-11 13:42:23 +08:00
ysq b7275b7e18 fixed 2025-09-10 23:37:04 +08:00
ysq dec35a12c4 fixed 2025-09-10 23:25:24 +08:00
ysq 108f635113 feat: upgrade to v0.6.5 2025-09-10 23:23:35 +08:00
ysq b4aa18b0cd docs: Update Readme 2025-09-10 17:35:44 +08:00
ysq fbed00e38b docs: Update Readme 2025-09-10 17:02:54 +08:00
ysq 688f14ebc1 feat: upgrade to v0.6.4 2025-09-10 11:56:16 +08:00
ysq 2226f53f52 feat: upgrade to v0.6.3 2025-09-10 10:52:47 +08:00
ysq 0cb4e08794 docs: Add emoji icons to parameter section headers 2025-09-10 00:37:00 +08:00
ysq d65122c1be Merge commit '30c41efece8223ec65b55e7328f5133dab2627c0' 2025-09-10 00:18:58 +08:00
ysq 30c41efece feat: add seed optimization and mint ATA creation control
- Add open_seed_optimize parameter for transaction CU optimization using createAccountWithSeed
- Add create_mint_ata parameter to control automatic mint token account creation
- Update all examples to include new create_mint_ata parameter (set to true)
- Enhance documentation with detailed explanations of seed optimization features
- Add warnings about compatibility requirements when using seed optimization
- Support conditional mint ATA creation across all trading protocols (PumpFun, PumpSwap, Bonk, Raydium)

BREAKING CHANGE: All buy functions now require create_mint_ata parameter
2025-09-10 00:18:31 +08:00
ysq 5225cff73c feat: add seed optimization and refactor wSOL account control
- Add `open_seed_optimize` parameter for enhanced performance
- Move wSOL account flags from protocol params to buy/sell params
- Add seed_trading example demonstrating optimization features
- Update all examples and upgrade dependencies
- Improve wSOL account management flexibility

BREAKING CHANGE: Modified buy/sell method signatures and protocol param structs
2025-09-10 00:05:13 +08:00
ysq 1f44de8f9a feat: integrate seed optimization and refactor CPMM config
- Upgrade solana-streamer-sdk to 0.4.2
- Add seed optimization support for Raydium instructions
- Refactor CPMM params with dynamic AMM config
- Remove hardcoded AMM_CONFIG constant
2025-09-09 21:42:25 +08:00
ysq 7d7ee3cfbf refactor: split auto_handle_wsol into create/close_wsol_ata params
- Replace auto_handle_wsol with create_wsol_ata and close_wsol_ata
- Enable fine-grained control over wSOL account lifecycle
- Update all trading protocols and documentation
- Add open_seed_optimize support in fast functions

This provides better flexibility for batch operations and advanced trading.
2025-09-09 17:35:09 +08:00
ysq 1c5cfd4511 Merge commit 'cab5ee8ed4a80adbfd51e5c02411ef93ac9f37b4' into feat/seed 2025-09-09 17:09:35 +08:00
ysq 48a6c6283a refactor: optimize trading execution architecture and add wSOL management
- Simplify TradeExecutor interface by integrating middleware and swqos clients into params
- Refactor parallel execution module with dedicated buy/sell execute functions
- Add SOL wrapping/unwrapping functionality for wSOL management
- Remove redundant parameter passing in sell operations
- Delete example main.rs file
- Optimize transaction building with integrated parameter structures

BREAKING CHANGE: TradeExecutor interface simplified, middleware and swqos_clients now passed through params
2025-09-09 17:02:24 +08:00
sgxiang cab5ee8ed4 Merge pull request #31 from 321llljjjfff123/main
feat: 为 buy 和 sell 方法添加 Signature 返回值
2025-09-09 16:03:12 +08:00
liam 5092561091 feat: 为 buy 和 sell 方法添加 Signature 返回值 2025-09-09 12:03:42 +08:00
ysq b9fa2f2f0f refactor: optimize instruction builders structure and improve code documentation
- Add structured comment sections with clear code organization
- Improve variable naming and account address calculation logic
- Update comments for better readability across all trading protocols
- Enhance code structure for PumpFun, PumpSwap, and Raydium protocols
2025-09-09 00:50:24 +08:00