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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions artifacts/apidocs/market_data_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1964,7 +1964,8 @@ LITE ENDPOINT: lite/v1/trade
"interest_rate": 0.0003,
"forward_price": "65038.01",
"trade_id": "209358-2",
"venue": "ORDERBOOK"
"venue": "ORDERBOOK",
"is_rpi": false
}]
}
```
Expand All @@ -1982,7 +1983,8 @@ LITE ENDPOINT: lite/v1/trade
"ir": 0.0003,
"fp": "65038.01",
"ti": "209358-2",
"v": "ORDERBOOK"
"v": "ORDERBOOK",
"ir1": false
}]
}
```
Expand Down Expand Up @@ -2284,7 +2286,8 @@ LITE ENDPOINT: lite/v1/trade_history
"interest_rate": 0.0003,
"forward_price": "65038.01",
"trade_id": "209358-2",
"venue": "ORDERBOOK"
"venue": "ORDERBOOK",
"is_rpi": false
}],
"next": "Qw0918="
}
Expand All @@ -2303,7 +2306,8 @@ LITE ENDPOINT: lite/v1/trade_history
"ir": 0.0003,
"fp": "65038.01",
"ti": "209358-2",
"v": "ORDERBOOK"
"v": "ORDERBOOK",
"ir1": false
}],
"n": "Qw0918="
}
Expand Down Expand Up @@ -3053,7 +3057,8 @@ LITE ENDPOINT: lite/v1/funding
"instrument": "BTC_USDT_Perp",
"funding_rate": 0.0003,
"funding_time": "1697788800000000000",
"mark_price": "65038.01"
"mark_price": "65038.01",
"funding_rate_8_h_avg": 0.0003
}],
"next": "Qw0918="
}
Expand All @@ -3065,7 +3070,8 @@ LITE ENDPOINT: lite/v1/funding
"i": "BTC_USDT_Perp",
"fr": 0.0003,
"ft": "1697788800000000000",
"mp": "65038.01"
"mp": "65038.01",
"fr1": 0.0003
}],
"n": "Qw0918="
}
Expand Down
6 changes: 4 additions & 2 deletions artifacts/apidocs/market_data_streams.md
Original file line number Diff line number Diff line change
Expand Up @@ -3532,7 +3532,8 @@ STREAM: v1.trade
"interest_rate": 0.0003,
"forward_price": "65038.01",
"trade_id": "209358-2",
"venue": "ORDERBOOK"
"venue": "ORDERBOOK",
"is_rpi": false
}
}
```
Expand All @@ -3553,7 +3554,8 @@ STREAM: v1.trade
"ir": 0.0003,
"fp": "65038.01",
"ti": "209358-2",
"v": "ORDERBOOK"
"v": "ORDERBOOK",
"ir1": false
}
}
```
Expand Down
4 changes: 4 additions & 0 deletions artifacts/apidocs/schemas/api_create_order_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
|`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|
|`RETAIL_PRICE_IMPROVEMENT` = 5|RPI - A GTT + PostOnly maker order, that can only be taken by non-algorithmic UI users.|
??? info "[OrderLeg](/../../schemas/order_leg)"
|Name<br>`Lite`|Type|Required<br>`Default`| Description |
|-|-|-|-|
Expand Down Expand Up @@ -79,6 +80,7 @@
|-|-|-|-|
|trigger_by<br>`tb` |TriggerBy|True|Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order|
|trigger_price<br>`tp` |string|True|The Trigger Price of the order, expressed in `9` decimals.|
|close_position<br>`cp` |boolean|True|If True, the order will close the position when the trigger price is reached|
??? info "[TriggerBy](/../../schemas/trigger_by)"
Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order.<br><br>Trigger orders are executed when the selected price type reaches the specified trigger price.Different price types ensure flexibility in executing strategies based on market conditions.<br><br><br>

Expand Down Expand Up @@ -147,3 +149,5 @@
|`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|
|`REDUCE_ONLY_LIMIT` = 31|the remaining order size was cancelled because it exceeded current position size|
|`CLIENT_REPLACE` = 32|the order was replaced by a client replace request|
4 changes: 4 additions & 0 deletions artifacts/apidocs/schemas/api_create_order_response.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
|`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|
|`RETAIL_PRICE_IMPROVEMENT` = 5|RPI - A GTT + PostOnly maker order, that can only be taken by non-algorithmic UI users.|
??? info "[OrderLeg](/../../schemas/order_leg)"
|Name<br>`Lite`|Type|Required<br>`Default`| Description |
|-|-|-|-|
Expand Down Expand Up @@ -77,6 +78,7 @@
|-|-|-|-|
|trigger_by<br>`tb` |TriggerBy|True|Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order|
|trigger_price<br>`tp` |string|True|The Trigger Price of the order, expressed in `9` decimals.|
|close_position<br>`cp` |boolean|True|If True, the order will close the position when the trigger price is reached|
??? info "[TriggerBy](/../../schemas/trigger_by)"
Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order.<br><br>Trigger orders are executed when the selected price type reaches the specified trigger price.Different price types ensure flexibility in executing strategies based on market conditions.<br><br><br>

Expand Down Expand Up @@ -145,3 +147,5 @@
|`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|
|`REDUCE_ONLY_LIMIT` = 31|the remaining order size was cancelled because it exceeded current position size|
|`CLIENT_REPLACE` = 32|the order was replaced by a client replace request|
1 change: 1 addition & 0 deletions artifacts/apidocs/schemas/api_fill_history_response.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
|client_order_id<br>`co` |string|True|A unique identifier for the active order within a subaccount, specified by the client<br>This is used to identify the order in the client's system<br>This field can be used for order amendment/cancellation, but has no bearing on the smart contract layer<br>This field will not be propagated to the smart contract, and should not be signed by the client<br>This value must be unique for all active orders in a subaccount, or amendment/cancellation will not work as expected<br>Gravity UI will generate a random clientOrderID for each order in the range [0, 2^63 - 1]<br>To prevent any conflicts, client machines should generate a random clientOrderID in the range [2^63, 2^64 - 1]<br><br>When GRVT Backend receives an order with an overlapping clientOrderID, we will reject the order with rejectReason set to overlappingClientOrderId|
|signer<br>`s1` |string|True|The address (public key) of the wallet signing the payload|
|broker<br>`b` |BrokerTag|False<br>``|Specifies the broker who brokered the order|
|is_rpi<br>`ir1` |boolean|True|If the trade is a RPI trade|
??? info "[Venue](/../../schemas/venue)"
The list of Trading Venues that are supported on the GRVT exchange<br>

