Skip to content
Closed
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
38 changes: 30 additions & 8 deletions artifacts/apidocs/market_data_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ LITE ENDPOINT: lite/v1/instrument
"tick_size": "0.01",
"min_size": "0.01",
"create_time": "1697788800000000000",
"max_position_size": "100.0"
"max_position_size": "100.0",
"funding_interval_hours": null,
"adjusted_funding_rate_cap": 2.5,
"adjusted_funding_rate_floor": -2.5
}
}
```
Expand All @@ -69,7 +72,10 @@ LITE ENDPOINT: lite/v1/instrument
"ts": "0.01",
"ms": "0.01",
"ct": "1697788800000000000",
"mp": "100.0"
"mp": "100.0",
"fi": null,
"af": 2.5,
"af1": -2.5
}
}
```
Expand Down Expand Up @@ -350,7 +356,10 @@ LITE ENDPOINT: lite/v1/all_instruments
"tick_size": "0.01",
"min_size": "0.01",
"create_time": "1697788800000000000",
"max_position_size": "100.0"
"max_position_size": "100.0",
"funding_interval_hours": null,
"adjusted_funding_rate_cap": 2.5,
"adjusted_funding_rate_floor": -2.5
}]
}
```
Expand All @@ -370,7 +379,10 @@ LITE ENDPOINT: lite/v1/all_instruments
"ts": "0.01",
"ms": "0.01",
"ct": "1697788800000000000",
"mp": "100.0"
"mp": "100.0",
"fi": null,
"af": 2.5,
"af1": -2.5
}]
}
```
Expand Down Expand Up @@ -658,7 +670,10 @@ LITE ENDPOINT: lite/v1/instruments
"tick_size": "0.01",
"min_size": "0.01",
"create_time": "1697788800000000000",
"max_position_size": "100.0"
"max_position_size": "100.0",
"funding_interval_hours": null,
"adjusted_funding_rate_cap": 2.5,
"adjusted_funding_rate_floor": -2.5
}]
}
```
Expand All @@ -678,7 +693,10 @@ LITE ENDPOINT: lite/v1/instruments
"ts": "0.01",
"ms": "0.01",
"ct": "1697788800000000000",
"mp": "100.0"
"mp": "100.0",
"fi": null,
"af": 2.5,
"af1": -2.5
}]
}
```
Expand Down Expand Up @@ -1596,7 +1614,9 @@ LITE ENDPOINT: lite/v1/ticker
"low_price": "65038.01",
"open_price": "65038.01",
"open_interest": "123456.78",
"long_short_ratio": "0.5"
"long_short_ratio": "0.5",
"funding_rate": 0.0003,
"next_funding_time": "1697788800000000000"
}
}
```
Expand Down Expand Up @@ -1627,7 +1647,9 @@ LITE ENDPOINT: lite/v1/ticker
"lp1": "65038.01",
"op": "65038.01",
"oi": "123456.78",
"ls1": "0.5"
"ls1": "0.5",
"fr2": 0.0003,
"nf": "1697788800000000000"
}
}
```
Expand Down
16 changes: 12 additions & 4 deletions artifacts/apidocs/market_data_streams.md
Original file line number Diff line number Diff line change
Expand Up @@ -1250,7 +1250,9 @@ STREAM: v1.ticker.s
"low_price": "65038.01",
"open_price": "65038.01",
"open_interest": "123456.78",
"long_short_ratio": "0.5"
"long_short_ratio": "0.5",
"funding_rate": 0.0003,
"next_funding_time": "1697788800000000000"
}
}
```
Expand Down Expand Up @@ -1284,7 +1286,9 @@ STREAM: v1.ticker.s
"lp1": "65038.01",
"op": "65038.01",
"oi": "123456.78",
"ls1": "0.5"
"ls1": "0.5",
"fr2": 0.0003,
"nf": "1697788800000000000"
}
}
```
Expand Down Expand Up @@ -1835,7 +1839,9 @@ STREAM: v1.ticker.d
"low_price": "65038.01",
"open_price": "65038.01",
"open_interest": "123456.78",
"long_short_ratio": "0.5"
"long_short_ratio": "0.5",
"funding_rate": 0.0003,
"next_funding_time": "1697788800000000000"
}
}
```
Expand Down Expand Up @@ -1869,7 +1875,9 @@ STREAM: v1.ticker.d
"lp1": "65038.01",
"op": "65038.01",
"oi": "123456.78",
"ls1": "0.5"
"ls1": "0.5",
"fr2": 0.0003,
"nf": "1697788800000000000"
}
}
```
Expand Down
1 change: 1 addition & 0 deletions artifacts/apidocs/schemas/aggregated_account_summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
|total_equity<br>`te` |string|True|Total equity of the main (+ sub) account, denominated in USD|
|spot_balances<br>`sb` |[SpotBalance]|True|The list of spot assets owned by this main (+ sub) account, and their balances|
|vault_investments<br>`vi` |[VaultInvestment]|True|The list of vault investments held by this main account|
|total_sub_account_balance<br>`ts` |string|True|Total balance of the sub accounts, denominated in USD|
??? info "[SpotBalance](/../../schemas/spot_balance)"
|Name<br>`Lite`|Type|Required<br>`Default`| Description |
|-|-|-|-|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
|total_equity<br>`te` |string|True|Total equity of the main (+ sub) account, denominated in USD|
|spot_balances<br>`sb` |[SpotBalance]|True|The list of spot assets owned by this main (+ sub) account, and their balances|
|vault_investments<br>`vi` |[VaultInvestment]|True|The list of vault investments held by this main account|
|total_sub_account_balance<br>`ts` |string|True|Total balance of the sub accounts, denominated in USD|
??? info "[SpotBalance](/../../schemas/spot_balance)"
|Name<br>`Lite`|Type|Required<br>`Default`| Description |
|-|-|-|-|
Expand Down
2 changes: 2 additions & 0 deletions artifacts/apidocs/schemas/api_create_order_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
|v<br>`v` |integer|True|Signature V|
|expiration<br>`e` |string|True|Timestamp after which this signature expires, expressed in unix nanoseconds. Must be capped at 30 days|
|nonce<br>`n` |integer|True|Users can randomly generate this value, used as a signature deconflicting key.<br>ie. You can send the same exact instruction twice with different nonces.<br>When the same nonce is used, the same payload will generate the same signature.<br>Our system will consider the payload a duplicate, and ignore it.|
|chain_id<br>`ci` |string|True|Chain ID used in EIP-712 domain. Zero value fallbacks to GRVT Chain ID.|
??? info "[OrderMetadata](/../../schemas/order_metadata)"
Metadata fields are used to support Backend only operations. These operations are not trustless by nature.<br>Hence, fields in here are never signed, and is never transmitted to the smart contract.<br>

