diff --git a/artifacts/apidocs/schemas/aggregated_account_summary.md b/artifacts/apidocs/schemas/aggregated_account_summary.md
index 91f4a10..751b138 100644
--- a/artifacts/apidocs/schemas/aggregated_account_summary.md
+++ b/artifacts/apidocs/schemas/aggregated_account_summary.md
@@ -34,3 +34,4 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
diff --git a/artifacts/apidocs/schemas/api_aggregated_account_summary_response.md b/artifacts/apidocs/schemas/api_aggregated_account_summary_response.md
index dbe4d6d..e526a26 100644
--- a/artifacts/apidocs/schemas/api_aggregated_account_summary_response.md
+++ b/artifacts/apidocs/schemas/api_aggregated_account_summary_response.md
@@ -40,3 +40,4 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
diff --git a/artifacts/apidocs/schemas/api_cancel_all_orders_request.md b/artifacts/apidocs/schemas/api_cancel_all_orders_request.md
index 7792003..eeb9e6e 100644
--- a/artifacts/apidocs/schemas/api_cancel_all_orders_request.md
+++ b/artifacts/apidocs/schemas/api_cancel_all_orders_request.md
@@ -40,6 +40,7 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
??? info "[Currency](/../../schemas/currency)"
The list of Currencies that are supported on the GRVT exchange
@@ -64,3 +65,4 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
diff --git a/artifacts/apidocs/schemas/api_cancel_order_request.md b/artifacts/apidocs/schemas/api_cancel_order_request.md
index 4bd4707..aed429c 100644
--- a/artifacts/apidocs/schemas/api_cancel_order_request.md
+++ b/artifacts/apidocs/schemas/api_cancel_order_request.md
@@ -6,4 +6,4 @@
|sub_account_id
`sa` |string|True|The subaccount ID cancelling the order|
|order_id
`oi` |string|False
`0`|Cancel the order with this `order_id`|
|client_order_id
`co` |string|False
`0`|Cancel the order with this `client_order_id`|
- |time_to_live_ms
`tt` |string|False
`'0'`|Specifies the time-to-live (in milliseconds) for this cancellation.
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 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
`tt` |string|False
`'100'`|Specifies the time-to-live (in milliseconds) for this cancellation.
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 results in the default time-to-live value being applied.
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.
|
diff --git a/artifacts/apidocs/schemas/api_cancel_order_response.md b/artifacts/apidocs/schemas/api_cancel_order_response.md
index e967957..1d31c42 100644
--- a/artifacts/apidocs/schemas/api_cancel_order_response.md
+++ b/artifacts/apidocs/schemas/api_cancel_order_response.md
@@ -103,3 +103,4 @@
|`EXCEED_MAX_SIGNATURE_EXPIRATION` = 27|the signature supplied is more than 30 days in the future|
|`MARKET_ORDER_WITH_LIMIT_PRICE` = 28|the market order has a limit price set|
|`CLIENT_CANCEL_ON_DISCONNECT_TRIGGERED` = 29|client cancel on disconnect triggered|
+ |`OCO_COUNTER_PART_TRIGGERED` = 30|the OCO counter part order was triggered|
diff --git a/artifacts/apidocs/schemas/api_create_bulk_orders_request.md b/artifacts/apidocs/schemas/api_create_bulk_orders_request.md
new file mode 100644
index 0000000..4e7eca1
--- /dev/null
+++ b/artifacts/apidocs/schemas/api_create_bulk_orders_request.md
@@ -0,0 +1,108 @@
+!!! info "[ApiCreateBulkOrdersRequest](/../../schemas/api_create_bulk_orders_request)"
+ Create multiple orders simultaneously for this trading account.
This endpoint supports the following order scenarios:
- One-Cancels-Other (OCO) orders combining TP/SL
- One-Sends-Other (OSO) orders
Usage:
- For OCO (TP/SL pair): Send exactly 2 orders in the same request - one Take Profit and one Stop Loss order
- For OSO: Send exactly one main order and one contingent order (TP and/or SL)
+
+ |Name
`Lite`|Type|Required
`Default`| Description |
+ |-|-|-|-|
+ |orders
`o` |[Order]|True|The orders to create|
+ ??? info "[Order](/../../schemas/order)"
+ Order is a typed payload used throughout the GRVT platform to express all orderbook, RFQ, and liquidation orders.
GRVT orders are capable of expressing both single-legged, and multi-legged orders by default.
This increases the learning curve slightly but reduces overall integration load, since the order payload is used across all GRVT trading venues.
Given GRVT's trustless settlement model, the Order payload also carries the signature, required to trade the order on our ZKSync Hyperchain.
All fields in the Order payload (except `id`, `metadata`, and `state`) are trustlessly enforced on our Hyperchain.
This minimizes the amount of trust users have to offer to GRVT
+
+ |Name
`Lite`|Type|Required
`Default`| Description |
+ |-|-|-|-|
+ |order_id
`oi` |string|False
`0`|[Filled by GRVT Backend] A unique 128-bit identifier for the order, deterministically generated within the GRVT backend|
+ |sub_account_id
`sa` |string|True|The subaccount initiating the order|
+ |is_market
`im` |boolean|False
`false`|If the order is a market order
Market Orders do not have a limit price, and are always executed according to the maker order price.
Market Orders must always be taker orders|
+ |time_in_force
`ti` |TimeInForce|True|Four supported types of orders: GTT, IOC, AON, FOK:
- PARTIAL EXECUTION = GTT / IOC - allows partial size execution on each leg
- FULL EXECUTION = AON / FOK - only allows full size execution on all legs
- TAKER ONLY = IOC / FOK - only allows taker orders
- MAKER OR TAKER = GTT / AON - allows maker or taker orders
Exchange only supports (GTT, IOC, FOK)
RFQ Maker only supports (GTT, AON), RFQ Taker only supports (FOK)|
+ |post_only
`po` |boolean|False
`false`|If True, Order must be a maker order. It has to fill the orderbook instead of match it.
If False, Order can be either a maker or taker order.
| | Must Fill All | Can Fill Partial |
| - | - | - |
| Must Be Taker | FOK + False | IOC + False |
| Can Be Either | AON + False | GTC + False |
| Must Be Maker | AON + True | GTC + True |
|
+ |reduce_only
`ro` |boolean|False
`false`|If True, Order must reduce the position size, or be cancelled|
+ |legs
`l` |[OrderLeg]|True|The legs present in this order
The legs must be sorted by Asset.Instrument/Underlying/Quote/Expiration/StrikePrice|
+ |signature
`s` |Signature|True|The signature approving this order|
+ |metadata
`m` |OrderMetadata|True|Order Metadata, ignored by the smart contract, and unsigned by the client|
+ |state
`s1` |OrderState|False
`''`|[Filled by GRVT Backend] The current state of the order, ignored by the smart contract, and unsigned by the client|
+ ??? info "[TimeInForce](/../../schemas/time_in_force)"
+ | | Must Fill All | Can Fill Partial |
+ | - | - | - |
+ | Must Fill Immediately | FOK | IOC |
+ | Can Fill Till Time | AON | GTC |
+
+
+ |Value| Description |
+ |-|-|
+ |`GOOD_TILL_TIME` = 1|GTT - Remains open until it is cancelled, or expired|
+ |`ALL_OR_NONE` = 2|AON - Either fill the whole order or none of it (Block Trades Only)|
+ |`IMMEDIATE_OR_CANCEL` = 3|IOC - Fill the order as much as possible, when hitting the orderbook. Then cancel it|
+ |`FILL_OR_KILL` = 4|FOK - Both AoN and IoC. Either fill the full order when hitting the orderbook, or cancel it|
+ ??? info "[OrderLeg](/../../schemas/order_leg)"
+ |Name
`Lite`|Type|Required
`Default`| Description |
+ |-|-|-|-|
+ |instrument
`i` |string|True|The instrument to trade in this leg|
+ |size
`s` |string|True|The total number of assets to trade in this leg, expressed in base asset decimal units.|
+ |limit_price
`lp` |string|False
`0`|The limit price of the order leg, expressed in `9` decimals.
This is the number of quote currency units to pay/receive for this leg.
This should be `null/0` if the order is a market order|
+ |is_buying_asset
`ib` |boolean|True|Specifies if the order leg is a buy or sell|
+ ??? info "[Signature](/../../schemas/signature)"
+ |Name
`Lite`|Type|Required
`Default`| Description |
+ |-|-|-|-|
+ |signer
`s` |string|True|The address (public key) of the wallet signing the payload|
+ |r
`r` |string|True|Signature R|
+ |s
`s1` |string|True|Signature S|
+ |v
`v` |integer|True|Signature V|
+ |expiration
`e` |string|True|Timestamp after which this signature expires, expressed in unix nanoseconds. Must be capped at 30 days|
+ |nonce
`n` |integer|True|Users can randomly generate this value, used as a signature deconflicting key.
ie. You can send the same exact instruction twice with different nonces.
When the same nonce is used, the same payload will generate the same signature.
Our system will consider the payload a duplicate, and ignore it.|
+ ??? info "[OrderMetadata](/../../schemas/order_metadata)"
+ Metadata fields are used to support Backend only operations. These operations are not trustless by nature.
Hence, fields in here are never signed, and is never transmitted to the smart contract.
+
+ |Name
`Lite`|Type|Required
`Default`| Description |
+ |-|-|-|-|
+ |client_order_id
`co` |string|True|A unique identifier for the active order within a subaccount, specified by the client
This is used to identify the order in the client's system
This field can be used for order amendment/cancellation, but has no bearing on the smart contract layer
This field will not be propagated to the smart contract, and should not be signed by the client
This value must be unique for all active orders in a subaccount, or amendment/cancellation will not work as expected
Gravity UI will generate a random clientOrderID for each order in the range [0, 2^63 - 1]
To prevent any conflicts, client machines should generate a random clientOrderID in the range [2^63, 2^64 - 1]
When GRVT Backend receives an order with an overlapping clientOrderID, we will reject the order with rejectReason set to overlappingClientOrderId|
+ |create_time
`ct` |string|False
`0`|[Filled by GRVT Backend] Time at which the order was received by GRVT in unix nanoseconds|
+ ??? info "[OrderState](/../../schemas/order_state)"
+ |Name
`Lite`|Type|Required
`Default`| Description |
+ |-|-|-|-|
+ |status
`s` |OrderStatus|True|The status of the order|
+ |reject_reason
`rr` |OrderRejectReason|True|The reason for rejection or cancellation|
+ |book_size
`bs` |[string]|True|The number of assets available for orderbook/RFQ matching. Sorted in same order as Order.Legs|
+ |traded_size
`ts` |[string]|True|The total number of assets traded. Sorted in same order as Order.Legs|
+ |update_time
`ut` |string|True|Time at which the order was updated by GRVT, expressed in unix nanoseconds|
+ |avg_fill_price
`af` |[string]|True|The average fill price of the order. Sorted in same order as Order.Legs|
+ ??? info "[OrderStatus](/../../schemas/order_status)"
+ |Value| Description |
+ |-|-|
+ |`PENDING` = 1|Order has been sent to the matching engine and is pending a transition to open/filled/rejected.|
+ |`OPEN` = 2|Order is actively matching on the matching engine, could be unfilled or partially filled.|
+ |`FILLED` = 3|Order is fully filled and hence closed. Taker Orders can transition directly from pending to filled, without going through open.|
+ |`REJECTED` = 4|Order is rejected by matching engine since if fails a particular check (See OrderRejectReason). Once an order is open, it cannot be rejected.|
+ |`CANCELLED` = 5|Order is cancelled by the user using one of the supported APIs (See OrderRejectReason). Before an order is open, it cannot be cancelled.|
+ ??? info "[OrderRejectReason](/../../schemas/order_reject_reason)"
+ |Value| Description |
+ |-|-|
+ |`UNSPECIFIED` = 0|order is not cancelled or rejected|
+ |`CLIENT_CANCEL` = 1|client called a Cancel API|
+ |`CLIENT_BULK_CANCEL` = 2|client called a Bulk Cancel API|
+ |`CLIENT_SESSION_END` = 3|client called a Session Cancel API, or set the WebSocket connection to 'cancelOrdersOnTerminate'|
+ |`MARKET_CANCEL` = 4|the market order was cancelled after no/partial fill. Lower precedence than other TimeInForce cancel reasons|
+ |`IOC_CANCEL` = 5|the IOC order was cancelled after no/partial fill|
+ |`AON_CANCEL` = 6|the AON order was cancelled as it could not be fully matched|
+ |`FOK_CANCEL` = 7|the FOK order was cancelled as it could not be fully matched|
+ |`EXPIRED` = 8|the order was cancelled as it has expired|
+ |`FAIL_POST_ONLY` = 9|the post-only order could not be posted into the orderbook|
+ |`FAIL_REDUCE_ONLY` = 10|the reduce-only order would have caused position size to increase|
+ |`MM_PROTECTION` = 11|the order was cancelled due to market maker protection trigger|
+ |`SELF_TRADE_PROTECTION` = 12|the order was cancelled due to self-trade protection trigger|
+ |`SELF_MATCHED_SUBACCOUNT` = 13|the order matched with another order from the same sub account|
+ |`OVERLAPPING_CLIENT_ORDER_ID` = 14|an active order on your sub account shares the same clientOrderId|
+ |`BELOW_MARGIN` = 15|the order will bring the sub account below initial margin requirement|
+ |`LIQUIDATION` = 16|the sub account is liquidated (and all open orders are cancelled by Gravity)|
+ |`INSTRUMENT_INVALID` = 17|instrument is invalid or not found on Gravity|
+ |`INSTRUMENT_DEACTIVATED` = 18|instrument is no longer tradable on Gravity. (typically due to a market halt, or instrument expiry)|
+ |`SYSTEM_FAILOVER` = 19|system failover resulting in loss of order state|
+ |`UNAUTHORISED` = 20|the credentials used (userSession/apiKeySession/walletSignature) is not authorised to perform the action|
+ |`SESSION_KEY_EXPIRED` = 21|the session key used to sign the order expired|
+ |`SUB_ACCOUNT_NOT_FOUND` = 22|the subaccount does not exist|
+ |`NO_TRADE_PERMISSION` = 23|the signature used to sign the order has no trade permission|
+ |`UNSUPPORTED_TIME_IN_FORCE` = 24|the order payload does not contain a supported TimeInForce value|
+ |`MULTI_LEGGED_ORDER` = 25|the order has multiple legs, but multiple legs are not supported by this venue|
+ |`EXCEED_MAX_POSITION_SIZE` = 26|the order would have caused the subaccount to exceed the max position size|
+ |`EXCEED_MAX_SIGNATURE_EXPIRATION` = 27|the signature supplied is more than 30 days in the future|
+ |`MARKET_ORDER_WITH_LIMIT_PRICE` = 28|the market order has a limit price set|
+ |`CLIENT_CANCEL_ON_DISCONNECT_TRIGGERED` = 29|client cancel on disconnect triggered|
+ |`OCO_COUNTER_PART_TRIGGERED` = 30|the OCO counter part order was triggered|
diff --git a/artifacts/apidocs/schemas/api_create_bulk_orders_response.md b/artifacts/apidocs/schemas/api_create_bulk_orders_response.md
new file mode 100644
index 0000000..0b42148
--- /dev/null
+++ b/artifacts/apidocs/schemas/api_create_bulk_orders_response.md
@@ -0,0 +1,106 @@
+!!! info "[ApiCreateBulkOrdersResponse](/../../schemas/api_create_bulk_orders_response)"
+ |Name
`Lite`|Type|Required
`Default`| Description |
+ |-|-|-|-|
+ |result
`r` |[Order]|True|The created orders in same order as requested|
+ ??? info "[Order](/../../schemas/order)"
+ Order is a typed payload used throughout the GRVT platform to express all orderbook, RFQ, and liquidation orders.
GRVT orders are capable of expressing both single-legged, and multi-legged orders by default.
This increases the learning curve slightly but reduces overall integration load, since the order payload is used across all GRVT trading venues.
Given GRVT's trustless settlement model, the Order payload also carries the signature, required to trade the order on our ZKSync Hyperchain.
All fields in the Order payload (except `id`, `metadata`, and `state`) are trustlessly enforced on our Hyperchain.
This minimizes the amount of trust users have to offer to GRVT
+
+ |Name
`Lite`|Type|Required
`Default`| Description |
+ |-|-|-|-|
+ |order_id
`oi` |string|False
`0`|[Filled by GRVT Backend] A unique 128-bit identifier for the order, deterministically generated within the GRVT backend|
+ |sub_account_id
`sa` |string|True|The subaccount initiating the order|
+ |is_market
`im` |boolean|False
`false`|If the order is a market order
Market Orders do not have a limit price, and are always executed according to the maker order price.
Market Orders must always be taker orders|
+ |time_in_force
`ti` |TimeInForce|True|Four supported types of orders: GTT, IOC, AON, FOK:
- PARTIAL EXECUTION = GTT / IOC - allows partial size execution on each leg
- FULL EXECUTION = AON / FOK - only allows full size execution on all legs
- TAKER ONLY = IOC / FOK - only allows taker orders
- MAKER OR TAKER = GTT / AON - allows maker or taker orders
Exchange only supports (GTT, IOC, FOK)
RFQ Maker only supports (GTT, AON), RFQ Taker only supports (FOK)|
+ |post_only
`po` |boolean|False
`false`|If True, Order must be a maker order. It has to fill the orderbook instead of match it.
If False, Order can be either a maker or taker order.
| | Must Fill All | Can Fill Partial |
| - | - | - |
| Must Be Taker | FOK + False | IOC + False |
| Can Be Either | AON + False | GTC + False |
| Must Be Maker | AON + True | GTC + True |
|
+ |reduce_only
`ro` |boolean|False
`false`|If True, Order must reduce the position size, or be cancelled|
+ |legs
`l` |[OrderLeg]|True|The legs present in this order
The legs must be sorted by Asset.Instrument/Underlying/Quote/Expiration/StrikePrice|
+ |signature
`s` |Signature|True|The signature approving this order|
+ |metadata
`m` |OrderMetadata|True|Order Metadata, ignored by the smart contract, and unsigned by the client|
+ |state
`s1` |OrderState|False
`''`|[Filled by GRVT Backend] The current state of the order, ignored by the smart contract, and unsigned by the client|
+ ??? info "[TimeInForce](/../../schemas/time_in_force)"
+ | | Must Fill All | Can Fill Partial |
+ | - | - | - |
+ | Must Fill Immediately | FOK | IOC |
+ | Can Fill Till Time | AON | GTC |
+
+
+ |Value| Description |
+ |-|-|
+ |`GOOD_TILL_TIME` = 1|GTT - Remains open until it is cancelled, or expired|
+ |`ALL_OR_NONE` = 2|AON - Either fill the whole order or none of it (Block Trades Only)|
+ |`IMMEDIATE_OR_CANCEL` = 3|IOC - Fill the order as much as possible, when hitting the orderbook. Then cancel it|
+ |`FILL_OR_KILL` = 4|FOK - Both AoN and IoC. Either fill the full order when hitting the orderbook, or cancel it|
+ ??? info "[OrderLeg](/../../schemas/order_leg)"
+ |Name
`Lite`|Type|Required
`Default`| Description |
+ |-|-|-|-|
+ |instrument
`i` |string|True|The instrument to trade in this leg|
+ |size
`s` |string|True|The total number of assets to trade in this leg, expressed in base asset decimal units.|
+ |limit_price
`lp` |string|False
`0`|The limit price of the order leg, expressed in `9` decimals.
This is the number of quote currency units to pay/receive for this leg.
This should be `null/0` if the order is a market order|
+ |is_buying_asset
`ib` |boolean|True|Specifies if the order leg is a buy or sell|
+ ??? info "[Signature](/../../schemas/signature)"
+ |Name
`Lite`|Type|Required
`Default`| Description |
+ |-|-|-|-|
+ |signer
`s` |string|True|The address (public key) of the wallet signing the payload|
+ |r
`r` |string|True|Signature R|
+ |s
`s1` |string|True|Signature S|
+ |v
`v` |integer|True|Signature V|
+ |expiration
`e` |string|True|Timestamp after which this signature expires, expressed in unix nanoseconds. Must be capped at 30 days|
+ |nonce
`n` |integer|True|Users can randomly generate this value, used as a signature deconflicting key.
ie. You can send the same exact instruction twice with different nonces.
When the same nonce is used, the same payload will generate the same signature.
Our system will consider the payload a duplicate, and ignore it.|
+ ??? info "[OrderMetadata](/../../schemas/order_metadata)"
+ Metadata fields are used to support Backend only operations. These operations are not trustless by nature.
Hence, fields in here are never signed, and is never transmitted to the smart contract.
+
+ |Name
`Lite`|Type|Required
`Default`| Description |
+ |-|-|-|-|
+ |client_order_id
`co` |string|True|A unique identifier for the active order within a subaccount, specified by the client
This is used to identify the order in the client's system
This field can be used for order amendment/cancellation, but has no bearing on the smart contract layer
This field will not be propagated to the smart contract, and should not be signed by the client
This value must be unique for all active orders in a subaccount, or amendment/cancellation will not work as expected
Gravity UI will generate a random clientOrderID for each order in the range [0, 2^63 - 1]
To prevent any conflicts, client machines should generate a random clientOrderID in the range [2^63, 2^64 - 1]
When GRVT Backend receives an order with an overlapping clientOrderID, we will reject the order with rejectReason set to overlappingClientOrderId|
+ |create_time
`ct` |string|False
`0`|[Filled by GRVT Backend] Time at which the order was received by GRVT in unix nanoseconds|
+ ??? info "[OrderState](/../../schemas/order_state)"
+ |Name
`Lite`|Type|Required
`Default`| Description |
+ |-|-|-|-|
+ |status
`s` |OrderStatus|True|The status of the order|
+ |reject_reason
`rr` |OrderRejectReason|True|The reason for rejection or cancellation|
+ |book_size
`bs` |[string]|True|The number of assets available for orderbook/RFQ matching. Sorted in same order as Order.Legs|
+ |traded_size
`ts` |[string]|True|The total number of assets traded. Sorted in same order as Order.Legs|
+ |update_time
`ut` |string|True|Time at which the order was updated by GRVT, expressed in unix nanoseconds|
+ |avg_fill_price
`af` |[string]|True|The average fill price of the order. Sorted in same order as Order.Legs|
+ ??? info "[OrderStatus](/../../schemas/order_status)"
+ |Value| Description |
+ |-|-|
+ |`PENDING` = 1|Order has been sent to the matching engine and is pending a transition to open/filled/rejected.|
+ |`OPEN` = 2|Order is actively matching on the matching engine, could be unfilled or partially filled.|
+ |`FILLED` = 3|Order is fully filled and hence closed. Taker Orders can transition directly from pending to filled, without going through open.|
+ |`REJECTED` = 4|Order is rejected by matching engine since if fails a particular check (See OrderRejectReason). Once an order is open, it cannot be rejected.|
+ |`CANCELLED` = 5|Order is cancelled by the user using one of the supported APIs (See OrderRejectReason). Before an order is open, it cannot be cancelled.|
+ ??? info "[OrderRejectReason](/../../schemas/order_reject_reason)"
+ |Value| Description |
+ |-|-|
+ |`UNSPECIFIED` = 0|order is not cancelled or rejected|
+ |`CLIENT_CANCEL` = 1|client called a Cancel API|
+ |`CLIENT_BULK_CANCEL` = 2|client called a Bulk Cancel API|
+ |`CLIENT_SESSION_END` = 3|client called a Session Cancel API, or set the WebSocket connection to 'cancelOrdersOnTerminate'|
+ |`MARKET_CANCEL` = 4|the market order was cancelled after no/partial fill. Lower precedence than other TimeInForce cancel reasons|
+ |`IOC_CANCEL` = 5|the IOC order was cancelled after no/partial fill|
+ |`AON_CANCEL` = 6|the AON order was cancelled as it could not be fully matched|
+ |`FOK_CANCEL` = 7|the FOK order was cancelled as it could not be fully matched|
+ |`EXPIRED` = 8|the order was cancelled as it has expired|
+ |`FAIL_POST_ONLY` = 9|the post-only order could not be posted into the orderbook|
+ |`FAIL_REDUCE_ONLY` = 10|the reduce-only order would have caused position size to increase|
+ |`MM_PROTECTION` = 11|the order was cancelled due to market maker protection trigger|
+ |`SELF_TRADE_PROTECTION` = 12|the order was cancelled due to self-trade protection trigger|
+ |`SELF_MATCHED_SUBACCOUNT` = 13|the order matched with another order from the same sub account|
+ |`OVERLAPPING_CLIENT_ORDER_ID` = 14|an active order on your sub account shares the same clientOrderId|
+ |`BELOW_MARGIN` = 15|the order will bring the sub account below initial margin requirement|
+ |`LIQUIDATION` = 16|the sub account is liquidated (and all open orders are cancelled by Gravity)|
+ |`INSTRUMENT_INVALID` = 17|instrument is invalid or not found on Gravity|
+ |`INSTRUMENT_DEACTIVATED` = 18|instrument is no longer tradable on Gravity. (typically due to a market halt, or instrument expiry)|
+ |`SYSTEM_FAILOVER` = 19|system failover resulting in loss of order state|
+ |`UNAUTHORISED` = 20|the credentials used (userSession/apiKeySession/walletSignature) is not authorised to perform the action|
+ |`SESSION_KEY_EXPIRED` = 21|the session key used to sign the order expired|
+ |`SUB_ACCOUNT_NOT_FOUND` = 22|the subaccount does not exist|
+ |`NO_TRADE_PERMISSION` = 23|the signature used to sign the order has no trade permission|
+ |`UNSUPPORTED_TIME_IN_FORCE` = 24|the order payload does not contain a supported TimeInForce value|
+ |`MULTI_LEGGED_ORDER` = 25|the order has multiple legs, but multiple legs are not supported by this venue|
+ |`EXCEED_MAX_POSITION_SIZE` = 26|the order would have caused the subaccount to exceed the max position size|
+ |`EXCEED_MAX_SIGNATURE_EXPIRATION` = 27|the signature supplied is more than 30 days in the future|
+ |`MARKET_ORDER_WITH_LIMIT_PRICE` = 28|the market order has a limit price set|
+ |`CLIENT_CANCEL_ON_DISCONNECT_TRIGGERED` = 29|client cancel on disconnect triggered|
+ |`OCO_COUNTER_PART_TRIGGERED` = 30|the OCO counter part order was triggered|
diff --git a/artifacts/apidocs/schemas/api_create_order_request.md b/artifacts/apidocs/schemas/api_create_order_request.md
index 3f557d4..f47db3e 100644
--- a/artifacts/apidocs/schemas/api_create_order_request.md
+++ b/artifacts/apidocs/schemas/api_create_order_request.md
@@ -105,3 +105,4 @@
|`EXCEED_MAX_SIGNATURE_EXPIRATION` = 27|the signature supplied is more than 30 days in the future|
|`MARKET_ORDER_WITH_LIMIT_PRICE` = 28|the market order has a limit price set|
|`CLIENT_CANCEL_ON_DISCONNECT_TRIGGERED` = 29|client cancel on disconnect triggered|
+ |`OCO_COUNTER_PART_TRIGGERED` = 30|the OCO counter part order was triggered|
diff --git a/artifacts/apidocs/schemas/api_create_order_response.md b/artifacts/apidocs/schemas/api_create_order_response.md
index 362e43b..42c0513 100644
--- a/artifacts/apidocs/schemas/api_create_order_response.md
+++ b/artifacts/apidocs/schemas/api_create_order_response.md
@@ -103,3 +103,4 @@
|`EXCEED_MAX_SIGNATURE_EXPIRATION` = 27|the signature supplied is more than 30 days in the future|
|`MARKET_ORDER_WITH_LIMIT_PRICE` = 28|the market order has a limit price set|
|`CLIENT_CANCEL_ON_DISCONNECT_TRIGGERED` = 29|client cancel on disconnect triggered|
+ |`OCO_COUNTER_PART_TRIGGERED` = 30|the OCO counter part order was triggered|
diff --git a/artifacts/apidocs/schemas/api_deposit_history_request.md b/artifacts/apidocs/schemas/api_deposit_history_request.md
index 8dd39d9..743877e 100644
--- a/artifacts/apidocs/schemas/api_deposit_history_request.md
+++ b/artifacts/apidocs/schemas/api_deposit_history_request.md
@@ -32,3 +32,4 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
diff --git a/artifacts/apidocs/schemas/api_deposit_history_response.md b/artifacts/apidocs/schemas/api_deposit_history_response.md
index b1e6a7e..9cc6d60 100644
--- a/artifacts/apidocs/schemas/api_deposit_history_response.md
+++ b/artifacts/apidocs/schemas/api_deposit_history_response.md
@@ -38,3 +38,4 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
diff --git a/artifacts/apidocs/schemas/api_fill_history_request.md b/artifacts/apidocs/schemas/api_fill_history_request.md
index bfb6b4e..7fdc092 100644
--- a/artifacts/apidocs/schemas/api_fill_history_request.md
+++ b/artifacts/apidocs/schemas/api_fill_history_request.md
@@ -44,6 +44,7 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
??? info "[Currency](/../../schemas/currency)"
The list of Currencies that are supported on the GRVT exchange
@@ -68,3 +69,4 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
diff --git a/artifacts/apidocs/schemas/api_funding_account_summary_response.md b/artifacts/apidocs/schemas/api_funding_account_summary_response.md
index 6fff816..560cf4d 100644
--- a/artifacts/apidocs/schemas/api_funding_account_summary_response.md
+++ b/artifacts/apidocs/schemas/api_funding_account_summary_response.md
@@ -42,3 +42,4 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
diff --git a/artifacts/apidocs/schemas/api_funding_payment_history_response.md b/artifacts/apidocs/schemas/api_funding_payment_history_response.md
index 00b1fa8..ac18581 100644
--- a/artifacts/apidocs/schemas/api_funding_payment_history_response.md
+++ b/artifacts/apidocs/schemas/api_funding_payment_history_response.md
@@ -36,3 +36,4 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
diff --git a/artifacts/apidocs/schemas/api_get_all_instruments_response.md b/artifacts/apidocs/schemas/api_get_all_instruments_response.md
index 194a032..d078d19 100644
--- a/artifacts/apidocs/schemas/api_get_all_instruments_response.md
+++ b/artifacts/apidocs/schemas/api_get_all_instruments_response.md
@@ -42,6 +42,7 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
??? info "[Currency](/../../schemas/currency)"
The list of Currencies that are supported on the GRVT exchange
@@ -66,6 +67,7 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
??? info "[Kind](/../../schemas/kind)"
The list of asset kinds that are supported on the GRVT exchange
diff --git a/artifacts/apidocs/schemas/api_get_ecosystem_leaderboard_response.md b/artifacts/apidocs/schemas/api_get_ecosystem_leaderboard_response.md
index 4e64a5b..d634da8 100644
--- a/artifacts/apidocs/schemas/api_get_ecosystem_leaderboard_response.md
+++ b/artifacts/apidocs/schemas/api_get_ecosystem_leaderboard_response.md
@@ -18,3 +18,4 @@
|calculate_from
`cf` |string|True|Start time of the epoch - phase|
|calculate_to
`ct` |string|True|End time of the epoch - phase|
|rank
`r` |integer|True|The rank of the account in the ecosystem|
+ |epoch
`e` |integer|True|The epoch number of the ecosystem point|
diff --git a/artifacts/apidocs/schemas/api_get_filtered_instruments_request.md b/artifacts/apidocs/schemas/api_get_filtered_instruments_request.md
index 91afdfb..5b3f299 100644
--- a/artifacts/apidocs/schemas/api_get_filtered_instruments_request.md
+++ b/artifacts/apidocs/schemas/api_get_filtered_instruments_request.md
@@ -41,6 +41,7 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
??? info "[Currency](/../../schemas/currency)"
The list of Currencies that are supported on the GRVT exchange
@@ -65,3 +66,4 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
diff --git a/artifacts/apidocs/schemas/api_get_filtered_instruments_response.md b/artifacts/apidocs/schemas/api_get_filtered_instruments_response.md
index 00eb893..6c86790 100644
--- a/artifacts/apidocs/schemas/api_get_filtered_instruments_response.md
+++ b/artifacts/apidocs/schemas/api_get_filtered_instruments_response.md
@@ -42,6 +42,7 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
??? info "[Currency](/../../schemas/currency)"
The list of Currencies that are supported on the GRVT exchange
@@ -66,6 +67,7 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
??? info "[Kind](/../../schemas/kind)"
The list of asset kinds that are supported on the GRVT exchange
diff --git a/artifacts/apidocs/schemas/api_get_instrument_response.md b/artifacts/apidocs/schemas/api_get_instrument_response.md
index c345b82..36da12f 100644
--- a/artifacts/apidocs/schemas/api_get_instrument_response.md
+++ b/artifacts/apidocs/schemas/api_get_instrument_response.md
@@ -42,6 +42,7 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
??? info "[Currency](/../../schemas/currency)"
The list of Currencies that are supported on the GRVT exchange
@@ -66,6 +67,7 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
??? info "[Kind](/../../schemas/kind)"
The list of asset kinds that are supported on the GRVT exchange
diff --git a/artifacts/apidocs/schemas/api_get_latest_lp_snapshot_request.md b/artifacts/apidocs/schemas/api_get_latest_lp_snapshot_request.md
index d60c753..d65217d 100644
--- a/artifacts/apidocs/schemas/api_get_latest_lp_snapshot_request.md
+++ b/artifacts/apidocs/schemas/api_get_latest_lp_snapshot_request.md
@@ -36,3 +36,4 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
diff --git a/artifacts/apidocs/schemas/api_get_lp_info_request.md b/artifacts/apidocs/schemas/api_get_lp_info_request.md
index 3b014c4..f236dfb 100644
--- a/artifacts/apidocs/schemas/api_get_lp_info_request.md
+++ b/artifacts/apidocs/schemas/api_get_lp_info_request.md
@@ -36,3 +36,4 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
diff --git a/artifacts/apidocs/schemas/api_get_lp_leaderboard_request.md b/artifacts/apidocs/schemas/api_get_lp_leaderboard_request.md
index a3f1c78..6023dca 100644
--- a/artifacts/apidocs/schemas/api_get_lp_leaderboard_request.md
+++ b/artifacts/apidocs/schemas/api_get_lp_leaderboard_request.md
@@ -38,3 +38,4 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
diff --git a/artifacts/apidocs/schemas/api_get_lp_point_request.md b/artifacts/apidocs/schemas/api_get_lp_point_request.md
index 54116b6..c4b67c5 100644
--- a/artifacts/apidocs/schemas/api_get_lp_point_request.md
+++ b/artifacts/apidocs/schemas/api_get_lp_point_request.md
@@ -37,3 +37,4 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
diff --git a/artifacts/apidocs/schemas/api_get_order_group_request.md b/artifacts/apidocs/schemas/api_get_order_group_request.md
new file mode 100644
index 0000000..455548f
--- /dev/null
+++ b/artifacts/apidocs/schemas/api_get_order_group_request.md
@@ -0,0 +1,6 @@
+!!! info "[ApiGetOrderGroupRequest](/../../schemas/api_get_order_group_request)"
+ Retrieves the grouping of non-cancelled, non-filled client orders for a given subaccount when the grouping exist.
helping to identify TP/SL pairs or other order relationships within the account.
+
+ |Name
`Lite`|Type|Required
`Default`| Description |
+ |-|-|-|-|
+ |sub_account_id
`sa` |string|True|The subaccount ID for which the order groups should be retrieved.|
diff --git a/artifacts/apidocs/schemas/api_get_order_group_response.md b/artifacts/apidocs/schemas/api_get_order_group_response.md
new file mode 100644
index 0000000..026f886
--- /dev/null
+++ b/artifacts/apidocs/schemas/api_get_order_group_response.md
@@ -0,0 +1,12 @@
+!!! info "[ApiGetOrderGroupResponse](/../../schemas/api_get_order_group_response)"
+ |Name
`Lite`|Type|Required
`Default`| Description |
+ |-|-|-|-|
+ |result
`r` |[ClientOrderIDsByGroup]|True|A list of client orders grouped by their associated order group.
Each entry in the list contains a `groupID` and the corresponding `clientOrderID`s
that belong to that group.|
+ ??? info "[ClientOrderIDsByGroup](/../../schemas/client_order_i_ds_by_group)"
+ Grouping for the client order id and their associated groups.
This is used to define TP/SL pairs or other order groupings after loading the list of Open Orders.
+
+ |Name
`Lite`|Type|Required
`Default`| Description |
+ |-|-|-|-|
+ |group_id
`gi` |string|True|The group this order belongs to. It can be used to define TP/SL pairs or other order groupings|
+ |client_order_id
`co` |[string]|True|List of client order IDs in the group|
+ |sub_account_id
`sa` |string|True|The sub account ID that these orders belong to|
diff --git a/artifacts/apidocs/schemas/api_get_order_response.md b/artifacts/apidocs/schemas/api_get_order_response.md
index d859544..73888c7 100644
--- a/artifacts/apidocs/schemas/api_get_order_response.md
+++ b/artifacts/apidocs/schemas/api_get_order_response.md
@@ -103,3 +103,4 @@
|`EXCEED_MAX_SIGNATURE_EXPIRATION` = 27|the signature supplied is more than 30 days in the future|
|`MARKET_ORDER_WITH_LIMIT_PRICE` = 28|the market order has a limit price set|
|`CLIENT_CANCEL_ON_DISCONNECT_TRIGGERED` = 29|client cancel on disconnect triggered|
+ |`OCO_COUNTER_PART_TRIGGERED` = 30|the OCO counter part order was triggered|
diff --git a/artifacts/apidocs/schemas/api_get_user_ecosystem_point_response.md b/artifacts/apidocs/schemas/api_get_user_ecosystem_point_response.md
index 7e355ca..3c13b88 100644
--- a/artifacts/apidocs/schemas/api_get_user_ecosystem_point_response.md
+++ b/artifacts/apidocs/schemas/api_get_user_ecosystem_point_response.md
@@ -18,3 +18,4 @@
|calculate_from
`cf` |string|True|Start time of the epoch - phase|
|calculate_to
`ct` |string|True|End time of the epoch - phase|
|rank
`r` |integer|True|The rank of the account in the ecosystem|
+ |epoch
`e` |integer|True|The epoch number of the ecosystem point|
diff --git a/artifacts/apidocs/schemas/api_latest_snap_sub_accounts_response.md b/artifacts/apidocs/schemas/api_latest_snap_sub_accounts_response.md
index 735ee64..7024b98 100644
--- a/artifacts/apidocs/schemas/api_latest_snap_sub_accounts_response.md
+++ b/artifacts/apidocs/schemas/api_latest_snap_sub_accounts_response.md
@@ -46,6 +46,7 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
??? info "[SpotBalance](/../../schemas/spot_balance)"
|Name
`Lite`|Type|Required
`Default`| Description |
|-|-|-|-|
@@ -76,6 +77,7 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
??? info "[Positions](/../../schemas/positions)"
|Name
`Lite`|Type|Required
`Default`| Description |
|-|-|-|-|
diff --git a/artifacts/apidocs/schemas/api_list_aggregated_account_summary_response.md b/artifacts/apidocs/schemas/api_list_aggregated_account_summary_response.md
index f05992f..8546b49 100644
--- a/artifacts/apidocs/schemas/api_list_aggregated_account_summary_response.md
+++ b/artifacts/apidocs/schemas/api_list_aggregated_account_summary_response.md
@@ -44,3 +44,4 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
diff --git a/artifacts/apidocs/schemas/api_open_orders_request.md b/artifacts/apidocs/schemas/api_open_orders_request.md
index 0e76b77..48972ed 100644
--- a/artifacts/apidocs/schemas/api_open_orders_request.md
+++ b/artifacts/apidocs/schemas/api_open_orders_request.md
@@ -38,6 +38,7 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
??? info "[Currency](/../../schemas/currency)"
The list of Currencies that are supported on the GRVT exchange
@@ -62,3 +63,4 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
diff --git a/artifacts/apidocs/schemas/api_open_orders_response.md b/artifacts/apidocs/schemas/api_open_orders_response.md
index c36cd86..0a465db 100644
--- a/artifacts/apidocs/schemas/api_open_orders_response.md
+++ b/artifacts/apidocs/schemas/api_open_orders_response.md
@@ -105,3 +105,4 @@
|`EXCEED_MAX_SIGNATURE_EXPIRATION` = 27|the signature supplied is more than 30 days in the future|
|`MARKET_ORDER_WITH_LIMIT_PRICE` = 28|the market order has a limit price set|
|`CLIENT_CANCEL_ON_DISCONNECT_TRIGGERED` = 29|client cancel on disconnect triggered|
+ |`OCO_COUNTER_PART_TRIGGERED` = 30|the OCO counter part order was triggered|
diff --git a/artifacts/apidocs/schemas/api_order_history_request.md b/artifacts/apidocs/schemas/api_order_history_request.md
index 8a47eb5..c2809c6 100644
--- a/artifacts/apidocs/schemas/api_order_history_request.md
+++ b/artifacts/apidocs/schemas/api_order_history_request.md
@@ -44,6 +44,7 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
??? info "[Currency](/../../schemas/currency)"
The list of Currencies that are supported on the GRVT exchange
@@ -68,3 +69,4 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
diff --git a/artifacts/apidocs/schemas/api_order_history_response.md b/artifacts/apidocs/schemas/api_order_history_response.md
index 153d886..e5fe308 100644
--- a/artifacts/apidocs/schemas/api_order_history_response.md
+++ b/artifacts/apidocs/schemas/api_order_history_response.md
@@ -104,3 +104,4 @@
|`EXCEED_MAX_SIGNATURE_EXPIRATION` = 27|the signature supplied is more than 30 days in the future|
|`MARKET_ORDER_WITH_LIMIT_PRICE` = 28|the market order has a limit price set|
|`CLIENT_CANCEL_ON_DISCONNECT_TRIGGERED` = 29|client cancel on disconnect triggered|
+ |`OCO_COUNTER_PART_TRIGGERED` = 30|the OCO counter part order was triggered|
diff --git a/artifacts/apidocs/schemas/api_order_state_response.md b/artifacts/apidocs/schemas/api_order_state_response.md
index 2744a2f..05407ad 100644
--- a/artifacts/apidocs/schemas/api_order_state_response.md
+++ b/artifacts/apidocs/schemas/api_order_state_response.md
@@ -52,3 +52,4 @@
|`EXCEED_MAX_SIGNATURE_EXPIRATION` = 27|the signature supplied is more than 30 days in the future|
|`MARKET_ORDER_WITH_LIMIT_PRICE` = 28|the market order has a limit price set|
|`CLIENT_CANCEL_ON_DISCONNECT_TRIGGERED` = 29|client cancel on disconnect triggered|
+ |`OCO_COUNTER_PART_TRIGGERED` = 30|the OCO counter part order was triggered|
diff --git a/artifacts/apidocs/schemas/api_positions_request.md b/artifacts/apidocs/schemas/api_positions_request.md
index 1aa7fdb..c2e54d6 100644
--- a/artifacts/apidocs/schemas/api_positions_request.md
+++ b/artifacts/apidocs/schemas/api_positions_request.md
@@ -40,6 +40,7 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
??? info "[Currency](/../../schemas/currency)"
The list of Currencies that are supported on the GRVT exchange
@@ -64,3 +65,4 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
diff --git a/artifacts/apidocs/schemas/api_pre_deposit_check_request.md b/artifacts/apidocs/schemas/api_pre_deposit_check_request.md
index 0cb5a85..cf14115 100644
--- a/artifacts/apidocs/schemas/api_pre_deposit_check_request.md
+++ b/artifacts/apidocs/schemas/api_pre_deposit_check_request.md
@@ -29,6 +29,7 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
??? info "[BridgeType](/../../schemas/bridge_type)"
|Value| Description |
|-|-|
diff --git a/artifacts/apidocs/schemas/api_pre_deposit_check_response.md b/artifacts/apidocs/schemas/api_pre_deposit_check_response.md
index 1d679ce..c45805c 100644
--- a/artifacts/apidocs/schemas/api_pre_deposit_check_response.md
+++ b/artifacts/apidocs/schemas/api_pre_deposit_check_response.md
@@ -27,3 +27,4 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
diff --git a/artifacts/apidocs/schemas/api_pre_order_check_request.md b/artifacts/apidocs/schemas/api_pre_order_check_request.md
index 2065c6a..a758f65 100644
--- a/artifacts/apidocs/schemas/api_pre_order_check_request.md
+++ b/artifacts/apidocs/schemas/api_pre_order_check_request.md
@@ -106,3 +106,4 @@
|`EXCEED_MAX_SIGNATURE_EXPIRATION` = 27|the signature supplied is more than 30 days in the future|
|`MARKET_ORDER_WITH_LIMIT_PRICE` = 28|the market order has a limit price set|
|`CLIENT_CANCEL_ON_DISCONNECT_TRIGGERED` = 29|client cancel on disconnect triggered|
+ |`OCO_COUNTER_PART_TRIGGERED` = 30|the OCO counter part order was triggered|
diff --git a/artifacts/apidocs/schemas/api_pre_order_check_response.md b/artifacts/apidocs/schemas/api_pre_order_check_response.md
index 5a56900..8be5334 100644
--- a/artifacts/apidocs/schemas/api_pre_order_check_response.md
+++ b/artifacts/apidocs/schemas/api_pre_order_check_response.md
@@ -40,3 +40,4 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
diff --git a/artifacts/apidocs/schemas/api_settlement_price.md b/artifacts/apidocs/schemas/api_settlement_price.md
index 60e0300..a5bc6be 100644
--- a/artifacts/apidocs/schemas/api_settlement_price.md
+++ b/artifacts/apidocs/schemas/api_settlement_price.md
@@ -29,6 +29,7 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
??? info "[Currency](/../../schemas/currency)"
The list of Currencies that are supported on the GRVT exchange
@@ -53,3 +54,4 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
diff --git a/artifacts/apidocs/schemas/api_settlement_price_request.md b/artifacts/apidocs/schemas/api_settlement_price_request.md
index 9be5b8e..41c1d42 100644
--- a/artifacts/apidocs/schemas/api_settlement_price_request.md
+++ b/artifacts/apidocs/schemas/api_settlement_price_request.md
@@ -33,6 +33,7 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
??? info "[Currency](/../../schemas/currency)"
The list of Currencies that are supported on the GRVT exchange
@@ -57,3 +58,4 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
diff --git a/artifacts/apidocs/schemas/api_settlement_price_response.md b/artifacts/apidocs/schemas/api_settlement_price_response.md
index 04990a9..d62defd 100644
--- a/artifacts/apidocs/schemas/api_settlement_price_response.md
+++ b/artifacts/apidocs/schemas/api_settlement_price_response.md
@@ -34,6 +34,7 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
??? info "[Currency](/../../schemas/currency)"
The list of Currencies that are supported on the GRVT exchange
@@ -58,3 +59,4 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
diff --git a/artifacts/apidocs/schemas/api_sub_account_history_response.md b/artifacts/apidocs/schemas/api_sub_account_history_response.md
index 95bad3a..dd4957b 100644
--- a/artifacts/apidocs/schemas/api_sub_account_history_response.md
+++ b/artifacts/apidocs/schemas/api_sub_account_history_response.md
@@ -47,6 +47,7 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
??? info "[SpotBalance](/../../schemas/spot_balance)"
|Name
`Lite`|Type|Required
`Default`| Description |
|-|-|-|-|
@@ -77,6 +78,7 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
??? info "[Positions](/../../schemas/positions)"
|Name
`Lite`|Type|Required
`Default`| Description |
|-|-|-|-|
diff --git a/artifacts/apidocs/schemas/api_sub_account_summary_response.md b/artifacts/apidocs/schemas/api_sub_account_summary_response.md
index 042a944..76a65f7 100644
--- a/artifacts/apidocs/schemas/api_sub_account_summary_response.md
+++ b/artifacts/apidocs/schemas/api_sub_account_summary_response.md
@@ -48,6 +48,7 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
??? info "[SpotBalance](/../../schemas/spot_balance)"
|Name
`Lite`|Type|Required
`Default`| Description |
|-|-|-|-|
@@ -78,6 +79,7 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
??? info "[Positions](/../../schemas/positions)"
|Name
`Lite`|Type|Required
`Default`| Description |
|-|-|-|-|
diff --git a/artifacts/apidocs/schemas/api_sub_account_trade_aggregation_request.md b/artifacts/apidocs/schemas/api_sub_account_trade_aggregation_request.md
index ecac4c1..5067d4d 100644
--- a/artifacts/apidocs/schemas/api_sub_account_trade_aggregation_request.md
+++ b/artifacts/apidocs/schemas/api_sub_account_trade_aggregation_request.md
@@ -12,6 +12,7 @@
|is_maker
`im` |boolean|True|Filter on the maker of the trade|
|is_taker
`it` |boolean|True|Filter on the taker of the trade|
|cursor
`c` |string|False
``|The cursor to indicate when to start the next query from|
+ |group_by_signer
`gb` |boolean|True|Whether to group trades by signer per sub account|
??? info "[SubAccountTradeInterval](/../../schemas/sub_account_trade_interval)"
|Value| Description |
|-|-|
diff --git a/artifacts/apidocs/schemas/api_sub_account_trade_aggregation_response.md b/artifacts/apidocs/schemas/api_sub_account_trade_aggregation_response.md
index 7740ace..bcf19f4 100644
--- a/artifacts/apidocs/schemas/api_sub_account_trade_aggregation_response.md
+++ b/artifacts/apidocs/schemas/api_sub_account_trade_aggregation_response.md
@@ -13,3 +13,4 @@
|total_trade_volume
`tt` |string|True|Total volume traded|
|num_traded
`nt` |string|True|Number of trades|
|positive_fee
`pf` |string|True|Total positive fee paid by user|
+ |signer
`s` |string|True|The signer of the trade|
diff --git a/artifacts/apidocs/schemas/api_transfer_history_request.md b/artifacts/apidocs/schemas/api_transfer_history_request.md
index c1fc682..6d81a36 100644
--- a/artifacts/apidocs/schemas/api_transfer_history_request.md
+++ b/artifacts/apidocs/schemas/api_transfer_history_request.md
@@ -33,3 +33,4 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
diff --git a/artifacts/apidocs/schemas/api_transfer_history_response.md b/artifacts/apidocs/schemas/api_transfer_history_response.md
index 0b2e6c0..fd32cff 100644
--- a/artifacts/apidocs/schemas/api_transfer_history_response.md
+++ b/artifacts/apidocs/schemas/api_transfer_history_response.md
@@ -41,6 +41,7 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
??? info "[Signature](/../../schemas/signature)"
|Name
`Lite`|Type|Required
`Default`| Description |
|-|-|-|-|
diff --git a/artifacts/apidocs/schemas/api_transfer_request.md b/artifacts/apidocs/schemas/api_transfer_request.md
index 3b125bf..8ef98db 100644
--- a/artifacts/apidocs/schemas/api_transfer_request.md
+++ b/artifacts/apidocs/schemas/api_transfer_request.md
@@ -36,6 +36,7 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
??? info "[Signature](/../../schemas/signature)"
|Name
`Lite`|Type|Required
`Default`| Description |
|-|-|-|-|
diff --git a/artifacts/apidocs/schemas/api_withdrawal_history_request.md b/artifacts/apidocs/schemas/api_withdrawal_history_request.md
index 30005f0..3b69af0 100644
--- a/artifacts/apidocs/schemas/api_withdrawal_history_request.md
+++ b/artifacts/apidocs/schemas/api_withdrawal_history_request.md
@@ -32,3 +32,4 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
diff --git a/artifacts/apidocs/schemas/api_withdrawal_history_response.md b/artifacts/apidocs/schemas/api_withdrawal_history_response.md
index 7d38da5..3735ce7 100644
--- a/artifacts/apidocs/schemas/api_withdrawal_history_response.md
+++ b/artifacts/apidocs/schemas/api_withdrawal_history_response.md
@@ -37,6 +37,7 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
??? info "[Signature](/../../schemas/signature)"
|Name
`Lite`|Type|Required
`Default`| Description |
|-|-|-|-|
diff --git a/artifacts/apidocs/schemas/api_withdrawal_request.md b/artifacts/apidocs/schemas/api_withdrawal_request.md
index c79afd1..dead4b7 100644
--- a/artifacts/apidocs/schemas/api_withdrawal_request.md
+++ b/artifacts/apidocs/schemas/api_withdrawal_request.md
@@ -32,6 +32,7 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
??? info "[Signature](/../../schemas/signature)"
|Name
`Lite`|Type|Required
`Default`| Description |
|-|-|-|-|
diff --git a/artifacts/apidocs/schemas/cancel_status.md b/artifacts/apidocs/schemas/cancel_status.md
index 4c19353..9a82da9 100644
--- a/artifacts/apidocs/schemas/cancel_status.md
+++ b/artifacts/apidocs/schemas/cancel_status.md
@@ -2,3 +2,4 @@
|Value| Description |
|-|-|
|`EXPIRED` = 1|Cancellation has expired because corresponding order had not arrived within the defined time-to-live window.|
+ |`DROPPED_DUPLICATE` = 2|This cancellation request was dropped because its TTL window overlaps with another cancellation request for the same order.|
diff --git a/artifacts/apidocs/schemas/cancel_status_feed.md b/artifacts/apidocs/schemas/cancel_status_feed.md
index f0e5279..e36c34f 100644
--- a/artifacts/apidocs/schemas/cancel_status_feed.md
+++ b/artifacts/apidocs/schemas/cancel_status_feed.md
@@ -40,7 +40,9 @@
|`EXCEED_MAX_SIGNATURE_EXPIRATION` = 27|the signature supplied is more than 30 days in the future|
|`MARKET_ORDER_WITH_LIMIT_PRICE` = 28|the market order has a limit price set|
|`CLIENT_CANCEL_ON_DISCONNECT_TRIGGERED` = 29|client cancel on disconnect triggered|
+ |`OCO_COUNTER_PART_TRIGGERED` = 30|the OCO counter part order was triggered|
??? info "[CancelStatus](/../../schemas/cancel_status)"
|Value| Description |
|-|-|
|`EXPIRED` = 1|Cancellation has expired because corresponding order had not arrived within the defined time-to-live window.|
+ |`DROPPED_DUPLICATE` = 2|This cancellation request was dropped because its TTL window overlaps with another cancellation request for the same order.|
diff --git a/artifacts/apidocs/schemas/client_order_i_ds_by_group.md b/artifacts/apidocs/schemas/client_order_i_ds_by_group.md
new file mode 100644
index 0000000..44b94b0
--- /dev/null
+++ b/artifacts/apidocs/schemas/client_order_i_ds_by_group.md
@@ -0,0 +1,8 @@
+!!! info "[ClientOrderIDsByGroup](/../../schemas/client_order_i_ds_by_group)"
+ Grouping for the client order id and their associated groups.
This is used to define TP/SL pairs or other order groupings after loading the list of Open Orders.
+
+ |Name
`Lite`|Type|Required
`Default`| Description |
+ |-|-|-|-|
+ |group_id
`gi` |string|True|The group this order belongs to. It can be used to define TP/SL pairs or other order groupings|
+ |client_order_id
`co` |[string]|True|List of client order IDs in the group|
+ |sub_account_id
`sa` |string|True|The sub account ID that these orders belong to|
diff --git a/artifacts/apidocs/schemas/currency.md b/artifacts/apidocs/schemas/currency.md
index 7b268f9..5555e1e 100644
--- a/artifacts/apidocs/schemas/currency.md
+++ b/artifacts/apidocs/schemas/currency.md
@@ -22,3 +22,4 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
diff --git a/artifacts/apidocs/schemas/deposit.md b/artifacts/apidocs/schemas/deposit.md
index 29d5e17..4ef01b9 100644
--- a/artifacts/apidocs/schemas/deposit.md
+++ b/artifacts/apidocs/schemas/deposit.md
@@ -29,3 +29,4 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
diff --git a/artifacts/apidocs/schemas/deposit_history.md b/artifacts/apidocs/schemas/deposit_history.md
index 95b2926..577d4eb 100644
--- a/artifacts/apidocs/schemas/deposit_history.md
+++ b/artifacts/apidocs/schemas/deposit_history.md
@@ -33,3 +33,4 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
diff --git a/artifacts/apidocs/schemas/ecosystem_point.md b/artifacts/apidocs/schemas/ecosystem_point.md
index 8318444..179508d 100644
--- a/artifacts/apidocs/schemas/ecosystem_point.md
+++ b/artifacts/apidocs/schemas/ecosystem_point.md
@@ -14,3 +14,4 @@
|calculate_from
`cf` |string|True|Start time of the epoch - phase|
|calculate_to
`ct` |string|True|End time of the epoch - phase|
|rank
`r` |integer|True|The rank of the account in the ecosystem|
+ |epoch
`e` |integer|True|The epoch number of the ecosystem point|
diff --git a/artifacts/apidocs/schemas/epoch.md b/artifacts/apidocs/schemas/epoch.md
new file mode 100644
index 0000000..dda79fb
--- /dev/null
+++ b/artifacts/apidocs/schemas/epoch.md
@@ -0,0 +1,6 @@
+!!! info "[Epoch](/../../schemas/epoch)"
+ |Name
`Lite`|Type|Required
`Default`| Description |
+ |-|-|-|-|
+ |epoch
`e` |integer|True|The epoch number|
+ |start_time
`st` |string|True|The start time of the epoch|
+ |end_time
`et` |string|True|The end time of the epoch|
diff --git a/artifacts/apidocs/schemas/funding_account_summary.md b/artifacts/apidocs/schemas/funding_account_summary.md
index 1ba48cc..c20c134 100644
--- a/artifacts/apidocs/schemas/funding_account_summary.md
+++ b/artifacts/apidocs/schemas/funding_account_summary.md
@@ -36,3 +36,4 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
diff --git a/artifacts/apidocs/schemas/funding_payment.md b/artifacts/apidocs/schemas/funding_payment.md
index 24f9d6c..34282c0 100644
--- a/artifacts/apidocs/schemas/funding_payment.md
+++ b/artifacts/apidocs/schemas/funding_payment.md
@@ -31,3 +31,4 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
diff --git a/artifacts/apidocs/schemas/instrument.md b/artifacts/apidocs/schemas/instrument.md
index 70c3b41..b753586 100644
--- a/artifacts/apidocs/schemas/instrument.md
+++ b/artifacts/apidocs/schemas/instrument.md
@@ -38,6 +38,7 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
??? info "[Currency](/../../schemas/currency)"
The list of Currencies that are supported on the GRVT exchange
@@ -62,6 +63,7 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
??? info "[Kind](/../../schemas/kind)"
The list of asset kinds that are supported on the GRVT exchange
diff --git a/artifacts/apidocs/schemas/order.md b/artifacts/apidocs/schemas/order.md
index 094afb7..24f181f 100644
--- a/artifacts/apidocs/schemas/order.md
+++ b/artifacts/apidocs/schemas/order.md
@@ -99,3 +99,4 @@
|`EXCEED_MAX_SIGNATURE_EXPIRATION` = 27|the signature supplied is more than 30 days in the future|
|`MARKET_ORDER_WITH_LIMIT_PRICE` = 28|the market order has a limit price set|
|`CLIENT_CANCEL_ON_DISCONNECT_TRIGGERED` = 29|client cancel on disconnect triggered|
+ |`OCO_COUNTER_PART_TRIGGERED` = 30|the OCO counter part order was triggered|
diff --git a/artifacts/apidocs/schemas/order_reject_reason.md b/artifacts/apidocs/schemas/order_reject_reason.md
index 93bb9d3..efa0bbf 100644
--- a/artifacts/apidocs/schemas/order_reject_reason.md
+++ b/artifacts/apidocs/schemas/order_reject_reason.md
@@ -31,3 +31,4 @@
|`EXCEED_MAX_SIGNATURE_EXPIRATION` = 27|the signature supplied is more than 30 days in the future|
|`MARKET_ORDER_WITH_LIMIT_PRICE` = 28|the market order has a limit price set|
|`CLIENT_CANCEL_ON_DISCONNECT_TRIGGERED` = 29|client cancel on disconnect triggered|
+ |`OCO_COUNTER_PART_TRIGGERED` = 30|the OCO counter part order was triggered|
diff --git a/artifacts/apidocs/schemas/order_state.md b/artifacts/apidocs/schemas/order_state.md
index a3c24c7..73b9d1f 100644
--- a/artifacts/apidocs/schemas/order_state.md
+++ b/artifacts/apidocs/schemas/order_state.md
@@ -48,3 +48,4 @@
|`EXCEED_MAX_SIGNATURE_EXPIRATION` = 27|the signature supplied is more than 30 days in the future|
|`MARKET_ORDER_WITH_LIMIT_PRICE` = 28|the market order has a limit price set|
|`CLIENT_CANCEL_ON_DISCONNECT_TRIGGERED` = 29|client cancel on disconnect triggered|
+ |`OCO_COUNTER_PART_TRIGGERED` = 30|the OCO counter part order was triggered|
diff --git a/artifacts/apidocs/schemas/order_state_feed.md b/artifacts/apidocs/schemas/order_state_feed.md
index 3d25347..0fbb189 100644
--- a/artifacts/apidocs/schemas/order_state_feed.md
+++ b/artifacts/apidocs/schemas/order_state_feed.md
@@ -54,3 +54,4 @@
|`EXCEED_MAX_SIGNATURE_EXPIRATION` = 27|the signature supplied is more than 30 days in the future|
|`MARKET_ORDER_WITH_LIMIT_PRICE` = 28|the market order has a limit price set|
|`CLIENT_CANCEL_ON_DISCONNECT_TRIGGERED` = 29|client cancel on disconnect triggered|
+ |`OCO_COUNTER_PART_TRIGGERED` = 30|the OCO counter part order was triggered|
diff --git a/artifacts/apidocs/schemas/pre_order_check_result.md b/artifacts/apidocs/schemas/pre_order_check_result.md
index a7185c4..b90de8d 100644
--- a/artifacts/apidocs/schemas/pre_order_check_result.md
+++ b/artifacts/apidocs/schemas/pre_order_check_result.md
@@ -36,3 +36,4 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
diff --git a/artifacts/apidocs/schemas/query_find_epoch_request.md b/artifacts/apidocs/schemas/query_find_epoch_request.md
new file mode 100644
index 0000000..9c9f837
--- /dev/null
+++ b/artifacts/apidocs/schemas/query_find_epoch_request.md
@@ -0,0 +1,7 @@
+!!! info "[QueryFindEpochRequest](/../../schemas/query_find_epoch_request)"
+ Query epoch by time or epoch number
+
+ |Name
`Lite`|Type|Required
`Default`| Description |
+ |-|-|-|-|
+ |time
`t` |string|False
`0`|The time to query the epoch|
+ |epoch
`e` |integer|False
`0`|The epoch number|
diff --git a/artifacts/apidocs/schemas/query_find_epoch_response.md b/artifacts/apidocs/schemas/query_find_epoch_response.md
new file mode 100644
index 0000000..2cae015
--- /dev/null
+++ b/artifacts/apidocs/schemas/query_find_epoch_response.md
@@ -0,0 +1,10 @@
+!!! info "[QueryFindEpochResponse](/../../schemas/query_find_epoch_response)"
+ |Name
`Lite`|Type|Required
`Default`| Description |
+ |-|-|-|-|
+ |epoch
`e` |Epoch|True|The epoch|
+ ??? info "[Epoch](/../../schemas/epoch)"
+ |Name
`Lite`|Type|Required
`Default`| Description |
+ |-|-|-|-|
+ |epoch
`e` |integer|True|The epoch number|
+ |start_time
`st` |string|True|The start time of the epoch|
+ |end_time
`et` |string|True|The end time of the epoch|
diff --git a/artifacts/apidocs/schemas/query_get_list_epoch_request.md b/artifacts/apidocs/schemas/query_get_list_epoch_request.md
new file mode 100644
index 0000000..aa8fe38
--- /dev/null
+++ b/artifacts/apidocs/schemas/query_get_list_epoch_request.md
@@ -0,0 +1,4 @@
+!!! info "[QueryGetListEpochRequest](/../../schemas/query_get_list_epoch_request)"
+ |Name
`Lite`|Type|Required
`Default`| Description |
+ |-|-|-|-|
+ |limit
`l` |integer|False
`0`|The limit to query for|
diff --git a/artifacts/apidocs/schemas/query_get_list_epoch_response.md b/artifacts/apidocs/schemas/query_get_list_epoch_response.md
new file mode 100644
index 0000000..5dd59fe
--- /dev/null
+++ b/artifacts/apidocs/schemas/query_get_list_epoch_response.md
@@ -0,0 +1,10 @@
+!!! info "[QueryGetListEpochResponse](/../../schemas/query_get_list_epoch_response)"
+ |Name
`Lite`|Type|Required
`Default`| Description |
+ |-|-|-|-|
+ |result
`r` |[Epoch]|True|The list of epochs|
+ ??? info "[Epoch](/../../schemas/epoch)"
+ |Name
`Lite`|Type|Required
`Default`| Description |
+ |-|-|-|-|
+ |epoch
`e` |integer|True|The epoch number|
+ |start_time
`st` |string|True|The start time of the epoch|
+ |end_time
`et` |string|True|The end time of the epoch|
diff --git a/artifacts/apidocs/schemas/spot_balance.md b/artifacts/apidocs/schemas/spot_balance.md
index 4eae88d..49aa108 100644
--- a/artifacts/apidocs/schemas/spot_balance.md
+++ b/artifacts/apidocs/schemas/spot_balance.md
@@ -28,3 +28,4 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
diff --git a/artifacts/apidocs/schemas/sub_account.md b/artifacts/apidocs/schemas/sub_account.md
index c947b90..14e0b90 100644
--- a/artifacts/apidocs/schemas/sub_account.md
+++ b/artifacts/apidocs/schemas/sub_account.md
@@ -42,6 +42,7 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
??? info "[SpotBalance](/../../schemas/spot_balance)"
|Name
`Lite`|Type|Required
`Default`| Description |
|-|-|-|-|
@@ -72,6 +73,7 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
??? info "[Positions](/../../schemas/positions)"
|Name
`Lite`|Type|Required
`Default`| Description |
|-|-|-|-|
diff --git a/artifacts/apidocs/schemas/sub_account_trade_aggregation.md b/artifacts/apidocs/schemas/sub_account_trade_aggregation.md
index 268c60f..e6ab414 100644
--- a/artifacts/apidocs/schemas/sub_account_trade_aggregation.md
+++ b/artifacts/apidocs/schemas/sub_account_trade_aggregation.md
@@ -8,3 +8,4 @@
|total_trade_volume
`tt` |string|True|Total volume traded|
|num_traded
`nt` |string|True|Number of trades|
|positive_fee
`pf` |string|True|Total positive fee paid by user|
+ |signer
`s` |string|True|The signer of the trade|
diff --git a/artifacts/apidocs/schemas/transfer_history.md b/artifacts/apidocs/schemas/transfer_history.md
index 55adcbd..e1f44b5 100644
--- a/artifacts/apidocs/schemas/transfer_history.md
+++ b/artifacts/apidocs/schemas/transfer_history.md
@@ -36,6 +36,7 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
??? info "[Signature](/../../schemas/signature)"
|Name
`Lite`|Type|Required
`Default`| Description |
|-|-|-|-|
diff --git a/artifacts/apidocs/schemas/withdrawal.md b/artifacts/apidocs/schemas/withdrawal.md
index 1f8271e..a413479 100644
--- a/artifacts/apidocs/schemas/withdrawal.md
+++ b/artifacts/apidocs/schemas/withdrawal.md
@@ -30,6 +30,7 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
??? info "[Signature](/../../schemas/signature)"
|Name
`Lite`|Type|Required
`Default`| Description |
|-|-|-|-|
diff --git a/artifacts/apidocs/schemas/withdrawal_history.md b/artifacts/apidocs/schemas/withdrawal_history.md
index 9b835e8..18a30ce 100644
--- a/artifacts/apidocs/schemas/withdrawal_history.md
+++ b/artifacts/apidocs/schemas/withdrawal_history.md
@@ -32,6 +32,7 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
??? info "[Signature](/../../schemas/signature)"
|Name
`Lite`|Type|Required
`Default`| Description |
|-|-|-|-|
diff --git a/artifacts/apidocs/schemas/ws_cancel_feed_data_v1.md b/artifacts/apidocs/schemas/ws_cancel_feed_data_v1.md
index 63080e4..fb5a7d4 100644
--- a/artifacts/apidocs/schemas/ws_cancel_feed_data_v1.md
+++ b/artifacts/apidocs/schemas/ws_cancel_feed_data_v1.md
@@ -47,7 +47,9 @@
|`EXCEED_MAX_SIGNATURE_EXPIRATION` = 27|the signature supplied is more than 30 days in the future|
|`MARKET_ORDER_WITH_LIMIT_PRICE` = 28|the market order has a limit price set|
|`CLIENT_CANCEL_ON_DISCONNECT_TRIGGERED` = 29|client cancel on disconnect triggered|
+ |`OCO_COUNTER_PART_TRIGGERED` = 30|the OCO counter part order was triggered|
??? info "[CancelStatus](/../../schemas/cancel_status)"
|Value| Description |
|-|-|
|`EXPIRED` = 1|Cancellation has expired because corresponding order had not arrived within the defined time-to-live window.|
+ |`DROPPED_DUPLICATE` = 2|This cancellation request was dropped because its TTL window overlaps with another cancellation request for the same order.|
diff --git a/artifacts/apidocs/schemas/ws_deposit_feed_data_v1.md b/artifacts/apidocs/schemas/ws_deposit_feed_data_v1.md
index 6217458..91b059e 100644
--- a/artifacts/apidocs/schemas/ws_deposit_feed_data_v1.md
+++ b/artifacts/apidocs/schemas/ws_deposit_feed_data_v1.md
@@ -38,3 +38,4 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
diff --git a/artifacts/apidocs/schemas/ws_order_feed_data_v1.md b/artifacts/apidocs/schemas/ws_order_feed_data_v1.md
index 63252a8..3fd7662 100644
--- a/artifacts/apidocs/schemas/ws_order_feed_data_v1.md
+++ b/artifacts/apidocs/schemas/ws_order_feed_data_v1.md
@@ -106,3 +106,4 @@
|`EXCEED_MAX_SIGNATURE_EXPIRATION` = 27|the signature supplied is more than 30 days in the future|
|`MARKET_ORDER_WITH_LIMIT_PRICE` = 28|the market order has a limit price set|
|`CLIENT_CANCEL_ON_DISCONNECT_TRIGGERED` = 29|client cancel on disconnect triggered|
+ |`OCO_COUNTER_PART_TRIGGERED` = 30|the OCO counter part order was triggered|
diff --git a/artifacts/apidocs/schemas/ws_order_group_feed_data_v1.md b/artifacts/apidocs/schemas/ws_order_group_feed_data_v1.md
new file mode 100644
index 0000000..447a395
--- /dev/null
+++ b/artifacts/apidocs/schemas/ws_order_group_feed_data_v1.md
@@ -0,0 +1,15 @@
+!!! info "[WSOrderGroupFeedDataV1](/../../schemas/ws_order_group_feed_data_v1)"
+ |Name
`Lite`|Type|Required
`Default`| Description |
+ |-|-|-|-|
+ |stream
`s` |string|True|Stream name|
+ |selector
`s1` |string|True|Primary selector|
+ |sequence_number
`sn` |string|True|A running sequence number that determines global message order within the specific stream|
+ |feed
`f` |ClientOrderIDsByGroup|True|The order object being created or updated|
+ ??? info "[ClientOrderIDsByGroup](/../../schemas/client_order_i_ds_by_group)"
+ Grouping for the client order id and their associated groups.
This is used to define TP/SL pairs or other order groupings after loading the list of Open Orders.
+
+ |Name
`Lite`|Type|Required
`Default`| Description |
+ |-|-|-|-|
+ |group_id
`gi` |string|True|The group this order belongs to. It can be used to define TP/SL pairs or other order groupings|
+ |client_order_id
`co` |[string]|True|List of client order IDs in the group|
+ |sub_account_id
`sa` |string|True|The sub account ID that these orders belong to|
diff --git a/artifacts/apidocs/schemas/ws_order_group_feed_selector_v1.md b/artifacts/apidocs/schemas/ws_order_group_feed_selector_v1.md
new file mode 100644
index 0000000..fd880b2
--- /dev/null
+++ b/artifacts/apidocs/schemas/ws_order_group_feed_selector_v1.md
@@ -0,0 +1,6 @@
+!!! info "[WSOrderGroupFeedSelectorV1](/../../schemas/ws_order_group_feed_selector_v1)"
+ Subscribes to a feed of order group to get updated when a new group is created for the subAccount specified.
+
+ |Name
`Lite`|Type|Required
`Default`| Description |
+ |-|-|-|-|
+ |sub_account_id
`sa` |string|True|The subaccount ID to filter by|
diff --git a/artifacts/apidocs/schemas/ws_order_state_feed_data_v1.md b/artifacts/apidocs/schemas/ws_order_state_feed_data_v1.md
index 5ad2602..c2165cf 100644
--- a/artifacts/apidocs/schemas/ws_order_state_feed_data_v1.md
+++ b/artifacts/apidocs/schemas/ws_order_state_feed_data_v1.md
@@ -61,3 +61,4 @@
|`EXCEED_MAX_SIGNATURE_EXPIRATION` = 27|the signature supplied is more than 30 days in the future|
|`MARKET_ORDER_WITH_LIMIT_PRICE` = 28|the market order has a limit price set|
|`CLIENT_CANCEL_ON_DISCONNECT_TRIGGERED` = 29|client cancel on disconnect triggered|
+ |`OCO_COUNTER_PART_TRIGGERED` = 30|the OCO counter part order was triggered|
diff --git a/artifacts/apidocs/schemas/ws_transfer_feed_data_v1.md b/artifacts/apidocs/schemas/ws_transfer_feed_data_v1.md
index b1f56f0..b519b40 100644
--- a/artifacts/apidocs/schemas/ws_transfer_feed_data_v1.md
+++ b/artifacts/apidocs/schemas/ws_transfer_feed_data_v1.md
@@ -45,6 +45,7 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
??? info "[Signature](/../../schemas/signature)"
|Name
`Lite`|Type|Required
`Default`| Description |
|-|-|-|-|
diff --git a/artifacts/apidocs/schemas/ws_withdrawal_feed_data_v1.md b/artifacts/apidocs/schemas/ws_withdrawal_feed_data_v1.md
index 373591c..0096bbd 100644
--- a/artifacts/apidocs/schemas/ws_withdrawal_feed_data_v1.md
+++ b/artifacts/apidocs/schemas/ws_withdrawal_feed_data_v1.md
@@ -39,6 +39,7 @@
|`SUI` = 21|the SUI token|
|`FARTCOIN` = 28|the FARTCOIN token|
|`BERA` = 35|the BERA token|
+ |`KAITO` = 39|the KAITO token|
??? info "[Signature](/../../schemas/signature)"
|Name
`Lite`|Type|Required
`Default`| Description |
|-|-|-|-|
diff --git a/artifacts/apidocs/trading_api.md b/artifacts/apidocs/trading_api.md
index dde1684..df486b9 100644
--- a/artifacts/apidocs/trading_api.md
+++ b/artifacts/apidocs/trading_api.md
@@ -4196,6 +4196,1337 @@ LITE ENDPOINT: lite/v1/cancel_on_disconnect
```
+### Create Bulk Orders
+```
+FULL ENDPOINT: full/v1/create_bulk_orders
+LITE ENDPOINT: lite/v1/create_bulk_orders
+```
+
+=== "Request"
+
+ -8<- "docs/schemas/api_create_bulk_orders_request.md"
+
+
+ !!! question "Query"
+ **Full Request**
+ ``` { .json .copy }
+ {
+ "orders": [{
+ "order_id": "0x1234567890abcdef",
+ "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'",
+ "is_market": false,
+ "time_in_force": "GOOD_TILL_TIME",
+ "post_only": false,
+ "reduce_only": false,
+ "legs": [{
+ "instrument": "BTC_USDT_Perp",
+ "size": "10.5",
+ "limit_price": "65038.01",
+ "is_buying_asset": true
+ }],
+ "signature": {
+ "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0",
+ "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8",
+ "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d",
+ "v": 28,
+ "expiration": "1697788800000000000",
+ "nonce": 1234567890
+ },
+ "metadata": {
+ "client_order_id": "23042",
+ "create_time": "1697788800000000000"
+ },
+ "state": {
+ "status": "PENDING",
+ "reject_reason": "CLIENT_CANCEL",
+ "book_size": ["10.5"],
+ "traded_size": ["1.5"],
+ "update_time": "1697788800000000000",
+ "avg_fill_price": ["60000.4"]
+ }
+ }]
+ }
+ ```
+ **Lite Request**
+ ``` { .json .copy }
+ {
+ "o": [{
+ "oi": "0x1234567890abcdef",
+ "sa": "'$GRVT_SUB_ACCOUNT_ID'",
+ "im": false,
+ "ti": "GOOD_TILL_TIME",
+ "po": false,
+ "ro": false,
+ "l": [{
+ "i": "BTC_USDT_Perp",
+ "s": "10.5",
+ "lp": "65038.01",
+ "ib": true
+ }],
+ "s": {
+ "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0",
+ "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8",
+ "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d",
+ "v": 28,
+ "e": "1697788800000000000",
+ "n": 1234567890
+ },
+ "m": {
+ "co": "23042",
+ "ct": "1697788800000000000"
+ },
+ "s1": {
+ "s": "PENDING",
+ "rr": "CLIENT_CANCEL",
+ "bs": ["10.5"],
+ "ts": ["1.5"],
+ "ut": "1697788800000000000",
+ "af": ["60000.4"]
+ }
+ }]
+ }
+ ```
+
+=== "Response"
+
+ -8<- "docs/schemas/api_create_bulk_orders_response.md"
+
+
+ !!! success
+ **Full Response**
+ ``` { .json .copy }
+ {
+ "result": [{
+ "order_id": "0x1234567890abcdef",
+ "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'",
+ "is_market": false,
+ "time_in_force": "GOOD_TILL_TIME",
+ "post_only": false,
+ "reduce_only": false,
+ "legs": [{
+ "instrument": "BTC_USDT_Perp",
+ "size": "10.5",
+ "limit_price": "65038.01",
+ "is_buying_asset": true
+ }],
+ "signature": {
+ "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0",
+ "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8",
+ "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d",
+ "v": 28,
+ "expiration": "1697788800000000000",
+ "nonce": 1234567890
+ },
+ "metadata": {
+ "client_order_id": "23042",
+ "create_time": "1697788800000000000"
+ },
+ "state": {
+ "status": "PENDING",
+ "reject_reason": "CLIENT_CANCEL",
+ "book_size": ["10.5"],
+ "traded_size": ["1.5"],
+ "update_time": "1697788800000000000",
+ "avg_fill_price": ["60000.4"]
+ }
+ }]
+ }
+ ```
+ **Lite Response**
+ ``` { .json .copy }
+ {
+ "r": [{
+ "oi": "0x1234567890abcdef",
+ "sa": "'$GRVT_SUB_ACCOUNT_ID'",
+ "im": false,
+ "ti": "GOOD_TILL_TIME",
+ "po": false,
+ "ro": false,
+ "l": [{
+ "i": "BTC_USDT_Perp",
+ "s": "10.5",
+ "lp": "65038.01",
+ "ib": true
+ }],
+ "s": {
+ "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0",
+ "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8",
+ "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d",
+ "v": 28,
+ "e": "1697788800000000000",
+ "n": 1234567890
+ },
+ "m": {
+ "co": "23042",
+ "ct": "1697788800000000000"
+ },
+ "s1": {
+ "s": "PENDING",
+ "rr": "CLIENT_CANCEL",
+ "bs": ["10.5"],
+ "ts": ["1.5"],
+ "ut": "1697788800000000000",
+ "af": ["60000.4"]
+ }
+ }]
+ }
+ ```
+
+=== "Errors"
+
+ !!! info "Error Codes"
+ |Code|HttpStatus| Description |
+ |-|-|-|
+ |1000|401|You need to authenticate prior to using this functionality|
+ |1001|403|You are not authorized to access this functionality|
+ |1002|500|Internal Server Error|
+ |1003|400|Request could not be processed due to malformed syntax|
+ |1004|404|Data Not Found|
+ |1005|500|Unknown Error|
+ |1006|429|You have surpassed the allocated rate limit for your tier|
+ |1008|401|Your IP has not been whitelisted for access|
+ |1400|403|Signer does not have trade permission|
+ |1009|503|We are temporarily deactivating this API endpoint, please try again later|
+ |2000|403|Order signature is from an unauthorized signer|
+ |2001|403|Order signature has expired|
+ |2002|403|Order signature does not match payload|
+ |2003|403|Order sub account does not match logged in user|
+ |2004|403|Order signature is from an expired session key|
+ |2006|403|Order signature R/S must have exactly 64 characters long without 0x prefix|
+ |2005|403|Order signature V must be 27/28|
+ |2007|403|Order signature S must be in the lower half of the curve|
+ |2010|400|Order ID should be empty when creating an order|
+ |2011|400|Client Order ID should be supplied when creating an order|
+ |2012|400|Client Order ID overlaps with existing active order|
+ |2030|400|Orderbook Orders must have a TimeInForce of GTT/IOC/FOK|
+ |2031|400|RFQ Orders must have a TimeInForce of GTT/AON/IOC/FOK|
+ |2032|400|Post Only can only be set to true for GTT/AON orders|
+ |2020|400|Market Order must always be supplied without a limit price|
+ |2021|400|Limit Order must always be supplied with a limit price|
+ |2040|400|Order must contain at least one leg|
+ |2041|400|Order Legs must be sorted by Derivative.Instrument/Underlying/BaseCurrency/Expiration/StrikePrice|
+ |2042|400|Orderbook Orders must contain only one leg|
+ |2050|400|Order state must be empty upon creation|
+ |2051|400|Order execution metadata must be empty upon creation|
+ |2060|400|Order Legs contain one or more inactive derivative|
+ |2061|400|Unsupported Instrument Requested|
+ |2062|400|Order size smaller than min size|
+ |2063|400|Order size smaller than min block size in block trade venue|
+ |2064|400|Invalid limit price tick|
+ |2065|400|Order size too granular|
+ |2070|400|Liquidation Order is not supported|
+ |2080|400|Insufficient margin to create order|
+ |2081|400|Order Fill would result in exceeding maximum position size|
+ |2082|400|Pre-order check failed|
+ |2083|400|Order Fill would result in exceeding maximum position size under current configurable leverage tier|
+ |2090|429|Max open orders exceeded|
+ |2110|400|Invalid trigger by|
+ |2111|400|Unsupported trigger by|
+ |2112|400|Invalid trigger order|
+ |2220|400|No orders provided|
+ |2221|400|Invalid number of orders|
+ |2222|400|Order is not a TPSL order|
+ |2223|400|Unsupported bulk order type|
+
+
+ !!! failure
+ **Full Error Response**
+ ``` { .json .copy }
+ {
+ "request_id":1,
+ "code":1000,
+ "message":"You need to authenticate prior to using this functionality",
+ "status":401
+ }
+ ```
+ **Lite Error Response**
+ ``` { .json .copy }
+ {
+ "ri":1,
+ "c":1000,
+ "m":"You need to authenticate prior to using this functionality",
+ "s":401
+ }
+ ```
+
+=== "Try it out"
+ -8<- "sections/auth_closed.md"
+ === "DEV"
+
+ !!! example "REST Full"
+ ``` { .bash .copy }
+ curl --location 'https://trades.dev.gravitymarkets.io/full/v1/create_bulk_orders' \
+ --header "Cookie: $GRVT_COOKIE" \
+ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ --data '{
+ "orders": [{
+ "order_id": "0x1234567890abcdef",
+ "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'",
+ "is_market": false,
+ "time_in_force": "GOOD_TILL_TIME",
+ "post_only": false,
+ "reduce_only": false,
+ "legs": [{
+ "instrument": "BTC_USDT_Perp",
+ "size": "10.5",
+ "limit_price": "65038.01",
+ "is_buying_asset": true
+ }],
+ "signature": {
+ "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0",
+ "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8",
+ "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d",
+ "v": 28,
+ "expiration": "1697788800000000000",
+ "nonce": 1234567890
+ },
+ "metadata": {
+ "client_order_id": "23042",
+ "create_time": "1697788800000000000"
+ },
+ "state": {
+ "status": "PENDING",
+ "reject_reason": "CLIENT_CANCEL",
+ "book_size": ["10.5"],
+ "traded_size": ["1.5"],
+ "update_time": "1697788800000000000",
+ "avg_fill_price": ["60000.4"]
+ }
+ }]
+ }
+ '
+ ```
+ !!! example "JSONRPC Full"
+ ``` { .bash .copy }
+ wscat -c "wss://trades.dev.gravitymarkets.io/ws/full" \
+ -H "Cookie: $GRVT_COOKIE" \
+ -H "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ -x '
+ {
+ "jsonrpc": "2.0",
+ "method": "v1/create_bulk_orders",
+ "params": {
+ "orders": [{
+ "order_id": "0x1234567890abcdef",
+ "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'",
+ "is_market": false,
+ "time_in_force": "GOOD_TILL_TIME",
+ "post_only": false,
+ "reduce_only": false,
+ "legs": [{
+ "instrument": "BTC_USDT_Perp",
+ "size": "10.5",
+ "limit_price": "65038.01",
+ "is_buying_asset": true
+ }],
+ "signature": {
+ "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0",
+ "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8",
+ "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d",
+ "v": 28,
+ "expiration": "1697788800000000000",
+ "nonce": 1234567890
+ },
+ "metadata": {
+ "client_order_id": "23042",
+ "create_time": "1697788800000000000"
+ },
+ "state": {
+ "status": "PENDING",
+ "reject_reason": "CLIENT_CANCEL",
+ "book_size": ["10.5"],
+ "traded_size": ["1.5"],
+ "update_time": "1697788800000000000",
+ "avg_fill_price": ["60000.4"]
+ }
+ }]
+ },
+ "id": 123
+ }
+ ' -w 360
+ ```
+
+
+ !!! example "REST Lite"
+ ``` { .bash .copy }
+ curl --location 'https://trades.dev.gravitymarkets.io/lite/v1/create_bulk_orders' \
+ --header "Cookie: $GRVT_COOKIE" \
+ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ --data '{
+ "o": [{
+ "oi": "0x1234567890abcdef",
+ "sa": "'$GRVT_SUB_ACCOUNT_ID'",
+ "im": false,
+ "ti": "GOOD_TILL_TIME",
+ "po": false,
+ "ro": false,
+ "l": [{
+ "i": "BTC_USDT_Perp",
+ "s": "10.5",
+ "lp": "65038.01",
+ "ib": true
+ }],
+ "s": {
+ "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0",
+ "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8",
+ "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d",
+ "v": 28,
+ "e": "1697788800000000000",
+ "n": 1234567890
+ },
+ "m": {
+ "co": "23042",
+ "ct": "1697788800000000000"
+ },
+ "s1": {
+ "s": "PENDING",
+ "rr": "CLIENT_CANCEL",
+ "bs": ["10.5"],
+ "ts": ["1.5"],
+ "ut": "1697788800000000000",
+ "af": ["60000.4"]
+ }
+ }]
+ }
+ '
+ ```
+ !!! example "JSONRPC Lite"
+ ``` { .bash .copy }
+ wscat -c "wss://trades.dev.gravitymarkets.io/ws/lite" \
+ -H "Cookie: $GRVT_COOKIE" \
+ -H "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ -x '
+ {
+ "j": "2.0",
+ "m": "v1/create_bulk_orders",
+ "p": {
+ "o": [{
+ "oi": "0x1234567890abcdef",
+ "sa": "'$GRVT_SUB_ACCOUNT_ID'",
+ "im": false,
+ "ti": "GOOD_TILL_TIME",
+ "po": false,
+ "ro": false,
+ "l": [{
+ "i": "BTC_USDT_Perp",
+ "s": "10.5",
+ "lp": "65038.01",
+ "ib": true
+ }],
+ "s": {
+ "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0",
+ "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8",
+ "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d",
+ "v": 28,
+ "e": "1697788800000000000",
+ "n": 1234567890
+ },
+ "m": {
+ "co": "23042",
+ "ct": "1697788800000000000"
+ },
+ "s1": {
+ "s": "PENDING",
+ "rr": "CLIENT_CANCEL",
+ "bs": ["10.5"],
+ "ts": ["1.5"],
+ "ut": "1697788800000000000",
+ "af": ["60000.4"]
+ }
+ }]
+ },
+ "i": 123
+ }
+ ' -w 360
+ ```
+
+ === "STAGING"
+
+ !!! example "REST Full"
+ ``` { .bash .copy }
+ curl --location 'https://trades.staging.gravitymarkets.io/full/v1/create_bulk_orders' \
+ --header "Cookie: $GRVT_COOKIE" \
+ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ --data '{
+ "orders": [{
+ "order_id": "0x1234567890abcdef",
+ "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'",
+ "is_market": false,
+ "time_in_force": "GOOD_TILL_TIME",
+ "post_only": false,
+ "reduce_only": false,
+ "legs": [{
+ "instrument": "BTC_USDT_Perp",
+ "size": "10.5",
+ "limit_price": "65038.01",
+ "is_buying_asset": true
+ }],
+ "signature": {
+ "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0",
+ "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8",
+ "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d",
+ "v": 28,
+ "expiration": "1697788800000000000",
+ "nonce": 1234567890
+ },
+ "metadata": {
+ "client_order_id": "23042",
+ "create_time": "1697788800000000000"
+ },
+ "state": {
+ "status": "PENDING",
+ "reject_reason": "CLIENT_CANCEL",
+ "book_size": ["10.5"],
+ "traded_size": ["1.5"],
+ "update_time": "1697788800000000000",
+ "avg_fill_price": ["60000.4"]
+ }
+ }]
+ }
+ '
+ ```
+ !!! example "JSONRPC Full"
+ ``` { .bash .copy }
+ wscat -c "wss://trades.staging.gravitymarkets.io/ws/full" \
+ -H "Cookie: $GRVT_COOKIE" \
+ -H "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ -x '
+ {
+ "jsonrpc": "2.0",
+ "method": "v1/create_bulk_orders",
+ "params": {
+ "orders": [{
+ "order_id": "0x1234567890abcdef",
+ "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'",
+ "is_market": false,
+ "time_in_force": "GOOD_TILL_TIME",
+ "post_only": false,
+ "reduce_only": false,
+ "legs": [{
+ "instrument": "BTC_USDT_Perp",
+ "size": "10.5",
+ "limit_price": "65038.01",
+ "is_buying_asset": true
+ }],
+ "signature": {
+ "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0",
+ "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8",
+ "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d",
+ "v": 28,
+ "expiration": "1697788800000000000",
+ "nonce": 1234567890
+ },
+ "metadata": {
+ "client_order_id": "23042",
+ "create_time": "1697788800000000000"
+ },
+ "state": {
+ "status": "PENDING",
+ "reject_reason": "CLIENT_CANCEL",
+ "book_size": ["10.5"],
+ "traded_size": ["1.5"],
+ "update_time": "1697788800000000000",
+ "avg_fill_price": ["60000.4"]
+ }
+ }]
+ },
+ "id": 123
+ }
+ ' -w 360
+ ```
+
+
+ !!! example "REST Lite"
+ ``` { .bash .copy }
+ curl --location 'https://trades.staging.gravitymarkets.io/lite/v1/create_bulk_orders' \
+ --header "Cookie: $GRVT_COOKIE" \
+ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ --data '{
+ "o": [{
+ "oi": "0x1234567890abcdef",
+ "sa": "'$GRVT_SUB_ACCOUNT_ID'",
+ "im": false,
+ "ti": "GOOD_TILL_TIME",
+ "po": false,
+ "ro": false,
+ "l": [{
+ "i": "BTC_USDT_Perp",
+ "s": "10.5",
+ "lp": "65038.01",
+ "ib": true
+ }],
+ "s": {
+ "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0",
+ "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8",
+ "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d",
+ "v": 28,
+ "e": "1697788800000000000",
+ "n": 1234567890
+ },
+ "m": {
+ "co": "23042",
+ "ct": "1697788800000000000"
+ },
+ "s1": {
+ "s": "PENDING",
+ "rr": "CLIENT_CANCEL",
+ "bs": ["10.5"],
+ "ts": ["1.5"],
+ "ut": "1697788800000000000",
+ "af": ["60000.4"]
+ }
+ }]
+ }
+ '
+ ```
+ !!! example "JSONRPC Lite"
+ ``` { .bash .copy }
+ wscat -c "wss://trades.staging.gravitymarkets.io/ws/lite" \
+ -H "Cookie: $GRVT_COOKIE" \
+ -H "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ -x '
+ {
+ "j": "2.0",
+ "m": "v1/create_bulk_orders",
+ "p": {
+ "o": [{
+ "oi": "0x1234567890abcdef",
+ "sa": "'$GRVT_SUB_ACCOUNT_ID'",
+ "im": false,
+ "ti": "GOOD_TILL_TIME",
+ "po": false,
+ "ro": false,
+ "l": [{
+ "i": "BTC_USDT_Perp",
+ "s": "10.5",
+ "lp": "65038.01",
+ "ib": true
+ }],
+ "s": {
+ "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0",
+ "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8",
+ "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d",
+ "v": 28,
+ "e": "1697788800000000000",
+ "n": 1234567890
+ },
+ "m": {
+ "co": "23042",
+ "ct": "1697788800000000000"
+ },
+ "s1": {
+ "s": "PENDING",
+ "rr": "CLIENT_CANCEL",
+ "bs": ["10.5"],
+ "ts": ["1.5"],
+ "ut": "1697788800000000000",
+ "af": ["60000.4"]
+ }
+ }]
+ },
+ "i": 123
+ }
+ ' -w 360
+ ```
+
+ === "TESTNET"
+
+ !!! example "REST Full"
+ ``` { .bash .copy }
+ curl --location 'https://trades.testnet.grvt.io/full/v1/create_bulk_orders' \
+ --header "Cookie: $GRVT_COOKIE" \
+ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ --data '{
+ "orders": [{
+ "order_id": "0x1234567890abcdef",
+ "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'",
+ "is_market": false,
+ "time_in_force": "GOOD_TILL_TIME",
+ "post_only": false,
+ "reduce_only": false,
+ "legs": [{
+ "instrument": "BTC_USDT_Perp",
+ "size": "10.5",
+ "limit_price": "65038.01",
+ "is_buying_asset": true
+ }],
+ "signature": {
+ "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0",
+ "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8",
+ "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d",
+ "v": 28,
+ "expiration": "1697788800000000000",
+ "nonce": 1234567890
+ },
+ "metadata": {
+ "client_order_id": "23042",
+ "create_time": "1697788800000000000"
+ },
+ "state": {
+ "status": "PENDING",
+ "reject_reason": "CLIENT_CANCEL",
+ "book_size": ["10.5"],
+ "traded_size": ["1.5"],
+ "update_time": "1697788800000000000",
+ "avg_fill_price": ["60000.4"]
+ }
+ }]
+ }
+ '
+ ```
+ !!! example "JSONRPC Full"
+ ``` { .bash .copy }
+ wscat -c "wss://trades.testnet.grvt.io/ws/full" \
+ -H "Cookie: $GRVT_COOKIE" \
+ -H "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ -x '
+ {
+ "jsonrpc": "2.0",
+ "method": "v1/create_bulk_orders",
+ "params": {
+ "orders": [{
+ "order_id": "0x1234567890abcdef",
+ "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'",
+ "is_market": false,
+ "time_in_force": "GOOD_TILL_TIME",
+ "post_only": false,
+ "reduce_only": false,
+ "legs": [{
+ "instrument": "BTC_USDT_Perp",
+ "size": "10.5",
+ "limit_price": "65038.01",
+ "is_buying_asset": true
+ }],
+ "signature": {
+ "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0",
+ "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8",
+ "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d",
+ "v": 28,
+ "expiration": "1697788800000000000",
+ "nonce": 1234567890
+ },
+ "metadata": {
+ "client_order_id": "23042",
+ "create_time": "1697788800000000000"
+ },
+ "state": {
+ "status": "PENDING",
+ "reject_reason": "CLIENT_CANCEL",
+ "book_size": ["10.5"],
+ "traded_size": ["1.5"],
+ "update_time": "1697788800000000000",
+ "avg_fill_price": ["60000.4"]
+ }
+ }]
+ },
+ "id": 123
+ }
+ ' -w 360
+ ```
+
+
+ !!! example "REST Lite"
+ ``` { .bash .copy }
+ curl --location 'https://trades.testnet.grvt.io/lite/v1/create_bulk_orders' \
+ --header "Cookie: $GRVT_COOKIE" \
+ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ --data '{
+ "o": [{
+ "oi": "0x1234567890abcdef",
+ "sa": "'$GRVT_SUB_ACCOUNT_ID'",
+ "im": false,
+ "ti": "GOOD_TILL_TIME",
+ "po": false,
+ "ro": false,
+ "l": [{
+ "i": "BTC_USDT_Perp",
+ "s": "10.5",
+ "lp": "65038.01",
+ "ib": true
+ }],
+ "s": {
+ "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0",
+ "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8",
+ "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d",
+ "v": 28,
+ "e": "1697788800000000000",
+ "n": 1234567890
+ },
+ "m": {
+ "co": "23042",
+ "ct": "1697788800000000000"
+ },
+ "s1": {
+ "s": "PENDING",
+ "rr": "CLIENT_CANCEL",
+ "bs": ["10.5"],
+ "ts": ["1.5"],
+ "ut": "1697788800000000000",
+ "af": ["60000.4"]
+ }
+ }]
+ }
+ '
+ ```
+ !!! example "JSONRPC Lite"
+ ``` { .bash .copy }
+ wscat -c "wss://trades.testnet.grvt.io/ws/lite" \
+ -H "Cookie: $GRVT_COOKIE" \
+ -H "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ -x '
+ {
+ "j": "2.0",
+ "m": "v1/create_bulk_orders",
+ "p": {
+ "o": [{
+ "oi": "0x1234567890abcdef",
+ "sa": "'$GRVT_SUB_ACCOUNT_ID'",
+ "im": false,
+ "ti": "GOOD_TILL_TIME",
+ "po": false,
+ "ro": false,
+ "l": [{
+ "i": "BTC_USDT_Perp",
+ "s": "10.5",
+ "lp": "65038.01",
+ "ib": true
+ }],
+ "s": {
+ "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0",
+ "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8",
+ "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d",
+ "v": 28,
+ "e": "1697788800000000000",
+ "n": 1234567890
+ },
+ "m": {
+ "co": "23042",
+ "ct": "1697788800000000000"
+ },
+ "s1": {
+ "s": "PENDING",
+ "rr": "CLIENT_CANCEL",
+ "bs": ["10.5"],
+ "ts": ["1.5"],
+ "ut": "1697788800000000000",
+ "af": ["60000.4"]
+ }
+ }]
+ },
+ "i": 123
+ }
+ ' -w 360
+ ```
+
+ === "PROD"
+
+ !!! example "REST Full"
+ ``` { .bash .copy }
+ curl --location 'https://trades.grvt.io/full/v1/create_bulk_orders' \
+ --header "Cookie: $GRVT_COOKIE" \
+ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ --data '{
+ "orders": [{
+ "order_id": "0x1234567890abcdef",
+ "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'",
+ "is_market": false,
+ "time_in_force": "GOOD_TILL_TIME",
+ "post_only": false,
+ "reduce_only": false,
+ "legs": [{
+ "instrument": "BTC_USDT_Perp",
+ "size": "10.5",
+ "limit_price": "65038.01",
+ "is_buying_asset": true
+ }],
+ "signature": {
+ "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0",
+ "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8",
+ "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d",
+ "v": 28,
+ "expiration": "1697788800000000000",
+ "nonce": 1234567890
+ },
+ "metadata": {
+ "client_order_id": "23042",
+ "create_time": "1697788800000000000"
+ },
+ "state": {
+ "status": "PENDING",
+ "reject_reason": "CLIENT_CANCEL",
+ "book_size": ["10.5"],
+ "traded_size": ["1.5"],
+ "update_time": "1697788800000000000",
+ "avg_fill_price": ["60000.4"]
+ }
+ }]
+ }
+ '
+ ```
+ !!! example "JSONRPC Full"
+ ``` { .bash .copy }
+ wscat -c "wss://trades.grvt.io/ws/full" \
+ -H "Cookie: $GRVT_COOKIE" \
+ -H "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ -x '
+ {
+ "jsonrpc": "2.0",
+ "method": "v1/create_bulk_orders",
+ "params": {
+ "orders": [{
+ "order_id": "0x1234567890abcdef",
+ "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'",
+ "is_market": false,
+ "time_in_force": "GOOD_TILL_TIME",
+ "post_only": false,
+ "reduce_only": false,
+ "legs": [{
+ "instrument": "BTC_USDT_Perp",
+ "size": "10.5",
+ "limit_price": "65038.01",
+ "is_buying_asset": true
+ }],
+ "signature": {
+ "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0",
+ "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8",
+ "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d",
+ "v": 28,
+ "expiration": "1697788800000000000",
+ "nonce": 1234567890
+ },
+ "metadata": {
+ "client_order_id": "23042",
+ "create_time": "1697788800000000000"
+ },
+ "state": {
+ "status": "PENDING",
+ "reject_reason": "CLIENT_CANCEL",
+ "book_size": ["10.5"],
+ "traded_size": ["1.5"],
+ "update_time": "1697788800000000000",
+ "avg_fill_price": ["60000.4"]
+ }
+ }]
+ },
+ "id": 123
+ }
+ ' -w 360
+ ```
+
+
+ !!! example "REST Lite"
+ ``` { .bash .copy }
+ curl --location 'https://trades.grvt.io/lite/v1/create_bulk_orders' \
+ --header "Cookie: $GRVT_COOKIE" \
+ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ --data '{
+ "o": [{
+ "oi": "0x1234567890abcdef",
+ "sa": "'$GRVT_SUB_ACCOUNT_ID'",
+ "im": false,
+ "ti": "GOOD_TILL_TIME",
+ "po": false,
+ "ro": false,
+ "l": [{
+ "i": "BTC_USDT_Perp",
+ "s": "10.5",
+ "lp": "65038.01",
+ "ib": true
+ }],
+ "s": {
+ "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0",
+ "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8",
+ "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d",
+ "v": 28,
+ "e": "1697788800000000000",
+ "n": 1234567890
+ },
+ "m": {
+ "co": "23042",
+ "ct": "1697788800000000000"
+ },
+ "s1": {
+ "s": "PENDING",
+ "rr": "CLIENT_CANCEL",
+ "bs": ["10.5"],
+ "ts": ["1.5"],
+ "ut": "1697788800000000000",
+ "af": ["60000.4"]
+ }
+ }]
+ }
+ '
+ ```
+ !!! example "JSONRPC Lite"
+ ``` { .bash .copy }
+ wscat -c "wss://trades.grvt.io/ws/lite" \
+ -H "Cookie: $GRVT_COOKIE" \
+ -H "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ -x '
+ {
+ "j": "2.0",
+ "m": "v1/create_bulk_orders",
+ "p": {
+ "o": [{
+ "oi": "0x1234567890abcdef",
+ "sa": "'$GRVT_SUB_ACCOUNT_ID'",
+ "im": false,
+ "ti": "GOOD_TILL_TIME",
+ "po": false,
+ "ro": false,
+ "l": [{
+ "i": "BTC_USDT_Perp",
+ "s": "10.5",
+ "lp": "65038.01",
+ "ib": true
+ }],
+ "s": {
+ "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0",
+ "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8",
+ "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d",
+ "v": 28,
+ "e": "1697788800000000000",
+ "n": 1234567890
+ },
+ "m": {
+ "co": "23042",
+ "ct": "1697788800000000000"
+ },
+ "s1": {
+ "s": "PENDING",
+ "rr": "CLIENT_CANCEL",
+ "bs": ["10.5"],
+ "ts": ["1.5"],
+ "ut": "1697788800000000000",
+ "af": ["60000.4"]
+ }
+ }]
+ },
+ "i": 123
+ }
+ ' -w 360
+ ```
+
+
+### Get Order Group
+```
+FULL ENDPOINT: full/v1/order_group
+LITE ENDPOINT: lite/v1/order_group
+```
+
+=== "Request"
+
+ -8<- "docs/schemas/api_get_order_group_request.md"
+
+
+ !!! question "Query"
+ **Full Request**
+ ``` { .json .copy }
+ {
+ "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'"
+ }
+ ```
+ **Lite Request**
+ ``` { .json .copy }
+ {
+ "sa": "'$GRVT_SUB_ACCOUNT_ID'"
+ }
+ ```
+
+=== "Response"
+
+ -8<- "docs/schemas/api_get_order_group_response.md"
+
+
+ !!! success
+ **Full Response**
+ ``` { .json .copy }
+ {
+ "result": [{
+ "group_id": "0x10000101000203040506",
+ "client_order_id": ["[23042, 54232]"],
+ "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'"
+ }]
+ }
+ ```
+ **Lite Response**
+ ``` { .json .copy }
+ {
+ "r": [{
+ "gi": "0x10000101000203040506",
+ "co": ["[23042, 54232]"],
+ "sa": "'$GRVT_SUB_ACCOUNT_ID'"
+ }]
+ }
+ ```
+
+=== "Errors"
+
+ !!! info "Error Codes"
+ |Code|HttpStatus| Description |
+ |-|-|-|
+ |1000|401|You need to authenticate prior to using this functionality|
+ |1001|403|You are not authorized to access this functionality|
+ |1002|500|Internal Server Error|
+ |1003|400|Request could not be processed due to malformed syntax|
+ |1006|429|You have surpassed the allocated rate limit for your tier|
+ |1008|401|Your IP has not been whitelisted for access|
+ |1004|404|Data Not Found|
+ |3020|400|Sub account ID must be an uint64 integer|
+ |3021|400|Either order ID or client order ID must be supplied|
+
+
+ !!! failure
+ **Full Error Response**
+ ``` { .json .copy }
+ {
+ "request_id":1,
+ "code":1000,
+ "message":"You need to authenticate prior to using this functionality",
+ "status":401
+ }
+ ```
+ **Lite Error Response**
+ ``` { .json .copy }
+ {
+ "ri":1,
+ "c":1000,
+ "m":"You need to authenticate prior to using this functionality",
+ "s":401
+ }
+ ```
+
+=== "Try it out"
+ -8<- "sections/auth_closed.md"
+ === "DEV"
+
+ !!! example "REST Full"
+ ``` { .bash .copy }
+ curl --location 'https://trades.dev.gravitymarkets.io/full/v1/order_group' \
+ --header "Cookie: $GRVT_COOKIE" \
+ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ --data '{
+ "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'"
+ }
+ '
+ ```
+ !!! example "JSONRPC Full"
+ ``` { .bash .copy }
+ wscat -c "wss://trades.dev.gravitymarkets.io/ws/full" \
+ -H "Cookie: $GRVT_COOKIE" \
+ -H "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ -x '
+ {
+ "jsonrpc": "2.0",
+ "method": "v1/order_group",
+ "params": {
+ "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'"
+ },
+ "id": 123
+ }
+ ' -w 360
+ ```
+
+
+ !!! example "REST Lite"
+ ``` { .bash .copy }
+ curl --location 'https://trades.dev.gravitymarkets.io/lite/v1/order_group' \
+ --header "Cookie: $GRVT_COOKIE" \
+ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ --data '{
+ "sa": "'$GRVT_SUB_ACCOUNT_ID'"
+ }
+ '
+ ```
+ !!! example "JSONRPC Lite"
+ ``` { .bash .copy }
+ wscat -c "wss://trades.dev.gravitymarkets.io/ws/lite" \
+ -H "Cookie: $GRVT_COOKIE" \
+ -H "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ -x '
+ {
+ "j": "2.0",
+ "m": "v1/order_group",
+ "p": {
+ "sa": "'$GRVT_SUB_ACCOUNT_ID'"
+ },
+ "i": 123
+ }
+ ' -w 360
+ ```
+
+ === "STAGING"
+
+ !!! example "REST Full"
+ ``` { .bash .copy }
+ curl --location 'https://trades.staging.gravitymarkets.io/full/v1/order_group' \
+ --header "Cookie: $GRVT_COOKIE" \
+ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ --data '{
+ "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'"
+ }
+ '
+ ```
+ !!! example "JSONRPC Full"
+ ``` { .bash .copy }
+ wscat -c "wss://trades.staging.gravitymarkets.io/ws/full" \
+ -H "Cookie: $GRVT_COOKIE" \
+ -H "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ -x '
+ {
+ "jsonrpc": "2.0",
+ "method": "v1/order_group",
+ "params": {
+ "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'"
+ },
+ "id": 123
+ }
+ ' -w 360
+ ```
+
+
+ !!! example "REST Lite"
+ ``` { .bash .copy }
+ curl --location 'https://trades.staging.gravitymarkets.io/lite/v1/order_group' \
+ --header "Cookie: $GRVT_COOKIE" \
+ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ --data '{
+ "sa": "'$GRVT_SUB_ACCOUNT_ID'"
+ }
+ '
+ ```
+ !!! example "JSONRPC Lite"
+ ``` { .bash .copy }
+ wscat -c "wss://trades.staging.gravitymarkets.io/ws/lite" \
+ -H "Cookie: $GRVT_COOKIE" \
+ -H "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ -x '
+ {
+ "j": "2.0",
+ "m": "v1/order_group",
+ "p": {
+ "sa": "'$GRVT_SUB_ACCOUNT_ID'"
+ },
+ "i": 123
+ }
+ ' -w 360
+ ```
+
+ === "TESTNET"
+
+ !!! example "REST Full"
+ ``` { .bash .copy }
+ curl --location 'https://trades.testnet.grvt.io/full/v1/order_group' \
+ --header "Cookie: $GRVT_COOKIE" \
+ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ --data '{
+ "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'"
+ }
+ '
+ ```
+ !!! example "JSONRPC Full"
+ ``` { .bash .copy }
+ wscat -c "wss://trades.testnet.grvt.io/ws/full" \
+ -H "Cookie: $GRVT_COOKIE" \
+ -H "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ -x '
+ {
+ "jsonrpc": "2.0",
+ "method": "v1/order_group",
+ "params": {
+ "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'"
+ },
+ "id": 123
+ }
+ ' -w 360
+ ```
+
+
+ !!! example "REST Lite"
+ ``` { .bash .copy }
+ curl --location 'https://trades.testnet.grvt.io/lite/v1/order_group' \
+ --header "Cookie: $GRVT_COOKIE" \
+ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ --data '{
+ "sa": "'$GRVT_SUB_ACCOUNT_ID'"
+ }
+ '
+ ```
+ !!! example "JSONRPC Lite"
+ ``` { .bash .copy }
+ wscat -c "wss://trades.testnet.grvt.io/ws/lite" \
+ -H "Cookie: $GRVT_COOKIE" \
+ -H "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ -x '
+ {
+ "j": "2.0",
+ "m": "v1/order_group",
+ "p": {
+ "sa": "'$GRVT_SUB_ACCOUNT_ID'"
+ },
+ "i": 123
+ }
+ ' -w 360
+ ```
+
+ === "PROD"
+
+ !!! example "REST Full"
+ ``` { .bash .copy }
+ curl --location 'https://trades.grvt.io/full/v1/order_group' \
+ --header "Cookie: $GRVT_COOKIE" \
+ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ --data '{
+ "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'"
+ }
+ '
+ ```
+ !!! example "JSONRPC Full"
+ ``` { .bash .copy }
+ wscat -c "wss://trades.grvt.io/ws/full" \
+ -H "Cookie: $GRVT_COOKIE" \
+ -H "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ -x '
+ {
+ "jsonrpc": "2.0",
+ "method": "v1/order_group",
+ "params": {
+ "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'"
+ },
+ "id": 123
+ }
+ ' -w 360
+ ```
+
+
+ !!! example "REST Lite"
+ ``` { .bash .copy }
+ curl --location 'https://trades.grvt.io/lite/v1/order_group' \
+ --header "Cookie: $GRVT_COOKIE" \
+ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ --data '{
+ "sa": "'$GRVT_SUB_ACCOUNT_ID'"
+ }
+ '
+ ```
+ !!! example "JSONRPC Lite"
+ ``` { .bash .copy }
+ wscat -c "wss://trades.grvt.io/ws/lite" \
+ -H "Cookie: $GRVT_COOKIE" \
+ -H "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ -x '
+ {
+ "j": "2.0",
+ "m": "v1/order_group",
+ "p": {
+ "sa": "'$GRVT_SUB_ACCOUNT_ID'"
+ },
+ "i": 123
+ }
+ ' -w 360
+ ```
+
+
## Execution
### Fill History
```
diff --git a/artifacts/apidocs/trading_streams.md b/artifacts/apidocs/trading_streams.md
index 82a6364..fe2d52d 100644
--- a/artifacts/apidocs/trading_streams.md
+++ b/artifacts/apidocs/trading_streams.md
@@ -1861,6 +1861,601 @@ STREAM: v1.cancel
```
+### Order Group
+```
+STREAM: v1.group
+```
+
+=== "Feed Selector"
+
+ -8<- "docs/schemas/ws_order_group_feed_selector_v1.md"
+ ??? info "JSONRPC Wrappers"
+ -8<- "docs/schemas/jsonrpc_request.md"
+ -8<- "docs/schemas/jsonrpc_response.md"
+ -8<- "docs/schemas/ws_subscribe_params.md"
+ -8<- "docs/schemas/ws_subscribe_result.md"
+ -8<- "docs/schemas/ws_unsubscribe_params.md"
+ -8<- "docs/schemas/ws_unsubscribe_result.md"
+ -8<- "docs/schemas/ws_subscribe_request_v1_legacy.md"
+ -8<- "docs/schemas/ws_subscribe_response_v1_legacy.md"
+
+
+ ???+ question "Subscribe"
+ **Full Subscribe Request**
+ ``` { .json .copy }
+ {
+ "jsonrpc": "2.0",
+ "method": "subscribe",
+ "params": {
+ "stream": "v1.group",
+ "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"]
+ },
+ "id": 123
+ }
+ ```
+ **Full Subscribe Response**
+ ``` { .json .copy }
+ {
+ "jsonrpc": "2.0",
+ "result": {
+ "stream": "v1.group",
+ "subs": ["'$GRVT_SUB_ACCOUNT_ID'"],
+ "unsubs": [],
+ "num_snapshots": [10],
+ "first_sequence_number": [872634876]
+ },
+ "id": 123,
+ "method": "subscribe"
+ }
+ ```
+ ??? question "Unsubscribe"
+ **Full Unsubscribe Request**
+ ``` { .json .copy }
+ {
+ "jsonrpc": "2.0",
+ "method": "unsubscribe",
+ "params": {
+ "stream": "v1.group",
+ "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"]
+ },
+ "id": 123
+ }
+ ```
+ **Full Unsubscribe Response**
+ ``` { .json .copy }
+ {
+ "jsonrpc": "2.0",
+ "result": {
+ "stream": "v1.group",
+ "unsubs": ["'$GRVT_SUB_ACCOUNT_ID'"]
+ },
+ "id": 123,
+ "method": "subscribe"
+ }
+ ```
+ ??? question "Legacy Subscribe"
+ **Full Subscribe Request**
+ ``` { .json .copy }
+ {
+ "request_id":1,
+ "stream":"v1.group",
+ "feed":["'$GRVT_SUB_ACCOUNT_ID'"],
+ "method":"subscribe",
+ "is_full":true
+ }
+ ```
+ **Full Subscribe Response**
+ ``` { .json .copy }
+ {
+ "request_id":1,
+ "stream":"v1.group",
+ "subs":["'$GRVT_SUB_ACCOUNT_ID'"],
+ "unsubs":[],
+ "num_snapshots":[1],
+ "first_sequence_number":[2813]
+ }
+ ```
+
+=== "Feed Data"
+
+ -8<- "docs/schemas/ws_order_group_feed_data_v1.md"
+
+
+ !!! success
+ **Full Feed Response**
+ ``` { .json .copy }
+ {
+ "stream": "v1.group",
+ "selector": "'$GRVT_SUB_ACCOUNT_ID'",
+ "sequence_number": "872634876",
+ "feed": {
+ "group_id": "0x10000101000203040506",
+ "client_order_id": ["[23042, 54232]"],
+ "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'"
+ }
+ }
+ ```
+ **Lite Feed Response**
+ ``` { .json .copy }
+ {
+ "s": "v1.group",
+ "s1": "'$GRVT_SUB_ACCOUNT_ID'",
+ "sn": "872634876",
+ "f": {
+ "gi": "0x10000101000203040506",
+ "co": ["[23042, 54232]"],
+ "sa": "'$GRVT_SUB_ACCOUNT_ID'"
+ }
+ }
+ ```
+
+=== "Errors"
+
+ !!! info "Error Codes"
+ |Code|HttpStatus| Description |
+ |-|-|-|
+ |1000|401|You need to authenticate prior to using this functionality|
+ |1001|403|You are not authorized to access this functionality|
+ |1002|500|Internal Server Error|
+ |1008|401|Your IP has not been whitelisted for access|
+ |1101|400|Feed Format must be in the format of @|
+ |1102|400|Wrong number of primary selectors|
+ |1103|400|Wrong number of secondary selectors|
+ |1103|400|Wrong number of secondary selectors|
+ |3000|400|Instrument is invalid|
+ |3020|400|Sub account ID must be an uint64 integer|
+ -8<- "docs/schemas/jsonrpc_response.md"
+
+
+ !!! failure "Error"
+ **Full Error Response**
+ ``` { .json .copy }
+ {
+ "jsonrpc": "2.0",
+ "error": {
+ "code": 1000,
+ "message": "You need to authenticate prior to using this functionality"
+ },
+ "id": 123,
+ "method": "subscribe"
+ }
+ ```
+ **Lite Error Response**
+ ``` { .json .copy }
+ {
+ "j": "2.0",
+ "e": {
+ "c": 1000,
+ "m": "You need to authenticate prior to using this functionality"
+ },
+ "i": 123,
+ "m": "subscribe"
+ }
+ ```
+ **Legacy Error Response**
+ ``` { .json .copy }
+ {
+ "code":1000,
+ "message":"You need to authenticate prior to using this functionality",
+ "status":401
+ }
+ ```
+
+=== "Try it out"
+ -8<- "sections/auth_closed.md"
+ === "DEV"
+
+ !!! example "Subscribe Full"
+ ``` { .bash .copy }
+ wscat -c "wss://trades.dev.gravitymarkets.io/ws/full" \
+ -H "Cookie: $GRVT_COOKIE" \
+ -H "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ -x '
+ {
+ "jsonrpc": "2.0",
+ "method": "subscribe",
+ "params": {
+ "stream": "v1.group",
+ "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"]
+ },
+ "id": 123
+ }
+ ' -w 360
+ ```
+ !!! example "Unsubscribe Full"
+ ``` { .bash .copy }
+ wscat -c "wss://trades.dev.gravitymarkets.io/ws/full" \
+ -H "Cookie: $GRVT_COOKIE" \
+ -H "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ -x '
+ {
+ "jsonrpc": "2.0",
+ "method": "unsubscribe",
+ "params": {
+ "stream": "v1.group",
+ "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"]
+ },
+ "id": 123
+ }
+ ' -w 360
+ ```
+ !!! example "Legacy Subscribe Full"
+ ``` { .bash .copy }
+ wscat -c "wss://trades.dev.gravitymarkets.io/ws" \
+ -H "Cookie: $GRVT_COOKIE" \
+ -H "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ -x '
+ {
+ "request_id":1,
+ "stream":"v1.group",
+ "feed":["'$GRVT_SUB_ACCOUNT_ID'"],
+ "method":"subscribe",
+ "is_full":true
+ }
+ ' -w 360
+ ```
+
+
+ !!! example "Subscribe Lite"
+ ``` { .bash .copy }
+ wscat -c "wss://trades.dev.gravitymarkets.io/ws/lite" \
+ -H "Cookie: $GRVT_COOKIE" \
+ -H "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ -x '
+ {
+ "j": "2.0",
+ "m": "subscribe",
+ "p": {
+ "s": "v1.group",
+ "s1": ["'$GRVT_SUB_ACCOUNT_ID'"]
+ },
+ "i": 123
+ }
+ ' -w 360
+ ```
+ !!! example "Unsubscribe Lite"
+ ``` { .bash .copy }
+ wscat -c "wss://trades.dev.gravitymarkets.io/ws/lite" \
+ -H "Cookie: $GRVT_COOKIE" \
+ -H "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ -x '
+ {
+ "j": "2.0",
+ "m": "unsubscribe",
+ "p": {
+ "s": "v1.group",
+ "s1": ["'$GRVT_SUB_ACCOUNT_ID'"]
+ },
+ "i": 123
+ }
+ ' -w 360
+ ```
+ !!! example "Legacy Subscribe Lite"
+ ``` { .bash .copy }
+ wscat -c "wss://trades.dev.gravitymarkets.io/ws" \
+ -H "Cookie: $GRVT_COOKIE" \
+ -H "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ -x '
+ {
+ "request_id":1,
+ "stream":"v1.group",
+ "feed":["'$GRVT_SUB_ACCOUNT_ID'"],
+ "method":"subscribe",
+ "is_full":false
+ }
+ ' -w 360
+ ```
+
+ === "STAGING"
+
+ !!! example "Subscribe Full"
+ ``` { .bash .copy }
+ wscat -c "wss://trades.staging.gravitymarkets.io/ws/full" \
+ -H "Cookie: $GRVT_COOKIE" \
+ -H "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ -x '
+ {
+ "jsonrpc": "2.0",
+ "method": "subscribe",
+ "params": {
+ "stream": "v1.group",
+ "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"]
+ },
+ "id": 123
+ }
+ ' -w 360
+ ```
+ !!! example "Unsubscribe Full"
+ ``` { .bash .copy }
+ wscat -c "wss://trades.staging.gravitymarkets.io/ws/full" \
+ -H "Cookie: $GRVT_COOKIE" \
+ -H "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ -x '
+ {
+ "jsonrpc": "2.0",
+ "method": "unsubscribe",
+ "params": {
+ "stream": "v1.group",
+ "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"]
+ },
+ "id": 123
+ }
+ ' -w 360
+ ```
+ !!! example "Legacy Subscribe Full"
+ ``` { .bash .copy }
+ wscat -c "wss://trades.staging.gravitymarkets.io/ws" \
+ -H "Cookie: $GRVT_COOKIE" \
+ -H "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ -x '
+ {
+ "request_id":1,
+ "stream":"v1.group",
+ "feed":["'$GRVT_SUB_ACCOUNT_ID'"],
+ "method":"subscribe",
+ "is_full":true
+ }
+ ' -w 360
+ ```
+
+
+ !!! example "Subscribe Lite"
+ ``` { .bash .copy }
+ wscat -c "wss://trades.staging.gravitymarkets.io/ws/lite" \
+ -H "Cookie: $GRVT_COOKIE" \
+ -H "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ -x '
+ {
+ "j": "2.0",
+ "m": "subscribe",
+ "p": {
+ "s": "v1.group",
+ "s1": ["'$GRVT_SUB_ACCOUNT_ID'"]
+ },
+ "i": 123
+ }
+ ' -w 360
+ ```
+ !!! example "Unsubscribe Lite"
+ ``` { .bash .copy }
+ wscat -c "wss://trades.staging.gravitymarkets.io/ws/lite" \
+ -H "Cookie: $GRVT_COOKIE" \
+ -H "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ -x '
+ {
+ "j": "2.0",
+ "m": "unsubscribe",
+ "p": {
+ "s": "v1.group",
+ "s1": ["'$GRVT_SUB_ACCOUNT_ID'"]
+ },
+ "i": 123
+ }
+ ' -w 360
+ ```
+ !!! example "Legacy Subscribe Lite"
+ ``` { .bash .copy }
+ wscat -c "wss://trades.staging.gravitymarkets.io/ws" \
+ -H "Cookie: $GRVT_COOKIE" \
+ -H "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ -x '
+ {
+ "request_id":1,
+ "stream":"v1.group",
+ "feed":["'$GRVT_SUB_ACCOUNT_ID'"],
+ "method":"subscribe",
+ "is_full":false
+ }
+ ' -w 360
+ ```
+
+ === "TESTNET"
+
+ !!! example "Subscribe Full"
+ ``` { .bash .copy }
+ wscat -c "wss://trades.testnet.grvt.io/ws/full" \
+ -H "Cookie: $GRVT_COOKIE" \
+ -H "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ -x '
+ {
+ "jsonrpc": "2.0",
+ "method": "subscribe",
+ "params": {
+ "stream": "v1.group",
+ "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"]
+ },
+ "id": 123
+ }
+ ' -w 360
+ ```
+ !!! example "Unsubscribe Full"
+ ``` { .bash .copy }
+ wscat -c "wss://trades.testnet.grvt.io/ws/full" \
+ -H "Cookie: $GRVT_COOKIE" \
+ -H "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ -x '
+ {
+ "jsonrpc": "2.0",
+ "method": "unsubscribe",
+ "params": {
+ "stream": "v1.group",
+ "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"]
+ },
+ "id": 123
+ }
+ ' -w 360
+ ```
+ !!! example "Legacy Subscribe Full"
+ ``` { .bash .copy }
+ wscat -c "wss://trades.testnet.grvt.io/ws" \
+ -H "Cookie: $GRVT_COOKIE" \
+ -H "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ -x '
+ {
+ "request_id":1,
+ "stream":"v1.group",
+ "feed":["'$GRVT_SUB_ACCOUNT_ID'"],
+ "method":"subscribe",
+ "is_full":true
+ }
+ ' -w 360
+ ```
+
+
+ !!! example "Subscribe Lite"
+ ``` { .bash .copy }
+ wscat -c "wss://trades.testnet.grvt.io/ws/lite" \
+ -H "Cookie: $GRVT_COOKIE" \
+ -H "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ -x '
+ {
+ "j": "2.0",
+ "m": "subscribe",
+ "p": {
+ "s": "v1.group",
+ "s1": ["'$GRVT_SUB_ACCOUNT_ID'"]
+ },
+ "i": 123
+ }
+ ' -w 360
+ ```
+ !!! example "Unsubscribe Lite"
+ ``` { .bash .copy }
+ wscat -c "wss://trades.testnet.grvt.io/ws/lite" \
+ -H "Cookie: $GRVT_COOKIE" \
+ -H "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ -x '
+ {
+ "j": "2.0",
+ "m": "unsubscribe",
+ "p": {
+ "s": "v1.group",
+ "s1": ["'$GRVT_SUB_ACCOUNT_ID'"]
+ },
+ "i": 123
+ }
+ ' -w 360
+ ```
+ !!! example "Legacy Subscribe Lite"
+ ``` { .bash .copy }
+ wscat -c "wss://trades.testnet.grvt.io/ws" \
+ -H "Cookie: $GRVT_COOKIE" \
+ -H "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ -x '
+ {
+ "request_id":1,
+ "stream":"v1.group",
+ "feed":["'$GRVT_SUB_ACCOUNT_ID'"],
+ "method":"subscribe",
+ "is_full":false
+ }
+ ' -w 360
+ ```
+
+ === "PROD"
+
+ !!! example "Subscribe Full"
+ ``` { .bash .copy }
+ wscat -c "wss://trades.grvt.io/ws/full" \
+ -H "Cookie: $GRVT_COOKIE" \
+ -H "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ -x '
+ {
+ "jsonrpc": "2.0",
+ "method": "subscribe",
+ "params": {
+ "stream": "v1.group",
+ "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"]
+ },
+ "id": 123
+ }
+ ' -w 360
+ ```
+ !!! example "Unsubscribe Full"
+ ``` { .bash .copy }
+ wscat -c "wss://trades.grvt.io/ws/full" \
+ -H "Cookie: $GRVT_COOKIE" \
+ -H "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ -x '
+ {
+ "jsonrpc": "2.0",
+ "method": "unsubscribe",
+ "params": {
+ "stream": "v1.group",
+ "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"]
+ },
+ "id": 123
+ }
+ ' -w 360
+ ```
+ !!! example "Legacy Subscribe Full"
+ ``` { .bash .copy }
+ wscat -c "wss://trades.grvt.io/ws" \
+ -H "Cookie: $GRVT_COOKIE" \
+ -H "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ -x '
+ {
+ "request_id":1,
+ "stream":"v1.group",
+ "feed":["'$GRVT_SUB_ACCOUNT_ID'"],
+ "method":"subscribe",
+ "is_full":true
+ }
+ ' -w 360
+ ```
+
+
+ !!! example "Subscribe Lite"
+ ``` { .bash .copy }
+ wscat -c "wss://trades.grvt.io/ws/lite" \
+ -H "Cookie: $GRVT_COOKIE" \
+ -H "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ -x '
+ {
+ "j": "2.0",
+ "m": "subscribe",
+ "p": {
+ "s": "v1.group",
+ "s1": ["'$GRVT_SUB_ACCOUNT_ID'"]
+ },
+ "i": 123
+ }
+ ' -w 360
+ ```
+ !!! example "Unsubscribe Lite"
+ ``` { .bash .copy }
+ wscat -c "wss://trades.grvt.io/ws/lite" \
+ -H "Cookie: $GRVT_COOKIE" \
+ -H "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ -x '
+ {
+ "j": "2.0",
+ "m": "unsubscribe",
+ "p": {
+ "s": "v1.group",
+ "s1": ["'$GRVT_SUB_ACCOUNT_ID'"]
+ },
+ "i": 123
+ }
+ ' -w 360
+ ```
+ !!! example "Legacy Subscribe Lite"
+ ``` { .bash .copy }
+ wscat -c "wss://trades.grvt.io/ws" \
+ -H "Cookie: $GRVT_COOKIE" \
+ -H "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
+ -x '
+ {
+ "request_id":1,
+ "stream":"v1.group",
+ "feed":["'$GRVT_SUB_ACCOUNT_ID'"],
+ "method":"subscribe",
+ "is_full":false
+ }
+ ' -w 360
+ ```
+
+
## Execution
### Fill
```
diff --git a/artifacts/pysdk/grvt_raw_async.py b/artifacts/pysdk/grvt_raw_async.py
index 69791af..c9e3194 100644
--- a/artifacts/pysdk/grvt_raw_async.py
+++ b/artifacts/pysdk/grvt_raw_async.py
@@ -152,24 +152,6 @@ async def pre_order_check_v1(
return GrvtError(**resp)
return from_dict(types.ApiPreOrderCheckResponse, resp, Config(cast=[Enum]))
- async def cancel_trigger_order_v1(
- self, req: types.ApiCancelOrderRequest
- ) -> types.AckResponse | GrvtError:
- resp = await self._post(True, self.td_rpc + "/full/v1/cancel_trigger_order", req)
- if resp.get("code"):
- return GrvtError(**resp)
- return from_dict(types.AckResponse, resp, Config(cast=[Enum]))
-
- async def cancel_all_trigger_orders_v1(
- self, req: types.ApiCancelAllOrdersRequest
- ) -> types.AckResponse | GrvtError:
- resp = await self._post(
- True, self.td_rpc + "/full/v1/cancel_all_trigger_orders", req
- )
- if resp.get("code"):
- return GrvtError(**resp)
- return from_dict(types.AckResponse, resp, Config(cast=[Enum]))
-
async def dedust_position_v1(
self, req: types.ApiDedustPositionRequest
) -> types.ApiDedustPositionResponse | GrvtError:
@@ -186,6 +168,22 @@ async def cancel_on_disconnect_v1(
return GrvtError(**resp)
return from_dict(types.AckResponse, resp, Config(cast=[Enum]))
+ async def create_bulk_orders_v1(
+ self, req: types.ApiCreateBulkOrdersRequest
+ ) -> types.ApiCreateBulkOrdersResponse | GrvtError:
+ resp = await self._post(True, self.td_rpc + "/full/v1/create_bulk_orders", req)
+ if resp.get("code"):
+ return GrvtError(**resp)
+ return from_dict(types.ApiCreateBulkOrdersResponse, resp, Config(cast=[Enum]))
+
+ async def get_order_group_v1(
+ self, req: types.ApiGetOrderGroupRequest
+ ) -> types.ApiGetOrderGroupResponse | GrvtError:
+ resp = await self._post(True, self.td_rpc + "/full/v1/order_group", req)
+ if resp.get("code"):
+ return GrvtError(**resp)
+ return from_dict(types.ApiGetOrderGroupResponse, resp, Config(cast=[Enum]))
+
async def fill_history_v1(
self, req: types.ApiFillHistoryRequest
) -> types.ApiFillHistoryResponse | GrvtError:
diff --git a/artifacts/pysdk/grvt_raw_sync.py b/artifacts/pysdk/grvt_raw_sync.py
index a5d918d..60b090d 100644
--- a/artifacts/pysdk/grvt_raw_sync.py
+++ b/artifacts/pysdk/grvt_raw_sync.py
@@ -150,22 +150,6 @@ def pre_order_check_v1(
return GrvtError(**resp)
return from_dict(types.ApiPreOrderCheckResponse, resp, Config(cast=[Enum]))
- def cancel_trigger_order_v1(
- self, req: types.ApiCancelOrderRequest
- ) -> types.AckResponse | GrvtError:
- resp = self._post(True, self.td_rpc + "/full/v1/cancel_trigger_order", req)
- if resp.get("code"):
- return GrvtError(**resp)
- return from_dict(types.AckResponse, resp, Config(cast=[Enum]))
-
- def cancel_all_trigger_orders_v1(
- self, req: types.ApiCancelAllOrdersRequest
- ) -> types.AckResponse | GrvtError:
- resp = self._post(True, self.td_rpc + "/full/v1/cancel_all_trigger_orders", req)
- if resp.get("code"):
- return GrvtError(**resp)
- return from_dict(types.AckResponse, resp, Config(cast=[Enum]))
-
def dedust_position_v1(
self, req: types.ApiDedustPositionRequest
) -> types.ApiDedustPositionResponse | GrvtError:
@@ -182,6 +166,22 @@ def cancel_on_disconnect_v1(
return GrvtError(**resp)
return from_dict(types.AckResponse, resp, Config(cast=[Enum]))
+ def create_bulk_orders_v1(
+ self, req: types.ApiCreateBulkOrdersRequest
+ ) -> types.ApiCreateBulkOrdersResponse | GrvtError:
+ resp = self._post(True, self.td_rpc + "/full/v1/create_bulk_orders", req)
+ if resp.get("code"):
+ return GrvtError(**resp)
+ return from_dict(types.ApiCreateBulkOrdersResponse, resp, Config(cast=[Enum]))
+
+ def get_order_group_v1(
+ self, req: types.ApiGetOrderGroupRequest
+ ) -> types.ApiGetOrderGroupResponse | GrvtError:
+ resp = self._post(True, self.td_rpc + "/full/v1/order_group", req)
+ if resp.get("code"):
+ return GrvtError(**resp)
+ return from_dict(types.ApiGetOrderGroupResponse, resp, Config(cast=[Enum]))
+
def fill_history_v1(
self, req: types.ApiFillHistoryRequest
) -> types.ApiFillHistoryResponse | GrvtError:
diff --git a/artifacts/pysdk/grvt_raw_types.py b/artifacts/pysdk/grvt_raw_types.py
index 249ad17..1db1711 100644
--- a/artifacts/pysdk/grvt_raw_types.py
+++ b/artifacts/pysdk/grvt_raw_types.py
@@ -27,6 +27,8 @@ class BrokerTag(Enum):
class CancelStatus(Enum):
# Cancellation has expired because corresponding order had not arrived within the defined time-to-live window.
EXPIRED = "EXPIRED"
+ # This cancellation request was dropped because its TTL window overlaps with another cancellation request for the same order.
+ DROPPED_DUPLICATE = "DROPPED_DUPLICATE"
class CandlestickInterval(Enum):
@@ -156,6 +158,8 @@ class Currency(Enum):
PENDLE = "PENDLE"
# the UXLINK token
UXLINK = "UXLINK"
+ # the KAITO token
+ KAITO = "KAITO"
class EpochBadgeType(Enum):
@@ -277,6 +281,8 @@ class OrderRejectReason(Enum):
MARKET_ORDER_WITH_LIMIT_PRICE = "MARKET_ORDER_WITH_LIMIT_PRICE"
# client cancel on disconnect triggered
CLIENT_CANCEL_ON_DISCONNECT_TRIGGERED = "CLIENT_CANCEL_ON_DISCONNECT_TRIGGERED"
+ # the OCO counter part order was triggered
+ OCO_COUNTER_PART_TRIGGERED = "OCO_COUNTER_PART_TRIGGERED"
class OrderStatus(Enum):
@@ -1811,7 +1817,7 @@ class ApiCancelOrderRequest:
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 matching engine state at request time will be searched.
+ Value of `'0'` or omission results in the default time-to-live value being applied.
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.
"""
@@ -2009,6 +2015,30 @@ class ApiDedustPositionResponse:
result: Order
+@dataclass
+class ApiCreateBulkOrdersRequest:
+ """
+ Create multiple orders simultaneously for this trading account.
+
+ This endpoint supports the following order scenarios:
+ - One-Cancels-Other (OCO) orders combining TP/SL
+ - One-Sends-Other (OSO) orders
+
+ Usage:
+ - For OCO (TP/SL pair): Send exactly 2 orders in the same request - one Take Profit and one Stop Loss order
+ - For OSO: Send exactly one main order and one contingent order (TP and/or SL)
+ """
+
+ # The orders to create
+ orders: list[Order]
+
+
+@dataclass
+class ApiCreateBulkOrdersResponse:
+ # The created orders in same order as requested
+ result: list[Order]
+
+
@dataclass
class ApiCancelOnDisconnectRequest:
"""
@@ -2039,6 +2069,45 @@ class ApiCancelOnDisconnectRequest:
countdown_time: str | None = None
+@dataclass
+class ApiGetOrderGroupRequest:
+ """
+ Retrieves the grouping of non-cancelled, non-filled client orders for a given subaccount when the grouping exist.
+
+ helping to identify TP/SL pairs or other order relationships within the account.
+ """
+
+ # The subaccount ID for which the order groups should be retrieved.
+ sub_account_id: str
+
+
+@dataclass
+class ClientOrderIDsByGroup:
+ """
+ Grouping for the client order id and their associated groups.
+
+ This is used to define TP/SL pairs or other order groupings after loading the list of Open Orders.
+ """
+
+ # The group this order belongs to. It can be used to define TP/SL pairs or other order groupings
+ group_id: str
+ # List of client order IDs in the group
+ client_order_id: list[str]
+ # The sub account ID that these orders belong to
+ sub_account_id: str
+
+
+@dataclass
+class ApiGetOrderGroupResponse:
+ """
+ A list of client orders grouped by their associated order group.
+ Each entry in the list contains a `groupID` and the corresponding `clientOrderID`s
+ that belong to that group.
+ """
+
+ result: list[ClientOrderIDsByGroup]
+
+
@dataclass
class ApiGetUserEcosystemPointRequest:
# The off chain account id
@@ -2073,6 +2142,8 @@ class EcosystemPoint:
calculate_to: str
# The rank of the account in the ecosystem
rank: int
+ # The epoch number of the ecosystem point
+ epoch: int
@dataclass
@@ -2189,6 +2260,42 @@ class ApiFindEcosystemLeaderboardResponse:
users: list[EcosystemLeaderboardUser]
+@dataclass
+class QueryFindEpochRequest:
+ # The time to query the epoch
+ time: str | None = None
+ # The epoch number
+ epoch: int | None = None
+
+
+@dataclass
+class Epoch:
+ # The epoch number
+ epoch: int
+ # The start time of the epoch
+ start_time: str
+ # The end time of the epoch
+ end_time: str
+
+
+@dataclass
+class QueryFindEpochResponse:
+ # The epoch
+ epoch: Epoch
+
+
+@dataclass
+class QueryGetListEpochRequest:
+ # The limit to query for
+ limit: int | None = None
+
+
+@dataclass
+class QueryGetListEpochResponse:
+ # The list of epochs
+ result: list[Epoch]
+
+
@dataclass
class QueryEpochBadgeRequest:
# The off chain account id to get referral stats
@@ -2527,6 +2634,8 @@ class ApiSubAccountTradeAggregationRequest:
is_maker: bool
# Filter on the taker of the trade
is_taker: bool
+ # Whether to group trades by signer per sub account
+ group_by_signer: bool
# Optional. Start time in unix nanoseconds
start_time: str | None = None
# Optional. End time in unix nanoseconds
@@ -2547,6 +2656,8 @@ class SubAccountTradeAggregation:
num_traded: str
# Total positive fee paid by user
positive_fee: str
+ # The signer of the trade
+ signer: str
@dataclass
@@ -2901,6 +3012,31 @@ class WSCancelFeedSelectorV1:
sub_account_id: str
+@dataclass
+class WSOrderGroupFeedSelectorV1:
+ """
+ Subscribes to a feed of order group to get updated when a new group is created for the subAccount specified.
+
+ """
+
+ # The subaccount ID to filter by
+ sub_account_id: str
+
+
+@dataclass
+class WSOrderGroupFeedDataV1:
+ # Stream name
+ stream: str
+ # Primary selector
+ selector: str
+ # A running sequence number that determines global message order within the specific stream
+ sequence_number: str
+ # The order object being created or updated
+ feed: ClientOrderIDsByGroup
+ # The previous sequence number that determines global message order within the specific stream
+ prev_sequence_number: str
+
+
@dataclass
class ApiWithdrawalRequest:
"""
diff --git a/src/codegen/apispec.json b/src/codegen/apispec.json
index c8001e5..2e3f1f6 100644
--- a/src/codegen/apispec.json
+++ b/src/codegen/apispec.json
@@ -1214,13 +1214,13 @@
]
},
{
- "namespace": "Order",
- "name": "RPCCancelTriggerOrderV1",
+ "namespace": "Position",
+ "name": "RPCDedustPositionV1",
"version": 1,
- "route": "/cancel_trigger_order",
+ "route": "/dedust_position",
"auth_required": true,
- "request": "ApiCancelOrderRequest",
- "response": "AckResponse",
+ "request": "ApiDedustPositionRequest",
+ "response": "ApiDedustPositionResponse",
"on_request_errors": [
{
"code": 1000,
@@ -1242,6 +1242,16 @@
"message": "Request could not be processed due to malformed syntax",
"status": 400
},
+ {
+ "code": 1004,
+ "message": "Data Not Found",
+ "status": 404
+ },
+ {
+ "code": 1005,
+ "message": "Unknown Error",
+ "status": 500
+ },
{
"code": 1006,
"message": "You have surpassed the allocated rate limit for your tier",
@@ -1253,19 +1263,194 @@
"status": 401
},
{
- "code": 3021,
- "message": "Either order ID or client order ID must be supplied",
+ "code": 1400,
+ "message": "Signer does not have trade permission",
+ "status": 403
+ },
+ {
+ "code": 1009,
+ "message": "We are temporarily deactivating this API endpoint, please try again later",
+ "status": 503
+ },
+ {
+ "code": 2000,
+ "message": "Order signature is from an unauthorized signer",
+ "status": 403
+ },
+ {
+ "code": 2001,
+ "message": "Order signature has expired",
+ "status": 403
+ },
+ {
+ "code": 2002,
+ "message": "Order signature does not match payload",
+ "status": 403
+ },
+ {
+ "code": 2003,
+ "message": "Order sub account does not match logged in user",
+ "status": 403
+ },
+ {
+ "code": 2004,
+ "message": "Order signature is from an expired session key",
+ "status": 403
+ },
+ {
+ "code": 2010,
+ "message": "Order ID should be empty when creating an order",
+ "status": 400
+ },
+ {
+ "code": 2011,
+ "message": "Client Order ID should be supplied when creating an order",
+ "status": 400
+ },
+ {
+ "code": 2012,
+ "message": "Client Order ID overlaps with existing active order",
+ "status": 400
+ },
+ {
+ "code": 2030,
+ "message": "Orderbook Orders must have a TimeInForce of GTT/IOC/FOK",
+ "status": 400
+ },
+ {
+ "code": 2031,
+ "message": "RFQ Orders must have a TimeInForce of GTT/AON/IOC/FOK",
+ "status": 400
+ },
+ {
+ "code": 2032,
+ "message": "Post Only can only be set to true for GTT/AON orders",
+ "status": 400
+ },
+ {
+ "code": 2020,
+ "message": "Market Order must always be supplied without a limit price",
+ "status": 400
+ },
+ {
+ "code": 2021,
+ "message": "Limit Order must always be supplied with a limit price",
+ "status": 400
+ },
+ {
+ "code": 2040,
+ "message": "Order must contain at least one leg",
+ "status": 400
+ },
+ {
+ "code": 2041,
+ "message": "Order Legs must be sorted by Derivative.Instrument/Underlying/BaseCurrency/Expiration/StrikePrice",
+ "status": 400
+ },
+ {
+ "code": 2042,
+ "message": "Orderbook Orders must contain only one leg",
+ "status": 400
+ },
+ {
+ "code": 2050,
+ "message": "Order state must be empty upon creation",
+ "status": 400
+ },
+ {
+ "code": 2051,
+ "message": "Order execution metadata must be empty upon creation",
+ "status": 400
+ },
+ {
+ "code": 2060,
+ "message": "Order Legs contain one or more inactive derivative",
"status": 400
+ },
+ {
+ "code": 2061,
+ "message": "Unsupported Instrument Requested",
+ "status": 400
+ },
+ {
+ "code": 2063,
+ "message": "Order size smaller than min block size in block trade venue",
+ "status": 400
+ },
+ {
+ "code": 2064,
+ "message": "Invalid limit price tick",
+ "status": 400
+ },
+ {
+ "code": 2200,
+ "message": "Order size should exactly tally to the dust portion (i.e., smaller than minimum size) of a position",
+ "status": 400
+ },
+ {
+ "code": 2201,
+ "message": "Order level should match or beat mark price",
+ "status": 400
+ },
+ {
+ "code": 2202,
+ "message": "Cannot dedust position via a market order",
+ "status": 400
+ },
+ {
+ "code": 2203,
+ "message": "Cannot dedust position via a post-only order",
+ "status": 400
+ },
+ {
+ "code": 2204,
+ "message": "Can only dedust position via a fill-or-kill order",
+ "status": 400
+ },
+ {
+ "code": 2205,
+ "message": "Can only dedust position via a reduce-only order",
+ "status": 400
+ },
+ {
+ "code": 2206,
+ "message": "Attempting to trade the wrong buy/sell direction for dedusting position",
+ "status": 400
+ },
+ {
+ "code": 2070,
+ "message": "Liquidation Order is not supported",
+ "status": 400
+ },
+ {
+ "code": 2080,
+ "message": "Insufficient margin to create order",
+ "status": 400
+ },
+ {
+ "code": 2081,
+ "message": "Order Fill would result in exceeding maximum position size",
+ "status": 400
+ },
+ {
+ "code": 2082,
+ "message": "Pre-order check failed",
+ "status": 400
+ },
+ {
+ "code": 2090,
+ "message": "Max open orders exceeded",
+ "status": 429
}
]
},
{
"namespace": "Order",
- "name": "RPCCancelAllTriggerOrdersV1",
+ "name": "RPCCancelOnDisconnectV1",
"version": 1,
- "route": "/cancel_all_trigger_orders",
+ "route": "/cancel_on_disconnect",
"auth_required": true,
- "request": "ApiCancelAllOrdersRequest",
+ "request": "ApiCancelOnDisconnectRequest",
"response": "AckResponse",
"on_request_errors": [
{
@@ -1297,17 +1482,22 @@
"code": 1008,
"message": "Your IP has not been whitelisted for access",
"status": 401
+ },
+ {
+ "code": 6000,
+ "message": "Countdown time is bigger than 300s supported",
+ "status": 400
}
]
},
{
- "namespace": "Position",
- "name": "RPCDedustPositionV1",
+ "namespace": "Order",
+ "name": "RPCCreateBulkOrdersV1",
"version": 1,
- "route": "/dedust_position",
+ "route": "/create_bulk_orders",
"auth_required": true,
- "request": "ApiDedustPositionRequest",
- "response": "ApiDedustPositionResponse",
+ "request": "ApiCreateBulkOrdersRequest",
+ "response": "ApiCreateBulkOrdersResponse",
"on_request_errors": [
{
"code": 1000,
@@ -1384,6 +1574,21 @@
"message": "Order signature is from an expired session key",
"status": 403
},
+ {
+ "code": 2006,
+ "message": "Order signature R/S must have exactly 64 characters long without 0x prefix",
+ "status": 403
+ },
+ {
+ "code": 2005,
+ "message": "Order signature V must be 27/28",
+ "status": 403
+ },
+ {
+ "code": 2007,
+ "message": "Order signature S must be in the lower half of the curve",
+ "status": 403
+ },
{
"code": 2010,
"message": "Order ID should be empty when creating an order",
@@ -1459,6 +1664,11 @@
"message": "Unsupported Instrument Requested",
"status": 400
},
+ {
+ "code": 2062,
+ "message": "Order size smaller than min size",
+ "status": 400
+ },
{
"code": 2063,
"message": "Order size smaller than min block size in block trade venue",
@@ -1470,75 +1680,85 @@
"status": 400
},
{
- "code": 2200,
- "message": "Order size should exactly tally to the dust portion (i.e., smaller than minimum size) of a position",
+ "code": 2065,
+ "message": "Order size too granular",
"status": 400
},
{
- "code": 2201,
- "message": "Order level should match or beat mark price",
+ "code": 2070,
+ "message": "Liquidation Order is not supported",
"status": 400
},
{
- "code": 2202,
- "message": "Cannot dedust position via a market order",
+ "code": 2080,
+ "message": "Insufficient margin to create order",
"status": 400
},
{
- "code": 2203,
- "message": "Cannot dedust position via a post-only order",
+ "code": 2081,
+ "message": "Order Fill would result in exceeding maximum position size",
"status": 400
},
{
- "code": 2204,
- "message": "Can only dedust position via a fill-or-kill order",
+ "code": 2082,
+ "message": "Pre-order check failed",
"status": 400
},
{
- "code": 2205,
- "message": "Can only dedust position via a reduce-only order",
+ "code": 2083,
+ "message": "Order Fill would result in exceeding maximum position size under current configurable leverage tier",
"status": 400
},
{
- "code": 2206,
- "message": "Attempting to trade the wrong buy/sell direction for dedusting position",
+ "code": 2090,
+ "message": "Max open orders exceeded",
+ "status": 429
+ },
+ {
+ "code": 2110,
+ "message": "Invalid trigger by",
"status": 400
},
{
- "code": 2070,
- "message": "Liquidation Order is not supported",
+ "code": 2111,
+ "message": "Unsupported trigger by",
"status": 400
},
{
- "code": 2080,
- "message": "Insufficient margin to create order",
+ "code": 2112,
+ "message": "Invalid trigger order",
"status": 400
},
{
- "code": 2081,
- "message": "Order Fill would result in exceeding maximum position size",
+ "code": 2220,
+ "message": "No orders provided",
"status": 400
},
{
- "code": 2082,
- "message": "Pre-order check failed",
+ "code": 2221,
+ "message": "Invalid number of orders",
"status": 400
},
{
- "code": 2090,
- "message": "Max open orders exceeded",
- "status": 429
+ "code": 2222,
+ "message": "Order is not a TPSL order",
+ "status": 400
+ },
+ {
+ "code": 2223,
+ "message": "Unsupported bulk order type",
+ "status": 400
}
]
},
{
"namespace": "Order",
- "name": "RPCCancelOnDisconnectV1",
+ "name": "RPCGetOrderGroupV1",
"version": 1,
- "route": "/cancel_on_disconnect",
+ "route": "/order_group",
"auth_required": true,
- "request": "ApiCancelOnDisconnectRequest",
- "response": "AckResponse",
+ "request": "ApiGetOrderGroupRequest",
+ "response": "ApiGetOrderGroupResponse",
"on_request_errors": [
{
"code": 1000,
@@ -1571,8 +1791,18 @@
"status": 401
},
{
- "code": 6000,
- "message": "Countdown time is bigger than 300s supported",
+ "code": 1004,
+ "message": "Data Not Found",
+ "status": 404
+ },
+ {
+ "code": 3020,
+ "message": "Sub account ID must be an uint64 integer",
+ "status": 400
+ },
+ {
+ "code": 3021,
+ "message": "Either order ID or client order ID must be supplied",
"status": 400
}
]
@@ -2405,6 +2635,66 @@
}
]
},
+ {
+ "namespace": "Order",
+ "name": "StreamOrderGroupV1",
+ "channel": "v1.group",
+ "auth_required": true,
+ "feed_selector": "WSOrderGroupFeedSelectorV1",
+ "feed": "WSOrderGroupFeedDataV1",
+ "on_subscribe_errors": [
+ {
+ "code": 1000,
+ "message": "You need to authenticate prior to using this functionality",
+ "status": 401
+ },
+ {
+ "code": 1001,
+ "message": "You are not authorized to access this functionality",
+ "status": 403
+ },
+ {
+ "code": 1002,
+ "message": "Internal Server Error",
+ "status": 500
+ },
+ {
+ "code": 1008,
+ "message": "Your IP has not been whitelisted for access",
+ "status": 401
+ },
+ {
+ "code": 1101,
+ "message": "Feed Format must be in the format of \u003cprimary\u003e@\u003csecondary\u003e",
+ "status": 400
+ },
+ {
+ "code": 1102,
+ "message": "Wrong number of primary selectors",
+ "status": 400
+ },
+ {
+ "code": 1103,
+ "message": "Wrong number of secondary selectors",
+ "status": 400
+ },
+ {
+ "code": 1103,
+ "message": "Wrong number of secondary selectors",
+ "status": 400
+ },
+ {
+ "code": 3000,
+ "message": "Instrument is invalid",
+ "status": 400
+ },
+ {
+ "code": 3020,
+ "message": "Sub account ID must be an uint64 integer",
+ "status": 400
+ }
+ ]
+ },
{
"namespace": "Execution",
"name": "StreamFillV1",
@@ -8303,7 +8593,7 @@
"index": 3,
"array_depth": 0,
"optional": true,
- "default": "'0'",
+ "default": "'100'",
"example": "'500'",
"comment": [
"Specifies the time-to-live (in milliseconds) for this cancellation.",
@@ -8311,7 +8601,7 @@
"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 matching engine state at request time will be searched.",
+ "Value of `'0'` or omission results in the default time-to-live value being applied.",
"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.",
""
]
@@ -9124,6 +9414,54 @@
],
"comment": []
},
+ {
+ "name": "ApiCreateBulkOrdersRequest",
+ "is_root": true,
+ "fields": [
+ {
+ "name": "orders",
+ "lite_name": "o",
+ "semantic_type": "Order",
+ "json_type": "Order",
+ "index": 0,
+ "array_depth": 1,
+ "optional": false,
+ "comment": [
+ "The orders to create"
+ ]
+ }
+ ],
+ "comment": [
+ "Create multiple orders simultaneously for this trading account.",
+ "",
+ "This endpoint supports the following order scenarios:",
+ "- One-Cancels-Other (OCO) orders combining TP/SL",
+ "- One-Sends-Other (OSO) orders",
+ "",
+ "Usage:",
+ "- For OCO (TP/SL pair): Send exactly 2 orders in the same request - one Take Profit and one Stop Loss order",
+ "- For OSO: Send exactly one main order and one contingent order (TP and/or SL)"
+ ]
+ },
+ {
+ "name": "ApiCreateBulkOrdersResponse",
+ "is_root": true,
+ "fields": [
+ {
+ "name": "result",
+ "lite_name": "r",
+ "semantic_type": "Order",
+ "json_type": "Order",
+ "index": 0,
+ "array_depth": 1,
+ "optional": false,
+ "comment": [
+ "The created orders in same order as requested"
+ ]
+ }
+ ],
+ "comment": []
+ },
{
"name": "ApiCancelOnDisconnectRequest",
"is_root": true,
@@ -9176,6 +9514,101 @@
"If the server does not receive a heartbeat message within the countdown time, it will cancel all open orders for the specified Sub Account ID."
]
},
+ {
+ "name": "ApiGetOrderGroupRequest",
+ "is_root": true,
+ "fields": [
+ {
+ "name": "sub_account_id",
+ "lite_name": "sa",
+ "semantic_type": "uint64",
+ "json_type": "string",
+ "index": 0,
+ "array_depth": 0,
+ "optional": false,
+ "example": "'$GRVT_SUB_ACCOUNT_ID'",
+ "comment": [
+ "The subaccount ID for which the order groups should be retrieved."
+ ]
+ }
+ ],
+ "comment": [
+ "Retrieves the grouping of non-cancelled, non-filled client orders for a given subaccount when the grouping exist.",
+ "",
+ "helping to identify TP/SL pairs or other order relationships within the account."
+ ]
+ },
+ {
+ "name": "ClientOrderIDsByGroup",
+ "is_root": true,
+ "fields": [
+ {
+ "name": "group_id",
+ "lite_name": "gi",
+ "semantic_type": "uint128",
+ "json_type": "string",
+ "index": 0,
+ "array_depth": 0,
+ "optional": false,
+ "example": "'0x10000101000203040506'",
+ "comment": [
+ "The group this order belongs to. It can be used to define TP/SL pairs or other order groupings"
+ ]
+ },
+ {
+ "name": "client_order_id",
+ "lite_name": "co",
+ "semantic_type": "uint64",
+ "json_type": "string",
+ "index": 1,
+ "array_depth": 1,
+ "optional": false,
+ "example": "'[23042, 54232]'",
+ "comment": [
+ "List of client order IDs in the group"
+ ]
+ },
+ {
+ "name": "sub_account_id",
+ "lite_name": "sa",
+ "semantic_type": "uint64",
+ "json_type": "string",
+ "index": 2,
+ "array_depth": 0,
+ "optional": false,
+ "example": "'$GRVT_SUB_ACCOUNT_ID'",
+ "comment": [
+ "The sub account ID that these orders belong to"
+ ]
+ }
+ ],
+ "comment": [
+ "Grouping for the client order id and their associated groups.",
+ "",
+ "This is used to define TP/SL pairs or other order groupings after loading the list of Open Orders."
+ ]
+ },
+ {
+ "name": "ApiGetOrderGroupResponse",
+ "is_root": true,
+ "fields": [
+ {
+ "name": "result",
+ "lite_name": "r",
+ "semantic_type": "ClientOrderIDsByGroup",
+ "json_type": "ClientOrderIDsByGroup",
+ "index": 0,
+ "array_depth": 1,
+ "optional": false,
+ "comment": [
+ "A list of client orders grouped by their associated order group.",
+ "Each entry in the list contains a `groupID` and the corresponding `clientOrderID`s",
+ "that belong to that group."
+ ]
+ }
+ ],
+ "comment": []
+ },
{
"name": "ApiGetUserEcosystemPointRequest",
"is_root": true,
@@ -9361,12 +9794,25 @@
"lite_name": "r",
"semantic_type": "uint32",
"json_type": "integer",
- "index": 10,
+ "index": 10,
+ "array_depth": 0,
+ "optional": false,
+ "example": "'52'",
+ "comment": [
+ "The rank of the account in the ecosystem"
+ ]
+ },
+ {
+ "name": "epoch",
+ "lite_name": "e",
+ "semantic_type": "uint32",
+ "json_type": "integer",
+ "index": 11,
"array_depth": 0,
"optional": false,
- "example": "'52'",
+ "example": "'1'",
"comment": [
- "The rank of the account in the ecosystem"
+ "The epoch number of the ecosystem point"
]
}
],
@@ -9900,6 +10346,145 @@
],
"comment": []
},
+ {
+ "name": "QueryFindEpochRequest",
+ "is_root": true,
+ "fields": [
+ {
+ "name": "time",
+ "lite_name": "t",
+ "semantic_type": "timestamp",
+ "json_type": "string",
+ "index": 0,
+ "array_depth": 0,
+ "optional": true,
+ "default": "0",
+ "example": "1714329600000000000",
+ "comment": [
+ "The time to query the epoch"
+ ]
+ },
+ {
+ "name": "epoch",
+ "lite_name": "e",
+ "semantic_type": "int32",
+ "json_type": "integer",
+ "index": 1,
+ "array_depth": 0,
+ "optional": true,
+ "default": "0",
+ "example": "1",
+ "comment": [
+ "The epoch number"
+ ]
+ }
+ ],
+ "comment": [
+ "Query epoch by time or epoch number"
+ ]
+ },
+ {
+ "name": "Epoch",
+ "is_root": false,
+ "fields": [
+ {
+ "name": "epoch",
+ "lite_name": "e",
+ "semantic_type": "int32",
+ "json_type": "integer",
+ "index": 0,
+ "array_depth": 0,
+ "optional": false,
+ "comment": [
+ "The epoch number"
+ ]
+ },
+ {
+ "name": "start_time",
+ "lite_name": "st",
+ "semantic_type": "timestamp",
+ "json_type": "string",
+ "index": 1,
+ "array_depth": 0,
+ "optional": false,
+ "comment": [
+ "The start time of the epoch"
+ ]
+ },
+ {
+ "name": "end_time",
+ "lite_name": "et",
+ "semantic_type": "timestamp",
+ "json_type": "string",
+ "index": 2,
+ "array_depth": 0,
+ "optional": false,
+ "comment": [
+ "The end time of the epoch"
+ ]
+ }
+ ],
+ "comment": []
+ },
+ {
+ "name": "QueryFindEpochResponse",
+ "is_root": true,
+ "fields": [
+ {
+ "name": "epoch",
+ "lite_name": "e",
+ "semantic_type": "Epoch",
+ "json_type": "Epoch",
+ "index": 0,
+ "array_depth": 0,
+ "optional": false,
+ "comment": [
+ "The epoch"
+ ]
+ }
+ ],
+ "comment": []
+ },
+ {
+ "name": "QueryGetListEpochRequest",
+ "is_root": true,
+ "fields": [
+ {
+ "name": "limit",
+ "lite_name": "l",
+ "semantic_type": "uint32",
+ "json_type": "integer",
+ "index": 0,
+ "array_depth": 0,
+ "optional": true,
+ "default": "0",
+ "example": "100",
+ "comment": [
+ "The limit to query for"
+ ]
+ }
+ ],
+ "comment": []
+ },
+ {
+ "name": "QueryGetListEpochResponse",
+ "is_root": true,
+ "fields": [
+ {
+ "name": "result",
+ "lite_name": "r",
+ "semantic_type": "Epoch",
+ "json_type": "Epoch",
+ "index": 0,
+ "array_depth": 1,
+ "optional": false,
+ "comment": [
+ "The list of epochs"
+ ]
+ }
+ ],
+ "comment": []
+ },
{
"name": "QueryEpochBadgeRequest",
"is_root": true,
@@ -11068,7 +11653,7 @@
{
"name": "epoch",
"lite_name": "e",
- "semantic_type": "uint32",
+ "semantic_type": "int32",
"json_type": "integer",
"index": 0,
"array_depth": 0,
@@ -11147,7 +11732,7 @@
{
"name": "epoch",
"lite_name": "e",
- "semantic_type": "uint32",
+ "semantic_type": "int32",
"json_type": "integer",
"index": 0,
"array_depth": 0,
@@ -11577,6 +12162,19 @@
"comment": [
"The cursor to indicate when to start the next query from"
]
+ },
+ {
+ "name": "group_by_signer",
+ "lite_name": "gb",
+ "semantic_type": "bool",
+ "json_type": "boolean",
+ "index": 9,
+ "array_depth": 0,
+ "optional": false,
+ "example": "true",
+ "comment": [
+ "Whether to group trades by signer per sub account"
+ ]
}
],
"comment": [
@@ -11651,6 +12249,18 @@
"comment": [
"Total positive fee paid by user"
]
+ },
+ {
+ "name": "signer",
+ "lite_name": "s",
+ "semantic_type": "address",
+ "json_type": "string",
+ "index": 5,
+ "array_depth": 0,
+ "optional": false,
+ "comment": [
+ "The signer of the trade"
+ ]
}
],
"comment": [
@@ -13138,6 +13748,101 @@
""
]
},
+ {
+ "name": "WSOrderGroupFeedSelectorV1",
+ "is_root": true,
+ "fields": [
+ {
+ "name": "sub_account_id",
+ "lite_name": "sa",
+ "semantic_type": "uint64",
+ "json_type": "string",
+ "index": 0,
+ "array_depth": 0,
+ "optional": false,
+ "example": "'$GRVT_SUB_ACCOUNT_ID'",
+ "comment": [
+ "The subaccount ID to filter by"
+ ],
+ "selector": "primary"
+ }
+ ],
+ "comment": [
+ "Subscribes to a feed of order group to get updated when a new group is created for the subAccount specified.",
+ ""
+ ]
+ },
+ {
+ "name": "WSOrderGroupFeedDataV1",
+ "is_root": true,
+ "fields": [
+ {
+ "name": "stream",
+ "lite_name": "s",
+ "semantic_type": "string",
+ "json_type": "string",
+ "index": 0,
+ "array_depth": 0,
+ "optional": false,
+ "example": "'v1.group'",
+ "comment": [
+ "Stream name"
+ ]
+ },
+ {
+ "name": "selector",
+ "lite_name": "s1",
+ "semantic_type": "string",
+ "json_type": "string",
+ "index": 1,
+ "array_depth": 0,
+ "optional": false,
+ "example": "'$GRVT_SUB_ACCOUNT_ID'",
+ "comment": [
+ "Primary selector"
+ ]
+ },
+ {
+ "name": "sequence_number",
+ "lite_name": "sn",
+ "semantic_type": "uint64",
+ "json_type": "string",
+ "index": 2,
+ "array_depth": 0,
+ "optional": false,
+ "example": "'872634876'",
+ "comment": [
+ "A running sequence number that determines global message order within the specific stream"
+ ]
+ },
+ {
+ "name": "feed",
+ "lite_name": "f",
+ "semantic_type": "ClientOrderIDsByGroup",
+ "json_type": "ClientOrderIDsByGroup",
+ "index": 3,
+ "array_depth": 0,
+ "optional": false,
+ "comment": [
+ "The order object being created or updated"
+ ]
+ },
+ {
+ "name": "prev_sequence_number",
+ "lite_name": "ps",
+ "semantic_type": "uint64",
+ "json_type": "string",
+ "index": 4,
+ "array_depth": 0,
+ "optional": false,
+ "example": "'872634875'",
+ "comment": [
+ "The previous sequence number that determines global message order within the specific stream"
+ ]
+ }
+ ],
+ "comment": []
+ },
{
"name": "ApiWithdrawalRequest",
"is_root": true,
@@ -13966,6 +14671,13 @@
"comment": [
"Cancellation has expired because corresponding order had not arrived within the defined time-to-live window."
]
+ },
+ {
+ "name": "DROPPED_DUPLICATE",
+ "value": 2,
+ "comment": [
+ "This cancellation request was dropped because its TTL window overlaps with another cancellation request for the same order."
+ ]
}
],
"comment": []
@@ -14404,6 +15116,13 @@
"comment": [
"the UXLINK token"
]
+ },
+ {
+ "name": "KAITO",
+ "value": 39,
+ "comment": [
+ "the KAITO token"
+ ]
}
],
"comment": [
@@ -14809,6 +15528,13 @@
"comment": [
"client cancel on disconnect triggered"
]
+ },
+ {
+ "name": "OCO_COUNTER_PART_TRIGGERED",
+ "value": 30,
+ "comment": [
+ "the OCO counter part order was triggered"
+ ]
}
],
"comment": []