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:
discountry
2026-01-16 11:29:26 +08:00
parent aa24995d28
commit 12e8e3e064
8 changed files with 69 additions and 12 deletions
+4
View File
@@ -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) {