Expand Down Expand Up @@ -158,3 +159,4 @@
|`DERISK_NOT_SUPPORTED` = 35|derisk is not supported|
|`INVALID_ORDER_TYPE` = 36|the order type is invalid|
|`CURRENCY_NOT_DEFINED` = 37|the currency is not defined|
|`INVALID_CHAIN_ID` = 38|the chain ID is invalid|
2 changes: 2 additions & 0 deletions artifacts/apidocs/schemas/api_create_order_response.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
|v<br>`v` |integer|True|Signature V|
|expiration<br>`e` |string|True|Timestamp after which this signature expires, expressed in unix nanoseconds. Must be capped at 30 days|
|nonce<br>`n` |integer|True|Users can randomly generate this value, used as a signature deconflicting key.<br>ie. You can send the same exact instruction twice with different nonces.<br>When the same nonce is used, the same payload will generate the same signature.<br>Our system will consider the payload a duplicate, and ignore it.|
|chain_id<br>`ci` |string|True|Chain ID used in EIP-712 domain. Zero value fallbacks to GRVT Chain ID.|
??? info "[OrderMetadata](/../../schemas/order_metadata)"
Metadata fields are used to support Backend only operations. These operations are not trustless by nature.<br>Hence, fields in here are never signed, and is never transmitted to the smart contract.<br>

