Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion artifacts/apidocs/schemas/api_cancel_order_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
|sub_account_id<br>`sa` |string|True|The subaccount ID cancelling the order|
|order_id<br>`oi` |string|False<br>`0`|Cancel the order with this `order_id`|
|client_order_id<br>`co` |string|False<br>`0`|Cancel the order with this `client_order_id`|
|time_to_live_ms<br>`tt` |string|False<br>`500`|Specifies the time-to-live (in milliseconds) for this cancellation.<br>During this period, any order creation with a matching `client_order_id` will also be cancelled.<br>This mechanism helps mitigate time-of-flight issues where cancellations might arrive before the corresponding orders.<br>Hence, cancellation by `order_id` ignores this field as the exchange can only assign `order_id`s to already-processed order creations.<br>The duration cannot be negative, is rounded down to the nearest 100ms (e.g., `670` -> `600`, `30` -> `0`) and capped at 5 seconds (i.e., `5000`).<br>Value of `0` or omission disables the TTL mechanism, so only orders already existing in matcher state at request time will be searched.<br>|
|time_to_live_ms<br>`tt` |string|False<br>`'0'`|Specifies the time-to-live (in milliseconds) for this cancellation.<br>During this period, any order creation with a matching `client_order_id` will be cancelled and not be added to the GRVT matching engine.<br>This mechanism helps mitigate time-of-flight issues where cancellations might arrive before the corresponding orders.<br>Hence, cancellation by `order_id` ignores this field as the exchange can only assign `order_id`s to already-processed order creations.<br>The duration cannot be negative, is rounded down to the nearest 100ms (e.g., `'670'` -> `'600'`, `'30'` -> `'0'`) and capped at 5 seconds (i.e., `'5000'`).<br>Value of `'0'` or omission disables the TTL mechanism, so only orders already existing in matching engine state at request time will be searched.<br>If the caller requests multiple successive cancellations for a given order, such that the time-to-live windows overlap, only the first request will be considered.<br>|
36 changes: 18 additions & 18 deletions artifacts/apidocs/trading_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -866,7 +866,7 @@ LITE ENDPOINT: lite/v1/cancel_order
"sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'",
"order_id": "0x1028403",
"client_order_id": "23042",
"time_to_live_ms": `500`
"time_to_live_ms": "500"
}
```
**Lite Request**
Expand All @@ -875,7 +875,7 @@ LITE ENDPOINT: lite/v1/cancel_order
"sa": "'$GRVT_SUB_ACCOUNT_ID'",
"oi": "0x1028403",
"co": "23042",
"tt": `500`
"tt": "500"
}
```
</section>
Expand Down Expand Up @@ -951,7 +951,7 @@ LITE ENDPOINT: lite/v1/cancel_order
"sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'",
"order_id": "0x1028403",
"client_order_id": "23042",
"time_to_live_ms": `500`
"time_to_live_ms": "500"
}
'
```
Expand All @@ -968,7 +968,7 @@ LITE ENDPOINT: lite/v1/cancel_order
"sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'",
"order_id": "0x1028403",
"client_order_id": "23042",
"time_to_live_ms": `500`
"time_to_live_ms": "500"
},
"id": 123
}
Expand All @@ -985,7 +985,7 @@ LITE ENDPOINT: lite/v1/cancel_order
"sa": "'$GRVT_SUB_ACCOUNT_ID'",
"oi": "0x1028403",
"co": "23042",
"tt": `500`
"tt": "500"
}
'
```
Expand All @@ -1002,7 +1002,7 @@ LITE ENDPOINT: lite/v1/cancel_order
"sa": "'$GRVT_SUB_ACCOUNT_ID'",
"oi": "0x1028403",
"co": "23042",
"tt": `500`
"tt": "500"
},
"i": 123
}
Expand All @@ -1020,7 +1020,7 @@ LITE ENDPOINT: lite/v1/cancel_order
"sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'",
"order_id": "0x1028403",
"client_order_id": "23042",
"time_to_live_ms": `500`
"time_to_live_ms": "500"
}
'
```
Expand All @@ -1037,7 +1037,7 @@ LITE ENDPOINT: lite/v1/cancel_order
"sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'",
"order_id": "0x1028403",
"client_order_id": "23042",
"time_to_live_ms": `500`
"time_to_live_ms": "500"
},
"id": 123
}
Expand All @@ -1054,7 +1054,7 @@ LITE ENDPOINT: lite/v1/cancel_order
"sa": "'$GRVT_SUB_ACCOUNT_ID'",
"oi": "0x1028403",
"co": "23042",
"tt": `500`
"tt": "500"
}
'
```
Expand All @@ -1071,7 +1071,7 @@ LITE ENDPOINT: lite/v1/cancel_order
"sa": "'$GRVT_SUB_ACCOUNT_ID'",
"oi": "0x1028403",
"co": "23042",
"tt": `500`
"tt": "500"
},
"i": 123
}
Expand All @@ -1089,7 +1089,7 @@ LITE ENDPOINT: lite/v1/cancel_order
"sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'",
"order_id": "0x1028403",
"client_order_id": "23042",
"time_to_live_ms": `500`
"time_to_live_ms": "500"
}
'
```
Expand All @@ -1106,7 +1106,7 @@ LITE ENDPOINT: lite/v1/cancel_order
"sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'",
"order_id": "0x1028403",
"client_order_id": "23042",
"time_to_live_ms": `500`
"time_to_live_ms": "500"
},
"id": 123
}
Expand All @@ -1123,7 +1123,7 @@ LITE ENDPOINT: lite/v1/cancel_order
"sa": "'$GRVT_SUB_ACCOUNT_ID'",
"oi": "0x1028403",
"co": "23042",
"tt": `500`
"tt": "500"
}
'
```
Expand All @@ -1140,7 +1140,7 @@ LITE ENDPOINT: lite/v1/cancel_order
"sa": "'$GRVT_SUB_ACCOUNT_ID'",
"oi": "0x1028403",
"co": "23042",
"tt": `500`
"tt": "500"
},
"i": 123
}
Expand All @@ -1158,7 +1158,7 @@ LITE ENDPOINT: lite/v1/cancel_order
"sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'",
"order_id": "0x1028403",
"client_order_id": "23042",
"time_to_live_ms": `500`
"time_to_live_ms": "500"
}
'
```
Expand All @@ -1175,7 +1175,7 @@ LITE ENDPOINT: lite/v1/cancel_order
"sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'",
"order_id": "0x1028403",
"client_order_id": "23042",
"time_to_live_ms": `500`
"time_to_live_ms": "500"
},
"id": 123
}
Expand All @@ -1192,7 +1192,7 @@ LITE ENDPOINT: lite/v1/cancel_order
"sa": "'$GRVT_SUB_ACCOUNT_ID'",
"oi": "0x1028403",
"co": "23042",
"tt": `500`
"tt": "500"
}
'
```
Expand All @@ -1209,7 +1209,7 @@ LITE ENDPOINT: lite/v1/cancel_order
"sa": "'$GRVT_SUB_ACCOUNT_ID'",
"oi": "0x1028403",
"co": "23042",
"tt": `500`
"tt": "500"
},
"i": 123
}
Expand Down
7 changes: 4 additions & 3 deletions artifacts/pysdk/grvt_raw_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -1807,11 +1807,12 @@ class ApiCancelOrderRequest:
client_order_id: str | None = None
"""
Specifies the time-to-live (in milliseconds) for this cancellation.
During this period, any order creation with a matching `client_order_id` will also be cancelled.
During this period, any order creation with a matching `client_order_id` will be cancelled and not be added to the GRVT matching engine.
This mechanism helps mitigate time-of-flight issues where cancellations might arrive before the corresponding orders.
Hence, cancellation by `order_id` ignores this field as the exchange can only assign `order_id`s to already-processed order creations.
The duration cannot be negative, is rounded down to the nearest 100ms (e.g., `670` -> `600`, `30` -> `0`) and capped at 5 seconds (i.e., `5000`).
Value of `0` or omission disables the TTL mechanism, so only orders already existing in matcher state at request time will be searched.
The duration cannot be negative, is rounded down to the nearest 100ms (e.g., `'670'` -> `'600'`, `'30'` -> `'0'`) and capped at 5 seconds (i.e., `'5000'`).
Value of `'0'` or omission disables the TTL mechanism, so only orders already existing in matching engine state at request time will be searched.
If the caller requests multiple successive cancellations for a given order, such that the time-to-live windows overlap, only the first request will be considered.

"""
time_to_live_ms: str | None = None
Expand Down
11 changes: 6 additions & 5 deletions src/codegen/apispec.json
Original file line number Diff line number Diff line change
Expand Up @@ -8303,15 +8303,16 @@
"index": 3,
"array_depth": 0,
"optional": true,
"default": "500",
"example": "`500`",
"default": "'0'",
"example": "'500'",
"comment": [
"Specifies the time-to-live (in milliseconds) for this cancellation.",
"During this period, any order creation with a matching `client_order_id` will also be cancelled.",
"During this period, any order creation with a matching `client_order_id` will be cancelled and not be added to the GRVT matching engine.",
"This mechanism helps mitigate time-of-flight issues where cancellations might arrive before the corresponding orders.",
"Hence, cancellation by `order_id` ignores this field as the exchange can only assign `order_id`s to already-processed order creations.",
"The duration cannot be negative, is rounded down to the nearest 100ms (e.g., `670` -\u003e `600`, `30` -\u003e `0`) and capped at 5 seconds (i.e., `5000`).",
"Value of `0` or omission disables the TTL mechanism, so only orders already existing in matcher state at request time will be searched.",
"The duration cannot be negative, is rounded down to the nearest 100ms (e.g., `'670'` -\u003e `'600'`, `'30'` -\u003e `'0'`) and capped at 5 seconds (i.e., `'5000'`).",
"Value of `'0'` or omission disables the TTL mechanism, so only orders already existing in matching engine state at request time will be searched.",
"If the caller requests multiple successive cancellations for a given order, such that the time-to-live windows overlap, only the first request will be considered.",
""
]
}
Expand Down
Loading