Expand Down
1 change: 1 addition & 0 deletions artifacts/apidocs/schemas/api_funding_rate_response.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@
|funding_rate<br>`fr` |string|True|The funding rate of the instrument, expressed in percentage points|
|funding_time<br>`ft` |string|True|The funding timestamp of the funding rate, expressed in unix nanoseconds|
|mark_price<br>`mp` |string|True|The mark price of the instrument at funding timestamp, expressed in `9` decimals|
|funding_rate_8_h_avg<br>`fr1` |string|True|The 8h average funding rate of the instrument, expressed in percentage points|
4 changes: 4 additions & 0 deletions artifacts/apidocs/schemas/api_get_order_response.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
|`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|
|`RETAIL_PRICE_IMPROVEMENT` = 5|RPI - A GTT + PostOnly maker order, that can only be taken by non-algorithmic UI users.|
??? info "[OrderLeg](/../../schemas/order_leg)"
|Name<br>`Lite`|Type|Required<br>`Default`| Description |
|-|-|-|-|
Expand Down Expand Up @@ -77,6 +78,7 @@
|-|-|-|-|
|trigger_by<br>`tb` |TriggerBy|True|Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order|
|trigger_price<br>`tp` |string|True|The Trigger Price of the order, expressed in `9` decimals.|
|close_position<br>`cp` |boolean|True|If True, the order will close the position when the trigger price is reached|
??? info "[TriggerBy](/../../schemas/trigger_by)"
Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order.<br><br>Trigger orders are executed when the selected price type reaches the specified trigger price.Different price types ensure flexibility in executing strategies based on market conditions.<br><br><br>

Expand Down Expand Up @@ -145,3 +147,5 @@
|`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|
|`REDUCE_ONLY_LIMIT` = 31|the remaining order size was cancelled because it exceeded current position size|
|`CLIENT_REPLACE` = 32|the order was replaced by a client replace request|
4 changes: 4 additions & 0 deletions artifacts/apidocs/schemas/api_open_orders_response.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
|`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|
|`RETAIL_PRICE_IMPROVEMENT` = 5|RPI - A GTT + PostOnly maker order, that can only be taken by non-algorithmic UI users.|
??? info "[OrderLeg](/../../schemas/order_leg)"
|Name<br>`Lite`|Type|Required<br>`Default`| Description |
|-|-|-|-|
Expand Down Expand Up @@ -79,6 +80,7 @@
|-|-|-|-|
|trigger_by<br>`tb` |TriggerBy|True|Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order|
|trigger_price<br>`tp` |string|True|The Trigger Price of the order, expressed in `9` decimals.|
|close_position<br>`cp` |boolean|True|If True, the order will close the position when the trigger price is reached|
??? info "[TriggerBy](/../../schemas/trigger_by)"
Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order.<br><br>Trigger orders are executed when the selected price type reaches the specified trigger price.Different price types ensure flexibility in executing strategies based on market conditions.<br><br><br>

Expand Down Expand Up @@ -147,3 +149,5 @@
|`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|
|`REDUCE_ONLY_LIMIT` = 31|the remaining order size was cancelled because it exceeded current position size|
|`CLIENT_REPLACE` = 32|the order was replaced by a client replace request|
4 changes: 4 additions & 0 deletions artifacts/apidocs/schemas/api_order_history_response.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
|`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|
|`RETAIL_PRICE_IMPROVEMENT` = 5|RPI - A GTT + PostOnly maker order, that can only be taken by non-algorithmic UI users.|
??? info "[OrderLeg](/../../schemas/order_leg)"
|Name<br>`Lite`|Type|Required<br>`Default`| Description |
|-|-|-|-|
Expand Down Expand Up @@ -78,6 +79,7 @@
|-|-|-|-|
|trigger_by<br>`tb` |TriggerBy|True|Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order|
|trigger_price<br>`tp` |string|True|The Trigger Price of the order, expressed in `9` decimals.|
|close_position<br>`cp` |boolean|True|If True, the order will close the position when the trigger price is reached|
??? info "[TriggerBy](/../../schemas/trigger_by)"
Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order.<br><br>Trigger orders are executed when the selected price type reaches the specified trigger price.Different price types ensure flexibility in executing strategies based on market conditions.<br><br><br>

Expand Down Expand Up @@ -146,3 +148,5 @@
|`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|
|`REDUCE_ONLY_LIMIT` = 31|the remaining order size was cancelled because it exceeded current position size|
|`CLIENT_REPLACE` = 32|the order was replaced by a client replace request|
1 change: 1 addition & 0 deletions artifacts/apidocs/schemas/api_trade_history_response.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
|forward_price<br>`fp` |string|True|[Options] The forward price of the option at point of trade, expressed in `9` decimals|
|trade_id<br>`ti` |string|True|A trade identifier, globally unique, and monotonically increasing (not by `1`).<br>All trades sharing a single taker execution share the same first component (before `-`), and `event_time`.<br>`trade_id` is guaranteed to be consistent across MarketData `Trade` and Trading `Fill`.|
|venue<br>`v` |Venue|True|The venue where the trade occurred|
|is_rpi<br>`ir1` |boolean|True|If the trade is a RPI trade|
??? info "[Venue](/../../schemas/venue)"
The list of Trading Venues that are supported on the GRVT exchange<br>