Expand Down Expand Up @@ -156,3 +157,4 @@
|`DERISK_NOT_SUPPORTED` = 35|derisk is not supported|
|`INVALID_ORDER_TYPE` = 36|the order type is invalid|
|`CURRENCY_NOT_DEFINED` = 37|the currency is not defined|
|`INVALID_CHAIN_ID` = 38|the chain ID is invalid|
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
!!! info "[ApiCrossExchVaultAttestEquityRequest](/../../schemas/api_cross_exch_vault_attest_equity_request)"
Request payload for a cross-exchange vault maanger to publish an equity attestation event to GRVT systems.<br><br><br>

|Name<br>`Lite`|Type|Required<br>`Default`| Description |
|-|-|-|-|
|vault_id<br>`vi` |string|True|The unique identifier of the cross-exchange vault.|
|total_equity<br>`te` |string|True|[Signed] The total equity implied by `num_lp_tokens * share_price`, in USD, expressed in up to 6 decimal places.|
|num_lp_tokens<br>`nl` |string|True|[Signed] The number of shares in circulation for the cross-exchange vault, expressed in up to 6 decimal places.|
|share_price<br>`sp` |string|True|[Signed] The share price of the cross-exchange vault, in USD, expressed in up to 9 decimal places.|
|last_update_timestamp<br>`lu` |string|True|[Signed] GRVT timestamp for the latest confirmed attestation event of this vault, in unix-nanoseconds.<br>Should be equal to the `last_update_timestamp` value returned from the Vault Detail API.|
|signature<br>`s` |Signature|True|The digital signature from the cross-exchange vault manager account.<br>This signature must be generated by the main account ID and is used to verify the authenticity of the request.<br>The signature must comply with AccountPermAdmin permission.|
??? info "[Signature](/../../schemas/signature)"
|Name<br>`Lite`|Type|Required<br>`Default`| Description |
|-|-|-|-|
|signer<br>`s` |string|True|The address (public key) of the wallet signing the payload|
|r<br>`r` |string|True|Signature R|
|s<br>`s1` |string|True|Signature S|
|v<br>`v` |integer|True|Signature V|
|expiration<br>`e` |string|True|Timestamp after which this signature expires, expressed in unix nanoseconds. Must be capped at 30 days|
|nonce<br>`n` |integer|True|Users can randomly generate this value, used as a signature deconflicting key.<br>ie. You can send the same exact instruction twice with different nonces.<br>When the same nonce is used, the same payload will generate the same signature.<br>Our system will consider the payload a duplicate, and ignore it.|
|chain_id<br>`ci` |string|True|Chain ID used in EIP-712 domain. Zero value fallbacks to GRVT Chain ID.|
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
!!! info "[ApiCrossExchVaultLockRequest](/../../schemas/api_cross_exch_vault_lock_request)"
Request payload for a cross-exchange vault manager to engage the update lock for their vault.<br><br>While locked, all operations that could change the vault's share count (e.g. invest / redeem / burn) become disabled.<br><br>Should be done prior to an equity-attest update to ensure a fixed-reference share count.<br><br>WARN: Stays locked until the corresponding Unlock API is called, OR a successful equity-attest update.<br><br>Vault managers leaving their vaults locked for prolonged periods will receive GRVT warning alerts.<br>

|Name<br>`Lite`|Type|Required<br>`Default`| Description |
|-|-|-|-|
|cross_exch_vault_id<br>`ce` |string|True|The unique identifier of the cross-exchange vault to lock.|
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
!!! info "[ApiCrossExchVaultTriggerRedemptionRequest](/../../schemas/api_cross_exch_vault_trigger_redemption_request)"
Request payload for a cross-exchange vault manager to trigger execution of the redemption request at the head of their cross-exchange vault's redemption queue.<br>

|Name<br>`Lite`|Type|Required<br>`Default`| Description |
|-|-|-|-|
|vault_id<br>`vi` |string|True|The unique identifier of the cross-exchange vault to redeem from.|
|request_time<br>`rt` |string|True|Value provided must be equal to the `request_time` field of the first element returned from the View Investment Queue API.|
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
!!! info "[ApiCrossExchVaultUnlockRequest](/../../schemas/api_cross_exch_vault_unlock_request)"
Request payload for a cross-exchange vault manager to disengage the update lock for their vault.<br><br><br>

