mirror of
https://github.com/discountry/ritmex-bot.git
synced 2026-09-11 09:18:08 +00:00
Add changeMarginMode method to ExchangeAdapter and Standx classes
- Introduced `changeMarginMode` method in `ExchangeAdapter` interface to allow margin mode adjustments. - Implemented the `changeMarginMode` method in `StandxExchangeAdapter` to interact with the gateway for changing margin modes. - Added corresponding `changeMarginMode` method in `StandxGateway` to handle API requests for margin mode changes. - Enhanced `MakerPointsEngine` to ensure isolated margin mode before order placement, with appropriate logging and defense mode activation if the change fails. - Created tests for margin mode functionality to validate behavior under different scenarios.
This commit is contained in:
@@ -99,6 +99,8 @@ describe("MakerPointsEngine defense-mode REST polling", () => {
|
||||
standxRestUnhealthy: false,
|
||||
standxRestConsecutiveErrors: 0,
|
||||
standxRestLastError: null,
|
||||
marginModeNotIsolated: false,
|
||||
marginMode: "isolated",
|
||||
standxDepthAge: 6000,
|
||||
binanceAge: 0,
|
||||
standxAccountAge: 0,
|
||||
@@ -149,6 +151,8 @@ describe("MakerPointsEngine defense-mode REST polling", () => {
|
||||
standxRestUnhealthy: false,
|
||||
standxRestConsecutiveErrors: 0,
|
||||
standxRestLastError: null,
|
||||
marginModeNotIsolated: false,
|
||||
marginMode: "isolated",
|
||||
standxDepthAge: 6000,
|
||||
binanceAge: 0,
|
||||
standxAccountAge: 0,
|
||||
@@ -162,4 +166,3 @@ describe("MakerPointsEngine defense-mode REST polling", () => {
|
||||
engine.stop();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user