mirror of
https://github.com/discountry/ritmex-bot.git
synced 2026-09-10 08:48:07 +00:00
Update API token creation date in documentation and configuration
- Revised the `.env.example` and `maker-points-guide.md` to reflect the updated token creation date from 2025-01-15 to 2026-01-15. - Enhanced the `order-coordinator.ts`, `order-schema.ts`, and `types.ts` files to support stop-loss and take-profit price parameters in order intents. - Updated the `StandxGateway` and `order.ts` to handle new stop-loss and take-profit parameters in order creation. - Improved the `MakerPointsEngine` to calculate stop-loss prices based on order type, enhancing order management capabilities.
This commit is contained in:
@@ -701,6 +701,9 @@ export class MakerPointsEngine {
|
||||
if (!target) continue;
|
||||
if (target.amount < EPS) continue;
|
||||
try {
|
||||
// 计算止损价格:买单在价格下方 $1,卖单在价格上方 $1
|
||||
const priceNum = Number(target.price);
|
||||
const slPrice = target.side === "BUY" ? priceNum - 1 : priceNum + 1;
|
||||
await placeOrder(
|
||||
this.exchange,
|
||||
this.config.symbol,
|
||||
@@ -718,6 +721,7 @@ export class MakerPointsEngine {
|
||||
priceTick: this.priceTick,
|
||||
qtyStep: this.qtyStep,
|
||||
skipDedupe: true,
|
||||
slPrice,
|
||||
}
|
||||
);
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user