|Name<br>`Lite`|Type|Required<br>`Default`| Description |
|-|-|-|-|
|cross_exch_vault_id<br>`ce` |string|True|The unique identifier of the cross-exchange vault to unlock.|
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
!!! info "[ApiCrossExchVaultViewInvestmentQueueRequest](/../../schemas/api_cross_exch_vault_view_investment_queue_request)"
Request payload for a cross-exchange vault manager to view the investment queue for their vault in FIFO order.<br><br>This queue gets drained on every equity attestation event submitted by the cross-exchange vault manager.<br><br><br>

|Name<br>`Lite`|Type|Required<br>`Default`| Description |
|-|-|-|-|
|vault_id<br>`vi` |string|True|The unique identifier of the cross-exchange vault to fetch the investment queue for.|
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
!!! info "[ApiCrossExchVaultViewInvestmentQueueResponse](/../../schemas/api_cross_exch_vault_view_investment_queue_response)"
Response payload for a cross-exchange vault manager to view the investment queue for their vault in FIFO order.<br><br>This queue gets drained on every equity attestation event submitted by the cross-exchange vault manager.<br><br><br>

|Name<br>`Lite`|Type|Required<br>`Default`| Description |
|-|-|-|-|
|investment_queue<br>`iq` |[CrossExchVaultPendingInvestment]|True|Outstanding cross-exchange vault investment requests in FIFO order.|
|total_investment_equity<br>`ti` |string|True|The current valuation (in USD) of all pending investments.|
??? info "[CrossExchVaultPendingInvestment](/../../schemas/cross_exch_vault_pending_investment)"
Representation of a pending investment for a given cross-exchange vault.<br>