Expand Down
1 change: 1 addition & 0 deletions artifacts/apidocs/schemas/api_trade_response.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
|forward_price<br>`fp` |string|True|[Options] The forward price of the option at point of trade, expressed in `9` decimals|
|trade_id<br>`ti` |string|True|A trade identifier, globally unique, and monotonically increasing (not by `1`).<br>All trades sharing a single taker execution share the same first component (before `-`), and `event_time`.<br>`trade_id` is guaranteed to be consistent across MarketData `Trade` and Trading `Fill`.|
|venue<br>`v` |Venue|True|The venue where the trade occurred|
|is_rpi<br>`ir1` |boolean|True|If the trade is a RPI trade|
??? info "[Venue](/../../schemas/venue)"
The list of Trading Venues that are supported on the GRVT exchange<br>

Expand Down
5 changes: 5 additions & 0 deletions artifacts/apidocs/schemas/api_transfer_ack.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
!!! info "[ApiTransferAck](/../../schemas/api_transfer_ack)"
|Name<br>`Lite`|Type|Required<br>`Default`| Description |
|-|-|-|-|
|ack<br>`a` |boolean|True|Gravity has acknowledged that the transfer has been successfully processed. If true, a `tx_id` will be returned. If false, an error will be returned.|
|tx_id<br>`ti` |string|True|The transaction ID of the transfer. This is only returned if the transfer is successful.|
2 changes: 2 additions & 0 deletions artifacts/apidocs/schemas/api_transfer_history_response.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,5 @@
|`STANDARD` = 1|Standard transfer that has nothing to do with bridging|
|`FAST_ARB_DEPOSIT` = 2|Fast Arb Deposit Metadata type|
|`FAST_ARB_WITHDRAWAL` = 3|Fast Arb Withdrawal Metadata type|
|`NON_NATIVE_BRIDGE_DEPOSIT` = 4|Transfer type for non native bridging deposit|
|`NON_NATIVE_BRIDGE_WITHDRAWAL` = 5|Transfer type for non native bridging withdrawal|
2 changes: 2 additions & 0 deletions artifacts/apidocs/schemas/api_transfer_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,5 @@
|`STANDARD` = 1|Standard transfer that has nothing to do with bridging|
|`FAST_ARB_DEPOSIT` = 2|Fast Arb Deposit Metadata type|
|`FAST_ARB_WITHDRAWAL` = 3|Fast Arb Withdrawal Metadata type|
|`NON_NATIVE_BRIDGE_DEPOSIT` = 4|Transfer type for non native bridging deposit|
|`NON_NATIVE_BRIDGE_WITHDRAWAL` = 5|Transfer type for non native bridging withdrawal|
11 changes: 11 additions & 0 deletions artifacts/apidocs/schemas/api_transfer_response.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
!!! info "[ApiTransferResponse](/../../schemas/api_transfer_response)"
Used to acknowledge a transfer request outcome<br>

