mirror of
https://github.com/discountry/ritmex-bot.git
synced 2026-09-09 08:18:07 +00:00
优化做市引擎、偏移做市引擎和趋势引擎的订单管理逻辑,将待取消订单的类型从数字更改为字符串,确保在处理订单时的类型一致性。同时,增强风险检查逻辑,确保在平仓时使用正确的价格,提升交易策略的稳定性和准确性。
This commit is contained in:
@@ -51,10 +51,17 @@ export interface GrvtOrderLeg {
|
||||
is_buying_asset?: boolean;
|
||||
}
|
||||
|
||||
export type GrvtTimeInForce =
|
||||
| "GOOD_TILL_TIME"
|
||||
| "ALL_OR_NONE"
|
||||
| "IMMEDIATE_OR_CANCEL"
|
||||
| "FILL_OR_KILL";
|
||||
|
||||
export interface GrvtOrderMetadata {
|
||||
client_order_id?: string;
|
||||
create_time?: string;
|
||||
broker?: string | null;
|
||||
trigger?: GrvtTriggerMetadata;
|
||||
}
|
||||
|
||||
export interface GrvtOrderState {
|
||||
@@ -71,7 +78,7 @@ export interface GrvtOrder {
|
||||
client_order_id?: string;
|
||||
sub_account_id?: string;
|
||||
is_market?: boolean;
|
||||
time_in_force?: string;
|
||||
time_in_force?: GrvtTimeInForce;
|
||||
post_only?: boolean;
|
||||
reduce_only?: boolean;
|
||||
legs?: GrvtOrderLeg[];
|
||||
@@ -229,7 +236,7 @@ export interface GrvtOrderMetadataInput {
|
||||
export interface GrvtUnsignedOrder {
|
||||
sub_account_id: string;
|
||||
is_market: boolean;
|
||||
time_in_force: string;
|
||||
time_in_force: GrvtTimeInForce;
|
||||
post_only: boolean;
|
||||
reduce_only: boolean;
|
||||
legs: GrvtUnsignedOrderLeg[];
|
||||
|
||||
Reference in New Issue
Block a user