|Name<br>`Lite`|Type|Required<br>`Default`| Description |
|-|-|-|-|
|request_time<br>`rt` |string|True|[Filled by GRVT Backend] Time at which the investment request was confirmed and enqueued by GRVT in unix nanoseconds|
|currency<br>`c` |string|True|The currency used for the investment. This should be the vault's quote currency.|
|num_tokens<br>`nt` |string|True|The investment sum, in terms of the token currency specified (i.e., `numTokens` of '1000' with `tokenCurrency` of 'USDT' denotes investment of 1,000 USDT).|
|is_manager<br>`im` |boolean|False<br>`None`|`true` if this pending investment belongs to the vault manager, omitted otherwise.|
7 changes: 5 additions & 2 deletions artifacts/apidocs/schemas/api_get_all_instruments_response.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
!!! info "[ApiGetAllInstrumentsResponse](/../../schemas/api_get_all_instruments_response)"
|Name<br>`Lite`|Type|Required<br>`Default`| Description |
|-|-|-|-|
|result<br>`r` |[Instrument]|True|List of instruments|
??? info "[Instrument](/../../schemas/instrument)"
|result<br>`r` |[InstrumentDisplay]|True|List of instruments|
??? info "[InstrumentDisplay](/../../schemas/instrument_display)"
|Name<br>`Lite`|Type|Required<br>`Default`| Description |
|-|-|-|-|
|instrument<br>`i` |string|True|The readable instrument name:<ul><li>Perpetual: `ETH_USDT_Perp`</li><li>Future: `BTC_USDT_Fut_20Oct23`</li><li>Call: `ETH_USDT_Call_20Oct23_2800`</li><li>Put: `ETH_USDT_Put_20Oct23_2800`</li></ul>|
Expand All @@ -18,6 +18,9 @@
|min_size<br>`ms` |string|True|The minimum contract size, expressed in base asset decimal units|
|create_time<br>`ct` |string|True|Creation time in unix nanoseconds|
|max_position_size<br>`mp` |string|True|The maximum position size, expressed in base asset decimal units|
|funding_interval_hours<br>`fi` |integer|False<br>`None`|Defines the funding interval to be applied.|
|adjusted_funding_rate_cap<br>`af` |string|False<br>`None`|Funding rate cap over the defined `intervalHours`.|
|adjusted_funding_rate_floor<br>`af1` |string|False<br>`None`|Funding rate floor over the defined `intervalHours`.|
??? info "[Kind](/../../schemas/kind)"
The list of asset kinds that are supported on the GRVT exchange<br>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
!!! info "[ApiGetFilteredInstrumentsResponse](/../../schemas/api_get_filtered_instruments_response)"
|Name<br>`Lite`|Type|Required<br>`Default`| Description |
|-|-|-|-|
|result<br>`r` |[Instrument]|True|The instruments matching the request filter|
??? info "[Instrument](/../../schemas/instrument)"
|result<br>`r` |[InstrumentDisplay]|True|The instruments matching the request filter|
??? info "[InstrumentDisplay](/../../schemas/instrument_display)"
|Name<br>`Lite`|Type|Required<br>`Default`| Description |
|-|-|-|-|
|instrument<br>`i` |string|True|The readable instrument name:<ul><li>Perpetual: `ETH_USDT_Perp`</li><li>Future: `BTC_USDT_Fut_20Oct23`</li><li>Call: `ETH_USDT_Call_20Oct23_2800`</li><li>Put: `ETH_USDT_Put_20Oct23_2800`</li></ul>|
Expand All @@ -18,6 +18,9 @@
|min_size<br>`ms` |string|True|The minimum contract size, expressed in base asset decimal units|
|create_time<br>`ct` |string|True|Creation time in unix nanoseconds|
|max_position_size<br>`mp` |string|True|The maximum position size, expressed in base asset decimal units|
|funding_interval_hours<br>`fi` |integer|False<br>`None`|Defines the funding interval to be applied.|
|adjusted_funding_rate_cap<br>`af` |string|False<br>`None`|Funding rate cap over the defined `intervalHours`.|
|adjusted_funding_rate_floor<br>`af1` |string|False<br>`None`|Funding rate floor over the defined `intervalHours`.|
??? info "[Kind](/../../schemas/kind)"
The list of asset kinds that are supported on the GRVT exchange<br>

Expand Down
7 changes: 5 additions & 2 deletions artifacts/apidocs/schemas/api_get_instrument_response.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
!!! info "[ApiGetInstrumentResponse](/../../schemas/api_get_instrument_response)"
|Name<br>`Lite`|Type|Required<br>`Default`| Description |
|-|-|-|-|
|result<br>`r` |Instrument|True|The instrument matching the request asset|
??? info "[Instrument](/../../schemas/instrument)"
|result<br>`r` |InstrumentDisplay|True|The instrument matching the request asset|
??? info "[InstrumentDisplay](/../../schemas/instrument_display)"
|Name<br>`Lite`|Type|Required<br>`Default`| Description |
|-|-|-|-|
|instrument<br>`i` |string|True|The readable instrument name:<ul><li>Perpetual: `ETH_USDT_Perp`</li><li>Future: `BTC_USDT_Fut_20Oct23`</li><li>Call: `ETH_USDT_Call_20Oct23_2800`</li><li>Put: `ETH_USDT_Put_20Oct23_2800`</li></ul>|
Expand All @@ -18,6 +18,9 @@
|min_size<br>`ms` |string|True|The minimum contract size, expressed in base asset decimal units|
|create_time<br>`ct` |string|True|Creation time in unix nanoseconds|
|max_position_size<br>`mp` |string|True|The maximum position size, expressed in base asset decimal units|
|funding_interval_hours<br>`fi` |integer|False<br>`None`|Defines the funding interval to be applied.|
|adjusted_funding_rate_cap<br>`af` |string|False<br>`None`|Funding rate cap over the defined `intervalHours`.|
|adjusted_funding_rate_floor<br>`af1` |string|False<br>`None`|Funding rate floor over the defined `intervalHours`.|
??? info "[Kind](/../../schemas/kind)"
The list of asset kinds that are supported on the GRVT exchange<br>

Expand Down
Loading