|Name<br>`Lite`|Type|Required<br>`Default`| Description |
|-|-|-|-|
|result<br>`r` |ApiTransferAck|True|The Transfer response object|
??? info "[ApiTransferAck](/../../schemas/api_transfer_ack)"
|Name<br>`Lite`|Type|Required<br>`Default`| Description |
|-|-|-|-|
|ack<br>`a` |boolean|True|Gravity has acknowledged that the transfer has been successfully processed. If true, a `tx_id` will be returned. If false, an error will be returned.|
|tx_id<br>`ti` |string|True|The transaction ID of the transfer. This is only returned if the transfer is successful.|
1 change: 1 addition & 0 deletions artifacts/apidocs/schemas/bridge_type.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
|Value| Description |
|-|-|
|`XY` = 1|XY Bridge type|
|`RHINO` = 2|Rhino Bridge type|
2 changes: 2 additions & 0 deletions artifacts/apidocs/schemas/cancel_status_feed.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
|`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|
|`REDUCE_ONLY_LIMIT` = 31|the remaining order size was cancelled because it exceeded current position size|
|`CLIENT_REPLACE` = 32|the order was replaced by a client replace request|
??? info "[CancelStatus](/../../schemas/cancel_status)"
|Value| Description |
|-|-|
Expand Down
1 change: 1 addition & 0 deletions artifacts/apidocs/schemas/fill.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
|client_order_id<br>`co` |string|True|A unique identifier for the active order within a subaccount, specified by the client<br>This is used to identify the order in the client's system<br>This field can be used for order amendment/cancellation, but has no bearing on the smart contract layer<br>This field will not be propagated to the smart contract, and should not be signed by the client<br>This value must be unique for all active orders in a subaccount, or amendment/cancellation will not work as expected<br>Gravity UI will generate a random clientOrderID for each order in the range [0, 2^63 - 1]<br>To prevent any conflicts, client machines should generate a random clientOrderID in the range [2^63, 2^64 - 1]<br><br>When GRVT Backend receives an order with an overlapping clientOrderID, we will reject the order with rejectReason set to overlappingClientOrderId|
|signer<br>`s1` |string|True|The address (public key) of the wallet signing the payload|
|broker<br>`b` |BrokerTag|False<br>``|Specifies the broker who brokered the order|
|is_rpi<br>`ir1` |boolean|True|If the trade is a RPI trade|
??? info "[Venue](/../../schemas/venue)"
The list of Trading Venues that are supported on the GRVT exchange<br>

Expand Down
Loading
Loading