🛠Breaking Changes
Modified Methods
- **`build_trade_close_tx`**:
- **Previous Behavior**: Required a 6-decimal precision float for `collateral_to_close` (e.g., `100500000` for `100.5 USDC`).
- **New Behavior**: Now requires a standard float value for `collateral_to_close` (e.g., `100.5` for `100.5 USDC`).
✨ New Methods
- **`build_trade_tp_sl_update_tx`**:
- **Description**: Introduced to allow traders to update the take profit and stop loss of a trade without closing and reopening it.
- **Inputs**:
- `pair_index`
- `trade_index`
- `take_profit_price`
- `stop_loss_price`
- `trader` (optional)
- **Output**: Returns the transaction object to update the take profit and stop loss.
🔧 Improvements
- Added a warning for the upcoming **v1.5 contracts upgrade**.
- Fixed issues with margin updates and USDC approval methods.
- Optimized fee values for margin updates.
- **`write_contract`**: Now auto-fills the `nonce` and `chainId` fields if not provided.