컨텐츠로 건너뛰기
- Fixed KIS exchange to work properly without ccxt client
- Improved error handling for KIS-specific implementation
- Improved code quality and stability with test environment setup
- More stable stock trading support with improved KIS exchange error handling
- Previous behavior: Users had to multiply percent by leverage manually (e.g.,
1000%
for 100% position at 10x leverage)
- New behavior: Use natural percentages (e.g.,
100%
for full balance at any leverage)
- Migration: Divide your existing percent values by leverage if you were using the workaround
- Percent-based orders now correctly apply leverage multiplication
- Leverage is automatically applied only to entry signals (
entry/long
, entry/short
)
- Spot trades (
buy
, sell
) are not affected by leverage settings
- Clear logging shows leverage multiplier in calculations
- Replaced complex formula with transparent, predictable calculation
- Base safety margin: 1% minimum
- Additional margin for leverage: 0.5% per leverage level
- Exchange fees and slippage margin: 0.5%
- Maximum cap: 15% to avoid being overly conservative
Leverage | Safety Margin | Usable Balance |
---|
1x | 1.5% | 98.5% |
5x | 3.5% | 96.5% |
10x | 6% | 94% |
20x | 11% | 89% |
50x+ | 15% (capped) | 85% |
- Added automatic case conversion for order properties
- side property automatically converted to lowercase
- exchange, subExchange properties automatically converted to uppercase
- Removed redundant toUpperCase() calls for better efficiency
- Improved IP whitelist readability
- Separated TradingView IP addresses into dedicated variable
- Enhanced code readability and maintainability
- Added percent function for Korean Investment & Securities
- Enter percentage to buy % of deposit when buying, enter percentage to sell % of holdings when selling