From fa0353a432353102c1f68718e897e956b81ba404 Mon Sep 17 00:00:00 2001 From: keithang-grvt Date: Sun, 23 Feb 2025 14:17:19 +0800 Subject: [PATCH 01/11] [RFC] Update API docs and specs --- artifacts/apidocs/market_data_streams.md | 504 +- .../schemas/aggregated_account_summary.md | 24 + ...api_aggregated_account_summary_response.md | 24 + .../schemas/api_cancel_all_orders_request.md | 48 + .../api_cancel_on_disconnect_request.md | 7 + .../schemas/api_cancel_order_request.md | 1 + .../schemas/api_cancel_order_response.md | 41 + .../schemas/api_create_order_request.md | 41 + .../schemas/api_create_order_response.md | 41 + .../schemas/api_dedust_position_request.md | 147 + .../schemas/api_dedust_position_response.md | 145 + .../schemas/api_deposit_history_request.md | 24 + .../schemas/api_deposit_history_response.md | 24 + .../schemas/api_fill_history_request.md | 48 + .../schemas/api_fill_history_response.md | 9 + .../api_funding_account_summary_response.md | 24 + .../api_funding_payment_history_response.md | 24 + .../api_get_all_instruments_response.md | 48 + .../api_get_filtered_instruments_request.md | 48 + .../api_get_filtered_instruments_response.md | 48 + .../schemas/api_get_instrument_response.md | 48 + .../api_get_latest_lp_snapshot_request.md | 24 + .../api_get_list_epoch_badge_response.md | 54 + .../api_get_list_flat_referral_response.md | 3 + .../api_get_list_reward_epoch_response.md | 31 + .../schemas/api_get_lp_info_request.md | 24 + .../schemas/api_get_lp_leaderboard_request.md | 26 +- .../schemas/api_get_lp_point_request.md | 26 +- .../apidocs/schemas/api_get_order_response.md | 41 + ..._verified_ecosystem_leaderboard_request.md | 5 + .../api_latest_snap_sub_accounts_response.md | 48 + ...ist_aggregated_account_summary_response.md | 24 + .../schemas/api_open_orders_request.md | 48 + .../schemas/api_open_orders_response.md | 41 + .../schemas/api_order_history_request.md | 48 + .../schemas/api_order_history_response.md | 41 + .../schemas/api_order_state_response.md | 1 + .../apidocs/schemas/api_positions_request.md | 48 + .../schemas/api_pre_deposit_check_request.md | 24 + .../schemas/api_pre_deposit_check_response.md | 24 + .../schemas/api_pre_order_check_request.md | 41 + .../schemas/api_pre_order_check_response.md | 24 + .../apidocs/schemas/api_settlement_price.md | 48 + .../schemas/api_settlement_price_request.md | 48 + .../schemas/api_settlement_price_response.md | 48 + .../api_sub_account_history_response.md | 48 + .../api_sub_account_summary_response.md | 48 + .../schemas/api_transfer_history_request.md | 25 + .../schemas/api_transfer_history_response.md | 24 + .../apidocs/schemas/api_transfer_request.md | 24 + .../schemas/api_withdrawal_history_request.md | 24 + .../api_withdrawal_history_response.md | 24 + .../apidocs/schemas/api_withdrawal_request.md | 24 + artifacts/apidocs/schemas/broker_tag.md | 8 + artifacts/apidocs/schemas/cancel_status.md | 4 + .../apidocs/schemas/cancel_status_feed.md | 46 + .../schemas/claim_ecosystem_badge_response.md | 54 + artifacts/apidocs/schemas/currency.md | 24 + artifacts/apidocs/schemas/deposit.md | 24 + artifacts/apidocs/schemas/deposit_history.md | 24 + artifacts/apidocs/schemas/epoch_badge.md | 50 + .../schemas/epoch_badge_point_distribution.md | 33 + artifacts/apidocs/schemas/epoch_badge_type.md | 15 + artifacts/apidocs/schemas/fill.md | 9 + artifacts/apidocs/schemas/flat_referral.md | 3 + .../schemas/funding_account_summary.md | 24 + artifacts/apidocs/schemas/funding_payment.md | 24 + .../get_claimable_ecosystem_badge_response.md | 56 + artifacts/apidocs/schemas/instrument.md | 48 + artifacts/apidocs/schemas/order.md | 41 + artifacts/apidocs/schemas/order_metadata.md | 40 + .../apidocs/schemas/order_reject_reason.md | 1 + artifacts/apidocs/schemas/order_state.md | 1 + artifacts/apidocs/schemas/order_state_feed.md | 1 + .../apidocs/schemas/pre_order_check_result.md | 24 + ..._epoch_badge_point_distribution_request.md | 13 + ...epoch_badge_point_distribution_response.md | 37 + .../schemas/query_epoch_badge_request.md | 16 + .../schemas/query_epoch_badge_response.md | 55 + .../apidocs/schemas/reward_epoch_info.md | 13 + .../apidocs/schemas/reward_epoch_status.md | 6 + .../apidocs/schemas/reward_program_type.md | 6 + artifacts/apidocs/schemas/spot_balance.md | 24 + artifacts/apidocs/schemas/sub_account.md | 48 + .../apidocs/schemas/tpsl_order_metadata.md | 15 + artifacts/apidocs/schemas/transfer_history.md | 24 + artifacts/apidocs/schemas/trigger_by.md | 8 + .../apidocs/schemas/trigger_order_metadata.md | 30 + artifacts/apidocs/schemas/trigger_type.md | 8 + artifacts/apidocs/schemas/withdrawal.md | 24 + .../apidocs/schemas/withdrawal_history.md | 24 + .../apidocs/schemas/ws_cancel_feed_data_v1.md | 54 + .../schemas/ws_cancel_feed_selector_v1.md | 6 + .../schemas/ws_candlestick_feed_data_v1.md | 1 + .../schemas/ws_deposit_feed_data_v1.md | 25 + .../apidocs/schemas/ws_fill_feed_data_v1.md | 10 + .../schemas/ws_mini_ticker_feed_data_v1.md | 1 + .../apidocs/schemas/ws_order_feed_data_v1.md | 42 + .../schemas/ws_order_state_feed_data_v1.md | 2 + .../ws_orderbook_levels_feed_data_v1.md | 1 + .../schemas/ws_positions_feed_data_v1.md | 1 + .../apidocs/schemas/ws_subscribe_params.md | 1 + .../ws_subscribe_response_v1_legacy.md | 1 + .../apidocs/schemas/ws_subscribe_result.md | 1 + .../apidocs/schemas/ws_ticker_feed_data_v1.md | 1 + .../apidocs/schemas/ws_trade_feed_data_v1.md | 1 + .../schemas/ws_transfer_feed_data_v1.md | 31 +- .../apidocs/schemas/ws_unsubscribe_params.md | 1 + .../schemas/ws_withdrawal_feed_data_v1.md | 25 + artifacts/apidocs/trading_api.md | 6467 ++++++++++++----- artifacts/apidocs/trading_streams.md | 1328 +++- artifacts/pysdk/grvt_raw_async.py | 34 + artifacts/pysdk/grvt_raw_sync.py | 32 + artifacts/pysdk/grvt_raw_types.py | 499 +- src/codegen/apispec.json | 5721 ++++++++++----- 115 files changed, 13386 insertions(+), 4204 deletions(-) create mode 100644 artifacts/apidocs/schemas/api_cancel_on_disconnect_request.md create mode 100644 artifacts/apidocs/schemas/api_dedust_position_request.md create mode 100644 artifacts/apidocs/schemas/api_dedust_position_response.md create mode 100644 artifacts/apidocs/schemas/api_get_list_epoch_badge_response.md create mode 100644 artifacts/apidocs/schemas/api_get_list_reward_epoch_response.md create mode 100644 artifacts/apidocs/schemas/api_get_verified_ecosystem_leaderboard_request.md create mode 100644 artifacts/apidocs/schemas/broker_tag.md create mode 100644 artifacts/apidocs/schemas/cancel_status.md create mode 100644 artifacts/apidocs/schemas/cancel_status_feed.md create mode 100644 artifacts/apidocs/schemas/claim_ecosystem_badge_response.md create mode 100644 artifacts/apidocs/schemas/epoch_badge.md create mode 100644 artifacts/apidocs/schemas/epoch_badge_point_distribution.md create mode 100644 artifacts/apidocs/schemas/epoch_badge_type.md create mode 100644 artifacts/apidocs/schemas/get_claimable_ecosystem_badge_response.md create mode 100644 artifacts/apidocs/schemas/query_epoch_badge_point_distribution_request.md create mode 100644 artifacts/apidocs/schemas/query_epoch_badge_point_distribution_response.md create mode 100644 artifacts/apidocs/schemas/query_epoch_badge_request.md create mode 100644 artifacts/apidocs/schemas/query_epoch_badge_response.md create mode 100644 artifacts/apidocs/schemas/reward_epoch_info.md create mode 100644 artifacts/apidocs/schemas/reward_epoch_status.md create mode 100644 artifacts/apidocs/schemas/reward_program_type.md create mode 100644 artifacts/apidocs/schemas/tpsl_order_metadata.md create mode 100644 artifacts/apidocs/schemas/trigger_by.md create mode 100644 artifacts/apidocs/schemas/trigger_order_metadata.md create mode 100644 artifacts/apidocs/schemas/trigger_type.md create mode 100644 artifacts/apidocs/schemas/ws_cancel_feed_data_v1.md create mode 100644 artifacts/apidocs/schemas/ws_cancel_feed_selector_v1.md diff --git a/artifacts/apidocs/market_data_streams.md b/artifacts/apidocs/market_data_streams.md index 463c4dc..8f44fc7 100644 --- a/artifacts/apidocs/market_data_streams.md +++ b/artifacts/apidocs/market_data_streams.md @@ -28,7 +28,8 @@ STREAM: v1.mini.s "method": "subscribe", "params": { "stream": "v1.mini.s", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -42,7 +43,8 @@ STREAM: v1.mini.s "subs": ["BTC_USDT_Perp@500"], "unsubs": [], "num_snapshots": [10], - "first_sequence_number": [872634876] + "first_sequence_number": [872634876], + "latest_sequence_number": [872634875] }, "id": 123, "method": "subscribe" @@ -56,7 +58,8 @@ STREAM: v1.mini.s "method": "unsubscribe", "params": { "stream": "v1.mini.s", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -120,7 +123,8 @@ STREAM: v1.mini.s "best_bid_size": "123456.78", "best_ask_price": "65038.01", "best_ask_size": "123456.78" - } + }, + "prev_sequence_number": "872634875" } ``` **Lite Feed Response** @@ -141,7 +145,8 @@ STREAM: v1.mini.s "bb1": "123456.78", "ba": "65038.01", "ba1": "123456.78" - } + }, + "ps": "872634875" } ``` @@ -206,7 +211,8 @@ STREAM: v1.mini.s "method": "subscribe", "params": { "stream": "v1.mini.s", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -221,7 +227,8 @@ STREAM: v1.mini.s "method": "unsubscribe", "params": { "stream": "v1.mini.s", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -251,7 +258,8 @@ STREAM: v1.mini.s "m": "subscribe", "p": { "s": "v1.mini.s", - "s1": ["BTC_USDT_Perp@500"] + "s1": ["BTC_USDT_Perp@500"], + "ug": true }, "i": 123 } @@ -266,7 +274,8 @@ STREAM: v1.mini.s "m": "unsubscribe", "p": { "s": "v1.mini.s", - "s1": ["BTC_USDT_Perp@500"] + "s1": ["BTC_USDT_Perp@500"], + "ug": true }, "i": 123 } @@ -297,7 +306,8 @@ STREAM: v1.mini.s "method": "subscribe", "params": { "stream": "v1.mini.s", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -312,7 +322,8 @@ STREAM: v1.mini.s "method": "unsubscribe", "params": { "stream": "v1.mini.s", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -342,7 +353,8 @@ STREAM: v1.mini.s "m": "subscribe", "p": { "s": "v1.mini.s", - "s1": ["BTC_USDT_Perp@500"] + "s1": ["BTC_USDT_Perp@500"], + "ug": true }, "i": 123 } @@ -357,7 +369,8 @@ STREAM: v1.mini.s "m": "unsubscribe", "p": { "s": "v1.mini.s", - "s1": ["BTC_USDT_Perp@500"] + "s1": ["BTC_USDT_Perp@500"], + "ug": true }, "i": 123 } @@ -388,7 +401,8 @@ STREAM: v1.mini.s "method": "subscribe", "params": { "stream": "v1.mini.s", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -403,7 +417,8 @@ STREAM: v1.mini.s "method": "unsubscribe", "params": { "stream": "v1.mini.s", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -433,7 +448,8 @@ STREAM: v1.mini.s "m": "subscribe", "p": { "s": "v1.mini.s", - "s1": ["BTC_USDT_Perp@500"] + "s1": ["BTC_USDT_Perp@500"], + "ug": true }, "i": 123 } @@ -448,7 +464,8 @@ STREAM: v1.mini.s "m": "unsubscribe", "p": { "s": "v1.mini.s", - "s1": ["BTC_USDT_Perp@500"] + "s1": ["BTC_USDT_Perp@500"], + "ug": true }, "i": 123 } @@ -479,7 +496,8 @@ STREAM: v1.mini.s "method": "subscribe", "params": { "stream": "v1.mini.s", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -494,7 +512,8 @@ STREAM: v1.mini.s "method": "unsubscribe", "params": { "stream": "v1.mini.s", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -524,7 +543,8 @@ STREAM: v1.mini.s "m": "subscribe", "p": { "s": "v1.mini.s", - "s1": ["BTC_USDT_Perp@500"] + "s1": ["BTC_USDT_Perp@500"], + "ug": true }, "i": 123 } @@ -539,7 +559,8 @@ STREAM: v1.mini.s "m": "unsubscribe", "p": { "s": "v1.mini.s", - "s1": ["BTC_USDT_Perp@500"] + "s1": ["BTC_USDT_Perp@500"], + "ug": true }, "i": 123 } @@ -587,7 +608,8 @@ STREAM: v1.mini.d "method": "subscribe", "params": { "stream": "v1.mini.d", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -601,7 +623,8 @@ STREAM: v1.mini.d "subs": ["BTC_USDT_Perp@500"], "unsubs": [], "num_snapshots": [10], - "first_sequence_number": [872634876] + "first_sequence_number": [872634876], + "latest_sequence_number": [872634875] }, "id": 123, "method": "subscribe" @@ -615,7 +638,8 @@ STREAM: v1.mini.d "method": "unsubscribe", "params": { "stream": "v1.mini.d", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -679,7 +703,8 @@ STREAM: v1.mini.d "best_bid_size": "123456.78", "best_ask_price": "65038.01", "best_ask_size": "123456.78" - } + }, + "prev_sequence_number": "872634875" } ``` **Lite Feed Response** @@ -700,7 +725,8 @@ STREAM: v1.mini.d "bb1": "123456.78", "ba": "65038.01", "ba1": "123456.78" - } + }, + "ps": "872634875" } ``` @@ -765,7 +791,8 @@ STREAM: v1.mini.d "method": "subscribe", "params": { "stream": "v1.mini.d", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -780,7 +807,8 @@ STREAM: v1.mini.d "method": "unsubscribe", "params": { "stream": "v1.mini.d", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -810,7 +838,8 @@ STREAM: v1.mini.d "m": "subscribe", "p": { "s": "v1.mini.d", - "s1": ["BTC_USDT_Perp@500"] + "s1": ["BTC_USDT_Perp@500"], + "ug": true }, "i": 123 } @@ -825,7 +854,8 @@ STREAM: v1.mini.d "m": "unsubscribe", "p": { "s": "v1.mini.d", - "s1": ["BTC_USDT_Perp@500"] + "s1": ["BTC_USDT_Perp@500"], + "ug": true }, "i": 123 } @@ -856,7 +886,8 @@ STREAM: v1.mini.d "method": "subscribe", "params": { "stream": "v1.mini.d", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -871,7 +902,8 @@ STREAM: v1.mini.d "method": "unsubscribe", "params": { "stream": "v1.mini.d", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -901,7 +933,8 @@ STREAM: v1.mini.d "m": "subscribe", "p": { "s": "v1.mini.d", - "s1": ["BTC_USDT_Perp@500"] + "s1": ["BTC_USDT_Perp@500"], + "ug": true }, "i": 123 } @@ -916,7 +949,8 @@ STREAM: v1.mini.d "m": "unsubscribe", "p": { "s": "v1.mini.d", - "s1": ["BTC_USDT_Perp@500"] + "s1": ["BTC_USDT_Perp@500"], + "ug": true }, "i": 123 } @@ -947,7 +981,8 @@ STREAM: v1.mini.d "method": "subscribe", "params": { "stream": "v1.mini.d", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -962,7 +997,8 @@ STREAM: v1.mini.d "method": "unsubscribe", "params": { "stream": "v1.mini.d", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -992,7 +1028,8 @@ STREAM: v1.mini.d "m": "subscribe", "p": { "s": "v1.mini.d", - "s1": ["BTC_USDT_Perp@500"] + "s1": ["BTC_USDT_Perp@500"], + "ug": true }, "i": 123 } @@ -1007,7 +1044,8 @@ STREAM: v1.mini.d "m": "unsubscribe", "p": { "s": "v1.mini.d", - "s1": ["BTC_USDT_Perp@500"] + "s1": ["BTC_USDT_Perp@500"], + "ug": true }, "i": 123 } @@ -1038,7 +1076,8 @@ STREAM: v1.mini.d "method": "subscribe", "params": { "stream": "v1.mini.d", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -1053,7 +1092,8 @@ STREAM: v1.mini.d "method": "unsubscribe", "params": { "stream": "v1.mini.d", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -1083,7 +1123,8 @@ STREAM: v1.mini.d "m": "subscribe", "p": { "s": "v1.mini.d", - "s1": ["BTC_USDT_Perp@500"] + "s1": ["BTC_USDT_Perp@500"], + "ug": true }, "i": 123 } @@ -1098,7 +1139,8 @@ STREAM: v1.mini.d "m": "unsubscribe", "p": { "s": "v1.mini.d", - "s1": ["BTC_USDT_Perp@500"] + "s1": ["BTC_USDT_Perp@500"], + "ug": true }, "i": 123 } @@ -1146,7 +1188,8 @@ STREAM: v1.ticker.s "method": "subscribe", "params": { "stream": "v1.ticker.s", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -1160,7 +1203,8 @@ STREAM: v1.ticker.s "subs": ["BTC_USDT_Perp@500"], "unsubs": [], "num_snapshots": [10], - "first_sequence_number": [872634876] + "first_sequence_number": [872634876], + "latest_sequence_number": [872634875] }, "id": 123, "method": "subscribe" @@ -1174,7 +1218,8 @@ STREAM: v1.ticker.s "method": "unsubscribe", "params": { "stream": "v1.ticker.s", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -1251,7 +1296,8 @@ STREAM: v1.ticker.s "open_price": "65038.01", "open_interest": "123456.78", "long_short_ratio": "0.5" - } + }, + "prev_sequence_number": "872634875" } ``` **Lite Feed Response** @@ -1285,7 +1331,8 @@ STREAM: v1.ticker.s "op": "65038.01", "oi": "123456.78", "ls1": "0.5" - } + }, + "ps": "872634875" } ``` @@ -1350,7 +1397,8 @@ STREAM: v1.ticker.s "method": "subscribe", "params": { "stream": "v1.ticker.s", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -1365,7 +1413,8 @@ STREAM: v1.ticker.s "method": "unsubscribe", "params": { "stream": "v1.ticker.s", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -1395,7 +1444,8 @@ STREAM: v1.ticker.s "m": "subscribe", "p": { "s": "v1.ticker.s", - "s1": ["BTC_USDT_Perp@500"] + "s1": ["BTC_USDT_Perp@500"], + "ug": true }, "i": 123 } @@ -1410,7 +1460,8 @@ STREAM: v1.ticker.s "m": "unsubscribe", "p": { "s": "v1.ticker.s", - "s1": ["BTC_USDT_Perp@500"] + "s1": ["BTC_USDT_Perp@500"], + "ug": true }, "i": 123 } @@ -1441,7 +1492,8 @@ STREAM: v1.ticker.s "method": "subscribe", "params": { "stream": "v1.ticker.s", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -1456,7 +1508,8 @@ STREAM: v1.ticker.s "method": "unsubscribe", "params": { "stream": "v1.ticker.s", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -1486,7 +1539,8 @@ STREAM: v1.ticker.s "m": "subscribe", "p": { "s": "v1.ticker.s", - "s1": ["BTC_USDT_Perp@500"] + "s1": ["BTC_USDT_Perp@500"], + "ug": true }, "i": 123 } @@ -1501,7 +1555,8 @@ STREAM: v1.ticker.s "m": "unsubscribe", "p": { "s": "v1.ticker.s", - "s1": ["BTC_USDT_Perp@500"] + "s1": ["BTC_USDT_Perp@500"], + "ug": true }, "i": 123 } @@ -1532,7 +1587,8 @@ STREAM: v1.ticker.s "method": "subscribe", "params": { "stream": "v1.ticker.s", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -1547,7 +1603,8 @@ STREAM: v1.ticker.s "method": "unsubscribe", "params": { "stream": "v1.ticker.s", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -1577,7 +1634,8 @@ STREAM: v1.ticker.s "m": "subscribe", "p": { "s": "v1.ticker.s", - "s1": ["BTC_USDT_Perp@500"] + "s1": ["BTC_USDT_Perp@500"], + "ug": true }, "i": 123 } @@ -1592,7 +1650,8 @@ STREAM: v1.ticker.s "m": "unsubscribe", "p": { "s": "v1.ticker.s", - "s1": ["BTC_USDT_Perp@500"] + "s1": ["BTC_USDT_Perp@500"], + "ug": true }, "i": 123 } @@ -1623,7 +1682,8 @@ STREAM: v1.ticker.s "method": "subscribe", "params": { "stream": "v1.ticker.s", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -1638,7 +1698,8 @@ STREAM: v1.ticker.s "method": "unsubscribe", "params": { "stream": "v1.ticker.s", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -1668,7 +1729,8 @@ STREAM: v1.ticker.s "m": "subscribe", "p": { "s": "v1.ticker.s", - "s1": ["BTC_USDT_Perp@500"] + "s1": ["BTC_USDT_Perp@500"], + "ug": true }, "i": 123 } @@ -1683,7 +1745,8 @@ STREAM: v1.ticker.s "m": "unsubscribe", "p": { "s": "v1.ticker.s", - "s1": ["BTC_USDT_Perp@500"] + "s1": ["BTC_USDT_Perp@500"], + "ug": true }, "i": 123 } @@ -1731,7 +1794,8 @@ STREAM: v1.ticker.d "method": "subscribe", "params": { "stream": "v1.ticker.d", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -1745,7 +1809,8 @@ STREAM: v1.ticker.d "subs": ["BTC_USDT_Perp@500"], "unsubs": [], "num_snapshots": [10], - "first_sequence_number": [872634876] + "first_sequence_number": [872634876], + "latest_sequence_number": [872634875] }, "id": 123, "method": "subscribe" @@ -1759,7 +1824,8 @@ STREAM: v1.ticker.d "method": "unsubscribe", "params": { "stream": "v1.ticker.d", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -1836,7 +1902,8 @@ STREAM: v1.ticker.d "open_price": "65038.01", "open_interest": "123456.78", "long_short_ratio": "0.5" - } + }, + "prev_sequence_number": "872634875" } ``` **Lite Feed Response** @@ -1870,7 +1937,8 @@ STREAM: v1.ticker.d "op": "65038.01", "oi": "123456.78", "ls1": "0.5" - } + }, + "ps": "872634875" } ``` @@ -1935,7 +2003,8 @@ STREAM: v1.ticker.d "method": "subscribe", "params": { "stream": "v1.ticker.d", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -1950,7 +2019,8 @@ STREAM: v1.ticker.d "method": "unsubscribe", "params": { "stream": "v1.ticker.d", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -1980,7 +2050,8 @@ STREAM: v1.ticker.d "m": "subscribe", "p": { "s": "v1.ticker.d", - "s1": ["BTC_USDT_Perp@500"] + "s1": ["BTC_USDT_Perp@500"], + "ug": true }, "i": 123 } @@ -1995,7 +2066,8 @@ STREAM: v1.ticker.d "m": "unsubscribe", "p": { "s": "v1.ticker.d", - "s1": ["BTC_USDT_Perp@500"] + "s1": ["BTC_USDT_Perp@500"], + "ug": true }, "i": 123 } @@ -2026,7 +2098,8 @@ STREAM: v1.ticker.d "method": "subscribe", "params": { "stream": "v1.ticker.d", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -2041,7 +2114,8 @@ STREAM: v1.ticker.d "method": "unsubscribe", "params": { "stream": "v1.ticker.d", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -2071,7 +2145,8 @@ STREAM: v1.ticker.d "m": "subscribe", "p": { "s": "v1.ticker.d", - "s1": ["BTC_USDT_Perp@500"] + "s1": ["BTC_USDT_Perp@500"], + "ug": true }, "i": 123 } @@ -2086,7 +2161,8 @@ STREAM: v1.ticker.d "m": "unsubscribe", "p": { "s": "v1.ticker.d", - "s1": ["BTC_USDT_Perp@500"] + "s1": ["BTC_USDT_Perp@500"], + "ug": true }, "i": 123 } @@ -2117,7 +2193,8 @@ STREAM: v1.ticker.d "method": "subscribe", "params": { "stream": "v1.ticker.d", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -2132,7 +2209,8 @@ STREAM: v1.ticker.d "method": "unsubscribe", "params": { "stream": "v1.ticker.d", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -2162,7 +2240,8 @@ STREAM: v1.ticker.d "m": "subscribe", "p": { "s": "v1.ticker.d", - "s1": ["BTC_USDT_Perp@500"] + "s1": ["BTC_USDT_Perp@500"], + "ug": true }, "i": 123 } @@ -2177,7 +2256,8 @@ STREAM: v1.ticker.d "m": "unsubscribe", "p": { "s": "v1.ticker.d", - "s1": ["BTC_USDT_Perp@500"] + "s1": ["BTC_USDT_Perp@500"], + "ug": true }, "i": 123 } @@ -2208,7 +2288,8 @@ STREAM: v1.ticker.d "method": "subscribe", "params": { "stream": "v1.ticker.d", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -2223,7 +2304,8 @@ STREAM: v1.ticker.d "method": "unsubscribe", "params": { "stream": "v1.ticker.d", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -2253,7 +2335,8 @@ STREAM: v1.ticker.d "m": "subscribe", "p": { "s": "v1.ticker.d", - "s1": ["BTC_USDT_Perp@500"] + "s1": ["BTC_USDT_Perp@500"], + "ug": true }, "i": 123 } @@ -2268,7 +2351,8 @@ STREAM: v1.ticker.d "m": "unsubscribe", "p": { "s": "v1.ticker.d", - "s1": ["BTC_USDT_Perp@500"] + "s1": ["BTC_USDT_Perp@500"], + "ug": true }, "i": 123 } @@ -2317,7 +2401,8 @@ STREAM: v1.book.s "method": "subscribe", "params": { "stream": "v1.book.s", - "selectors": ["BTC_USDT_Perp@500-50"] + "selectors": ["BTC_USDT_Perp@500-50"], + "use_global_sequence_number": true }, "id": 123 } @@ -2331,7 +2416,8 @@ STREAM: v1.book.s "subs": ["BTC_USDT_Perp@500-50"], "unsubs": [], "num_snapshots": [10], - "first_sequence_number": [872634876] + "first_sequence_number": [872634876], + "latest_sequence_number": [872634875] }, "id": 123, "method": "subscribe" @@ -2345,7 +2431,8 @@ STREAM: v1.book.s "method": "unsubscribe", "params": { "stream": "v1.book.s", - "selectors": ["BTC_USDT_Perp@500-50"] + "selectors": ["BTC_USDT_Perp@500-50"], + "use_global_sequence_number": true }, "id": 123 } @@ -2410,7 +2497,8 @@ STREAM: v1.book.s "size": "3456.78", "num_orders": 123 }] - } + }, + "prev_sequence_number": "872634875" } ``` **Lite Feed Response** @@ -2432,7 +2520,8 @@ STREAM: v1.book.s "s": "3456.78", "no": 123 }] - } + }, + "ps": "872634875" } ``` @@ -2498,7 +2587,8 @@ STREAM: v1.book.s "method": "subscribe", "params": { "stream": "v1.book.s", - "selectors": ["BTC_USDT_Perp@500-50"] + "selectors": ["BTC_USDT_Perp@500-50"], + "use_global_sequence_number": true }, "id": 123 } @@ -2513,7 +2603,8 @@ STREAM: v1.book.s "method": "unsubscribe", "params": { "stream": "v1.book.s", - "selectors": ["BTC_USDT_Perp@500-50"] + "selectors": ["BTC_USDT_Perp@500-50"], + "use_global_sequence_number": true }, "id": 123 } @@ -2543,7 +2634,8 @@ STREAM: v1.book.s "m": "subscribe", "p": { "s": "v1.book.s", - "s1": ["BTC_USDT_Perp@500-50"] + "s1": ["BTC_USDT_Perp@500-50"], + "ug": true }, "i": 123 } @@ -2558,7 +2650,8 @@ STREAM: v1.book.s "m": "unsubscribe", "p": { "s": "v1.book.s", - "s1": ["BTC_USDT_Perp@500-50"] + "s1": ["BTC_USDT_Perp@500-50"], + "ug": true }, "i": 123 } @@ -2589,7 +2682,8 @@ STREAM: v1.book.s "method": "subscribe", "params": { "stream": "v1.book.s", - "selectors": ["BTC_USDT_Perp@500-50"] + "selectors": ["BTC_USDT_Perp@500-50"], + "use_global_sequence_number": true }, "id": 123 } @@ -2604,7 +2698,8 @@ STREAM: v1.book.s "method": "unsubscribe", "params": { "stream": "v1.book.s", - "selectors": ["BTC_USDT_Perp@500-50"] + "selectors": ["BTC_USDT_Perp@500-50"], + "use_global_sequence_number": true }, "id": 123 } @@ -2634,7 +2729,8 @@ STREAM: v1.book.s "m": "subscribe", "p": { "s": "v1.book.s", - "s1": ["BTC_USDT_Perp@500-50"] + "s1": ["BTC_USDT_Perp@500-50"], + "ug": true }, "i": 123 } @@ -2649,7 +2745,8 @@ STREAM: v1.book.s "m": "unsubscribe", "p": { "s": "v1.book.s", - "s1": ["BTC_USDT_Perp@500-50"] + "s1": ["BTC_USDT_Perp@500-50"], + "ug": true }, "i": 123 } @@ -2680,7 +2777,8 @@ STREAM: v1.book.s "method": "subscribe", "params": { "stream": "v1.book.s", - "selectors": ["BTC_USDT_Perp@500-50"] + "selectors": ["BTC_USDT_Perp@500-50"], + "use_global_sequence_number": true }, "id": 123 } @@ -2695,7 +2793,8 @@ STREAM: v1.book.s "method": "unsubscribe", "params": { "stream": "v1.book.s", - "selectors": ["BTC_USDT_Perp@500-50"] + "selectors": ["BTC_USDT_Perp@500-50"], + "use_global_sequence_number": true }, "id": 123 } @@ -2725,7 +2824,8 @@ STREAM: v1.book.s "m": "subscribe", "p": { "s": "v1.book.s", - "s1": ["BTC_USDT_Perp@500-50"] + "s1": ["BTC_USDT_Perp@500-50"], + "ug": true }, "i": 123 } @@ -2740,7 +2840,8 @@ STREAM: v1.book.s "m": "unsubscribe", "p": { "s": "v1.book.s", - "s1": ["BTC_USDT_Perp@500-50"] + "s1": ["BTC_USDT_Perp@500-50"], + "ug": true }, "i": 123 } @@ -2771,7 +2872,8 @@ STREAM: v1.book.s "method": "subscribe", "params": { "stream": "v1.book.s", - "selectors": ["BTC_USDT_Perp@500-50"] + "selectors": ["BTC_USDT_Perp@500-50"], + "use_global_sequence_number": true }, "id": 123 } @@ -2786,7 +2888,8 @@ STREAM: v1.book.s "method": "unsubscribe", "params": { "stream": "v1.book.s", - "selectors": ["BTC_USDT_Perp@500-50"] + "selectors": ["BTC_USDT_Perp@500-50"], + "use_global_sequence_number": true }, "id": 123 } @@ -2816,7 +2919,8 @@ STREAM: v1.book.s "m": "subscribe", "p": { "s": "v1.book.s", - "s1": ["BTC_USDT_Perp@500-50"] + "s1": ["BTC_USDT_Perp@500-50"], + "ug": true }, "i": 123 } @@ -2831,7 +2935,8 @@ STREAM: v1.book.s "m": "unsubscribe", "p": { "s": "v1.book.s", - "s1": ["BTC_USDT_Perp@500-50"] + "s1": ["BTC_USDT_Perp@500-50"], + "ug": true }, "i": 123 } @@ -2879,7 +2984,8 @@ STREAM: v1.book.d "method": "subscribe", "params": { "stream": "v1.book.d", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -2893,7 +2999,8 @@ STREAM: v1.book.d "subs": ["BTC_USDT_Perp@500"], "unsubs": [], "num_snapshots": [10], - "first_sequence_number": [872634876] + "first_sequence_number": [872634876], + "latest_sequence_number": [872634875] }, "id": 123, "method": "subscribe" @@ -2907,7 +3014,8 @@ STREAM: v1.book.d "method": "unsubscribe", "params": { "stream": "v1.book.d", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -2972,7 +3080,8 @@ STREAM: v1.book.d "size": "3456.78", "num_orders": 123 }] - } + }, + "prev_sequence_number": "872634875" } ``` **Lite Feed Response** @@ -2994,7 +3103,8 @@ STREAM: v1.book.d "s": "3456.78", "no": 123 }] - } + }, + "ps": "872634875" } ``` @@ -3059,7 +3169,8 @@ STREAM: v1.book.d "method": "subscribe", "params": { "stream": "v1.book.d", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -3074,7 +3185,8 @@ STREAM: v1.book.d "method": "unsubscribe", "params": { "stream": "v1.book.d", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -3104,7 +3216,8 @@ STREAM: v1.book.d "m": "subscribe", "p": { "s": "v1.book.d", - "s1": ["BTC_USDT_Perp@500"] + "s1": ["BTC_USDT_Perp@500"], + "ug": true }, "i": 123 } @@ -3119,7 +3232,8 @@ STREAM: v1.book.d "m": "unsubscribe", "p": { "s": "v1.book.d", - "s1": ["BTC_USDT_Perp@500"] + "s1": ["BTC_USDT_Perp@500"], + "ug": true }, "i": 123 } @@ -3150,7 +3264,8 @@ STREAM: v1.book.d "method": "subscribe", "params": { "stream": "v1.book.d", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -3165,7 +3280,8 @@ STREAM: v1.book.d "method": "unsubscribe", "params": { "stream": "v1.book.d", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -3195,7 +3311,8 @@ STREAM: v1.book.d "m": "subscribe", "p": { "s": "v1.book.d", - "s1": ["BTC_USDT_Perp@500"] + "s1": ["BTC_USDT_Perp@500"], + "ug": true }, "i": 123 } @@ -3210,7 +3327,8 @@ STREAM: v1.book.d "m": "unsubscribe", "p": { "s": "v1.book.d", - "s1": ["BTC_USDT_Perp@500"] + "s1": ["BTC_USDT_Perp@500"], + "ug": true }, "i": 123 } @@ -3241,7 +3359,8 @@ STREAM: v1.book.d "method": "subscribe", "params": { "stream": "v1.book.d", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -3256,7 +3375,8 @@ STREAM: v1.book.d "method": "unsubscribe", "params": { "stream": "v1.book.d", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -3286,7 +3406,8 @@ STREAM: v1.book.d "m": "subscribe", "p": { "s": "v1.book.d", - "s1": ["BTC_USDT_Perp@500"] + "s1": ["BTC_USDT_Perp@500"], + "ug": true }, "i": 123 } @@ -3301,7 +3422,8 @@ STREAM: v1.book.d "m": "unsubscribe", "p": { "s": "v1.book.d", - "s1": ["BTC_USDT_Perp@500"] + "s1": ["BTC_USDT_Perp@500"], + "ug": true }, "i": 123 } @@ -3332,7 +3454,8 @@ STREAM: v1.book.d "method": "subscribe", "params": { "stream": "v1.book.d", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -3347,7 +3470,8 @@ STREAM: v1.book.d "method": "unsubscribe", "params": { "stream": "v1.book.d", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -3377,7 +3501,8 @@ STREAM: v1.book.d "m": "subscribe", "p": { "s": "v1.book.d", - "s1": ["BTC_USDT_Perp@500"] + "s1": ["BTC_USDT_Perp@500"], + "ug": true }, "i": 123 } @@ -3392,7 +3517,8 @@ STREAM: v1.book.d "m": "unsubscribe", "p": { "s": "v1.book.d", - "s1": ["BTC_USDT_Perp@500"] + "s1": ["BTC_USDT_Perp@500"], + "ug": true }, "i": 123 } @@ -3441,7 +3567,8 @@ STREAM: v1.trade "method": "subscribe", "params": { "stream": "v1.trade", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -3455,7 +3582,8 @@ STREAM: v1.trade "subs": ["BTC_USDT_Perp@500"], "unsubs": [], "num_snapshots": [10], - "first_sequence_number": [872634876] + "first_sequence_number": [872634876], + "latest_sequence_number": [872634875] }, "id": 123, "method": "subscribe" @@ -3469,7 +3597,8 @@ STREAM: v1.trade "method": "unsubscribe", "params": { "stream": "v1.trade", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -3533,7 +3662,8 @@ STREAM: v1.trade "forward_price": "65038.01", "trade_id": "209358-2", "venue": "ORDERBOOK" - } + }, + "prev_sequence_number": "872634875" } ``` **Lite Feed Response** @@ -3554,7 +3684,8 @@ STREAM: v1.trade "fp": "65038.01", "ti": "209358-2", "v": "ORDERBOOK" - } + }, + "ps": "872634875" } ``` @@ -3619,7 +3750,8 @@ STREAM: v1.trade "method": "subscribe", "params": { "stream": "v1.trade", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -3634,7 +3766,8 @@ STREAM: v1.trade "method": "unsubscribe", "params": { "stream": "v1.trade", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -3664,7 +3797,8 @@ STREAM: v1.trade "m": "subscribe", "p": { "s": "v1.trade", - "s1": ["BTC_USDT_Perp@500"] + "s1": ["BTC_USDT_Perp@500"], + "ug": true }, "i": 123 } @@ -3679,7 +3813,8 @@ STREAM: v1.trade "m": "unsubscribe", "p": { "s": "v1.trade", - "s1": ["BTC_USDT_Perp@500"] + "s1": ["BTC_USDT_Perp@500"], + "ug": true }, "i": 123 } @@ -3710,7 +3845,8 @@ STREAM: v1.trade "method": "subscribe", "params": { "stream": "v1.trade", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -3725,7 +3861,8 @@ STREAM: v1.trade "method": "unsubscribe", "params": { "stream": "v1.trade", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -3755,7 +3892,8 @@ STREAM: v1.trade "m": "subscribe", "p": { "s": "v1.trade", - "s1": ["BTC_USDT_Perp@500"] + "s1": ["BTC_USDT_Perp@500"], + "ug": true }, "i": 123 } @@ -3770,7 +3908,8 @@ STREAM: v1.trade "m": "unsubscribe", "p": { "s": "v1.trade", - "s1": ["BTC_USDT_Perp@500"] + "s1": ["BTC_USDT_Perp@500"], + "ug": true }, "i": 123 } @@ -3801,7 +3940,8 @@ STREAM: v1.trade "method": "subscribe", "params": { "stream": "v1.trade", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -3816,7 +3956,8 @@ STREAM: v1.trade "method": "unsubscribe", "params": { "stream": "v1.trade", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -3846,7 +3987,8 @@ STREAM: v1.trade "m": "subscribe", "p": { "s": "v1.trade", - "s1": ["BTC_USDT_Perp@500"] + "s1": ["BTC_USDT_Perp@500"], + "ug": true }, "i": 123 } @@ -3861,7 +4003,8 @@ STREAM: v1.trade "m": "unsubscribe", "p": { "s": "v1.trade", - "s1": ["BTC_USDT_Perp@500"] + "s1": ["BTC_USDT_Perp@500"], + "ug": true }, "i": 123 } @@ -3892,7 +4035,8 @@ STREAM: v1.trade "method": "subscribe", "params": { "stream": "v1.trade", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -3907,7 +4051,8 @@ STREAM: v1.trade "method": "unsubscribe", "params": { "stream": "v1.trade", - "selectors": ["BTC_USDT_Perp@500"] + "selectors": ["BTC_USDT_Perp@500"], + "use_global_sequence_number": true }, "id": 123 } @@ -3937,7 +4082,8 @@ STREAM: v1.trade "m": "subscribe", "p": { "s": "v1.trade", - "s1": ["BTC_USDT_Perp@500"] + "s1": ["BTC_USDT_Perp@500"], + "ug": true }, "i": 123 } @@ -3952,7 +4098,8 @@ STREAM: v1.trade "m": "unsubscribe", "p": { "s": "v1.trade", - "s1": ["BTC_USDT_Perp@500"] + "s1": ["BTC_USDT_Perp@500"], + "ug": true }, "i": 123 } @@ -4001,7 +4148,8 @@ STREAM: v1.candle "method": "subscribe", "params": { "stream": "v1.candle", - "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"] + "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"], + "use_global_sequence_number": true }, "id": 123 } @@ -4015,7 +4163,8 @@ STREAM: v1.candle "subs": ["BTC_USDT_Perp@CI_1_M-TRADE"], "unsubs": [], "num_snapshots": [10], - "first_sequence_number": [872634876] + "first_sequence_number": [872634876], + "latest_sequence_number": [872634875] }, "id": 123, "method": "subscribe" @@ -4029,7 +4178,8 @@ STREAM: v1.candle "method": "unsubscribe", "params": { "stream": "v1.candle", - "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"] + "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"], + "use_global_sequence_number": true }, "id": 123 } @@ -4092,7 +4242,8 @@ STREAM: v1.candle "volume_q": "123456.78", "trades": 123456, "instrument": "BTC_USDT_Perp" - } + }, + "prev_sequence_number": "872634875" } ``` **Lite Feed Response** @@ -4112,7 +4263,8 @@ STREAM: v1.candle "vq": "123456.78", "t": 123456, "i": "BTC_USDT_Perp" - } + }, + "ps": "872634875" } ``` @@ -4177,7 +4329,8 @@ STREAM: v1.candle "method": "subscribe", "params": { "stream": "v1.candle", - "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"] + "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"], + "use_global_sequence_number": true }, "id": 123 } @@ -4192,7 +4345,8 @@ STREAM: v1.candle "method": "unsubscribe", "params": { "stream": "v1.candle", - "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"] + "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"], + "use_global_sequence_number": true }, "id": 123 } @@ -4222,7 +4376,8 @@ STREAM: v1.candle "m": "subscribe", "p": { "s": "v1.candle", - "s1": ["BTC_USDT_Perp@CI_1_M-TRADE"] + "s1": ["BTC_USDT_Perp@CI_1_M-TRADE"], + "ug": true }, "i": 123 } @@ -4237,7 +4392,8 @@ STREAM: v1.candle "m": "unsubscribe", "p": { "s": "v1.candle", - "s1": ["BTC_USDT_Perp@CI_1_M-TRADE"] + "s1": ["BTC_USDT_Perp@CI_1_M-TRADE"], + "ug": true }, "i": 123 } @@ -4268,7 +4424,8 @@ STREAM: v1.candle "method": "subscribe", "params": { "stream": "v1.candle", - "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"] + "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"], + "use_global_sequence_number": true }, "id": 123 } @@ -4283,7 +4440,8 @@ STREAM: v1.candle "method": "unsubscribe", "params": { "stream": "v1.candle", - "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"] + "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"], + "use_global_sequence_number": true }, "id": 123 } @@ -4313,7 +4471,8 @@ STREAM: v1.candle "m": "subscribe", "p": { "s": "v1.candle", - "s1": ["BTC_USDT_Perp@CI_1_M-TRADE"] + "s1": ["BTC_USDT_Perp@CI_1_M-TRADE"], + "ug": true }, "i": 123 } @@ -4328,7 +4487,8 @@ STREAM: v1.candle "m": "unsubscribe", "p": { "s": "v1.candle", - "s1": ["BTC_USDT_Perp@CI_1_M-TRADE"] + "s1": ["BTC_USDT_Perp@CI_1_M-TRADE"], + "ug": true }, "i": 123 } @@ -4359,7 +4519,8 @@ STREAM: v1.candle "method": "subscribe", "params": { "stream": "v1.candle", - "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"] + "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"], + "use_global_sequence_number": true }, "id": 123 } @@ -4374,7 +4535,8 @@ STREAM: v1.candle "method": "unsubscribe", "params": { "stream": "v1.candle", - "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"] + "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"], + "use_global_sequence_number": true }, "id": 123 } @@ -4404,7 +4566,8 @@ STREAM: v1.candle "m": "subscribe", "p": { "s": "v1.candle", - "s1": ["BTC_USDT_Perp@CI_1_M-TRADE"] + "s1": ["BTC_USDT_Perp@CI_1_M-TRADE"], + "ug": true }, "i": 123 } @@ -4419,7 +4582,8 @@ STREAM: v1.candle "m": "unsubscribe", "p": { "s": "v1.candle", - "s1": ["BTC_USDT_Perp@CI_1_M-TRADE"] + "s1": ["BTC_USDT_Perp@CI_1_M-TRADE"], + "ug": true }, "i": 123 } @@ -4450,7 +4614,8 @@ STREAM: v1.candle "method": "subscribe", "params": { "stream": "v1.candle", - "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"] + "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"], + "use_global_sequence_number": true }, "id": 123 } @@ -4465,7 +4630,8 @@ STREAM: v1.candle "method": "unsubscribe", "params": { "stream": "v1.candle", - "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"] + "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"], + "use_global_sequence_number": true }, "id": 123 } @@ -4495,7 +4661,8 @@ STREAM: v1.candle "m": "subscribe", "p": { "s": "v1.candle", - "s1": ["BTC_USDT_Perp@CI_1_M-TRADE"] + "s1": ["BTC_USDT_Perp@CI_1_M-TRADE"], + "ug": true }, "i": 123 } @@ -4510,7 +4677,8 @@ STREAM: v1.candle "m": "unsubscribe", "p": { "s": "v1.candle", - "s1": ["BTC_USDT_Perp@CI_1_M-TRADE"] + "s1": ["BTC_USDT_Perp@CI_1_M-TRADE"], + "ug": true }, "i": 123 } diff --git a/artifacts/apidocs/schemas/aggregated_account_summary.md b/artifacts/apidocs/schemas/aggregated_account_summary.md index 33aae2a..2e0f592 100644 --- a/artifacts/apidocs/schemas/aggregated_account_summary.md +++ b/artifacts/apidocs/schemas/aggregated_account_summary.md @@ -29,3 +29,27 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/api_aggregated_account_summary_response.md b/artifacts/apidocs/schemas/api_aggregated_account_summary_response.md index 05c7964..7ac3d3c 100644 --- a/artifacts/apidocs/schemas/api_aggregated_account_summary_response.md +++ b/artifacts/apidocs/schemas/api_aggregated_account_summary_response.md @@ -35,3 +35,27 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/api_cancel_all_orders_request.md b/artifacts/apidocs/schemas/api_cancel_all_orders_request.md index b37e067..04e4be2 100644 --- a/artifacts/apidocs/schemas/api_cancel_all_orders_request.md +++ b/artifacts/apidocs/schemas/api_cancel_all_orders_request.md @@ -35,6 +35,30 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| ??? info "[Currency](/../../schemas/currency)" The list of Currencies that are supported on the GRVT exchange
@@ -54,3 +78,27 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/api_cancel_on_disconnect_request.md b/artifacts/apidocs/schemas/api_cancel_on_disconnect_request.md new file mode 100644 index 0000000..2fdc090 --- /dev/null +++ b/artifacts/apidocs/schemas/api_cancel_on_disconnect_request.md @@ -0,0 +1,7 @@ +!!! info "[ApiCancelOnDisconnectRequest](/../../schemas/api_cancel_on_disconnect_request)" + Auto-Cancel All Open Orders when the countdown time hits zero.

Market Maker inputs a countdown time parameter in milliseconds (e.g. 120000 for 120s) rounded down to the smallest second follows the following logic:
- Market Maker initially entered a value between 0 -> 1000, which is rounded to 0: will result in termination of their COD
- Market Maker initially entered a value between 1001 -> 300_000, which is rounded to the nearest second: will result in refresh of their COD
- Market Maker initially entered a value bigger than 300_000, which will result in error (upper bound)
Market Maker will send a heartbeat message by calling the endpoint at specific intervals (ex. every 30 seconds) to the server to refresh the count down.

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
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |sub_account_id
`sa` |string|True|The subaccount ID cancelling the orders for| + |countdown_time
`ct` |string|False
`1000`|Countdown time in milliseconds (ex. 120000 for 120s).

0 to disable the timer.

Does not accept negative values.

Minimum acceptable value is 1,000.

Maximum acceptable value is 300,000| diff --git a/artifacts/apidocs/schemas/api_cancel_order_request.md b/artifacts/apidocs/schemas/api_cancel_order_request.md index 70bd101..49be94f 100644 --- a/artifacts/apidocs/schemas/api_cancel_order_request.md +++ b/artifacts/apidocs/schemas/api_cancel_order_request.md @@ -6,3 +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
`500`|Specifies the time-to-live (in milliseconds) for this cancellation.
During this period, any order creation with a matching `client_order_id` will also be cancelled.
This mechanism helps mitigate time-of-flight issues where cancellations might arrive before the corresponding orders.
Hence, cancellation by `order_id` ignores this field as the exchange can only assign `order_id`s to already-processed order creations.
The duration cannot be negative, is rounded down to the nearest 100ms (e.g., `670` -> `600`, `30` -> `0`) and capped at 5 seconds (i.e., `5000`).
Value of `0` or omission disables the TTL mechanism, so only orders already existing in matcher state at request time will be searched.
| diff --git a/artifacts/apidocs/schemas/api_cancel_order_response.md b/artifacts/apidocs/schemas/api_cancel_order_response.md index b47ccd1..5221294 100644 --- a/artifacts/apidocs/schemas/api_cancel_order_response.md +++ b/artifacts/apidocs/schemas/api_cancel_order_response.md @@ -53,6 +53,46 @@ |-|-|-|-| |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| + |trigger
`t` |TriggerOrderMetadata|True|Trigger fields are used to support any type of trigger order such as TP/SL| + |broker
`b` |BrokerTag|False
``|Specifies the broker who brokered the order| + ??? info "[TriggerOrderMetadata](/../../schemas/trigger_order_metadata)" + Contains metadata related to trigger orders, such as Take Profit (TP) or Stop Loss (SL).

Trigger orders are used to automatically execute an order when a predefined price condition is met, allowing traders to implement risk management strategies.


+ + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |trigger_type
`tt` |TriggerType|True|Type of the trigger order. eg: Take Profit, Stop Loss, etc| + |tpsl
`t` |TPSLOrderMetadata|True|Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

| + ??? info "[TriggerType](/../../schemas/trigger_type)" + Defines the type of trigger order used in trading, such as Take Profit or Stop Loss.

Trigger orders allow execution based on pre-defined price conditions rather than immediate market conditions.


+ + |Value| Description | + |-|-| + |`UNSPECIFIED` = 0|Not a trigger order. The order executes normally without any trigger conditions.| + |`TAKE_PROFIT` = 1|Take Profit Order - Executes when the price reaches a specified level to secure profits.| + |`STOP_LOSS` = 2|Stop Loss Order - Executes when the price reaches a specified level to limit losses.| + ??? info "[TPSLOrderMetadata](/../../schemas/tpsl_order_metadata)" + Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

### Fields:
- **triggerBy**: Defines the price type that activates the order (e.g., index price).
- **triggerPrice**: The price at which the order is triggered, expressed in `9` decimal precision.


+ + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |trigger_by
`tb` |TriggerBy|True|Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order| + |trigger_price
`tp` |string|True|The Trigger Price of the order, expressed in `9` decimals.| + ??? info "[TriggerBy](/../../schemas/trigger_by)" + Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order.

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.


+ + |Value| Description | + |-|-| + |`UNSPECIFIED` = 0|no trigger condition| + |`INDEX` = 1|INDEX - Order is activated when the index price reaches the trigger price| + |`LAST` = 2|LAST - Order is activated when the last trade price reaches the trigger price| + ??? info "[BrokerTag](/../../schemas/broker_tag)" + BrokerTag is a tag for the broker that the order is sent from.
+ + |Value| Description | + |-|-| + |`COIN_ROUTES` = 1|CoinRoutes| + |`ALERTATRON` = 2|Alertatron| + |`ORIGAMI` = 3|Origami| ??? info "[OrderState](/../../schemas/order_state)" |Name
`Lite`|Type|Required
`Default`| Description | |-|-|-|-| @@ -102,3 +142,4 @@ |`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| diff --git a/artifacts/apidocs/schemas/api_create_order_request.md b/artifacts/apidocs/schemas/api_create_order_request.md index c6b3da1..b71ea21 100644 --- a/artifacts/apidocs/schemas/api_create_order_request.md +++ b/artifacts/apidocs/schemas/api_create_order_request.md @@ -55,6 +55,46 @@ |-|-|-|-| |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| + |trigger
`t` |TriggerOrderMetadata|True|Trigger fields are used to support any type of trigger order such as TP/SL| + |broker
`b` |BrokerTag|False
``|Specifies the broker who brokered the order| + ??? info "[TriggerOrderMetadata](/../../schemas/trigger_order_metadata)" + Contains metadata related to trigger orders, such as Take Profit (TP) or Stop Loss (SL).

Trigger orders are used to automatically execute an order when a predefined price condition is met, allowing traders to implement risk management strategies.


+ + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |trigger_type
`tt` |TriggerType|True|Type of the trigger order. eg: Take Profit, Stop Loss, etc| + |tpsl
`t` |TPSLOrderMetadata|True|Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

| + ??? info "[TriggerType](/../../schemas/trigger_type)" + Defines the type of trigger order used in trading, such as Take Profit or Stop Loss.

Trigger orders allow execution based on pre-defined price conditions rather than immediate market conditions.


+ + |Value| Description | + |-|-| + |`UNSPECIFIED` = 0|Not a trigger order. The order executes normally without any trigger conditions.| + |`TAKE_PROFIT` = 1|Take Profit Order - Executes when the price reaches a specified level to secure profits.| + |`STOP_LOSS` = 2|Stop Loss Order - Executes when the price reaches a specified level to limit losses.| + ??? info "[TPSLOrderMetadata](/../../schemas/tpsl_order_metadata)" + Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

### Fields:
- **triggerBy**: Defines the price type that activates the order (e.g., index price).
- **triggerPrice**: The price at which the order is triggered, expressed in `9` decimal precision.


+ + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |trigger_by
`tb` |TriggerBy|True|Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order| + |trigger_price
`tp` |string|True|The Trigger Price of the order, expressed in `9` decimals.| + ??? info "[TriggerBy](/../../schemas/trigger_by)" + Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order.

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.


+ + |Value| Description | + |-|-| + |`UNSPECIFIED` = 0|no trigger condition| + |`INDEX` = 1|INDEX - Order is activated when the index price reaches the trigger price| + |`LAST` = 2|LAST - Order is activated when the last trade price reaches the trigger price| + ??? info "[BrokerTag](/../../schemas/broker_tag)" + BrokerTag is a tag for the broker that the order is sent from.
+ + |Value| Description | + |-|-| + |`COIN_ROUTES` = 1|CoinRoutes| + |`ALERTATRON` = 2|Alertatron| + |`ORIGAMI` = 3|Origami| ??? info "[OrderState](/../../schemas/order_state)" |Name
`Lite`|Type|Required
`Default`| Description | |-|-|-|-| @@ -104,3 +144,4 @@ |`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| diff --git a/artifacts/apidocs/schemas/api_create_order_response.md b/artifacts/apidocs/schemas/api_create_order_response.md index d646a8f..ec0bd33 100644 --- a/artifacts/apidocs/schemas/api_create_order_response.md +++ b/artifacts/apidocs/schemas/api_create_order_response.md @@ -53,6 +53,46 @@ |-|-|-|-| |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| + |trigger
`t` |TriggerOrderMetadata|True|Trigger fields are used to support any type of trigger order such as TP/SL| + |broker
`b` |BrokerTag|False
``|Specifies the broker who brokered the order| + ??? info "[TriggerOrderMetadata](/../../schemas/trigger_order_metadata)" + Contains metadata related to trigger orders, such as Take Profit (TP) or Stop Loss (SL).

Trigger orders are used to automatically execute an order when a predefined price condition is met, allowing traders to implement risk management strategies.


+ + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |trigger_type
`tt` |TriggerType|True|Type of the trigger order. eg: Take Profit, Stop Loss, etc| + |tpsl
`t` |TPSLOrderMetadata|True|Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

| + ??? info "[TriggerType](/../../schemas/trigger_type)" + Defines the type of trigger order used in trading, such as Take Profit or Stop Loss.

Trigger orders allow execution based on pre-defined price conditions rather than immediate market conditions.


+ + |Value| Description | + |-|-| + |`UNSPECIFIED` = 0|Not a trigger order. The order executes normally without any trigger conditions.| + |`TAKE_PROFIT` = 1|Take Profit Order - Executes when the price reaches a specified level to secure profits.| + |`STOP_LOSS` = 2|Stop Loss Order - Executes when the price reaches a specified level to limit losses.| + ??? info "[TPSLOrderMetadata](/../../schemas/tpsl_order_metadata)" + Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

### Fields:
- **triggerBy**: Defines the price type that activates the order (e.g., index price).
- **triggerPrice**: The price at which the order is triggered, expressed in `9` decimal precision.


+ + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |trigger_by
`tb` |TriggerBy|True|Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order| + |trigger_price
`tp` |string|True|The Trigger Price of the order, expressed in `9` decimals.| + ??? info "[TriggerBy](/../../schemas/trigger_by)" + Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order.

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.


+ + |Value| Description | + |-|-| + |`UNSPECIFIED` = 0|no trigger condition| + |`INDEX` = 1|INDEX - Order is activated when the index price reaches the trigger price| + |`LAST` = 2|LAST - Order is activated when the last trade price reaches the trigger price| + ??? info "[BrokerTag](/../../schemas/broker_tag)" + BrokerTag is a tag for the broker that the order is sent from.
+ + |Value| Description | + |-|-| + |`COIN_ROUTES` = 1|CoinRoutes| + |`ALERTATRON` = 2|Alertatron| + |`ORIGAMI` = 3|Origami| ??? info "[OrderState](/../../schemas/order_state)" |Name
`Lite`|Type|Required
`Default`| Description | |-|-|-|-| @@ -102,3 +142,4 @@ |`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| diff --git a/artifacts/apidocs/schemas/api_dedust_position_request.md b/artifacts/apidocs/schemas/api_dedust_position_request.md new file mode 100644 index 0000000..aed4ab8 --- /dev/null +++ b/artifacts/apidocs/schemas/api_dedust_position_request.md @@ -0,0 +1,147 @@ +!!! info "[ApiDedustPositionRequest](/../../schemas/api_dedust_position_request)" + Remove dust position (i.e., order quantity smaller than minimum required increment) on an account, by matching the specified order against GRVT directly. Limit price should always be better than mark price.
+ + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |order
`o` |Order|True|The order 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: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| + |trigger
`t` |TriggerOrderMetadata|True|Trigger fields are used to support any type of trigger order such as TP/SL| + |broker
`b` |BrokerTag|False
``|Specifies the broker who brokered the order| + ??? info "[TriggerOrderMetadata](/../../schemas/trigger_order_metadata)" + Contains metadata related to trigger orders, such as Take Profit (TP) or Stop Loss (SL).

Trigger orders are used to automatically execute an order when a predefined price condition is met, allowing traders to implement risk management strategies.


+ + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |trigger_type
`tt` |TriggerType|True|Type of the trigger order. eg: Take Profit, Stop Loss, etc| + |tpsl
`t` |TPSLOrderMetadata|True|Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

| + ??? info "[TriggerType](/../../schemas/trigger_type)" + Defines the type of trigger order used in trading, such as Take Profit or Stop Loss.

Trigger orders allow execution based on pre-defined price conditions rather than immediate market conditions.


+ + |Value| Description | + |-|-| + |`UNSPECIFIED` = 0|Not a trigger order. The order executes normally without any trigger conditions.| + |`TAKE_PROFIT` = 1|Take Profit Order - Executes when the price reaches a specified level to secure profits.| + |`STOP_LOSS` = 2|Stop Loss Order - Executes when the price reaches a specified level to limit losses.| + ??? info "[TPSLOrderMetadata](/../../schemas/tpsl_order_metadata)" + Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

### Fields:
- **triggerBy**: Defines the price type that activates the order (e.g., index price).
- **triggerPrice**: The price at which the order is triggered, expressed in `9` decimal precision.


+ + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |trigger_by
`tb` |TriggerBy|True|Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order| + |trigger_price
`tp` |string|True|The Trigger Price of the order, expressed in `9` decimals.| + ??? info "[TriggerBy](/../../schemas/trigger_by)" + Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order.

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.


+ + |Value| Description | + |-|-| + |`UNSPECIFIED` = 0|no trigger condition| + |`INDEX` = 1|INDEX - Order is activated when the index price reaches the trigger price| + |`LAST` = 2|LAST - Order is activated when the last trade price reaches the trigger price| + ??? info "[BrokerTag](/../../schemas/broker_tag)" + BrokerTag is a tag for the broker that the order is sent from.
+ + |Value| Description | + |-|-| + |`COIN_ROUTES` = 1|CoinRoutes| + |`ALERTATRON` = 2|Alertatron| + |`ORIGAMI` = 3|Origami| + ??? 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| diff --git a/artifacts/apidocs/schemas/api_dedust_position_response.md b/artifacts/apidocs/schemas/api_dedust_position_response.md new file mode 100644 index 0000000..3a242ce --- /dev/null +++ b/artifacts/apidocs/schemas/api_dedust_position_response.md @@ -0,0 +1,145 @@ +!!! info "[ApiDedustPositionResponse](/../../schemas/api_dedust_position_response)" + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |result
`r` |Order|True|The created order| + ??? 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: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| + |trigger
`t` |TriggerOrderMetadata|True|Trigger fields are used to support any type of trigger order such as TP/SL| + |broker
`b` |BrokerTag|False
``|Specifies the broker who brokered the order| + ??? info "[TriggerOrderMetadata](/../../schemas/trigger_order_metadata)" + Contains metadata related to trigger orders, such as Take Profit (TP) or Stop Loss (SL).

Trigger orders are used to automatically execute an order when a predefined price condition is met, allowing traders to implement risk management strategies.


+ + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |trigger_type
`tt` |TriggerType|True|Type of the trigger order. eg: Take Profit, Stop Loss, etc| + |tpsl
`t` |TPSLOrderMetadata|True|Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

| + ??? info "[TriggerType](/../../schemas/trigger_type)" + Defines the type of trigger order used in trading, such as Take Profit or Stop Loss.

Trigger orders allow execution based on pre-defined price conditions rather than immediate market conditions.


+ + |Value| Description | + |-|-| + |`UNSPECIFIED` = 0|Not a trigger order. The order executes normally without any trigger conditions.| + |`TAKE_PROFIT` = 1|Take Profit Order - Executes when the price reaches a specified level to secure profits.| + |`STOP_LOSS` = 2|Stop Loss Order - Executes when the price reaches a specified level to limit losses.| + ??? info "[TPSLOrderMetadata](/../../schemas/tpsl_order_metadata)" + Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

### Fields:
- **triggerBy**: Defines the price type that activates the order (e.g., index price).
- **triggerPrice**: The price at which the order is triggered, expressed in `9` decimal precision.


+ + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |trigger_by
`tb` |TriggerBy|True|Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order| + |trigger_price
`tp` |string|True|The Trigger Price of the order, expressed in `9` decimals.| + ??? info "[TriggerBy](/../../schemas/trigger_by)" + Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order.

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.


+ + |Value| Description | + |-|-| + |`UNSPECIFIED` = 0|no trigger condition| + |`INDEX` = 1|INDEX - Order is activated when the index price reaches the trigger price| + |`LAST` = 2|LAST - Order is activated when the last trade price reaches the trigger price| + ??? info "[BrokerTag](/../../schemas/broker_tag)" + BrokerTag is a tag for the broker that the order is sent from.
+ + |Value| Description | + |-|-| + |`COIN_ROUTES` = 1|CoinRoutes| + |`ALERTATRON` = 2|Alertatron| + |`ORIGAMI` = 3|Origami| + ??? 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| diff --git a/artifacts/apidocs/schemas/api_deposit_history_request.md b/artifacts/apidocs/schemas/api_deposit_history_request.md index 6c34a45..3017f4d 100644 --- a/artifacts/apidocs/schemas/api_deposit_history_request.md +++ b/artifacts/apidocs/schemas/api_deposit_history_request.md @@ -27,3 +27,27 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/api_deposit_history_response.md b/artifacts/apidocs/schemas/api_deposit_history_response.md index a70cf9c..b0b0e89 100644 --- a/artifacts/apidocs/schemas/api_deposit_history_response.md +++ b/artifacts/apidocs/schemas/api_deposit_history_response.md @@ -33,3 +33,27 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/api_fill_history_request.md b/artifacts/apidocs/schemas/api_fill_history_request.md index 8e54131..3233067 100644 --- a/artifacts/apidocs/schemas/api_fill_history_request.md +++ b/artifacts/apidocs/schemas/api_fill_history_request.md @@ -39,6 +39,30 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| ??? info "[Currency](/../../schemas/currency)" The list of Currencies that are supported on the GRVT exchange
@@ -58,3 +82,27 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/api_fill_history_response.md b/artifacts/apidocs/schemas/api_fill_history_response.md index 324b7c7..89dcb83 100644 --- a/artifacts/apidocs/schemas/api_fill_history_response.md +++ b/artifacts/apidocs/schemas/api_fill_history_response.md @@ -25,6 +25,7 @@ |venue
`v` |Venue|True|The venue where the trade occurred| |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| |signer
`s1` |string|True|The address (public key) of the wallet signing the payload| + |broker
`b` |BrokerTag|False
``|Specifies the broker who brokered the order| ??? info "[Venue](/../../schemas/venue)" The list of Trading Venues that are supported on the GRVT exchange
@@ -32,3 +33,11 @@ |-|-| |`ORDERBOOK` = 1|the trade is cleared on the orderbook venue| |`RFQ` = 2|the trade is cleared on the RFQ venue| + ??? info "[BrokerTag](/../../schemas/broker_tag)" + BrokerTag is a tag for the broker that the order is sent from.
+ + |Value| Description | + |-|-| + |`COIN_ROUTES` = 1|CoinRoutes| + |`ALERTATRON` = 2|Alertatron| + |`ORIGAMI` = 3|Origami| diff --git a/artifacts/apidocs/schemas/api_funding_account_summary_response.md b/artifacts/apidocs/schemas/api_funding_account_summary_response.md index 65a07cc..7aa754a 100644 --- a/artifacts/apidocs/schemas/api_funding_account_summary_response.md +++ b/artifacts/apidocs/schemas/api_funding_account_summary_response.md @@ -37,3 +37,27 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/api_funding_payment_history_response.md b/artifacts/apidocs/schemas/api_funding_payment_history_response.md index 684214a..899b673 100644 --- a/artifacts/apidocs/schemas/api_funding_payment_history_response.md +++ b/artifacts/apidocs/schemas/api_funding_payment_history_response.md @@ -31,3 +31,27 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/api_get_all_instruments_response.md b/artifacts/apidocs/schemas/api_get_all_instruments_response.md index 919b97a..a74e1bf 100644 --- a/artifacts/apidocs/schemas/api_get_all_instruments_response.md +++ b/artifacts/apidocs/schemas/api_get_all_instruments_response.md @@ -37,6 +37,30 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| ??? info "[Currency](/../../schemas/currency)" The list of Currencies that are supported on the GRVT exchange
@@ -56,6 +80,30 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK 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_filtered_instruments_request.md b/artifacts/apidocs/schemas/api_get_filtered_instruments_request.md index 1f4c698..3ca0fa6 100644 --- a/artifacts/apidocs/schemas/api_get_filtered_instruments_request.md +++ b/artifacts/apidocs/schemas/api_get_filtered_instruments_request.md @@ -36,6 +36,30 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| ??? info "[Currency](/../../schemas/currency)" The list of Currencies that are supported on the GRVT exchange
@@ -55,3 +79,27 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/api_get_filtered_instruments_response.md b/artifacts/apidocs/schemas/api_get_filtered_instruments_response.md index f0e7082..d5b1c60 100644 --- a/artifacts/apidocs/schemas/api_get_filtered_instruments_response.md +++ b/artifacts/apidocs/schemas/api_get_filtered_instruments_response.md @@ -37,6 +37,30 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| ??? info "[Currency](/../../schemas/currency)" The list of Currencies that are supported on the GRVT exchange
@@ -56,6 +80,30 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK 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 02d2821..f3f3128 100644 --- a/artifacts/apidocs/schemas/api_get_instrument_response.md +++ b/artifacts/apidocs/schemas/api_get_instrument_response.md @@ -37,6 +37,30 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| ??? info "[Currency](/../../schemas/currency)" The list of Currencies that are supported on the GRVT exchange
@@ -56,6 +80,30 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK 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 79d7060..21c05a7 100644 --- a/artifacts/apidocs/schemas/api_get_latest_lp_snapshot_request.md +++ b/artifacts/apidocs/schemas/api_get_latest_lp_snapshot_request.md @@ -31,3 +31,27 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/api_get_list_epoch_badge_response.md b/artifacts/apidocs/schemas/api_get_list_epoch_badge_response.md new file mode 100644 index 0000000..115d6d5 --- /dev/null +++ b/artifacts/apidocs/schemas/api_get_list_epoch_badge_response.md @@ -0,0 +1,54 @@ +!!! info "[ApiGetListEpochBadgeResponse](/../../schemas/api_get_list_epoch_badge_response)" + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |result
`r` |[EpochBadge]|True|The list of epoch badges| + ??? info "[EpochBadge](/../../schemas/epoch_badge)" + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |account_id
`ai` |string|True|The off chain account id| + |main_account_id
`ma` |string|True|The account ID| + |type
`t` |RewardProgramType|True|The type of the reward program| + |epoch
`e` |integer|True|The epoch number| + |epoch_start_time
`es` |string|True|The start time of the epoch| + |epoch_end_time
`ee` |string|True|The end time of the epoch| + |badge
`b` |EpochBadgeType|True|The type of the badge| + |distributed_badges
`db` |[EpochBadgeType]|True|The distributed badges| + |total_point
`tp` |string|True|Total point| + |rank
`r` |integer|True|Rank| + |claimed_at
`ca` |string|True|The time when the badge was claimed, or the epoch end time if the user has already completed the KYC process| + ??? info "[RewardProgramType](/../../schemas/reward_program_type)" + |Value| Description | + |-|-| + |`ECOSYSTEM` = 1|| + |`TRADER` = 2|| + |`LP` = 3|| + ??? info "[EpochBadgeType](/../../schemas/epoch_badge_type)" + |Value| Description | + |-|-| + |`CHAMPION` = 1|Champion| + |`LEGEND` = 2|Legend| + |`VETERAN` = 3|Veteran| + |`ELITE` = 4|Elite| + |`MASTER` = 5|Master| + |`EXPERT` = 6|Expert| + |`WARRIOR` = 7|Warrior| + |`SERGEANT` = 8|Sergeant| + |`RANGER` = 9|Ranger| + |`CHALLENGER` = 10|Challenger| + |`APPRENTICE` = 11|Apprentice| + |`ROOKIE` = 12|Rookie| + ??? info "[EpochBadgeType](/../../schemas/epoch_badge_type)" + |Value| Description | + |-|-| + |`CHAMPION` = 1|Champion| + |`LEGEND` = 2|Legend| + |`VETERAN` = 3|Veteran| + |`ELITE` = 4|Elite| + |`MASTER` = 5|Master| + |`EXPERT` = 6|Expert| + |`WARRIOR` = 7|Warrior| + |`SERGEANT` = 8|Sergeant| + |`RANGER` = 9|Ranger| + |`CHALLENGER` = 10|Challenger| + |`APPRENTICE` = 11|Apprentice| + |`ROOKIE` = 12|Rookie| diff --git a/artifacts/apidocs/schemas/api_get_list_flat_referral_response.md b/artifacts/apidocs/schemas/api_get_list_flat_referral_response.md index 0612797..01d3d78 100644 --- a/artifacts/apidocs/schemas/api_get_list_flat_referral_response.md +++ b/artifacts/apidocs/schemas/api_get_list_flat_referral_response.md @@ -14,3 +14,6 @@ |main_account_id
`ma` |string|True|The main account id| |referrer_main_account_id
`rm` |string|True|The referrer main account id| |is_business
`ib` |boolean|True|The account is a business account or not| + |is_kyc_completed
`ik` |boolean|True|The account is KYC verified or not| + |kyc_completed_at
`kc` |string|True|The KYC completed time| + |kyc_type
`kt` |string|True|The KYC type, can be 'individual' or 'business'| diff --git a/artifacts/apidocs/schemas/api_get_list_reward_epoch_response.md b/artifacts/apidocs/schemas/api_get_list_reward_epoch_response.md new file mode 100644 index 0000000..6d1f1ff --- /dev/null +++ b/artifacts/apidocs/schemas/api_get_list_reward_epoch_response.md @@ -0,0 +1,31 @@ +!!! info "[ApiGetListRewardEpochResponse](/../../schemas/api_get_list_reward_epoch_response)" + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |ecosystem_epochs
`ee` |[RewardEpochInfo]|True|The list of epoch for ecosystem reward| + |trading_epochs
`te` |[RewardEpochInfo]|True|The list of epoch for trader reward and lp reward| + ??? info "[RewardEpochInfo](/../../schemas/reward_epoch_info)" + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |epoch
`e` |integer|True|The epoch number| + |epoch_start_time
`es` |string|True|The start time of the epoch| + |epoch_end_time
`ee` |string|True|The end time of the epoch| + |status
`s` |RewardEpochStatus|True|The status of the epoch| + ??? info "[RewardEpochStatus](/../../schemas/reward_epoch_status)" + |Value| Description | + |-|-| + |`PAST` = 1|Past| + |`CURRENT` = 2|Current| + |`FUTURE` = 3|Future| + ??? info "[RewardEpochInfo](/../../schemas/reward_epoch_info)" + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |epoch
`e` |integer|True|The epoch number| + |epoch_start_time
`es` |string|True|The start time of the epoch| + |epoch_end_time
`ee` |string|True|The end time of the epoch| + |status
`s` |RewardEpochStatus|True|The status of the epoch| + ??? info "[RewardEpochStatus](/../../schemas/reward_epoch_status)" + |Value| Description | + |-|-| + |`PAST` = 1|Past| + |`CURRENT` = 2|Current| + |`FUTURE` = 3|Future| diff --git a/artifacts/apidocs/schemas/api_get_lp_info_request.md b/artifacts/apidocs/schemas/api_get_lp_info_request.md index db7cbb7..114cd51 100644 --- a/artifacts/apidocs/schemas/api_get_lp_info_request.md +++ b/artifacts/apidocs/schemas/api_get_lp_info_request.md @@ -31,3 +31,27 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/api_get_lp_leaderboard_request.md b/artifacts/apidocs/schemas/api_get_lp_leaderboard_request.md index 77ac464..e25dabe 100644 --- a/artifacts/apidocs/schemas/api_get_lp_leaderboard_request.md +++ b/artifacts/apidocs/schemas/api_get_lp_leaderboard_request.md @@ -1,7 +1,7 @@ !!! info "[ApiGetLPLeaderboardRequest](/../../schemas/api_get_lp_leaderboard_request)" |Name
`Lite`|Type|Required
`Default`| Description | |-|-|-|-| - |start_interval
`si` |string|True|Start time of the epoch - phase| + |epoch
`e` |integer|False
`0`|The epoch to filter| |limit
`l` |integer|True|The number of accounts to return| |kind
`k` |Kind|True|The kind filter to apply| |base
`b` |Currency|True|The base filter to apply| @@ -33,3 +33,27 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/api_get_lp_point_request.md b/artifacts/apidocs/schemas/api_get_lp_point_request.md index e987712..f061430 100644 --- a/artifacts/apidocs/schemas/api_get_lp_point_request.md +++ b/artifacts/apidocs/schemas/api_get_lp_point_request.md @@ -1,7 +1,7 @@ !!! info "[ApiGetLPPointRequest](/../../schemas/api_get_lp_point_request)" |Name
`Lite`|Type|Required
`Default`| Description | |-|-|-|-| - |start_interval
`si` |string|False
`0`|Optional. Start time of the epoch - phase| + |epoch
`e` |integer|False
`0`|The epoch to filter| |kind
`k` |Kind|False
`0`|Optional. The kind filter to apply| |base
`b` |Currency|False
`0`|Optional. The base filter to apply| ??? info "[Kind](/../../schemas/kind)" @@ -32,3 +32,27 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/api_get_order_response.md b/artifacts/apidocs/schemas/api_get_order_response.md index 2381e38..1c61354 100644 --- a/artifacts/apidocs/schemas/api_get_order_response.md +++ b/artifacts/apidocs/schemas/api_get_order_response.md @@ -53,6 +53,46 @@ |-|-|-|-| |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| + |trigger
`t` |TriggerOrderMetadata|True|Trigger fields are used to support any type of trigger order such as TP/SL| + |broker
`b` |BrokerTag|False
``|Specifies the broker who brokered the order| + ??? info "[TriggerOrderMetadata](/../../schemas/trigger_order_metadata)" + Contains metadata related to trigger orders, such as Take Profit (TP) or Stop Loss (SL).

Trigger orders are used to automatically execute an order when a predefined price condition is met, allowing traders to implement risk management strategies.


+ + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |trigger_type
`tt` |TriggerType|True|Type of the trigger order. eg: Take Profit, Stop Loss, etc| + |tpsl
`t` |TPSLOrderMetadata|True|Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

| + ??? info "[TriggerType](/../../schemas/trigger_type)" + Defines the type of trigger order used in trading, such as Take Profit or Stop Loss.

Trigger orders allow execution based on pre-defined price conditions rather than immediate market conditions.


+ + |Value| Description | + |-|-| + |`UNSPECIFIED` = 0|Not a trigger order. The order executes normally without any trigger conditions.| + |`TAKE_PROFIT` = 1|Take Profit Order - Executes when the price reaches a specified level to secure profits.| + |`STOP_LOSS` = 2|Stop Loss Order - Executes when the price reaches a specified level to limit losses.| + ??? info "[TPSLOrderMetadata](/../../schemas/tpsl_order_metadata)" + Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

### Fields:
- **triggerBy**: Defines the price type that activates the order (e.g., index price).
- **triggerPrice**: The price at which the order is triggered, expressed in `9` decimal precision.


+ + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |trigger_by
`tb` |TriggerBy|True|Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order| + |trigger_price
`tp` |string|True|The Trigger Price of the order, expressed in `9` decimals.| + ??? info "[TriggerBy](/../../schemas/trigger_by)" + Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order.

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.


+ + |Value| Description | + |-|-| + |`UNSPECIFIED` = 0|no trigger condition| + |`INDEX` = 1|INDEX - Order is activated when the index price reaches the trigger price| + |`LAST` = 2|LAST - Order is activated when the last trade price reaches the trigger price| + ??? info "[BrokerTag](/../../schemas/broker_tag)" + BrokerTag is a tag for the broker that the order is sent from.
+ + |Value| Description | + |-|-| + |`COIN_ROUTES` = 1|CoinRoutes| + |`ALERTATRON` = 2|Alertatron| + |`ORIGAMI` = 3|Origami| ??? info "[OrderState](/../../schemas/order_state)" |Name
`Lite`|Type|Required
`Default`| Description | |-|-|-|-| @@ -102,3 +142,4 @@ |`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| diff --git a/artifacts/apidocs/schemas/api_get_verified_ecosystem_leaderboard_request.md b/artifacts/apidocs/schemas/api_get_verified_ecosystem_leaderboard_request.md new file mode 100644 index 0000000..6604e10 --- /dev/null +++ b/artifacts/apidocs/schemas/api_get_verified_ecosystem_leaderboard_request.md @@ -0,0 +1,5 @@ +!!! info "[ApiGetVerifiedEcosystemLeaderboardRequest](/../../schemas/api_get_verified_ecosystem_leaderboard_request)" + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |calculate_from
`cf` |string|True|Start time of the epoch| + |completed_kyc_before
`ck` |string|True|Completed KYC before this time| 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 3732d3a..42d7a41 100644 --- a/artifacts/apidocs/schemas/api_latest_snap_sub_accounts_response.md +++ b/artifacts/apidocs/schemas/api_latest_snap_sub_accounts_response.md @@ -41,6 +41,30 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| ??? info "[SpotBalance](/../../schemas/spot_balance)" |Name
`Lite`|Type|Required
`Default`| Description | |-|-|-|-| @@ -66,6 +90,30 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK 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 3d335f3..ba05104 100644 --- a/artifacts/apidocs/schemas/api_list_aggregated_account_summary_response.md +++ b/artifacts/apidocs/schemas/api_list_aggregated_account_summary_response.md @@ -39,3 +39,27 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/api_open_orders_request.md b/artifacts/apidocs/schemas/api_open_orders_request.md index 1b65fa1..f044e60 100644 --- a/artifacts/apidocs/schemas/api_open_orders_request.md +++ b/artifacts/apidocs/schemas/api_open_orders_request.md @@ -33,6 +33,30 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| ??? info "[Currency](/../../schemas/currency)" The list of Currencies that are supported on the GRVT exchange
@@ -52,3 +76,27 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/api_open_orders_response.md b/artifacts/apidocs/schemas/api_open_orders_response.md index e632d66..82cb170 100644 --- a/artifacts/apidocs/schemas/api_open_orders_response.md +++ b/artifacts/apidocs/schemas/api_open_orders_response.md @@ -55,6 +55,46 @@ |-|-|-|-| |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| + |trigger
`t` |TriggerOrderMetadata|True|Trigger fields are used to support any type of trigger order such as TP/SL| + |broker
`b` |BrokerTag|False
``|Specifies the broker who brokered the order| + ??? info "[TriggerOrderMetadata](/../../schemas/trigger_order_metadata)" + Contains metadata related to trigger orders, such as Take Profit (TP) or Stop Loss (SL).

Trigger orders are used to automatically execute an order when a predefined price condition is met, allowing traders to implement risk management strategies.


+ + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |trigger_type
`tt` |TriggerType|True|Type of the trigger order. eg: Take Profit, Stop Loss, etc| + |tpsl
`t` |TPSLOrderMetadata|True|Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

| + ??? info "[TriggerType](/../../schemas/trigger_type)" + Defines the type of trigger order used in trading, such as Take Profit or Stop Loss.

Trigger orders allow execution based on pre-defined price conditions rather than immediate market conditions.


+ + |Value| Description | + |-|-| + |`UNSPECIFIED` = 0|Not a trigger order. The order executes normally without any trigger conditions.| + |`TAKE_PROFIT` = 1|Take Profit Order - Executes when the price reaches a specified level to secure profits.| + |`STOP_LOSS` = 2|Stop Loss Order - Executes when the price reaches a specified level to limit losses.| + ??? info "[TPSLOrderMetadata](/../../schemas/tpsl_order_metadata)" + Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

### Fields:
- **triggerBy**: Defines the price type that activates the order (e.g., index price).
- **triggerPrice**: The price at which the order is triggered, expressed in `9` decimal precision.


+ + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |trigger_by
`tb` |TriggerBy|True|Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order| + |trigger_price
`tp` |string|True|The Trigger Price of the order, expressed in `9` decimals.| + ??? info "[TriggerBy](/../../schemas/trigger_by)" + Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order.

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.


+ + |Value| Description | + |-|-| + |`UNSPECIFIED` = 0|no trigger condition| + |`INDEX` = 1|INDEX - Order is activated when the index price reaches the trigger price| + |`LAST` = 2|LAST - Order is activated when the last trade price reaches the trigger price| + ??? info "[BrokerTag](/../../schemas/broker_tag)" + BrokerTag is a tag for the broker that the order is sent from.
+ + |Value| Description | + |-|-| + |`COIN_ROUTES` = 1|CoinRoutes| + |`ALERTATRON` = 2|Alertatron| + |`ORIGAMI` = 3|Origami| ??? info "[OrderState](/../../schemas/order_state)" |Name
`Lite`|Type|Required
`Default`| Description | |-|-|-|-| @@ -104,3 +144,4 @@ |`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| diff --git a/artifacts/apidocs/schemas/api_order_history_request.md b/artifacts/apidocs/schemas/api_order_history_request.md index e62d262..07a4aa7 100644 --- a/artifacts/apidocs/schemas/api_order_history_request.md +++ b/artifacts/apidocs/schemas/api_order_history_request.md @@ -39,6 +39,30 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| ??? info "[Currency](/../../schemas/currency)" The list of Currencies that are supported on the GRVT exchange
@@ -58,3 +82,27 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/api_order_history_response.md b/artifacts/apidocs/schemas/api_order_history_response.md index b9cdd96..5f76dc0 100644 --- a/artifacts/apidocs/schemas/api_order_history_response.md +++ b/artifacts/apidocs/schemas/api_order_history_response.md @@ -54,6 +54,46 @@ |-|-|-|-| |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| + |trigger
`t` |TriggerOrderMetadata|True|Trigger fields are used to support any type of trigger order such as TP/SL| + |broker
`b` |BrokerTag|False
``|Specifies the broker who brokered the order| + ??? info "[TriggerOrderMetadata](/../../schemas/trigger_order_metadata)" + Contains metadata related to trigger orders, such as Take Profit (TP) or Stop Loss (SL).

Trigger orders are used to automatically execute an order when a predefined price condition is met, allowing traders to implement risk management strategies.


+ + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |trigger_type
`tt` |TriggerType|True|Type of the trigger order. eg: Take Profit, Stop Loss, etc| + |tpsl
`t` |TPSLOrderMetadata|True|Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

| + ??? info "[TriggerType](/../../schemas/trigger_type)" + Defines the type of trigger order used in trading, such as Take Profit or Stop Loss.

Trigger orders allow execution based on pre-defined price conditions rather than immediate market conditions.


+ + |Value| Description | + |-|-| + |`UNSPECIFIED` = 0|Not a trigger order. The order executes normally without any trigger conditions.| + |`TAKE_PROFIT` = 1|Take Profit Order - Executes when the price reaches a specified level to secure profits.| + |`STOP_LOSS` = 2|Stop Loss Order - Executes when the price reaches a specified level to limit losses.| + ??? info "[TPSLOrderMetadata](/../../schemas/tpsl_order_metadata)" + Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

### Fields:
- **triggerBy**: Defines the price type that activates the order (e.g., index price).
- **triggerPrice**: The price at which the order is triggered, expressed in `9` decimal precision.


+ + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |trigger_by
`tb` |TriggerBy|True|Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order| + |trigger_price
`tp` |string|True|The Trigger Price of the order, expressed in `9` decimals.| + ??? info "[TriggerBy](/../../schemas/trigger_by)" + Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order.

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.


+ + |Value| Description | + |-|-| + |`UNSPECIFIED` = 0|no trigger condition| + |`INDEX` = 1|INDEX - Order is activated when the index price reaches the trigger price| + |`LAST` = 2|LAST - Order is activated when the last trade price reaches the trigger price| + ??? info "[BrokerTag](/../../schemas/broker_tag)" + BrokerTag is a tag for the broker that the order is sent from.
+ + |Value| Description | + |-|-| + |`COIN_ROUTES` = 1|CoinRoutes| + |`ALERTATRON` = 2|Alertatron| + |`ORIGAMI` = 3|Origami| ??? info "[OrderState](/../../schemas/order_state)" |Name
`Lite`|Type|Required
`Default`| Description | |-|-|-|-| @@ -103,3 +143,4 @@ |`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| diff --git a/artifacts/apidocs/schemas/api_order_state_response.md b/artifacts/apidocs/schemas/api_order_state_response.md index 2d46b9d..2744a2f 100644 --- a/artifacts/apidocs/schemas/api_order_state_response.md +++ b/artifacts/apidocs/schemas/api_order_state_response.md @@ -51,3 +51,4 @@ |`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| diff --git a/artifacts/apidocs/schemas/api_positions_request.md b/artifacts/apidocs/schemas/api_positions_request.md index 7a89fcb..2e4722f 100644 --- a/artifacts/apidocs/schemas/api_positions_request.md +++ b/artifacts/apidocs/schemas/api_positions_request.md @@ -35,6 +35,30 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| ??? info "[Currency](/../../schemas/currency)" The list of Currencies that are supported on the GRVT exchange
@@ -54,3 +78,27 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/api_pre_deposit_check_request.md b/artifacts/apidocs/schemas/api_pre_deposit_check_request.md index 07b00a7..cf6a28f 100644 --- a/artifacts/apidocs/schemas/api_pre_deposit_check_request.md +++ b/artifacts/apidocs/schemas/api_pre_deposit_check_request.md @@ -24,6 +24,30 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK 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 ede4191..9d0db80 100644 --- a/artifacts/apidocs/schemas/api_pre_deposit_check_response.md +++ b/artifacts/apidocs/schemas/api_pre_deposit_check_response.md @@ -22,3 +22,27 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/api_pre_order_check_request.md b/artifacts/apidocs/schemas/api_pre_order_check_request.md index 4fe8ed5..e489b83 100644 --- a/artifacts/apidocs/schemas/api_pre_order_check_request.md +++ b/artifacts/apidocs/schemas/api_pre_order_check_request.md @@ -56,6 +56,46 @@ |-|-|-|-| |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| + |trigger
`t` |TriggerOrderMetadata|True|Trigger fields are used to support any type of trigger order such as TP/SL| + |broker
`b` |BrokerTag|False
``|Specifies the broker who brokered the order| + ??? info "[TriggerOrderMetadata](/../../schemas/trigger_order_metadata)" + Contains metadata related to trigger orders, such as Take Profit (TP) or Stop Loss (SL).

Trigger orders are used to automatically execute an order when a predefined price condition is met, allowing traders to implement risk management strategies.


+ + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |trigger_type
`tt` |TriggerType|True|Type of the trigger order. eg: Take Profit, Stop Loss, etc| + |tpsl
`t` |TPSLOrderMetadata|True|Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

| + ??? info "[TriggerType](/../../schemas/trigger_type)" + Defines the type of trigger order used in trading, such as Take Profit or Stop Loss.

Trigger orders allow execution based on pre-defined price conditions rather than immediate market conditions.


+ + |Value| Description | + |-|-| + |`UNSPECIFIED` = 0|Not a trigger order. The order executes normally without any trigger conditions.| + |`TAKE_PROFIT` = 1|Take Profit Order - Executes when the price reaches a specified level to secure profits.| + |`STOP_LOSS` = 2|Stop Loss Order - Executes when the price reaches a specified level to limit losses.| + ??? info "[TPSLOrderMetadata](/../../schemas/tpsl_order_metadata)" + Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

### Fields:
- **triggerBy**: Defines the price type that activates the order (e.g., index price).
- **triggerPrice**: The price at which the order is triggered, expressed in `9` decimal precision.


+ + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |trigger_by
`tb` |TriggerBy|True|Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order| + |trigger_price
`tp` |string|True|The Trigger Price of the order, expressed in `9` decimals.| + ??? info "[TriggerBy](/../../schemas/trigger_by)" + Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order.

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.


+ + |Value| Description | + |-|-| + |`UNSPECIFIED` = 0|no trigger condition| + |`INDEX` = 1|INDEX - Order is activated when the index price reaches the trigger price| + |`LAST` = 2|LAST - Order is activated when the last trade price reaches the trigger price| + ??? info "[BrokerTag](/../../schemas/broker_tag)" + BrokerTag is a tag for the broker that the order is sent from.
+ + |Value| Description | + |-|-| + |`COIN_ROUTES` = 1|CoinRoutes| + |`ALERTATRON` = 2|Alertatron| + |`ORIGAMI` = 3|Origami| ??? info "[OrderState](/../../schemas/order_state)" |Name
`Lite`|Type|Required
`Default`| Description | |-|-|-|-| @@ -105,3 +145,4 @@ |`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| diff --git a/artifacts/apidocs/schemas/api_pre_order_check_response.md b/artifacts/apidocs/schemas/api_pre_order_check_response.md index 6c61426..daa5013 100644 --- a/artifacts/apidocs/schemas/api_pre_order_check_response.md +++ b/artifacts/apidocs/schemas/api_pre_order_check_response.md @@ -35,3 +35,27 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/api_settlement_price.md b/artifacts/apidocs/schemas/api_settlement_price.md index c1b225f..92c337f 100644 --- a/artifacts/apidocs/schemas/api_settlement_price.md +++ b/artifacts/apidocs/schemas/api_settlement_price.md @@ -24,6 +24,30 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| ??? info "[Currency](/../../schemas/currency)" The list of Currencies that are supported on the GRVT exchange
@@ -43,3 +67,27 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/api_settlement_price_request.md b/artifacts/apidocs/schemas/api_settlement_price_request.md index c33c144..bcac920 100644 --- a/artifacts/apidocs/schemas/api_settlement_price_request.md +++ b/artifacts/apidocs/schemas/api_settlement_price_request.md @@ -28,6 +28,30 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| ??? info "[Currency](/../../schemas/currency)" The list of Currencies that are supported on the GRVT exchange
@@ -47,3 +71,27 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/api_settlement_price_response.md b/artifacts/apidocs/schemas/api_settlement_price_response.md index d24b764..6f3c50a 100644 --- a/artifacts/apidocs/schemas/api_settlement_price_response.md +++ b/artifacts/apidocs/schemas/api_settlement_price_response.md @@ -29,6 +29,30 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| ??? info "[Currency](/../../schemas/currency)" The list of Currencies that are supported on the GRVT exchange
@@ -48,3 +72,27 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/api_sub_account_history_response.md b/artifacts/apidocs/schemas/api_sub_account_history_response.md index 2ab2fe1..9aba3fb 100644 --- a/artifacts/apidocs/schemas/api_sub_account_history_response.md +++ b/artifacts/apidocs/schemas/api_sub_account_history_response.md @@ -42,6 +42,30 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| ??? info "[SpotBalance](/../../schemas/spot_balance)" |Name
`Lite`|Type|Required
`Default`| Description | |-|-|-|-| @@ -67,6 +91,30 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK 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 e4d18b0..08951ba 100644 --- a/artifacts/apidocs/schemas/api_sub_account_summary_response.md +++ b/artifacts/apidocs/schemas/api_sub_account_summary_response.md @@ -43,6 +43,30 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| ??? info "[SpotBalance](/../../schemas/spot_balance)" |Name
`Lite`|Type|Required
`Default`| Description | |-|-|-|-| @@ -68,6 +92,30 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| ??? info "[Positions](/../../schemas/positions)" |Name
`Lite`|Type|Required
`Default`| Description | |-|-|-|-| diff --git a/artifacts/apidocs/schemas/api_transfer_history_request.md b/artifacts/apidocs/schemas/api_transfer_history_request.md index 1f5c2d0..12a9fd6 100644 --- a/artifacts/apidocs/schemas/api_transfer_history_request.md +++ b/artifacts/apidocs/schemas/api_transfer_history_request.md @@ -8,6 +8,7 @@ |end_time
`et` |string|False
`now()`|The end time to query for in unix nanoseconds| |limit
`l` |integer|False
`500`|The limit to query for. Defaults to 500; Max 1000| |cursor
`c1` |string|False
`''`|The cursor to indicate when to start the next query from| + |tx_id
`ti` |string|False
`0`|The transaction ID to query for| ??? info "[Currency](/../../schemas/currency)" The list of Currencies that are supported on the GRVT exchange
@@ -27,3 +28,27 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/api_transfer_history_response.md b/artifacts/apidocs/schemas/api_transfer_history_response.md index eecee98..ece9c77 100644 --- a/artifacts/apidocs/schemas/api_transfer_history_response.md +++ b/artifacts/apidocs/schemas/api_transfer_history_response.md @@ -36,6 +36,30 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK 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 4bf5317..79b6c20 100644 --- a/artifacts/apidocs/schemas/api_transfer_request.md +++ b/artifacts/apidocs/schemas/api_transfer_request.md @@ -31,6 +31,30 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK 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 2ed90db..7bc08c0 100644 --- a/artifacts/apidocs/schemas/api_withdrawal_history_request.md +++ b/artifacts/apidocs/schemas/api_withdrawal_history_request.md @@ -27,3 +27,27 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/api_withdrawal_history_response.md b/artifacts/apidocs/schemas/api_withdrawal_history_response.md index adf3c34..d3dc740 100644 --- a/artifacts/apidocs/schemas/api_withdrawal_history_response.md +++ b/artifacts/apidocs/schemas/api_withdrawal_history_response.md @@ -32,6 +32,30 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK 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 c0787b8..da16d00 100644 --- a/artifacts/apidocs/schemas/api_withdrawal_request.md +++ b/artifacts/apidocs/schemas/api_withdrawal_request.md @@ -27,6 +27,30 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| ??? info "[Signature](/../../schemas/signature)" |Name
`Lite`|Type|Required
`Default`| Description | |-|-|-|-| diff --git a/artifacts/apidocs/schemas/broker_tag.md b/artifacts/apidocs/schemas/broker_tag.md new file mode 100644 index 0000000..a57cd82 --- /dev/null +++ b/artifacts/apidocs/schemas/broker_tag.md @@ -0,0 +1,8 @@ +!!! info "[BrokerTag](/../../schemas/broker_tag)" + BrokerTag is a tag for the broker that the order is sent from.
+ + |Value| Description | + |-|-| + |`COIN_ROUTES` = 1|CoinRoutes| + |`ALERTATRON` = 2|Alertatron| + |`ORIGAMI` = 3|Origami| diff --git a/artifacts/apidocs/schemas/cancel_status.md b/artifacts/apidocs/schemas/cancel_status.md new file mode 100644 index 0000000..4c19353 --- /dev/null +++ b/artifacts/apidocs/schemas/cancel_status.md @@ -0,0 +1,4 @@ +!!! 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.| diff --git a/artifacts/apidocs/schemas/cancel_status_feed.md b/artifacts/apidocs/schemas/cancel_status_feed.md new file mode 100644 index 0000000..f0e5279 --- /dev/null +++ b/artifacts/apidocs/schemas/cancel_status_feed.md @@ -0,0 +1,46 @@ +!!! info "[CancelStatusFeed](/../../schemas/cancel_status_feed)" + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |sub_account_id
`sa` |string|True|The subaccount ID that requested the cancellation| + |client_order_id
`co` |string|True|A unique identifier for the active order within a subaccount, specified by the client| + |order_id
`oi` |string|True|A unique 128-bit identifier for the order, deterministically generated within the GRVT backend| + |reason
`r` |OrderRejectReason|True|The user-provided reason for cancelling the order| + |update_time
`ut` |string|False
`0`|[Filled by GRVT Backend] Time at which the cancellation status was updated by GRVT in unix nanoseconds| + |cancel_status
`cs` |CancelStatus|True|Status of the cancellation attempt| + ??? 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| + ??? 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.| diff --git a/artifacts/apidocs/schemas/claim_ecosystem_badge_response.md b/artifacts/apidocs/schemas/claim_ecosystem_badge_response.md new file mode 100644 index 0000000..ba155e6 --- /dev/null +++ b/artifacts/apidocs/schemas/claim_ecosystem_badge_response.md @@ -0,0 +1,54 @@ +!!! info "[ClaimEcosystemBadgeResponse](/../../schemas/claim_ecosystem_badge_response)" + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |badge
`b` |EpochBadge|True|The epoch badge| + ??? info "[EpochBadge](/../../schemas/epoch_badge)" + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |account_id
`ai` |string|True|The off chain account id| + |main_account_id
`ma` |string|True|The account ID| + |type
`t` |RewardProgramType|True|The type of the reward program| + |epoch
`e` |integer|True|The epoch number| + |epoch_start_time
`es` |string|True|The start time of the epoch| + |epoch_end_time
`ee` |string|True|The end time of the epoch| + |badge
`b` |EpochBadgeType|True|The type of the badge| + |distributed_badges
`db` |[EpochBadgeType]|True|The distributed badges| + |total_point
`tp` |string|True|Total point| + |rank
`r` |integer|True|Rank| + |claimed_at
`ca` |string|True|The time when the badge was claimed, or the epoch end time if the user has already completed the KYC process| + ??? info "[RewardProgramType](/../../schemas/reward_program_type)" + |Value| Description | + |-|-| + |`ECOSYSTEM` = 1|| + |`TRADER` = 2|| + |`LP` = 3|| + ??? info "[EpochBadgeType](/../../schemas/epoch_badge_type)" + |Value| Description | + |-|-| + |`CHAMPION` = 1|Champion| + |`LEGEND` = 2|Legend| + |`VETERAN` = 3|Veteran| + |`ELITE` = 4|Elite| + |`MASTER` = 5|Master| + |`EXPERT` = 6|Expert| + |`WARRIOR` = 7|Warrior| + |`SERGEANT` = 8|Sergeant| + |`RANGER` = 9|Ranger| + |`CHALLENGER` = 10|Challenger| + |`APPRENTICE` = 11|Apprentice| + |`ROOKIE` = 12|Rookie| + ??? info "[EpochBadgeType](/../../schemas/epoch_badge_type)" + |Value| Description | + |-|-| + |`CHAMPION` = 1|Champion| + |`LEGEND` = 2|Legend| + |`VETERAN` = 3|Veteran| + |`ELITE` = 4|Elite| + |`MASTER` = 5|Master| + |`EXPERT` = 6|Expert| + |`WARRIOR` = 7|Warrior| + |`SERGEANT` = 8|Sergeant| + |`RANGER` = 9|Ranger| + |`CHALLENGER` = 10|Challenger| + |`APPRENTICE` = 11|Apprentice| + |`ROOKIE` = 12|Rookie| diff --git a/artifacts/apidocs/schemas/currency.md b/artifacts/apidocs/schemas/currency.md index b66b266..c28942f 100644 --- a/artifacts/apidocs/schemas/currency.md +++ b/artifacts/apidocs/schemas/currency.md @@ -17,3 +17,27 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/deposit.md b/artifacts/apidocs/schemas/deposit.md index 249134b..a124b51 100644 --- a/artifacts/apidocs/schemas/deposit.md +++ b/artifacts/apidocs/schemas/deposit.md @@ -24,3 +24,27 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/deposit_history.md b/artifacts/apidocs/schemas/deposit_history.md index ffa9431..d35b7ae 100644 --- a/artifacts/apidocs/schemas/deposit_history.md +++ b/artifacts/apidocs/schemas/deposit_history.md @@ -28,3 +28,27 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/epoch_badge.md b/artifacts/apidocs/schemas/epoch_badge.md new file mode 100644 index 0000000..2827adf --- /dev/null +++ b/artifacts/apidocs/schemas/epoch_badge.md @@ -0,0 +1,50 @@ +!!! info "[EpochBadge](/../../schemas/epoch_badge)" + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |account_id
`ai` |string|True|The off chain account id| + |main_account_id
`ma` |string|True|The account ID| + |type
`t` |RewardProgramType|True|The type of the reward program| + |epoch
`e` |integer|True|The epoch number| + |epoch_start_time
`es` |string|True|The start time of the epoch| + |epoch_end_time
`ee` |string|True|The end time of the epoch| + |badge
`b` |EpochBadgeType|True|The type of the badge| + |distributed_badges
`db` |[EpochBadgeType]|True|The distributed badges| + |total_point
`tp` |string|True|Total point| + |rank
`r` |integer|True|Rank| + |claimed_at
`ca` |string|True|The time when the badge was claimed, or the epoch end time if the user has already completed the KYC process| + ??? info "[RewardProgramType](/../../schemas/reward_program_type)" + |Value| Description | + |-|-| + |`ECOSYSTEM` = 1|| + |`TRADER` = 2|| + |`LP` = 3|| + ??? info "[EpochBadgeType](/../../schemas/epoch_badge_type)" + |Value| Description | + |-|-| + |`CHAMPION` = 1|Champion| + |`LEGEND` = 2|Legend| + |`VETERAN` = 3|Veteran| + |`ELITE` = 4|Elite| + |`MASTER` = 5|Master| + |`EXPERT` = 6|Expert| + |`WARRIOR` = 7|Warrior| + |`SERGEANT` = 8|Sergeant| + |`RANGER` = 9|Ranger| + |`CHALLENGER` = 10|Challenger| + |`APPRENTICE` = 11|Apprentice| + |`ROOKIE` = 12|Rookie| + ??? info "[EpochBadgeType](/../../schemas/epoch_badge_type)" + |Value| Description | + |-|-| + |`CHAMPION` = 1|Champion| + |`LEGEND` = 2|Legend| + |`VETERAN` = 3|Veteran| + |`ELITE` = 4|Elite| + |`MASTER` = 5|Master| + |`EXPERT` = 6|Expert| + |`WARRIOR` = 7|Warrior| + |`SERGEANT` = 8|Sergeant| + |`RANGER` = 9|Ranger| + |`CHALLENGER` = 10|Challenger| + |`APPRENTICE` = 11|Apprentice| + |`ROOKIE` = 12|Rookie| diff --git a/artifacts/apidocs/schemas/epoch_badge_point_distribution.md b/artifacts/apidocs/schemas/epoch_badge_point_distribution.md new file mode 100644 index 0000000..6f7dede --- /dev/null +++ b/artifacts/apidocs/schemas/epoch_badge_point_distribution.md @@ -0,0 +1,33 @@ +!!! info "[EpochBadgePointDistribution](/../../schemas/epoch_badge_point_distribution)" + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |badge
`b` |EpochBadgeType|True|The type of the badge| + |epoch
`e` |integer|True|The epoch number| + |type
`t` |RewardProgramType|True|The type of the reward program| + |min_point
`mp` |string|True|The minimum point to get the badge| + |max_point
`mp1` |string|True|The maximum point to get the badge| + |min_rank
`mr` |integer|True|The minimum rank to get the badge| + |max_rank
`mr1` |integer|True|The maximum rank to get the badge| + |total_point
`tp` |string|True|The total point to get the badge| + |count
`c` |integer|True|The number of users to get the badge| + ??? info "[EpochBadgeType](/../../schemas/epoch_badge_type)" + |Value| Description | + |-|-| + |`CHAMPION` = 1|Champion| + |`LEGEND` = 2|Legend| + |`VETERAN` = 3|Veteran| + |`ELITE` = 4|Elite| + |`MASTER` = 5|Master| + |`EXPERT` = 6|Expert| + |`WARRIOR` = 7|Warrior| + |`SERGEANT` = 8|Sergeant| + |`RANGER` = 9|Ranger| + |`CHALLENGER` = 10|Challenger| + |`APPRENTICE` = 11|Apprentice| + |`ROOKIE` = 12|Rookie| + ??? info "[RewardProgramType](/../../schemas/reward_program_type)" + |Value| Description | + |-|-| + |`ECOSYSTEM` = 1|| + |`TRADER` = 2|| + |`LP` = 3|| diff --git a/artifacts/apidocs/schemas/epoch_badge_type.md b/artifacts/apidocs/schemas/epoch_badge_type.md new file mode 100644 index 0000000..623f02b --- /dev/null +++ b/artifacts/apidocs/schemas/epoch_badge_type.md @@ -0,0 +1,15 @@ +!!! info "[EpochBadgeType](/../../schemas/epoch_badge_type)" + |Value| Description | + |-|-| + |`CHAMPION` = 1|Champion| + |`LEGEND` = 2|Legend| + |`VETERAN` = 3|Veteran| + |`ELITE` = 4|Elite| + |`MASTER` = 5|Master| + |`EXPERT` = 6|Expert| + |`WARRIOR` = 7|Warrior| + |`SERGEANT` = 8|Sergeant| + |`RANGER` = 9|Ranger| + |`CHALLENGER` = 10|Challenger| + |`APPRENTICE` = 11|Apprentice| + |`ROOKIE` = 12|Rookie| diff --git a/artifacts/apidocs/schemas/fill.md b/artifacts/apidocs/schemas/fill.md index a6f4359..157972d 100644 --- a/artifacts/apidocs/schemas/fill.md +++ b/artifacts/apidocs/schemas/fill.md @@ -20,6 +20,7 @@ |venue
`v` |Venue|True|The venue where the trade occurred| |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| |signer
`s1` |string|True|The address (public key) of the wallet signing the payload| + |broker
`b` |BrokerTag|False
``|Specifies the broker who brokered the order| ??? info "[Venue](/../../schemas/venue)" The list of Trading Venues that are supported on the GRVT exchange
@@ -27,3 +28,11 @@ |-|-| |`ORDERBOOK` = 1|the trade is cleared on the orderbook venue| |`RFQ` = 2|the trade is cleared on the RFQ venue| + ??? info "[BrokerTag](/../../schemas/broker_tag)" + BrokerTag is a tag for the broker that the order is sent from.
+ + |Value| Description | + |-|-| + |`COIN_ROUTES` = 1|CoinRoutes| + |`ALERTATRON` = 2|Alertatron| + |`ORIGAMI` = 3|Origami| diff --git a/artifacts/apidocs/schemas/flat_referral.md b/artifacts/apidocs/schemas/flat_referral.md index 790b36d..9e17431 100644 --- a/artifacts/apidocs/schemas/flat_referral.md +++ b/artifacts/apidocs/schemas/flat_referral.md @@ -10,3 +10,6 @@ |main_account_id
`ma` |string|True|The main account id| |referrer_main_account_id
`rm` |string|True|The referrer main account id| |is_business
`ib` |boolean|True|The account is a business account or not| + |is_kyc_completed
`ik` |boolean|True|The account is KYC verified or not| + |kyc_completed_at
`kc` |string|True|The KYC completed time| + |kyc_type
`kt` |string|True|The KYC type, can be 'individual' or 'business'| diff --git a/artifacts/apidocs/schemas/funding_account_summary.md b/artifacts/apidocs/schemas/funding_account_summary.md index 0b6bc09..763a2ad 100644 --- a/artifacts/apidocs/schemas/funding_account_summary.md +++ b/artifacts/apidocs/schemas/funding_account_summary.md @@ -31,3 +31,27 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/funding_payment.md b/artifacts/apidocs/schemas/funding_payment.md index 0fd50f2..a396c9e 100644 --- a/artifacts/apidocs/schemas/funding_payment.md +++ b/artifacts/apidocs/schemas/funding_payment.md @@ -26,3 +26,27 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/get_claimable_ecosystem_badge_response.md b/artifacts/apidocs/schemas/get_claimable_ecosystem_badge_response.md new file mode 100644 index 0000000..8572e59 --- /dev/null +++ b/artifacts/apidocs/schemas/get_claimable_ecosystem_badge_response.md @@ -0,0 +1,56 @@ +!!! info "[GetClaimableEcosystemBadgeResponse](/../../schemas/get_claimable_ecosystem_badge_response)" + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |badge
`b` |EpochBadge|True|The epoch badge| + |is_claimable
`ic` |boolean|True|Whether the badge is claimable| + |claimable_until
`cu` |string|True|The time when the badge is claimable| + ??? info "[EpochBadge](/../../schemas/epoch_badge)" + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |account_id
`ai` |string|True|The off chain account id| + |main_account_id
`ma` |string|True|The account ID| + |type
`t` |RewardProgramType|True|The type of the reward program| + |epoch
`e` |integer|True|The epoch number| + |epoch_start_time
`es` |string|True|The start time of the epoch| + |epoch_end_time
`ee` |string|True|The end time of the epoch| + |badge
`b` |EpochBadgeType|True|The type of the badge| + |distributed_badges
`db` |[EpochBadgeType]|True|The distributed badges| + |total_point
`tp` |string|True|Total point| + |rank
`r` |integer|True|Rank| + |claimed_at
`ca` |string|True|The time when the badge was claimed, or the epoch end time if the user has already completed the KYC process| + ??? info "[RewardProgramType](/../../schemas/reward_program_type)" + |Value| Description | + |-|-| + |`ECOSYSTEM` = 1|| + |`TRADER` = 2|| + |`LP` = 3|| + ??? info "[EpochBadgeType](/../../schemas/epoch_badge_type)" + |Value| Description | + |-|-| + |`CHAMPION` = 1|Champion| + |`LEGEND` = 2|Legend| + |`VETERAN` = 3|Veteran| + |`ELITE` = 4|Elite| + |`MASTER` = 5|Master| + |`EXPERT` = 6|Expert| + |`WARRIOR` = 7|Warrior| + |`SERGEANT` = 8|Sergeant| + |`RANGER` = 9|Ranger| + |`CHALLENGER` = 10|Challenger| + |`APPRENTICE` = 11|Apprentice| + |`ROOKIE` = 12|Rookie| + ??? info "[EpochBadgeType](/../../schemas/epoch_badge_type)" + |Value| Description | + |-|-| + |`CHAMPION` = 1|Champion| + |`LEGEND` = 2|Legend| + |`VETERAN` = 3|Veteran| + |`ELITE` = 4|Elite| + |`MASTER` = 5|Master| + |`EXPERT` = 6|Expert| + |`WARRIOR` = 7|Warrior| + |`SERGEANT` = 8|Sergeant| + |`RANGER` = 9|Ranger| + |`CHALLENGER` = 10|Challenger| + |`APPRENTICE` = 11|Apprentice| + |`ROOKIE` = 12|Rookie| diff --git a/artifacts/apidocs/schemas/instrument.md b/artifacts/apidocs/schemas/instrument.md index e0aeb3a..e16ce94 100644 --- a/artifacts/apidocs/schemas/instrument.md +++ b/artifacts/apidocs/schemas/instrument.md @@ -33,6 +33,30 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| ??? info "[Currency](/../../schemas/currency)" The list of Currencies that are supported on the GRVT exchange
@@ -52,6 +76,30 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK 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 162941c..c2b0a4e 100644 --- a/artifacts/apidocs/schemas/order.md +++ b/artifacts/apidocs/schemas/order.md @@ -49,6 +49,46 @@ |-|-|-|-| |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| + |trigger
`t` |TriggerOrderMetadata|True|Trigger fields are used to support any type of trigger order such as TP/SL| + |broker
`b` |BrokerTag|False
``|Specifies the broker who brokered the order| + ??? info "[TriggerOrderMetadata](/../../schemas/trigger_order_metadata)" + Contains metadata related to trigger orders, such as Take Profit (TP) or Stop Loss (SL).

Trigger orders are used to automatically execute an order when a predefined price condition is met, allowing traders to implement risk management strategies.


+ + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |trigger_type
`tt` |TriggerType|True|Type of the trigger order. eg: Take Profit, Stop Loss, etc| + |tpsl
`t` |TPSLOrderMetadata|True|Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

| + ??? info "[TriggerType](/../../schemas/trigger_type)" + Defines the type of trigger order used in trading, such as Take Profit or Stop Loss.

Trigger orders allow execution based on pre-defined price conditions rather than immediate market conditions.


+ + |Value| Description | + |-|-| + |`UNSPECIFIED` = 0|Not a trigger order. The order executes normally without any trigger conditions.| + |`TAKE_PROFIT` = 1|Take Profit Order - Executes when the price reaches a specified level to secure profits.| + |`STOP_LOSS` = 2|Stop Loss Order - Executes when the price reaches a specified level to limit losses.| + ??? info "[TPSLOrderMetadata](/../../schemas/tpsl_order_metadata)" + Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

### Fields:
- **triggerBy**: Defines the price type that activates the order (e.g., index price).
- **triggerPrice**: The price at which the order is triggered, expressed in `9` decimal precision.


+ + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |trigger_by
`tb` |TriggerBy|True|Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order| + |trigger_price
`tp` |string|True|The Trigger Price of the order, expressed in `9` decimals.| + ??? info "[TriggerBy](/../../schemas/trigger_by)" + Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order.

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.


+ + |Value| Description | + |-|-| + |`UNSPECIFIED` = 0|no trigger condition| + |`INDEX` = 1|INDEX - Order is activated when the index price reaches the trigger price| + |`LAST` = 2|LAST - Order is activated when the last trade price reaches the trigger price| + ??? info "[BrokerTag](/../../schemas/broker_tag)" + BrokerTag is a tag for the broker that the order is sent from.
+ + |Value| Description | + |-|-| + |`COIN_ROUTES` = 1|CoinRoutes| + |`ALERTATRON` = 2|Alertatron| + |`ORIGAMI` = 3|Origami| ??? info "[OrderState](/../../schemas/order_state)" |Name
`Lite`|Type|Required
`Default`| Description | |-|-|-|-| @@ -98,3 +138,4 @@ |`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| diff --git a/artifacts/apidocs/schemas/order_metadata.md b/artifacts/apidocs/schemas/order_metadata.md index 9ddd4b7..5d46f22 100644 --- a/artifacts/apidocs/schemas/order_metadata.md +++ b/artifacts/apidocs/schemas/order_metadata.md @@ -5,3 +5,43 @@ |-|-|-|-| |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| + |trigger
`t` |TriggerOrderMetadata|True|Trigger fields are used to support any type of trigger order such as TP/SL| + |broker
`b` |BrokerTag|False
``|Specifies the broker who brokered the order| + ??? info "[TriggerOrderMetadata](/../../schemas/trigger_order_metadata)" + Contains metadata related to trigger orders, such as Take Profit (TP) or Stop Loss (SL).

Trigger orders are used to automatically execute an order when a predefined price condition is met, allowing traders to implement risk management strategies.


+ + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |trigger_type
`tt` |TriggerType|True|Type of the trigger order. eg: Take Profit, Stop Loss, etc| + |tpsl
`t` |TPSLOrderMetadata|True|Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

| + ??? info "[TriggerType](/../../schemas/trigger_type)" + Defines the type of trigger order used in trading, such as Take Profit or Stop Loss.

Trigger orders allow execution based on pre-defined price conditions rather than immediate market conditions.


+ + |Value| Description | + |-|-| + |`UNSPECIFIED` = 0|Not a trigger order. The order executes normally without any trigger conditions.| + |`TAKE_PROFIT` = 1|Take Profit Order - Executes when the price reaches a specified level to secure profits.| + |`STOP_LOSS` = 2|Stop Loss Order - Executes when the price reaches a specified level to limit losses.| + ??? info "[TPSLOrderMetadata](/../../schemas/tpsl_order_metadata)" + Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

### Fields:
- **triggerBy**: Defines the price type that activates the order (e.g., index price).
- **triggerPrice**: The price at which the order is triggered, expressed in `9` decimal precision.


+ + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |trigger_by
`tb` |TriggerBy|True|Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order| + |trigger_price
`tp` |string|True|The Trigger Price of the order, expressed in `9` decimals.| + ??? info "[TriggerBy](/../../schemas/trigger_by)" + Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order.

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.


+ + |Value| Description | + |-|-| + |`UNSPECIFIED` = 0|no trigger condition| + |`INDEX` = 1|INDEX - Order is activated when the index price reaches the trigger price| + |`LAST` = 2|LAST - Order is activated when the last trade price reaches the trigger price| + ??? info "[BrokerTag](/../../schemas/broker_tag)" + BrokerTag is a tag for the broker that the order is sent from.
+ + |Value| Description | + |-|-| + |`COIN_ROUTES` = 1|CoinRoutes| + |`ALERTATRON` = 2|Alertatron| + |`ORIGAMI` = 3|Origami| diff --git a/artifacts/apidocs/schemas/order_reject_reason.md b/artifacts/apidocs/schemas/order_reject_reason.md index 10779bd..93bb9d3 100644 --- a/artifacts/apidocs/schemas/order_reject_reason.md +++ b/artifacts/apidocs/schemas/order_reject_reason.md @@ -30,3 +30,4 @@ |`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| diff --git a/artifacts/apidocs/schemas/order_state.md b/artifacts/apidocs/schemas/order_state.md index e09b367..a3c24c7 100644 --- a/artifacts/apidocs/schemas/order_state.md +++ b/artifacts/apidocs/schemas/order_state.md @@ -47,3 +47,4 @@ |`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| diff --git a/artifacts/apidocs/schemas/order_state_feed.md b/artifacts/apidocs/schemas/order_state_feed.md index 7917ac7..3d25347 100644 --- a/artifacts/apidocs/schemas/order_state_feed.md +++ b/artifacts/apidocs/schemas/order_state_feed.md @@ -53,3 +53,4 @@ |`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| diff --git a/artifacts/apidocs/schemas/pre_order_check_result.md b/artifacts/apidocs/schemas/pre_order_check_result.md index 8fb5651..f123868 100644 --- a/artifacts/apidocs/schemas/pre_order_check_result.md +++ b/artifacts/apidocs/schemas/pre_order_check_result.md @@ -31,3 +31,27 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/query_epoch_badge_point_distribution_request.md b/artifacts/apidocs/schemas/query_epoch_badge_point_distribution_request.md new file mode 100644 index 0000000..937a21d --- /dev/null +++ b/artifacts/apidocs/schemas/query_epoch_badge_point_distribution_request.md @@ -0,0 +1,13 @@ +!!! info "[QueryEpochBadgePointDistributionRequest](/../../schemas/query_epoch_badge_point_distribution_request)" + Query list of epoch badges
+ + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |epoch
`e` |integer|False
`'all'`|The numerical epoch index| + |type
`t` |RewardProgramType|True|The type of the reward program| + ??? info "[RewardProgramType](/../../schemas/reward_program_type)" + |Value| Description | + |-|-| + |`ECOSYSTEM` = 1|| + |`TRADER` = 2|| + |`LP` = 3|| diff --git a/artifacts/apidocs/schemas/query_epoch_badge_point_distribution_response.md b/artifacts/apidocs/schemas/query_epoch_badge_point_distribution_response.md new file mode 100644 index 0000000..3831ba8 --- /dev/null +++ b/artifacts/apidocs/schemas/query_epoch_badge_point_distribution_response.md @@ -0,0 +1,37 @@ +!!! info "[QueryEpochBadgePointDistributionResponse](/../../schemas/query_epoch_badge_point_distribution_response)" + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |result
`r` |[EpochBadgePointDistribution]|True|The list of epoch badges| + ??? info "[EpochBadgePointDistribution](/../../schemas/epoch_badge_point_distribution)" + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |badge
`b` |EpochBadgeType|True|The type of the badge| + |epoch
`e` |integer|True|The epoch number| + |type
`t` |RewardProgramType|True|The type of the reward program| + |min_point
`mp` |string|True|The minimum point to get the badge| + |max_point
`mp1` |string|True|The maximum point to get the badge| + |min_rank
`mr` |integer|True|The minimum rank to get the badge| + |max_rank
`mr1` |integer|True|The maximum rank to get the badge| + |total_point
`tp` |string|True|The total point to get the badge| + |count
`c` |integer|True|The number of users to get the badge| + ??? info "[EpochBadgeType](/../../schemas/epoch_badge_type)" + |Value| Description | + |-|-| + |`CHAMPION` = 1|Champion| + |`LEGEND` = 2|Legend| + |`VETERAN` = 3|Veteran| + |`ELITE` = 4|Elite| + |`MASTER` = 5|Master| + |`EXPERT` = 6|Expert| + |`WARRIOR` = 7|Warrior| + |`SERGEANT` = 8|Sergeant| + |`RANGER` = 9|Ranger| + |`CHALLENGER` = 10|Challenger| + |`APPRENTICE` = 11|Apprentice| + |`ROOKIE` = 12|Rookie| + ??? info "[RewardProgramType](/../../schemas/reward_program_type)" + |Value| Description | + |-|-| + |`ECOSYSTEM` = 1|| + |`TRADER` = 2|| + |`LP` = 3|| diff --git a/artifacts/apidocs/schemas/query_epoch_badge_request.md b/artifacts/apidocs/schemas/query_epoch_badge_request.md new file mode 100644 index 0000000..6cac69e --- /dev/null +++ b/artifacts/apidocs/schemas/query_epoch_badge_request.md @@ -0,0 +1,16 @@ +!!! info "[QueryEpochBadgeRequest](/../../schemas/query_epoch_badge_request)" + Query list of epoch badges
+ + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |account_id
`ai` |string|False
`'all'`|The off chain account id to get referral stats| + |epoch
`e` |integer|False
`'all'`|The numerical epoch index| + |type
`t` |RewardProgramType|False
`'all'`|The type of the reward program| + |limit
`l` |integer|False
`'500'`|The limit to query for. Defaults to 500; Max 1000| + |cursor
`c` |string|False
`'all'`|The cursor to indicate when to start the query from| + ??? info "[RewardProgramType](/../../schemas/reward_program_type)" + |Value| Description | + |-|-| + |`ECOSYSTEM` = 1|| + |`TRADER` = 2|| + |`LP` = 3|| diff --git a/artifacts/apidocs/schemas/query_epoch_badge_response.md b/artifacts/apidocs/schemas/query_epoch_badge_response.md new file mode 100644 index 0000000..9700a5a --- /dev/null +++ b/artifacts/apidocs/schemas/query_epoch_badge_response.md @@ -0,0 +1,55 @@ +!!! info "[QueryEpochBadgeResponse](/../../schemas/query_epoch_badge_response)" + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |result
`r` |[EpochBadge]|True|The list of epoch badges| + |next
`n` |string|True|The cursor to indicate when to start the query from| + ??? info "[EpochBadge](/../../schemas/epoch_badge)" + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |account_id
`ai` |string|True|The off chain account id| + |main_account_id
`ma` |string|True|The account ID| + |type
`t` |RewardProgramType|True|The type of the reward program| + |epoch
`e` |integer|True|The epoch number| + |epoch_start_time
`es` |string|True|The start time of the epoch| + |epoch_end_time
`ee` |string|True|The end time of the epoch| + |badge
`b` |EpochBadgeType|True|The type of the badge| + |distributed_badges
`db` |[EpochBadgeType]|True|The distributed badges| + |total_point
`tp` |string|True|Total point| + |rank
`r` |integer|True|Rank| + |claimed_at
`ca` |string|True|The time when the badge was claimed, or the epoch end time if the user has already completed the KYC process| + ??? info "[RewardProgramType](/../../schemas/reward_program_type)" + |Value| Description | + |-|-| + |`ECOSYSTEM` = 1|| + |`TRADER` = 2|| + |`LP` = 3|| + ??? info "[EpochBadgeType](/../../schemas/epoch_badge_type)" + |Value| Description | + |-|-| + |`CHAMPION` = 1|Champion| + |`LEGEND` = 2|Legend| + |`VETERAN` = 3|Veteran| + |`ELITE` = 4|Elite| + |`MASTER` = 5|Master| + |`EXPERT` = 6|Expert| + |`WARRIOR` = 7|Warrior| + |`SERGEANT` = 8|Sergeant| + |`RANGER` = 9|Ranger| + |`CHALLENGER` = 10|Challenger| + |`APPRENTICE` = 11|Apprentice| + |`ROOKIE` = 12|Rookie| + ??? info "[EpochBadgeType](/../../schemas/epoch_badge_type)" + |Value| Description | + |-|-| + |`CHAMPION` = 1|Champion| + |`LEGEND` = 2|Legend| + |`VETERAN` = 3|Veteran| + |`ELITE` = 4|Elite| + |`MASTER` = 5|Master| + |`EXPERT` = 6|Expert| + |`WARRIOR` = 7|Warrior| + |`SERGEANT` = 8|Sergeant| + |`RANGER` = 9|Ranger| + |`CHALLENGER` = 10|Challenger| + |`APPRENTICE` = 11|Apprentice| + |`ROOKIE` = 12|Rookie| diff --git a/artifacts/apidocs/schemas/reward_epoch_info.md b/artifacts/apidocs/schemas/reward_epoch_info.md new file mode 100644 index 0000000..e598eaf --- /dev/null +++ b/artifacts/apidocs/schemas/reward_epoch_info.md @@ -0,0 +1,13 @@ +!!! info "[RewardEpochInfo](/../../schemas/reward_epoch_info)" + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |epoch
`e` |integer|True|The epoch number| + |epoch_start_time
`es` |string|True|The start time of the epoch| + |epoch_end_time
`ee` |string|True|The end time of the epoch| + |status
`s` |RewardEpochStatus|True|The status of the epoch| + ??? info "[RewardEpochStatus](/../../schemas/reward_epoch_status)" + |Value| Description | + |-|-| + |`PAST` = 1|Past| + |`CURRENT` = 2|Current| + |`FUTURE` = 3|Future| diff --git a/artifacts/apidocs/schemas/reward_epoch_status.md b/artifacts/apidocs/schemas/reward_epoch_status.md new file mode 100644 index 0000000..8cb3e94 --- /dev/null +++ b/artifacts/apidocs/schemas/reward_epoch_status.md @@ -0,0 +1,6 @@ +!!! info "[RewardEpochStatus](/../../schemas/reward_epoch_status)" + |Value| Description | + |-|-| + |`PAST` = 1|Past| + |`CURRENT` = 2|Current| + |`FUTURE` = 3|Future| diff --git a/artifacts/apidocs/schemas/reward_program_type.md b/artifacts/apidocs/schemas/reward_program_type.md new file mode 100644 index 0000000..c9e3094 --- /dev/null +++ b/artifacts/apidocs/schemas/reward_program_type.md @@ -0,0 +1,6 @@ +!!! info "[RewardProgramType](/../../schemas/reward_program_type)" + |Value| Description | + |-|-| + |`ECOSYSTEM` = 1|| + |`TRADER` = 2|| + |`LP` = 3|| diff --git a/artifacts/apidocs/schemas/spot_balance.md b/artifacts/apidocs/schemas/spot_balance.md index 93c15e8..82e24ec 100644 --- a/artifacts/apidocs/schemas/spot_balance.md +++ b/artifacts/apidocs/schemas/spot_balance.md @@ -23,3 +23,27 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/sub_account.md b/artifacts/apidocs/schemas/sub_account.md index 88cfd84..94396c7 100644 --- a/artifacts/apidocs/schemas/sub_account.md +++ b/artifacts/apidocs/schemas/sub_account.md @@ -37,6 +37,30 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| ??? info "[SpotBalance](/../../schemas/spot_balance)" |Name
`Lite`|Type|Required
`Default`| Description | |-|-|-|-| @@ -62,6 +86,30 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| ??? info "[Positions](/../../schemas/positions)" |Name
`Lite`|Type|Required
`Default`| Description | |-|-|-|-| diff --git a/artifacts/apidocs/schemas/tpsl_order_metadata.md b/artifacts/apidocs/schemas/tpsl_order_metadata.md new file mode 100644 index 0000000..0b760a8 --- /dev/null +++ b/artifacts/apidocs/schemas/tpsl_order_metadata.md @@ -0,0 +1,15 @@ +!!! info "[TPSLOrderMetadata](/../../schemas/tpsl_order_metadata)" + Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

### Fields:
- **triggerBy**: Defines the price type that activates the order (e.g., index price).
- **triggerPrice**: The price at which the order is triggered, expressed in `9` decimal precision.


+ + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |trigger_by
`tb` |TriggerBy|True|Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order| + |trigger_price
`tp` |string|True|The Trigger Price of the order, expressed in `9` decimals.| + ??? info "[TriggerBy](/../../schemas/trigger_by)" + Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order.

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.


+ + |Value| Description | + |-|-| + |`UNSPECIFIED` = 0|no trigger condition| + |`INDEX` = 1|INDEX - Order is activated when the index price reaches the trigger price| + |`LAST` = 2|LAST - Order is activated when the last trade price reaches the trigger price| diff --git a/artifacts/apidocs/schemas/transfer_history.md b/artifacts/apidocs/schemas/transfer_history.md index b3e5b6f..55c7dea 100644 --- a/artifacts/apidocs/schemas/transfer_history.md +++ b/artifacts/apidocs/schemas/transfer_history.md @@ -31,6 +31,30 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| ??? info "[Signature](/../../schemas/signature)" |Name
`Lite`|Type|Required
`Default`| Description | |-|-|-|-| diff --git a/artifacts/apidocs/schemas/trigger_by.md b/artifacts/apidocs/schemas/trigger_by.md new file mode 100644 index 0000000..fe337fd --- /dev/null +++ b/artifacts/apidocs/schemas/trigger_by.md @@ -0,0 +1,8 @@ +!!! info "[TriggerBy](/../../schemas/trigger_by)" + Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order.

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.


+ + |Value| Description | + |-|-| + |`UNSPECIFIED` = 0|no trigger condition| + |`INDEX` = 1|INDEX - Order is activated when the index price reaches the trigger price| + |`LAST` = 2|LAST - Order is activated when the last trade price reaches the trigger price| diff --git a/artifacts/apidocs/schemas/trigger_order_metadata.md b/artifacts/apidocs/schemas/trigger_order_metadata.md new file mode 100644 index 0000000..4a97256 --- /dev/null +++ b/artifacts/apidocs/schemas/trigger_order_metadata.md @@ -0,0 +1,30 @@ +!!! info "[TriggerOrderMetadata](/../../schemas/trigger_order_metadata)" + Contains metadata related to trigger orders, such as Take Profit (TP) or Stop Loss (SL).

Trigger orders are used to automatically execute an order when a predefined price condition is met, allowing traders to implement risk management strategies.


+ + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |trigger_type
`tt` |TriggerType|True|Type of the trigger order. eg: Take Profit, Stop Loss, etc| + |tpsl
`t` |TPSLOrderMetadata|True|Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

| + ??? info "[TriggerType](/../../schemas/trigger_type)" + Defines the type of trigger order used in trading, such as Take Profit or Stop Loss.

Trigger orders allow execution based on pre-defined price conditions rather than immediate market conditions.


+ + |Value| Description | + |-|-| + |`UNSPECIFIED` = 0|Not a trigger order. The order executes normally without any trigger conditions.| + |`TAKE_PROFIT` = 1|Take Profit Order - Executes when the price reaches a specified level to secure profits.| + |`STOP_LOSS` = 2|Stop Loss Order - Executes when the price reaches a specified level to limit losses.| + ??? info "[TPSLOrderMetadata](/../../schemas/tpsl_order_metadata)" + Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

### Fields:
- **triggerBy**: Defines the price type that activates the order (e.g., index price).
- **triggerPrice**: The price at which the order is triggered, expressed in `9` decimal precision.


+ + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |trigger_by
`tb` |TriggerBy|True|Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order| + |trigger_price
`tp` |string|True|The Trigger Price of the order, expressed in `9` decimals.| + ??? info "[TriggerBy](/../../schemas/trigger_by)" + Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order.

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.


+ + |Value| Description | + |-|-| + |`UNSPECIFIED` = 0|no trigger condition| + |`INDEX` = 1|INDEX - Order is activated when the index price reaches the trigger price| + |`LAST` = 2|LAST - Order is activated when the last trade price reaches the trigger price| diff --git a/artifacts/apidocs/schemas/trigger_type.md b/artifacts/apidocs/schemas/trigger_type.md new file mode 100644 index 0000000..581ff4e --- /dev/null +++ b/artifacts/apidocs/schemas/trigger_type.md @@ -0,0 +1,8 @@ +!!! info "[TriggerType](/../../schemas/trigger_type)" + Defines the type of trigger order used in trading, such as Take Profit or Stop Loss.

Trigger orders allow execution based on pre-defined price conditions rather than immediate market conditions.


+ + |Value| Description | + |-|-| + |`UNSPECIFIED` = 0|Not a trigger order. The order executes normally without any trigger conditions.| + |`TAKE_PROFIT` = 1|Take Profit Order - Executes when the price reaches a specified level to secure profits.| + |`STOP_LOSS` = 2|Stop Loss Order - Executes when the price reaches a specified level to limit losses.| diff --git a/artifacts/apidocs/schemas/withdrawal.md b/artifacts/apidocs/schemas/withdrawal.md index 82e7877..ccfe3ee 100644 --- a/artifacts/apidocs/schemas/withdrawal.md +++ b/artifacts/apidocs/schemas/withdrawal.md @@ -25,6 +25,30 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK 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 00c6893..759c235 100644 --- a/artifacts/apidocs/schemas/withdrawal_history.md +++ b/artifacts/apidocs/schemas/withdrawal_history.md @@ -27,6 +27,30 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK 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 new file mode 100644 index 0000000..0206e12 --- /dev/null +++ b/artifacts/apidocs/schemas/ws_cancel_feed_data_v1.md @@ -0,0 +1,54 @@ +!!! info "[WSCancelFeedDataV1](/../../schemas/ws_cancel_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` |CancelStatusFeed|True|Data relating to the status of the cancellation attempt| + |prev_sequence_number
`ps` |string|True|The previous sequence number that determines global message order within the specific stream| + ??? info "[CancelStatusFeed](/../../schemas/cancel_status_feed)" + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |sub_account_id
`sa` |string|True|The subaccount ID that requested the cancellation| + |client_order_id
`co` |string|True|A unique identifier for the active order within a subaccount, specified by the client| + |order_id
`oi` |string|True|A unique 128-bit identifier for the order, deterministically generated within the GRVT backend| + |reason
`r` |OrderRejectReason|True|The user-provided reason for cancelling the order| + |update_time
`ut` |string|False
`0`|[Filled by GRVT Backend] Time at which the cancellation status was updated by GRVT in unix nanoseconds| + |cancel_status
`cs` |CancelStatus|True|Status of the cancellation attempt| + ??? 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| + ??? 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.| diff --git a/artifacts/apidocs/schemas/ws_cancel_feed_selector_v1.md b/artifacts/apidocs/schemas/ws_cancel_feed_selector_v1.md new file mode 100644 index 0000000..016d250 --- /dev/null +++ b/artifacts/apidocs/schemas/ws_cancel_feed_selector_v1.md @@ -0,0 +1,6 @@ +!!! info "[WSCancelFeedSelectorV1](/../../schemas/ws_cancel_feed_selector_v1)" + Subscribes to a feed of time-to-live expiry events for order cancellations requested by a given subaccount.
**This stream presently only provides expiry updates for cancel-order requests set with a valid TTL value**.
Successful order cancellations will reflect as updates published to the (order-state stream)[https://api-docs.grvt.io/trading_streams/#order-state].
_A future release will expand the functionality of this stream to provide more general status updates on order cancellation requests._
Each Order can be uniquely identified by its `client_order_id`.

+ + |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_candlestick_feed_data_v1.md b/artifacts/apidocs/schemas/ws_candlestick_feed_data_v1.md index 253e439..04fab98 100644 --- a/artifacts/apidocs/schemas/ws_candlestick_feed_data_v1.md +++ b/artifacts/apidocs/schemas/ws_candlestick_feed_data_v1.md @@ -5,6 +5,7 @@ |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` |Candlestick|True|A candlestick entry matching the request filters| + |prev_sequence_number
`ps` |string|True|The previous sequence number that determines global message order within the specific stream| ??? info "[Candlestick](/../../schemas/candlestick)"
diff --git a/artifacts/apidocs/schemas/ws_deposit_feed_data_v1.md b/artifacts/apidocs/schemas/ws_deposit_feed_data_v1.md index b12a0ce..5a40a2b 100644 --- a/artifacts/apidocs/schemas/ws_deposit_feed_data_v1.md +++ b/artifacts/apidocs/schemas/ws_deposit_feed_data_v1.md @@ -7,6 +7,7 @@ |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` |Deposit|True|The Deposit object| + |prev_sequence_number
`ps` |string|True|The previous sequence number that determines global message order within the specific stream| ??? info "[Deposit](/../../schemas/deposit)" |Name
`Lite`|Type|Required
`Default`| Description | |-|-|-|-| @@ -33,3 +34,27 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/ws_fill_feed_data_v1.md b/artifacts/apidocs/schemas/ws_fill_feed_data_v1.md index bb1c270..63eed1a 100644 --- a/artifacts/apidocs/schemas/ws_fill_feed_data_v1.md +++ b/artifacts/apidocs/schemas/ws_fill_feed_data_v1.md @@ -5,6 +5,7 @@ |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` |Fill|True|A private trade matching the request filter| + |prev_sequence_number
`ps` |string|True|The previous sequence number that determines global message order within the specific stream| ??? info "[Fill](/../../schemas/fill)" |Name
`Lite`|Type|Required
`Default`| Description | |-|-|-|-| @@ -27,6 +28,7 @@ |venue
`v` |Venue|True|The venue where the trade occurred| |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| |signer
`s1` |string|True|The address (public key) of the wallet signing the payload| + |broker
`b` |BrokerTag|False
``|Specifies the broker who brokered the order| ??? info "[Venue](/../../schemas/venue)" The list of Trading Venues that are supported on the GRVT exchange
@@ -34,3 +36,11 @@ |-|-| |`ORDERBOOK` = 1|the trade is cleared on the orderbook venue| |`RFQ` = 2|the trade is cleared on the RFQ venue| + ??? info "[BrokerTag](/../../schemas/broker_tag)" + BrokerTag is a tag for the broker that the order is sent from.
+ + |Value| Description | + |-|-| + |`COIN_ROUTES` = 1|CoinRoutes| + |`ALERTATRON` = 2|Alertatron| + |`ORIGAMI` = 3|Origami| diff --git a/artifacts/apidocs/schemas/ws_mini_ticker_feed_data_v1.md b/artifacts/apidocs/schemas/ws_mini_ticker_feed_data_v1.md index b04fa9c..9a5fd62 100644 --- a/artifacts/apidocs/schemas/ws_mini_ticker_feed_data_v1.md +++ b/artifacts/apidocs/schemas/ws_mini_ticker_feed_data_v1.md @@ -5,6 +5,7 @@ |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` |MiniTicker|True|A mini ticker matching the request filter| + |prev_sequence_number
`ps` |string|True|The previous sequence number that determines global message order within the specific stream| ??? info "[MiniTicker](/../../schemas/mini_ticker)" |Name
`Lite`|Type|Required
`Default`| Description | |-|-|-|-| diff --git a/artifacts/apidocs/schemas/ws_order_feed_data_v1.md b/artifacts/apidocs/schemas/ws_order_feed_data_v1.md index 140e0b3..fd36537 100644 --- a/artifacts/apidocs/schemas/ws_order_feed_data_v1.md +++ b/artifacts/apidocs/schemas/ws_order_feed_data_v1.md @@ -5,6 +5,7 @@ |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` |Order|True|The order object being created or updated| + |prev_sequence_number
`ps` |string|True|The previous sequence number that determines global message order within the specific stream| ??? 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
@@ -56,6 +57,46 @@ |-|-|-|-| |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| + |trigger
`t` |TriggerOrderMetadata|True|Trigger fields are used to support any type of trigger order such as TP/SL| + |broker
`b` |BrokerTag|False
``|Specifies the broker who brokered the order| + ??? info "[TriggerOrderMetadata](/../../schemas/trigger_order_metadata)" + Contains metadata related to trigger orders, such as Take Profit (TP) or Stop Loss (SL).

Trigger orders are used to automatically execute an order when a predefined price condition is met, allowing traders to implement risk management strategies.


+ + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |trigger_type
`tt` |TriggerType|True|Type of the trigger order. eg: Take Profit, Stop Loss, etc| + |tpsl
`t` |TPSLOrderMetadata|True|Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

| + ??? info "[TriggerType](/../../schemas/trigger_type)" + Defines the type of trigger order used in trading, such as Take Profit or Stop Loss.

Trigger orders allow execution based on pre-defined price conditions rather than immediate market conditions.


+ + |Value| Description | + |-|-| + |`UNSPECIFIED` = 0|Not a trigger order. The order executes normally without any trigger conditions.| + |`TAKE_PROFIT` = 1|Take Profit Order - Executes when the price reaches a specified level to secure profits.| + |`STOP_LOSS` = 2|Stop Loss Order - Executes when the price reaches a specified level to limit losses.| + ??? info "[TPSLOrderMetadata](/../../schemas/tpsl_order_metadata)" + Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

### Fields:
- **triggerBy**: Defines the price type that activates the order (e.g., index price).
- **triggerPrice**: The price at which the order is triggered, expressed in `9` decimal precision.


+ + |Name
`Lite`|Type|Required
`Default`| Description | + |-|-|-|-| + |trigger_by
`tb` |TriggerBy|True|Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order| + |trigger_price
`tp` |string|True|The Trigger Price of the order, expressed in `9` decimals.| + ??? info "[TriggerBy](/../../schemas/trigger_by)" + Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order.

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.


+ + |Value| Description | + |-|-| + |`UNSPECIFIED` = 0|no trigger condition| + |`INDEX` = 1|INDEX - Order is activated when the index price reaches the trigger price| + |`LAST` = 2|LAST - Order is activated when the last trade price reaches the trigger price| + ??? info "[BrokerTag](/../../schemas/broker_tag)" + BrokerTag is a tag for the broker that the order is sent from.
+ + |Value| Description | + |-|-| + |`COIN_ROUTES` = 1|CoinRoutes| + |`ALERTATRON` = 2|Alertatron| + |`ORIGAMI` = 3|Origami| ??? info "[OrderState](/../../schemas/order_state)" |Name
`Lite`|Type|Required
`Default`| Description | |-|-|-|-| @@ -105,3 +146,4 @@ |`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| 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 e48e822..ce19912 100644 --- a/artifacts/apidocs/schemas/ws_order_state_feed_data_v1.md +++ b/artifacts/apidocs/schemas/ws_order_state_feed_data_v1.md @@ -5,6 +5,7 @@ |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` |OrderStateFeed|True|The Order State Feed| + |prev_sequence_number
`ps` |string|True|The previous sequence number that determines global message order within the specific stream| ??? info "[OrderStateFeed](/../../schemas/order_state_feed)" |Name
`Lite`|Type|Required
`Default`| Description | |-|-|-|-| @@ -60,3 +61,4 @@ |`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| diff --git a/artifacts/apidocs/schemas/ws_orderbook_levels_feed_data_v1.md b/artifacts/apidocs/schemas/ws_orderbook_levels_feed_data_v1.md index 74587a0..22ebdae 100644 --- a/artifacts/apidocs/schemas/ws_orderbook_levels_feed_data_v1.md +++ b/artifacts/apidocs/schemas/ws_orderbook_levels_feed_data_v1.md @@ -5,6 +5,7 @@ |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` |OrderbookLevels|True|An orderbook levels object matching the request filter| + |prev_sequence_number
`ps` |string|True|The previous sequence number that determines global message order within the specific stream| ??? info "[OrderbookLevels](/../../schemas/orderbook_levels)" |Name
`Lite`|Type|Required
`Default`| Description | |-|-|-|-| diff --git a/artifacts/apidocs/schemas/ws_positions_feed_data_v1.md b/artifacts/apidocs/schemas/ws_positions_feed_data_v1.md index a090b94..34429db 100644 --- a/artifacts/apidocs/schemas/ws_positions_feed_data_v1.md +++ b/artifacts/apidocs/schemas/ws_positions_feed_data_v1.md @@ -5,6 +5,7 @@ |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` |Positions|True|A Position being created or updated matching the request filter| + |prev_sequence_number
`ps` |string|True|The previous sequence number that determines global message order within the specific stream| ??? info "[Positions](/../../schemas/positions)" |Name
`Lite`|Type|Required
`Default`| Description | |-|-|-|-| diff --git a/artifacts/apidocs/schemas/ws_subscribe_params.md b/artifacts/apidocs/schemas/ws_subscribe_params.md index 7c9c059..e79ced4 100644 --- a/artifacts/apidocs/schemas/ws_subscribe_params.md +++ b/artifacts/apidocs/schemas/ws_subscribe_params.md @@ -5,3 +5,4 @@ |-|-|-|-| |stream
`s` |string|True|The channel to subscribe to (eg: ticker.s / ticker.d)| |selectors
`s1` |[string]|True|The list of feeds to subscribe to| + |use_global_sequence_number
`ug` |boolean|False
`false`|Whether to use the global sequence number for the stream| diff --git a/artifacts/apidocs/schemas/ws_subscribe_response_v1_legacy.md b/artifacts/apidocs/schemas/ws_subscribe_response_v1_legacy.md index 0ddb8ed..dce4145 100644 --- a/artifacts/apidocs/schemas/ws_subscribe_response_v1_legacy.md +++ b/artifacts/apidocs/schemas/ws_subscribe_response_v1_legacy.md @@ -9,3 +9,4 @@ |unsubs
`u` |[string]|True|The list of feeds unsubscribed from| |num_snapshots
`ns` |[integer]|True|The number of snapshot payloads to expect for each subscribed feed. Returned in same order as `subs`| |first_sequence_number
`fs` |[string]|True|The first sequence number to expect for each subscribed feed. Returned in same order as `subs`| + |latest_sequence_number
`ls` |[string]|True|The sequence number of the most recent message in the stream. Next received sequence number must be larger than this one. Returned in same order as `subs`| diff --git a/artifacts/apidocs/schemas/ws_subscribe_result.md b/artifacts/apidocs/schemas/ws_subscribe_result.md index a60e253..084eb60 100644 --- a/artifacts/apidocs/schemas/ws_subscribe_result.md +++ b/artifacts/apidocs/schemas/ws_subscribe_result.md @@ -8,3 +8,4 @@ |unsubs
`u` |[string]|True|The list of feeds unsubscribed from| |num_snapshots
`ns` |[integer]|True|The number of snapshot payloads to expect for each subscribed feed. Returned in same order as `subs`| |first_sequence_number
`fs` |[string]|True|The first sequence number to expect for each subscribed feed. Returned in same order as `subs`| + |latest_sequence_number
`ls` |[string]|True|The sequence number of the most recent message in the stream. Next received sequence number must be larger than this one. Returned in same order as `subs`| diff --git a/artifacts/apidocs/schemas/ws_ticker_feed_data_v1.md b/artifacts/apidocs/schemas/ws_ticker_feed_data_v1.md index b821c89..f8dc199 100644 --- a/artifacts/apidocs/schemas/ws_ticker_feed_data_v1.md +++ b/artifacts/apidocs/schemas/ws_ticker_feed_data_v1.md @@ -5,6 +5,7 @@ |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` |Ticker|True|A ticker matching the request filter| + |prev_sequence_number
`ps` |string|True|The previous sequence number that determines global message order within the specific stream| ??? info "[Ticker](/../../schemas/ticker)" Derived data such as the below, will not be included by default:
- 24 hour volume (`buyVolume + sellVolume`)
- 24 hour taker buy/sell ratio (`buyVolume / sellVolume`)
- 24 hour average trade price (`volumeQ / volumeU`)
- 24 hour average trade volume (`volume / trades`)
- 24 hour percentage change (`24hStatChange / 24hStat`)
- 48 hour statistics (`2 * 24hStat - 24hStatChange`)

To query for an extended ticker payload, leverage the `greeks` and the `derived` flags.
Ticker extensions are currently under design to offer you more convenience.
These flags are only supported on the `Ticker Snapshot` WS endpoint, and on the `Ticker` API endpoint.

diff --git a/artifacts/apidocs/schemas/ws_trade_feed_data_v1.md b/artifacts/apidocs/schemas/ws_trade_feed_data_v1.md index a2e0ce6..e1c1d55 100644 --- a/artifacts/apidocs/schemas/ws_trade_feed_data_v1.md +++ b/artifacts/apidocs/schemas/ws_trade_feed_data_v1.md @@ -5,6 +5,7 @@ |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` |Trade|True|A public trade matching the request filter| + |prev_sequence_number
`ps` |string|True|The previous sequence number that determines global message order within the specific stream| ??? info "[Trade](/../../schemas/trade)" All private RFQs and Private AXEs will be filtered out from the responses
diff --git a/artifacts/apidocs/schemas/ws_transfer_feed_data_v1.md b/artifacts/apidocs/schemas/ws_transfer_feed_data_v1.md index cc04e7d..12a5c74 100644 --- a/artifacts/apidocs/schemas/ws_transfer_feed_data_v1.md +++ b/artifacts/apidocs/schemas/ws_transfer_feed_data_v1.md @@ -6,10 +6,12 @@ |stream
`s` |string|True|The websocket channel to which the response is sent| |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` |Transfer|True|The Transfer object| - ??? info "[Transfer](/../../schemas/transfer)" + |feed
`f` |TransferHistory|True|The transfer history matching the requested filters| + |prev_sequence_number
`ps` |string|True|The previous sequence number that determines global message order within the specific stream| + ??? info "[TransferHistory](/../../schemas/transfer_history)" |Name
`Lite`|Type|Required
`Default`| Description | |-|-|-|-| + |tx_id
`ti` |string|True|The transaction ID of the transfer| |from_account_id
`fa` |string|True|The account to transfer from| |from_sub_account_id
`fs` |string|True|The subaccount to transfer from (0 if transferring from main account)| |to_account_id
`ta` |string|True|The account to deposit into| @@ -17,6 +19,7 @@ |currency
`c` |Currency|True|The token currency to transfer| |num_tokens
`nt` |string|True|The number of tokens to transfer| |signature
`s` |Signature|True|The signature of the transfer| + |event_time
`et` |string|True|The timestamp of the transfer in unix nanoseconds| |transfer_type
`tt` |TransferType|True|The type of transfer| |transfer_metadata
`tm` |string|True|The metadata of the transfer| ??? info "[Currency](/../../schemas/currency)" @@ -38,6 +41,30 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK token| ??? info "[Signature](/../../schemas/signature)" |Name
`Lite`|Type|Required
`Default`| Description | |-|-|-|-| diff --git a/artifacts/apidocs/schemas/ws_unsubscribe_params.md b/artifacts/apidocs/schemas/ws_unsubscribe_params.md index 7fcaa6b..071d96c 100644 --- a/artifacts/apidocs/schemas/ws_unsubscribe_params.md +++ b/artifacts/apidocs/schemas/ws_unsubscribe_params.md @@ -5,3 +5,4 @@ |-|-|-|-| |stream
`s` |string|True|The channel to unsubscribe from (eg: ticker.s / ticker.d)| |selectors
`s1` |[string]|True|The list of feeds to unsubscribe from| + |use_global_sequence_number
`ug` |boolean|False
`false`|Whether to use the global sequence number for the stream| diff --git a/artifacts/apidocs/schemas/ws_withdrawal_feed_data_v1.md b/artifacts/apidocs/schemas/ws_withdrawal_feed_data_v1.md index ac0adb3..9739816 100644 --- a/artifacts/apidocs/schemas/ws_withdrawal_feed_data_v1.md +++ b/artifacts/apidocs/schemas/ws_withdrawal_feed_data_v1.md @@ -7,6 +7,7 @@ |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` |Withdrawal|True|The Withdrawal object| + |prev_sequence_number
`ps` |string|True|The previous sequence number that determines global message order within the specific stream| ??? info "[Withdrawal](/../../schemas/withdrawal)" |Name
`Lite`|Type|Required
`Default`| Description | |-|-|-|-| @@ -34,6 +35,30 @@ |`ATOM` = 12|the ATOM token| |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`XLM` = 16|the XLM token| + |`WLD` = 17|the WLD token| + |`WIF` = 18|the WIF token| + |`VIRTUAL` = 19|the VIRTUAL token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`KSHIB` = 22|the 1000SHIB token| + |`POPCAT` = 23|the POPCAT token| + |`PENGU` = 24|the PENGU token| + |`LINK` = 25|the LINK token| + |`KBONK` = 26|the 1000BONK token| + |`JUP` = 27|the JUP token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`ENA` = 29|the ENA token| + |`DOGE` = 30|the DOGE token| + |`AIXBT` = 31|the AIXBT token| + |`AI_16_Z` = 32|the AI16Z token| + |`ADA` = 33|the ADA token| + |`AAVE` = 34|the AAVE token| + |`BERA` = 35|the BERA token| + |`VINE` = 36|the VINE token| + |`PENDLE` = 37|the PENDLE token| + |`UXLINK` = 38|the UXLINK 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 220bbff..a4737ee 100644 --- a/artifacts/apidocs/trading_api.md +++ b/artifacts/apidocs/trading_api.md @@ -39,7 +39,15 @@ LITE ENDPOINT: lite/v1/create_order }, "metadata": { "client_order_id": "23042", - "create_time": "1697788800000000000" + "create_time": "1697788800000000000", + "trigger": { + "trigger_type": "UNSPECIFIED", + "tpsl": { + "trigger_by": "UNSPECIFIED", + "trigger_price": "65038.10" + } + }, + "broker": "COIN_ROUTES" }, } } @@ -69,7 +77,15 @@ LITE ENDPOINT: lite/v1/create_order }, "m": { "co": "23042", - "ct": "1697788800000000000" + "ct": "1697788800000000000", + "t": { + "tt": "UNSPECIFIED", + "t": { + "tb": "UNSPECIFIED", + "tp": "65038.10" + } + }, + "b": "COIN_ROUTES" }, } } @@ -107,7 +123,15 @@ LITE ENDPOINT: lite/v1/create_order }, "metadata": { "client_order_id": "23042", - "create_time": "1697788800000000000" + "create_time": "1697788800000000000", + "trigger": { + "trigger_type": "UNSPECIFIED", + "tpsl": { + "trigger_by": "UNSPECIFIED", + "trigger_price": "65038.10" + } + }, + "broker": "COIN_ROUTES" }, "state": { "status": "PENDING", @@ -146,7 +170,15 @@ LITE ENDPOINT: lite/v1/create_order }, "m": { "co": "23042", - "ct": "1697788800000000000" + "ct": "1697788800000000000", + "t": { + "tt": "UNSPECIFIED", + "t": { + "tb": "UNSPECIFIED", + "tp": "65038.10" + } + }, + "b": "COIN_ROUTES" }, "s1": { "s": "PENDING", @@ -174,6 +206,7 @@ LITE ENDPOINT: lite/v1/create_order |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| @@ -205,7 +238,11 @@ LITE ENDPOINT: lite/v1/create_order |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|
!!! failure @@ -260,7 +297,15 @@ LITE ENDPOINT: lite/v1/create_order }, "metadata": { "client_order_id": "23042", - "create_time": "1697788800000000000" + "create_time": "1697788800000000000", + "trigger": { + "trigger_type": "UNSPECIFIED", + "tpsl": { + "trigger_by": "UNSPECIFIED", + "trigger_price": "65038.10" + } + }, + "broker": "COIN_ROUTES" }, } } @@ -298,7 +343,15 @@ LITE ENDPOINT: lite/v1/create_order }, "metadata": { "client_order_id": "23042", - "create_time": "1697788800000000000" + "create_time": "1697788800000000000", + "trigger": { + "trigger_type": "UNSPECIFIED", + "tpsl": { + "trigger_by": "UNSPECIFIED", + "trigger_price": "65038.10" + } + }, + "broker": "COIN_ROUTES" }, } }, @@ -336,7 +389,15 @@ LITE ENDPOINT: lite/v1/create_order }, "m": { "co": "23042", - "ct": "1697788800000000000" + "ct": "1697788800000000000", + "t": { + "tt": "UNSPECIFIED", + "t": { + "tb": "UNSPECIFIED", + "tp": "65038.10" + } + }, + "b": "COIN_ROUTES" }, } } @@ -374,7 +435,15 @@ LITE ENDPOINT: lite/v1/create_order }, "m": { "co": "23042", - "ct": "1697788800000000000" + "ct": "1697788800000000000", + "t": { + "tt": "UNSPECIFIED", + "t": { + "tb": "UNSPECIFIED", + "tp": "65038.10" + } + }, + "b": "COIN_ROUTES" }, } }, @@ -413,7 +482,15 @@ LITE ENDPOINT: lite/v1/create_order }, "metadata": { "client_order_id": "23042", - "create_time": "1697788800000000000" + "create_time": "1697788800000000000", + "trigger": { + "trigger_type": "UNSPECIFIED", + "tpsl": { + "trigger_by": "UNSPECIFIED", + "trigger_price": "65038.10" + } + }, + "broker": "COIN_ROUTES" }, } } @@ -451,7 +528,15 @@ LITE ENDPOINT: lite/v1/create_order }, "metadata": { "client_order_id": "23042", - "create_time": "1697788800000000000" + "create_time": "1697788800000000000", + "trigger": { + "trigger_type": "UNSPECIFIED", + "tpsl": { + "trigger_by": "UNSPECIFIED", + "trigger_price": "65038.10" + } + }, + "broker": "COIN_ROUTES" }, } }, @@ -489,7 +574,15 @@ LITE ENDPOINT: lite/v1/create_order }, "m": { "co": "23042", - "ct": "1697788800000000000" + "ct": "1697788800000000000", + "t": { + "tt": "UNSPECIFIED", + "t": { + "tb": "UNSPECIFIED", + "tp": "65038.10" + } + }, + "b": "COIN_ROUTES" }, } } @@ -527,7 +620,15 @@ LITE ENDPOINT: lite/v1/create_order }, "m": { "co": "23042", - "ct": "1697788800000000000" + "ct": "1697788800000000000", + "t": { + "tt": "UNSPECIFIED", + "t": { + "tb": "UNSPECIFIED", + "tp": "65038.10" + } + }, + "b": "COIN_ROUTES" }, } }, @@ -566,7 +667,15 @@ LITE ENDPOINT: lite/v1/create_order }, "metadata": { "client_order_id": "23042", - "create_time": "1697788800000000000" + "create_time": "1697788800000000000", + "trigger": { + "trigger_type": "UNSPECIFIED", + "tpsl": { + "trigger_by": "UNSPECIFIED", + "trigger_price": "65038.10" + } + }, + "broker": "COIN_ROUTES" }, } } @@ -604,7 +713,15 @@ LITE ENDPOINT: lite/v1/create_order }, "metadata": { "client_order_id": "23042", - "create_time": "1697788800000000000" + "create_time": "1697788800000000000", + "trigger": { + "trigger_type": "UNSPECIFIED", + "tpsl": { + "trigger_by": "UNSPECIFIED", + "trigger_price": "65038.10" + } + }, + "broker": "COIN_ROUTES" }, } }, @@ -642,7 +759,15 @@ LITE ENDPOINT: lite/v1/create_order }, "m": { "co": "23042", - "ct": "1697788800000000000" + "ct": "1697788800000000000", + "t": { + "tt": "UNSPECIFIED", + "t": { + "tb": "UNSPECIFIED", + "tp": "65038.10" + } + }, + "b": "COIN_ROUTES" }, } } @@ -680,7 +805,15 @@ LITE ENDPOINT: lite/v1/create_order }, "m": { "co": "23042", - "ct": "1697788800000000000" + "ct": "1697788800000000000", + "t": { + "tt": "UNSPECIFIED", + "t": { + "tb": "UNSPECIFIED", + "tp": "65038.10" + } + }, + "b": "COIN_ROUTES" }, } }, @@ -719,7 +852,15 @@ LITE ENDPOINT: lite/v1/create_order }, "metadata": { "client_order_id": "23042", - "create_time": "1697788800000000000" + "create_time": "1697788800000000000", + "trigger": { + "trigger_type": "UNSPECIFIED", + "tpsl": { + "trigger_by": "UNSPECIFIED", + "trigger_price": "65038.10" + } + }, + "broker": "COIN_ROUTES" }, } } @@ -757,7 +898,15 @@ LITE ENDPOINT: lite/v1/create_order }, "metadata": { "client_order_id": "23042", - "create_time": "1697788800000000000" + "create_time": "1697788800000000000", + "trigger": { + "trigger_type": "UNSPECIFIED", + "tpsl": { + "trigger_by": "UNSPECIFIED", + "trigger_price": "65038.10" + } + }, + "broker": "COIN_ROUTES" }, } }, @@ -795,7 +944,15 @@ LITE ENDPOINT: lite/v1/create_order }, "m": { "co": "23042", - "ct": "1697788800000000000" + "ct": "1697788800000000000", + "t": { + "tt": "UNSPECIFIED", + "t": { + "tb": "UNSPECIFIED", + "tp": "65038.10" + } + }, + "b": "COIN_ROUTES" }, } } @@ -833,7 +990,15 @@ LITE ENDPOINT: lite/v1/create_order }, "m": { "co": "23042", - "ct": "1697788800000000000" + "ct": "1697788800000000000", + "t": { + "tt": "UNSPECIFIED", + "t": { + "tb": "UNSPECIFIED", + "tp": "65038.10" + } + }, + "b": "COIN_ROUTES" }, } }, @@ -860,7 +1025,8 @@ LITE ENDPOINT: lite/v1/cancel_order { "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", "order_id": "0x1028403", - "client_order_id": "23042" + "client_order_id": "23042", + "time_to_live_ms": `500` } ``` **Lite Request** @@ -868,7 +1034,8 @@ LITE ENDPOINT: lite/v1/cancel_order { "sa": "'$GRVT_SUB_ACCOUNT_ID'", "oi": "0x1028403", - "co": "23042" + "co": "23042", + "tt": `500` } ```
@@ -906,6 +1073,8 @@ LITE ENDPOINT: lite/v1/cancel_order |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| + |2300|400|Order cancel time-to-live settings currently disabled.| + |2301|400|Order cancel time-to-live exceeds maximum allowed value.| |3021|400|Either order ID or client order ID must be supplied|
@@ -941,7 +1110,8 @@ LITE ENDPOINT: lite/v1/cancel_order --data '{ "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", "order_id": "0x1028403", - "client_order_id": "23042" + "client_order_id": "23042", + "time_to_live_ms": `500` } ' ``` @@ -957,7 +1127,8 @@ LITE ENDPOINT: lite/v1/cancel_order "params": { "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", "order_id": "0x1028403", - "client_order_id": "23042" + "client_order_id": "23042", + "time_to_live_ms": `500` }, "id": 123 } @@ -973,7 +1144,8 @@ LITE ENDPOINT: lite/v1/cancel_order --data '{ "sa": "'$GRVT_SUB_ACCOUNT_ID'", "oi": "0x1028403", - "co": "23042" + "co": "23042", + "tt": `500` } ' ``` @@ -989,7 +1161,8 @@ LITE ENDPOINT: lite/v1/cancel_order "p": { "sa": "'$GRVT_SUB_ACCOUNT_ID'", "oi": "0x1028403", - "co": "23042" + "co": "23042", + "tt": `500` }, "i": 123 } @@ -1006,7 +1179,8 @@ LITE ENDPOINT: lite/v1/cancel_order --data '{ "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", "order_id": "0x1028403", - "client_order_id": "23042" + "client_order_id": "23042", + "time_to_live_ms": `500` } ' ``` @@ -1022,7 +1196,8 @@ LITE ENDPOINT: lite/v1/cancel_order "params": { "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", "order_id": "0x1028403", - "client_order_id": "23042" + "client_order_id": "23042", + "time_to_live_ms": `500` }, "id": 123 } @@ -1038,7 +1213,8 @@ LITE ENDPOINT: lite/v1/cancel_order --data '{ "sa": "'$GRVT_SUB_ACCOUNT_ID'", "oi": "0x1028403", - "co": "23042" + "co": "23042", + "tt": `500` } ' ``` @@ -1054,7 +1230,8 @@ LITE ENDPOINT: lite/v1/cancel_order "p": { "sa": "'$GRVT_SUB_ACCOUNT_ID'", "oi": "0x1028403", - "co": "23042" + "co": "23042", + "tt": `500` }, "i": 123 } @@ -1071,7 +1248,8 @@ LITE ENDPOINT: lite/v1/cancel_order --data '{ "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", "order_id": "0x1028403", - "client_order_id": "23042" + "client_order_id": "23042", + "time_to_live_ms": `500` } ' ``` @@ -1087,7 +1265,8 @@ LITE ENDPOINT: lite/v1/cancel_order "params": { "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", "order_id": "0x1028403", - "client_order_id": "23042" + "client_order_id": "23042", + "time_to_live_ms": `500` }, "id": 123 } @@ -1103,7 +1282,8 @@ LITE ENDPOINT: lite/v1/cancel_order --data '{ "sa": "'$GRVT_SUB_ACCOUNT_ID'", "oi": "0x1028403", - "co": "23042" + "co": "23042", + "tt": `500` } ' ``` @@ -1119,7 +1299,8 @@ LITE ENDPOINT: lite/v1/cancel_order "p": { "sa": "'$GRVT_SUB_ACCOUNT_ID'", "oi": "0x1028403", - "co": "23042" + "co": "23042", + "tt": `500` }, "i": 123 } @@ -1136,7 +1317,8 @@ LITE ENDPOINT: lite/v1/cancel_order --data '{ "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", "order_id": "0x1028403", - "client_order_id": "23042" + "client_order_id": "23042", + "time_to_live_ms": `500` } ' ``` @@ -1152,7 +1334,8 @@ LITE ENDPOINT: lite/v1/cancel_order "params": { "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", "order_id": "0x1028403", - "client_order_id": "23042" + "client_order_id": "23042", + "time_to_live_ms": `500` }, "id": 123 } @@ -1168,7 +1351,8 @@ LITE ENDPOINT: lite/v1/cancel_order --data '{ "sa": "'$GRVT_SUB_ACCOUNT_ID'", "oi": "0x1028403", - "co": "23042" + "co": "23042", + "tt": `500` } ' ``` @@ -1184,7 +1368,8 @@ LITE ENDPOINT: lite/v1/cancel_order "p": { "sa": "'$GRVT_SUB_ACCOUNT_ID'", "oi": "0x1028403", - "co": "23042" + "co": "23042", + "tt": `500` }, "i": 123 } @@ -1619,7 +1804,15 @@ LITE ENDPOINT: lite/v1/order }, "metadata": { "client_order_id": "23042", - "create_time": "1697788800000000000" + "create_time": "1697788800000000000", + "trigger": { + "trigger_type": "UNSPECIFIED", + "tpsl": { + "trigger_by": "UNSPECIFIED", + "trigger_price": "65038.10" + } + }, + "broker": "COIN_ROUTES" }, "state": { "status": "PENDING", @@ -1658,7 +1851,15 @@ LITE ENDPOINT: lite/v1/order }, "m": { "co": "23042", - "ct": "1697788800000000000" + "ct": "1697788800000000000", + "t": { + "tt": "UNSPECIFIED", + "t": { + "tb": "UNSPECIFIED", + "tp": "65038.10" + } + }, + "b": "COIN_ROUTES" }, "s1": { "s": "PENDING", @@ -2033,7 +2234,15 @@ LITE ENDPOINT: lite/v1/open_orders }, "metadata": { "client_order_id": "23042", - "create_time": "1697788800000000000" + "create_time": "1697788800000000000", + "trigger": { + "trigger_type": "UNSPECIFIED", + "tpsl": { + "trigger_by": "UNSPECIFIED", + "trigger_price": "65038.10" + } + }, + "broker": "COIN_ROUTES" }, "state": { "status": "PENDING", @@ -2072,7 +2281,15 @@ LITE ENDPOINT: lite/v1/open_orders }, "m": { "co": "23042", - "ct": "1697788800000000000" + "ct": "1697788800000000000", + "t": { + "tt": "UNSPECIFIED", + "t": { + "tb": "UNSPECIFIED", + "tp": "65038.10" + } + }, + "b": "COIN_ROUTES" }, "s1": { "s": "PENDING", @@ -2469,7 +2686,15 @@ LITE ENDPOINT: lite/v1/order_history }, "metadata": { "client_order_id": "23042", - "create_time": "1697788800000000000" + "create_time": "1697788800000000000", + "trigger": { + "trigger_type": "UNSPECIFIED", + "tpsl": { + "trigger_by": "UNSPECIFIED", + "trigger_price": "65038.10" + } + }, + "broker": "COIN_ROUTES" }, "state": { "status": "PENDING", @@ -2509,7 +2734,15 @@ LITE ENDPOINT: lite/v1/order_history }, "m": { "co": "23042", - "ct": "1697788800000000000" + "ct": "1697788800000000000", + "t": { + "tt": "UNSPECIFIED", + "t": { + "tb": "UNSPECIFIED", + "tp": "65038.10" + } + }, + "b": "COIN_ROUTES" }, "s1": { "s": "PENDING", @@ -2939,7 +3172,15 @@ LITE ENDPOINT: lite/v1/pre_order_check }, "metadata": { "client_order_id": "23042", - "create_time": "1697788800000000000" + "create_time": "1697788800000000000", + "trigger": { + "trigger_type": "UNSPECIFIED", + "tpsl": { + "trigger_by": "UNSPECIFIED", + "trigger_price": "65038.10" + } + }, + "broker": "COIN_ROUTES" }, "state": { "status": "PENDING", @@ -2979,7 +3220,15 @@ LITE ENDPOINT: lite/v1/pre_order_check }, "m": { "co": "23042", - "ct": "1697788800000000000" + "ct": "1697788800000000000", + "t": { + "tt": "UNSPECIFIED", + "t": { + "tb": "UNSPECIFIED", + "tp": "65038.10" + } + }, + "b": "COIN_ROUTES" }, "s1": { "s": "PENDING", @@ -3099,7 +3348,15 @@ LITE ENDPOINT: lite/v1/pre_order_check }, "metadata": { "client_order_id": "23042", - "create_time": "1697788800000000000" + "create_time": "1697788800000000000", + "trigger": { + "trigger_type": "UNSPECIFIED", + "tpsl": { + "trigger_by": "UNSPECIFIED", + "trigger_price": "65038.10" + } + }, + "broker": "COIN_ROUTES" }, "state": { "status": "PENDING", @@ -3147,7 +3404,15 @@ LITE ENDPOINT: lite/v1/pre_order_check }, "metadata": { "client_order_id": "23042", - "create_time": "1697788800000000000" + "create_time": "1697788800000000000", + "trigger": { + "trigger_type": "UNSPECIFIED", + "tpsl": { + "trigger_by": "UNSPECIFIED", + "trigger_price": "65038.10" + } + }, + "broker": "COIN_ROUTES" }, "state": { "status": "PENDING", @@ -3195,7 +3460,15 @@ LITE ENDPOINT: lite/v1/pre_order_check }, "m": { "co": "23042", - "ct": "1697788800000000000" + "ct": "1697788800000000000", + "t": { + "tt": "UNSPECIFIED", + "t": { + "tb": "UNSPECIFIED", + "tp": "65038.10" + } + }, + "b": "COIN_ROUTES" }, "s1": { "s": "PENDING", @@ -3243,7 +3516,15 @@ LITE ENDPOINT: lite/v1/pre_order_check }, "m": { "co": "23042", - "ct": "1697788800000000000" + "ct": "1697788800000000000", + "t": { + "tt": "UNSPECIFIED", + "t": { + "tb": "UNSPECIFIED", + "tp": "65038.10" + } + }, + "b": "COIN_ROUTES" }, "s1": { "s": "PENDING", @@ -3292,7 +3573,15 @@ LITE ENDPOINT: lite/v1/pre_order_check }, "metadata": { "client_order_id": "23042", - "create_time": "1697788800000000000" + "create_time": "1697788800000000000", + "trigger": { + "trigger_type": "UNSPECIFIED", + "tpsl": { + "trigger_by": "UNSPECIFIED", + "trigger_price": "65038.10" + } + }, + "broker": "COIN_ROUTES" }, "state": { "status": "PENDING", @@ -3340,7 +3629,15 @@ LITE ENDPOINT: lite/v1/pre_order_check }, "metadata": { "client_order_id": "23042", - "create_time": "1697788800000000000" + "create_time": "1697788800000000000", + "trigger": { + "trigger_type": "UNSPECIFIED", + "tpsl": { + "trigger_by": "UNSPECIFIED", + "trigger_price": "65038.10" + } + }, + "broker": "COIN_ROUTES" }, "state": { "status": "PENDING", @@ -3388,7 +3685,15 @@ LITE ENDPOINT: lite/v1/pre_order_check }, "m": { "co": "23042", - "ct": "1697788800000000000" + "ct": "1697788800000000000", + "t": { + "tt": "UNSPECIFIED", + "t": { + "tb": "UNSPECIFIED", + "tp": "65038.10" + } + }, + "b": "COIN_ROUTES" }, "s1": { "s": "PENDING", @@ -3436,7 +3741,15 @@ LITE ENDPOINT: lite/v1/pre_order_check }, "m": { "co": "23042", - "ct": "1697788800000000000" + "ct": "1697788800000000000", + "t": { + "tt": "UNSPECIFIED", + "t": { + "tb": "UNSPECIFIED", + "tp": "65038.10" + } + }, + "b": "COIN_ROUTES" }, "s1": { "s": "PENDING", @@ -3485,7 +3798,15 @@ LITE ENDPOINT: lite/v1/pre_order_check }, "metadata": { "client_order_id": "23042", - "create_time": "1697788800000000000" + "create_time": "1697788800000000000", + "trigger": { + "trigger_type": "UNSPECIFIED", + "tpsl": { + "trigger_by": "UNSPECIFIED", + "trigger_price": "65038.10" + } + }, + "broker": "COIN_ROUTES" }, "state": { "status": "PENDING", @@ -3533,7 +3854,15 @@ LITE ENDPOINT: lite/v1/pre_order_check }, "metadata": { "client_order_id": "23042", - "create_time": "1697788800000000000" + "create_time": "1697788800000000000", + "trigger": { + "trigger_type": "UNSPECIFIED", + "tpsl": { + "trigger_by": "UNSPECIFIED", + "trigger_price": "65038.10" + } + }, + "broker": "COIN_ROUTES" }, "state": { "status": "PENDING", @@ -3581,7 +3910,15 @@ LITE ENDPOINT: lite/v1/pre_order_check }, "m": { "co": "23042", - "ct": "1697788800000000000" + "ct": "1697788800000000000", + "t": { + "tt": "UNSPECIFIED", + "t": { + "tb": "UNSPECIFIED", + "tp": "65038.10" + } + }, + "b": "COIN_ROUTES" }, "s1": { "s": "PENDING", @@ -3629,7 +3966,15 @@ LITE ENDPOINT: lite/v1/pre_order_check }, "m": { "co": "23042", - "ct": "1697788800000000000" + "ct": "1697788800000000000", + "t": { + "tt": "UNSPECIFIED", + "t": { + "tb": "UNSPECIFIED", + "tp": "65038.10" + } + }, + "b": "COIN_ROUTES" }, "s1": { "s": "PENDING", @@ -3678,7 +4023,15 @@ LITE ENDPOINT: lite/v1/pre_order_check }, "metadata": { "client_order_id": "23042", - "create_time": "1697788800000000000" + "create_time": "1697788800000000000", + "trigger": { + "trigger_type": "UNSPECIFIED", + "tpsl": { + "trigger_by": "UNSPECIFIED", + "trigger_price": "65038.10" + } + }, + "broker": "COIN_ROUTES" }, "state": { "status": "PENDING", @@ -3726,7 +4079,15 @@ LITE ENDPOINT: lite/v1/pre_order_check }, "metadata": { "client_order_id": "23042", - "create_time": "1697788800000000000" + "create_time": "1697788800000000000", + "trigger": { + "trigger_type": "UNSPECIFIED", + "tpsl": { + "trigger_by": "UNSPECIFIED", + "trigger_price": "65038.10" + } + }, + "broker": "COIN_ROUTES" }, "state": { "status": "PENDING", @@ -3774,7 +4135,15 @@ LITE ENDPOINT: lite/v1/pre_order_check }, "m": { "co": "23042", - "ct": "1697788800000000000" + "ct": "1697788800000000000", + "t": { + "tt": "UNSPECIFIED", + "t": { + "tb": "UNSPECIFIED", + "tp": "65038.10" + } + }, + "b": "COIN_ROUTES" }, "s1": { "s": "PENDING", @@ -3822,7 +4191,15 @@ LITE ENDPOINT: lite/v1/pre_order_check }, "m": { "co": "23042", - "ct": "1697788800000000000" + "ct": "1697788800000000000", + "t": { + "tt": "UNSPECIFIED", + "t": { + "tb": "UNSPECIFIED", + "tp": "65038.10" + } + }, + "b": "COIN_ROUTES" }, "s1": { "s": "PENDING", @@ -3840,16 +4217,15 @@ LITE ENDPOINT: lite/v1/pre_order_check ```

-## Execution -### Fill History +### Cancel Trigger Order ``` -FULL ENDPOINT: full/v1/fill_history -LITE ENDPOINT: lite/v1/fill_history +FULL ENDPOINT: full/v1/cancel_trigger_order +LITE ENDPOINT: lite/v1/cancel_trigger_order ``` === "Request"
- -8<- "docs/schemas/api_fill_history_request.md" + -8<- "docs/schemas/api_cancel_order_request.md"
!!! question "Query" @@ -3857,87 +4233,41 @@ LITE ENDPOINT: lite/v1/fill_history ``` { .json .copy } { "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "kind": ["PERPETUAL"], - "base": ["BTC", "ETH"], - "quote": ["USDT", "USDC"], - "start_time": "1697788800000000000", - "end_time": "1697788800000000000", - "limit": 500, - "cursor": "" + "order_id": "0x1028403", + "client_order_id": "23042", + "time_to_live_ms": `500` } ``` **Lite Request** ``` { .json .copy } { "sa": "'$GRVT_SUB_ACCOUNT_ID'", - "k": ["PERPETUAL"], - "b": ["BTC", "ETH"], - "q": ["USDT", "USDC"], - "st": "1697788800000000000", - "et": "1697788800000000000", - "l": 500, - "c": "" + "oi": "0x1028403", + "co": "23042", + "tt": `500` } ```
=== "Response"
- -8<- "docs/schemas/api_fill_history_response.md" + -8<- "docs/schemas/ack_response.md"
!!! success **Full Response** ``` { .json .copy } { - "result": [{ - "event_time": "1697788800000000000", - "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "instrument": "BTC_USDT_Perp", - "is_buyer": true, - "is_taker": true, - "size": "0.30", - "price": "65038.01", - "mark_price": "65038.01", - "index_price": "65038.01", - "interest_rate": 0.0003, - "forward_price": "65038.01", - "realized_pnl": "2400.50", - "fee": "9.75", - "fee_rate": 0.0003, - "trade_id": "209358-2", - "order_id": "0x10000101000203040506", - "venue": "ORDERBOOK", - "client_order_id": "23042", - "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0" - }], - "next": "Qw0918=" + "result": { + "ack": "true" + } } ``` **Lite Response** ``` { .json .copy } { - "r": [{ - "et": "1697788800000000000", - "sa": "'$GRVT_SUB_ACCOUNT_ID'", - "i": "BTC_USDT_Perp", - "ib": true, - "it": true, - "s": "0.30", - "p": "65038.01", - "mp": "65038.01", - "ip": "65038.01", - "ir": 0.0003, - "fp": "65038.01", - "rp": "2400.50", - "f": "9.75", - "fr": 0.0003, - "ti": "209358-2", - "oi": "0x10000101000203040506", - "v": "ORDERBOOK", - "co": "23042", - "s1": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0" - }], - "n": "Qw0918=" + "r": { + "a": "true" + } } ```
@@ -3952,6 +4282,7 @@ LITE ENDPOINT: lite/v1/fill_history |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| + |3021|400|Either order ID or client order ID must be supplied|
!!! failure @@ -3980,18 +4311,14 @@ LITE ENDPOINT: lite/v1/fill_history
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.dev.gravitymarkets.io/full/v1/fill_history' \ + curl --location 'https://trades.dev.gravitymarkets.io/full/v1/cancel_trigger_order' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "kind": ["PERPETUAL"], - "base": ["BTC", "ETH"], - "quote": ["USDT", "USDC"], - "start_time": "1697788800000000000", - "end_time": "1697788800000000000", - "limit": 500, - "cursor": "" + "order_id": "0x1028403", + "client_order_id": "23042", + "time_to_live_ms": `500` } ' ``` @@ -4003,16 +4330,12 @@ LITE ENDPOINT: lite/v1/fill_history -x ' { "jsonrpc": "2.0", - "method": "v1/fill_history", + "method": "v1/cancel_trigger_order", "params": { "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "kind": ["PERPETUAL"], - "base": ["BTC", "ETH"], - "quote": ["USDT", "USDC"], - "start_time": "1697788800000000000", - "end_time": "1697788800000000000", - "limit": 500, - "cursor": "" + "order_id": "0x1028403", + "client_order_id": "23042", + "time_to_live_ms": `500` }, "id": 123 } @@ -4022,18 +4345,14 @@ LITE ENDPOINT: lite/v1/fill_history
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.dev.gravitymarkets.io/lite/v1/fill_history' \ + curl --location 'https://trades.dev.gravitymarkets.io/lite/v1/cancel_trigger_order' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ "sa": "'$GRVT_SUB_ACCOUNT_ID'", - "k": ["PERPETUAL"], - "b": ["BTC", "ETH"], - "q": ["USDT", "USDC"], - "st": "1697788800000000000", - "et": "1697788800000000000", - "l": 500, - "c": "" + "oi": "0x1028403", + "co": "23042", + "tt": `500` } ' ``` @@ -4045,16 +4364,12 @@ LITE ENDPOINT: lite/v1/fill_history -x ' { "j": "2.0", - "m": "v1/fill_history", + "m": "v1/cancel_trigger_order", "p": { "sa": "'$GRVT_SUB_ACCOUNT_ID'", - "k": ["PERPETUAL"], - "b": ["BTC", "ETH"], - "q": ["USDT", "USDC"], - "st": "1697788800000000000", - "et": "1697788800000000000", - "l": 500, - "c": "" + "oi": "0x1028403", + "co": "23042", + "tt": `500` }, "i": 123 } @@ -4065,18 +4380,14 @@ LITE ENDPOINT: lite/v1/fill_history
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.staging.gravitymarkets.io/full/v1/fill_history' \ + curl --location 'https://trades.staging.gravitymarkets.io/full/v1/cancel_trigger_order' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "kind": ["PERPETUAL"], - "base": ["BTC", "ETH"], - "quote": ["USDT", "USDC"], - "start_time": "1697788800000000000", - "end_time": "1697788800000000000", - "limit": 500, - "cursor": "" + "order_id": "0x1028403", + "client_order_id": "23042", + "time_to_live_ms": `500` } ' ``` @@ -4088,16 +4399,12 @@ LITE ENDPOINT: lite/v1/fill_history -x ' { "jsonrpc": "2.0", - "method": "v1/fill_history", + "method": "v1/cancel_trigger_order", "params": { "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "kind": ["PERPETUAL"], - "base": ["BTC", "ETH"], - "quote": ["USDT", "USDC"], - "start_time": "1697788800000000000", - "end_time": "1697788800000000000", - "limit": 500, - "cursor": "" + "order_id": "0x1028403", + "client_order_id": "23042", + "time_to_live_ms": `500` }, "id": 123 } @@ -4107,18 +4414,14 @@ LITE ENDPOINT: lite/v1/fill_history
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.staging.gravitymarkets.io/lite/v1/fill_history' \ + curl --location 'https://trades.staging.gravitymarkets.io/lite/v1/cancel_trigger_order' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ "sa": "'$GRVT_SUB_ACCOUNT_ID'", - "k": ["PERPETUAL"], - "b": ["BTC", "ETH"], - "q": ["USDT", "USDC"], - "st": "1697788800000000000", - "et": "1697788800000000000", - "l": 500, - "c": "" + "oi": "0x1028403", + "co": "23042", + "tt": `500` } ' ``` @@ -4130,16 +4433,12 @@ LITE ENDPOINT: lite/v1/fill_history -x ' { "j": "2.0", - "m": "v1/fill_history", + "m": "v1/cancel_trigger_order", "p": { "sa": "'$GRVT_SUB_ACCOUNT_ID'", - "k": ["PERPETUAL"], - "b": ["BTC", "ETH"], - "q": ["USDT", "USDC"], - "st": "1697788800000000000", - "et": "1697788800000000000", - "l": 500, - "c": "" + "oi": "0x1028403", + "co": "23042", + "tt": `500` }, "i": 123 } @@ -4150,18 +4449,14 @@ LITE ENDPOINT: lite/v1/fill_history
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.testnet.grvt.io/full/v1/fill_history' \ + curl --location 'https://trades.testnet.grvt.io/full/v1/cancel_trigger_order' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "kind": ["PERPETUAL"], - "base": ["BTC", "ETH"], - "quote": ["USDT", "USDC"], - "start_time": "1697788800000000000", - "end_time": "1697788800000000000", - "limit": 500, - "cursor": "" + "order_id": "0x1028403", + "client_order_id": "23042", + "time_to_live_ms": `500` } ' ``` @@ -4173,16 +4468,12 @@ LITE ENDPOINT: lite/v1/fill_history -x ' { "jsonrpc": "2.0", - "method": "v1/fill_history", + "method": "v1/cancel_trigger_order", "params": { "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "kind": ["PERPETUAL"], - "base": ["BTC", "ETH"], - "quote": ["USDT", "USDC"], - "start_time": "1697788800000000000", - "end_time": "1697788800000000000", - "limit": 500, - "cursor": "" + "order_id": "0x1028403", + "client_order_id": "23042", + "time_to_live_ms": `500` }, "id": 123 } @@ -4192,19 +4483,15 @@ LITE ENDPOINT: lite/v1/fill_history
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.testnet.grvt.io/lite/v1/fill_history' \ + curl --location 'https://trades.testnet.grvt.io/lite/v1/cancel_trigger_order' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ "sa": "'$GRVT_SUB_ACCOUNT_ID'", - "k": ["PERPETUAL"], - "b": ["BTC", "ETH"], - "q": ["USDT", "USDC"], - "st": "1697788800000000000", - "et": "1697788800000000000", - "l": 500, - "c": "" - } + "oi": "0x1028403", + "co": "23042", + "tt": `500` + } ' ``` !!! example "JSONRPC Lite" @@ -4215,16 +4502,12 @@ LITE ENDPOINT: lite/v1/fill_history -x ' { "j": "2.0", - "m": "v1/fill_history", + "m": "v1/cancel_trigger_order", "p": { "sa": "'$GRVT_SUB_ACCOUNT_ID'", - "k": ["PERPETUAL"], - "b": ["BTC", "ETH"], - "q": ["USDT", "USDC"], - "st": "1697788800000000000", - "et": "1697788800000000000", - "l": 500, - "c": "" + "oi": "0x1028403", + "co": "23042", + "tt": `500` }, "i": 123 } @@ -4235,18 +4518,14 @@ LITE ENDPOINT: lite/v1/fill_history
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.grvt.io/full/v1/fill_history' \ + curl --location 'https://trades.grvt.io/full/v1/cancel_trigger_order' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "kind": ["PERPETUAL"], - "base": ["BTC", "ETH"], - "quote": ["USDT", "USDC"], - "start_time": "1697788800000000000", - "end_time": "1697788800000000000", - "limit": 500, - "cursor": "" + "order_id": "0x1028403", + "client_order_id": "23042", + "time_to_live_ms": `500` } ' ``` @@ -4258,16 +4537,12 @@ LITE ENDPOINT: lite/v1/fill_history -x ' { "jsonrpc": "2.0", - "method": "v1/fill_history", + "method": "v1/cancel_trigger_order", "params": { "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "kind": ["PERPETUAL"], - "base": ["BTC", "ETH"], - "quote": ["USDT", "USDC"], - "start_time": "1697788800000000000", - "end_time": "1697788800000000000", - "limit": 500, - "cursor": "" + "order_id": "0x1028403", + "client_order_id": "23042", + "time_to_live_ms": `500` }, "id": 123 } @@ -4277,18 +4552,14 @@ LITE ENDPOINT: lite/v1/fill_history
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.grvt.io/lite/v1/fill_history' \ + curl --location 'https://trades.grvt.io/lite/v1/cancel_trigger_order' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ "sa": "'$GRVT_SUB_ACCOUNT_ID'", - "k": ["PERPETUAL"], - "b": ["BTC", "ETH"], - "q": ["USDT", "USDC"], - "st": "1697788800000000000", - "et": "1697788800000000000", - "l": 500, - "c": "" + "oi": "0x1028403", + "co": "23042", + "tt": `500` } ' ``` @@ -4300,16 +4571,12 @@ LITE ENDPOINT: lite/v1/fill_history -x ' { "j": "2.0", - "m": "v1/fill_history", + "m": "v1/cancel_trigger_order", "p": { "sa": "'$GRVT_SUB_ACCOUNT_ID'", - "k": ["PERPETUAL"], - "b": ["BTC", "ETH"], - "q": ["USDT", "USDC"], - "st": "1697788800000000000", - "et": "1697788800000000000", - "l": 500, - "c": "" + "oi": "0x1028403", + "co": "23042", + "tt": `500` }, "i": 123 } @@ -4317,15 +4584,15 @@ LITE ENDPOINT: lite/v1/fill_history ```

-### Positions +### Cancel All Trigger Orders ``` -FULL ENDPOINT: full/v1/positions -LITE ENDPOINT: lite/v1/positions +FULL ENDPOINT: full/v1/cancel_all_trigger_orders +LITE ENDPOINT: lite/v1/cancel_all_trigger_orders ``` === "Request"
- -8<- "docs/schemas/api_positions_request.md" + -8<- "docs/schemas/api_cancel_all_orders_request.md"
!!! question "Query" @@ -4350,50 +4617,24 @@ LITE ENDPOINT: lite/v1/positions
=== "Response"
- -8<- "docs/schemas/api_positions_response.md" + -8<- "docs/schemas/ack_response.md"
!!! success **Full Response** ``` { .json .copy } { - "result": [{ - "event_time": "1697788800000000000", - "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "instrument": "BTC_USDT_Perp", - "size": "2635000.50", - "notional": "2635000.50", - "entry_price": "65038.01", - "exit_price": "65038.01", - "mark_price": "65038.01", - "unrealized_pnl": "135000.50", - "realized_pnl": "-35000.30", - "total_pnl": "100000.20", - "roi": "10.20", - "quote_index_price": "1.0000102", - "est_liquidation_price": 60000.25 - }] + "result": { + "ack": "true" + } } ``` **Lite Response** ``` { .json .copy } { - "r": [{ - "et": "1697788800000000000", - "sa": "'$GRVT_SUB_ACCOUNT_ID'", - "i": "BTC_USDT_Perp", - "s": "2635000.50", - "n": "2635000.50", - "ep": "65038.01", - "ep1": "65038.01", - "mp": "65038.01", - "up": "135000.50", - "rp": "-35000.30", - "tp": "100000.20", - "r": "10.20", - "qi": "1.0000102", - "el": 60000.25 - }] + "r": { + "a": "true" + } } ```
@@ -4436,7 +4677,7 @@ LITE ENDPOINT: lite/v1/positions
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.dev.gravitymarkets.io/full/v1/positions' \ + curl --location 'https://trades.dev.gravitymarkets.io/full/v1/cancel_all_trigger_orders' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ @@ -4455,7 +4696,7 @@ LITE ENDPOINT: lite/v1/positions -x ' { "jsonrpc": "2.0", - "method": "v1/positions", + "method": "v1/cancel_all_trigger_orders", "params": { "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", "kind": ["PERPETUAL"], @@ -4470,7 +4711,7 @@ LITE ENDPOINT: lite/v1/positions
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.dev.gravitymarkets.io/lite/v1/positions' \ + curl --location 'https://trades.dev.gravitymarkets.io/lite/v1/cancel_all_trigger_orders' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ @@ -4489,7 +4730,7 @@ LITE ENDPOINT: lite/v1/positions -x ' { "j": "2.0", - "m": "v1/positions", + "m": "v1/cancel_all_trigger_orders", "p": { "sa": "'$GRVT_SUB_ACCOUNT_ID'", "k": ["PERPETUAL"], @@ -4505,7 +4746,7 @@ LITE ENDPOINT: lite/v1/positions
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.staging.gravitymarkets.io/full/v1/positions' \ + curl --location 'https://trades.staging.gravitymarkets.io/full/v1/cancel_all_trigger_orders' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ @@ -4524,7 +4765,7 @@ LITE ENDPOINT: lite/v1/positions -x ' { "jsonrpc": "2.0", - "method": "v1/positions", + "method": "v1/cancel_all_trigger_orders", "params": { "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", "kind": ["PERPETUAL"], @@ -4539,7 +4780,7 @@ LITE ENDPOINT: lite/v1/positions
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.staging.gravitymarkets.io/lite/v1/positions' \ + curl --location 'https://trades.staging.gravitymarkets.io/lite/v1/cancel_all_trigger_orders' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ @@ -4558,7 +4799,7 @@ LITE ENDPOINT: lite/v1/positions -x ' { "j": "2.0", - "m": "v1/positions", + "m": "v1/cancel_all_trigger_orders", "p": { "sa": "'$GRVT_SUB_ACCOUNT_ID'", "k": ["PERPETUAL"], @@ -4574,7 +4815,7 @@ LITE ENDPOINT: lite/v1/positions
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.testnet.grvt.io/full/v1/positions' \ + curl --location 'https://trades.testnet.grvt.io/full/v1/cancel_all_trigger_orders' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ @@ -4593,7 +4834,7 @@ LITE ENDPOINT: lite/v1/positions -x ' { "jsonrpc": "2.0", - "method": "v1/positions", + "method": "v1/cancel_all_trigger_orders", "params": { "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", "kind": ["PERPETUAL"], @@ -4608,7 +4849,7 @@ LITE ENDPOINT: lite/v1/positions
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.testnet.grvt.io/lite/v1/positions' \ + curl --location 'https://trades.testnet.grvt.io/lite/v1/cancel_all_trigger_orders' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ @@ -4627,7 +4868,7 @@ LITE ENDPOINT: lite/v1/positions -x ' { "j": "2.0", - "m": "v1/positions", + "m": "v1/cancel_all_trigger_orders", "p": { "sa": "'$GRVT_SUB_ACCOUNT_ID'", "k": ["PERPETUAL"], @@ -4643,7 +4884,7 @@ LITE ENDPOINT: lite/v1/positions
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.grvt.io/full/v1/positions' \ + curl --location 'https://trades.grvt.io/full/v1/cancel_all_trigger_orders' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ @@ -4662,7 +4903,7 @@ LITE ENDPOINT: lite/v1/positions -x ' { "jsonrpc": "2.0", - "method": "v1/positions", + "method": "v1/cancel_all_trigger_orders", "params": { "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", "kind": ["PERPETUAL"], @@ -4677,7 +4918,7 @@ LITE ENDPOINT: lite/v1/positions
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.grvt.io/lite/v1/positions' \ + curl --location 'https://trades.grvt.io/lite/v1/cancel_all_trigger_orders' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ @@ -4696,7 +4937,7 @@ LITE ENDPOINT: lite/v1/positions -x ' { "j": "2.0", - "m": "v1/positions", + "m": "v1/cancel_all_trigger_orders", "p": { "sa": "'$GRVT_SUB_ACCOUNT_ID'", "k": ["PERPETUAL"], @@ -4709,76 +4950,2531 @@ LITE ENDPOINT: lite/v1/positions ```

-### Funding Payment History +## Position +### Dedust Position ``` -FULL ENDPOINT: full/v1/funding_payment_history -LITE ENDPOINT: lite/v1/funding_payment_history +FULL ENDPOINT: full/v1/dedust_position +LITE ENDPOINT: lite/v1/dedust_position ``` === "Request"
- -8<- "docs/schemas/api_funding_payment_history_request.md" + -8<- "docs/schemas/api_dedust_position_request.md"
!!! question "Query" **Full Request** ``` { .json .copy } { - "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "instrument": "BTC_USDT_Perp", - "start_time": "1697788800000000000", - "end_time": "1697788800000000000", - "limit": 500, - "cursor": "" + "order": { + "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", + "trigger": { + "trigger_type": "UNSPECIFIED", + "tpsl": { + "trigger_by": "UNSPECIFIED", + "trigger_price": "65038.10" + } + }, + "broker": "COIN_ROUTES" + }, + "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 } { - "sa": "'$GRVT_SUB_ACCOUNT_ID'", - "i": "BTC_USDT_Perp", - "st": "1697788800000000000", - "et": "1697788800000000000", - "l": 500, - "c": "" + "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", + "t": { + "tt": "UNSPECIFIED", + "t": { + "tb": "UNSPECIFIED", + "tp": "65038.10" + } + }, + "b": "COIN_ROUTES" + }, + "s1": { + "s": "PENDING", + "rr": "CLIENT_CANCEL", + "bs": ["10.5"], + "ts": ["1.5"], + "ut": "1697788800000000000", + "af": ["60000.4"] + } + } } ```
=== "Response"
- -8<- "docs/schemas/api_funding_payment_history_response.md" + -8<- "docs/schemas/api_dedust_position_response.md"
!!! success **Full Response** ``` { .json .copy } { - "result": [{ - "event_time": "1697788800000000000", + "result": { + "order_id": "0x1234567890abcdef", "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "instrument": "BTC_USDT_Perp", - "currency": "USDT", - "amount": "9.75", - "tx_id": "209358" - }], - "next": "Qw0918=" + "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", + "trigger": { + "trigger_type": "UNSPECIFIED", + "tpsl": { + "trigger_by": "UNSPECIFIED", + "trigger_price": "65038.10" + } + }, + "broker": "COIN_ROUTES" + }, + "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": [{ - "et": "1697788800000000000", + "r": { + "oi": "0x1234567890abcdef", "sa": "'$GRVT_SUB_ACCOUNT_ID'", - "i": "BTC_USDT_Perp", - "c": "USDT", - "a": "9.75", - "ti": "209358" - }], - "n": "Qw0918=" - } - ``` -
+ "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", + "t": { + "tt": "UNSPECIFIED", + "t": { + "tb": "UNSPECIFIED", + "tp": "65038.10" + } + }, + "b": "COIN_ROUTES" + }, + "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| + |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| + |2063|400|Order size smaller than min block size in block trade venue| + |2064|400|Invalid limit price tick| + |2200|400|Order size should exactly tally to the dust portion (i.e., smaller than minimum size) of a position| + |2201|400|Order level should match or beat mark price| + |2202|400|Cannot dedust position via a market order| + |2203|400|Cannot dedust position via a post-only order| + |2204|400|Can only dedust position via a fill-or-kill order| + |2205|400|Can only dedust position via a reduce-only order| + |2206|400|Attempting to trade the wrong buy/sell direction for dedusting position| + |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| + |2090|429|Max open orders exceeded| +
+
+ !!! 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/dedust_position' \ + --header "Cookie: $GRVT_COOKIE" \ + --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ + --data '{ + "order": { + "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", + "trigger": { + "trigger_type": "UNSPECIFIED", + "tpsl": { + "trigger_by": "UNSPECIFIED", + "trigger_price": "65038.10" + } + }, + "broker": "COIN_ROUTES" + }, + "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/dedust_position", + "params": { + "order": { + "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", + "trigger": { + "trigger_type": "UNSPECIFIED", + "tpsl": { + "trigger_by": "UNSPECIFIED", + "trigger_price": "65038.10" + } + }, + "broker": "COIN_ROUTES" + }, + "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/dedust_position' \ + --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", + "t": { + "tt": "UNSPECIFIED", + "t": { + "tb": "UNSPECIFIED", + "tp": "65038.10" + } + }, + "b": "COIN_ROUTES" + }, + "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/dedust_position", + "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", + "t": { + "tt": "UNSPECIFIED", + "t": { + "tb": "UNSPECIFIED", + "tp": "65038.10" + } + }, + "b": "COIN_ROUTES" + }, + "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/dedust_position' \ + --header "Cookie: $GRVT_COOKIE" \ + --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ + --data '{ + "order": { + "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", + "trigger": { + "trigger_type": "UNSPECIFIED", + "tpsl": { + "trigger_by": "UNSPECIFIED", + "trigger_price": "65038.10" + } + }, + "broker": "COIN_ROUTES" + }, + "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/dedust_position", + "params": { + "order": { + "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", + "trigger": { + "trigger_type": "UNSPECIFIED", + "tpsl": { + "trigger_by": "UNSPECIFIED", + "trigger_price": "65038.10" + } + }, + "broker": "COIN_ROUTES" + }, + "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/dedust_position' \ + --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", + "t": { + "tt": "UNSPECIFIED", + "t": { + "tb": "UNSPECIFIED", + "tp": "65038.10" + } + }, + "b": "COIN_ROUTES" + }, + "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/dedust_position", + "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", + "t": { + "tt": "UNSPECIFIED", + "t": { + "tb": "UNSPECIFIED", + "tp": "65038.10" + } + }, + "b": "COIN_ROUTES" + }, + "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/dedust_position' \ + --header "Cookie: $GRVT_COOKIE" \ + --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ + --data '{ + "order": { + "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", + "trigger": { + "trigger_type": "UNSPECIFIED", + "tpsl": { + "trigger_by": "UNSPECIFIED", + "trigger_price": "65038.10" + } + }, + "broker": "COIN_ROUTES" + }, + "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/dedust_position", + "params": { + "order": { + "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", + "trigger": { + "trigger_type": "UNSPECIFIED", + "tpsl": { + "trigger_by": "UNSPECIFIED", + "trigger_price": "65038.10" + } + }, + "broker": "COIN_ROUTES" + }, + "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/dedust_position' \ + --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", + "t": { + "tt": "UNSPECIFIED", + "t": { + "tb": "UNSPECIFIED", + "tp": "65038.10" + } + }, + "b": "COIN_ROUTES" + }, + "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/dedust_position", + "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", + "t": { + "tt": "UNSPECIFIED", + "t": { + "tb": "UNSPECIFIED", + "tp": "65038.10" + } + }, + "b": "COIN_ROUTES" + }, + "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/dedust_position' \ + --header "Cookie: $GRVT_COOKIE" \ + --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ + --data '{ + "order": { + "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", + "trigger": { + "trigger_type": "UNSPECIFIED", + "tpsl": { + "trigger_by": "UNSPECIFIED", + "trigger_price": "65038.10" + } + }, + "broker": "COIN_ROUTES" + }, + "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/dedust_position", + "params": { + "order": { + "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", + "trigger": { + "trigger_type": "UNSPECIFIED", + "tpsl": { + "trigger_by": "UNSPECIFIED", + "trigger_price": "65038.10" + } + }, + "broker": "COIN_ROUTES" + }, + "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/dedust_position' \ + --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", + "t": { + "tt": "UNSPECIFIED", + "t": { + "tb": "UNSPECIFIED", + "tp": "65038.10" + } + }, + "b": "COIN_ROUTES" + }, + "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/dedust_position", + "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", + "t": { + "tt": "UNSPECIFIED", + "t": { + "tb": "UNSPECIFIED", + "tp": "65038.10" + } + }, + "b": "COIN_ROUTES" + }, + "s1": { + "s": "PENDING", + "rr": "CLIENT_CANCEL", + "bs": ["10.5"], + "ts": ["1.5"], + "ut": "1697788800000000000", + "af": ["60000.4"] + } + } + }, + "i": 123 + } + ' -w 360 + ``` +
+
+## Execution +### Fill History +``` +FULL ENDPOINT: full/v1/fill_history +LITE ENDPOINT: lite/v1/fill_history +``` + +=== "Request" +
+ -8<- "docs/schemas/api_fill_history_request.md" +
+
+ !!! question "Query" + **Full Request** + ``` { .json .copy } + { + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "kind": ["PERPETUAL"], + "base": ["BTC", "ETH"], + "quote": ["USDT", "USDC"], + "start_time": "1697788800000000000", + "end_time": "1697788800000000000", + "limit": 500, + "cursor": "" + } + ``` + **Lite Request** + ``` { .json .copy } + { + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "k": ["PERPETUAL"], + "b": ["BTC", "ETH"], + "q": ["USDT", "USDC"], + "st": "1697788800000000000", + "et": "1697788800000000000", + "l": 500, + "c": "" + } + ``` +
+=== "Response" +
+ -8<- "docs/schemas/api_fill_history_response.md" +
+
+ !!! success + **Full Response** + ``` { .json .copy } + { + "result": [{ + "event_time": "1697788800000000000", + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "instrument": "BTC_USDT_Perp", + "is_buyer": true, + "is_taker": true, + "size": "0.30", + "price": "65038.01", + "mark_price": "65038.01", + "index_price": "65038.01", + "interest_rate": 0.0003, + "forward_price": "65038.01", + "realized_pnl": "2400.50", + "fee": "9.75", + "fee_rate": 0.0003, + "trade_id": "209358-2", + "order_id": "0x10000101000203040506", + "venue": "ORDERBOOK", + "client_order_id": "23042", + "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "broker": "COIN_ROUTES" + }], + "next": "Qw0918=" + } + ``` + **Lite Response** + ``` { .json .copy } + { + "r": [{ + "et": "1697788800000000000", + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "i": "BTC_USDT_Perp", + "ib": true, + "it": true, + "s": "0.30", + "p": "65038.01", + "mp": "65038.01", + "ip": "65038.01", + "ir": 0.0003, + "fp": "65038.01", + "rp": "2400.50", + "f": "9.75", + "fr": 0.0003, + "ti": "209358-2", + "oi": "0x10000101000203040506", + "v": "ORDERBOOK", + "co": "23042", + "s1": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "b": "COIN_ROUTES" + }], + "n": "Qw0918=" + } + ``` +
+=== "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| +
+
+ !!! 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/fill_history' \ + --header "Cookie: $GRVT_COOKIE" \ + --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ + --data '{ + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "kind": ["PERPETUAL"], + "base": ["BTC", "ETH"], + "quote": ["USDT", "USDC"], + "start_time": "1697788800000000000", + "end_time": "1697788800000000000", + "limit": 500, + "cursor": "" + } + ' + ``` + !!! 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/fill_history", + "params": { + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "kind": ["PERPETUAL"], + "base": ["BTC", "ETH"], + "quote": ["USDT", "USDC"], + "start_time": "1697788800000000000", + "end_time": "1697788800000000000", + "limit": 500, + "cursor": "" + }, + "id": 123 + } + ' -w 360 + ``` +
+
+ !!! example "REST Lite" + ``` { .bash .copy } + curl --location 'https://trades.dev.gravitymarkets.io/lite/v1/fill_history' \ + --header "Cookie: $GRVT_COOKIE" \ + --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ + --data '{ + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "k": ["PERPETUAL"], + "b": ["BTC", "ETH"], + "q": ["USDT", "USDC"], + "st": "1697788800000000000", + "et": "1697788800000000000", + "l": 500, + "c": "" + } + ' + ``` + !!! 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/fill_history", + "p": { + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "k": ["PERPETUAL"], + "b": ["BTC", "ETH"], + "q": ["USDT", "USDC"], + "st": "1697788800000000000", + "et": "1697788800000000000", + "l": 500, + "c": "" + }, + "i": 123 + } + ' -w 360 + ``` +
+ === "STAGING" +
+ !!! example "REST Full" + ``` { .bash .copy } + curl --location 'https://trades.staging.gravitymarkets.io/full/v1/fill_history' \ + --header "Cookie: $GRVT_COOKIE" \ + --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ + --data '{ + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "kind": ["PERPETUAL"], + "base": ["BTC", "ETH"], + "quote": ["USDT", "USDC"], + "start_time": "1697788800000000000", + "end_time": "1697788800000000000", + "limit": 500, + "cursor": "" + } + ' + ``` + !!! 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/fill_history", + "params": { + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "kind": ["PERPETUAL"], + "base": ["BTC", "ETH"], + "quote": ["USDT", "USDC"], + "start_time": "1697788800000000000", + "end_time": "1697788800000000000", + "limit": 500, + "cursor": "" + }, + "id": 123 + } + ' -w 360 + ``` +
+
+ !!! example "REST Lite" + ``` { .bash .copy } + curl --location 'https://trades.staging.gravitymarkets.io/lite/v1/fill_history' \ + --header "Cookie: $GRVT_COOKIE" \ + --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ + --data '{ + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "k": ["PERPETUAL"], + "b": ["BTC", "ETH"], + "q": ["USDT", "USDC"], + "st": "1697788800000000000", + "et": "1697788800000000000", + "l": 500, + "c": "" + } + ' + ``` + !!! 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/fill_history", + "p": { + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "k": ["PERPETUAL"], + "b": ["BTC", "ETH"], + "q": ["USDT", "USDC"], + "st": "1697788800000000000", + "et": "1697788800000000000", + "l": 500, + "c": "" + }, + "i": 123 + } + ' -w 360 + ``` +
+ === "TESTNET" +
+ !!! example "REST Full" + ``` { .bash .copy } + curl --location 'https://trades.testnet.grvt.io/full/v1/fill_history' \ + --header "Cookie: $GRVT_COOKIE" \ + --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ + --data '{ + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "kind": ["PERPETUAL"], + "base": ["BTC", "ETH"], + "quote": ["USDT", "USDC"], + "start_time": "1697788800000000000", + "end_time": "1697788800000000000", + "limit": 500, + "cursor": "" + } + ' + ``` + !!! 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/fill_history", + "params": { + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "kind": ["PERPETUAL"], + "base": ["BTC", "ETH"], + "quote": ["USDT", "USDC"], + "start_time": "1697788800000000000", + "end_time": "1697788800000000000", + "limit": 500, + "cursor": "" + }, + "id": 123 + } + ' -w 360 + ``` +
+
+ !!! example "REST Lite" + ``` { .bash .copy } + curl --location 'https://trades.testnet.grvt.io/lite/v1/fill_history' \ + --header "Cookie: $GRVT_COOKIE" \ + --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ + --data '{ + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "k": ["PERPETUAL"], + "b": ["BTC", "ETH"], + "q": ["USDT", "USDC"], + "st": "1697788800000000000", + "et": "1697788800000000000", + "l": 500, + "c": "" + } + ' + ``` + !!! 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/fill_history", + "p": { + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "k": ["PERPETUAL"], + "b": ["BTC", "ETH"], + "q": ["USDT", "USDC"], + "st": "1697788800000000000", + "et": "1697788800000000000", + "l": 500, + "c": "" + }, + "i": 123 + } + ' -w 360 + ``` +
+ === "PROD" +
+ !!! example "REST Full" + ``` { .bash .copy } + curl --location 'https://trades.grvt.io/full/v1/fill_history' \ + --header "Cookie: $GRVT_COOKIE" \ + --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ + --data '{ + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "kind": ["PERPETUAL"], + "base": ["BTC", "ETH"], + "quote": ["USDT", "USDC"], + "start_time": "1697788800000000000", + "end_time": "1697788800000000000", + "limit": 500, + "cursor": "" + } + ' + ``` + !!! 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/fill_history", + "params": { + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "kind": ["PERPETUAL"], + "base": ["BTC", "ETH"], + "quote": ["USDT", "USDC"], + "start_time": "1697788800000000000", + "end_time": "1697788800000000000", + "limit": 500, + "cursor": "" + }, + "id": 123 + } + ' -w 360 + ``` +
+
+ !!! example "REST Lite" + ``` { .bash .copy } + curl --location 'https://trades.grvt.io/lite/v1/fill_history' \ + --header "Cookie: $GRVT_COOKIE" \ + --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ + --data '{ + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "k": ["PERPETUAL"], + "b": ["BTC", "ETH"], + "q": ["USDT", "USDC"], + "st": "1697788800000000000", + "et": "1697788800000000000", + "l": 500, + "c": "" + } + ' + ``` + !!! 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/fill_history", + "p": { + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "k": ["PERPETUAL"], + "b": ["BTC", "ETH"], + "q": ["USDT", "USDC"], + "st": "1697788800000000000", + "et": "1697788800000000000", + "l": 500, + "c": "" + }, + "i": 123 + } + ' -w 360 + ``` +
+
+### Positions +``` +FULL ENDPOINT: full/v1/positions +LITE ENDPOINT: lite/v1/positions +``` + +=== "Request" +
+ -8<- "docs/schemas/api_positions_request.md" +
+
+ !!! question "Query" + **Full Request** + ``` { .json .copy } + { + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "kind": ["PERPETUAL"], + "base": ["BTC", "ETH"], + "quote": ["USDT", "USDC"] + } + ``` + **Lite Request** + ``` { .json .copy } + { + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "k": ["PERPETUAL"], + "b": ["BTC", "ETH"], + "q": ["USDT", "USDC"] + } + ``` +
+=== "Response" +
+ -8<- "docs/schemas/api_positions_response.md" +
+
+ !!! success + **Full Response** + ``` { .json .copy } + { + "result": [{ + "event_time": "1697788800000000000", + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "instrument": "BTC_USDT_Perp", + "size": "2635000.50", + "notional": "2635000.50", + "entry_price": "65038.01", + "exit_price": "65038.01", + "mark_price": "65038.01", + "unrealized_pnl": "135000.50", + "realized_pnl": "-35000.30", + "total_pnl": "100000.20", + "roi": "10.20", + "quote_index_price": "1.0000102", + "est_liquidation_price": 60000.25 + }] + } + ``` + **Lite Response** + ``` { .json .copy } + { + "r": [{ + "et": "1697788800000000000", + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "i": "BTC_USDT_Perp", + "s": "2635000.50", + "n": "2635000.50", + "ep": "65038.01", + "ep1": "65038.01", + "mp": "65038.01", + "up": "135000.50", + "rp": "-35000.30", + "tp": "100000.20", + "r": "10.20", + "qi": "1.0000102", + "el": 60000.25 + }] + } + ``` +
+=== "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| +
+
+ !!! 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/positions' \ + --header "Cookie: $GRVT_COOKIE" \ + --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ + --data '{ + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "kind": ["PERPETUAL"], + "base": ["BTC", "ETH"], + "quote": ["USDT", "USDC"] + } + ' + ``` + !!! 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/positions", + "params": { + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "kind": ["PERPETUAL"], + "base": ["BTC", "ETH"], + "quote": ["USDT", "USDC"] + }, + "id": 123 + } + ' -w 360 + ``` +
+
+ !!! example "REST Lite" + ``` { .bash .copy } + curl --location 'https://trades.dev.gravitymarkets.io/lite/v1/positions' \ + --header "Cookie: $GRVT_COOKIE" \ + --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ + --data '{ + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "k": ["PERPETUAL"], + "b": ["BTC", "ETH"], + "q": ["USDT", "USDC"] + } + ' + ``` + !!! 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/positions", + "p": { + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "k": ["PERPETUAL"], + "b": ["BTC", "ETH"], + "q": ["USDT", "USDC"] + }, + "i": 123 + } + ' -w 360 + ``` +
+ === "STAGING" +
+ !!! example "REST Full" + ``` { .bash .copy } + curl --location 'https://trades.staging.gravitymarkets.io/full/v1/positions' \ + --header "Cookie: $GRVT_COOKIE" \ + --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ + --data '{ + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "kind": ["PERPETUAL"], + "base": ["BTC", "ETH"], + "quote": ["USDT", "USDC"] + } + ' + ``` + !!! 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/positions", + "params": { + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "kind": ["PERPETUAL"], + "base": ["BTC", "ETH"], + "quote": ["USDT", "USDC"] + }, + "id": 123 + } + ' -w 360 + ``` +
+
+ !!! example "REST Lite" + ``` { .bash .copy } + curl --location 'https://trades.staging.gravitymarkets.io/lite/v1/positions' \ + --header "Cookie: $GRVT_COOKIE" \ + --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ + --data '{ + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "k": ["PERPETUAL"], + "b": ["BTC", "ETH"], + "q": ["USDT", "USDC"] + } + ' + ``` + !!! 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/positions", + "p": { + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "k": ["PERPETUAL"], + "b": ["BTC", "ETH"], + "q": ["USDT", "USDC"] + }, + "i": 123 + } + ' -w 360 + ``` +
+ === "TESTNET" +
+ !!! example "REST Full" + ``` { .bash .copy } + curl --location 'https://trades.testnet.grvt.io/full/v1/positions' \ + --header "Cookie: $GRVT_COOKIE" \ + --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ + --data '{ + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "kind": ["PERPETUAL"], + "base": ["BTC", "ETH"], + "quote": ["USDT", "USDC"] + } + ' + ``` + !!! 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/positions", + "params": { + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "kind": ["PERPETUAL"], + "base": ["BTC", "ETH"], + "quote": ["USDT", "USDC"] + }, + "id": 123 + } + ' -w 360 + ``` +
+
+ !!! example "REST Lite" + ``` { .bash .copy } + curl --location 'https://trades.testnet.grvt.io/lite/v1/positions' \ + --header "Cookie: $GRVT_COOKIE" \ + --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ + --data '{ + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "k": ["PERPETUAL"], + "b": ["BTC", "ETH"], + "q": ["USDT", "USDC"] + } + ' + ``` + !!! 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/positions", + "p": { + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "k": ["PERPETUAL"], + "b": ["BTC", "ETH"], + "q": ["USDT", "USDC"] + }, + "i": 123 + } + ' -w 360 + ``` +
+ === "PROD" +
+ !!! example "REST Full" + ``` { .bash .copy } + curl --location 'https://trades.grvt.io/full/v1/positions' \ + --header "Cookie: $GRVT_COOKIE" \ + --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ + --data '{ + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "kind": ["PERPETUAL"], + "base": ["BTC", "ETH"], + "quote": ["USDT", "USDC"] + } + ' + ``` + !!! 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/positions", + "params": { + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "kind": ["PERPETUAL"], + "base": ["BTC", "ETH"], + "quote": ["USDT", "USDC"] + }, + "id": 123 + } + ' -w 360 + ``` +
+
+ !!! example "REST Lite" + ``` { .bash .copy } + curl --location 'https://trades.grvt.io/lite/v1/positions' \ + --header "Cookie: $GRVT_COOKIE" \ + --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ + --data '{ + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "k": ["PERPETUAL"], + "b": ["BTC", "ETH"], + "q": ["USDT", "USDC"] + } + ' + ``` + !!! 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/positions", + "p": { + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "k": ["PERPETUAL"], + "b": ["BTC", "ETH"], + "q": ["USDT", "USDC"] + }, + "i": 123 + } + ' -w 360 + ``` +
+
+### Funding Payment History +``` +FULL ENDPOINT: full/v1/funding_payment_history +LITE ENDPOINT: lite/v1/funding_payment_history +``` + +=== "Request" +
+ -8<- "docs/schemas/api_funding_payment_history_request.md" +
+
+ !!! question "Query" + **Full Request** + ``` { .json .copy } + { + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "instrument": "BTC_USDT_Perp", + "start_time": "1697788800000000000", + "end_time": "1697788800000000000", + "limit": 500, + "cursor": "" + } + ``` + **Lite Request** + ``` { .json .copy } + { + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "i": "BTC_USDT_Perp", + "st": "1697788800000000000", + "et": "1697788800000000000", + "l": 500, + "c": "" + } + ``` +
+=== "Response" +
+ -8<- "docs/schemas/api_funding_payment_history_response.md" +
+
+ !!! success + **Full Response** + ``` { .json .copy } + { + "result": [{ + "event_time": "1697788800000000000", + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "instrument": "BTC_USDT_Perp", + "currency": "USDT", + "amount": "9.75", + "tx_id": "209358" + }], + "next": "Qw0918=" + } + ``` + **Lite Response** + ``` { .json .copy } + { + "r": [{ + "et": "1697788800000000000", + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "i": "BTC_USDT_Perp", + "c": "USDT", + "a": "9.75", + "ti": "209358" + }], + "n": "Qw0918=" + } + ``` +
+=== "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| +
+
+ !!! 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/funding_payment_history' \ + --header "Cookie: $GRVT_COOKIE" \ + --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ + --data '{ + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "instrument": "BTC_USDT_Perp", + "start_time": "1697788800000000000", + "end_time": "1697788800000000000", + "limit": 500, + "cursor": "" + } + ' + ``` + !!! 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/funding_payment_history", + "params": { + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "instrument": "BTC_USDT_Perp", + "start_time": "1697788800000000000", + "end_time": "1697788800000000000", + "limit": 500, + "cursor": "" + }, + "id": 123 + } + ' -w 360 + ``` +
+
+ !!! example "REST Lite" + ``` { .bash .copy } + curl --location 'https://trades.dev.gravitymarkets.io/lite/v1/funding_payment_history' \ + --header "Cookie: $GRVT_COOKIE" \ + --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ + --data '{ + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "i": "BTC_USDT_Perp", + "st": "1697788800000000000", + "et": "1697788800000000000", + "l": 500, + "c": "" + } + ' + ``` + !!! 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/funding_payment_history", + "p": { + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "i": "BTC_USDT_Perp", + "st": "1697788800000000000", + "et": "1697788800000000000", + "l": 500, + "c": "" + }, + "i": 123 + } + ' -w 360 + ``` +
+ === "STAGING" +
+ !!! example "REST Full" + ``` { .bash .copy } + curl --location 'https://trades.staging.gravitymarkets.io/full/v1/funding_payment_history' \ + --header "Cookie: $GRVT_COOKIE" \ + --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ + --data '{ + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "instrument": "BTC_USDT_Perp", + "start_time": "1697788800000000000", + "end_time": "1697788800000000000", + "limit": 500, + "cursor": "" + } + ' + ``` + !!! 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/funding_payment_history", + "params": { + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "instrument": "BTC_USDT_Perp", + "start_time": "1697788800000000000", + "end_time": "1697788800000000000", + "limit": 500, + "cursor": "" + }, + "id": 123 + } + ' -w 360 + ``` +
+
+ !!! example "REST Lite" + ``` { .bash .copy } + curl --location 'https://trades.staging.gravitymarkets.io/lite/v1/funding_payment_history' \ + --header "Cookie: $GRVT_COOKIE" \ + --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ + --data '{ + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "i": "BTC_USDT_Perp", + "st": "1697788800000000000", + "et": "1697788800000000000", + "l": 500, + "c": "" + } + ' + ``` + !!! 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/funding_payment_history", + "p": { + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "i": "BTC_USDT_Perp", + "st": "1697788800000000000", + "et": "1697788800000000000", + "l": 500, + "c": "" + }, + "i": 123 + } + ' -w 360 + ``` +
+ === "TESTNET" +
+ !!! example "REST Full" + ``` { .bash .copy } + curl --location 'https://trades.testnet.grvt.io/full/v1/funding_payment_history' \ + --header "Cookie: $GRVT_COOKIE" \ + --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ + --data '{ + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "instrument": "BTC_USDT_Perp", + "start_time": "1697788800000000000", + "end_time": "1697788800000000000", + "limit": 500, + "cursor": "" + } + ' + ``` + !!! 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/funding_payment_history", + "params": { + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "instrument": "BTC_USDT_Perp", + "start_time": "1697788800000000000", + "end_time": "1697788800000000000", + "limit": 500, + "cursor": "" + }, + "id": 123 + } + ' -w 360 + ``` +
+
+ !!! example "REST Lite" + ``` { .bash .copy } + curl --location 'https://trades.testnet.grvt.io/lite/v1/funding_payment_history' \ + --header "Cookie: $GRVT_COOKIE" \ + --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ + --data '{ + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "i": "BTC_USDT_Perp", + "st": "1697788800000000000", + "et": "1697788800000000000", + "l": 500, + "c": "" + } + ' + ``` + !!! 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/funding_payment_history", + "p": { + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "i": "BTC_USDT_Perp", + "st": "1697788800000000000", + "et": "1697788800000000000", + "l": 500, + "c": "" + }, + "i": 123 + } + ' -w 360 + ``` +
+ === "PROD" +
+ !!! example "REST Full" + ``` { .bash .copy } + curl --location 'https://trades.grvt.io/full/v1/funding_payment_history' \ + --header "Cookie: $GRVT_COOKIE" \ + --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ + --data '{ + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "instrument": "BTC_USDT_Perp", + "start_time": "1697788800000000000", + "end_time": "1697788800000000000", + "limit": 500, + "cursor": "" + } + ' + ``` + !!! 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/funding_payment_history", + "params": { + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "instrument": "BTC_USDT_Perp", + "start_time": "1697788800000000000", + "end_time": "1697788800000000000", + "limit": 500, + "cursor": "" + }, + "id": 123 + } + ' -w 360 + ``` +
+
+ !!! example "REST Lite" + ``` { .bash .copy } + curl --location 'https://trades.grvt.io/lite/v1/funding_payment_history' \ + --header "Cookie: $GRVT_COOKIE" \ + --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ + --data '{ + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "i": "BTC_USDT_Perp", + "st": "1697788800000000000", + "et": "1697788800000000000", + "l": 500, + "c": "" + } + ' + ``` + !!! 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/funding_payment_history", + "p": { + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "i": "BTC_USDT_Perp", + "st": "1697788800000000000", + "et": "1697788800000000000", + "l": 500, + "c": "" + }, + "i": 123 + } + ' -w 360 + ``` +
+
+## Transfer +### Deposit History +``` +FULL ENDPOINT: full/v1/deposit_history +LITE ENDPOINT: lite/v1/deposit_history +``` + +=== "Request" +
+ -8<- "docs/schemas/api_deposit_history_request.md" +
+
+ !!! question "Query" + **Full Request** + ``` { .json .copy } + { + "currency": ["USDT", "USDC"], + "start_time": "1697788800000000000", + "end_time": "1697788800000000000", + "limit": 500, + "cursor": "" + } + ``` + **Lite Request** + ``` { .json .copy } + { + "c": ["USDT", "USDC"], + "st": "1697788800000000000", + "et": "1697788800000000000", + "l": 500, + "c1": "" + } + ``` +
+=== "Response" +
+ -8<- "docs/schemas/api_deposit_history_response.md" +
+
+ !!! success + **Full Response** + ``` { .json .copy } + { + "result": [{ + "l_1_hash": "0x10000101000203040506", + "l_2_hash": "0x10000101000203040506", + "to_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "currency": "USDT", + "num_tokens": "1500.0", + "initiated_time": "1697788800000000000", + "confirmed_time": "1697788800000000000", + "from_address": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0" + }], + "next": "Qw0918=" + } + ``` + **Lite Response** + ``` { .json .copy } + { + "r": [{ + "l1": "0x10000101000203040506", + "l2": "0x10000101000203040506", + "ta": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "c": "USDT", + "nt": "1500.0", + "it": "1697788800000000000", + "ct": "1697788800000000000", + "fa": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0" + }], + "n": "Qw0918=" + } + ``` +
=== "Errors"
!!! info "Error Codes" @@ -4818,12 +7514,11 @@ LITE ENDPOINT: lite/v1/funding_payment_history
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.dev.gravitymarkets.io/full/v1/funding_payment_history' \ + curl --location 'https://trades.dev.gravitymarkets.io/full/v1/deposit_history' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "instrument": "BTC_USDT_Perp", + "currency": ["USDT", "USDC"], "start_time": "1697788800000000000", "end_time": "1697788800000000000", "limit": 500, @@ -4839,10 +7534,9 @@ LITE ENDPOINT: lite/v1/funding_payment_history -x ' { "jsonrpc": "2.0", - "method": "v1/funding_payment_history", + "method": "v1/deposit_history", "params": { - "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "instrument": "BTC_USDT_Perp", + "currency": ["USDT", "USDC"], "start_time": "1697788800000000000", "end_time": "1697788800000000000", "limit": 500, @@ -4856,16 +7550,15 @@ LITE ENDPOINT: lite/v1/funding_payment_history
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.dev.gravitymarkets.io/lite/v1/funding_payment_history' \ + curl --location 'https://trades.dev.gravitymarkets.io/lite/v1/deposit_history' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "sa": "'$GRVT_SUB_ACCOUNT_ID'", - "i": "BTC_USDT_Perp", + "c": ["USDT", "USDC"], "st": "1697788800000000000", "et": "1697788800000000000", "l": 500, - "c": "" + "c1": "" } ' ``` @@ -4877,14 +7570,13 @@ LITE ENDPOINT: lite/v1/funding_payment_history -x ' { "j": "2.0", - "m": "v1/funding_payment_history", + "m": "v1/deposit_history", "p": { - "sa": "'$GRVT_SUB_ACCOUNT_ID'", - "i": "BTC_USDT_Perp", + "c": ["USDT", "USDC"], "st": "1697788800000000000", "et": "1697788800000000000", "l": 500, - "c": "" + "c1": "" }, "i": 123 } @@ -4895,12 +7587,11 @@ LITE ENDPOINT: lite/v1/funding_payment_history
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.staging.gravitymarkets.io/full/v1/funding_payment_history' \ + curl --location 'https://trades.staging.gravitymarkets.io/full/v1/deposit_history' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "instrument": "BTC_USDT_Perp", + "currency": ["USDT", "USDC"], "start_time": "1697788800000000000", "end_time": "1697788800000000000", "limit": 500, @@ -4916,10 +7607,9 @@ LITE ENDPOINT: lite/v1/funding_payment_history -x ' { "jsonrpc": "2.0", - "method": "v1/funding_payment_history", + "method": "v1/deposit_history", "params": { - "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "instrument": "BTC_USDT_Perp", + "currency": ["USDT", "USDC"], "start_time": "1697788800000000000", "end_time": "1697788800000000000", "limit": 500, @@ -4933,16 +7623,15 @@ LITE ENDPOINT: lite/v1/funding_payment_history
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.staging.gravitymarkets.io/lite/v1/funding_payment_history' \ + curl --location 'https://trades.staging.gravitymarkets.io/lite/v1/deposit_history' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "sa": "'$GRVT_SUB_ACCOUNT_ID'", - "i": "BTC_USDT_Perp", + "c": ["USDT", "USDC"], "st": "1697788800000000000", "et": "1697788800000000000", "l": 500, - "c": "" + "c1": "" } ' ``` @@ -4954,14 +7643,13 @@ LITE ENDPOINT: lite/v1/funding_payment_history -x ' { "j": "2.0", - "m": "v1/funding_payment_history", + "m": "v1/deposit_history", "p": { - "sa": "'$GRVT_SUB_ACCOUNT_ID'", - "i": "BTC_USDT_Perp", + "c": ["USDT", "USDC"], "st": "1697788800000000000", "et": "1697788800000000000", "l": 500, - "c": "" + "c1": "" }, "i": 123 } @@ -4972,12 +7660,11 @@ LITE ENDPOINT: lite/v1/funding_payment_history
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.testnet.grvt.io/full/v1/funding_payment_history' \ + curl --location 'https://trades.testnet.grvt.io/full/v1/deposit_history' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "instrument": "BTC_USDT_Perp", + "currency": ["USDT", "USDC"], "start_time": "1697788800000000000", "end_time": "1697788800000000000", "limit": 500, @@ -4993,10 +7680,9 @@ LITE ENDPOINT: lite/v1/funding_payment_history -x ' { "jsonrpc": "2.0", - "method": "v1/funding_payment_history", + "method": "v1/deposit_history", "params": { - "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "instrument": "BTC_USDT_Perp", + "currency": ["USDT", "USDC"], "start_time": "1697788800000000000", "end_time": "1697788800000000000", "limit": 500, @@ -5010,16 +7696,15 @@ LITE ENDPOINT: lite/v1/funding_payment_history
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.testnet.grvt.io/lite/v1/funding_payment_history' \ + curl --location 'https://trades.testnet.grvt.io/lite/v1/deposit_history' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "sa": "'$GRVT_SUB_ACCOUNT_ID'", - "i": "BTC_USDT_Perp", + "c": ["USDT", "USDC"], "st": "1697788800000000000", "et": "1697788800000000000", "l": 500, - "c": "" + "c1": "" } ' ``` @@ -5031,14 +7716,13 @@ LITE ENDPOINT: lite/v1/funding_payment_history -x ' { "j": "2.0", - "m": "v1/funding_payment_history", + "m": "v1/deposit_history", "p": { - "sa": "'$GRVT_SUB_ACCOUNT_ID'", - "i": "BTC_USDT_Perp", + "c": ["USDT", "USDC"], "st": "1697788800000000000", "et": "1697788800000000000", "l": 500, - "c": "" + "c1": "" }, "i": 123 } @@ -5049,12 +7733,11 @@ LITE ENDPOINT: lite/v1/funding_payment_history
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.grvt.io/full/v1/funding_payment_history' \ + curl --location 'https://trades.grvt.io/full/v1/deposit_history' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "instrument": "BTC_USDT_Perp", + "currency": ["USDT", "USDC"], "start_time": "1697788800000000000", "end_time": "1697788800000000000", "limit": 500, @@ -5070,10 +7753,9 @@ LITE ENDPOINT: lite/v1/funding_payment_history -x ' { "jsonrpc": "2.0", - "method": "v1/funding_payment_history", + "method": "v1/deposit_history", "params": { - "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "instrument": "BTC_USDT_Perp", + "currency": ["USDT", "USDC"], "start_time": "1697788800000000000", "end_time": "1697788800000000000", "limit": 500, @@ -5087,16 +7769,15 @@ LITE ENDPOINT: lite/v1/funding_payment_history
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.grvt.io/lite/v1/funding_payment_history' \ + curl --location 'https://trades.grvt.io/lite/v1/deposit_history' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "sa": "'$GRVT_SUB_ACCOUNT_ID'", - "i": "BTC_USDT_Perp", + "c": ["USDT", "USDC"], "st": "1697788800000000000", "et": "1697788800000000000", "l": 500, - "c": "" + "c1": "" } ' ``` @@ -5108,14 +7789,13 @@ LITE ENDPOINT: lite/v1/funding_payment_history -x ' { "j": "2.0", - "m": "v1/funding_payment_history", + "m": "v1/deposit_history", "p": { - "sa": "'$GRVT_SUB_ACCOUNT_ID'", - "i": "BTC_USDT_Perp", + "c": ["USDT", "USDC"], "st": "1697788800000000000", "et": "1697788800000000000", "l": 500, - "c": "" + "c1": "" }, "i": 123 } @@ -5123,76 +7803,81 @@ LITE ENDPOINT: lite/v1/funding_payment_history ```

-## Transfer -### Deposit History +### Transfer ``` -FULL ENDPOINT: full/v1/deposit_history -LITE ENDPOINT: lite/v1/deposit_history +FULL ENDPOINT: full/v1/transfer +LITE ENDPOINT: lite/v1/transfer ``` === "Request"
- -8<- "docs/schemas/api_deposit_history_request.md" + -8<- "docs/schemas/api_transfer_request.md"
!!! question "Query" **Full Request** ``` { .json .copy } { - "currency": ["USDT", "USDC"], - "start_time": "1697788800000000000", - "end_time": "1697788800000000000", - "limit": 500, - "cursor": "" + "from_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "from_sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "to_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "to_sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "currency": "USDT", + "num_tokens": "1500.0", + "signature": { + "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", + "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", + "v": 28, + "expiration": "1697788800000000000", + "nonce": 1234567890 + }, + "transfer_type": "STANDARD", + "transfer_metadata": {"provider":"XY","direction":"WITHDRAWAL","provider_tx_id":"txn123456","chainid":"42161","endpoint":"0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0"} } ``` **Lite Request** ``` { .json .copy } { - "c": ["USDT", "USDC"], - "st": "1697788800000000000", - "et": "1697788800000000000", - "l": 500, - "c1": "" + "fa": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "fs": "'$GRVT_SUB_ACCOUNT_ID'", + "ta": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "ts": "'$GRVT_SUB_ACCOUNT_ID'", + "c": "USDT", + "nt": "1500.0", + "s": { + "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", + "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", + "v": 28, + "e": "1697788800000000000", + "n": 1234567890 + }, + "tt": "STANDARD", + "tm": {"provider":"XY","direction":"WITHDRAWAL","provider_tx_id":"txn123456","chainid":"42161","endpoint":"0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0"} } ```
=== "Response"
- -8<- "docs/schemas/api_deposit_history_response.md" + -8<- "docs/schemas/ack_response.md"
!!! success **Full Response** ``` { .json .copy } { - "result": [{ - "l_1_hash": "0x10000101000203040506", - "l_2_hash": "0x10000101000203040506", - "to_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "currency": "USDT", - "num_tokens": "1500.0", - "initiated_time": "1697788800000000000", - "confirmed_time": "1697788800000000000", - "from_address": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0" - }], - "next": "Qw0918=" + "result": { + "ack": "true" + } } ``` **Lite Response** ``` { .json .copy } { - "r": [{ - "l1": "0x10000101000203040506", - "l2": "0x10000101000203040506", - "ta": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "c": "USDT", - "nt": "1500.0", - "it": "1697788800000000000", - "ct": "1697788800000000000", - "fa": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0" - }], - "n": "Qw0918=" + "r": { + "a": "true" + } } ```
@@ -5207,6 +7892,12 @@ LITE ENDPOINT: lite/v1/deposit_history |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| + |5000|400|Transfer Metadata does not match the expected structure.| + |5001|400|Transfer Provider does not match the expected provider.| + |5002|400|Direction of the transfer does not match the expected direction.| + |5003|400|Endpoint account ID is invalid.| + |5004|400|Funding account does not exist in our system.| + |5005|400|Invalid ChainID for the transfer request.|
!!! failure @@ -5235,15 +7926,26 @@ LITE ENDPOINT: lite/v1/deposit_history
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.dev.gravitymarkets.io/full/v1/deposit_history' \ + curl --location 'https://trades.dev.gravitymarkets.io/full/v1/transfer' \ --header "Cookie: $GRVT_COOKIE" \ - --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ - --data '{ - "currency": ["USDT", "USDC"], - "start_time": "1697788800000000000", - "end_time": "1697788800000000000", - "limit": 500, - "cursor": "" + --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ + --data '{ + "from_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "from_sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "to_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "to_sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "currency": "USDT", + "num_tokens": "1500.0", + "signature": { + "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", + "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", + "v": 28, + "expiration": "1697788800000000000", + "nonce": 1234567890 + }, + "transfer_type": "STANDARD", + "transfer_metadata": {"provider":"XY","direction":"WITHDRAWAL","provider_tx_id":"txn123456","chainid":"42161","endpoint":"0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0"} } ' ``` @@ -5255,13 +7957,24 @@ LITE ENDPOINT: lite/v1/deposit_history -x ' { "jsonrpc": "2.0", - "method": "v1/deposit_history", + "method": "v1/transfer", "params": { - "currency": ["USDT", "USDC"], - "start_time": "1697788800000000000", - "end_time": "1697788800000000000", - "limit": 500, - "cursor": "" + "from_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "from_sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "to_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "to_sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "currency": "USDT", + "num_tokens": "1500.0", + "signature": { + "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", + "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", + "v": 28, + "expiration": "1697788800000000000", + "nonce": 1234567890 + }, + "transfer_type": "STANDARD", + "transfer_metadata": {"provider":"XY","direction":"WITHDRAWAL","provider_tx_id":"txn123456","chainid":"42161","endpoint":"0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0"} }, "id": 123 } @@ -5271,15 +7984,26 @@ LITE ENDPOINT: lite/v1/deposit_history
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.dev.gravitymarkets.io/lite/v1/deposit_history' \ + curl --location 'https://trades.dev.gravitymarkets.io/lite/v1/transfer' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "c": ["USDT", "USDC"], - "st": "1697788800000000000", - "et": "1697788800000000000", - "l": 500, - "c1": "" + "fa": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "fs": "'$GRVT_SUB_ACCOUNT_ID'", + "ta": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "ts": "'$GRVT_SUB_ACCOUNT_ID'", + "c": "USDT", + "nt": "1500.0", + "s": { + "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", + "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", + "v": 28, + "e": "1697788800000000000", + "n": 1234567890 + }, + "tt": "STANDARD", + "tm": {"provider":"XY","direction":"WITHDRAWAL","provider_tx_id":"txn123456","chainid":"42161","endpoint":"0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0"} } ' ``` @@ -5291,13 +8015,24 @@ LITE ENDPOINT: lite/v1/deposit_history -x ' { "j": "2.0", - "m": "v1/deposit_history", + "m": "v1/transfer", "p": { - "c": ["USDT", "USDC"], - "st": "1697788800000000000", - "et": "1697788800000000000", - "l": 500, - "c1": "" + "fa": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "fs": "'$GRVT_SUB_ACCOUNT_ID'", + "ta": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "ts": "'$GRVT_SUB_ACCOUNT_ID'", + "c": "USDT", + "nt": "1500.0", + "s": { + "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", + "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", + "v": 28, + "e": "1697788800000000000", + "n": 1234567890 + }, + "tt": "STANDARD", + "tm": {"provider":"XY","direction":"WITHDRAWAL","provider_tx_id":"txn123456","chainid":"42161","endpoint":"0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0"} }, "i": 123 } @@ -5308,15 +8043,26 @@ LITE ENDPOINT: lite/v1/deposit_history
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.staging.gravitymarkets.io/full/v1/deposit_history' \ + curl --location 'https://trades.staging.gravitymarkets.io/full/v1/transfer' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "currency": ["USDT", "USDC"], - "start_time": "1697788800000000000", - "end_time": "1697788800000000000", - "limit": 500, - "cursor": "" + "from_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "from_sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "to_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "to_sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "currency": "USDT", + "num_tokens": "1500.0", + "signature": { + "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", + "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", + "v": 28, + "expiration": "1697788800000000000", + "nonce": 1234567890 + }, + "transfer_type": "STANDARD", + "transfer_metadata": {"provider":"XY","direction":"WITHDRAWAL","provider_tx_id":"txn123456","chainid":"42161","endpoint":"0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0"} } ' ``` @@ -5328,13 +8074,24 @@ LITE ENDPOINT: lite/v1/deposit_history -x ' { "jsonrpc": "2.0", - "method": "v1/deposit_history", + "method": "v1/transfer", "params": { - "currency": ["USDT", "USDC"], - "start_time": "1697788800000000000", - "end_time": "1697788800000000000", - "limit": 500, - "cursor": "" + "from_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "from_sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "to_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "to_sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "currency": "USDT", + "num_tokens": "1500.0", + "signature": { + "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", + "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", + "v": 28, + "expiration": "1697788800000000000", + "nonce": 1234567890 + }, + "transfer_type": "STANDARD", + "transfer_metadata": {"provider":"XY","direction":"WITHDRAWAL","provider_tx_id":"txn123456","chainid":"42161","endpoint":"0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0"} }, "id": 123 } @@ -5344,15 +8101,26 @@ LITE ENDPOINT: lite/v1/deposit_history
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.staging.gravitymarkets.io/lite/v1/deposit_history' \ + curl --location 'https://trades.staging.gravitymarkets.io/lite/v1/transfer' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "c": ["USDT", "USDC"], - "st": "1697788800000000000", - "et": "1697788800000000000", - "l": 500, - "c1": "" + "fa": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "fs": "'$GRVT_SUB_ACCOUNT_ID'", + "ta": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "ts": "'$GRVT_SUB_ACCOUNT_ID'", + "c": "USDT", + "nt": "1500.0", + "s": { + "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", + "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", + "v": 28, + "e": "1697788800000000000", + "n": 1234567890 + }, + "tt": "STANDARD", + "tm": {"provider":"XY","direction":"WITHDRAWAL","provider_tx_id":"txn123456","chainid":"42161","endpoint":"0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0"} } ' ``` @@ -5364,13 +8132,24 @@ LITE ENDPOINT: lite/v1/deposit_history -x ' { "j": "2.0", - "m": "v1/deposit_history", + "m": "v1/transfer", "p": { - "c": ["USDT", "USDC"], - "st": "1697788800000000000", - "et": "1697788800000000000", - "l": 500, - "c1": "" + "fa": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "fs": "'$GRVT_SUB_ACCOUNT_ID'", + "ta": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "ts": "'$GRVT_SUB_ACCOUNT_ID'", + "c": "USDT", + "nt": "1500.0", + "s": { + "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", + "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", + "v": 28, + "e": "1697788800000000000", + "n": 1234567890 + }, + "tt": "STANDARD", + "tm": {"provider":"XY","direction":"WITHDRAWAL","provider_tx_id":"txn123456","chainid":"42161","endpoint":"0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0"} }, "i": 123 } @@ -5381,15 +8160,26 @@ LITE ENDPOINT: lite/v1/deposit_history
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.testnet.grvt.io/full/v1/deposit_history' \ + curl --location 'https://trades.testnet.grvt.io/full/v1/transfer' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "currency": ["USDT", "USDC"], - "start_time": "1697788800000000000", - "end_time": "1697788800000000000", - "limit": 500, - "cursor": "" + "from_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "from_sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "to_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "to_sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "currency": "USDT", + "num_tokens": "1500.0", + "signature": { + "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", + "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", + "v": 28, + "expiration": "1697788800000000000", + "nonce": 1234567890 + }, + "transfer_type": "STANDARD", + "transfer_metadata": {"provider":"XY","direction":"WITHDRAWAL","provider_tx_id":"txn123456","chainid":"42161","endpoint":"0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0"} } ' ``` @@ -5401,13 +8191,24 @@ LITE ENDPOINT: lite/v1/deposit_history -x ' { "jsonrpc": "2.0", - "method": "v1/deposit_history", + "method": "v1/transfer", "params": { - "currency": ["USDT", "USDC"], - "start_time": "1697788800000000000", - "end_time": "1697788800000000000", - "limit": 500, - "cursor": "" + "from_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "from_sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "to_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "to_sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "currency": "USDT", + "num_tokens": "1500.0", + "signature": { + "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", + "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", + "v": 28, + "expiration": "1697788800000000000", + "nonce": 1234567890 + }, + "transfer_type": "STANDARD", + "transfer_metadata": {"provider":"XY","direction":"WITHDRAWAL","provider_tx_id":"txn123456","chainid":"42161","endpoint":"0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0"} }, "id": 123 } @@ -5417,15 +8218,26 @@ LITE ENDPOINT: lite/v1/deposit_history
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.testnet.grvt.io/lite/v1/deposit_history' \ + curl --location 'https://trades.testnet.grvt.io/lite/v1/transfer' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "c": ["USDT", "USDC"], - "st": "1697788800000000000", - "et": "1697788800000000000", - "l": 500, - "c1": "" + "fa": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "fs": "'$GRVT_SUB_ACCOUNT_ID'", + "ta": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "ts": "'$GRVT_SUB_ACCOUNT_ID'", + "c": "USDT", + "nt": "1500.0", + "s": { + "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", + "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", + "v": 28, + "e": "1697788800000000000", + "n": 1234567890 + }, + "tt": "STANDARD", + "tm": {"provider":"XY","direction":"WITHDRAWAL","provider_tx_id":"txn123456","chainid":"42161","endpoint":"0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0"} } ' ``` @@ -5436,14 +8248,25 @@ LITE ENDPOINT: lite/v1/deposit_history -H "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ -x ' { - "j": "2.0", - "m": "v1/deposit_history", - "p": { - "c": ["USDT", "USDC"], - "st": "1697788800000000000", - "et": "1697788800000000000", - "l": 500, - "c1": "" + "j": "2.0", + "m": "v1/transfer", + "p": { + "fa": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "fs": "'$GRVT_SUB_ACCOUNT_ID'", + "ta": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "ts": "'$GRVT_SUB_ACCOUNT_ID'", + "c": "USDT", + "nt": "1500.0", + "s": { + "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", + "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", + "v": 28, + "e": "1697788800000000000", + "n": 1234567890 + }, + "tt": "STANDARD", + "tm": {"provider":"XY","direction":"WITHDRAWAL","provider_tx_id":"txn123456","chainid":"42161","endpoint":"0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0"} }, "i": 123 } @@ -5454,15 +8277,26 @@ LITE ENDPOINT: lite/v1/deposit_history
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.grvt.io/full/v1/deposit_history' \ + curl --location 'https://trades.grvt.io/full/v1/transfer' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "currency": ["USDT", "USDC"], - "start_time": "1697788800000000000", - "end_time": "1697788800000000000", - "limit": 500, - "cursor": "" + "from_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "from_sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "to_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "to_sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "currency": "USDT", + "num_tokens": "1500.0", + "signature": { + "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", + "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", + "v": 28, + "expiration": "1697788800000000000", + "nonce": 1234567890 + }, + "transfer_type": "STANDARD", + "transfer_metadata": {"provider":"XY","direction":"WITHDRAWAL","provider_tx_id":"txn123456","chainid":"42161","endpoint":"0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0"} } ' ``` @@ -5474,13 +8308,24 @@ LITE ENDPOINT: lite/v1/deposit_history -x ' { "jsonrpc": "2.0", - "method": "v1/deposit_history", + "method": "v1/transfer", "params": { - "currency": ["USDT", "USDC"], - "start_time": "1697788800000000000", - "end_time": "1697788800000000000", - "limit": 500, - "cursor": "" + "from_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "from_sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "to_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "to_sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "currency": "USDT", + "num_tokens": "1500.0", + "signature": { + "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", + "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", + "v": 28, + "expiration": "1697788800000000000", + "nonce": 1234567890 + }, + "transfer_type": "STANDARD", + "transfer_metadata": {"provider":"XY","direction":"WITHDRAWAL","provider_tx_id":"txn123456","chainid":"42161","endpoint":"0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0"} }, "id": 123 } @@ -5490,15 +8335,26 @@ LITE ENDPOINT: lite/v1/deposit_history
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.grvt.io/lite/v1/deposit_history' \ + curl --location 'https://trades.grvt.io/lite/v1/transfer' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "c": ["USDT", "USDC"], - "st": "1697788800000000000", - "et": "1697788800000000000", - "l": 500, - "c1": "" + "fa": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "fs": "'$GRVT_SUB_ACCOUNT_ID'", + "ta": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "ts": "'$GRVT_SUB_ACCOUNT_ID'", + "c": "USDT", + "nt": "1500.0", + "s": { + "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", + "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", + "v": 28, + "e": "1697788800000000000", + "n": 1234567890 + }, + "tt": "STANDARD", + "tm": {"provider":"XY","direction":"WITHDRAWAL","provider_tx_id":"txn123456","chainid":"42161","endpoint":"0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0"} } ' ``` @@ -5510,13 +8366,24 @@ LITE ENDPOINT: lite/v1/deposit_history -x ' { "j": "2.0", - "m": "v1/deposit_history", + "m": "v1/transfer", "p": { - "c": ["USDT", "USDC"], - "st": "1697788800000000000", - "et": "1697788800000000000", - "l": 500, - "c1": "" + "fa": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "fs": "'$GRVT_SUB_ACCOUNT_ID'", + "ta": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "ts": "'$GRVT_SUB_ACCOUNT_ID'", + "c": "USDT", + "nt": "1500.0", + "s": { + "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", + "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", + "v": 28, + "e": "1697788800000000000", + "n": 1234567890 + }, + "tt": "STANDARD", + "tm": {"provider":"XY","direction":"WITHDRAWAL","provider_tx_id":"txn123456","chainid":"42161","endpoint":"0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0"} }, "i": 123 } @@ -5524,81 +8391,97 @@ LITE ENDPOINT: lite/v1/deposit_history ```

-### Transfer +### Transfer History ``` -FULL ENDPOINT: full/v1/transfer -LITE ENDPOINT: lite/v1/transfer +FULL ENDPOINT: full/v1/transfer_history +LITE ENDPOINT: lite/v1/transfer_history ``` === "Request"
- -8<- "docs/schemas/api_transfer_request.md" + -8<- "docs/schemas/api_transfer_history_request.md"
!!! question "Query" **Full Request** ``` { .json .copy } { - "from_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "from_sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "to_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "to_sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "currency": "USDT", - "num_tokens": "1500.0", - "signature": { - "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", - "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", - "v": 28, - "expiration": "1697788800000000000", - "nonce": 1234567890 - }, - "transfer_type": "STANDARD", - "transfer_metadata": {"provider":"XY","direction":"WITHDRAWAL","provider_tx_id":"txn123456","chainid":"42161","endpoint":"0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0"} + "currency": ["USDT", "USDC"], + "start_time": "1697788800000000000", + "end_time": "1697788800000000000", + "limit": 500, + "cursor": "", + "tx_id": "1028403" } ``` **Lite Request** ``` { .json .copy } { - "fa": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "fs": "'$GRVT_SUB_ACCOUNT_ID'", - "ta": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "ts": "'$GRVT_SUB_ACCOUNT_ID'", - "c": "USDT", - "nt": "1500.0", - "s": { - "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", - "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", - "v": 28, - "e": "1697788800000000000", - "n": 1234567890 - }, - "tt": "STANDARD", - "tm": {"provider":"XY","direction":"WITHDRAWAL","provider_tx_id":"txn123456","chainid":"42161","endpoint":"0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0"} + "c": ["USDT", "USDC"], + "st": "1697788800000000000", + "et": "1697788800000000000", + "l": 500, + "c1": "", + "ti": "1028403" } ```
=== "Response"
- -8<- "docs/schemas/ack_response.md" + -8<- "docs/schemas/api_transfer_history_response.md"
!!! success **Full Response** ``` { .json .copy } { - "result": { - "ack": "true" - } + "result": [{ + "tx_id": "1028403", + "from_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "from_sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "to_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "to_sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "currency": "USDT", + "num_tokens": "1500.0", + "signature": { + "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", + "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", + "v": 28, + "expiration": "1697788800000000000", + "nonce": 1234567890 + }, + "event_time": "1697788800000000000", + "transfer_type": "STANDARD", + "transfer_metadata": null + }], + "next": "Qw0918=" } ``` **Lite Response** ``` { .json .copy } { - "r": { - "a": "true" - } + "r": [{ + "ti": "1028403", + "fa": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "fs": "'$GRVT_SUB_ACCOUNT_ID'", + "ta": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "ts": "'$GRVT_SUB_ACCOUNT_ID'", + "c": "USDT", + "nt": "1500.0", + "s": { + "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", + "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", + "v": 28, + "e": "1697788800000000000", + "n": 1234567890 + }, + "et": "1697788800000000000", + "tt": "STANDARD", + "tm": null + }], + "n": "Qw0918=" } ```
@@ -5641,55 +8524,35 @@ LITE ENDPOINT: lite/v1/transfer
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.dev.gravitymarkets.io/full/v1/transfer' \ + curl --location 'https://trades.dev.gravitymarkets.io/full/v1/transfer_history' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "from_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "from_sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "to_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "to_sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "currency": "USDT", - "num_tokens": "1500.0", - "signature": { - "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", - "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", - "v": 28, - "expiration": "1697788800000000000", - "nonce": 1234567890 - }, - "transfer_type": "STANDARD", - "transfer_metadata": {"provider":"XY","direction":"WITHDRAWAL","provider_tx_id":"txn123456","chainid":"42161","endpoint":"0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0"} + "currency": ["USDT", "USDC"], + "start_time": "1697788800000000000", + "end_time": "1697788800000000000", + "limit": 500, + "cursor": "", + "tx_id": "1028403" } ' ``` !!! 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/transfer", - "params": { - "from_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "from_sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "to_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "to_sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "currency": "USDT", - "num_tokens": "1500.0", - "signature": { - "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", - "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", - "v": 28, - "expiration": "1697788800000000000", - "nonce": 1234567890 - }, - "transfer_type": "STANDARD", - "transfer_metadata": {"provider":"XY","direction":"WITHDRAWAL","provider_tx_id":"txn123456","chainid":"42161","endpoint":"0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0"} + ``` { .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/transfer_history", + "params": { + "currency": ["USDT", "USDC"], + "start_time": "1697788800000000000", + "end_time": "1697788800000000000", + "limit": 500, + "cursor": "", + "tx_id": "1028403" }, "id": 123 } @@ -5699,26 +8562,16 @@ LITE ENDPOINT: lite/v1/transfer
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.dev.gravitymarkets.io/lite/v1/transfer' \ + curl --location 'https://trades.dev.gravitymarkets.io/lite/v1/transfer_history' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "fa": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "fs": "'$GRVT_SUB_ACCOUNT_ID'", - "ta": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "ts": "'$GRVT_SUB_ACCOUNT_ID'", - "c": "USDT", - "nt": "1500.0", - "s": { - "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", - "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", - "v": 28, - "e": "1697788800000000000", - "n": 1234567890 - }, - "tt": "STANDARD", - "tm": {"provider":"XY","direction":"WITHDRAWAL","provider_tx_id":"txn123456","chainid":"42161","endpoint":"0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0"} + "c": ["USDT", "USDC"], + "st": "1697788800000000000", + "et": "1697788800000000000", + "l": 500, + "c1": "", + "ti": "1028403" } ' ``` @@ -5730,24 +8583,14 @@ LITE ENDPOINT: lite/v1/transfer -x ' { "j": "2.0", - "m": "v1/transfer", + "m": "v1/transfer_history", "p": { - "fa": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "fs": "'$GRVT_SUB_ACCOUNT_ID'", - "ta": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "ts": "'$GRVT_SUB_ACCOUNT_ID'", - "c": "USDT", - "nt": "1500.0", - "s": { - "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", - "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", - "v": 28, - "e": "1697788800000000000", - "n": 1234567890 - }, - "tt": "STANDARD", - "tm": {"provider":"XY","direction":"WITHDRAWAL","provider_tx_id":"txn123456","chainid":"42161","endpoint":"0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0"} + "c": ["USDT", "USDC"], + "st": "1697788800000000000", + "et": "1697788800000000000", + "l": 500, + "c1": "", + "ti": "1028403" }, "i": 123 } @@ -5758,26 +8601,16 @@ LITE ENDPOINT: lite/v1/transfer
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.staging.gravitymarkets.io/full/v1/transfer' \ + curl --location 'https://trades.staging.gravitymarkets.io/full/v1/transfer_history' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "from_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "from_sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "to_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "to_sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "currency": "USDT", - "num_tokens": "1500.0", - "signature": { - "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", - "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", - "v": 28, - "expiration": "1697788800000000000", - "nonce": 1234567890 - }, - "transfer_type": "STANDARD", - "transfer_metadata": {"provider":"XY","direction":"WITHDRAWAL","provider_tx_id":"txn123456","chainid":"42161","endpoint":"0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0"} + "currency": ["USDT", "USDC"], + "start_time": "1697788800000000000", + "end_time": "1697788800000000000", + "limit": 500, + "cursor": "", + "tx_id": "1028403" } ' ``` @@ -5789,24 +8622,14 @@ LITE ENDPOINT: lite/v1/transfer -x ' { "jsonrpc": "2.0", - "method": "v1/transfer", + "method": "v1/transfer_history", "params": { - "from_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "from_sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "to_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "to_sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "currency": "USDT", - "num_tokens": "1500.0", - "signature": { - "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", - "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", - "v": 28, - "expiration": "1697788800000000000", - "nonce": 1234567890 - }, - "transfer_type": "STANDARD", - "transfer_metadata": {"provider":"XY","direction":"WITHDRAWAL","provider_tx_id":"txn123456","chainid":"42161","endpoint":"0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0"} + "currency": ["USDT", "USDC"], + "start_time": "1697788800000000000", + "end_time": "1697788800000000000", + "limit": 500, + "cursor": "", + "tx_id": "1028403" }, "id": 123 } @@ -5816,26 +8639,16 @@ LITE ENDPOINT: lite/v1/transfer
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.staging.gravitymarkets.io/lite/v1/transfer' \ + curl --location 'https://trades.staging.gravitymarkets.io/lite/v1/transfer_history' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "fa": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "fs": "'$GRVT_SUB_ACCOUNT_ID'", - "ta": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "ts": "'$GRVT_SUB_ACCOUNT_ID'", - "c": "USDT", - "nt": "1500.0", - "s": { - "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", - "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", - "v": 28, - "e": "1697788800000000000", - "n": 1234567890 - }, - "tt": "STANDARD", - "tm": {"provider":"XY","direction":"WITHDRAWAL","provider_tx_id":"txn123456","chainid":"42161","endpoint":"0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0"} + "c": ["USDT", "USDC"], + "st": "1697788800000000000", + "et": "1697788800000000000", + "l": 500, + "c1": "", + "ti": "1028403" } ' ``` @@ -5847,24 +8660,14 @@ LITE ENDPOINT: lite/v1/transfer -x ' { "j": "2.0", - "m": "v1/transfer", + "m": "v1/transfer_history", "p": { - "fa": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "fs": "'$GRVT_SUB_ACCOUNT_ID'", - "ta": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "ts": "'$GRVT_SUB_ACCOUNT_ID'", - "c": "USDT", - "nt": "1500.0", - "s": { - "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", - "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", - "v": 28, - "e": "1697788800000000000", - "n": 1234567890 - }, - "tt": "STANDARD", - "tm": {"provider":"XY","direction":"WITHDRAWAL","provider_tx_id":"txn123456","chainid":"42161","endpoint":"0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0"} + "c": ["USDT", "USDC"], + "st": "1697788800000000000", + "et": "1697788800000000000", + "l": 500, + "c1": "", + "ti": "1028403" }, "i": 123 } @@ -5875,26 +8678,16 @@ LITE ENDPOINT: lite/v1/transfer
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.testnet.grvt.io/full/v1/transfer' \ + curl --location 'https://trades.testnet.grvt.io/full/v1/transfer_history' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "from_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "from_sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "to_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "to_sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "currency": "USDT", - "num_tokens": "1500.0", - "signature": { - "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", - "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", - "v": 28, - "expiration": "1697788800000000000", - "nonce": 1234567890 - }, - "transfer_type": "STANDARD", - "transfer_metadata": {"provider":"XY","direction":"WITHDRAWAL","provider_tx_id":"txn123456","chainid":"42161","endpoint":"0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0"} + "currency": ["USDT", "USDC"], + "start_time": "1697788800000000000", + "end_time": "1697788800000000000", + "limit": 500, + "cursor": "", + "tx_id": "1028403" } ' ``` @@ -5906,24 +8699,14 @@ LITE ENDPOINT: lite/v1/transfer -x ' { "jsonrpc": "2.0", - "method": "v1/transfer", + "method": "v1/transfer_history", "params": { - "from_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "from_sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "to_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "to_sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "currency": "USDT", - "num_tokens": "1500.0", - "signature": { - "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", - "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", - "v": 28, - "expiration": "1697788800000000000", - "nonce": 1234567890 - }, - "transfer_type": "STANDARD", - "transfer_metadata": {"provider":"XY","direction":"WITHDRAWAL","provider_tx_id":"txn123456","chainid":"42161","endpoint":"0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0"} + "currency": ["USDT", "USDC"], + "start_time": "1697788800000000000", + "end_time": "1697788800000000000", + "limit": 500, + "cursor": "", + "tx_id": "1028403" }, "id": 123 } @@ -5933,26 +8716,16 @@ LITE ENDPOINT: lite/v1/transfer
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.testnet.grvt.io/lite/v1/transfer' \ + curl --location 'https://trades.testnet.grvt.io/lite/v1/transfer_history' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "fa": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "fs": "'$GRVT_SUB_ACCOUNT_ID'", - "ta": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "ts": "'$GRVT_SUB_ACCOUNT_ID'", - "c": "USDT", - "nt": "1500.0", - "s": { - "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", - "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", - "v": 28, - "e": "1697788800000000000", - "n": 1234567890 - }, - "tt": "STANDARD", - "tm": {"provider":"XY","direction":"WITHDRAWAL","provider_tx_id":"txn123456","chainid":"42161","endpoint":"0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0"} + "c": ["USDT", "USDC"], + "st": "1697788800000000000", + "et": "1697788800000000000", + "l": 500, + "c1": "", + "ti": "1028403" } ' ``` @@ -5964,24 +8737,14 @@ LITE ENDPOINT: lite/v1/transfer -x ' { "j": "2.0", - "m": "v1/transfer", + "m": "v1/transfer_history", "p": { - "fa": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "fs": "'$GRVT_SUB_ACCOUNT_ID'", - "ta": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "ts": "'$GRVT_SUB_ACCOUNT_ID'", - "c": "USDT", - "nt": "1500.0", - "s": { - "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", - "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", - "v": 28, - "e": "1697788800000000000", - "n": 1234567890 - }, - "tt": "STANDARD", - "tm": {"provider":"XY","direction":"WITHDRAWAL","provider_tx_id":"txn123456","chainid":"42161","endpoint":"0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0"} + "c": ["USDT", "USDC"], + "st": "1697788800000000000", + "et": "1697788800000000000", + "l": 500, + "c1": "", + "ti": "1028403" }, "i": 123 } @@ -5989,29 +8752,19 @@ LITE ENDPOINT: lite/v1/transfer ```
=== "PROD" -
- !!! example "REST Full" - ``` { .bash .copy } - curl --location 'https://trades.grvt.io/full/v1/transfer' \ - --header "Cookie: $GRVT_COOKIE" \ - --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ - --data '{ - "from_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "from_sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "to_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "to_sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "currency": "USDT", - "num_tokens": "1500.0", - "signature": { - "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", - "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", - "v": 28, - "expiration": "1697788800000000000", - "nonce": 1234567890 - }, - "transfer_type": "STANDARD", - "transfer_metadata": {"provider":"XY","direction":"WITHDRAWAL","provider_tx_id":"txn123456","chainid":"42161","endpoint":"0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0"} +
+ !!! example "REST Full" + ``` { .bash .copy } + curl --location 'https://trades.grvt.io/full/v1/transfer_history' \ + --header "Cookie: $GRVT_COOKIE" \ + --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ + --data '{ + "currency": ["USDT", "USDC"], + "start_time": "1697788800000000000", + "end_time": "1697788800000000000", + "limit": 500, + "cursor": "", + "tx_id": "1028403" } ' ``` @@ -6023,24 +8776,14 @@ LITE ENDPOINT: lite/v1/transfer -x ' { "jsonrpc": "2.0", - "method": "v1/transfer", + "method": "v1/transfer_history", "params": { - "from_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "from_sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "to_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "to_sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "currency": "USDT", - "num_tokens": "1500.0", - "signature": { - "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", - "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", - "v": 28, - "expiration": "1697788800000000000", - "nonce": 1234567890 - }, - "transfer_type": "STANDARD", - "transfer_metadata": {"provider":"XY","direction":"WITHDRAWAL","provider_tx_id":"txn123456","chainid":"42161","endpoint":"0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0"} + "currency": ["USDT", "USDC"], + "start_time": "1697788800000000000", + "end_time": "1697788800000000000", + "limit": 500, + "cursor": "", + "tx_id": "1028403" }, "id": 123 } @@ -6050,26 +8793,16 @@ LITE ENDPOINT: lite/v1/transfer
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.grvt.io/lite/v1/transfer' \ + curl --location 'https://trades.grvt.io/lite/v1/transfer_history' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "fa": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "fs": "'$GRVT_SUB_ACCOUNT_ID'", - "ta": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "ts": "'$GRVT_SUB_ACCOUNT_ID'", - "c": "USDT", - "nt": "1500.0", - "s": { - "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", - "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", - "v": 28, - "e": "1697788800000000000", - "n": 1234567890 - }, - "tt": "STANDARD", - "tm": {"provider":"XY","direction":"WITHDRAWAL","provider_tx_id":"txn123456","chainid":"42161","endpoint":"0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0"} + "c": ["USDT", "USDC"], + "st": "1697788800000000000", + "et": "1697788800000000000", + "l": 500, + "c1": "", + "ti": "1028403" } ' ``` @@ -6081,24 +8814,14 @@ LITE ENDPOINT: lite/v1/transfer -x ' { "j": "2.0", - "m": "v1/transfer", + "m": "v1/transfer_history", "p": { - "fa": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "fs": "'$GRVT_SUB_ACCOUNT_ID'", - "ta": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "ts": "'$GRVT_SUB_ACCOUNT_ID'", - "c": "USDT", - "nt": "1500.0", - "s": { - "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", - "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", - "v": 28, - "e": "1697788800000000000", - "n": 1234567890 - }, - "tt": "STANDARD", - "tm": {"provider":"XY","direction":"WITHDRAWAL","provider_tx_id":"txn123456","chainid":"42161","endpoint":"0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0"} + "c": ["USDT", "USDC"], + "st": "1697788800000000000", + "et": "1697788800000000000", + "l": 500, + "c1": "", + "ti": "1028403" }, "i": 123 } @@ -6106,95 +8829,73 @@ LITE ENDPOINT: lite/v1/transfer ```

-### Transfer History +### Withdrawal ``` -FULL ENDPOINT: full/v1/transfer_history -LITE ENDPOINT: lite/v1/transfer_history +FULL ENDPOINT: full/v1/withdrawal +LITE ENDPOINT: lite/v1/withdrawal ``` === "Request"
- -8<- "docs/schemas/api_transfer_history_request.md" + -8<- "docs/schemas/api_withdrawal_request.md"
!!! question "Query" **Full Request** ``` { .json .copy } { - "currency": ["USDT", "USDC"], - "start_time": "1697788800000000000", - "end_time": "1697788800000000000", - "limit": 500, - "cursor": "" + "from_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "to_eth_address": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "currency": "USDT", + "num_tokens": "1500.0", + "signature": { + "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", + "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", + "v": 28, + "expiration": "1697788800000000000", + "nonce": 1234567890 + } } ``` **Lite Request** ``` { .json .copy } { - "c": ["USDT", "USDC"], - "st": "1697788800000000000", - "et": "1697788800000000000", - "l": 500, - "c1": "" + "fa": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "te": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "c": "USDT", + "nt": "1500.0", + "s": { + "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", + "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", + "v": 28, + "e": "1697788800000000000", + "n": 1234567890 + } } ```
=== "Response"
- -8<- "docs/schemas/api_transfer_history_response.md" + -8<- "docs/schemas/ack_response.md"
!!! success **Full Response** ``` { .json .copy } { - "result": [{ - "tx_id": "1028403", - "from_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "from_sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "to_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "to_sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "currency": "USDT", - "num_tokens": "1500.0", - "signature": { - "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", - "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", - "v": 28, - "expiration": "1697788800000000000", - "nonce": 1234567890 - }, - "event_time": "1697788800000000000", - "transfer_type": "STANDARD", - "transfer_metadata": null - }], - "next": "Qw0918=" + "result": { + "ack": "true" + } } ``` **Lite Response** ``` { .json .copy } { - "r": [{ - "ti": "1028403", - "fa": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "fs": "'$GRVT_SUB_ACCOUNT_ID'", - "ta": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "ts": "'$GRVT_SUB_ACCOUNT_ID'", - "c": "USDT", - "nt": "1500.0", - "s": { - "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", - "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", - "v": 28, - "e": "1697788800000000000", - "n": 1234567890 - }, - "et": "1697788800000000000", - "tt": "STANDARD", - "tm": null - }], - "n": "Qw0918=" + "r": { + "a": "true" + } } ```
@@ -6209,6 +8910,7 @@ LITE ENDPOINT: lite/v1/transfer_history |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| + |4010|400|This wallet is not supported. Please try another wallet.|
!!! failure @@ -6237,15 +8939,22 @@ LITE ENDPOINT: lite/v1/transfer_history
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.dev.gravitymarkets.io/full/v1/transfer_history' \ + curl --location 'https://trades.dev.gravitymarkets.io/full/v1/withdrawal' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "currency": ["USDT", "USDC"], - "start_time": "1697788800000000000", - "end_time": "1697788800000000000", - "limit": 500, - "cursor": "" + "from_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "to_eth_address": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "currency": "USDT", + "num_tokens": "1500.0", + "signature": { + "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", + "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", + "v": 28, + "expiration": "1697788800000000000", + "nonce": 1234567890 + } } ' ``` @@ -6257,13 +8966,20 @@ LITE ENDPOINT: lite/v1/transfer_history -x ' { "jsonrpc": "2.0", - "method": "v1/transfer_history", + "method": "v1/withdrawal", "params": { - "currency": ["USDT", "USDC"], - "start_time": "1697788800000000000", - "end_time": "1697788800000000000", - "limit": 500, - "cursor": "" + "from_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "to_eth_address": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "currency": "USDT", + "num_tokens": "1500.0", + "signature": { + "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", + "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", + "v": 28, + "expiration": "1697788800000000000", + "nonce": 1234567890 + } }, "id": 123 } @@ -6273,15 +8989,22 @@ LITE ENDPOINT: lite/v1/transfer_history
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.dev.gravitymarkets.io/lite/v1/transfer_history' \ + curl --location 'https://trades.dev.gravitymarkets.io/lite/v1/withdrawal' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "c": ["USDT", "USDC"], - "st": "1697788800000000000", - "et": "1697788800000000000", - "l": 500, - "c1": "" + "fa": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "te": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "c": "USDT", + "nt": "1500.0", + "s": { + "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", + "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", + "v": 28, + "e": "1697788800000000000", + "n": 1234567890 + } } ' ``` @@ -6293,13 +9016,20 @@ LITE ENDPOINT: lite/v1/transfer_history -x ' { "j": "2.0", - "m": "v1/transfer_history", + "m": "v1/withdrawal", "p": { - "c": ["USDT", "USDC"], - "st": "1697788800000000000", - "et": "1697788800000000000", - "l": 500, - "c1": "" + "fa": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "te": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "c": "USDT", + "nt": "1500.0", + "s": { + "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", + "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", + "v": 28, + "e": "1697788800000000000", + "n": 1234567890 + } }, "i": 123 } @@ -6310,15 +9040,22 @@ LITE ENDPOINT: lite/v1/transfer_history
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.staging.gravitymarkets.io/full/v1/transfer_history' \ + curl --location 'https://trades.staging.gravitymarkets.io/full/v1/withdrawal' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "currency": ["USDT", "USDC"], - "start_time": "1697788800000000000", - "end_time": "1697788800000000000", - "limit": 500, - "cursor": "" + "from_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "to_eth_address": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "currency": "USDT", + "num_tokens": "1500.0", + "signature": { + "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", + "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", + "v": 28, + "expiration": "1697788800000000000", + "nonce": 1234567890 + } } ' ``` @@ -6330,13 +9067,20 @@ LITE ENDPOINT: lite/v1/transfer_history -x ' { "jsonrpc": "2.0", - "method": "v1/transfer_history", + "method": "v1/withdrawal", "params": { - "currency": ["USDT", "USDC"], - "start_time": "1697788800000000000", - "end_time": "1697788800000000000", - "limit": 500, - "cursor": "" + "from_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "to_eth_address": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "currency": "USDT", + "num_tokens": "1500.0", + "signature": { + "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", + "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", + "v": 28, + "expiration": "1697788800000000000", + "nonce": 1234567890 + } }, "id": 123 } @@ -6346,15 +9090,22 @@ LITE ENDPOINT: lite/v1/transfer_history
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.staging.gravitymarkets.io/lite/v1/transfer_history' \ + curl --location 'https://trades.staging.gravitymarkets.io/lite/v1/withdrawal' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "c": ["USDT", "USDC"], - "st": "1697788800000000000", - "et": "1697788800000000000", - "l": 500, - "c1": "" + "fa": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "te": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "c": "USDT", + "nt": "1500.0", + "s": { + "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", + "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", + "v": 28, + "e": "1697788800000000000", + "n": 1234567890 + } } ' ``` @@ -6366,13 +9117,20 @@ LITE ENDPOINT: lite/v1/transfer_history -x ' { "j": "2.0", - "m": "v1/transfer_history", + "m": "v1/withdrawal", "p": { - "c": ["USDT", "USDC"], - "st": "1697788800000000000", - "et": "1697788800000000000", - "l": 500, - "c1": "" + "fa": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "te": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "c": "USDT", + "nt": "1500.0", + "s": { + "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", + "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", + "v": 28, + "e": "1697788800000000000", + "n": 1234567890 + } }, "i": 123 } @@ -6383,15 +9141,22 @@ LITE ENDPOINT: lite/v1/transfer_history
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.testnet.grvt.io/full/v1/transfer_history' \ + curl --location 'https://trades.testnet.grvt.io/full/v1/withdrawal' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "currency": ["USDT", "USDC"], - "start_time": "1697788800000000000", - "end_time": "1697788800000000000", - "limit": 500, - "cursor": "" + "from_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "to_eth_address": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "currency": "USDT", + "num_tokens": "1500.0", + "signature": { + "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", + "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", + "v": 28, + "expiration": "1697788800000000000", + "nonce": 1234567890 + } } ' ``` @@ -6403,13 +9168,20 @@ LITE ENDPOINT: lite/v1/transfer_history -x ' { "jsonrpc": "2.0", - "method": "v1/transfer_history", + "method": "v1/withdrawal", "params": { - "currency": ["USDT", "USDC"], - "start_time": "1697788800000000000", - "end_time": "1697788800000000000", - "limit": 500, - "cursor": "" + "from_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "to_eth_address": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "currency": "USDT", + "num_tokens": "1500.0", + "signature": { + "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", + "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", + "v": 28, + "expiration": "1697788800000000000", + "nonce": 1234567890 + } }, "id": 123 } @@ -6419,15 +9191,22 @@ LITE ENDPOINT: lite/v1/transfer_history
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.testnet.grvt.io/lite/v1/transfer_history' \ + curl --location 'https://trades.testnet.grvt.io/lite/v1/withdrawal' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "c": ["USDT", "USDC"], - "st": "1697788800000000000", - "et": "1697788800000000000", - "l": 500, - "c1": "" + "fa": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "te": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "c": "USDT", + "nt": "1500.0", + "s": { + "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", + "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", + "v": 28, + "e": "1697788800000000000", + "n": 1234567890 + } } ' ``` @@ -6439,13 +9218,20 @@ LITE ENDPOINT: lite/v1/transfer_history -x ' { "j": "2.0", - "m": "v1/transfer_history", + "m": "v1/withdrawal", "p": { - "c": ["USDT", "USDC"], - "st": "1697788800000000000", - "et": "1697788800000000000", - "l": 500, - "c1": "" + "fa": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "te": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "c": "USDT", + "nt": "1500.0", + "s": { + "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", + "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", + "v": 28, + "e": "1697788800000000000", + "n": 1234567890 + } }, "i": 123 } @@ -6456,15 +9242,22 @@ LITE ENDPOINT: lite/v1/transfer_history
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.grvt.io/full/v1/transfer_history' \ + curl --location 'https://trades.grvt.io/full/v1/withdrawal' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "currency": ["USDT", "USDC"], - "start_time": "1697788800000000000", - "end_time": "1697788800000000000", - "limit": 500, - "cursor": "" + "from_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "to_eth_address": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "currency": "USDT", + "num_tokens": "1500.0", + "signature": { + "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", + "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", + "v": 28, + "expiration": "1697788800000000000", + "nonce": 1234567890 + } } ' ``` @@ -6476,13 +9269,20 @@ LITE ENDPOINT: lite/v1/transfer_history -x ' { "jsonrpc": "2.0", - "method": "v1/transfer_history", + "method": "v1/withdrawal", "params": { - "currency": ["USDT", "USDC"], - "start_time": "1697788800000000000", - "end_time": "1697788800000000000", - "limit": 500, - "cursor": "" + "from_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "to_eth_address": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "currency": "USDT", + "num_tokens": "1500.0", + "signature": { + "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", + "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", + "v": 28, + "expiration": "1697788800000000000", + "nonce": 1234567890 + } }, "id": 123 } @@ -6492,15 +9292,22 @@ LITE ENDPOINT: lite/v1/transfer_history
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.grvt.io/lite/v1/transfer_history' \ + curl --location 'https://trades.grvt.io/lite/v1/withdrawal' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "c": ["USDT", "USDC"], - "st": "1697788800000000000", - "et": "1697788800000000000", - "l": 500, - "c1": "" + "fa": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "te": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "c": "USDT", + "nt": "1500.0", + "s": { + "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", + "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", + "v": 28, + "e": "1697788800000000000", + "n": 1234567890 + } } ' ``` @@ -6512,13 +9319,20 @@ LITE ENDPOINT: lite/v1/transfer_history -x ' { "j": "2.0", - "m": "v1/transfer_history", + "m": "v1/withdrawal", "p": { - "c": ["USDT", "USDC"], - "st": "1697788800000000000", - "et": "1697788800000000000", - "l": 500, - "c1": "" + "fa": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "te": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "c": "USDT", + "nt": "1500.0", + "s": { + "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", + "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", + "v": 28, + "e": "1697788800000000000", + "n": 1234567890 + } }, "i": 123 } @@ -6526,73 +9340,87 @@ LITE ENDPOINT: lite/v1/transfer_history ```

-### Withdrawal +### Withdrawal History ``` -FULL ENDPOINT: full/v1/withdrawal -LITE ENDPOINT: lite/v1/withdrawal +FULL ENDPOINT: full/v1/withdrawal_history +LITE ENDPOINT: lite/v1/withdrawal_history ``` === "Request"
- -8<- "docs/schemas/api_withdrawal_request.md" + -8<- "docs/schemas/api_withdrawal_history_request.md"
!!! question "Query" **Full Request** ``` { .json .copy } { - "from_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "to_eth_address": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "currency": "USDT", - "num_tokens": "1500.0", - "signature": { - "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", - "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", - "v": 28, - "expiration": "1697788800000000000", - "nonce": 1234567890 - } + "currency": ["USDT", "USDC"], + "start_time": "1697788800000000000", + "end_time": "1697788800000000000", + "limit": 500, + "cursor": "" } ``` **Lite Request** ``` { .json .copy } - { - "fa": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "te": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "c": "USDT", - "nt": "1500.0", - "s": { - "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", - "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", - "v": 28, - "e": "1697788800000000000", - "n": 1234567890 - } + { + "c": ["USDT", "USDC"], + "st": "1697788800000000000", + "et": "1697788800000000000", + "l": 500, + "c1": "" } ```
=== "Response"
- -8<- "docs/schemas/ack_response.md" + -8<- "docs/schemas/api_withdrawal_history_response.md"
!!! success **Full Response** ``` { .json .copy } { - "result": { - "ack": "true" - } + "result": [{ + "tx_id": "1028403", + "from_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "to_eth_address": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "currency": "USDT", + "num_tokens": "1500.0", + "signature": { + "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", + "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", + "v": 28, + "expiration": "1697788800000000000", + "nonce": 1234567890 + }, + "event_time": "1697788800000000000" + }], + "next": "Qw0918=" } ``` **Lite Response** ``` { .json .copy } { - "r": { - "a": "true" - } + "r": [{ + "ti": "1028403", + "fa": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "te": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "c": "USDT", + "nt": "1500.0", + "s": { + "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", + "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", + "v": 28, + "e": "1697788800000000000", + "n": 1234567890 + }, + "et": "1697788800000000000" + }], + "n": "Qw0918=" } ```
@@ -6607,7 +9435,6 @@ LITE ENDPOINT: lite/v1/withdrawal |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| - |4010|400|This wallet is not supported. Please try another wallet.|
!!! failure @@ -6636,22 +9463,15 @@ LITE ENDPOINT: lite/v1/withdrawal
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.dev.gravitymarkets.io/full/v1/withdrawal' \ + curl --location 'https://trades.dev.gravitymarkets.io/full/v1/withdrawal_history' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "from_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "to_eth_address": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "currency": "USDT", - "num_tokens": "1500.0", - "signature": { - "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", - "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", - "v": 28, - "expiration": "1697788800000000000", - "nonce": 1234567890 - } + "currency": ["USDT", "USDC"], + "start_time": "1697788800000000000", + "end_time": "1697788800000000000", + "limit": 500, + "cursor": "" } ' ``` @@ -6663,20 +9483,13 @@ LITE ENDPOINT: lite/v1/withdrawal -x ' { "jsonrpc": "2.0", - "method": "v1/withdrawal", + "method": "v1/withdrawal_history", "params": { - "from_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "to_eth_address": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "currency": "USDT", - "num_tokens": "1500.0", - "signature": { - "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", - "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", - "v": 28, - "expiration": "1697788800000000000", - "nonce": 1234567890 - } + "currency": ["USDT", "USDC"], + "start_time": "1697788800000000000", + "end_time": "1697788800000000000", + "limit": 500, + "cursor": "" }, "id": 123 } @@ -6686,22 +9499,15 @@ LITE ENDPOINT: lite/v1/withdrawal
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.dev.gravitymarkets.io/lite/v1/withdrawal' \ + curl --location 'https://trades.dev.gravitymarkets.io/lite/v1/withdrawal_history' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "fa": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "te": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "c": "USDT", - "nt": "1500.0", - "s": { - "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", - "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", - "v": 28, - "e": "1697788800000000000", - "n": 1234567890 - } + "c": ["USDT", "USDC"], + "st": "1697788800000000000", + "et": "1697788800000000000", + "l": 500, + "c1": "" } ' ``` @@ -6713,20 +9519,13 @@ LITE ENDPOINT: lite/v1/withdrawal -x ' { "j": "2.0", - "m": "v1/withdrawal", + "m": "v1/withdrawal_history", "p": { - "fa": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "te": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "c": "USDT", - "nt": "1500.0", - "s": { - "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", - "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", - "v": 28, - "e": "1697788800000000000", - "n": 1234567890 - } + "c": ["USDT", "USDC"], + "st": "1697788800000000000", + "et": "1697788800000000000", + "l": 500, + "c1": "" }, "i": 123 } @@ -6737,22 +9536,15 @@ LITE ENDPOINT: lite/v1/withdrawal
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.staging.gravitymarkets.io/full/v1/withdrawal' \ + curl --location 'https://trades.staging.gravitymarkets.io/full/v1/withdrawal_history' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "from_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "to_eth_address": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "currency": "USDT", - "num_tokens": "1500.0", - "signature": { - "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", - "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", - "v": 28, - "expiration": "1697788800000000000", - "nonce": 1234567890 - } + "currency": ["USDT", "USDC"], + "start_time": "1697788800000000000", + "end_time": "1697788800000000000", + "limit": 500, + "cursor": "" } ' ``` @@ -6764,20 +9556,13 @@ LITE ENDPOINT: lite/v1/withdrawal -x ' { "jsonrpc": "2.0", - "method": "v1/withdrawal", + "method": "v1/withdrawal_history", "params": { - "from_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "to_eth_address": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "currency": "USDT", - "num_tokens": "1500.0", - "signature": { - "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", - "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", - "v": 28, - "expiration": "1697788800000000000", - "nonce": 1234567890 - } + "currency": ["USDT", "USDC"], + "start_time": "1697788800000000000", + "end_time": "1697788800000000000", + "limit": 500, + "cursor": "" }, "id": 123 } @@ -6787,22 +9572,15 @@ LITE ENDPOINT: lite/v1/withdrawal
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.staging.gravitymarkets.io/lite/v1/withdrawal' \ + curl --location 'https://trades.staging.gravitymarkets.io/lite/v1/withdrawal_history' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "fa": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "te": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "c": "USDT", - "nt": "1500.0", - "s": { - "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", - "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", - "v": 28, - "e": "1697788800000000000", - "n": 1234567890 - } + "c": ["USDT", "USDC"], + "st": "1697788800000000000", + "et": "1697788800000000000", + "l": 500, + "c1": "" } ' ``` @@ -6814,20 +9592,13 @@ LITE ENDPOINT: lite/v1/withdrawal -x ' { "j": "2.0", - "m": "v1/withdrawal", + "m": "v1/withdrawal_history", "p": { - "fa": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "te": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "c": "USDT", - "nt": "1500.0", - "s": { - "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", - "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", - "v": 28, - "e": "1697788800000000000", - "n": 1234567890 - } + "c": ["USDT", "USDC"], + "st": "1697788800000000000", + "et": "1697788800000000000", + "l": 500, + "c1": "" }, "i": 123 } @@ -6838,22 +9609,15 @@ LITE ENDPOINT: lite/v1/withdrawal
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.testnet.grvt.io/full/v1/withdrawal' \ + curl --location 'https://trades.testnet.grvt.io/full/v1/withdrawal_history' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "from_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "to_eth_address": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "currency": "USDT", - "num_tokens": "1500.0", - "signature": { - "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", - "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", - "v": 28, - "expiration": "1697788800000000000", - "nonce": 1234567890 - } + "currency": ["USDT", "USDC"], + "start_time": "1697788800000000000", + "end_time": "1697788800000000000", + "limit": 500, + "cursor": "" } ' ``` @@ -6865,20 +9629,13 @@ LITE ENDPOINT: lite/v1/withdrawal -x ' { "jsonrpc": "2.0", - "method": "v1/withdrawal", + "method": "v1/withdrawal_history", "params": { - "from_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "to_eth_address": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "currency": "USDT", - "num_tokens": "1500.0", - "signature": { - "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", - "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", - "v": 28, - "expiration": "1697788800000000000", - "nonce": 1234567890 - } + "currency": ["USDT", "USDC"], + "start_time": "1697788800000000000", + "end_time": "1697788800000000000", + "limit": 500, + "cursor": "" }, "id": 123 } @@ -6888,22 +9645,15 @@ LITE ENDPOINT: lite/v1/withdrawal
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.testnet.grvt.io/lite/v1/withdrawal' \ + curl --location 'https://trades.testnet.grvt.io/lite/v1/withdrawal_history' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "fa": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "te": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "c": "USDT", - "nt": "1500.0", - "s": { - "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", - "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", - "v": 28, - "e": "1697788800000000000", - "n": 1234567890 - } + "c": ["USDT", "USDC"], + "st": "1697788800000000000", + "et": "1697788800000000000", + "l": 500, + "c1": "" } ' ``` @@ -6915,20 +9665,13 @@ LITE ENDPOINT: lite/v1/withdrawal -x ' { "j": "2.0", - "m": "v1/withdrawal", + "m": "v1/withdrawal_history", "p": { - "fa": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "te": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "c": "USDT", - "nt": "1500.0", - "s": { - "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", - "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", - "v": 28, - "e": "1697788800000000000", - "n": 1234567890 - } + "c": ["USDT", "USDC"], + "st": "1697788800000000000", + "et": "1697788800000000000", + "l": 500, + "c1": "" }, "i": 123 } @@ -6939,22 +9682,15 @@ LITE ENDPOINT: lite/v1/withdrawal
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.grvt.io/full/v1/withdrawal' \ + curl --location 'https://trades.grvt.io/full/v1/withdrawal_history' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "from_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "to_eth_address": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "currency": "USDT", - "num_tokens": "1500.0", - "signature": { - "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", - "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", - "v": 28, - "expiration": "1697788800000000000", - "nonce": 1234567890 - } + "currency": ["USDT", "USDC"], + "start_time": "1697788800000000000", + "end_time": "1697788800000000000", + "limit": 500, + "cursor": "" } ' ``` @@ -6966,20 +9702,13 @@ LITE ENDPOINT: lite/v1/withdrawal -x ' { "jsonrpc": "2.0", - "method": "v1/withdrawal", + "method": "v1/withdrawal_history", "params": { - "from_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "to_eth_address": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "currency": "USDT", - "num_tokens": "1500.0", - "signature": { - "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", - "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", - "v": 28, - "expiration": "1697788800000000000", - "nonce": 1234567890 - } + "currency": ["USDT", "USDC"], + "start_time": "1697788800000000000", + "end_time": "1697788800000000000", + "limit": 500, + "cursor": "" }, "id": 123 } @@ -6989,22 +9718,15 @@ LITE ENDPOINT: lite/v1/withdrawal
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.grvt.io/lite/v1/withdrawal' \ + curl --location 'https://trades.grvt.io/lite/v1/withdrawal_history' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "fa": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "te": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "c": "USDT", - "nt": "1500.0", - "s": { - "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", - "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", - "v": 28, - "e": "1697788800000000000", - "n": 1234567890 - } + "c": ["USDT", "USDC"], + "st": "1697788800000000000", + "et": "1697788800000000000", + "l": 500, + "c1": "" } ' ``` @@ -7016,20 +9738,13 @@ LITE ENDPOINT: lite/v1/withdrawal -x ' { "j": "2.0", - "m": "v1/withdrawal", + "m": "v1/withdrawal_history", "p": { - "fa": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "te": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "c": "USDT", - "nt": "1500.0", - "s": { - "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", - "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", - "v": 28, - "e": "1697788800000000000", - "n": 1234567890 - } + "c": ["USDT", "USDC"], + "st": "1697788800000000000", + "et": "1697788800000000000", + "l": 500, + "c1": "" }, "i": 123 } @@ -7037,87 +9752,52 @@ LITE ENDPOINT: lite/v1/withdrawal ```

-### Withdrawal History +## PreDepositCheck +### Pre Deposit Check ``` -FULL ENDPOINT: full/v1/withdrawal_history -LITE ENDPOINT: lite/v1/withdrawal_history +FULL ENDPOINT: full/v1/pre_deposit_check +LITE ENDPOINT: lite/v1/pre_deposit_check ``` === "Request"
- -8<- "docs/schemas/api_withdrawal_history_request.md" + -8<- "docs/schemas/api_pre_deposit_check_request.md"
!!! question "Query" **Full Request** ``` { .json .copy } { - "currency": ["USDT", "USDC"], - "start_time": "1697788800000000000", - "end_time": "1697788800000000000", - "limit": 500, - "cursor": "" + "currency": "USDT", + "bridge": "XY" } ``` **Lite Request** ``` { .json .copy } { - "c": ["USDT", "USDC"], - "st": "1697788800000000000", - "et": "1697788800000000000", - "l": 500, - "c1": "" + "c": "USDT", + "b": "XY" } ```
=== "Response"
- -8<- "docs/schemas/api_withdrawal_history_response.md" + -8<- "docs/schemas/api_pre_deposit_check_response.md"
!!! success **Full Response** ``` { .json .copy } { - "result": [{ - "tx_id": "1028403", - "from_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "to_eth_address": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "currency": "USDT", - "num_tokens": "1500.0", - "signature": { - "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", - "s": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", - "v": 28, - "expiration": "1697788800000000000", - "nonce": 1234567890 - }, - "event_time": "1697788800000000000" - }], - "next": "Qw0918=" + "max_deposit_limit": "3945034.23", + "currency": "USDT" } ``` **Lite Response** ``` { .json .copy } { - "r": [{ - "ti": "1028403", - "fa": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "te": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "c": "USDT", - "nt": "1500.0", - "s": { - "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", - "s1": "0x3d786193125f7c29c958647da64d0e2875ece2c3f845a591bdd7dae8c475e26d", - "v": 28, - "e": "1697788800000000000", - "n": 1234567890 - }, - "et": "1697788800000000000" - }], - "n": "Qw0918=" + "md": "3945034.23", + "c": "USDT" } ```
@@ -7126,11 +9806,10 @@ LITE ENDPOINT: lite/v1/withdrawal_history !!! 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| + |1007|404|The currency you are requesting for is not currently supported| |1008|401|Your IP has not been whitelisted for access|
@@ -7139,18 +9818,18 @@ LITE ENDPOINT: lite/v1/withdrawal_history ``` { .json .copy } { "request_id":1, - "code":1000, - "message":"You need to authenticate prior to using this functionality", - "status":401 + "code":1002, + "message":"Internal Server Error", + "status":500 } ``` **Lite Error Response** ``` { .json .copy } { "ri":1, - "c":1000, - "m":"You need to authenticate prior to using this functionality", - "s":401 + "c":1002, + "m":"Internal Server Error", + "s":500 } ```
@@ -7160,15 +9839,12 @@ LITE ENDPOINT: lite/v1/withdrawal_history
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.dev.gravitymarkets.io/full/v1/withdrawal_history' \ + curl --location 'https://trades.dev.gravitymarkets.io/full/v1/pre_deposit_check' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "currency": ["USDT", "USDC"], - "start_time": "1697788800000000000", - "end_time": "1697788800000000000", - "limit": 500, - "cursor": "" + "currency": "USDT", + "bridge": "XY" } ' ``` @@ -7180,13 +9856,10 @@ LITE ENDPOINT: lite/v1/withdrawal_history -x ' { "jsonrpc": "2.0", - "method": "v1/withdrawal_history", + "method": "v1/pre_deposit_check", "params": { - "currency": ["USDT", "USDC"], - "start_time": "1697788800000000000", - "end_time": "1697788800000000000", - "limit": 500, - "cursor": "" + "currency": "USDT", + "bridge": "XY" }, "id": 123 } @@ -7196,15 +9869,12 @@ LITE ENDPOINT: lite/v1/withdrawal_history
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.dev.gravitymarkets.io/lite/v1/withdrawal_history' \ + curl --location 'https://trades.dev.gravitymarkets.io/lite/v1/pre_deposit_check' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "c": ["USDT", "USDC"], - "st": "1697788800000000000", - "et": "1697788800000000000", - "l": 500, - "c1": "" + "c": "USDT", + "b": "XY" } ' ``` @@ -7216,13 +9886,10 @@ LITE ENDPOINT: lite/v1/withdrawal_history -x ' { "j": "2.0", - "m": "v1/withdrawal_history", + "m": "v1/pre_deposit_check", "p": { - "c": ["USDT", "USDC"], - "st": "1697788800000000000", - "et": "1697788800000000000", - "l": 500, - "c1": "" + "c": "USDT", + "b": "XY" }, "i": 123 } @@ -7233,15 +9900,12 @@ LITE ENDPOINT: lite/v1/withdrawal_history
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.staging.gravitymarkets.io/full/v1/withdrawal_history' \ + curl --location 'https://trades.staging.gravitymarkets.io/full/v1/pre_deposit_check' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "currency": ["USDT", "USDC"], - "start_time": "1697788800000000000", - "end_time": "1697788800000000000", - "limit": 500, - "cursor": "" + "currency": "USDT", + "bridge": "XY" } ' ``` @@ -7253,13 +9917,10 @@ LITE ENDPOINT: lite/v1/withdrawal_history -x ' { "jsonrpc": "2.0", - "method": "v1/withdrawal_history", + "method": "v1/pre_deposit_check", "params": { - "currency": ["USDT", "USDC"], - "start_time": "1697788800000000000", - "end_time": "1697788800000000000", - "limit": 500, - "cursor": "" + "currency": "USDT", + "bridge": "XY" }, "id": 123 } @@ -7269,15 +9930,12 @@ LITE ENDPOINT: lite/v1/withdrawal_history
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.staging.gravitymarkets.io/lite/v1/withdrawal_history' \ + curl --location 'https://trades.staging.gravitymarkets.io/lite/v1/pre_deposit_check' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "c": ["USDT", "USDC"], - "st": "1697788800000000000", - "et": "1697788800000000000", - "l": 500, - "c1": "" + "c": "USDT", + "b": "XY" } ' ``` @@ -7289,13 +9947,10 @@ LITE ENDPOINT: lite/v1/withdrawal_history -x ' { "j": "2.0", - "m": "v1/withdrawal_history", + "m": "v1/pre_deposit_check", "p": { - "c": ["USDT", "USDC"], - "st": "1697788800000000000", - "et": "1697788800000000000", - "l": 500, - "c1": "" + "c": "USDT", + "b": "XY" }, "i": 123 } @@ -7306,15 +9961,12 @@ LITE ENDPOINT: lite/v1/withdrawal_history
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.testnet.grvt.io/full/v1/withdrawal_history' \ + curl --location 'https://trades.testnet.grvt.io/full/v1/pre_deposit_check' \ --header "Cookie: $GRVT_COOKIE" \ - --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ - --data '{ - "currency": ["USDT", "USDC"], - "start_time": "1697788800000000000", - "end_time": "1697788800000000000", - "limit": 500, - "cursor": "" + --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ + --data '{ + "currency": "USDT", + "bridge": "XY" } ' ``` @@ -7326,13 +9978,10 @@ LITE ENDPOINT: lite/v1/withdrawal_history -x ' { "jsonrpc": "2.0", - "method": "v1/withdrawal_history", + "method": "v1/pre_deposit_check", "params": { - "currency": ["USDT", "USDC"], - "start_time": "1697788800000000000", - "end_time": "1697788800000000000", - "limit": 500, - "cursor": "" + "currency": "USDT", + "bridge": "XY" }, "id": 123 } @@ -7342,15 +9991,12 @@ LITE ENDPOINT: lite/v1/withdrawal_history
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.testnet.grvt.io/lite/v1/withdrawal_history' \ + curl --location 'https://trades.testnet.grvt.io/lite/v1/pre_deposit_check' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "c": ["USDT", "USDC"], - "st": "1697788800000000000", - "et": "1697788800000000000", - "l": 500, - "c1": "" + "c": "USDT", + "b": "XY" } ' ``` @@ -7362,13 +10008,10 @@ LITE ENDPOINT: lite/v1/withdrawal_history -x ' { "j": "2.0", - "m": "v1/withdrawal_history", + "m": "v1/pre_deposit_check", "p": { - "c": ["USDT", "USDC"], - "st": "1697788800000000000", - "et": "1697788800000000000", - "l": 500, - "c1": "" + "c": "USDT", + "b": "XY" }, "i": 123 } @@ -7379,15 +10022,12 @@ LITE ENDPOINT: lite/v1/withdrawal_history
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.grvt.io/full/v1/withdrawal_history' \ + curl --location 'https://trades.grvt.io/full/v1/pre_deposit_check' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "currency": ["USDT", "USDC"], - "start_time": "1697788800000000000", - "end_time": "1697788800000000000", - "limit": 500, - "cursor": "" + "currency": "USDT", + "bridge": "XY" } ' ``` @@ -7399,13 +10039,10 @@ LITE ENDPOINT: lite/v1/withdrawal_history -x ' { "jsonrpc": "2.0", - "method": "v1/withdrawal_history", + "method": "v1/pre_deposit_check", "params": { - "currency": ["USDT", "USDC"], - "start_time": "1697788800000000000", - "end_time": "1697788800000000000", - "limit": 500, - "cursor": "" + "currency": "USDT", + "bridge": "XY" }, "id": 123 } @@ -7415,15 +10052,12 @@ LITE ENDPOINT: lite/v1/withdrawal_history
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.grvt.io/lite/v1/withdrawal_history' \ + curl --location 'https://trades.grvt.io/lite/v1/pre_deposit_check' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "c": ["USDT", "USDC"], - "st": "1697788800000000000", - "et": "1697788800000000000", - "l": 500, - "c1": "" + "c": "USDT", + "b": "XY" } ' ``` @@ -7435,13 +10069,10 @@ LITE ENDPOINT: lite/v1/withdrawal_history -x ' { "j": "2.0", - "m": "v1/withdrawal_history", + "m": "v1/pre_deposit_check", "p": { - "c": ["USDT", "USDC"], - "st": "1697788800000000000", - "et": "1697788800000000000", - "l": 500, - "c1": "" + "c": "USDT", + "b": "XY" }, "i": 123 } @@ -7449,52 +10080,112 @@ LITE ENDPOINT: lite/v1/withdrawal_history ```

-## PreDepositCheck -### Pre Deposit Check +## Account +### Sub Account Summary ``` -FULL ENDPOINT: full/v1/pre_deposit_check -LITE ENDPOINT: lite/v1/pre_deposit_check +FULL ENDPOINT: full/v1/account_summary +LITE ENDPOINT: lite/v1/account_summary ``` === "Request"
- -8<- "docs/schemas/api_pre_deposit_check_request.md" + -8<- "docs/schemas/api_sub_account_summary_request.md"
!!! question "Query" **Full Request** ``` { .json .copy } { - "currency": "USDT", - "bridge": "XY" + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'" } ``` **Lite Request** ``` { .json .copy } { - "c": "USDT", - "b": "XY" + "sa": "'$GRVT_SUB_ACCOUNT_ID'" } ```
=== "Response"
- -8<- "docs/schemas/api_pre_deposit_check_response.md" + -8<- "docs/schemas/api_sub_account_summary_response.md"
!!! success **Full Response** ``` { .json .copy } { - "max_deposit_limit": "3945034.23", - "currency": "USDT" + "result": { + "event_time": "1697788800000000000", + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "margin_type": "SIMPLE_CROSS_MARGIN", + "settle_currency": "USDT", + "unrealized_pnl": "123456.78", + "total_equity": "123456.78", + "initial_margin": "123456.78", + "maintenance_margin": "123456.78", + "available_balance": "123456.78", + "spot_balances": [{ + "currency": "USDT", + "balance": "123456.78", + "index_price": "1.0000102" + }], + "positions": [{ + "event_time": "1697788800000000000", + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "instrument": "BTC_USDT_Perp", + "size": "2635000.50", + "notional": "2635000.50", + "entry_price": "65038.01", + "exit_price": "65038.01", + "mark_price": "65038.01", + "unrealized_pnl": "135000.50", + "realized_pnl": "-35000.30", + "total_pnl": "100000.20", + "roi": "10.20", + "quote_index_price": "1.0000102", + "est_liquidation_price": 60000.25 + }], + "settle_index_price": "1.0000102" + } } ``` **Lite Response** ``` { .json .copy } { - "md": "3945034.23", - "c": "USDT" + "r": { + "et": "1697788800000000000", + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "mt": "SIMPLE_CROSS_MARGIN", + "sc": "USDT", + "up": "123456.78", + "te": "123456.78", + "im": "123456.78", + "mm": "123456.78", + "ab": "123456.78", + "sb": [{ + "c": "USDT", + "b": "123456.78", + "ip": "1.0000102" + }], + "p": [{ + "et": "1697788800000000000", + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "i": "BTC_USDT_Perp", + "s": "2635000.50", + "n": "2635000.50", + "ep": "65038.01", + "ep1": "65038.01", + "mp": "65038.01", + "up": "135000.50", + "rp": "-35000.30", + "tp": "100000.20", + "r": "10.20", + "qi": "1.0000102", + "el": 60000.25 + }], + "si": "1.0000102" + } } ```
@@ -7503,10 +10194,11 @@ LITE ENDPOINT: lite/v1/pre_deposit_check !!! 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| - |1007|404|The currency you are requesting for is not currently supported| |1008|401|Your IP has not been whitelisted for access|
@@ -7515,18 +10207,18 @@ LITE ENDPOINT: lite/v1/pre_deposit_check ``` { .json .copy } { "request_id":1, - "code":1002, - "message":"Internal Server Error", - "status":500 + "code":1000, + "message":"You need to authenticate prior to using this functionality", + "status":401 } ``` **Lite Error Response** ``` { .json .copy } { "ri":1, - "c":1002, - "m":"Internal Server Error", - "s":500 + "c":1000, + "m":"You need to authenticate prior to using this functionality", + "s":401 } ```
@@ -7536,12 +10228,11 @@ LITE ENDPOINT: lite/v1/pre_deposit_check
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.dev.gravitymarkets.io/full/v1/pre_deposit_check' \ + curl --location 'https://trades.dev.gravitymarkets.io/full/v1/account_summary' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "currency": "USDT", - "bridge": "XY" + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'" } ' ``` @@ -7553,10 +10244,9 @@ LITE ENDPOINT: lite/v1/pre_deposit_check -x ' { "jsonrpc": "2.0", - "method": "v1/pre_deposit_check", + "method": "v1/account_summary", "params": { - "currency": "USDT", - "bridge": "XY" + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'" }, "id": 123 } @@ -7566,12 +10256,11 @@ LITE ENDPOINT: lite/v1/pre_deposit_check
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.dev.gravitymarkets.io/lite/v1/pre_deposit_check' \ + curl --location 'https://trades.dev.gravitymarkets.io/lite/v1/account_summary' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "c": "USDT", - "b": "XY" + "sa": "'$GRVT_SUB_ACCOUNT_ID'" } ' ``` @@ -7583,10 +10272,9 @@ LITE ENDPOINT: lite/v1/pre_deposit_check -x ' { "j": "2.0", - "m": "v1/pre_deposit_check", + "m": "v1/account_summary", "p": { - "c": "USDT", - "b": "XY" + "sa": "'$GRVT_SUB_ACCOUNT_ID'" }, "i": 123 } @@ -7597,12 +10285,11 @@ LITE ENDPOINT: lite/v1/pre_deposit_check
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.staging.gravitymarkets.io/full/v1/pre_deposit_check' \ + curl --location 'https://trades.staging.gravitymarkets.io/full/v1/account_summary' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "currency": "USDT", - "bridge": "XY" + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'" } ' ``` @@ -7614,10 +10301,9 @@ LITE ENDPOINT: lite/v1/pre_deposit_check -x ' { "jsonrpc": "2.0", - "method": "v1/pre_deposit_check", + "method": "v1/account_summary", "params": { - "currency": "USDT", - "bridge": "XY" + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'" }, "id": 123 } @@ -7627,12 +10313,11 @@ LITE ENDPOINT: lite/v1/pre_deposit_check
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.staging.gravitymarkets.io/lite/v1/pre_deposit_check' \ + curl --location 'https://trades.staging.gravitymarkets.io/lite/v1/account_summary' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "c": "USDT", - "b": "XY" + "sa": "'$GRVT_SUB_ACCOUNT_ID'" } ' ``` @@ -7644,10 +10329,9 @@ LITE ENDPOINT: lite/v1/pre_deposit_check -x ' { "j": "2.0", - "m": "v1/pre_deposit_check", + "m": "v1/account_summary", "p": { - "c": "USDT", - "b": "XY" + "sa": "'$GRVT_SUB_ACCOUNT_ID'" }, "i": 123 } @@ -7658,12 +10342,11 @@ LITE ENDPOINT: lite/v1/pre_deposit_check
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.testnet.grvt.io/full/v1/pre_deposit_check' \ + curl --location 'https://trades.testnet.grvt.io/full/v1/account_summary' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "currency": "USDT", - "bridge": "XY" + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'" } ' ``` @@ -7675,10 +10358,9 @@ LITE ENDPOINT: lite/v1/pre_deposit_check -x ' { "jsonrpc": "2.0", - "method": "v1/pre_deposit_check", + "method": "v1/account_summary", "params": { - "currency": "USDT", - "bridge": "XY" + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'" }, "id": 123 } @@ -7688,12 +10370,11 @@ LITE ENDPOINT: lite/v1/pre_deposit_check
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.testnet.grvt.io/lite/v1/pre_deposit_check' \ + curl --location 'https://trades.testnet.grvt.io/lite/v1/account_summary' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "c": "USDT", - "b": "XY" + "sa": "'$GRVT_SUB_ACCOUNT_ID'" } ' ``` @@ -7705,10 +10386,9 @@ LITE ENDPOINT: lite/v1/pre_deposit_check -x ' { "j": "2.0", - "m": "v1/pre_deposit_check", + "m": "v1/account_summary", "p": { - "c": "USDT", - "b": "XY" + "sa": "'$GRVT_SUB_ACCOUNT_ID'" }, "i": 123 } @@ -7719,12 +10399,11 @@ LITE ENDPOINT: lite/v1/pre_deposit_check
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.grvt.io/full/v1/pre_deposit_check' \ + curl --location 'https://trades.grvt.io/full/v1/account_summary' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "currency": "USDT", - "bridge": "XY" + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'" } ' ``` @@ -7736,10 +10415,9 @@ LITE ENDPOINT: lite/v1/pre_deposit_check -x ' { "jsonrpc": "2.0", - "method": "v1/pre_deposit_check", + "method": "v1/account_summary", "params": { - "currency": "USDT", - "bridge": "XY" + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'" }, "id": 123 } @@ -7749,12 +10427,11 @@ LITE ENDPOINT: lite/v1/pre_deposit_check
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.grvt.io/lite/v1/pre_deposit_check' \ + curl --location 'https://trades.grvt.io/lite/v1/account_summary' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "c": "USDT", - "b": "XY" + "sa": "'$GRVT_SUB_ACCOUNT_ID'" } ' ``` @@ -7766,10 +10443,9 @@ LITE ENDPOINT: lite/v1/pre_deposit_check -x ' { "j": "2.0", - "m": "v1/pre_deposit_check", + "m": "v1/account_summary", "p": { - "c": "USDT", - "b": "XY" + "sa": "'$GRVT_SUB_ACCOUNT_ID'" }, "i": 123 } @@ -7777,42 +10453,49 @@ LITE ENDPOINT: lite/v1/pre_deposit_check ```

-## Account -### Sub Account Summary +### Sub Account History ``` -FULL ENDPOINT: full/v1/account_summary -LITE ENDPOINT: lite/v1/account_summary +FULL ENDPOINT: full/v1/account_history +LITE ENDPOINT: lite/v1/account_history ``` === "Request"
- -8<- "docs/schemas/api_sub_account_summary_request.md" + -8<- "docs/schemas/api_sub_account_history_request.md"
!!! question "Query" **Full Request** ``` { .json .copy } { - "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'" + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "start_time": "1697788800000000000", + "end_time": "1697788800000000000", + "limit": 500, + "cursor": "" } ``` **Lite Request** ``` { .json .copy } { - "sa": "'$GRVT_SUB_ACCOUNT_ID'" + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "st": "1697788800000000000", + "et": "1697788800000000000", + "l": 500, + "c": "" } ```
=== "Response"
- -8<- "docs/schemas/api_sub_account_summary_response.md" + -8<- "docs/schemas/api_sub_account_history_response.md"
!!! success **Full Response** ``` { .json .copy } { - "result": { + "result": [{ "event_time": "1697788800000000000", "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", "margin_type": "SIMPLE_CROSS_MARGIN", @@ -7844,13 +10527,14 @@ LITE ENDPOINT: lite/v1/account_summary "est_liquidation_price": 60000.25 }], "settle_index_price": "1.0000102" - } + }], + "next": "Qw0918=" } ``` **Lite Response** ``` { .json .copy } { - "r": { + "r": [{ "et": "1697788800000000000", "sa": "'$GRVT_SUB_ACCOUNT_ID'", "mt": "SIMPLE_CROSS_MARGIN", @@ -7882,7 +10566,8 @@ LITE ENDPOINT: lite/v1/account_summary "el": 60000.25 }], "si": "1.0000102" - } + }], + "n": "Qw0918=" } ```
@@ -7925,11 +10610,15 @@ LITE ENDPOINT: lite/v1/account_summary
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.dev.gravitymarkets.io/full/v1/account_summary' \ + curl --location 'https://trades.dev.gravitymarkets.io/full/v1/account_history' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'" + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "start_time": "1697788800000000000", + "end_time": "1697788800000000000", + "limit": 500, + "cursor": "" } ' ``` @@ -7941,9 +10630,13 @@ LITE ENDPOINT: lite/v1/account_summary -x ' { "jsonrpc": "2.0", - "method": "v1/account_summary", + "method": "v1/account_history", "params": { - "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'" + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "start_time": "1697788800000000000", + "end_time": "1697788800000000000", + "limit": 500, + "cursor": "" }, "id": 123 } @@ -7953,11 +10646,15 @@ LITE ENDPOINT: lite/v1/account_summary
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.dev.gravitymarkets.io/lite/v1/account_summary' \ + curl --location 'https://trades.dev.gravitymarkets.io/lite/v1/account_history' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "sa": "'$GRVT_SUB_ACCOUNT_ID'" + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "st": "1697788800000000000", + "et": "1697788800000000000", + "l": 500, + "c": "" } ' ``` @@ -7969,9 +10666,13 @@ LITE ENDPOINT: lite/v1/account_summary -x ' { "j": "2.0", - "m": "v1/account_summary", + "m": "v1/account_history", "p": { - "sa": "'$GRVT_SUB_ACCOUNT_ID'" + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "st": "1697788800000000000", + "et": "1697788800000000000", + "l": 500, + "c": "" }, "i": 123 } @@ -7982,11 +10683,15 @@ LITE ENDPOINT: lite/v1/account_summary
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.staging.gravitymarkets.io/full/v1/account_summary' \ + curl --location 'https://trades.staging.gravitymarkets.io/full/v1/account_history' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'" + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "start_time": "1697788800000000000", + "end_time": "1697788800000000000", + "limit": 500, + "cursor": "" } ' ``` @@ -7998,9 +10703,13 @@ LITE ENDPOINT: lite/v1/account_summary -x ' { "jsonrpc": "2.0", - "method": "v1/account_summary", + "method": "v1/account_history", "params": { - "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'" + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "start_time": "1697788800000000000", + "end_time": "1697788800000000000", + "limit": 500, + "cursor": "" }, "id": 123 } @@ -8010,11 +10719,15 @@ LITE ENDPOINT: lite/v1/account_summary
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.staging.gravitymarkets.io/lite/v1/account_summary' \ + curl --location 'https://trades.staging.gravitymarkets.io/lite/v1/account_history' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "sa": "'$GRVT_SUB_ACCOUNT_ID'" + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "st": "1697788800000000000", + "et": "1697788800000000000", + "l": 500, + "c": "" } ' ``` @@ -8026,9 +10739,13 @@ LITE ENDPOINT: lite/v1/account_summary -x ' { "j": "2.0", - "m": "v1/account_summary", + "m": "v1/account_history", "p": { - "sa": "'$GRVT_SUB_ACCOUNT_ID'" + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "st": "1697788800000000000", + "et": "1697788800000000000", + "l": 500, + "c": "" }, "i": 123 } @@ -8039,11 +10756,15 @@ LITE ENDPOINT: lite/v1/account_summary
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.testnet.grvt.io/full/v1/account_summary' \ + curl --location 'https://trades.testnet.grvt.io/full/v1/account_history' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'" + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "start_time": "1697788800000000000", + "end_time": "1697788800000000000", + "limit": 500, + "cursor": "" } ' ``` @@ -8055,9 +10776,13 @@ LITE ENDPOINT: lite/v1/account_summary -x ' { "jsonrpc": "2.0", - "method": "v1/account_summary", + "method": "v1/account_history", "params": { - "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'" + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "start_time": "1697788800000000000", + "end_time": "1697788800000000000", + "limit": 500, + "cursor": "" }, "id": 123 } @@ -8067,11 +10792,15 @@ LITE ENDPOINT: lite/v1/account_summary
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.testnet.grvt.io/lite/v1/account_summary' \ + curl --location 'https://trades.testnet.grvt.io/lite/v1/account_history' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "sa": "'$GRVT_SUB_ACCOUNT_ID'" + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "st": "1697788800000000000", + "et": "1697788800000000000", + "l": 500, + "c": "" } ' ``` @@ -8083,9 +10812,13 @@ LITE ENDPOINT: lite/v1/account_summary -x ' { "j": "2.0", - "m": "v1/account_summary", + "m": "v1/account_history", "p": { - "sa": "'$GRVT_SUB_ACCOUNT_ID'" + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "st": "1697788800000000000", + "et": "1697788800000000000", + "l": 500, + "c": "" }, "i": 123 } @@ -8096,11 +10829,15 @@ LITE ENDPOINT: lite/v1/account_summary
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.grvt.io/full/v1/account_summary' \ + curl --location 'https://trades.grvt.io/full/v1/account_history' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'" + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "start_time": "1697788800000000000", + "end_time": "1697788800000000000", + "limit": 500, + "cursor": "" } ' ``` @@ -8112,9 +10849,13 @@ LITE ENDPOINT: lite/v1/account_summary -x ' { "jsonrpc": "2.0", - "method": "v1/account_summary", + "method": "v1/account_history", "params": { - "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'" + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "start_time": "1697788800000000000", + "end_time": "1697788800000000000", + "limit": 500, + "cursor": "" }, "id": 123 } @@ -8124,11 +10865,15 @@ LITE ENDPOINT: lite/v1/account_summary
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.grvt.io/lite/v1/account_summary' \ + curl --location 'https://trades.grvt.io/lite/v1/account_history' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "sa": "'$GRVT_SUB_ACCOUNT_ID'" + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "st": "1697788800000000000", + "et": "1697788800000000000", + "l": 500, + "c": "" } ' ``` @@ -8140,9 +10885,13 @@ LITE ENDPOINT: lite/v1/account_summary -x ' { "j": "2.0", - "m": "v1/account_summary", + "m": "v1/account_history", "p": { - "sa": "'$GRVT_SUB_ACCOUNT_ID'" + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "st": "1697788800000000000", + "et": "1697788800000000000", + "l": 500, + "c": "" }, "i": 123 } @@ -8150,121 +10899,61 @@ LITE ENDPOINT: lite/v1/account_summary ```

-### Sub Account History +### Aggregated Account Summary ``` -FULL ENDPOINT: full/v1/account_history -LITE ENDPOINT: lite/v1/account_history +FULL ENDPOINT: full/v1/aggregated_account_summary +LITE ENDPOINT: lite/v1/aggregated_account_summary ``` === "Request"
- -8<- "docs/schemas/api_sub_account_history_request.md" + -8<- "docs/schemas/empty_request.md"
!!! question "Query" **Full Request** ``` { .json .copy } { - "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "start_time": "1697788800000000000", - "end_time": "1697788800000000000", - "limit": 500, - "cursor": "" } ``` **Lite Request** ``` { .json .copy } { - "sa": "'$GRVT_SUB_ACCOUNT_ID'", - "st": "1697788800000000000", - "et": "1697788800000000000", - "l": 500, - "c": "" } ```
=== "Response"
- -8<- "docs/schemas/api_sub_account_history_response.md" + -8<- "docs/schemas/api_aggregated_account_summary_response.md"
!!! success **Full Response** ``` { .json .copy } { - "result": [{ - "event_time": "1697788800000000000", - "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "margin_type": "SIMPLE_CROSS_MARGIN", - "settle_currency": "USDT", - "unrealized_pnl": "123456.78", - "total_equity": "123456.78", - "initial_margin": "123456.78", - "maintenance_margin": "123456.78", - "available_balance": "123456.78", + "result": { + "main_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "total_equity": "3945034.23", "spot_balances": [{ "currency": "USDT", "balance": "123456.78", "index_price": "1.0000102" - }], - "positions": [{ - "event_time": "1697788800000000000", - "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "instrument": "BTC_USDT_Perp", - "size": "2635000.50", - "notional": "2635000.50", - "entry_price": "65038.01", - "exit_price": "65038.01", - "mark_price": "65038.01", - "unrealized_pnl": "135000.50", - "realized_pnl": "-35000.30", - "total_pnl": "100000.20", - "roi": "10.20", - "quote_index_price": "1.0000102", - "est_liquidation_price": 60000.25 - }], - "settle_index_price": "1.0000102" - }], - "next": "Qw0918=" + }] + } } ``` **Lite Response** ``` { .json .copy } { - "r": [{ - "et": "1697788800000000000", - "sa": "'$GRVT_SUB_ACCOUNT_ID'", - "mt": "SIMPLE_CROSS_MARGIN", - "sc": "USDT", - "up": "123456.78", - "te": "123456.78", - "im": "123456.78", - "mm": "123456.78", - "ab": "123456.78", + "r": { + "ma": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "te": "3945034.23", "sb": [{ "c": "USDT", "b": "123456.78", "ip": "1.0000102" - }], - "p": [{ - "et": "1697788800000000000", - "sa": "'$GRVT_SUB_ACCOUNT_ID'", - "i": "BTC_USDT_Perp", - "s": "2635000.50", - "n": "2635000.50", - "ep": "65038.01", - "ep1": "65038.01", - "mp": "65038.01", - "up": "135000.50", - "rp": "-35000.30", - "tp": "100000.20", - "r": "10.20", - "qi": "1.0000102", - "el": 60000.25 - }], - "si": "1.0000102" - }], - "n": "Qw0918=" + }] + } } ```
@@ -8273,8 +10962,6 @@ LITE ENDPOINT: lite/v1/account_history !!! 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| @@ -8286,18 +10973,18 @@ LITE ENDPOINT: lite/v1/account_history ``` { .json .copy } { "request_id":1, - "code":1000, - "message":"You need to authenticate prior to using this functionality", - "status":401 + "code":1002, + "message":"Internal Server Error", + "status":500 } ``` **Lite Error Response** ``` { .json .copy } { "ri":1, - "c":1000, - "m":"You need to authenticate prior to using this functionality", - "s":401 + "c":1002, + "m":"Internal Server Error", + "s":500 } ```
@@ -8307,15 +10994,10 @@ LITE ENDPOINT: lite/v1/account_history
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.dev.gravitymarkets.io/full/v1/account_history' \ + curl --location 'https://trades.dev.gravitymarkets.io/full/v1/aggregated_account_summary' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "start_time": "1697788800000000000", - "end_time": "1697788800000000000", - "limit": 500, - "cursor": "" } ' ``` @@ -8327,13 +11009,8 @@ LITE ENDPOINT: lite/v1/account_history -x ' { "jsonrpc": "2.0", - "method": "v1/account_history", + "method": "v1/aggregated_account_summary", "params": { - "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "start_time": "1697788800000000000", - "end_time": "1697788800000000000", - "limit": 500, - "cursor": "" }, "id": 123 } @@ -8343,15 +11020,10 @@ LITE ENDPOINT: lite/v1/account_history
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.dev.gravitymarkets.io/lite/v1/account_history' \ + curl --location 'https://trades.dev.gravitymarkets.io/lite/v1/aggregated_account_summary' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "sa": "'$GRVT_SUB_ACCOUNT_ID'", - "st": "1697788800000000000", - "et": "1697788800000000000", - "l": 500, - "c": "" } ' ``` @@ -8363,13 +11035,8 @@ LITE ENDPOINT: lite/v1/account_history -x ' { "j": "2.0", - "m": "v1/account_history", + "m": "v1/aggregated_account_summary", "p": { - "sa": "'$GRVT_SUB_ACCOUNT_ID'", - "st": "1697788800000000000", - "et": "1697788800000000000", - "l": 500, - "c": "" }, "i": 123 } @@ -8380,15 +11047,10 @@ LITE ENDPOINT: lite/v1/account_history
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.staging.gravitymarkets.io/full/v1/account_history' \ + curl --location 'https://trades.staging.gravitymarkets.io/full/v1/aggregated_account_summary' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "start_time": "1697788800000000000", - "end_time": "1697788800000000000", - "limit": 500, - "cursor": "" } ' ``` @@ -8400,13 +11062,8 @@ LITE ENDPOINT: lite/v1/account_history -x ' { "jsonrpc": "2.0", - "method": "v1/account_history", + "method": "v1/aggregated_account_summary", "params": { - "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "start_time": "1697788800000000000", - "end_time": "1697788800000000000", - "limit": 500, - "cursor": "" }, "id": 123 } @@ -8416,15 +11073,10 @@ LITE ENDPOINT: lite/v1/account_history
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.staging.gravitymarkets.io/lite/v1/account_history' \ + curl --location 'https://trades.staging.gravitymarkets.io/lite/v1/aggregated_account_summary' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "sa": "'$GRVT_SUB_ACCOUNT_ID'", - "st": "1697788800000000000", - "et": "1697788800000000000", - "l": 500, - "c": "" } ' ``` @@ -8436,13 +11088,8 @@ LITE ENDPOINT: lite/v1/account_history -x ' { "j": "2.0", - "m": "v1/account_history", + "m": "v1/aggregated_account_summary", "p": { - "sa": "'$GRVT_SUB_ACCOUNT_ID'", - "st": "1697788800000000000", - "et": "1697788800000000000", - "l": 500, - "c": "" }, "i": 123 } @@ -8453,15 +11100,10 @@ LITE ENDPOINT: lite/v1/account_history
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.testnet.grvt.io/full/v1/account_history' \ + curl --location 'https://trades.testnet.grvt.io/full/v1/aggregated_account_summary' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "start_time": "1697788800000000000", - "end_time": "1697788800000000000", - "limit": 500, - "cursor": "" } ' ``` @@ -8473,13 +11115,8 @@ LITE ENDPOINT: lite/v1/account_history -x ' { "jsonrpc": "2.0", - "method": "v1/account_history", + "method": "v1/aggregated_account_summary", "params": { - "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "start_time": "1697788800000000000", - "end_time": "1697788800000000000", - "limit": 500, - "cursor": "" }, "id": 123 } @@ -8489,15 +11126,10 @@ LITE ENDPOINT: lite/v1/account_history
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.testnet.grvt.io/lite/v1/account_history' \ + curl --location 'https://trades.testnet.grvt.io/lite/v1/aggregated_account_summary' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "sa": "'$GRVT_SUB_ACCOUNT_ID'", - "st": "1697788800000000000", - "et": "1697788800000000000", - "l": 500, - "c": "" } ' ``` @@ -8509,13 +11141,8 @@ LITE ENDPOINT: lite/v1/account_history -x ' { "j": "2.0", - "m": "v1/account_history", + "m": "v1/aggregated_account_summary", "p": { - "sa": "'$GRVT_SUB_ACCOUNT_ID'", - "st": "1697788800000000000", - "et": "1697788800000000000", - "l": 500, - "c": "" }, "i": 123 } @@ -8526,15 +11153,10 @@ LITE ENDPOINT: lite/v1/account_history
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.grvt.io/full/v1/account_history' \ + curl --location 'https://trades.grvt.io/full/v1/aggregated_account_summary' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "start_time": "1697788800000000000", - "end_time": "1697788800000000000", - "limit": 500, - "cursor": "" } ' ``` @@ -8546,13 +11168,8 @@ LITE ENDPOINT: lite/v1/account_history -x ' { "jsonrpc": "2.0", - "method": "v1/account_history", + "method": "v1/aggregated_account_summary", "params": { - "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "start_time": "1697788800000000000", - "end_time": "1697788800000000000", - "limit": 500, - "cursor": "" }, "id": 123 } @@ -8562,15 +11179,10 @@ LITE ENDPOINT: lite/v1/account_history
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.grvt.io/lite/v1/account_history' \ + curl --location 'https://trades.grvt.io/lite/v1/aggregated_account_summary' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "sa": "'$GRVT_SUB_ACCOUNT_ID'", - "st": "1697788800000000000", - "et": "1697788800000000000", - "l": 500, - "c": "" } ' ``` @@ -8582,13 +11194,8 @@ LITE ENDPOINT: lite/v1/account_history -x ' { "j": "2.0", - "m": "v1/account_history", + "m": "v1/aggregated_account_summary", "p": { - "sa": "'$GRVT_SUB_ACCOUNT_ID'", - "st": "1697788800000000000", - "et": "1697788800000000000", - "l": 500, - "c": "" }, "i": 123 } @@ -8596,10 +11203,10 @@ LITE ENDPOINT: lite/v1/account_history ```

-### Aggregated Account Summary +### Funding Account Summary ``` -FULL ENDPOINT: full/v1/aggregated_account_summary -LITE ENDPOINT: lite/v1/aggregated_account_summary +FULL ENDPOINT: full/v1/funding_account_summary +LITE ENDPOINT: lite/v1/funding_account_summary ``` === "Request" @@ -8621,7 +11228,7 @@ LITE ENDPOINT: lite/v1/aggregated_account_summary
=== "Response"
- -8<- "docs/schemas/api_aggregated_account_summary_response.md" + -8<- "docs/schemas/api_funding_account_summary_response.md"
!!! success @@ -8691,7 +11298,7 @@ LITE ENDPOINT: lite/v1/aggregated_account_summary
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.dev.gravitymarkets.io/full/v1/aggregated_account_summary' \ + curl --location 'https://trades.dev.gravitymarkets.io/full/v1/funding_account_summary' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ @@ -8706,7 +11313,7 @@ LITE ENDPOINT: lite/v1/aggregated_account_summary -x ' { "jsonrpc": "2.0", - "method": "v1/aggregated_account_summary", + "method": "v1/funding_account_summary", "params": { }, "id": 123 @@ -8717,7 +11324,7 @@ LITE ENDPOINT: lite/v1/aggregated_account_summary
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.dev.gravitymarkets.io/lite/v1/aggregated_account_summary' \ + curl --location 'https://trades.dev.gravitymarkets.io/lite/v1/funding_account_summary' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ @@ -8732,7 +11339,7 @@ LITE ENDPOINT: lite/v1/aggregated_account_summary -x ' { "j": "2.0", - "m": "v1/aggregated_account_summary", + "m": "v1/funding_account_summary", "p": { }, "i": 123 @@ -8744,7 +11351,7 @@ LITE ENDPOINT: lite/v1/aggregated_account_summary
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.staging.gravitymarkets.io/full/v1/aggregated_account_summary' \ + curl --location 'https://trades.staging.gravitymarkets.io/full/v1/funding_account_summary' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ @@ -8759,7 +11366,7 @@ LITE ENDPOINT: lite/v1/aggregated_account_summary -x ' { "jsonrpc": "2.0", - "method": "v1/aggregated_account_summary", + "method": "v1/funding_account_summary", "params": { }, "id": 123 @@ -8770,7 +11377,7 @@ LITE ENDPOINT: lite/v1/aggregated_account_summary
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.staging.gravitymarkets.io/lite/v1/aggregated_account_summary' \ + curl --location 'https://trades.staging.gravitymarkets.io/lite/v1/funding_account_summary' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ @@ -8785,7 +11392,7 @@ LITE ENDPOINT: lite/v1/aggregated_account_summary -x ' { "j": "2.0", - "m": "v1/aggregated_account_summary", + "m": "v1/funding_account_summary", "p": { }, "i": 123 @@ -8797,7 +11404,7 @@ LITE ENDPOINT: lite/v1/aggregated_account_summary
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.testnet.grvt.io/full/v1/aggregated_account_summary' \ + curl --location 'https://trades.testnet.grvt.io/full/v1/funding_account_summary' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ @@ -8812,7 +11419,7 @@ LITE ENDPOINT: lite/v1/aggregated_account_summary -x ' { "jsonrpc": "2.0", - "method": "v1/aggregated_account_summary", + "method": "v1/funding_account_summary", "params": { }, "id": 123 @@ -8823,7 +11430,7 @@ LITE ENDPOINT: lite/v1/aggregated_account_summary
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.testnet.grvt.io/lite/v1/aggregated_account_summary' \ + curl --location 'https://trades.testnet.grvt.io/lite/v1/funding_account_summary' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ @@ -8838,7 +11445,7 @@ LITE ENDPOINT: lite/v1/aggregated_account_summary -x ' { "j": "2.0", - "m": "v1/aggregated_account_summary", + "m": "v1/funding_account_summary", "p": { }, "i": 123 @@ -8850,7 +11457,7 @@ LITE ENDPOINT: lite/v1/aggregated_account_summary
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.grvt.io/full/v1/aggregated_account_summary' \ + curl --location 'https://trades.grvt.io/full/v1/funding_account_summary' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ @@ -8865,7 +11472,7 @@ LITE ENDPOINT: lite/v1/aggregated_account_summary -x ' { "jsonrpc": "2.0", - "method": "v1/aggregated_account_summary", + "method": "v1/funding_account_summary", "params": { }, "id": 123 @@ -8876,7 +11483,7 @@ LITE ENDPOINT: lite/v1/aggregated_account_summary
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.grvt.io/lite/v1/aggregated_account_summary' \ + curl --location 'https://trades.grvt.io/lite/v1/funding_account_summary' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ @@ -8891,7 +11498,7 @@ LITE ENDPOINT: lite/v1/aggregated_account_summary -x ' { "j": "2.0", - "m": "v1/aggregated_account_summary", + "m": "v1/funding_account_summary", "p": { }, "i": 123 @@ -8900,10 +11507,11 @@ LITE ENDPOINT: lite/v1/aggregated_account_summary ```

-### Funding Account Summary +## SocializedLoss +### Socialized Loss Status ``` -FULL ENDPOINT: full/v1/funding_account_summary -LITE ENDPOINT: lite/v1/funding_account_summary +FULL ENDPOINT: full/v1/socialized_loss_status +LITE ENDPOINT: lite/v1/socialized_loss_status ``` === "Request" @@ -8925,36 +11533,22 @@ LITE ENDPOINT: lite/v1/funding_account_summary
=== "Response"
- -8<- "docs/schemas/api_funding_account_summary_response.md" + -8<- "docs/schemas/api_socialized_loss_status_response.md"
!!! success **Full Response** ``` { .json .copy } { - "result": { - "main_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "total_equity": "3945034.23", - "spot_balances": [{ - "currency": "USDT", - "balance": "123456.78", - "index_price": "1.0000102" - }] - } + "is_active": "false", + "haircut_ratio": "0.34" } ``` **Lite Response** ``` { .json .copy } { - "r": { - "ma": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "te": "3945034.23", - "sb": [{ - "c": "USDT", - "b": "123456.78", - "ip": "1.0000102" - }] - } + "ia": "false", + "hr": "0.34" } ```
@@ -8995,7 +11589,7 @@ LITE ENDPOINT: lite/v1/funding_account_summary
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.dev.gravitymarkets.io/full/v1/funding_account_summary' \ + curl --location 'https://trades.dev.gravitymarkets.io/full/v1/socialized_loss_status' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ @@ -9010,7 +11604,7 @@ LITE ENDPOINT: lite/v1/funding_account_summary -x ' { "jsonrpc": "2.0", - "method": "v1/funding_account_summary", + "method": "v1/socialized_loss_status", "params": { }, "id": 123 @@ -9021,7 +11615,7 @@ LITE ENDPOINT: lite/v1/funding_account_summary
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.dev.gravitymarkets.io/lite/v1/funding_account_summary' \ + curl --location 'https://trades.dev.gravitymarkets.io/lite/v1/socialized_loss_status' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ @@ -9036,7 +11630,7 @@ LITE ENDPOINT: lite/v1/funding_account_summary -x ' { "j": "2.0", - "m": "v1/funding_account_summary", + "m": "v1/socialized_loss_status", "p": { }, "i": 123 @@ -9048,7 +11642,7 @@ LITE ENDPOINT: lite/v1/funding_account_summary
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.staging.gravitymarkets.io/full/v1/funding_account_summary' \ + curl --location 'https://trades.staging.gravitymarkets.io/full/v1/socialized_loss_status' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ @@ -9063,7 +11657,7 @@ LITE ENDPOINT: lite/v1/funding_account_summary -x ' { "jsonrpc": "2.0", - "method": "v1/funding_account_summary", + "method": "v1/socialized_loss_status", "params": { }, "id": 123 @@ -9074,7 +11668,7 @@ LITE ENDPOINT: lite/v1/funding_account_summary
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.staging.gravitymarkets.io/lite/v1/funding_account_summary' \ + curl --location 'https://trades.staging.gravitymarkets.io/lite/v1/socialized_loss_status' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ @@ -9089,7 +11683,7 @@ LITE ENDPOINT: lite/v1/funding_account_summary -x ' { "j": "2.0", - "m": "v1/funding_account_summary", + "m": "v1/socialized_loss_status", "p": { }, "i": 123 @@ -9101,7 +11695,7 @@ LITE ENDPOINT: lite/v1/funding_account_summary
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.testnet.grvt.io/full/v1/funding_account_summary' \ + curl --location 'https://trades.testnet.grvt.io/full/v1/socialized_loss_status' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ @@ -9116,7 +11710,7 @@ LITE ENDPOINT: lite/v1/funding_account_summary -x ' { "jsonrpc": "2.0", - "method": "v1/funding_account_summary", + "method": "v1/socialized_loss_status", "params": { }, "id": 123 @@ -9127,7 +11721,7 @@ LITE ENDPOINT: lite/v1/funding_account_summary
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.testnet.grvt.io/lite/v1/funding_account_summary' \ + curl --location 'https://trades.testnet.grvt.io/lite/v1/socialized_loss_status' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ @@ -9142,7 +11736,7 @@ LITE ENDPOINT: lite/v1/funding_account_summary -x ' { "j": "2.0", - "m": "v1/funding_account_summary", + "m": "v1/socialized_loss_status", "p": { }, "i": 123 @@ -9154,7 +11748,7 @@ LITE ENDPOINT: lite/v1/funding_account_summary
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.grvt.io/full/v1/funding_account_summary' \ + curl --location 'https://trades.grvt.io/full/v1/socialized_loss_status' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ @@ -9169,7 +11763,7 @@ LITE ENDPOINT: lite/v1/funding_account_summary -x ' { "jsonrpc": "2.0", - "method": "v1/funding_account_summary", + "method": "v1/socialized_loss_status", "params": { }, "id": 123 @@ -9180,7 +11774,7 @@ LITE ENDPOINT: lite/v1/funding_account_summary
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.grvt.io/lite/v1/funding_account_summary' \ + curl --location 'https://trades.grvt.io/lite/v1/socialized_loss_status' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ @@ -9195,7 +11789,7 @@ LITE ENDPOINT: lite/v1/funding_account_summary -x ' { "j": "2.0", - "m": "v1/funding_account_summary", + "m": "v1/socialized_loss_status", "p": { }, "i": 123 @@ -9204,48 +11798,58 @@ LITE ENDPOINT: lite/v1/funding_account_summary ```

-## SocializedLoss -### Socialized Loss Status +## InitialLeverage +### Get All Initial Leverage ``` -FULL ENDPOINT: full/v1/socialized_loss_status -LITE ENDPOINT: lite/v1/socialized_loss_status +FULL ENDPOINT: full/v1/get_all_initial_leverage +LITE ENDPOINT: lite/v1/get_all_initial_leverage ``` === "Request"
- -8<- "docs/schemas/empty_request.md" + -8<- "docs/schemas/api_get_all_initial_leverage_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_socialized_loss_status_response.md" + -8<- "docs/schemas/api_get_all_initial_leverage_response.md"
!!! success **Full Response** ``` { .json .copy } { - "is_active": "false", - "haircut_ratio": "0.34" + "results": [{ + "instrument": "BTC_USDT_Perp", + "leverage": "10", + "min_leverage": "10", + "max_leverage": "50" + }] } ``` **Lite Response** ``` { .json .copy } { - "ia": "false", - "hr": "0.34" + "r": [{ + "i": "BTC_USDT_Perp", + "l": "10", + "ml": "10", + "ml1": "50" + }] } ```
@@ -9254,10 +11858,12 @@ LITE ENDPOINT: lite/v1/socialized_loss_status !!! 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|
!!! failure @@ -9265,18 +11871,18 @@ LITE ENDPOINT: lite/v1/socialized_loss_status ``` { .json .copy } { "request_id":1, - "code":1002, - "message":"Internal Server Error", - "status":500 + "code":1000, + "message":"You need to authenticate prior to using this functionality", + "status":401 } ``` **Lite Error Response** ``` { .json .copy } { "ri":1, - "c":1002, - "m":"Internal Server Error", - "s":500 + "c":1000, + "m":"You need to authenticate prior to using this functionality", + "s":401 } ```
@@ -9286,10 +11892,11 @@ LITE ENDPOINT: lite/v1/socialized_loss_status
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.dev.gravitymarkets.io/full/v1/socialized_loss_status' \ + curl --location 'https://trades.dev.gravitymarkets.io/full/v1/get_all_initial_leverage' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'" } ' ``` @@ -9301,8 +11908,9 @@ LITE ENDPOINT: lite/v1/socialized_loss_status -x ' { "jsonrpc": "2.0", - "method": "v1/socialized_loss_status", + "method": "v1/get_all_initial_leverage", "params": { + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'" }, "id": 123 } @@ -9312,10 +11920,11 @@ LITE ENDPOINT: lite/v1/socialized_loss_status
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.dev.gravitymarkets.io/lite/v1/socialized_loss_status' \ + curl --location 'https://trades.dev.gravitymarkets.io/lite/v1/get_all_initial_leverage' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ + "sa": "'$GRVT_SUB_ACCOUNT_ID'" } ' ``` @@ -9327,8 +11936,9 @@ LITE ENDPOINT: lite/v1/socialized_loss_status -x ' { "j": "2.0", - "m": "v1/socialized_loss_status", + "m": "v1/get_all_initial_leverage", "p": { + "sa": "'$GRVT_SUB_ACCOUNT_ID'" }, "i": 123 } @@ -9339,10 +11949,11 @@ LITE ENDPOINT: lite/v1/socialized_loss_status
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.staging.gravitymarkets.io/full/v1/socialized_loss_status' \ + curl --location 'https://trades.staging.gravitymarkets.io/full/v1/get_all_initial_leverage' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'" } ' ``` @@ -9354,8 +11965,9 @@ LITE ENDPOINT: lite/v1/socialized_loss_status -x ' { "jsonrpc": "2.0", - "method": "v1/socialized_loss_status", + "method": "v1/get_all_initial_leverage", "params": { + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'" }, "id": 123 } @@ -9365,10 +11977,11 @@ LITE ENDPOINT: lite/v1/socialized_loss_status
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.staging.gravitymarkets.io/lite/v1/socialized_loss_status' \ + curl --location 'https://trades.staging.gravitymarkets.io/lite/v1/get_all_initial_leverage' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ + "sa": "'$GRVT_SUB_ACCOUNT_ID'" } ' ``` @@ -9380,8 +11993,9 @@ LITE ENDPOINT: lite/v1/socialized_loss_status -x ' { "j": "2.0", - "m": "v1/socialized_loss_status", + "m": "v1/get_all_initial_leverage", "p": { + "sa": "'$GRVT_SUB_ACCOUNT_ID'" }, "i": 123 } @@ -9392,10 +12006,11 @@ LITE ENDPOINT: lite/v1/socialized_loss_status
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.testnet.grvt.io/full/v1/socialized_loss_status' \ + curl --location 'https://trades.testnet.grvt.io/full/v1/get_all_initial_leverage' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'" } ' ``` @@ -9407,8 +12022,9 @@ LITE ENDPOINT: lite/v1/socialized_loss_status -x ' { "jsonrpc": "2.0", - "method": "v1/socialized_loss_status", + "method": "v1/get_all_initial_leverage", "params": { + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'" }, "id": 123 } @@ -9418,10 +12034,11 @@ LITE ENDPOINT: lite/v1/socialized_loss_status
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.testnet.grvt.io/lite/v1/socialized_loss_status' \ + curl --location 'https://trades.testnet.grvt.io/lite/v1/get_all_initial_leverage' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ + "sa": "'$GRVT_SUB_ACCOUNT_ID'" } ' ``` @@ -9433,8 +12050,9 @@ LITE ENDPOINT: lite/v1/socialized_loss_status -x ' { "j": "2.0", - "m": "v1/socialized_loss_status", + "m": "v1/get_all_initial_leverage", "p": { + "sa": "'$GRVT_SUB_ACCOUNT_ID'" }, "i": 123 } @@ -9445,10 +12063,11 @@ LITE ENDPOINT: lite/v1/socialized_loss_status
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.grvt.io/full/v1/socialized_loss_status' \ + curl --location 'https://trades.grvt.io/full/v1/get_all_initial_leverage' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'" } ' ``` @@ -9460,8 +12079,9 @@ LITE ENDPOINT: lite/v1/socialized_loss_status -x ' { "jsonrpc": "2.0", - "method": "v1/socialized_loss_status", + "method": "v1/get_all_initial_leverage", "params": { + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'" }, "id": 123 } @@ -9471,10 +12091,11 @@ LITE ENDPOINT: lite/v1/socialized_loss_status
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.grvt.io/lite/v1/socialized_loss_status' \ + curl --location 'https://trades.grvt.io/lite/v1/get_all_initial_leverage' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ + "sa": "'$GRVT_SUB_ACCOUNT_ID'" } ' ``` @@ -9486,8 +12107,9 @@ LITE ENDPOINT: lite/v1/socialized_loss_status -x ' { "j": "2.0", - "m": "v1/socialized_loss_status", + "m": "v1/get_all_initial_leverage", "p": { + "sa": "'$GRVT_SUB_ACCOUNT_ID'" }, "i": 123 } @@ -9495,58 +12117,51 @@ LITE ENDPOINT: lite/v1/socialized_loss_status ```

-## InitialLeverage -### Get All Initial Leverage +### Set Initial Leverage ``` -FULL ENDPOINT: full/v1/get_all_initial_leverage -LITE ENDPOINT: lite/v1/get_all_initial_leverage +FULL ENDPOINT: full/v1/set_initial_leverage +LITE ENDPOINT: lite/v1/set_initial_leverage ``` === "Request"
- -8<- "docs/schemas/api_get_all_initial_leverage_request.md" + -8<- "docs/schemas/api_set_initial_leverage_request.md"
!!! question "Query" **Full Request** ``` { .json .copy } { - "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'" + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "instrument": "BTC_USDT_Perp", + "leverage": "10" } ``` **Lite Request** ``` { .json .copy } { - "sa": "'$GRVT_SUB_ACCOUNT_ID'" + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "i": "BTC_USDT_Perp", + "l": "10" } ```
=== "Response"
- -8<- "docs/schemas/api_get_all_initial_leverage_response.md" + -8<- "docs/schemas/api_set_initial_leverage_response.md"
!!! success **Full Response** ``` { .json .copy } { - "results": [{ - "instrument": "BTC_USDT_Perp", - "leverage": "10", - "min_leverage": "10", - "max_leverage": "50" - }] + "success": "true" } ``` **Lite Response** ``` { .json .copy } { - "r": [{ - "i": "BTC_USDT_Perp", - "l": "10", - "ml": "10", - "ml1": "50" - }] + "s": "true" } ```
@@ -9561,6 +12176,7 @@ LITE ENDPOINT: lite/v1/get_all_initial_leverage |1003|400|Request could not be processed due to malformed syntax| |1006|429|You have surpassed the allocated rate limit for your tier| |1004|404|Data Not Found| + |2100|400|Invalid initial leverage|
!!! failure @@ -9589,11 +12205,13 @@ LITE ENDPOINT: lite/v1/get_all_initial_leverage
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.dev.gravitymarkets.io/full/v1/get_all_initial_leverage' \ + curl --location 'https://trades.dev.gravitymarkets.io/full/v1/set_initial_leverage' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'" + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "instrument": "BTC_USDT_Perp", + "leverage": "10" } ' ``` @@ -9605,9 +12223,11 @@ LITE ENDPOINT: lite/v1/get_all_initial_leverage -x ' { "jsonrpc": "2.0", - "method": "v1/get_all_initial_leverage", + "method": "v1/set_initial_leverage", "params": { - "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'" + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "instrument": "BTC_USDT_Perp", + "leverage": "10" }, "id": 123 } @@ -9617,11 +12237,13 @@ LITE ENDPOINT: lite/v1/get_all_initial_leverage
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.dev.gravitymarkets.io/lite/v1/get_all_initial_leverage' \ + curl --location 'https://trades.dev.gravitymarkets.io/lite/v1/set_initial_leverage' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "sa": "'$GRVT_SUB_ACCOUNT_ID'" + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "i": "BTC_USDT_Perp", + "l": "10" } ' ``` @@ -9633,9 +12255,11 @@ LITE ENDPOINT: lite/v1/get_all_initial_leverage -x ' { "j": "2.0", - "m": "v1/get_all_initial_leverage", + "m": "v1/set_initial_leverage", "p": { - "sa": "'$GRVT_SUB_ACCOUNT_ID'" + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "i": "BTC_USDT_Perp", + "l": "10" }, "i": 123 } @@ -9646,11 +12270,13 @@ LITE ENDPOINT: lite/v1/get_all_initial_leverage
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.staging.gravitymarkets.io/full/v1/get_all_initial_leverage' \ + curl --location 'https://trades.staging.gravitymarkets.io/full/v1/set_initial_leverage' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'" + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "instrument": "BTC_USDT_Perp", + "leverage": "10" } ' ``` @@ -9662,9 +12288,11 @@ LITE ENDPOINT: lite/v1/get_all_initial_leverage -x ' { "jsonrpc": "2.0", - "method": "v1/get_all_initial_leverage", + "method": "v1/set_initial_leverage", "params": { - "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'" + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "instrument": "BTC_USDT_Perp", + "leverage": "10" }, "id": 123 } @@ -9674,11 +12302,13 @@ LITE ENDPOINT: lite/v1/get_all_initial_leverage
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.staging.gravitymarkets.io/lite/v1/get_all_initial_leverage' \ + curl --location 'https://trades.staging.gravitymarkets.io/lite/v1/set_initial_leverage' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "sa": "'$GRVT_SUB_ACCOUNT_ID'" + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "i": "BTC_USDT_Perp", + "l": "10" } ' ``` @@ -9690,9 +12320,11 @@ LITE ENDPOINT: lite/v1/get_all_initial_leverage -x ' { "j": "2.0", - "m": "v1/get_all_initial_leverage", + "m": "v1/set_initial_leverage", "p": { - "sa": "'$GRVT_SUB_ACCOUNT_ID'" + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "i": "BTC_USDT_Perp", + "l": "10" }, "i": 123 } @@ -9703,11 +12335,13 @@ LITE ENDPOINT: lite/v1/get_all_initial_leverage
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.testnet.grvt.io/full/v1/get_all_initial_leverage' \ + curl --location 'https://trades.testnet.grvt.io/full/v1/set_initial_leverage' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'" + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "instrument": "BTC_USDT_Perp", + "leverage": "10" } ' ``` @@ -9719,9 +12353,11 @@ LITE ENDPOINT: lite/v1/get_all_initial_leverage -x ' { "jsonrpc": "2.0", - "method": "v1/get_all_initial_leverage", + "method": "v1/set_initial_leverage", "params": { - "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'" + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "instrument": "BTC_USDT_Perp", + "leverage": "10" }, "id": 123 } @@ -9731,11 +12367,13 @@ LITE ENDPOINT: lite/v1/get_all_initial_leverage
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.testnet.grvt.io/lite/v1/get_all_initial_leverage' \ + curl --location 'https://trades.testnet.grvt.io/lite/v1/set_initial_leverage' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "sa": "'$GRVT_SUB_ACCOUNT_ID'" + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "i": "BTC_USDT_Perp", + "l": "10" } ' ``` @@ -9747,9 +12385,11 @@ LITE ENDPOINT: lite/v1/get_all_initial_leverage -x ' { "j": "2.0", - "m": "v1/get_all_initial_leverage", + "m": "v1/set_initial_leverage", "p": { - "sa": "'$GRVT_SUB_ACCOUNT_ID'" + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "i": "BTC_USDT_Perp", + "l": "10" }, "i": 123 } @@ -9760,11 +12400,13 @@ LITE ENDPOINT: lite/v1/get_all_initial_leverage
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.grvt.io/full/v1/get_all_initial_leverage' \ + curl --location 'https://trades.grvt.io/full/v1/set_initial_leverage' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'" + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "instrument": "BTC_USDT_Perp", + "leverage": "10" } ' ``` @@ -9776,9 +12418,11 @@ LITE ENDPOINT: lite/v1/get_all_initial_leverage -x ' { "jsonrpc": "2.0", - "method": "v1/get_all_initial_leverage", + "method": "v1/set_initial_leverage", "params": { - "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'" + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", + "instrument": "BTC_USDT_Perp", + "leverage": "10" }, "id": 123 } @@ -9788,11 +12432,13 @@ LITE ENDPOINT: lite/v1/get_all_initial_leverage
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.grvt.io/lite/v1/get_all_initial_leverage' \ + curl --location 'https://trades.grvt.io/lite/v1/set_initial_leverage' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ - "sa": "'$GRVT_SUB_ACCOUNT_ID'" + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "i": "BTC_USDT_Perp", + "l": "10" } ' ``` @@ -9804,9 +12450,11 @@ LITE ENDPOINT: lite/v1/get_all_initial_leverage -x ' { "j": "2.0", - "m": "v1/get_all_initial_leverage", + "m": "v1/set_initial_leverage", "p": { - "sa": "'$GRVT_SUB_ACCOUNT_ID'" + "sa": "'$GRVT_SUB_ACCOUNT_ID'", + "i": "BTC_USDT_Perp", + "l": "10" }, "i": 123 } @@ -9814,15 +12462,16 @@ LITE ENDPOINT: lite/v1/get_all_initial_leverage ```

-### Set Initial Leverage +## Order +### Cancel On Disconnect ``` -FULL ENDPOINT: full/v1/set_initial_leverage -LITE ENDPOINT: lite/v1/set_initial_leverage +FULL ENDPOINT: full/v1/cancel_on_disconnect +LITE ENDPOINT: lite/v1/cancel_on_disconnect ``` === "Request"
- -8<- "docs/schemas/api_set_initial_leverage_request.md" + -8<- "docs/schemas/api_cancel_on_disconnect_request.md"
!!! question "Query" @@ -9830,35 +12479,37 @@ LITE ENDPOINT: lite/v1/set_initial_leverage ``` { .json .copy } { "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "instrument": "BTC_USDT_Perp", - "leverage": "10" + "countdown_time": 300 } ``` **Lite Request** ``` { .json .copy } { "sa": "'$GRVT_SUB_ACCOUNT_ID'", - "i": "BTC_USDT_Perp", - "l": "10" + "ct": 300 } ```
=== "Response"
- -8<- "docs/schemas/api_set_initial_leverage_response.md" + -8<- "docs/schemas/ack_response.md"
!!! success **Full Response** ``` { .json .copy } { - "success": "true" + "result": { + "ack": "true" + } } ``` **Lite Response** ``` { .json .copy } { - "s": "true" + "r": { + "a": "true" + } } ```
@@ -9872,8 +12523,8 @@ LITE ENDPOINT: lite/v1/set_initial_leverage |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| - |1004|404|Data Not Found| - |2100|400|Invalid initial leverage| + |1008|401|Your IP has not been whitelisted for access| + |6000|400|Countdown time is bigger than 300s supported|
!!! failure @@ -9902,13 +12553,12 @@ LITE ENDPOINT: lite/v1/set_initial_leverage
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.dev.gravitymarkets.io/full/v1/set_initial_leverage' \ + curl --location 'https://trades.dev.gravitymarkets.io/full/v1/cancel_on_disconnect' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "instrument": "BTC_USDT_Perp", - "leverage": "10" + "countdown_time": 300 } ' ``` @@ -9920,11 +12570,10 @@ LITE ENDPOINT: lite/v1/set_initial_leverage -x ' { "jsonrpc": "2.0", - "method": "v1/set_initial_leverage", + "method": "v1/cancel_on_disconnect", "params": { "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "instrument": "BTC_USDT_Perp", - "leverage": "10" + "countdown_time": 300 }, "id": 123 } @@ -9934,13 +12583,12 @@ LITE ENDPOINT: lite/v1/set_initial_leverage
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.dev.gravitymarkets.io/lite/v1/set_initial_leverage' \ + curl --location 'https://trades.dev.gravitymarkets.io/lite/v1/cancel_on_disconnect' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ "sa": "'$GRVT_SUB_ACCOUNT_ID'", - "i": "BTC_USDT_Perp", - "l": "10" + "ct": 300 } ' ``` @@ -9952,11 +12600,10 @@ LITE ENDPOINT: lite/v1/set_initial_leverage -x ' { "j": "2.0", - "m": "v1/set_initial_leverage", + "m": "v1/cancel_on_disconnect", "p": { "sa": "'$GRVT_SUB_ACCOUNT_ID'", - "i": "BTC_USDT_Perp", - "l": "10" + "ct": 300 }, "i": 123 } @@ -9967,13 +12614,12 @@ LITE ENDPOINT: lite/v1/set_initial_leverage
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.staging.gravitymarkets.io/full/v1/set_initial_leverage' \ + curl --location 'https://trades.staging.gravitymarkets.io/full/v1/cancel_on_disconnect' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "instrument": "BTC_USDT_Perp", - "leverage": "10" + "countdown_time": 300 } ' ``` @@ -9985,11 +12631,10 @@ LITE ENDPOINT: lite/v1/set_initial_leverage -x ' { "jsonrpc": "2.0", - "method": "v1/set_initial_leverage", + "method": "v1/cancel_on_disconnect", "params": { "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "instrument": "BTC_USDT_Perp", - "leverage": "10" + "countdown_time": 300 }, "id": 123 } @@ -9999,13 +12644,12 @@ LITE ENDPOINT: lite/v1/set_initial_leverage
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.staging.gravitymarkets.io/lite/v1/set_initial_leverage' \ + curl --location 'https://trades.staging.gravitymarkets.io/lite/v1/cancel_on_disconnect' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ "sa": "'$GRVT_SUB_ACCOUNT_ID'", - "i": "BTC_USDT_Perp", - "l": "10" + "ct": 300 } ' ``` @@ -10017,11 +12661,10 @@ LITE ENDPOINT: lite/v1/set_initial_leverage -x ' { "j": "2.0", - "m": "v1/set_initial_leverage", + "m": "v1/cancel_on_disconnect", "p": { "sa": "'$GRVT_SUB_ACCOUNT_ID'", - "i": "BTC_USDT_Perp", - "l": "10" + "ct": 300 }, "i": 123 } @@ -10032,13 +12675,12 @@ LITE ENDPOINT: lite/v1/set_initial_leverage
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.testnet.grvt.io/full/v1/set_initial_leverage' \ + curl --location 'https://trades.testnet.grvt.io/full/v1/cancel_on_disconnect' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "instrument": "BTC_USDT_Perp", - "leverage": "10" + "countdown_time": 300 } ' ``` @@ -10050,11 +12692,10 @@ LITE ENDPOINT: lite/v1/set_initial_leverage -x ' { "jsonrpc": "2.0", - "method": "v1/set_initial_leverage", + "method": "v1/cancel_on_disconnect", "params": { "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "instrument": "BTC_USDT_Perp", - "leverage": "10" + "countdown_time": 300 }, "id": 123 } @@ -10064,13 +12705,12 @@ LITE ENDPOINT: lite/v1/set_initial_leverage
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.testnet.grvt.io/lite/v1/set_initial_leverage' \ + curl --location 'https://trades.testnet.grvt.io/lite/v1/cancel_on_disconnect' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ "sa": "'$GRVT_SUB_ACCOUNT_ID'", - "i": "BTC_USDT_Perp", - "l": "10" + "ct": 300 } ' ``` @@ -10082,11 +12722,10 @@ LITE ENDPOINT: lite/v1/set_initial_leverage -x ' { "j": "2.0", - "m": "v1/set_initial_leverage", + "m": "v1/cancel_on_disconnect", "p": { "sa": "'$GRVT_SUB_ACCOUNT_ID'", - "i": "BTC_USDT_Perp", - "l": "10" + "ct": 300 }, "i": 123 } @@ -10097,13 +12736,12 @@ LITE ENDPOINT: lite/v1/set_initial_leverage
!!! example "REST Full" ``` { .bash .copy } - curl --location 'https://trades.grvt.io/full/v1/set_initial_leverage' \ + curl --location 'https://trades.grvt.io/full/v1/cancel_on_disconnect' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "instrument": "BTC_USDT_Perp", - "leverage": "10" + "countdown_time": 300 } ' ``` @@ -10115,11 +12753,10 @@ LITE ENDPOINT: lite/v1/set_initial_leverage -x ' { "jsonrpc": "2.0", - "method": "v1/set_initial_leverage", + "method": "v1/cancel_on_disconnect", "params": { "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", - "instrument": "BTC_USDT_Perp", - "leverage": "10" + "countdown_time": 300 }, "id": 123 } @@ -10129,13 +12766,12 @@ LITE ENDPOINT: lite/v1/set_initial_leverage
!!! example "REST Lite" ``` { .bash .copy } - curl --location 'https://trades.grvt.io/lite/v1/set_initial_leverage' \ + curl --location 'https://trades.grvt.io/lite/v1/cancel_on_disconnect' \ --header "Cookie: $GRVT_COOKIE" \ --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ --data '{ "sa": "'$GRVT_SUB_ACCOUNT_ID'", - "i": "BTC_USDT_Perp", - "l": "10" + "ct": 300 } ' ``` @@ -10147,11 +12783,10 @@ LITE ENDPOINT: lite/v1/set_initial_leverage -x ' { "j": "2.0", - "m": "v1/set_initial_leverage", + "m": "v1/cancel_on_disconnect", "p": { "sa": "'$GRVT_SUB_ACCOUNT_ID'", - "i": "BTC_USDT_Perp", - "l": "10" + "ct": 300 }, "i": 123 } diff --git a/artifacts/apidocs/trading_streams.md b/artifacts/apidocs/trading_streams.md index f59894a..e69dd88 100644 --- a/artifacts/apidocs/trading_streams.md +++ b/artifacts/apidocs/trading_streams.md @@ -28,7 +28,8 @@ STREAM: v1.order "method": "subscribe", "params": { "stream": "v1.order", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "use_global_sequence_number": true }, "id": 123 } @@ -42,7 +43,8 @@ STREAM: v1.order "subs": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], "unsubs": [], "num_snapshots": [10], - "first_sequence_number": [872634876] + "first_sequence_number": [872634876], + "latest_sequence_number": [872634875] }, "id": 123, "method": "subscribe" @@ -56,7 +58,8 @@ STREAM: v1.order "method": "unsubscribe", "params": { "stream": "v1.order", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "use_global_sequence_number": true }, "id": 123 } @@ -131,7 +134,15 @@ STREAM: v1.order }, "metadata": { "client_order_id": "23042", - "create_time": "1697788800000000000" + "create_time": "1697788800000000000", + "trigger": { + "trigger_type": "UNSPECIFIED", + "tpsl": { + "trigger_by": "UNSPECIFIED", + "trigger_price": "65038.10" + } + }, + "broker": "COIN_ROUTES" }, "state": { "status": "PENDING", @@ -141,41 +152,679 @@ STREAM: v1.order "update_time": "1697788800000000000", "avg_fill_price": ["60000.4"] } + }, + "prev_sequence_number": "872634875" + } + ``` + **Lite Feed Response** + ``` { .json .copy } + { + "s": "v1.order", + "s1": "BTC_USDT_Perp", + "sn": "872634876", + "f": { + "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", + "t": { + "tt": "UNSPECIFIED", + "t": { + "tb": "UNSPECIFIED", + "tp": "65038.10" + } + }, + "b": "COIN_ROUTES" + }, + "s1": { + "s": "PENDING", + "rr": "CLIENT_CANCEL", + "bs": ["10.5"], + "ts": ["1.5"], + "ut": "1697788800000000000", + "af": ["60000.4"] + } + }, + "ps": "872634875" + } + ``` +
+=== "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| + |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.order", + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "use_global_sequence_number": true + }, + "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.order", + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "use_global_sequence_number": true + }, + "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.order", + "feed":["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "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.order", + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "ug": true + }, + "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.order", + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "ug": true + }, + "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.order", + "feed":["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "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.order", + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "use_global_sequence_number": true + }, + "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.order", + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "use_global_sequence_number": true + }, + "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.order", + "feed":["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "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.order", + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "ug": true + }, + "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.order", + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "ug": true + }, + "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.order", + "feed":["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "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.order", + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "use_global_sequence_number": true + }, + "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.order", + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "use_global_sequence_number": true + }, + "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.order", + "feed":["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "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.order", + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "ug": true + }, + "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.order", + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "ug": true + }, + "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.order", + "feed":["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "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.order", + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "use_global_sequence_number": true + }, + "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.order", + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "use_global_sequence_number": true + }, + "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.order", + "feed":["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "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.order", + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "ug": true + }, + "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.order", + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "ug": true + }, + "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.order", + "feed":["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "method":"subscribe", + "is_full":false + } + ' -w 360 + ``` +
+
+### Order State +``` +STREAM: v1.state +``` + +=== "Feed Selector" +
+ -8<- "docs/schemas/ws_order_state_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.state", + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "use_global_sequence_number": true + }, + "id": 123 + } + ``` + **Full Subscribe Response** + ``` { .json .copy } + { + "jsonrpc": "2.0", + "result": { + "stream": "v1.state", + "subs": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "unsubs": [], + "num_snapshots": [10], + "first_sequence_number": [872634876], + "latest_sequence_number": [872634875] + }, + "id": 123, + "method": "subscribe" + } + ``` + ??? question "Unsubscribe" + **Full Unsubscribe Request** + ``` { .json .copy } + { + "jsonrpc": "2.0", + "method": "unsubscribe", + "params": { + "stream": "v1.state", + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "use_global_sequence_number": true + }, + "id": 123 + } + ``` + **Full Unsubscribe Response** + ``` { .json .copy } + { + "jsonrpc": "2.0", + "result": { + "stream": "v1.state", + "unsubs": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + }, + "id": 123, + "method": "subscribe" + } + ``` + ??? question "Legacy Subscribe" + **Full Subscribe Request** + ``` { .json .copy } + { + "request_id":1, + "stream":"v1.state", + "feed":["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "method":"subscribe", + "is_full":true + } + ``` + **Full Subscribe Response** + ``` { .json .copy } + { + "request_id":1, + "stream":"v1.state", + "subs":["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "unsubs":[], + "num_snapshots":[1], + "first_sequence_number":[2813] + } + ``` +
+=== "Feed Data" +
+ -8<- "docs/schemas/ws_order_state_feed_data_v1.md" +
+
+ !!! success + **Full Feed Response** + ``` { .json .copy } + { + "stream": "v1.state", + "selector": "BTC_USDT_Perp", + "sequence_number": "872634876", + "feed": { + "order_id": "10000101000203040506", + "client_order_id": "23042", + "order_state": { + "status": "PENDING", + "reject_reason": "CLIENT_CANCEL", + "book_size": ["10.5"], + "traded_size": ["1.5"], + "update_time": "1697788800000000000", + "avg_fill_price": ["60000.4"] + } + }, + "prev_sequence_number": "872634875" } ``` **Lite Feed Response** ``` { .json .copy } { - "s": "v1.order", + "s": "v1.state", "s1": "BTC_USDT_Perp", "sn": "872634876", "f": { - "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": { + "oi": "10000101000203040506", + "co": "23042", + "os": { "s": "PENDING", "rr": "CLIENT_CANCEL", "bs": ["10.5"], @@ -183,7 +832,8 @@ STREAM: v1.order "ut": "1697788800000000000", "af": ["60000.4"] } - } + }, + "ps": "872634875" } ```
@@ -252,8 +902,9 @@ STREAM: v1.order "jsonrpc": "2.0", "method": "subscribe", "params": { - "stream": "v1.order", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "stream": "v1.state", + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "use_global_sequence_number": true }, "id": 123 } @@ -269,8 +920,9 @@ STREAM: v1.order "jsonrpc": "2.0", "method": "unsubscribe", "params": { - "stream": "v1.order", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "stream": "v1.state", + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "use_global_sequence_number": true }, "id": 123 } @@ -284,7 +936,7 @@ STREAM: v1.order -x ' { "request_id":1, - "stream":"v1.order", + "stream":"v1.state", "feed":["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], "method":"subscribe", "is_full":true @@ -303,8 +955,9 @@ STREAM: v1.order "j": "2.0", "m": "subscribe", "p": { - "s": "v1.order", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "s": "v1.state", + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "ug": true }, "i": 123 } @@ -320,8 +973,9 @@ STREAM: v1.order "j": "2.0", "m": "unsubscribe", "p": { - "s": "v1.order", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "s": "v1.state", + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "ug": true }, "i": 123 } @@ -335,7 +989,7 @@ STREAM: v1.order -x ' { "request_id":1, - "stream":"v1.order", + "stream":"v1.state", "feed":["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], "method":"subscribe", "is_full":false @@ -355,8 +1009,9 @@ STREAM: v1.order "jsonrpc": "2.0", "method": "subscribe", "params": { - "stream": "v1.order", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "stream": "v1.state", + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "use_global_sequence_number": true }, "id": 123 } @@ -372,8 +1027,9 @@ STREAM: v1.order "jsonrpc": "2.0", "method": "unsubscribe", "params": { - "stream": "v1.order", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "stream": "v1.state", + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "use_global_sequence_number": true }, "id": 123 } @@ -387,7 +1043,7 @@ STREAM: v1.order -x ' { "request_id":1, - "stream":"v1.order", + "stream":"v1.state", "feed":["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], "method":"subscribe", "is_full":true @@ -406,8 +1062,9 @@ STREAM: v1.order "j": "2.0", "m": "subscribe", "p": { - "s": "v1.order", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "s": "v1.state", + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "ug": true }, "i": 123 } @@ -423,8 +1080,9 @@ STREAM: v1.order "j": "2.0", "m": "unsubscribe", "p": { - "s": "v1.order", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "s": "v1.state", + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "ug": true }, "i": 123 } @@ -438,7 +1096,7 @@ STREAM: v1.order -x ' { "request_id":1, - "stream":"v1.order", + "stream":"v1.state", "feed":["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], "method":"subscribe", "is_full":false @@ -458,8 +1116,9 @@ STREAM: v1.order "jsonrpc": "2.0", "method": "subscribe", "params": { - "stream": "v1.order", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "stream": "v1.state", + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "use_global_sequence_number": true }, "id": 123 } @@ -475,8 +1134,9 @@ STREAM: v1.order "jsonrpc": "2.0", "method": "unsubscribe", "params": { - "stream": "v1.order", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "stream": "v1.state", + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "use_global_sequence_number": true }, "id": 123 } @@ -490,7 +1150,7 @@ STREAM: v1.order -x ' { "request_id":1, - "stream":"v1.order", + "stream":"v1.state", "feed":["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], "method":"subscribe", "is_full":true @@ -509,8 +1169,9 @@ STREAM: v1.order "j": "2.0", "m": "subscribe", "p": { - "s": "v1.order", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "s": "v1.state", + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "ug": true }, "i": 123 } @@ -526,8 +1187,9 @@ STREAM: v1.order "j": "2.0", "m": "unsubscribe", "p": { - "s": "v1.order", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "s": "v1.state", + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "ug": true }, "i": 123 } @@ -541,7 +1203,7 @@ STREAM: v1.order -x ' { "request_id":1, - "stream":"v1.order", + "stream":"v1.state", "feed":["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], "method":"subscribe", "is_full":false @@ -561,8 +1223,9 @@ STREAM: v1.order "jsonrpc": "2.0", "method": "subscribe", "params": { - "stream": "v1.order", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "stream": "v1.state", + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "use_global_sequence_number": true }, "id": 123 } @@ -578,8 +1241,9 @@ STREAM: v1.order "jsonrpc": "2.0", "method": "unsubscribe", "params": { - "stream": "v1.order", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "stream": "v1.state", + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "use_global_sequence_number": true }, "id": 123 } @@ -593,7 +1257,7 @@ STREAM: v1.order -x ' { "request_id":1, - "stream":"v1.order", + "stream":"v1.state", "feed":["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], "method":"subscribe", "is_full":true @@ -612,8 +1276,9 @@ STREAM: v1.order "j": "2.0", "m": "subscribe", "p": { - "s": "v1.order", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "s": "v1.state", + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "ug": true }, "i": 123 } @@ -629,8 +1294,9 @@ STREAM: v1.order "j": "2.0", "m": "unsubscribe", "p": { - "s": "v1.order", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "s": "v1.state", + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "ug": true }, "i": 123 } @@ -644,7 +1310,7 @@ STREAM: v1.order -x ' { "request_id":1, - "stream":"v1.order", + "stream":"v1.state", "feed":["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], "method":"subscribe", "is_full":false @@ -653,14 +1319,14 @@ STREAM: v1.order ```

-### Order State +### Cancel Status ``` -STREAM: v1.state +STREAM: v1.cancel ``` === "Feed Selector"
- -8<- "docs/schemas/ws_order_state_feed_selector_v1.md" + -8<- "docs/schemas/ws_cancel_feed_selector_v1.md" ??? info "JSONRPC Wrappers" -8<- "docs/schemas/jsonrpc_request.md" -8<- "docs/schemas/jsonrpc_response.md" @@ -679,8 +1345,9 @@ STREAM: v1.state "jsonrpc": "2.0", "method": "subscribe", "params": { - "stream": "v1.state", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "stream": "v1.cancel", + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"], + "use_global_sequence_number": true }, "id": 123 } @@ -690,11 +1357,12 @@ STREAM: v1.state { "jsonrpc": "2.0", "result": { - "stream": "v1.state", - "subs": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "stream": "v1.cancel", + "subs": ["'$GRVT_SUB_ACCOUNT_ID'"], "unsubs": [], "num_snapshots": [10], - "first_sequence_number": [872634876] + "first_sequence_number": [872634876], + "latest_sequence_number": [872634875] }, "id": 123, "method": "subscribe" @@ -707,8 +1375,9 @@ STREAM: v1.state "jsonrpc": "2.0", "method": "unsubscribe", "params": { - "stream": "v1.state", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "stream": "v1.cancel", + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"], + "use_global_sequence_number": true }, "id": 123 } @@ -718,8 +1387,8 @@ STREAM: v1.state { "jsonrpc": "2.0", "result": { - "stream": "v1.state", - "unsubs": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "stream": "v1.cancel", + "unsubs": ["'$GRVT_SUB_ACCOUNT_ID'"] }, "id": 123, "method": "subscribe" @@ -730,8 +1399,8 @@ STREAM: v1.state ``` { .json .copy } { "request_id":1, - "stream":"v1.state", - "feed":["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "stream":"v1.cancel", + "feed":["'$GRVT_SUB_ACCOUNT_ID'"], "method":"subscribe", "is_full":true } @@ -740,8 +1409,8 @@ STREAM: v1.state ``` { .json .copy } { "request_id":1, - "stream":"v1.state", - "subs":["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "stream":"v1.cancel", + "subs":["'$GRVT_SUB_ACCOUNT_ID'"], "unsubs":[], "num_snapshots":[1], "first_sequence_number":[2813] @@ -750,48 +1419,42 @@ STREAM: v1.state
=== "Feed Data"
- -8<- "docs/schemas/ws_order_state_feed_data_v1.md" + -8<- "docs/schemas/ws_cancel_feed_data_v1.md"
!!! success **Full Feed Response** ``` { .json .copy } { - "stream": "v1.state", - "selector": "BTC_USDT_Perp", + "stream": "v1.cancel", + "selector": "'$GRVT_SUB_ACCOUNT_ID'", "sequence_number": "872634876", "feed": { - "order_id": "10000101000203040506", + "sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", "client_order_id": "23042", - "order_state": { - "status": "PENDING", - "reject_reason": "CLIENT_CANCEL", - "book_size": ["10.5"], - "traded_size": ["1.5"], - "update_time": "1697788800000000000", - "avg_fill_price": ["60000.4"] - } - } + "order_id": "10000101000203040506", + "reason": "UNSPECIFIED", + "update_time": "1697788800000000000", + "cancel_status": "EXPIRED" + }, + "prev_sequence_number": "872634875" } ``` **Lite Feed Response** ``` { .json .copy } { - "s": "v1.state", - "s1": "BTC_USDT_Perp", + "s": "v1.cancel", + "s1": "'$GRVT_SUB_ACCOUNT_ID'", "sn": "872634876", "f": { - "oi": "10000101000203040506", + "sa": "'$GRVT_SUB_ACCOUNT_ID'", "co": "23042", - "os": { - "s": "PENDING", - "rr": "CLIENT_CANCEL", - "bs": ["10.5"], - "ts": ["1.5"], - "ut": "1697788800000000000", - "af": ["60000.4"] - } - } + "oi": "10000101000203040506", + "r": "UNSPECIFIED", + "ut": "1697788800000000000", + "cs": "EXPIRED" + }, + "ps": "872634875" } ```
@@ -860,8 +1523,9 @@ STREAM: v1.state "jsonrpc": "2.0", "method": "subscribe", "params": { - "stream": "v1.state", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "stream": "v1.cancel", + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"], + "use_global_sequence_number": true }, "id": 123 } @@ -877,8 +1541,9 @@ STREAM: v1.state "jsonrpc": "2.0", "method": "unsubscribe", "params": { - "stream": "v1.state", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "stream": "v1.cancel", + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"], + "use_global_sequence_number": true }, "id": 123 } @@ -892,8 +1557,8 @@ STREAM: v1.state -x ' { "request_id":1, - "stream":"v1.state", - "feed":["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "stream":"v1.cancel", + "feed":["'$GRVT_SUB_ACCOUNT_ID'"], "method":"subscribe", "is_full":true } @@ -911,8 +1576,9 @@ STREAM: v1.state "j": "2.0", "m": "subscribe", "p": { - "s": "v1.state", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "s": "v1.cancel", + "s1": ["'$GRVT_SUB_ACCOUNT_ID'"], + "ug": true }, "i": 123 } @@ -928,8 +1594,9 @@ STREAM: v1.state "j": "2.0", "m": "unsubscribe", "p": { - "s": "v1.state", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "s": "v1.cancel", + "s1": ["'$GRVT_SUB_ACCOUNT_ID'"], + "ug": true }, "i": 123 } @@ -943,8 +1610,8 @@ STREAM: v1.state -x ' { "request_id":1, - "stream":"v1.state", - "feed":["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "stream":"v1.cancel", + "feed":["'$GRVT_SUB_ACCOUNT_ID'"], "method":"subscribe", "is_full":false } @@ -963,8 +1630,9 @@ STREAM: v1.state "jsonrpc": "2.0", "method": "subscribe", "params": { - "stream": "v1.state", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "stream": "v1.cancel", + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"], + "use_global_sequence_number": true }, "id": 123 } @@ -980,8 +1648,9 @@ STREAM: v1.state "jsonrpc": "2.0", "method": "unsubscribe", "params": { - "stream": "v1.state", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "stream": "v1.cancel", + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"], + "use_global_sequence_number": true }, "id": 123 } @@ -995,8 +1664,8 @@ STREAM: v1.state -x ' { "request_id":1, - "stream":"v1.state", - "feed":["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "stream":"v1.cancel", + "feed":["'$GRVT_SUB_ACCOUNT_ID'"], "method":"subscribe", "is_full":true } @@ -1014,8 +1683,9 @@ STREAM: v1.state "j": "2.0", "m": "subscribe", "p": { - "s": "v1.state", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "s": "v1.cancel", + "s1": ["'$GRVT_SUB_ACCOUNT_ID'"], + "ug": true }, "i": 123 } @@ -1031,8 +1701,9 @@ STREAM: v1.state "j": "2.0", "m": "unsubscribe", "p": { - "s": "v1.state", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "s": "v1.cancel", + "s1": ["'$GRVT_SUB_ACCOUNT_ID'"], + "ug": true }, "i": 123 } @@ -1046,8 +1717,8 @@ STREAM: v1.state -x ' { "request_id":1, - "stream":"v1.state", - "feed":["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "stream":"v1.cancel", + "feed":["'$GRVT_SUB_ACCOUNT_ID'"], "method":"subscribe", "is_full":false } @@ -1066,8 +1737,9 @@ STREAM: v1.state "jsonrpc": "2.0", "method": "subscribe", "params": { - "stream": "v1.state", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "stream": "v1.cancel", + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"], + "use_global_sequence_number": true }, "id": 123 } @@ -1083,8 +1755,9 @@ STREAM: v1.state "jsonrpc": "2.0", "method": "unsubscribe", "params": { - "stream": "v1.state", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "stream": "v1.cancel", + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"], + "use_global_sequence_number": true }, "id": 123 } @@ -1098,8 +1771,8 @@ STREAM: v1.state -x ' { "request_id":1, - "stream":"v1.state", - "feed":["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "stream":"v1.cancel", + "feed":["'$GRVT_SUB_ACCOUNT_ID'"], "method":"subscribe", "is_full":true } @@ -1117,8 +1790,9 @@ STREAM: v1.state "j": "2.0", "m": "subscribe", "p": { - "s": "v1.state", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "s": "v1.cancel", + "s1": ["'$GRVT_SUB_ACCOUNT_ID'"], + "ug": true }, "i": 123 } @@ -1134,8 +1808,9 @@ STREAM: v1.state "j": "2.0", "m": "unsubscribe", "p": { - "s": "v1.state", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "s": "v1.cancel", + "s1": ["'$GRVT_SUB_ACCOUNT_ID'"], + "ug": true }, "i": 123 } @@ -1149,8 +1824,8 @@ STREAM: v1.state -x ' { "request_id":1, - "stream":"v1.state", - "feed":["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "stream":"v1.cancel", + "feed":["'$GRVT_SUB_ACCOUNT_ID'"], "method":"subscribe", "is_full":false } @@ -1169,8 +1844,9 @@ STREAM: v1.state "jsonrpc": "2.0", "method": "subscribe", "params": { - "stream": "v1.state", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "stream": "v1.cancel", + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"], + "use_global_sequence_number": true }, "id": 123 } @@ -1186,8 +1862,9 @@ STREAM: v1.state "jsonrpc": "2.0", "method": "unsubscribe", "params": { - "stream": "v1.state", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "stream": "v1.cancel", + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"], + "use_global_sequence_number": true }, "id": 123 } @@ -1201,8 +1878,8 @@ STREAM: v1.state -x ' { "request_id":1, - "stream":"v1.state", - "feed":["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "stream":"v1.cancel", + "feed":["'$GRVT_SUB_ACCOUNT_ID'"], "method":"subscribe", "is_full":true } @@ -1220,8 +1897,9 @@ STREAM: v1.state "j": "2.0", "m": "subscribe", "p": { - "s": "v1.state", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "s": "v1.cancel", + "s1": ["'$GRVT_SUB_ACCOUNT_ID'"], + "ug": true }, "i": 123 } @@ -1237,8 +1915,9 @@ STREAM: v1.state "j": "2.0", "m": "unsubscribe", "p": { - "s": "v1.state", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "s": "v1.cancel", + "s1": ["'$GRVT_SUB_ACCOUNT_ID'"], + "ug": true }, "i": 123 } @@ -1252,8 +1931,8 @@ STREAM: v1.state -x ' { "request_id":1, - "stream":"v1.state", - "feed":["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "stream":"v1.cancel", + "feed":["'$GRVT_SUB_ACCOUNT_ID'"], "method":"subscribe", "is_full":false } @@ -1289,7 +1968,8 @@ STREAM: v1.fill "method": "subscribe", "params": { "stream": "v1.fill", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "use_global_sequence_number": true }, "id": 123 } @@ -1303,7 +1983,8 @@ STREAM: v1.fill "subs": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], "unsubs": [], "num_snapshots": [10], - "first_sequence_number": [872634876] + "first_sequence_number": [872634876], + "latest_sequence_number": [872634875] }, "id": 123, "method": "subscribe" @@ -1317,7 +1998,8 @@ STREAM: v1.fill "method": "unsubscribe", "params": { "stream": "v1.fill", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "use_global_sequence_number": true }, "id": 123 } @@ -1388,8 +2070,10 @@ STREAM: v1.fill "order_id": "0x10000101000203040506", "venue": "ORDERBOOK", "client_order_id": "23042", - "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0" - } + "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "broker": "COIN_ROUTES" + }, + "prev_sequence_number": "872634875" } ``` **Lite Feed Response** @@ -1417,8 +2101,10 @@ STREAM: v1.fill "oi": "0x10000101000203040506", "v": "ORDERBOOK", "co": "23042", - "s1": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0" - } + "s1": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "b": "COIN_ROUTES" + }, + "ps": "872634875" } ```
@@ -1488,7 +2174,8 @@ STREAM: v1.fill "method": "subscribe", "params": { "stream": "v1.fill", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "use_global_sequence_number": true }, "id": 123 } @@ -1505,7 +2192,8 @@ STREAM: v1.fill "method": "unsubscribe", "params": { "stream": "v1.fill", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "use_global_sequence_number": true }, "id": 123 } @@ -1539,7 +2227,8 @@ STREAM: v1.fill "m": "subscribe", "p": { "s": "v1.fill", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "ug": true }, "i": 123 } @@ -1556,7 +2245,8 @@ STREAM: v1.fill "m": "unsubscribe", "p": { "s": "v1.fill", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "ug": true }, "i": 123 } @@ -1591,7 +2281,8 @@ STREAM: v1.fill "method": "subscribe", "params": { "stream": "v1.fill", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "use_global_sequence_number": true }, "id": 123 } @@ -1608,7 +2299,8 @@ STREAM: v1.fill "method": "unsubscribe", "params": { "stream": "v1.fill", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "use_global_sequence_number": true }, "id": 123 } @@ -1642,7 +2334,8 @@ STREAM: v1.fill "m": "subscribe", "p": { "s": "v1.fill", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "ug": true }, "i": 123 } @@ -1659,7 +2352,8 @@ STREAM: v1.fill "m": "unsubscribe", "p": { "s": "v1.fill", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "ug": true }, "i": 123 } @@ -1694,7 +2388,8 @@ STREAM: v1.fill "method": "subscribe", "params": { "stream": "v1.fill", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "use_global_sequence_number": true }, "id": 123 } @@ -1711,7 +2406,8 @@ STREAM: v1.fill "method": "unsubscribe", "params": { "stream": "v1.fill", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "use_global_sequence_number": true }, "id": 123 } @@ -1745,7 +2441,8 @@ STREAM: v1.fill "m": "subscribe", "p": { "s": "v1.fill", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "ug": true }, "i": 123 } @@ -1762,7 +2459,8 @@ STREAM: v1.fill "m": "unsubscribe", "p": { "s": "v1.fill", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "ug": true }, "i": 123 } @@ -1797,7 +2495,8 @@ STREAM: v1.fill "method": "subscribe", "params": { "stream": "v1.fill", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "use_global_sequence_number": true }, "id": 123 } @@ -1814,7 +2513,8 @@ STREAM: v1.fill "method": "unsubscribe", "params": { "stream": "v1.fill", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "use_global_sequence_number": true }, "id": 123 } @@ -1848,7 +2548,8 @@ STREAM: v1.fill "m": "subscribe", "p": { "s": "v1.fill", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "ug": true }, "i": 123 } @@ -1865,7 +2566,8 @@ STREAM: v1.fill "m": "unsubscribe", "p": { "s": "v1.fill", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "ug": true }, "i": 123 } @@ -1915,7 +2617,8 @@ STREAM: v1.position "method": "subscribe", "params": { "stream": "v1.position", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "use_global_sequence_number": true }, "id": 123 } @@ -1929,7 +2632,8 @@ STREAM: v1.position "subs": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], "unsubs": [], "num_snapshots": [10], - "first_sequence_number": [872634876] + "first_sequence_number": [872634876], + "latest_sequence_number": [872634875] }, "id": 123, "method": "subscribe" @@ -1943,7 +2647,8 @@ STREAM: v1.position "method": "unsubscribe", "params": { "stream": "v1.position", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "use_global_sequence_number": true }, "id": 123 } @@ -2010,7 +2715,8 @@ STREAM: v1.position "roi": "10.20", "quote_index_price": "1.0000102", "est_liquidation_price": 60000.25 - } + }, + "prev_sequence_number": "872634875" } ``` **Lite Feed Response** @@ -2034,7 +2740,8 @@ STREAM: v1.position "r": "10.20", "qi": "1.0000102", "el": 60000.25 - } + }, + "ps": "872634875" } ```
@@ -2104,7 +2811,8 @@ STREAM: v1.position "method": "subscribe", "params": { "stream": "v1.position", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "use_global_sequence_number": true }, "id": 123 } @@ -2121,7 +2829,8 @@ STREAM: v1.position "method": "unsubscribe", "params": { "stream": "v1.position", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "use_global_sequence_number": true }, "id": 123 } @@ -2155,7 +2864,8 @@ STREAM: v1.position "m": "subscribe", "p": { "s": "v1.position", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "ug": true }, "i": 123 } @@ -2172,7 +2882,8 @@ STREAM: v1.position "m": "unsubscribe", "p": { "s": "v1.position", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "ug": true }, "i": 123 } @@ -2207,7 +2918,8 @@ STREAM: v1.position "method": "subscribe", "params": { "stream": "v1.position", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "use_global_sequence_number": true }, "id": 123 } @@ -2224,7 +2936,8 @@ STREAM: v1.position "method": "unsubscribe", "params": { "stream": "v1.position", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "use_global_sequence_number": true }, "id": 123 } @@ -2258,7 +2971,8 @@ STREAM: v1.position "m": "subscribe", "p": { "s": "v1.position", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "ug": true }, "i": 123 } @@ -2275,7 +2989,8 @@ STREAM: v1.position "m": "unsubscribe", "p": { "s": "v1.position", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "ug": true }, "i": 123 } @@ -2310,7 +3025,8 @@ STREAM: v1.position "method": "subscribe", "params": { "stream": "v1.position", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "use_global_sequence_number": true }, "id": 123 } @@ -2327,7 +3043,8 @@ STREAM: v1.position "method": "unsubscribe", "params": { "stream": "v1.position", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "use_global_sequence_number": true }, "id": 123 } @@ -2361,7 +3078,8 @@ STREAM: v1.position "m": "subscribe", "p": { "s": "v1.position", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "ug": true }, "i": 123 } @@ -2378,7 +3096,8 @@ STREAM: v1.position "m": "unsubscribe", "p": { "s": "v1.position", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "ug": true }, "i": 123 } @@ -2413,7 +3132,8 @@ STREAM: v1.position "method": "subscribe", "params": { "stream": "v1.position", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "use_global_sequence_number": true }, "id": 123 } @@ -2430,7 +3150,8 @@ STREAM: v1.position "method": "unsubscribe", "params": { "stream": "v1.position", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "use_global_sequence_number": true }, "id": 123 } @@ -2464,7 +3185,8 @@ STREAM: v1.position "m": "subscribe", "p": { "s": "v1.position", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "ug": true }, "i": 123 } @@ -2481,7 +3203,8 @@ STREAM: v1.position "m": "unsubscribe", "p": { "s": "v1.position", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "ug": true }, "i": 123 } @@ -2532,7 +3255,8 @@ STREAM: v1.deposit "method": "subscribe", "params": { "stream": "v1.deposit", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"] + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "use_global_sequence_number": true }, "id": 123 } @@ -2546,7 +3270,8 @@ STREAM: v1.deposit "subs": ["'$GRVT_MAIN_ACCOUNT_ID'"], "unsubs": [], "num_snapshots": [10], - "first_sequence_number": [872634876] + "first_sequence_number": [872634876], + "latest_sequence_number": [872634875] }, "id": 123, "method": "subscribe" @@ -2560,7 +3285,8 @@ STREAM: v1.deposit "method": "unsubscribe", "params": { "stream": "v1.deposit", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"] + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "use_global_sequence_number": true }, "id": 123 } @@ -2617,7 +3343,8 @@ STREAM: v1.deposit "to_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", "currency": "USDT", "num_tokens": "10.50" - } + }, + "prev_sequence_number": "872634875" } ``` **Lite Feed Response** @@ -2631,7 +3358,8 @@ STREAM: v1.deposit "ta": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", "c": "USDT", "nt": "10.50" - } + }, + "ps": "872634875" } ```
@@ -2697,7 +3425,8 @@ STREAM: v1.deposit "method": "subscribe", "params": { "stream": "v1.deposit", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"] + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "use_global_sequence_number": true }, "id": 123 } @@ -2714,7 +3443,8 @@ STREAM: v1.deposit "method": "unsubscribe", "params": { "stream": "v1.deposit", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"] + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "use_global_sequence_number": true }, "id": 123 } @@ -2748,7 +3478,8 @@ STREAM: v1.deposit "m": "subscribe", "p": { "s": "v1.deposit", - "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"] + "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "ug": true }, "i": 123 } @@ -2765,7 +3496,8 @@ STREAM: v1.deposit "m": "unsubscribe", "p": { "s": "v1.deposit", - "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"] + "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "ug": true }, "i": 123 } @@ -2800,7 +3532,8 @@ STREAM: v1.deposit "method": "subscribe", "params": { "stream": "v1.deposit", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"] + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "use_global_sequence_number": true }, "id": 123 } @@ -2817,7 +3550,8 @@ STREAM: v1.deposit "method": "unsubscribe", "params": { "stream": "v1.deposit", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"] + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "use_global_sequence_number": true }, "id": 123 } @@ -2851,7 +3585,8 @@ STREAM: v1.deposit "m": "subscribe", "p": { "s": "v1.deposit", - "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"] + "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "ug": true }, "i": 123 } @@ -2868,7 +3603,8 @@ STREAM: v1.deposit "m": "unsubscribe", "p": { "s": "v1.deposit", - "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"] + "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "ug": true }, "i": 123 } @@ -2903,7 +3639,8 @@ STREAM: v1.deposit "method": "subscribe", "params": { "stream": "v1.deposit", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"] + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "use_global_sequence_number": true }, "id": 123 } @@ -2920,7 +3657,8 @@ STREAM: v1.deposit "method": "unsubscribe", "params": { "stream": "v1.deposit", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"] + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "use_global_sequence_number": true }, "id": 123 } @@ -2954,7 +3692,8 @@ STREAM: v1.deposit "m": "subscribe", "p": { "s": "v1.deposit", - "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"] + "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "ug": true }, "i": 123 } @@ -2971,7 +3710,8 @@ STREAM: v1.deposit "m": "unsubscribe", "p": { "s": "v1.deposit", - "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"] + "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "ug": true }, "i": 123 } @@ -3006,7 +3746,8 @@ STREAM: v1.deposit "method": "subscribe", "params": { "stream": "v1.deposit", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"] + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "use_global_sequence_number": true }, "id": 123 } @@ -3023,7 +3764,8 @@ STREAM: v1.deposit "method": "unsubscribe", "params": { "stream": "v1.deposit", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"] + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "use_global_sequence_number": true }, "id": 123 } @@ -3057,7 +3799,8 @@ STREAM: v1.deposit "m": "subscribe", "p": { "s": "v1.deposit", - "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"] + "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "ug": true }, "i": 123 } @@ -3074,7 +3817,8 @@ STREAM: v1.deposit "m": "unsubscribe", "p": { "s": "v1.deposit", - "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"] + "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "ug": true }, "i": 123 } @@ -3124,7 +3868,8 @@ STREAM: v1.transfer "method": "subscribe", "params": { "stream": "v1.transfer", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"] + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], + "use_global_sequence_number": true }, "id": 123 } @@ -3138,7 +3883,8 @@ STREAM: v1.transfer "subs": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], "unsubs": [], "num_snapshots": [10], - "first_sequence_number": [872634876] + "first_sequence_number": [872634876], + "latest_sequence_number": [872634875] }, "id": 123, "method": "subscribe" @@ -3152,7 +3898,8 @@ STREAM: v1.transfer "method": "unsubscribe", "params": { "stream": "v1.transfer", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"] + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], + "use_global_sequence_number": true }, "id": 123 } @@ -3205,12 +3952,13 @@ STREAM: v1.transfer "selector": "BTC_USDT_Perp", "sequence_number": "872634876", "feed": { + "tx_id": "1028403", "from_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", "from_sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", "to_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", "to_sub_account_id": "'$GRVT_SUB_ACCOUNT_ID'", "currency": "USDT", - "num_tokens": "10.50", + "num_tokens": "1500.0", "signature": { "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", @@ -3219,9 +3967,11 @@ STREAM: v1.transfer "expiration": "1697788800000000000", "nonce": 1234567890 }, + "event_time": "1697788800000000000", "transfer_type": "STANDARD", "transfer_metadata": null - } + }, + "prev_sequence_number": "872634875" } ``` **Lite Feed Response** @@ -3231,12 +3981,13 @@ STREAM: v1.transfer "s1": "BTC_USDT_Perp", "sn": "872634876", "f": { + "ti": "1028403", "fa": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", "fs": "'$GRVT_SUB_ACCOUNT_ID'", "ta": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", "ts": "'$GRVT_SUB_ACCOUNT_ID'", "c": "USDT", - "nt": "10.50", + "nt": "1500.0", "s": { "s": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", "r": "0xb788d96fee91c7cdc35918e0441b756d4000ec1d07d900c73347d9abbc20acc8", @@ -3245,9 +3996,11 @@ STREAM: v1.transfer "e": "1697788800000000000", "n": 1234567890 }, + "et": "1697788800000000000", "tt": "STANDARD", "tm": null - } + }, + "ps": "872634875" } ```
@@ -3314,7 +4067,8 @@ STREAM: v1.transfer "method": "subscribe", "params": { "stream": "v1.transfer", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"] + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], + "use_global_sequence_number": true }, "id": 123 } @@ -3331,7 +4085,8 @@ STREAM: v1.transfer "method": "unsubscribe", "params": { "stream": "v1.transfer", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"] + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], + "use_global_sequence_number": true }, "id": 123 } @@ -3365,7 +4120,8 @@ STREAM: v1.transfer "m": "subscribe", "p": { "s": "v1.transfer", - "s1": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"] + "s1": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], + "ug": true }, "i": 123 } @@ -3382,7 +4138,8 @@ STREAM: v1.transfer "m": "unsubscribe", "p": { "s": "v1.transfer", - "s1": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"] + "s1": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], + "ug": true }, "i": 123 } @@ -3417,7 +4174,8 @@ STREAM: v1.transfer "method": "subscribe", "params": { "stream": "v1.transfer", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"] + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], + "use_global_sequence_number": true }, "id": 123 } @@ -3434,7 +4192,8 @@ STREAM: v1.transfer "method": "unsubscribe", "params": { "stream": "v1.transfer", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"] + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], + "use_global_sequence_number": true }, "id": 123 } @@ -3468,7 +4227,8 @@ STREAM: v1.transfer "m": "subscribe", "p": { "s": "v1.transfer", - "s1": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"] + "s1": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], + "ug": true }, "i": 123 } @@ -3485,7 +4245,8 @@ STREAM: v1.transfer "m": "unsubscribe", "p": { "s": "v1.transfer", - "s1": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"] + "s1": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], + "ug": true }, "i": 123 } @@ -3520,7 +4281,8 @@ STREAM: v1.transfer "method": "subscribe", "params": { "stream": "v1.transfer", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"] + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], + "use_global_sequence_number": true }, "id": 123 } @@ -3537,7 +4299,8 @@ STREAM: v1.transfer "method": "unsubscribe", "params": { "stream": "v1.transfer", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"] + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], + "use_global_sequence_number": true }, "id": 123 } @@ -3571,7 +4334,8 @@ STREAM: v1.transfer "m": "subscribe", "p": { "s": "v1.transfer", - "s1": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"] + "s1": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], + "ug": true }, "i": 123 } @@ -3588,7 +4352,8 @@ STREAM: v1.transfer "m": "unsubscribe", "p": { "s": "v1.transfer", - "s1": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"] + "s1": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], + "ug": true }, "i": 123 } @@ -3623,7 +4388,8 @@ STREAM: v1.transfer "method": "subscribe", "params": { "stream": "v1.transfer", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"] + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], + "use_global_sequence_number": true }, "id": 123 } @@ -3640,7 +4406,8 @@ STREAM: v1.transfer "method": "unsubscribe", "params": { "stream": "v1.transfer", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"] + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], + "use_global_sequence_number": true }, "id": 123 } @@ -3674,7 +4441,8 @@ STREAM: v1.transfer "m": "subscribe", "p": { "s": "v1.transfer", - "s1": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"] + "s1": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], + "ug": true }, "i": 123 } @@ -3691,7 +4459,8 @@ STREAM: v1.transfer "m": "unsubscribe", "p": { "s": "v1.transfer", - "s1": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"] + "s1": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], + "ug": true }, "i": 123 } @@ -3741,7 +4510,8 @@ STREAM: v1.withdrawal "method": "subscribe", "params": { "stream": "v1.withdrawal", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"] + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "use_global_sequence_number": true }, "id": 123 } @@ -3755,7 +4525,8 @@ STREAM: v1.withdrawal "subs": ["'$GRVT_MAIN_ACCOUNT_ID'"], "unsubs": [], "num_snapshots": [10], - "first_sequence_number": [872634876] + "first_sequence_number": [872634876], + "latest_sequence_number": [872634875] }, "id": 123, "method": "subscribe" @@ -3769,7 +4540,8 @@ STREAM: v1.withdrawal "method": "unsubscribe", "params": { "stream": "v1.withdrawal", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"] + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "use_global_sequence_number": true }, "id": 123 } @@ -3834,7 +4606,8 @@ STREAM: v1.withdrawal "expiration": "1697788800000000000", "nonce": 1234567890 } - } + }, + "prev_sequence_number": "872634875" } ``` **Lite Feed Response** @@ -3856,7 +4629,8 @@ STREAM: v1.withdrawal "e": "1697788800000000000", "n": 1234567890 } - } + }, + "ps": "872634875" } ```
@@ -3922,7 +4696,8 @@ STREAM: v1.withdrawal "method": "subscribe", "params": { "stream": "v1.withdrawal", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"] + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "use_global_sequence_number": true }, "id": 123 } @@ -3939,7 +4714,8 @@ STREAM: v1.withdrawal "method": "unsubscribe", "params": { "stream": "v1.withdrawal", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"] + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "use_global_sequence_number": true }, "id": 123 } @@ -3973,7 +4749,8 @@ STREAM: v1.withdrawal "m": "subscribe", "p": { "s": "v1.withdrawal", - "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"] + "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "ug": true }, "i": 123 } @@ -3990,7 +4767,8 @@ STREAM: v1.withdrawal "m": "unsubscribe", "p": { "s": "v1.withdrawal", - "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"] + "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "ug": true }, "i": 123 } @@ -4025,7 +4803,8 @@ STREAM: v1.withdrawal "method": "subscribe", "params": { "stream": "v1.withdrawal", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"] + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "use_global_sequence_number": true }, "id": 123 } @@ -4042,7 +4821,8 @@ STREAM: v1.withdrawal "method": "unsubscribe", "params": { "stream": "v1.withdrawal", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"] + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "use_global_sequence_number": true }, "id": 123 } @@ -4076,7 +4856,8 @@ STREAM: v1.withdrawal "m": "subscribe", "p": { "s": "v1.withdrawal", - "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"] + "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "ug": true }, "i": 123 } @@ -4093,7 +4874,8 @@ STREAM: v1.withdrawal "m": "unsubscribe", "p": { "s": "v1.withdrawal", - "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"] + "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "ug": true }, "i": 123 } @@ -4128,7 +4910,8 @@ STREAM: v1.withdrawal "method": "subscribe", "params": { "stream": "v1.withdrawal", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"] + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "use_global_sequence_number": true }, "id": 123 } @@ -4145,7 +4928,8 @@ STREAM: v1.withdrawal "method": "unsubscribe", "params": { "stream": "v1.withdrawal", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"] + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "use_global_sequence_number": true }, "id": 123 } @@ -4179,7 +4963,8 @@ STREAM: v1.withdrawal "m": "subscribe", "p": { "s": "v1.withdrawal", - "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"] + "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "ug": true }, "i": 123 } @@ -4196,7 +4981,8 @@ STREAM: v1.withdrawal "m": "unsubscribe", "p": { "s": "v1.withdrawal", - "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"] + "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "ug": true }, "i": 123 } @@ -4231,7 +5017,8 @@ STREAM: v1.withdrawal "method": "subscribe", "params": { "stream": "v1.withdrawal", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"] + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "use_global_sequence_number": true }, "id": 123 } @@ -4248,7 +5035,8 @@ STREAM: v1.withdrawal "method": "unsubscribe", "params": { "stream": "v1.withdrawal", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"] + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "use_global_sequence_number": true }, "id": 123 } @@ -4282,7 +5070,8 @@ STREAM: v1.withdrawal "m": "subscribe", "p": { "s": "v1.withdrawal", - "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"] + "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "ug": true }, "i": 123 } @@ -4299,7 +5088,8 @@ STREAM: v1.withdrawal "m": "unsubscribe", "p": { "s": "v1.withdrawal", - "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"] + "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "ug": true }, "i": 123 } diff --git a/artifacts/pysdk/grvt_raw_async.py b/artifacts/pysdk/grvt_raw_async.py index 8ec7600..5ecd289 100644 --- a/artifacts/pysdk/grvt_raw_async.py +++ b/artifacts/pysdk/grvt_raw_async.py @@ -152,6 +152,32 @@ 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: + resp = await self._post(True, self.td_rpc + "/full/v1/dedust_position", req) + if resp.get("code"): + return GrvtError(**resp) + return from_dict(types.ApiDedustPositionResponse, resp, Config(cast=[Enum])) + async def fill_history_v1( self, req: types.ApiFillHistoryRequest ) -> types.ApiFillHistoryResponse | GrvtError: @@ -297,3 +323,11 @@ async def set_initial_leverage_v1( if resp.get("code"): return GrvtError(**resp) return from_dict(types.ApiSetInitialLeverageResponse, resp, Config(cast=[Enum])) + + async def cancel_on_disconnect_v1( + self, req: types.ApiCancelOnDisconnectRequest + ) -> types.AckResponse | GrvtError: + resp = await self._post(True, self.td_rpc + "/full/v1/cancel_on_disconnect", req) + if resp.get("code"): + return GrvtError(**resp) + return from_dict(types.AckResponse, resp, Config(cast=[Enum])) diff --git a/artifacts/pysdk/grvt_raw_sync.py b/artifacts/pysdk/grvt_raw_sync.py index ea8c3f8..7743a30 100644 --- a/artifacts/pysdk/grvt_raw_sync.py +++ b/artifacts/pysdk/grvt_raw_sync.py @@ -150,6 +150,30 @@ 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: + resp = self._post(True, self.td_rpc + "/full/v1/dedust_position", req) + if resp.get("code"): + return GrvtError(**resp) + return from_dict(types.ApiDedustPositionResponse, resp, Config(cast=[Enum])) + def fill_history_v1( self, req: types.ApiFillHistoryRequest ) -> types.ApiFillHistoryResponse | GrvtError: @@ -283,3 +307,11 @@ def set_initial_leverage_v1( if resp.get("code"): return GrvtError(**resp) return from_dict(types.ApiSetInitialLeverageResponse, resp, Config(cast=[Enum])) + + def cancel_on_disconnect_v1( + self, req: types.ApiCancelOnDisconnectRequest + ) -> types.AckResponse | GrvtError: + resp = self._post(True, self.td_rpc + "/full/v1/cancel_on_disconnect", req) + if resp.get("code"): + return GrvtError(**resp) + return from_dict(types.AckResponse, resp, Config(cast=[Enum])) diff --git a/artifacts/pysdk/grvt_raw_types.py b/artifacts/pysdk/grvt_raw_types.py index a2e4b2a..57c58cb 100644 --- a/artifacts/pysdk/grvt_raw_types.py +++ b/artifacts/pysdk/grvt_raw_types.py @@ -15,6 +15,20 @@ class BridgeType(Enum): XY = "XY" +class BrokerTag(Enum): + # CoinRoutes + COIN_ROUTES = "COIN_ROUTES" + # Alertatron + ALERTATRON = "ALERTATRON" + # Origami + ORIGAMI = "ORIGAMI" + + +class CancelStatus(Enum): + # Cancellation has expired because corresponding order had not arrived within the defined time-to-live window. + EXPIRED = "EXPIRED" + + class CandlestickInterval(Enum): # 1 minute CI_1_M = "CI_1_M" @@ -94,6 +108,81 @@ class Currency(Enum): KPEPE = "KPEPE" # the TON token TON = "TON" + # the XRP token + XRP = "XRP" + # the XLM token + XLM = "XLM" + # the WLD token + WLD = "WLD" + # the WIF token + WIF = "WIF" + # the VIRTUAL token + VIRTUAL = "VIRTUAL" + # the TRUMP token + TRUMP = "TRUMP" + # the SUI token + SUI = "SUI" + # the 1000SHIB token + KSHIB = "KSHIB" + # the POPCAT token + POPCAT = "POPCAT" + # the PENGU token + PENGU = "PENGU" + # the LINK token + LINK = "LINK" + # the 1000BONK token + KBONK = "KBONK" + # the JUP token + JUP = "JUP" + # the FARTCOIN token + FARTCOIN = "FARTCOIN" + # the ENA token + ENA = "ENA" + # the DOGE token + DOGE = "DOGE" + # the AIXBT token + AIXBT = "AIXBT" + # the AI16Z token + AI_16_Z = "AI_16_Z" + # the ADA token + ADA = "ADA" + # the AAVE token + AAVE = "AAVE" + # the BERA token + BERA = "BERA" + # the VINE token + VINE = "VINE" + # the PENDLE token + PENDLE = "PENDLE" + # the UXLINK token + UXLINK = "UXLINK" + + +class EpochBadgeType(Enum): + # Champion + CHAMPION = "CHAMPION" + # Legend + LEGEND = "LEGEND" + # Veteran + VETERAN = "VETERAN" + # Elite + ELITE = "ELITE" + # Master + MASTER = "MASTER" + # Expert + EXPERT = "EXPERT" + # Warrior + WARRIOR = "WARRIOR" + # Sergeant + SERGEANT = "SERGEANT" + # Ranger + RANGER = "RANGER" + # Challenger + CHALLENGER = "CHALLENGER" + # Apprentice + APPRENTICE = "APPRENTICE" + # Rookie + ROOKIE = "ROOKIE" class InstrumentSettlementPeriod(Enum): @@ -186,6 +275,8 @@ class OrderRejectReason(Enum): EXCEED_MAX_SIGNATURE_EXPIRATION = "EXCEED_MAX_SIGNATURE_EXPIRATION" # the market order has a limit price set 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" class OrderStatus(Enum): @@ -201,6 +292,21 @@ class OrderStatus(Enum): CANCELLED = "CANCELLED" +class RewardEpochStatus(Enum): + # Past + PAST = "PAST" + # Current + CURRENT = "CURRENT" + # Future + FUTURE = "FUTURE" + + +class RewardProgramType(Enum): + ECOSYSTEM = "ECOSYSTEM" + TRADER = "TRADER" + LP = "LP" + + class SubAccountTradeInterval(Enum): # 1 month SAT_1_MO = "SAT_1_MO" @@ -238,6 +344,40 @@ class TransferType(Enum): FAST_ARB_WITHDRAWAL = "FAST_ARB_WITHDRAWAL" +class TriggerBy(Enum): + """ + Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order. + + 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. + + + """ + + # no trigger condition + UNSPECIFIED = "UNSPECIFIED" + # INDEX - Order is activated when the index price reaches the trigger price + INDEX = "INDEX" + # LAST - Order is activated when the last trade price reaches the trigger price + LAST = "LAST" + + +class TriggerType(Enum): + """ + Defines the type of trigger order used in trading, such as Take Profit or Stop Loss. + + Trigger orders allow execution based on pre-defined price conditions rather than immediate market conditions. + + + """ + + # Not a trigger order. The order executes normally without any trigger conditions. + UNSPECIFIED = "UNSPECIFIED" + # Take Profit Order - Executes when the price reaches a specified level to secure profits. + TAKE_PROFIT = "TAKE_PROFIT" + # Stop Loss Order - Executes when the price reaches a specified level to limit losses. + STOP_LOSS = "STOP_LOSS" + + class Venue(Enum): # the trade is cleared on the orderbook venue ORDERBOOK = "ORDERBOOK" @@ -395,6 +535,8 @@ class Fill: client_order_id: str # The address (public key) of the wallet signing the payload signer: str + # Specifies the broker who brokered the order + broker: BrokerTag | None = None @dataclass @@ -1160,6 +1302,8 @@ class WSSubscribeParams: stream: str # The list of feeds to subscribe to selectors: list[str] + # Whether to use the global sequence number for the stream + use_global_sequence_number: bool | None = None @dataclass @@ -1179,6 +1323,8 @@ class WSSubscribeResult: num_snapshots: list[int] # The first sequence number to expect for each subscribed feed. Returned in same order as `subs` first_sequence_number: list[str] + # The sequence number of the most recent message in the stream. Next received sequence number must be larger than this one. Returned in same order as `subs` + latest_sequence_number: list[str] @dataclass @@ -1187,6 +1333,8 @@ class WSUnsubscribeParams: stream: str # The list of feeds to unsubscribe from selectors: list[str] + # Whether to use the global sequence number for the stream + use_global_sequence_number: bool | None = None @dataclass @@ -1239,6 +1387,8 @@ class WSSubscribeResponseV1Legacy: num_snapshots: list[int] # The first sequence number to expect for each subscribed feed. Returned in same order as `subs` first_sequence_number: list[str] + # The sequence number of the most recent message in the stream. Next received sequence number must be larger than this one. Returned in same order as `subs` + latest_sequence_number: list[str] """ Optional Field which is used to match the response by the client. If not passed, this field will not be returned @@ -1285,6 +1435,8 @@ class WSOrderbookLevelsFeedDataV1: sequence_number: str # An orderbook levels object matching the request filter feed: OrderbookLevels + # The previous sequence number that determines global message order within the specific stream + prev_sequence_number: str @dataclass @@ -1318,6 +1470,8 @@ class WSMiniTickerFeedDataV1: sequence_number: str # A mini ticker matching the request filter feed: MiniTicker + # The previous sequence number that determines global message order within the specific stream + prev_sequence_number: str @dataclass @@ -1351,6 +1505,8 @@ class WSTickerFeedDataV1: sequence_number: str # A ticker matching the request filter feed: Ticker + # The previous sequence number that determines global message order within the specific stream + prev_sequence_number: str @dataclass @@ -1377,6 +1533,8 @@ class WSTradeFeedDataV1: sequence_number: str # A public trade matching the request filter feed: Trade + # The previous sequence number that determines global message order within the specific stream + prev_sequence_number: str @dataclass @@ -1404,6 +1562,8 @@ class WSCandlestickFeedDataV1: sequence_number: str # A candlestick entry matching the request filters feed: Candlestick + # The previous sequence number that determines global message order within the specific stream + prev_sequence_number: str @dataclass @@ -1485,6 +1645,44 @@ class Signature: nonce: int +@dataclass +class TPSLOrderMetadata: + """ + Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders. + + ### Fields: + - **triggerBy**: Defines the price type that activates the order (e.g., index price). + - **triggerPrice**: The price at which the order is triggered, expressed in `9` decimal precision. + + + """ + + # Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order + trigger_by: TriggerBy + # The Trigger Price of the order, expressed in `9` decimals. + trigger_price: str + + +@dataclass +class TriggerOrderMetadata: + """ + Contains metadata related to trigger orders, such as Take Profit (TP) or Stop Loss (SL). + + Trigger orders are used to automatically execute an order when a predefined price condition is met, allowing traders to implement risk management strategies. + + + """ + + # Type of the trigger order. eg: Take Profit, Stop Loss, etc + trigger_type: TriggerType + """ + Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders. + + + """ + tpsl: TPSLOrderMetadata + + @dataclass class OrderMetadata: """ @@ -1504,8 +1702,12 @@ class OrderMetadata: When GRVT Backend receives an order with an overlapping clientOrderID, we will reject the order with rejectReason set to overlappingClientOrderId """ client_order_id: str + # Trigger fields are used to support any type of trigger order such as TP/SL + trigger: TriggerOrderMetadata # [Filled by GRVT Backend] Time at which the order was received by GRVT in unix nanoseconds create_time: str | None = None + # Specifies the broker who brokered the order + broker: BrokerTag | None = None @dataclass @@ -1603,6 +1805,16 @@ class ApiCancelOrderRequest: order_id: str | None = None # Cancel the order with this `client_order_id` client_order_id: str | None = None + """ + Specifies the time-to-live (in milliseconds) for this cancellation. + During this period, any order creation with a matching `client_order_id` will also be cancelled. + This mechanism helps mitigate time-of-flight issues where cancellations might arrive before the corresponding orders. + Hence, cancellation by `order_id` ignores this field as the exchange can only assign `order_id`s to already-processed order creations. + The duration cannot be negative, is rounded down to the nearest 100ms (e.g., `670` -> `600`, `30` -> `0`) and capped at 5 seconds (i.e., `5000`). + Value of `0` or omission disables the TTL mechanism, so only orders already existing in matcher state at request time will be searched. + + """ + time_to_live_ms: str | None = None @dataclass @@ -1784,6 +1996,48 @@ class ApiPreDepositCheckResponse: currency: Currency +@dataclass +class ApiDedustPositionRequest: + # The order to create + order: Order + + +@dataclass +class ApiDedustPositionResponse: + # The created order + result: Order + + +@dataclass +class ApiCancelOnDisconnectRequest: + """ + Auto-Cancel All Open Orders when the countdown time hits zero. + + Market Maker inputs a countdown time parameter in milliseconds (e.g. 120000 for 120s) rounded down to the smallest second follows the following logic: + - Market Maker initially entered a value between 0 -> 1000, which is rounded to 0: will result in termination of their COD + - Market Maker initially entered a value between 1001 -> 300_000, which is rounded to the nearest second: will result in refresh of their COD + - Market Maker initially entered a value bigger than 300_000, which will result in error (upper bound) + Market Maker will send a heartbeat message by calling the endpoint at specific intervals (ex. every 30 seconds) to the server to refresh the count down. + + 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. + """ + + # The subaccount ID cancelling the orders for + sub_account_id: str + """ + Countdown time in milliseconds (ex. 120000 for 120s). + + 0 to disable the timer. + + Does not accept negative values. + + Minimum acceptable value is 1,000. + + Maximum acceptable value is 300,000 + """ + countdown_time: str | None = None + + @dataclass class ApiGetUserEcosystemPointRequest: # The off chain account id @@ -1834,6 +2088,14 @@ class ApiGetEcosystemLeaderboardRequest: limit: int +@dataclass +class ApiGetVerifiedEcosystemLeaderboardRequest: + # Start time of the epoch + calculate_from: str + # Completed KYC before this time + completed_kyc_before: str + + @dataclass class ApiGetEcosystemLeaderboardResponse: # The list of ecosystem points @@ -1926,6 +2188,112 @@ class ApiFindEcosystemLeaderboardResponse: users: list[EcosystemLeaderboardUser] +@dataclass +class QueryEpochBadgeRequest: + # The off chain account id to get referral stats + account_id: str | None = None + # The numerical epoch index + epoch: int | None = None + # The type of the reward program + type: RewardProgramType | None = None + # The limit to query for. Defaults to 500; Max 1000 + limit: int | None = None + # The cursor to indicate when to start the query from + cursor: str | None = None + + +@dataclass +class EpochBadge: + # The off chain account id + account_id: str + # The account ID + main_account_id: str + # The type of the reward program + type: RewardProgramType + # The epoch number + epoch: int + # The start time of the epoch + epoch_start_time: str + # The end time of the epoch + epoch_end_time: str + # The type of the badge + badge: EpochBadgeType + # The distributed badges + distributed_badges: list[EpochBadgeType] + # Total point + total_point: str + # Rank + rank: int + # The time when the badge was claimed, or the epoch end time if the user has already completed the KYC process + claimed_at: str + + +@dataclass +class QueryEpochBadgeResponse: + # The list of epoch badges + result: list[EpochBadge] + # The cursor to indicate when to start the query from + next: str + + +@dataclass +class QueryEpochBadgePointDistributionRequest: + # The type of the reward program + type: RewardProgramType + # The numerical epoch index + epoch: int | None = None + + +@dataclass +class EpochBadgePointDistribution: + # The type of the badge + badge: EpochBadgeType + # The epoch number + epoch: int + # The type of the reward program + type: RewardProgramType + # The minimum point to get the badge + min_point: str + # The maximum point to get the badge + max_point: str + # The minimum rank to get the badge + min_rank: int + # The maximum rank to get the badge + max_rank: int + # The total point to get the badge + total_point: str + # The number of users to get the badge + count: int + + +@dataclass +class QueryEpochBadgePointDistributionResponse: + # The list of epoch badges + result: list[EpochBadgePointDistribution] + + +@dataclass +class ApiGetListEpochBadgeResponse: + # The list of epoch badges + result: list[EpochBadge] + + +@dataclass +class GetClaimableEcosystemBadgeResponse: + # The epoch badge + badge: EpochBadge + # Whether the badge is claimable + is_claimable: bool + # The time when the badge is claimable + claimable_until: str + + +@dataclass +class ClaimEcosystemBadgeResponse: + # The epoch badge + badge: EpochBadge + + @dataclass class ApiGetListFlatReferralRequest: # The off chain referrer account id to get all flat referrals @@ -1954,6 +2322,12 @@ class FlatReferral: referrer_main_account_id: str # The account is a business account or not is_business: bool + # The account is KYC verified or not + is_kyc_completed: bool + # The KYC completed time + kyc_completed_at: str + # The KYC type, can be 'individual' or 'business' + kyc_type: str @dataclass @@ -2056,14 +2430,14 @@ class ApiGetLatestLPSnapshotResponse: @dataclass class ApiGetLPLeaderboardRequest: - # Start time of the epoch - phase - start_interval: str # The number of accounts to return limit: int # The kind filter to apply kind: Kind # The base filter to apply base: Currency + # The epoch to filter + epoch: int | None = None @dataclass @@ -2074,8 +2448,8 @@ class ApiGetLPLeaderboardResponse: @dataclass class ApiGetLPPointRequest: - # Optional. Start time of the epoch - phase - start_interval: str | None = None + # The epoch to filter + epoch: int | None = None # Optional. The kind filter to apply kind: Kind | None = None # Optional. The base filter to apply @@ -2118,6 +2492,26 @@ class ApiGetLPInfoResponse: bid_fast_market_multiplier: int +@dataclass +class RewardEpochInfo: + # The epoch number + epoch: int + # The start time of the epoch + epoch_start_time: str + # The end time of the epoch + epoch_end_time: str + # The status of the epoch + status: RewardEpochStatus + + +@dataclass +class ApiGetListRewardEpochResponse: + # The list of epoch for ecosystem reward + ecosystem_epochs: list[RewardEpochInfo] + # The list of epoch for trader reward and lp reward + trading_epochs: list[RewardEpochInfo] + + @dataclass class ApiSubAccountTradeAggregationRequest: # Optional. The limit of the number of results to return @@ -2231,6 +2625,8 @@ class WSOrderFeedDataV1: sequence_number: str # The order object being created or updated feed: Order + # The previous sequence number that determines global message order within the specific stream + prev_sequence_number: str @dataclass @@ -2269,6 +2665,8 @@ class WSOrderStateFeedDataV1: sequence_number: str # The Order State Feed feed: OrderStateFeed + # The previous sequence number that determines global message order within the specific stream + prev_sequence_number: str @dataclass @@ -2295,6 +2693,8 @@ class WSPositionsFeedDataV1: sequence_number: str # A Position being created or updated matching the request filter feed: Positions + # The previous sequence number that determines global message order within the specific stream + prev_sequence_number: str @dataclass @@ -2321,6 +2721,8 @@ class WSFillFeedDataV1: sequence_number: str # A private trade matching the request filter feed: Fill + # The previous sequence number that determines global message order within the specific stream + prev_sequence_number: str @dataclass @@ -2338,7 +2740,9 @@ class WSTransferFeedSelectorV1: @dataclass -class Transfer: +class TransferHistory: + # The transaction ID of the transfer + tx_id: str # The account to transfer from from_account_id: str # The subaccount to transfer from (0 if transferring from main account) @@ -2353,6 +2757,8 @@ class Transfer: num_tokens: str # The signature of the transfer signature: Signature + # The timestamp of the transfer in unix nanoseconds + event_time: str # The type of transfer transfer_type: TransferType # The metadata of the transfer @@ -2367,8 +2773,10 @@ class WSTransferFeedDataV1: selector: str # A running sequence number that determines global message order within the specific stream sequence_number: str - # The Transfer object - feed: Transfer + # The transfer history matching the requested filters + feed: TransferHistory + # The previous sequence number that determines global message order within the specific stream + prev_sequence_number: str @dataclass @@ -2404,6 +2812,8 @@ class WSDepositFeedDataV1: sequence_number: str # The Deposit object feed: Deposit + # The previous sequence number that determines global message order within the specific stream + prev_sequence_number: str @dataclass @@ -2441,6 +2851,53 @@ class WSWithdrawalFeedDataV1: sequence_number: str # The Withdrawal object feed: Withdrawal + # The previous sequence number that determines global message order within the specific stream + prev_sequence_number: str + + +@dataclass +class CancelStatusFeed: + # The subaccount ID that requested the cancellation + sub_account_id: str + # A unique identifier for the active order within a subaccount, specified by the client + client_order_id: str + # A unique 128-bit identifier for the order, deterministically generated within the GRVT backend + order_id: str + # The user-provided reason for cancelling the order + reason: OrderRejectReason + # Status of the cancellation attempt + cancel_status: CancelStatus + # [Filled by GRVT Backend] Time at which the cancellation status was updated by GRVT in unix nanoseconds + update_time: str | None = None + + +@dataclass +class WSCancelFeedDataV1: + # Stream name + stream: str + # Primary selector + selector: str + # A running sequence number that determines global message order within the specific stream + sequence_number: str + # Data relating to the status of the cancellation attempt + feed: CancelStatusFeed + # The previous sequence number that determines global message order within the specific stream + prev_sequence_number: str + + +@dataclass +class WSCancelFeedSelectorV1: + """ + Subscribes to a feed of time-to-live expiry events for order cancellations requested by a given subaccount. + **This stream presently only provides expiry updates for cancel-order requests set with a valid TTL value**. + Successful order cancellations will reflect as updates published to the (order-state stream)[https://api-docs.grvt.io/trading_streams/#order-state]. + _A future release will expand the functionality of this stream to provide more general status updates on order cancellation requests._ + Each Order can be uniquely identified by its `client_order_id`. + + """ + + # The subaccount ID to filter by + sub_account_id: str @dataclass @@ -2569,32 +3026,8 @@ class ApiTransferHistoryRequest: limit: int | None = None # The cursor to indicate when to start the next query from cursor: str | None = None - - -@dataclass -class TransferHistory: - # The transaction ID of the transfer - tx_id: str - # The account to transfer from - from_account_id: str - # The subaccount to transfer from (0 if transferring from main account) - from_sub_account_id: str - # The account to deposit into - to_account_id: str - # The subaccount to transfer to (0 if transferring to main account) - to_sub_account_id: str - # The token currency to transfer - currency: Currency - # The number of tokens to transfer - num_tokens: str - # The signature of the transfer - signature: Signature - # The timestamp of the transfer in unix nanoseconds - event_time: str - # The type of transfer - transfer_type: TransferType - # The metadata of the transfer - transfer_metadata: str + # The transaction ID to query for + tx_id: str | None = None @dataclass diff --git a/src/codegen/apispec.json b/src/codegen/apispec.json index 1a02398..867533c 100644 --- a/src/codegen/apispec.json +++ b/src/codegen/apispec.json @@ -755,6 +755,11 @@ "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", @@ -910,10 +915,30 @@ "message": "Pre-order check failed", "status": 400 }, + { + "code": 2083, + "message": "Order Fill would result in exceeding maximum position size under current configurable leverage tier", + "status": 400 + }, { "code": 2090, "message": "Max open orders exceeded", "status": 429 + }, + { + "code": 2110, + "message": "Invalid trigger by", + "status": 400 + }, + { + "code": 2111, + "message": "Unsupported trigger by", + "status": 400 + }, + { + "code": 2112, + "message": "Invalid trigger order", + "status": 400 } ] }, @@ -956,6 +981,16 @@ "message": "Your IP has not been whitelisted for access", "status": 401 }, + { + "code": 2300, + "message": "Order cancel time-to-live settings currently disabled.", + "status": 400 + }, + { + "code": 2301, + "message": "Order cancel time-to-live exceeds maximum allowed value.", + "status": 400 + }, { "code": 3021, "message": "Either order ID or client order ID must be supplied", @@ -1179,13 +1214,13 @@ ] }, { - "namespace": "Execution", - "name": "RPCFillHistoryV1", + "namespace": "Order", + "name": "RPCCancelTriggerOrderV1", "version": 1, - "route": "/fill_history", + "route": "/cancel_trigger_order", "auth_required": true, - "request": "ApiFillHistoryRequest", - "response": "ApiFillHistoryResponse", + "request": "ApiCancelOrderRequest", + "response": "AckResponse", "on_request_errors": [ { "code": 1000, @@ -1216,17 +1251,22 @@ "code": 1008, "message": "Your IP has not been whitelisted for access", "status": 401 + }, + { + "code": 3021, + "message": "Either order ID or client order ID must be supplied", + "status": 400 } ] }, { - "namespace": "Execution", - "name": "RPCPositionsV1", + "namespace": "Order", + "name": "RPCCancelAllTriggerOrdersV1", "version": 1, - "route": "/positions", + "route": "/cancel_all_trigger_orders", "auth_required": true, - "request": "ApiPositionsRequest", - "response": "ApiPositionsResponse", + "request": "ApiCancelAllOrdersRequest", + "response": "AckResponse", "on_request_errors": [ { "code": 1000, @@ -1261,13 +1301,13 @@ ] }, { - "namespace": "Execution", - "name": "RPCFundingPaymentHistoryV1", + "namespace": "Position", + "name": "RPCDedustPositionV1", "version": 1, - "route": "/funding_payment_history", + "route": "/dedust_position", "auth_required": true, - "request": "ApiFundingPaymentHistoryRequest", - "response": "ApiFundingPaymentHistoryResponse", + "request": "ApiDedustPositionRequest", + "response": "ApiDedustPositionResponse", "on_request_errors": [ { "code": 1000, @@ -1289,6 +1329,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", @@ -1298,17 +1348,197 @@ "code": 1008, "message": "Your IP has not been whitelisted for access", "status": 401 + }, + { + "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": "Transfer", - "name": "RPCDepositHistoryV1", + "namespace": "Execution", + "name": "RPCFillHistoryV1", "version": 1, - "route": "/deposit_history", + "route": "/fill_history", "auth_required": true, - "request": "ApiDepositHistoryRequest", - "response": "ApiDepositHistoryResponse", + "request": "ApiFillHistoryRequest", + "response": "ApiFillHistoryResponse", "on_request_errors": [ { "code": 1000, @@ -1343,13 +1573,13 @@ ] }, { - "namespace": "Transfer", - "name": "RPCTransferV1", + "namespace": "Execution", + "name": "RPCPositionsV1", "version": 1, - "route": "/transfer", + "route": "/positions", "auth_required": true, - "request": "ApiTransferRequest", - "response": "AckResponse", + "request": "ApiPositionsRequest", + "response": "ApiPositionsResponse", "on_request_errors": [ { "code": 1000, @@ -1384,13 +1614,13 @@ ] }, { - "namespace": "Transfer", - "name": "RPCTransferHistoryV1", + "namespace": "Execution", + "name": "RPCFundingPaymentHistoryV1", "version": 1, - "route": "/transfer_history", + "route": "/funding_payment_history", "auth_required": true, - "request": "ApiTransferHistoryRequest", - "response": "ApiTransferHistoryResponse", + "request": "ApiFundingPaymentHistoryRequest", + "response": "ApiFundingPaymentHistoryResponse", "on_request_errors": [ { "code": 1000, @@ -1426,13 +1656,166 @@ }, { "namespace": "Transfer", - "name": "RPCWithdrawalV1", + "name": "RPCDepositHistoryV1", "version": 1, - "route": "/withdrawal", + "route": "/deposit_history", "auth_required": true, - "request": "ApiWithdrawalRequest", - "response": "AckResponse", - "on_request_errors": [ + "request": "ApiDepositHistoryRequest", + "response": "ApiDepositHistoryResponse", + "on_request_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": 1003, + "message": "Request could not be processed due to malformed syntax", + "status": 400 + }, + { + "code": 1006, + "message": "You have surpassed the allocated rate limit for your tier", + "status": 429 + }, + { + "code": 1008, + "message": "Your IP has not been whitelisted for access", + "status": 401 + } + ] + }, + { + "namespace": "Transfer", + "name": "RPCTransferV1", + "version": 1, + "route": "/transfer", + "auth_required": true, + "request": "ApiTransferRequest", + "response": "AckResponse", + "on_request_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": 1003, + "message": "Request could not be processed due to malformed syntax", + "status": 400 + }, + { + "code": 1006, + "message": "You have surpassed the allocated rate limit for your tier", + "status": 429 + }, + { + "code": 1008, + "message": "Your IP has not been whitelisted for access", + "status": 401 + }, + { + "code": 5000, + "message": "Transfer Metadata does not match the expected structure.", + "status": 400 + }, + { + "code": 5001, + "message": "Transfer Provider does not match the expected provider.", + "status": 400 + }, + { + "code": 5002, + "message": "Direction of the transfer does not match the expected direction.", + "status": 400 + }, + { + "code": 5003, + "message": "Endpoint account ID is invalid.", + "status": 400 + }, + { + "code": 5004, + "message": "Funding account does not exist in our system.", + "status": 400 + }, + { + "code": 5005, + "message": "Invalid ChainID for the transfer request.", + "status": 400 + } + ] + }, + { + "namespace": "Transfer", + "name": "RPCTransferHistoryV1", + "version": 1, + "route": "/transfer_history", + "auth_required": true, + "request": "ApiTransferHistoryRequest", + "response": "ApiTransferHistoryResponse", + "on_request_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": 1003, + "message": "Request could not be processed due to malformed syntax", + "status": 400 + }, + { + "code": 1006, + "message": "You have surpassed the allocated rate limit for your tier", + "status": 429 + }, + { + "code": 1008, + "message": "Your IP has not been whitelisted for access", + "status": 401 + } + ] + }, + { + "namespace": "Transfer", + "name": "RPCWithdrawalV1", + "version": 1, + "route": "/withdrawal", + "auth_required": true, + "request": "ApiWithdrawalRequest", + "response": "AckResponse", + "on_request_errors": [ { "code": 1000, "message": "You need to authenticate prior to using this functionality", @@ -1808,6 +2191,52 @@ "status": 400 } ] + }, + { + "namespace": "Order", + "name": "RPCCancelOnDisconnectV1", + "version": 1, + "route": "/cancel_on_disconnect", + "auth_required": true, + "request": "ApiCancelOnDisconnectRequest", + "response": "AckResponse", + "on_request_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": 1003, + "message": "Request could not be processed due to malformed syntax", + "status": 400 + }, + { + "code": 1006, + "message": "You have surpassed the allocated rate limit for your tier", + "status": 429 + }, + { + "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 + } + ] } ], "streams": [ @@ -1921,6 +2350,61 @@ } ] }, + { + "namespace": "Order", + "name": "StreamCancelStatusV1", + "channel": "v1.cancel", + "auth_required": true, + "feed_selector": "WSCancelFeedSelectorV1", + "feed": "WSCancelFeedDataV1", + "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": 3000, + "message": "Instrument is invalid", + "status": 400 + }, + { + "code": 3020, + "message": "Sub account ID must be an uint64 integer", + "status": 400 + } + ] + }, { "namespace": "Execution", "name": "StreamFillV1", @@ -2807,6 +3291,19 @@ "comment": [ "The address (public key) of the wallet signing the payload" ] + }, + { + "name": "broker", + "lite_name": "b", + "semantic_type": "BrokerTag", + "json_type": "BrokerTag", + "index": 21, + "array_depth": 0, + "optional": true, + "default": "", + "comment": [ + "Specifies the broker who brokered the order" + ] } ], "comment": [] @@ -6046,6 +6543,20 @@ "comment": [ "The list of feeds to subscribe to" ] + }, + { + "name": "use_global_sequence_number", + "lite_name": "ug", + "semantic_type": "bool", + "json_type": "boolean", + "index": 2, + "array_depth": 0, + "optional": true, + "default": "false", + "example": "true", + "comment": [ + "Whether to use the global sequence number for the stream" + ] } ], "comment": [ @@ -6121,6 +6632,19 @@ "comment": [ "The first sequence number to expect for each subscribed feed. Returned in same order as `subs`" ] + }, + { + "name": "latest_sequence_number", + "lite_name": "ls", + "semantic_type": "uint64", + "json_type": "string", + "index": 5, + "array_depth": 1, + "optional": false, + "example": "872634875", + "comment": [ + "The sequence number of the most recent message in the stream. Next received sequence number must be larger than this one. Returned in same order as `subs`" + ] } ], "comment": [ @@ -6157,6 +6681,20 @@ "comment": [ "The list of feeds to unsubscribe from" ] + }, + { + "name": "use_global_sequence_number", + "lite_name": "ug", + "semantic_type": "bool", + "json_type": "boolean", + "index": 2, + "array_depth": 0, + "optional": true, + "default": "false", + "example": "true", + "comment": [ + "Whether to use the global sequence number for the stream" + ] } ], "comment": [ @@ -6360,6 +6898,19 @@ "comment": [ "The first sequence number to expect for each subscribed feed. Returned in same order as `subs`" ] + }, + { + "name": "latest_sequence_number", + "lite_name": "ls", + "semantic_type": "uint64", + "json_type": "string", + "index": 6, + "array_depth": 1, + "optional": false, + "example": "872634875", + "comment": [ + "The sequence number of the most recent message in the stream. Next received sequence number must be larger than this one. Returned in same order as `subs`" + ] } ], "comment": [ @@ -6486,6 +7037,19 @@ "comment": [ "An orderbook levels object matching the request filter" ] + }, + { + "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": [] @@ -6588,6 +7152,19 @@ "comment": [ "A mini ticker matching the request filter" ] + }, + { + "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": [] @@ -6690,6 +7267,19 @@ "comment": [ "A ticker matching the request filter" ] + }, + { + "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": [] @@ -6804,6 +7394,19 @@ "comment": [ "A public trade matching the request filter" ] + }, + { + "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": [] @@ -6912,6 +7515,19 @@ "comment": [ "A candlestick entry matching the request filters" ] + }, + { + "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": [] @@ -7199,6 +7815,85 @@ ], "comment": [] }, + { + "name": "TPSLOrderMetadata", + "is_root": false, + "fields": [ + { + "name": "trigger_by", + "lite_name": "tb", + "semantic_type": "TriggerBy", + "json_type": "TriggerBy", + "index": 0, + "array_depth": 0, + "optional": false, + "comment": [ + "Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order" + ] + }, + { + "name": "trigger_price", + "lite_name": "tp", + "semantic_type": "string", + "json_type": "string", + "index": 1, + "array_depth": 0, + "optional": false, + "example": "'65038.10'", + "comment": [ + "The Trigger Price of the order, expressed in `9` decimals." + ] + } + ], + "comment": [ + "Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.", + "", + "### Fields:", + "- **triggerBy**: Defines the price type that activates the order (e.g., index price).", + "- **triggerPrice**: The price at which the order is triggered, expressed in `9` decimal precision.", + "", + "" + ] + }, + { + "name": "TriggerOrderMetadata", + "is_root": false, + "fields": [ + { + "name": "trigger_type", + "lite_name": "tt", + "semantic_type": "TriggerType", + "json_type": "TriggerType", + "index": 0, + "array_depth": 0, + "optional": false, + "comment": [ + "Type of the trigger order. eg: Take Profit, Stop Loss, etc" + ] + }, + { + "name": "tpsl", + "lite_name": "t", + "semantic_type": "TPSLOrderMetadata", + "json_type": "TPSLOrderMetadata", + "index": 1, + "array_depth": 0, + "optional": false, + "comment": [ + "Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.", + "", + "" + ] + } + ], + "comment": [ + "Contains metadata related to trigger orders, such as Take Profit (TP) or Stop Loss (SL).", + "", + "Trigger orders are used to automatically execute an order when a predefined price condition is met, allowing traders to implement risk management strategies.", + "", + "" + ] + }, { "name": "OrderMetadata", "is_root": false, @@ -7237,6 +7932,31 @@ "comment": [ "[Filled by GRVT Backend] Time at which the order was received by GRVT in unix nanoseconds" ] + }, + { + "name": "trigger", + "lite_name": "t", + "semantic_type": "TriggerOrderMetadata", + "json_type": "TriggerOrderMetadata", + "index": 2, + "array_depth": 0, + "optional": false, + "comment": [ + "Trigger fields are used to support any type of trigger order such as TP/SL" + ] + }, + { + "name": "broker", + "lite_name": "b", + "semantic_type": "BrokerTag", + "json_type": "BrokerTag", + "index": 3, + "array_depth": 0, + "optional": true, + "default": "", + "comment": [ + "Specifies the broker who brokered the order" + ] } ], "comment": [ @@ -7574,6 +8294,26 @@ "comment": [ "Cancel the order with this `client_order_id`" ] + }, + { + "name": "time_to_live_ms", + "lite_name": "tt", + "semantic_type": "uint64", + "json_type": "string", + "index": 3, + "array_depth": 0, + "optional": true, + "default": "500", + "example": "`500`", + "comment": [ + "Specifies the time-to-live (in milliseconds) for this cancellation.", + "During this period, any order creation with a matching `client_order_id` will also be cancelled.", + "This mechanism helps mitigate time-of-flight issues where cancellations might arrive before the corresponding orders.", + "Hence, cancellation by `order_id` ignores this field as the exchange can only assign `order_id`s to already-processed order creations.", + "The duration cannot be negative, is rounded down to the nearest 100ms (e.g., `670` -\u003e `600`, `30` -\u003e `0`) and capped at 5 seconds (i.e., `5000`).", + "Value of `0` or omission disables the TTL mechanism, so only orders already existing in matcher state at request time will be searched.", + "" + ] } ], "comment": [ @@ -8343,6 +9083,98 @@ ], "comment": [] }, + { + "name": "ApiDedustPositionRequest", + "is_root": true, + "fields": [ + { + "name": "order", + "lite_name": "o", + "semantic_type": "Order", + "json_type": "Order", + "index": 0, + "array_depth": 0, + "optional": false, + "comment": [ + "The order to create" + ] + } + ], + "comment": [ + "Remove dust position (i.e., order quantity smaller than minimum required increment) on an account, by matching the specified order against GRVT directly. Limit price should always be better than mark price." + ] + }, + { + "name": "ApiDedustPositionResponse", + "is_root": true, + "fields": [ + { + "name": "result", + "lite_name": "r", + "semantic_type": "Order", + "json_type": "Order", + "index": 0, + "array_depth": 0, + "optional": false, + "comment": [ + "The created order" + ] + } + ], + "comment": [] + }, + { + "name": "ApiCancelOnDisconnectRequest", + "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 cancelling the orders for" + ] + }, + { + "name": "countdown_time", + "lite_name": "ct", + "semantic_type": "uint64", + "json_type": "string", + "index": 1, + "array_depth": 0, + "optional": true, + "default": "1000", + "example": "300", + "comment": [ + "Countdown time in milliseconds (ex. 120000 for 120s).", + "", + "0 to disable the timer.", + "", + "Does not accept negative values.", + "", + "Minimum acceptable value is 1,000.", + "", + "Maximum acceptable value is 300,000" + ] + } + ], + "comment": [ + "Auto-Cancel All Open Orders when the countdown time hits zero.", + "", + "Market Maker inputs a countdown time parameter in milliseconds (e.g. 120000 for 120s) rounded down to the smallest second follows the following logic:", + " - Market Maker initially entered a value between 0 -\u003e 1000, which is rounded to 0: will result in termination of their COD", + " - Market Maker initially entered a value between 1001 -\u003e 300_000, which is rounded to the nearest second: will result in refresh of their COD", + " - Market Maker initially entered a value bigger than 300_000, which will result in error (upper bound)", + "Market Maker will send a heartbeat message by calling the endpoint at specific intervals (ex. every 30 seconds) to the server to refresh the count down.", + "", + "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": "ApiGetUserEcosystemPointRequest", "is_root": true, @@ -8594,26 +9426,59 @@ "comment": [] }, { - "name": "ApiGetEcosystemLeaderboardResponse", + "name": "ApiGetVerifiedEcosystemLeaderboardRequest", "is_root": true, "fields": [ { - "name": "points", - "lite_name": "p", - "semantic_type": "EcosystemPoint", - "json_type": "EcosystemPoint", + "name": "calculate_from", + "lite_name": "cf", + "semantic_type": "timestamp", + "json_type": "string", "index": 0, - "array_depth": 1, + "array_depth": 0, "optional": false, + "example": "'1697788800000000000'", "comment": [ - "The list of ecosystem points" + "Start time of the epoch" + ] + }, + { + "name": "completed_kyc_before", + "lite_name": "ck", + "semantic_type": "timestamp", + "json_type": "string", + "index": 1, + "array_depth": 0, + "optional": false, + "example": "'1697788800000000000'", + "comment": [ + "Completed KYC before this time" ] } ], "comment": [] }, { - "name": "ApiGetEcosystemReferralStatResponse", + "name": "ApiGetEcosystemLeaderboardResponse", + "is_root": true, + "fields": [ + { + "name": "points", + "lite_name": "p", + "semantic_type": "EcosystemPoint", + "json_type": "EcosystemPoint", + "index": 0, + "array_depth": 1, + "optional": false, + "comment": [ + "The list of ecosystem points" + ] + } + ], + "comment": [] + }, + { + "name": "ApiGetEcosystemReferralStatResponse", "is_root": true, "fields": [ { @@ -9035,70 +9900,86 @@ "comment": [] }, { - "name": "ApiGetListFlatReferralRequest", + "name": "QueryEpochBadgeRequest", "is_root": true, "fields": [ { - "name": "referral_id", - "lite_name": "ri", + "name": "account_id", + "lite_name": "ai", "semantic_type": "string", "json_type": "string", "index": 0, "array_depth": 0, - "optional": false, + "optional": true, + "default": "'all'", "example": "'ACC_1234567890'", "comment": [ - "The off chain referrer account id to get all flat referrals" + "The off chain account id to get referral stats" ] }, { - "name": "start_time", - "lite_name": "st", - "semantic_type": "timestamp", - "json_type": "string", + "name": "epoch", + "lite_name": "e", + "semantic_type": "int32", + "json_type": "integer", "index": 1, "array_depth": 0, "optional": true, - "default": "0", - "example": "'1697788800000000000'", + "default": "'all'", + "example": "'1'", "comment": [ - "Optional. Start time in unix nanoseconds" + "The numerical epoch index" ] }, { - "name": "end_time", - "lite_name": "et", - "semantic_type": "timestamp", - "json_type": "string", + "name": "type", + "lite_name": "t", + "semantic_type": "RewardProgramType", + "json_type": "RewardProgramType", "index": 2, "array_depth": 0, "optional": true, - "default": "now()", - "example": "'1697788800000000000'", + "default": "'all'", + "example": "'trader'", "comment": [ - "Optional. End time in unix nanoseconds" + "The type of the reward program" ] }, { - "name": "account_id", - "lite_name": "ai", + "name": "limit", + "lite_name": "l", + "semantic_type": "uint32", + "json_type": "integer", + "index": 3, + "array_depth": 0, + "optional": true, + "default": "'500'", + "example": "'500'", + "comment": [ + "The limit to query for. Defaults to 500; Max 1000" + ] + }, + { + "name": "cursor", + "lite_name": "c", "semantic_type": "string", "json_type": "string", - "index": 3, + "index": 4, "array_depth": 0, - "optional": false, - "example": "'ACC_1234567890'", + "optional": true, + "default": "'all'", + "example": "'Qw0918='", "comment": [ - "The off chain account id to get all user's referrers" + "The cursor to indicate when to start the query from" ] } ], "comment": [ - "startTime and endTime are optional parameters. The semantics of these parameters are as follows:\u003cul\u003e" + "Query list of epoch badges" ] }, { - "name": "FlatReferral", + "name": "EpochBadge", "is_root": false, "fields": [ { @@ -9109,688 +9990,689 @@ "index": 0, "array_depth": 0, "optional": false, - "example": "'ACC_1234567890'", + "example": "'ACC:10001'", "comment": [ "The off chain account id" ] }, { - "name": "referrer_id", - "lite_name": "ri", - "semantic_type": "string", + "name": "main_account_id", + "lite_name": "ma", + "semantic_type": "address", "json_type": "string", "index": 1, "array_depth": 0, "optional": false, - "example": "'ACC_1234567890'", + "example": "'$GRVT_ACCOUNT_ID'", "comment": [ - "The off chain referrer account id" + "The account ID" ] }, { - "name": "referrer_level", - "lite_name": "rl", - "semantic_type": "uint8", - "json_type": "integer", + "name": "type", + "lite_name": "t", + "semantic_type": "RewardProgramType", + "json_type": "RewardProgramType", "index": 2, "array_depth": 0, "optional": false, - "example": "'1'", + "example": "'trader'", "comment": [ - "The referrer level; 1: direct referrer, 2: indirect referrer" + "The type of the reward program" ] }, { - "name": "account_create_time", - "lite_name": "ac", - "semantic_type": "timestamp", - "json_type": "string", + "name": "epoch", + "lite_name": "e", + "semantic_type": "int32", + "json_type": "integer", "index": 3, "array_depth": 0, "optional": false, - "example": "'1697788800000000000'", + "example": "'2'", "comment": [ - "The account creation time" + "The epoch number" ] }, { - "name": "main_account_id", - "lite_name": "ma", - "semantic_type": "uint256", + "name": "epoch_start_time", + "lite_name": "es", + "semantic_type": "timestamp", "json_type": "string", "index": 4, "array_depth": 0, "optional": false, - "example": "'10000101000203040506'", + "example": "'1726790400000000000'", "comment": [ - "The main account id" + "The start time of the epoch" ] }, { - "name": "referrer_main_account_id", - "lite_name": "rm", - "semantic_type": "uint256", + "name": "epoch_end_time", + "lite_name": "ee", + "semantic_type": "timestamp", "json_type": "string", "index": 5, "array_depth": 0, "optional": false, - "example": "'10000101000203040506'", + "example": "'1726790400000000000'", "comment": [ - "The referrer main account id" + "The end time of the epoch" ] }, { - "name": "is_business", - "lite_name": "ib", - "semantic_type": "bool", - "json_type": "boolean", + "name": "badge", + "lite_name": "b", + "semantic_type": "EpochBadgeType", + "json_type": "EpochBadgeType", "index": 6, "array_depth": 0, "optional": false, - "example": "true", + "example": "'champion'", "comment": [ - "The account is a business account or not" + "The type of the badge" ] - } - ], - "comment": [ - "" - ] - }, - { - "name": "ApiGetListFlatReferralResponse", - "is_root": true, - "fields": [ + }, { - "name": "flat_referrals", - "lite_name": "fr", - "semantic_type": "FlatReferral", - "json_type": "FlatReferral", - "index": 0, + "name": "distributed_badges", + "lite_name": "db", + "semantic_type": "EpochBadgeType", + "json_type": "EpochBadgeType", + "index": 7, "array_depth": 1, "optional": false, "comment": [ - "The list of flat referrals" + "The distributed badges" + ] + }, + { + "name": "total_point", + "lite_name": "tp", + "semantic_type": "uint64", + "json_type": "string", + "index": 8, + "array_depth": 0, + "optional": false, + "example": "'10000101000203040506'", + "comment": [ + "Total point" + ] + }, + { + "name": "rank", + "lite_name": "r", + "semantic_type": "uint32", + "json_type": "integer", + "index": 9, + "array_depth": 0, + "optional": false, + "example": "'10000101000203040506'", + "comment": [ + "Rank" + ] + }, + { + "name": "claimed_at", + "lite_name": "ca", + "semantic_type": "timestamp", + "json_type": "string", + "index": 10, + "array_depth": 0, + "optional": false, + "example": "'1726790400000000000'", + "comment": [ + "The time when the badge was claimed, or the epoch end time if the user has already completed the KYC process" ] } ], "comment": [] }, { - "name": "ApiQueryFlatReferralStatRequest", + "name": "QueryEpochBadgeResponse", "is_root": true, "fields": [ { - "name": "account_id", - "lite_name": "ai", + "name": "result", + "lite_name": "r", + "semantic_type": "EpochBadge", + "json_type": "EpochBadge", + "index": 0, + "array_depth": 1, + "optional": false, + "comment": [ + "The list of epoch badges" + ] + }, + { + "name": "next", + "lite_name": "n", "semantic_type": "string", "json_type": "string", - "index": 0, + "index": 1, "array_depth": 0, "optional": false, - "example": "'ACC_1234567890'", + "example": "'Qw0918='", "comment": [ - "The off chain account id to get referral stats" + "The cursor to indicate when to start the query from" ] } ], - "comment": [ - "Query flat referral stats" - ] + "comment": [] }, { - "name": "ApiQueryFlatReferralStatResponse", + "name": "QueryEpochBadgePointDistributionRequest", "is_root": true, "fields": [ { - "name": "direct_invite_count", - "lite_name": "di", - "semantic_type": "uint32", + "name": "epoch", + "lite_name": "e", + "semantic_type": "int32", "json_type": "integer", "index": 0, "array_depth": 0, - "optional": false, - "example": "'52'", + "optional": true, + "default": "'all'", + "example": "'1'", "comment": [ - "Direct invite count" + "The numerical epoch index" ] }, { - "name": "indirect_invite_count", - "lite_name": "ii", - "semantic_type": "uint32", - "json_type": "integer", + "name": "type", + "lite_name": "t", + "semantic_type": "RewardProgramType", + "json_type": "RewardProgramType", "index": 1, "array_depth": 0, "optional": false, - "example": "'52'", + "example": "'trader'", "comment": [ - "Indirect invite count" + "The type of the reward program" ] } ], - "comment": [] + "comment": [ + "Query list of epoch badges" + ] }, { - "name": "LPSnapshot", - "is_root": true, + "name": "EpochBadgePointDistribution", + "is_root": false, "fields": [ { - "name": "main_account_id", - "lite_name": "ma", - "semantic_type": "uint256", - "json_type": "string", + "name": "badge", + "lite_name": "b", + "semantic_type": "EpochBadgeType", + "json_type": "EpochBadgeType", "index": 0, "array_depth": 0, "optional": false, - "example": "'10000101000203040506'", "comment": [ - "The main account id" + "The type of the badge" ] }, { - "name": "lp_asset", - "lite_name": "la", - "semantic_type": "uint64", - "json_type": "string", + "name": "epoch", + "lite_name": "e", + "semantic_type": "int32", + "json_type": "integer", "index": 1, "array_depth": 0, "optional": false, - "example": "'10000'", "comment": [ - "The LP Asset" + "The epoch number" ] }, { - "name": "underlying_multiplier", - "lite_name": "um", - "semantic_type": "uint64", - "json_type": "string", + "name": "type", + "lite_name": "t", + "semantic_type": "RewardProgramType", + "json_type": "RewardProgramType", "index": 2, "array_depth": 0, "optional": false, - "example": "'52'", "comment": [ - "Underlying multiplier" + "The type of the reward program" ] }, { - "name": "maker_trading_volume", - "lite_name": "mt", - "semantic_type": "uint256", - "json_type": "string", + "name": "min_point", + "lite_name": "mp", + "semantic_type": "uint64", + "json_type": "string", "index": 3, "array_depth": 0, "optional": false, - "example": "'10000101000203040506'", "comment": [ - "Maker trading volume" + "The minimum point to get the badge" ] }, { - "name": "bid_fast_market_multiplier", - "lite_name": "bf", - "semantic_type": "uint32", - "json_type": "integer", + "name": "max_point", + "lite_name": "mp1", + "semantic_type": "uint64", + "json_type": "string", "index": 4, "array_depth": 0, "optional": false, - "example": "'52'", "comment": [ - "Fast market multiplier" + "The maximum point to get the badge" ] }, { - "name": "ask_fast_market_multiplier", - "lite_name": "af", + "name": "min_rank", + "lite_name": "mr", "semantic_type": "uint32", "json_type": "integer", "index": 5, "array_depth": 0, "optional": false, - "example": "'52'", "comment": [ - "Fast market multiplier" + "The minimum rank to get the badge" ] }, { - "name": "liquidity_score", - "lite_name": "ls", - "semantic_type": "uint256", - "json_type": "string", + "name": "max_rank", + "lite_name": "mr1", + "semantic_type": "uint32", + "json_type": "integer", "index": 6, "array_depth": 0, "optional": false, - "example": "'10000101000203040506'", "comment": [ - "Liquidity score" + "The maximum rank to get the badge" ] }, { - "name": "calculate_at", - "lite_name": "ca", - "semantic_type": "timestamp", + "name": "total_point", + "lite_name": "tp", + "semantic_type": "uint64", "json_type": "string", "index": 7, "array_depth": 0, "optional": false, - "example": "'1726790400000000000'", "comment": [ - "The time when the snapshot was calculated" + "The total point to get the badge" + ] + }, + { + "name": "count", + "lite_name": "c", + "semantic_type": "uint32", + "json_type": "integer", + "index": 8, + "array_depth": 0, + "optional": false, + "comment": [ + "The number of users to get the badge" ] } ], "comment": [] }, { - "name": "ApproximateLPSnapshot", + "name": "QueryEpochBadgePointDistributionResponse", "is_root": true, "fields": [ { - "name": "main_account_id", - "lite_name": "ma", - "semantic_type": "uint256", - "json_type": "string", + "name": "result", + "lite_name": "r", + "semantic_type": "EpochBadgePointDistribution", + "json_type": "EpochBadgePointDistribution", "index": 0, - "array_depth": 0, - "optional": false, - "example": "'10000101000203040506'", - "comment": [ - "The main account id" - ] - }, - { - "name": "underlying_multiplier", - "lite_name": "um", - "semantic_type": "uint64", - "json_type": "string", - "index": 1, - "array_depth": 0, + "array_depth": 1, "optional": false, - "example": "'52'", "comment": [ - "Underlying multiplier" + "The list of epoch badges" ] - }, + } + ], + "comment": [] + }, + { + "name": "ApiGetListEpochBadgeResponse", + "is_root": true, + "fields": [ { - "name": "market_share_multiplier", - "lite_name": "ms", - "semantic_type": "uint64", - "json_type": "string", - "index": 2, - "array_depth": 0, + "name": "result", + "lite_name": "r", + "semantic_type": "EpochBadge", + "json_type": "EpochBadge", + "index": 0, + "array_depth": 1, "optional": false, - "example": "'10000101000203040506'", "comment": [ - "Market share multiplier" + "The list of epoch badges" ] - }, + } + ], + "comment": [] + }, + { + "name": "GetClaimableEcosystemBadgeResponse", + "is_root": true, + "fields": [ { - "name": "bid_fast_market_multiplier", - "lite_name": "bf", - "semantic_type": "uint32", - "json_type": "integer", - "index": 3, + "name": "badge", + "lite_name": "b", + "semantic_type": "EpochBadge", + "json_type": "EpochBadge", + "index": 0, "array_depth": 0, "optional": false, - "example": "'52'", "comment": [ - "Fast market multiplier" + "The epoch badge" ] }, { - "name": "ask_fast_market_multiplier", - "lite_name": "af", - "semantic_type": "uint32", - "json_type": "integer", - "index": 4, + "name": "is_claimable", + "lite_name": "ic", + "semantic_type": "bool", + "json_type": "boolean", + "index": 1, "array_depth": 0, "optional": false, - "example": "'52'", "comment": [ - "Fast market multiplier" + "Whether the badge is claimable" ] }, { - "name": "liquidity_score", - "lite_name": "ls", - "semantic_type": "uint256", + "name": "claimable_until", + "lite_name": "cu", + "semantic_type": "timestamp", "json_type": "string", - "index": 5, + "index": 2, "array_depth": 0, "optional": false, - "example": "'10000101000203040506'", "comment": [ - "Liquidity score" + "The time when the badge is claimable" ] - }, + } + ], + "comment": [] + }, + { + "name": "ClaimEcosystemBadgeResponse", + "is_root": true, + "fields": [ { - "name": "calculate_at", - "lite_name": "ca", - "semantic_type": "timestamp", - "json_type": "string", - "index": 6, + "name": "badge", + "lite_name": "b", + "semantic_type": "EpochBadge", + "json_type": "EpochBadge", + "index": 0, "array_depth": 0, "optional": false, - "example": "'1726790400000000000'", "comment": [ - "The time when the snapshot was calculated" + "The epoch badge" ] } ], "comment": [] }, { - "name": "LPPoint", + "name": "ApiGetListFlatReferralRequest", "is_root": true, "fields": [ { - "name": "main_account_id", - "lite_name": "ma", - "semantic_type": "uint256", + "name": "referral_id", + "lite_name": "ri", + "semantic_type": "string", "json_type": "string", "index": 0, "array_depth": 0, "optional": false, - "example": "'10000101000203040506'", + "example": "'ACC_1234567890'", "comment": [ - "The main account id" + "The off chain referrer account id to get all flat referrals" ] }, { - "name": "liquidity_score", - "lite_name": "ls", - "semantic_type": "uint256", + "name": "start_time", + "lite_name": "st", + "semantic_type": "timestamp", "json_type": "string", "index": 1, "array_depth": 0, - "optional": false, - "example": "'10000101000203040506'", + "optional": true, + "default": "0", + "example": "'1697788800000000000'", "comment": [ - "Liquidity score" + "Optional. Start time in unix nanoseconds" ] }, { - "name": "rank", - "lite_name": "r", - "semantic_type": "uint32", - "json_type": "integer", + "name": "end_time", + "lite_name": "et", + "semantic_type": "timestamp", + "json_type": "string", "index": 2, "array_depth": 0, + "optional": true, + "default": "now()", + "example": "'1697788800000000000'", + "comment": [ + "Optional. End time in unix nanoseconds" + ] + }, + { + "name": "account_id", + "lite_name": "ai", + "semantic_type": "string", + "json_type": "string", + "index": 3, + "array_depth": 0, "optional": false, - "example": "'52'", + "example": "'ACC_1234567890'", "comment": [ - "The rank of user in the LP leaderboard" + "The off chain account id to get all user's referrers" ] } ], - "comment": [] + "comment": [ + "startTime and endTime are optional parameters. The semantics of these parameters are as follows:\u003cul\u003e" + ] }, { - "name": "ApproximateLPPoint", - "is_root": true, + "name": "FlatReferral", + "is_root": false, "fields": [ { - "name": "off_chain_account_id", - "lite_name": "oc", + "name": "account_id", + "lite_name": "ai", "semantic_type": "string", "json_type": "string", "index": 0, "array_depth": 0, "optional": false, - "example": "'ACC:123456'", + "example": "'ACC_1234567890'", "comment": [ "The off chain account id" ] }, { - "name": "liquidity_score", - "lite_name": "ls", - "semantic_type": "uint256", + "name": "referrer_id", + "lite_name": "ri", + "semantic_type": "string", "json_type": "string", "index": 1, "array_depth": 0, "optional": false, - "example": "'10000101000203040506'", + "example": "'ACC_1234567890'", "comment": [ - "Liquidity score" + "The off chain referrer account id" ] }, { - "name": "rank", - "lite_name": "r", - "semantic_type": "uint32", + "name": "referrer_level", + "lite_name": "rl", + "semantic_type": "uint8", "json_type": "integer", "index": 2, "array_depth": 0, "optional": false, - "example": "'52'", + "example": "'1'", "comment": [ - "The rank of user in the LP leaderboard" + "The referrer level; 1: direct referrer, 2: indirect referrer" ] - } - ], - "comment": [] - }, - { - "name": "QueryGetLatestLPSnapshotResponse", - "is_root": true, - "fields": [ + }, { - "name": "snapshot", - "lite_name": "s", - "semantic_type": "LPSnapshot", - "json_type": "LPSnapshot", - "index": 0, + "name": "account_create_time", + "lite_name": "ac", + "semantic_type": "timestamp", + "json_type": "string", + "index": 3, "array_depth": 0, "optional": false, + "example": "'1697788800000000000'", "comment": [ - "The latest LP snapshot" - ] - } - ], - "comment": [] - }, - { - "name": "ApiGetLatestLPSnapshotRequest", - "is_root": true, - "fields": [ - { - "name": "kind", - "lite_name": "k", - "semantic_type": "Kind", - "json_type": "Kind", - "index": 0, - "array_depth": 0, - "optional": true, - "default": "0", - "example": "'PERPETUAL'", - "comment": [ - "The kind filter to apply" + "The account creation time" ] }, { - "name": "base", - "lite_name": "b", - "semantic_type": "Currency", - "json_type": "Currency", - "index": 1, + "name": "main_account_id", + "lite_name": "ma", + "semantic_type": "uint256", + "json_type": "string", + "index": 4, "array_depth": 0, - "optional": true, - "default": "0", - "example": "'BTC'", + "optional": false, + "example": "'10000101000203040506'", "comment": [ - "The base filter to apply" + "The main account id" ] - } - ], - "comment": [] - }, - { - "name": "ApiGetLatestLPSnapshotResponse", - "is_root": true, - "fields": [ + }, { - "name": "snapshot", - "lite_name": "s", - "semantic_type": "ApproximateLPSnapshot", - "json_type": "ApproximateLPSnapshot", - "index": 0, + "name": "referrer_main_account_id", + "lite_name": "rm", + "semantic_type": "uint256", + "json_type": "string", + "index": 5, "array_depth": 0, "optional": false, + "example": "'10000101000203040506'", "comment": [ - "The latest LP snapshot" + "The referrer main account id" ] - } - ], - "comment": [] - }, - { - "name": "ApiGetLPLeaderboardRequest", - "is_root": true, - "fields": [ + }, { - "name": "start_interval", - "lite_name": "si", - "semantic_type": "timestamp", - "json_type": "string", - "index": 0, + "name": "is_business", + "lite_name": "ib", + "semantic_type": "bool", + "json_type": "boolean", + "index": 6, "array_depth": 0, "optional": false, - "example": "'1726790400000000000'", + "example": "true", "comment": [ - "Start time of the epoch - phase" + "The account is a business account or not" ] }, { - "name": "limit", - "lite_name": "l", - "semantic_type": "uint32", - "json_type": "integer", - "index": 1, + "name": "is_kyc_completed", + "lite_name": "ik", + "semantic_type": "bool", + "json_type": "boolean", + "index": 7, "array_depth": 0, "optional": false, - "example": "100", + "example": "true", "comment": [ - "The number of accounts to return" + "The account is KYC verified or not" ] }, { - "name": "kind", - "lite_name": "k", - "semantic_type": "Kind", - "json_type": "Kind", - "index": 2, + "name": "kyc_completed_at", + "lite_name": "kc", + "semantic_type": "timestamp", + "json_type": "string", + "index": 8, "array_depth": 0, "optional": false, - "example": "'PERPETUAL'", + "example": "'1697788800000000000'", "comment": [ - "The kind filter to apply" + "The KYC completed time" ] }, { - "name": "base", - "lite_name": "b", - "semantic_type": "Currency", - "json_type": "Currency", - "index": 3, + "name": "kyc_type", + "lite_name": "kt", + "semantic_type": "string", + "json_type": "string", + "index": 9, "array_depth": 0, "optional": false, - "example": "'BTC'", + "example": "'individual'", "comment": [ - "The base filter to apply" + "The KYC type, can be 'individual' or 'business'" ] } ], - "comment": [] + "comment": [ + "" + ] }, { - "name": "ApiGetLPLeaderboardResponse", + "name": "ApiGetListFlatReferralResponse", "is_root": true, "fields": [ { - "name": "points", - "lite_name": "p", - "semantic_type": "ApproximateLPPoint", - "json_type": "ApproximateLPPoint", + "name": "flat_referrals", + "lite_name": "fr", + "semantic_type": "FlatReferral", + "json_type": "FlatReferral", "index": 0, "array_depth": 1, "optional": false, "comment": [ - "The list of LP points" + "The list of flat referrals" ] } ], "comment": [] }, { - "name": "ApiGetLPPointRequest", + "name": "ApiQueryFlatReferralStatRequest", "is_root": true, "fields": [ { - "name": "start_interval", - "lite_name": "si", - "semantic_type": "timestamp", + "name": "account_id", + "lite_name": "ai", + "semantic_type": "string", "json_type": "string", "index": 0, "array_depth": 0, - "optional": true, - "default": "0", - "example": "'1726790400000000000'", - "comment": [ - "Optional. Start time of the epoch - phase" - ] - }, - { - "name": "kind", - "lite_name": "k", - "semantic_type": "Kind", - "json_type": "Kind", - "index": 1, - "array_depth": 0, - "optional": true, - "default": "0", - "example": "'PERPETUAL'", - "comment": [ - "Optional. The kind filter to apply" - ] - }, - { - "name": "base", - "lite_name": "b", - "semantic_type": "Currency", - "json_type": "Currency", - "index": 2, - "array_depth": 0, - "optional": true, - "default": "0", - "example": "'BTC'", + "optional": false, + "example": "'ACC_1234567890'", "comment": [ - "Optional. The base filter to apply" + "The off chain account id to get referral stats" ] } ], - "comment": [] + "comment": [ + "Query flat referral stats" + ] }, { - "name": "ApiGetLPPointResponse", + "name": "ApiQueryFlatReferralStatResponse", "is_root": true, "fields": [ { - "name": "point", - "lite_name": "p", - "semantic_type": "LPPoint", - "json_type": "LPPoint", + "name": "direct_invite_count", + "lite_name": "di", + "semantic_type": "uint32", + "json_type": "integer", "index": 0, "array_depth": 0, "optional": false, + "example": "'52'", "comment": [ - "LP points of user" + "Direct invite count" ] }, { - "name": "maker_count", - "lite_name": "mc", + "name": "indirect_invite_count", + "lite_name": "ii", "semantic_type": "uint32", "json_type": "integer", "index": 1, @@ -9798,1327 +10680,1247 @@ "optional": false, "example": "'52'", "comment": [ - "The number of maker" + "Indirect invite count" ] } ], "comment": [] }, { - "name": "ApiGetLPInfoRequest", + "name": "LPSnapshot", "is_root": true, "fields": [ { - "name": "kind", - "lite_name": "k", - "semantic_type": "Kind", - "json_type": "Kind", + "name": "main_account_id", + "lite_name": "ma", + "semantic_type": "uint256", + "json_type": "string", "index": 0, "array_depth": 0, "optional": false, - "example": "'PERPETUAL'", + "example": "'10000101000203040506'", "comment": [ - "The kind filter to apply" + "The main account id" ] }, { - "name": "base", - "lite_name": "b", - "semantic_type": "Currency", - "json_type": "Currency", + "name": "lp_asset", + "lite_name": "la", + "semantic_type": "uint64", + "json_type": "string", "index": 1, "array_depth": 0, - "optional": true, - "default": "0", - "example": "'BTC'", - "comment": [ - "The base filter to apply" - ] - } - ], - "comment": [] - }, - { - "name": "ApiGetLPInfoResponse", - "is_root": true, - "fields": [ - { - "name": "is_lp_maker", - "lite_name": "il", - "semantic_type": "bool", - "json_type": "boolean", - "index": 0, - "array_depth": 0, "optional": false, - "example": "true", + "example": "'10000'", "comment": [ - "Is LP maker" + "The LP Asset" ] }, { - "name": "spread_score_value_multiplier", - "lite_name": "ss", + "name": "underlying_multiplier", + "lite_name": "um", "semantic_type": "uint64", "json_type": "string", - "index": 1, + "index": 2, "array_depth": 0, "optional": false, - "example": "'1000000000'", + "example": "'52'", "comment": [ - "The spread score value multiplier" + "Underlying multiplier" ] }, { - "name": "depth_score_value_multiplier", - "lite_name": "ds", - "semantic_type": "uint64", + "name": "maker_trading_volume", + "lite_name": "mt", + "semantic_type": "uint256", "json_type": "string", - "index": 2, + "index": 3, "array_depth": 0, "optional": false, - "example": "'1000000000'", + "example": "'10000101000203040506'", "comment": [ - "The depth score value multiplier" - ] - }, - { - "name": "market_share_value_multiplier", - "lite_name": "ms", - "semantic_type": "uint64", - "json_type": "string", - "index": 3, - "array_depth": 0, - "optional": false, - "example": "'1000000000'", - "comment": [ - "The market share value multiplier" + "Maker trading volume" ] }, { - "name": "underlying_multiplier", - "lite_name": "um", - "semantic_type": "uint64", - "json_type": "string", + "name": "bid_fast_market_multiplier", + "lite_name": "bf", + "semantic_type": "uint32", + "json_type": "integer", "index": 4, "array_depth": 0, "optional": false, "example": "'52'", "comment": [ - "Underlying multiplier" + "Fast market multiplier" ] }, { - "name": "market_share_multiplier", - "lite_name": "ms1", - "semantic_type": "uint64", - "json_type": "string", + "name": "ask_fast_market_multiplier", + "lite_name": "af", + "semantic_type": "uint32", + "json_type": "integer", "index": 5, "array_depth": 0, "optional": false, - "example": "'1000000000'", + "example": "'52'", "comment": [ - "The market share multiplier, equal to the maker trading volume in the past 2 hours" + "Fast market multiplier" ] }, { - "name": "ask_fast_market_multiplier", - "lite_name": "af", - "semantic_type": "uint32", - "json_type": "integer", + "name": "liquidity_score", + "lite_name": "ls", + "semantic_type": "uint256", + "json_type": "string", "index": 6, "array_depth": 0, "optional": false, - "example": "'100'", + "example": "'10000101000203040506'", "comment": [ - "Ask fast market multiplier" + "Liquidity score" ] }, { - "name": "bid_fast_market_multiplier", - "lite_name": "bf", - "semantic_type": "uint32", - "json_type": "integer", + "name": "calculate_at", + "lite_name": "ca", + "semantic_type": "timestamp", + "json_type": "string", "index": 7, "array_depth": 0, "optional": false, - "example": "'100'", + "example": "'1726790400000000000'", "comment": [ - "Bid fast market multiplier" + "The time when the snapshot was calculated" ] } ], "comment": [] }, { - "name": "ApiSubAccountTradeAggregationRequest", + "name": "ApproximateLPSnapshot", "is_root": true, "fields": [ { - "name": "limit", - "lite_name": "l", - "semantic_type": "int32", - "json_type": "integer", + "name": "main_account_id", + "lite_name": "ma", + "semantic_type": "uint256", + "json_type": "string", "index": 0, "array_depth": 0, "optional": false, - "example": "100", + "example": "'10000101000203040506'", "comment": [ - "Optional. The limit of the number of results to return" + "The main account id" ] }, { - "name": "interval", - "lite_name": "i", - "semantic_type": "SubAccountTradeInterval", - "json_type": "SubAccountTradeInterval", + "name": "underlying_multiplier", + "lite_name": "um", + "semantic_type": "uint64", + "json_type": "string", "index": 1, "array_depth": 0, "optional": false, + "example": "'52'", "comment": [ - "The interval of each sub account trade" + "Underlying multiplier" ] }, { - "name": "sub_account_i_ds", - "lite_name": "sa", + "name": "market_share_multiplier", + "lite_name": "ms", "semantic_type": "uint64", "json_type": "string", "index": 2, - "array_depth": 1, + "array_depth": 0, "optional": false, - "example": "['2376', '5821']", + "example": "'10000101000203040506'", "comment": [ - "The list of sub account ids to query" + "Market share multiplier" ] }, { - "name": "start_interval", - "lite_name": "si", - "semantic_type": "timestamp", - "json_type": "string", + "name": "bid_fast_market_multiplier", + "lite_name": "bf", + "semantic_type": "uint32", + "json_type": "integer", "index": 3, "array_depth": 0, "optional": false, - "example": "'1697788800000000000'", + "example": "'52'", "comment": [ - "Optional. The starting time in unix nanoseconds of a specific interval to query" + "Fast market multiplier" ] }, { - "name": "start_time", - "lite_name": "st", - "semantic_type": "timestamp", - "json_type": "string", + "name": "ask_fast_market_multiplier", + "lite_name": "af", + "semantic_type": "uint32", + "json_type": "integer", "index": 4, "array_depth": 0, - "optional": true, - "default": "0", - "example": "'1697788800000000000'", + "optional": false, + "example": "'52'", "comment": [ - "Optional. Start time in unix nanoseconds" + "Fast market multiplier" ] }, { - "name": "end_time", - "lite_name": "et", - "semantic_type": "timestamp", + "name": "liquidity_score", + "lite_name": "ls", + "semantic_type": "uint256", "json_type": "string", "index": 5, "array_depth": 0, - "optional": true, - "default": "now()", - "example": "'1697788800000000000'", - "comment": [ - "Optional. End time in unix nanoseconds" - ] - }, - { - "name": "is_maker", - "lite_name": "im", - "semantic_type": "bool", - "json_type": "boolean", - "index": 6, - "array_depth": 0, - "optional": false, - "example": "true", - "comment": [ - "Filter on the maker of the trade" - ] - }, - { - "name": "is_taker", - "lite_name": "it", - "semantic_type": "bool", - "json_type": "boolean", - "index": 7, - "array_depth": 0, "optional": false, - "example": "true", + "example": "'10000101000203040506'", "comment": [ - "Filter on the taker of the trade" + "Liquidity score" ] }, { - "name": "cursor", - "lite_name": "c", - "semantic_type": "string", + "name": "calculate_at", + "lite_name": "ca", + "semantic_type": "timestamp", "json_type": "string", - "index": 8, + "index": 6, "array_depth": 0, - "optional": true, - "default": "", - "example": "''", + "optional": false, + "example": "'1726790400000000000'", "comment": [ - "The cursor to indicate when to start the next query from" + "The time when the snapshot was calculated" ] } ], - "comment": [ - "startTime are optional parameters. The semantics of these parameters are as follows:\u003cul\u003e" - ] + "comment": [] }, { - "name": "SubAccountTradeAggregation", - "is_root": false, + "name": "LPPoint", + "is_root": true, "fields": [ { - "name": "sub_account_id", - "lite_name": "sa", - "semantic_type": "uint64", + "name": "main_account_id", + "lite_name": "ma", + "semantic_type": "uint256", "json_type": "string", "index": 0, "array_depth": 0, "optional": false, - "example": "'$GRVT_SUB_ACCOUNT_ID'", + "example": "'10000101000203040506'", "comment": [ - "The sub account id" + "The main account id" ] }, { - "name": "total_fee", - "lite_name": "tf", - "semantic_type": "int64", + "name": "liquidity_score", + "lite_name": "ls", + "semantic_type": "uint256", "json_type": "string", "index": 1, "array_depth": 0, "optional": false, "example": "'10000101000203040506'", "comment": [ - "Total fee paid" + "Liquidity score" ] }, { - "name": "total_trade_volume", - "lite_name": "tt", - "semantic_type": "uint256", - "json_type": "string", + "name": "rank", + "lite_name": "r", + "semantic_type": "uint32", + "json_type": "integer", "index": 2, "array_depth": 0, "optional": false, - "example": "'10000101000203040506'", + "example": "'52'", "comment": [ - "Total volume traded" + "The rank of user in the LP leaderboard" ] - }, + } + ], + "comment": [] + }, + { + "name": "ApproximateLPPoint", + "is_root": true, + "fields": [ { - "name": "num_traded", - "lite_name": "nt", - "semantic_type": "uint64", + "name": "off_chain_account_id", + "lite_name": "oc", + "semantic_type": "string", "json_type": "string", - "index": 3, + "index": 0, "array_depth": 0, "optional": false, - "example": "100", + "example": "'ACC:123456'", "comment": [ - "Number of trades" + "The off chain account id" ] }, { - "name": "positive_fee", - "lite_name": "pf", - "semantic_type": "int64", + "name": "liquidity_score", + "lite_name": "ls", + "semantic_type": "uint256", "json_type": "string", - "index": 4, + "index": 1, "array_depth": 0, "optional": false, "example": "'10000101000203040506'", "comment": [ - "Total positive fee paid by user" + "Liquidity score" ] - } - ], - "comment": [ - "Similar to sub-account trade, but not divided by individual assets." - ] - }, - { - "name": "ApiSubAccountTradeAggregationResponse", - "is_root": true, - "fields": [ + }, { - "name": "result", + "name": "rank", "lite_name": "r", - "semantic_type": "SubAccountTradeAggregation", - "json_type": "SubAccountTradeAggregation", - "index": 0, - "array_depth": 1, - "optional": false, - "comment": [ - "The sub account trade aggregation result set for given interval" - ] - }, - { - "name": "next", - "lite_name": "n", - "semantic_type": "string", - "json_type": "string", - "index": 1, + "semantic_type": "uint32", + "json_type": "integer", + "index": 2, "array_depth": 0, - "optional": true, - "default": "''", - "example": "'Qw0918='", + "optional": false, + "example": "'52'", "comment": [ - "The cursor to indicate when to start the next query from" + "The rank of user in the LP leaderboard" ] } ], "comment": [] }, { - "name": "ApiGetTraderStatResponse", + "name": "QueryGetLatestLPSnapshotResponse", "is_root": true, "fields": [ { - "name": "total_fee", - "lite_name": "tf", - "semantic_type": "int64", - "json_type": "string", + "name": "snapshot", + "lite_name": "s", + "semantic_type": "LPSnapshot", + "json_type": "LPSnapshot", "index": 0, "array_depth": 0, "optional": false, - "example": "'10000101000203040506'", "comment": [ - "Total fee paid" + "The latest LP snapshot" ] } ], "comment": [] }, { - "name": "TraderMetric", + "name": "ApiGetLatestLPSnapshotRequest", "is_root": true, "fields": [ { - "name": "total_fee", - "lite_name": "tf", - "semantic_type": "int64", - "json_type": "string", + "name": "kind", + "lite_name": "k", + "semantic_type": "Kind", + "json_type": "Kind", "index": 0, "array_depth": 0, - "optional": false, - "example": "'10000101000203040506'", + "optional": true, + "default": "0", + "example": "'PERPETUAL'", "comment": [ - "Total fee paid" + "The kind filter to apply" ] }, { - "name": "total_point", - "lite_name": "tp", - "semantic_type": "float64", - "json_type": "number", + "name": "base", + "lite_name": "b", + "semantic_type": "Currency", + "json_type": "Currency", "index": 1, "array_depth": 0, - "optional": false, - "example": "'10000000.5'", + "optional": true, + "default": "0", + "example": "'BTC'", "comment": [ - "Total trader point of this epoch/phase" + "The base filter to apply" ] } ], "comment": [] }, { - "name": "ApiFindTraderEpochMetricResponse", + "name": "ApiGetLatestLPSnapshotResponse", "is_root": true, "fields": [ { - "name": "metric", - "lite_name": "m", - "semantic_type": "TraderMetric", - "json_type": "TraderMetric", + "name": "snapshot", + "lite_name": "s", + "semantic_type": "ApproximateLPSnapshot", + "json_type": "ApproximateLPSnapshot", "index": 0, "array_depth": 0, "optional": false, "comment": [ - "Phase zero metric" - ] - }, - { - "name": "rank", - "lite_name": "r", - "semantic_type": "uint32", - "json_type": "integer", - "index": 1, - "array_depth": 0, - "optional": false, - "example": "'52'", - "comment": [ - "The rank of the account in the trader" - ] - }, - { - "name": "total", - "lite_name": "t", - "semantic_type": "uint32", - "json_type": "integer", - "index": 2, - "array_depth": 0, - "optional": false, - "example": "52", - "comment": [ - "The total number of accounts in the trader" - ] - }, - { - "name": "last_calculated_at", - "lite_name": "lc", - "semantic_type": "timestamp", - "json_type": "string", - "index": 3, - "array_depth": 0, - "optional": false, - "example": "'1697788800000000000'", - "comment": [ - "The time when the trader points were last calculated" + "The latest LP snapshot" ] } ], "comment": [] }, { - "name": "TraderLeaderboardUser", + "name": "ApiGetLPLeaderboardRequest", "is_root": true, "fields": [ { - "name": "account_id", - "lite_name": "ai", - "semantic_type": "string", - "json_type": "string", + "name": "epoch", + "lite_name": "e", + "semantic_type": "uint32", + "json_type": "integer", "index": 0, "array_depth": 0, - "optional": false, - "example": "'ACC_1234567890'", + "optional": true, + "default": "0", + "example": "1", "comment": [ - "The off chain account id" + "The epoch to filter" ] }, { - "name": "rank", - "lite_name": "r", + "name": "limit", + "lite_name": "l", "semantic_type": "uint32", "json_type": "integer", "index": 1, "array_depth": 0, "optional": false, - "example": "'52'", + "example": "100", "comment": [ - "The rank of the account in the Trader" + "The number of accounts to return" ] }, { - "name": "total_point", - "lite_name": "tp", - "semantic_type": "float64", - "json_type": "number", + "name": "kind", + "lite_name": "k", + "semantic_type": "Kind", + "json_type": "Kind", "index": 2, "array_depth": 0, "optional": false, - "example": "'10000000.5'", + "example": "'PERPETUAL'", "comment": [ - "Total Trader point" + "The kind filter to apply" ] }, { - "name": "twitter_username", - "lite_name": "tu", - "semantic_type": "string", - "json_type": "string", + "name": "base", + "lite_name": "b", + "semantic_type": "Currency", + "json_type": "Currency", "index": 3, "array_depth": 0, "optional": false, - "example": "'elonmusk'", + "example": "'BTC'", "comment": [ - "The twitter username of the account" + "The base filter to apply" ] } ], "comment": [] }, { - "name": "ApiFindTraderLeaderboardResponse", + "name": "ApiGetLPLeaderboardResponse", "is_root": true, "fields": [ { - "name": "users", - "lite_name": "u", - "semantic_type": "TraderLeaderboardUser", - "json_type": "TraderLeaderboardUser", + "name": "points", + "lite_name": "p", + "semantic_type": "ApproximateLPPoint", + "json_type": "ApproximateLPPoint", "index": 0, "array_depth": 1, "optional": false, "comment": [ - "The list of trader leaderboard users" + "The list of LP points" ] } ], "comment": [] }, { - "name": "WSOrderFeedSelectorV1", + "name": "ApiGetLPPointRequest", "is_root": true, "fields": [ { - "name": "sub_account_id", - "lite_name": "sa", - "semantic_type": "uint64", - "json_type": "string", + "name": "epoch", + "lite_name": "e", + "semantic_type": "uint32", + "json_type": "integer", "index": 0, "array_depth": 0, - "optional": false, - "example": "'$GRVT_SUB_ACCOUNT_ID'", + "optional": true, + "default": "0", + "example": "1", "comment": [ - "The subaccount ID to filter by" - ], - "selector": "primary" + "The epoch to filter" + ] }, { - "name": "instrument", - "lite_name": "i", - "semantic_type": "asset", - "json_type": "string", + "name": "kind", + "lite_name": "k", + "semantic_type": "Kind", + "json_type": "Kind", "index": 1, "array_depth": 0, "optional": true, - "default": "'all'", - "example": "'BTC_USDT_Perp'", + "default": "0", + "example": "'PERPETUAL'", "comment": [ - "The instrument filter to apply." - ], - "selector": "primary" + "Optional. The kind filter to apply" + ] + }, + { + "name": "base", + "lite_name": "b", + "semantic_type": "Currency", + "json_type": "Currency", + "index": 2, + "array_depth": 0, + "optional": true, + "default": "0", + "example": "'BTC'", + "comment": [ + "Optional. The base filter to apply" + ] } ], - "comment": [ - "Subscribes to a feed of order updates pertaining to orders made by your account.", - "Each Order can be uniquely identified by its `order_id` or `client_order_id`.", - "To subscribe to all orders, specify an empty `instrument` (eg. `2345123`).", - "Otherwise, specify the `instrument` to only receive orders for that instrument (eg. `2345123-BTC_USDT_Perp`)." - ] + "comment": [] }, { - "name": "WSOrderFeedDataV1", + "name": "ApiGetLPPointResponse", "is_root": true, "fields": [ { - "name": "stream", - "lite_name": "s", - "semantic_type": "string", - "json_type": "string", + "name": "point", + "lite_name": "p", + "semantic_type": "LPPoint", + "json_type": "LPPoint", "index": 0, "array_depth": 0, "optional": false, - "example": "'v1.order'", "comment": [ - "Stream name" + "LP points of user" ] }, { - "name": "selector", - "lite_name": "s1", - "semantic_type": "string", - "json_type": "string", + "name": "maker_count", + "lite_name": "mc", + "semantic_type": "uint32", + "json_type": "integer", "index": 1, "array_depth": 0, "optional": false, - "example": "'BTC_USDT_Perp'", - "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": "Order", - "json_type": "Order", - "index": 3, - "array_depth": 0, - "optional": false, + "example": "'52'", "comment": [ - "The order object being created or updated" + "The number of maker" ] } ], "comment": [] }, { - "name": "WSOrderStateFeedSelectorV1", + "name": "ApiGetLPInfoRequest", "is_root": true, "fields": [ { - "name": "sub_account_id", - "lite_name": "sa", - "semantic_type": "uint64", - "json_type": "string", + "name": "kind", + "lite_name": "k", + "semantic_type": "Kind", + "json_type": "Kind", "index": 0, "array_depth": 0, "optional": false, - "example": "'$GRVT_SUB_ACCOUNT_ID'", + "example": "'PERPETUAL'", "comment": [ - "The subaccount ID to filter by" - ], - "selector": "primary" + "The kind filter to apply" + ] }, { - "name": "instrument", - "lite_name": "i", - "semantic_type": "asset", - "json_type": "string", + "name": "base", + "lite_name": "b", + "semantic_type": "Currency", + "json_type": "Currency", "index": 1, "array_depth": 0, "optional": true, - "default": "'all'", - "example": "'BTC_USDT_Perp'", + "default": "0", + "example": "'BTC'", "comment": [ - "The instrument filter to apply." - ], - "selector": "primary" + "The base filter to apply" + ] } ], - "comment": [ - "Subscribes to a feed of order updates pertaining to orders made by your account.", - "Unlike the Order Stream, this only streams state updates, drastically improving throughput, and latency.", - "Each Order can be uniquely identified by its `order_id` or `client_order_id`.", - "To subscribe to all orders, specify an empty `instrument` (eg. `2345123`).", - "Otherwise, specify the `instrument` to only receive orders for that instrument (eg. `2345123-BTC_USDT_Perp`)." - ] + "comment": [] }, { - "name": "OrderStateFeed", - "is_root": false, + "name": "ApiGetLPInfoResponse", + "is_root": true, "fields": [ { - "name": "order_id", - "lite_name": "oi", - "semantic_type": "uint128", - "json_type": "string", + "name": "is_lp_maker", + "lite_name": "il", + "semantic_type": "bool", + "json_type": "boolean", "index": 0, "array_depth": 0, "optional": false, - "example": "'10000101000203040506'", + "example": "true", "comment": [ - "A unique 128-bit identifier for the order, deterministically generated within the GRVT backend" + "Is LP maker" ] }, { - "name": "client_order_id", - "lite_name": "co", + "name": "spread_score_value_multiplier", + "lite_name": "ss", "semantic_type": "uint64", "json_type": "string", "index": 1, "array_depth": 0, "optional": false, - "example": "'23042'", + "example": "'1000000000'", "comment": [ - "A unique identifier for the active order within a subaccount, specified by the client" + "The spread score value multiplier" ] }, { - "name": "order_state", - "lite_name": "os", - "semantic_type": "OrderState", - "json_type": "OrderState", + "name": "depth_score_value_multiplier", + "lite_name": "ds", + "semantic_type": "uint64", + "json_type": "string", "index": 2, "array_depth": 0, "optional": false, + "example": "'1000000000'", "comment": [ - "The order state object being created or updated" + "The depth score value multiplier" ] - } - ], - "comment": [] - }, - { - "name": "WSOrderStateFeedDataV1", - "is_root": true, - "fields": [ + }, { - "name": "stream", - "lite_name": "s", - "semantic_type": "string", + "name": "market_share_value_multiplier", + "lite_name": "ms", + "semantic_type": "uint64", "json_type": "string", - "index": 0, + "index": 3, "array_depth": 0, "optional": false, - "example": "'v1.state'", + "example": "'1000000000'", "comment": [ - "Stream name" + "The market share value multiplier" ] }, { - "name": "selector", - "lite_name": "s1", - "semantic_type": "string", + "name": "underlying_multiplier", + "lite_name": "um", + "semantic_type": "uint64", "json_type": "string", - "index": 1, + "index": 4, "array_depth": 0, "optional": false, - "example": "'BTC_USDT_Perp'", + "example": "'52'", "comment": [ - "Primary selector" + "Underlying multiplier" ] }, { - "name": "sequence_number", - "lite_name": "sn", + "name": "market_share_multiplier", + "lite_name": "ms1", "semantic_type": "uint64", "json_type": "string", - "index": 2, + "index": 5, "array_depth": 0, "optional": false, - "example": "'872634876'", + "example": "'1000000000'", "comment": [ - "A running sequence number that determines global message order within the specific stream" + "The market share multiplier, equal to the maker trading volume in the past 2 hours" ] }, { - "name": "feed", - "lite_name": "f", - "semantic_type": "OrderStateFeed", - "json_type": "OrderStateFeed", - "index": 3, + "name": "ask_fast_market_multiplier", + "lite_name": "af", + "semantic_type": "uint32", + "json_type": "integer", + "index": 6, "array_depth": 0, "optional": false, + "example": "'100'", "comment": [ - "The Order State Feed" + "Ask fast market multiplier" ] - } - ], - "comment": [] - }, - { - "name": "WSPositionsFeedSelectorV1", - "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" }, { - "name": "instrument", - "lite_name": "i", - "semantic_type": "asset", - "json_type": "string", - "index": 1, + "name": "bid_fast_market_multiplier", + "lite_name": "bf", + "semantic_type": "uint32", + "json_type": "integer", + "index": 7, "array_depth": 0, - "optional": true, - "default": "'all'", - "example": "'BTC_USDT_Perp'", + "optional": false, + "example": "'100'", "comment": [ - "The instrument filter to apply." - ], - "selector": "primary" + "Bid fast market multiplier" + ] } ], - "comment": [ - "Subscribes to a feed of position updates. This happens when a trade is executed.", - "To subscribe to all positions, specify an empty `instrument` (eg. `2345123`).", - "Otherwise, specify the `instrument` to only receive positions for that instrument (eg. `2345123-BTC_USDT_Perp`)." - ] + "comment": [] }, { - "name": "WSPositionsFeedDataV1", - "is_root": true, + "name": "RewardEpochInfo", + "is_root": false, "fields": [ { - "name": "stream", - "lite_name": "s", - "semantic_type": "string", - "json_type": "string", + "name": "epoch", + "lite_name": "e", + "semantic_type": "int32", + "json_type": "integer", "index": 0, "array_depth": 0, "optional": false, - "example": "'v1.position'", + "example": "'2'", "comment": [ - "Stream name" + "The epoch number" ] }, { - "name": "selector", - "lite_name": "s1", - "semantic_type": "string", + "name": "epoch_start_time", + "lite_name": "es", + "semantic_type": "timestamp", "json_type": "string", "index": 1, "array_depth": 0, "optional": false, - "example": "'BTC_USDT_Perp'", + "example": "'1726790400000000000'", "comment": [ - "Primary selector" + "The start time of the epoch" ] }, { - "name": "sequence_number", - "lite_name": "sn", - "semantic_type": "uint64", + "name": "epoch_end_time", + "lite_name": "ee", + "semantic_type": "timestamp", "json_type": "string", "index": 2, "array_depth": 0, "optional": false, - "example": "'872634876'", + "example": "'1726790400000000000'", "comment": [ - "A running sequence number that determines global message order within the specific stream" + "The end time of the epoch" ] }, { - "name": "feed", - "lite_name": "f", - "semantic_type": "Positions", - "json_type": "Positions", + "name": "status", + "lite_name": "s", + "semantic_type": "RewardEpochStatus", + "json_type": "RewardEpochStatus", "index": 3, "array_depth": 0, "optional": false, "comment": [ - "A Position being created or updated matching the request filter" + "The status of the epoch" ] } ], "comment": [] }, { - "name": "WSFillFeedSelectorV1", + "name": "ApiGetListRewardEpochResponse", "is_root": true, "fields": [ { - "name": "sub_account_id", - "lite_name": "sa", - "semantic_type": "uint64", - "json_type": "string", + "name": "ecosystem_epochs", + "lite_name": "ee", + "semantic_type": "RewardEpochInfo", + "json_type": "RewardEpochInfo", "index": 0, - "array_depth": 0, + "array_depth": 1, "optional": false, - "example": "'$GRVT_SUB_ACCOUNT_ID'", "comment": [ - "The sub account ID to request for" - ], - "selector": "primary" + "The list of epoch for ecosystem reward" + ] }, { - "name": "instrument", - "lite_name": "i", - "semantic_type": "asset", - "json_type": "string", + "name": "trading_epochs", + "lite_name": "te", + "semantic_type": "RewardEpochInfo", + "json_type": "RewardEpochInfo", "index": 1, - "array_depth": 0, - "optional": true, - "default": "'all'", - "example": "'BTC_USDT_Perp'", + "array_depth": 1, + "optional": false, "comment": [ - "The instrument filter to apply." - ], - "selector": "primary" + "The list of epoch for trader reward and lp reward" + ] } ], - "comment": [ - "Subscribes to a feed of private trade updates. This happens when a trade is executed.", - "To subscribe to all private trades, specify an empty `instrument` (eg. `2345123`).", - "Otherwise, specify the `instrument` to only receive private trades for that instrument (eg. `2345123-BTC_USDT_Perp`)." - ] + "comment": [] }, { - "name": "WSFillFeedDataV1", + "name": "ApiSubAccountTradeAggregationRequest", "is_root": true, "fields": [ { - "name": "stream", - "lite_name": "s", - "semantic_type": "string", - "json_type": "string", + "name": "limit", + "lite_name": "l", + "semantic_type": "int32", + "json_type": "integer", "index": 0, "array_depth": 0, "optional": false, - "example": "'v1.fill'", + "example": "100", "comment": [ - "The websocket channel to which the response is sent" + "Optional. The limit of the number of results to return" ] }, { - "name": "selector", - "lite_name": "s1", - "semantic_type": "string", - "json_type": "string", + "name": "interval", + "lite_name": "i", + "semantic_type": "SubAccountTradeInterval", + "json_type": "SubAccountTradeInterval", "index": 1, "array_depth": 0, "optional": false, - "example": "'BTC_USDT_Perp'", "comment": [ - "Primary selector" + "The interval of each sub account trade" ] }, { - "name": "sequence_number", - "lite_name": "sn", + "name": "sub_account_i_ds", + "lite_name": "sa", "semantic_type": "uint64", "json_type": "string", "index": 2, - "array_depth": 0, + "array_depth": 1, "optional": false, - "example": "'872634876'", + "example": "['2376', '5821']", "comment": [ - "A running sequence number that determines global message order within the specific stream" + "The list of sub account ids to query" ] }, { - "name": "feed", - "lite_name": "f", - "semantic_type": "Fill", - "json_type": "Fill", + "name": "start_interval", + "lite_name": "si", + "semantic_type": "timestamp", + "json_type": "string", "index": 3, "array_depth": 0, "optional": false, + "example": "'1697788800000000000'", "comment": [ - "A private trade matching the request filter" + "Optional. The starting time in unix nanoseconds of a specific interval to query" ] - } - ], - "comment": [] - }, - { - "name": "WSTransferFeedSelectorV1", - "is_root": true, - "fields": [ + }, { - "name": "main_account_id", - "lite_name": "ma", - "semantic_type": "address", + "name": "start_time", + "lite_name": "st", + "semantic_type": "timestamp", "json_type": "string", - "index": 0, + "index": 4, + "array_depth": 0, + "optional": true, + "default": "0", + "example": "'1697788800000000000'", + "comment": [ + "Optional. Start time in unix nanoseconds" + ] + }, + { + "name": "end_time", + "lite_name": "et", + "semantic_type": "timestamp", + "json_type": "string", + "index": 5, + "array_depth": 0, + "optional": true, + "default": "now()", + "example": "'1697788800000000000'", + "comment": [ + "Optional. End time in unix nanoseconds" + ] + }, + { + "name": "is_maker", + "lite_name": "im", + "semantic_type": "bool", + "json_type": "boolean", + "index": 6, "array_depth": 0, "optional": false, - "example": "'$GRVT_MAIN_ACCOUNT_ID'", + "example": "true", "comment": [ - "The main account ID to request for" - ], - "selector": "primary" + "Filter on the maker of the trade" + ] }, { - "name": "sub_account_id", - "lite_name": "sa", - "semantic_type": "uint64", + "name": "is_taker", + "lite_name": "it", + "semantic_type": "bool", + "json_type": "boolean", + "index": 7, + "array_depth": 0, + "optional": false, + "example": "true", + "comment": [ + "Filter on the taker of the trade" + ] + }, + { + "name": "cursor", + "lite_name": "c", + "semantic_type": "string", "json_type": "string", - "index": 1, + "index": 8, "array_depth": 0, "optional": true, - "default": "'0'", - "example": "'$GRVT_SUB_ACCOUNT_ID'", + "default": "", + "example": "''", "comment": [ - "The sub account ID to request for" - ], - "selector": "primary" + "The cursor to indicate when to start the next query from" + ] } ], "comment": [ - "Subscribes to a feed of transfers. This will execute when there is any transfer to or from the selected account.", - "To subscribe to a main account, specify the account ID (eg. `0x9fe3758b67ce7a2875ee4b452f01a5282d84ed8a`).", - "To subscribe to a sub account, specify the main account and the sub account dash separated (eg. `0x9fe3758b67ce7a2875ee4b452f01a5282d84ed8a-1920109784202388`)." + "startTime are optional parameters. The semantics of these parameters are as follows:\u003cul\u003e" ] }, { - "name": "Transfer", + "name": "SubAccountTradeAggregation", "is_root": false, "fields": [ { - "name": "from_account_id", - "lite_name": "fa", - "semantic_type": "address", + "name": "sub_account_id", + "lite_name": "sa", + "semantic_type": "uint64", "json_type": "string", "index": 0, "array_depth": 0, "optional": false, - "example": "'0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0'", + "example": "'$GRVT_SUB_ACCOUNT_ID'", "comment": [ - "The account to transfer from" + "The sub account id" ] }, { - "name": "from_sub_account_id", - "lite_name": "fs", - "semantic_type": "uint64", + "name": "total_fee", + "lite_name": "tf", + "semantic_type": "int64", "json_type": "string", "index": 1, "array_depth": 0, "optional": false, - "example": "'$GRVT_SUB_ACCOUNT_ID'", + "example": "'10000101000203040506'", "comment": [ - "The subaccount to transfer from (0 if transferring from main account)" + "Total fee paid" ] }, { - "name": "to_account_id", - "lite_name": "ta", - "semantic_type": "address", + "name": "total_trade_volume", + "lite_name": "tt", + "semantic_type": "uint256", "json_type": "string", "index": 2, "array_depth": 0, "optional": false, - "example": "'0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0'", + "example": "'10000101000203040506'", "comment": [ - "The account to deposit into" + "Total volume traded" ] }, { - "name": "to_sub_account_id", - "lite_name": "ts", + "name": "num_traded", + "lite_name": "nt", "semantic_type": "uint64", "json_type": "string", "index": 3, "array_depth": 0, "optional": false, - "example": "'$GRVT_SUB_ACCOUNT_ID'", + "example": "100", "comment": [ - "The subaccount to transfer to (0 if transferring to main account)" + "Number of trades" ] }, { - "name": "currency", - "lite_name": "c", - "semantic_type": "Currency", - "json_type": "Currency", + "name": "positive_fee", + "lite_name": "pf", + "semantic_type": "int64", + "json_type": "string", "index": 4, "array_depth": 0, "optional": false, - "example": "'USDT'", + "example": "'10000101000203040506'", "comment": [ - "The token currency to transfer" + "Total positive fee paid by user" + ] + } + ], + "comment": [ + "Similar to sub-account trade, but not divided by individual assets." + ] + }, + { + "name": "ApiSubAccountTradeAggregationResponse", + "is_root": true, + "fields": [ + { + "name": "result", + "lite_name": "r", + "semantic_type": "SubAccountTradeAggregation", + "json_type": "SubAccountTradeAggregation", + "index": 0, + "array_depth": 1, + "optional": false, + "comment": [ + "The sub account trade aggregation result set for given interval" ] }, { - "name": "num_tokens", - "lite_name": "nt", + "name": "next", + "lite_name": "n", "semantic_type": "string", "json_type": "string", - "index": 5, + "index": 1, "array_depth": 0, - "optional": false, - "example": "'10.50'", + "optional": true, + "default": "''", + "example": "'Qw0918='", "comment": [ - "The number of tokens to transfer" + "The cursor to indicate when to start the next query from" ] - }, + } + ], + "comment": [] + }, + { + "name": "ApiGetTraderStatResponse", + "is_root": true, + "fields": [ { - "name": "signature", - "lite_name": "s", - "semantic_type": "Signature", - "json_type": "Signature", - "index": 6, + "name": "total_fee", + "lite_name": "tf", + "semantic_type": "int64", + "json_type": "string", + "index": 0, "array_depth": 0, "optional": false, + "example": "'10000101000203040506'", "comment": [ - "The signature of the transfer" + "Total fee paid" ] - }, + } + ], + "comment": [] + }, + { + "name": "TraderMetric", + "is_root": true, + "fields": [ { - "name": "transfer_type", - "lite_name": "tt", - "semantic_type": "TransferType", - "json_type": "TransferType", - "index": 7, + "name": "total_fee", + "lite_name": "tf", + "semantic_type": "int64", + "json_type": "string", + "index": 0, "array_depth": 0, "optional": false, + "example": "'10000101000203040506'", "comment": [ - "The type of transfer" + "Total fee paid" ] }, { - "name": "transfer_metadata", - "lite_name": "tm", - "semantic_type": "string", - "json_type": "string", - "index": 8, + "name": "total_point", + "lite_name": "tp", + "semantic_type": "float64", + "json_type": "number", + "index": 1, "array_depth": 0, "optional": false, + "example": "'10000000.5'", "comment": [ - "The metadata of the transfer" + "Total trader point of this epoch/phase" ] } ], "comment": [] }, { - "name": "WSTransferFeedDataV1", + "name": "ApiFindTraderEpochMetricResponse", "is_root": true, "fields": [ { - "name": "stream", - "lite_name": "s", - "semantic_type": "string", - "json_type": "string", + "name": "metric", + "lite_name": "m", + "semantic_type": "TraderMetric", + "json_type": "TraderMetric", "index": 0, "array_depth": 0, "optional": false, - "example": "'v1.transfer'", "comment": [ - "The websocket channel to which the response is sent" + "Phase zero metric" ] }, { - "name": "selector", - "lite_name": "s1", - "semantic_type": "string", - "json_type": "string", + "name": "rank", + "lite_name": "r", + "semantic_type": "uint32", + "json_type": "integer", "index": 1, "array_depth": 0, "optional": false, - "example": "'BTC_USDT_Perp'", + "example": "'52'", "comment": [ - "Primary selector" + "The rank of the account in the trader" ] }, { - "name": "sequence_number", - "lite_name": "sn", - "semantic_type": "uint64", - "json_type": "string", + "name": "total", + "lite_name": "t", + "semantic_type": "uint32", + "json_type": "integer", "index": 2, "array_depth": 0, "optional": false, - "example": "'872634876'", + "example": "52", "comment": [ - "A running sequence number that determines global message order within the specific stream" + "The total number of accounts in the trader" ] }, { - "name": "feed", - "lite_name": "f", - "semantic_type": "Transfer", - "json_type": "Transfer", + "name": "last_calculated_at", + "lite_name": "lc", + "semantic_type": "timestamp", + "json_type": "string", "index": 3, "array_depth": 0, "optional": false, + "example": "'1697788800000000000'", "comment": [ - "The Transfer object" + "The time when the trader points were last calculated" ] } ], - "comment": [ - "Subscribes to a feed of transfer updates." - ] + "comment": [] }, { - "name": "WSDepositFeedSelectorV1", + "name": "TraderLeaderboardUser", "is_root": true, "fields": [ { - "name": "main_account_id", - "lite_name": "ma", - "semantic_type": "address", - "json_type": "string", - "index": 0, - "array_depth": 0, - "optional": false, - "example": "'$GRVT_MAIN_ACCOUNT_ID'", - "comment": [ - "The main account ID to request for" - ], - "selector": "primary" - } - ], - "comment": [ - "Subscribes to a feed of deposits. This will execute when there is any deposit to selected account.", - "To subscribe to a main account, specify the account ID (eg. `0x9fe3758b67ce7a2875ee4b452f01a5282d84ed8a`)." - ] - }, - { - "name": "Deposit", - "is_root": false, - "fields": [ - { - "name": "tx_hash", - "lite_name": "th", - "semantic_type": "uint256", + "name": "account_id", + "lite_name": "ai", + "semantic_type": "string", "json_type": "string", "index": 0, "array_depth": 0, "optional": false, - "example": "'0x1234567890123456789012345678901234567890123456789012345678901234'", + "example": "'ACC_1234567890'", "comment": [ - "The hash of the bridgemint event producing the deposit" + "The off chain account id" ] }, { - "name": "to_account_id", - "lite_name": "ta", - "semantic_type": "address", - "json_type": "string", + "name": "rank", + "lite_name": "r", + "semantic_type": "uint32", + "json_type": "integer", "index": 1, "array_depth": 0, "optional": false, - "example": "'0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0'", + "example": "'52'", "comment": [ - "The account to deposit into" + "The rank of the account in the Trader" ] }, { - "name": "currency", - "lite_name": "c", - "semantic_type": "Currency", - "json_type": "Currency", + "name": "total_point", + "lite_name": "tp", + "semantic_type": "float64", + "json_type": "number", "index": 2, "array_depth": 0, "optional": false, - "example": "'USDT'", + "example": "'10000000.5'", "comment": [ - "The token currency to deposit" + "Total Trader point" ] }, { - "name": "num_tokens", - "lite_name": "nt", + "name": "twitter_username", + "lite_name": "tu", "semantic_type": "string", "json_type": "string", "index": 3, "array_depth": 0, "optional": false, - "example": "'10.50'", + "example": "'elonmusk'", "comment": [ - "The number of tokens to deposit" + "The twitter username of the account" ] } ], "comment": [] }, { - "name": "WSDepositFeedDataV1", + "name": "ApiFindTraderLeaderboardResponse", + "is_root": true, + "fields": [ + { + "name": "users", + "lite_name": "u", + "semantic_type": "TraderLeaderboardUser", + "json_type": "TraderLeaderboardUser", + "index": 0, + "array_depth": 1, + "optional": false, + "comment": [ + "The list of trader leaderboard users" + ] + } + ], + "comment": [] + }, + { + "name": "WSOrderFeedSelectorV1", + "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" + }, + { + "name": "instrument", + "lite_name": "i", + "semantic_type": "asset", + "json_type": "string", + "index": 1, + "array_depth": 0, + "optional": true, + "default": "'all'", + "example": "'BTC_USDT_Perp'", + "comment": [ + "The instrument filter to apply." + ], + "selector": "primary" + } + ], + "comment": [ + "Subscribes to a feed of order updates pertaining to orders made by your account.", + "Each Order can be uniquely identified by its `order_id` or `client_order_id`.", + "To subscribe to all orders, specify an empty `instrument` (eg. `2345123`).", + "Otherwise, specify the `instrument` to only receive orders for that instrument (eg. `2345123-BTC_USDT_Perp`)." + ] + }, + { + "name": "WSOrderFeedDataV1", "is_root": true, "fields": [ { @@ -11129,9 +11931,9 @@ "index": 0, "array_depth": 0, "optional": false, - "example": "'v1.deposit'", + "example": "'v1.order'", "comment": [ - "The websocket channel to which the response is sent" + "Stream name" ] }, { @@ -11163,117 +11965,120 @@ { "name": "feed", "lite_name": "f", - "semantic_type": "Deposit", - "json_type": "Deposit", + "semantic_type": "Order", + "json_type": "Order", "index": 3, "array_depth": 0, "optional": false, "comment": [ - "The Deposit object" + "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": [ - "Subscribes to a feed of deposit updates." - ] + "comment": [] }, { - "name": "WSWithdrawalFeedSelectorV1", + "name": "WSOrderStateFeedSelectorV1", "is_root": true, "fields": [ { - "name": "main_account_id", - "lite_name": "ma", - "semantic_type": "address", + "name": "sub_account_id", + "lite_name": "sa", + "semantic_type": "uint64", "json_type": "string", "index": 0, "array_depth": 0, "optional": false, - "example": "'$GRVT_MAIN_ACCOUNT_ID'", + "example": "'$GRVT_SUB_ACCOUNT_ID'", "comment": [ - "The main account ID to request for" + "The subaccount ID to filter by" ], "selector": "primary" - } - ], - "comment": [ - "Subscribes to a feed of withdrawals. This will execute when there is any withdrawal from the selected account.", - "To subscribe to a main account, specify the account ID (eg. `0x9fe3758b67ce7a2875ee4b452f01a5282d84ed8a`)." - ] + }, + { + "name": "instrument", + "lite_name": "i", + "semantic_type": "asset", + "json_type": "string", + "index": 1, + "array_depth": 0, + "optional": true, + "default": "'all'", + "example": "'BTC_USDT_Perp'", + "comment": [ + "The instrument filter to apply." + ], + "selector": "primary" + } + ], + "comment": [ + "Subscribes to a feed of order updates pertaining to orders made by your account.", + "Unlike the Order Stream, this only streams state updates, drastically improving throughput, and latency.", + "Each Order can be uniquely identified by its `order_id` or `client_order_id`.", + "To subscribe to all orders, specify an empty `instrument` (eg. `2345123`).", + "Otherwise, specify the `instrument` to only receive orders for that instrument (eg. `2345123-BTC_USDT_Perp`)." + ] }, { - "name": "Withdrawal", + "name": "OrderStateFeed", "is_root": false, "fields": [ { - "name": "from_account_id", - "lite_name": "fa", - "semantic_type": "address", + "name": "order_id", + "lite_name": "oi", + "semantic_type": "uint128", "json_type": "string", "index": 0, "array_depth": 0, "optional": false, - "example": "'0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0'", + "example": "'10000101000203040506'", "comment": [ - "The subaccount to withdraw from" + "A unique 128-bit identifier for the order, deterministically generated within the GRVT backend" ] }, { - "name": "to_eth_address", - "lite_name": "te", - "semantic_type": "address", + "name": "client_order_id", + "lite_name": "co", + "semantic_type": "uint64", "json_type": "string", "index": 1, "array_depth": 0, "optional": false, - "example": "'0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0'", + "example": "'23042'", "comment": [ - "The ethereum address to withdraw to" + "A unique identifier for the active order within a subaccount, specified by the client" ] }, { - "name": "currency", - "lite_name": "c", - "semantic_type": "Currency", - "json_type": "Currency", + "name": "order_state", + "lite_name": "os", + "semantic_type": "OrderState", + "json_type": "OrderState", "index": 2, "array_depth": 0, "optional": false, - "example": "'USDT'", - "comment": [ - "The token currency to withdraw" - ] - }, - { - "name": "num_tokens", - "lite_name": "nt", - "semantic_type": "string", - "json_type": "string", - "index": 3, - "array_depth": 0, - "optional": false, - "example": "'10.50'", - "comment": [ - "The number of tokens to withdraw" - ] - }, - { - "name": "signature", - "lite_name": "s", - "semantic_type": "Signature", - "json_type": "Signature", - "index": 4, - "array_depth": 0, - "optional": false, "comment": [ - "The signature of the withdrawal" + "The order state object being created or updated" ] } ], "comment": [] }, { - "name": "WSWithdrawalFeedDataV1", + "name": "WSOrderStateFeedDataV1", "is_root": true, "fields": [ { @@ -11284,9 +12089,9 @@ "index": 0, "array_depth": 0, "optional": false, - "example": "'v1.withdrawal'", + "example": "'v1.state'", "comment": [ - "The websocket channel to which the response is sent" + "Stream name" ] }, { @@ -11318,340 +12123,334 @@ { "name": "feed", "lite_name": "f", - "semantic_type": "Withdrawal", - "json_type": "Withdrawal", + "semantic_type": "OrderStateFeed", + "json_type": "OrderStateFeed", "index": 3, "array_depth": 0, "optional": false, "comment": [ - "The Withdrawal object" + "The Order State Feed" + ] + }, + { + "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": [ - "Subscribes to a feed of withdrawal updates." - ] + "comment": [] }, { - "name": "ApiWithdrawalRequest", + "name": "WSPositionsFeedSelectorV1", "is_root": true, "fields": [ { - "name": "from_account_id", - "lite_name": "fa", - "semantic_type": "address", + "name": "sub_account_id", + "lite_name": "sa", + "semantic_type": "uint64", "json_type": "string", "index": 0, "array_depth": 0, "optional": false, - "example": "'0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0'", + "example": "'$GRVT_SUB_ACCOUNT_ID'", "comment": [ - "The main account to withdraw from" - ] + "The subaccount ID to filter by" + ], + "selector": "primary" }, { - "name": "to_eth_address", - "lite_name": "te", - "semantic_type": "address", + "name": "instrument", + "lite_name": "i", + "semantic_type": "asset", "json_type": "string", "index": 1, "array_depth": 0, - "optional": false, - "example": "'0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0'", - "comment": [ - "The Ethereum wallet to withdraw into" - ] - }, - { - "name": "currency", - "lite_name": "c", - "semantic_type": "Currency", - "json_type": "Currency", - "index": 2, - "array_depth": 0, - "optional": false, - "example": "'USDT'", - "comment": [ - "The token currency to withdraw" - ] - }, - { - "name": "num_tokens", - "lite_name": "nt", - "semantic_type": "string", - "json_type": "string", - "index": 3, - "array_depth": 0, - "optional": false, - "example": "'1500.0'", - "comment": [ - "The number of tokens to withdraw, quoted in tokenCurrency decimal units" - ] - }, - { - "name": "signature", - "lite_name": "s", - "semantic_type": "Signature", - "json_type": "Signature", - "index": 4, - "array_depth": 0, - "optional": false, + "optional": true, + "default": "'all'", + "example": "'BTC_USDT_Perp'", "comment": [ - "The signature of the withdrawal" - ] + "The instrument filter to apply." + ], + "selector": "primary" } ], "comment": [ - "Leverage this API to initialize a withdrawal from GRVT's Hyperchain onto Ethereum.", - "Do take note that the bridging process does take time. The GRVT UI will help you keep track of bridging progress, and notify you once its complete.", - "", - "If not withdrawing the entirety of your balance, there is a minimum withdrawal amount. Currently that amount is ~25 USDT.", - "Withdrawal fees also apply to cover the cost of the Ethereum transaction.", - "Note that your funds will always remain in self-custory throughout the withdrawal process. At no stage does GRVT gain control over your funds." + "Subscribes to a feed of position updates. This happens when a trade is executed.", + "To subscribe to all positions, specify an empty `instrument` (eg. `2345123`).", + "Otherwise, specify the `instrument` to only receive positions for that instrument (eg. `2345123-BTC_USDT_Perp`)." ] }, { - "name": "ApiTransferRequest", + "name": "WSPositionsFeedDataV1", "is_root": true, "fields": [ { - "name": "from_account_id", - "lite_name": "fa", - "semantic_type": "address", + "name": "stream", + "lite_name": "s", + "semantic_type": "string", "json_type": "string", "index": 0, "array_depth": 0, "optional": false, - "example": "'0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0'", + "example": "'v1.position'", "comment": [ - "The main account to transfer from" + "Stream name" ] }, { - "name": "from_sub_account_id", - "lite_name": "fs", - "semantic_type": "uint64", + "name": "selector", + "lite_name": "s1", + "semantic_type": "string", "json_type": "string", "index": 1, "array_depth": 0, "optional": false, - "example": "'$GRVT_SUB_ACCOUNT_ID'", + "example": "'BTC_USDT_Perp'", "comment": [ - "The subaccount to transfer from (0 if transferring from main account)" + "Primary selector" ] }, { - "name": "to_account_id", - "lite_name": "ta", - "semantic_type": "address", + "name": "sequence_number", + "lite_name": "sn", + "semantic_type": "uint64", "json_type": "string", "index": 2, "array_depth": 0, "optional": false, - "example": "'0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0'", + "example": "'872634876'", "comment": [ - "The main account to deposit into" + "A running sequence number that determines global message order within the specific stream" ] }, { - "name": "to_sub_account_id", - "lite_name": "ts", - "semantic_type": "uint64", - "json_type": "string", + "name": "feed", + "lite_name": "f", + "semantic_type": "Positions", + "json_type": "Positions", "index": 3, "array_depth": 0, "optional": false, - "example": "'$GRVT_SUB_ACCOUNT_ID'", "comment": [ - "The subaccount to transfer to (0 if transferring to main account)" + "A Position being created or updated matching the request filter" ] }, { - "name": "currency", - "lite_name": "c", - "semantic_type": "Currency", - "json_type": "Currency", + "name": "prev_sequence_number", + "lite_name": "ps", + "semantic_type": "uint64", + "json_type": "string", "index": 4, "array_depth": 0, "optional": false, - "example": "'USDT'", + "example": "'872634875'", "comment": [ - "The token currency to transfer" + "The previous sequence number that determines global message order within the specific stream" ] - }, + } + ], + "comment": [] + }, + { + "name": "WSFillFeedSelectorV1", + "is_root": true, + "fields": [ { - "name": "num_tokens", - "lite_name": "nt", - "semantic_type": "string", + "name": "sub_account_id", + "lite_name": "sa", + "semantic_type": "uint64", "json_type": "string", - "index": 5, + "index": 0, "array_depth": 0, "optional": false, - "example": "'1500.0'", + "example": "'$GRVT_SUB_ACCOUNT_ID'", "comment": [ - "The number of tokens to transfer, quoted in tokenCurrency decimal units" - ] - }, - { - "name": "signature", - "lite_name": "s", - "semantic_type": "Signature", - "json_type": "Signature", - "index": 6, - "array_depth": 0, - "optional": false, - "comment": [ - "The signature of the transfer" - ] - }, - { - "name": "transfer_type", - "lite_name": "tt", - "semantic_type": "TransferType", - "json_type": "TransferType", - "index": 7, - "array_depth": 0, - "optional": false, - "comment": [ - "The type of transfer" - ] + "The sub account ID to request for" + ], + "selector": "primary" }, { - "name": "transfer_metadata", - "lite_name": "tm", - "semantic_type": "string", + "name": "instrument", + "lite_name": "i", + "semantic_type": "asset", "json_type": "string", - "index": 8, + "index": 1, "array_depth": 0, - "optional": false, - "example": "{\"provider\":\"XY\",\"direction\":\"WITHDRAWAL\",\"provider_tx_id\":\"txn123456\",\"chainid\":\"42161\",\"endpoint\":\"0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0\"}", + "optional": true, + "default": "'all'", + "example": "'BTC_USDT_Perp'", "comment": [ - "The metadata of the transfer" - ] + "The instrument filter to apply." + ], + "selector": "primary" } ], "comment": [ - "This API allows you to transfer funds in multiple different ways\u003cul\u003e", - "\u003cli\u003eBetween SubAccounts within your Main Account\u003c/li\u003e", - "\u003cli\u003eBetween your MainAccount and your SubAccounts\u003c/li\u003e", - "\u003cli\u003eTo other MainAccounts that you have previously allowlisted\u003c/li\u003e", - "\u003c/ul\u003e\u003cb\u003eFast Withdrawal Funding Address\u003c/b\u003e", - "For fast withdrawals, funds must be sent to the designated funding account address. Please ensure you use the correct address based on the environment:", - "\u003cb\u003eProduction Environment Address:\u003c/b\u003e", - "\u003cem\u003e[To be updated, not ready yet]\u003c/em\u003e", - "This address should be specified as the \u003ccode\u003eto_account_id\u003c/code\u003e in your API requests for transferring funds using the transfer API. Ensure accurate input to avoid loss of funds or use the UI.", - "" + "Subscribes to a feed of private trade updates. This happens when a trade is executed.", + "To subscribe to all private trades, specify an empty `instrument` (eg. `2345123`).", + "Otherwise, specify the `instrument` to only receive private trades for that instrument (eg. `2345123-BTC_USDT_Perp`)." ] }, { - "name": "ApiDepositHistoryRequest", + "name": "WSFillFeedDataV1", "is_root": true, "fields": [ { - "name": "currency", - "lite_name": "c", - "semantic_type": "Currency", - "json_type": "Currency", + "name": "stream", + "lite_name": "s", + "semantic_type": "string", + "json_type": "string", "index": 0, - "array_depth": 1, + "array_depth": 0, "optional": false, - "example": "['USDT', 'USDC']", + "example": "'v1.fill'", "comment": [ - "The token currency to query for, if nil or empty, return all deposits. Otherwise, only entries matching the filter will be returned" + "The websocket channel to which the response is sent" ] }, { - "name": "start_time", - "lite_name": "st", - "semantic_type": "timestamp", + "name": "selector", + "lite_name": "s1", + "semantic_type": "string", "json_type": "string", "index": 1, "array_depth": 0, - "optional": true, - "default": "0", - "example": "'1697788800000000000'", + "optional": false, + "example": "'BTC_USDT_Perp'", "comment": [ - "The start time to query for in unix nanoseconds" + "Primary selector" ] }, { - "name": "end_time", - "lite_name": "et", - "semantic_type": "timestamp", + "name": "sequence_number", + "lite_name": "sn", + "semantic_type": "uint64", "json_type": "string", "index": 2, "array_depth": 0, - "optional": true, - "default": "now()", - "example": "'1697788800000000000'", + "optional": false, + "example": "'872634876'", "comment": [ - "The end time to query for in unix nanoseconds" + "A running sequence number that determines global message order within the specific stream" ] }, { - "name": "limit", - "lite_name": "l", - "semantic_type": "uint32", - "json_type": "integer", + "name": "feed", + "lite_name": "f", + "semantic_type": "Fill", + "json_type": "Fill", "index": 3, "array_depth": 0, - "optional": true, - "default": "500", - "example": "500", + "optional": false, "comment": [ - "The limit to query for. Defaults to 500; Max 1000" + "A private trade matching the request filter" ] }, { - "name": "cursor", - "lite_name": "c1", - "semantic_type": "string", + "name": "prev_sequence_number", + "lite_name": "ps", + "semantic_type": "uint64", "json_type": "string", "index": 4, "array_depth": 0, - "optional": true, - "default": "''", - "example": "''", + "optional": false, + "example": "'872634875'", "comment": [ - "The cursor to indicate when to start the next query from" + "The previous sequence number that determines global message order within the specific stream" ] } ], + "comment": [] + }, + { + "name": "WSTransferFeedSelectorV1", + "is_root": true, + "fields": [ + { + "name": "main_account_id", + "lite_name": "ma", + "semantic_type": "address", + "json_type": "string", + "index": 0, + "array_depth": 0, + "optional": false, + "example": "'$GRVT_MAIN_ACCOUNT_ID'", + "comment": [ + "The main account ID to request for" + ], + "selector": "primary" + }, + { + "name": "sub_account_id", + "lite_name": "sa", + "semantic_type": "uint64", + "json_type": "string", + "index": 1, + "array_depth": 0, + "optional": true, + "default": "'0'", + "example": "'$GRVT_SUB_ACCOUNT_ID'", + "comment": [ + "The sub account ID to request for" + ], + "selector": "primary" + } + ], "comment": [ - "The request to get the historical deposits of an account", - "The history is returned in reverse chronological order", - "", - "Pagination works as follows:\u003cul\u003e\u003cli\u003eWe perform a reverse chronological lookup, starting from `end_time`. If `end_time` is not set, we start from the most recent data.\u003c/li\u003e\u003cli\u003eThe lookup is limited to `limit` records. If more data is requested, the response will contain a `next` cursor for you to query the next page.\u003c/li\u003e\u003cli\u003eIf a `cursor` is provided, it will be used to fetch results from that point onwards.\u003c/li\u003e\u003cli\u003ePagination will continue until the `start_time` is reached. If `start_time` is not set, pagination will continue as far back as our data retention policy allows.\u003c/li\u003e\u003c/ul\u003e" + "Subscribes to a feed of transfers. This will execute when there is any transfer to or from the selected account.", + "To subscribe to a main account, specify the account ID (eg. `0x9fe3758b67ce7a2875ee4b452f01a5282d84ed8a`).", + "To subscribe to a sub account, specify the main account and the sub account dash separated (eg. `0x9fe3758b67ce7a2875ee4b452f01a5282d84ed8a-1920109784202388`)." ] }, { - "name": "DepositHistory", - "is_root": false, + "name": "TransferHistory", + "is_root": true, "fields": [ { - "name": "l_1_hash", - "lite_name": "l1", - "semantic_type": "uint256", + "name": "tx_id", + "lite_name": "ti", + "semantic_type": "uint64", "json_type": "string", "index": 0, "array_depth": 0, "optional": false, - "example": "'0x10000101000203040506'", + "example": "'1028403'", "comment": [ - "The L1 txHash of the deposit" + "The transaction ID of the transfer" ] }, { - "name": "l_2_hash", - "lite_name": "l2", - "semantic_type": "uint256", + "name": "from_account_id", + "lite_name": "fa", + "semantic_type": "address", "json_type": "string", "index": 1, "array_depth": 0, "optional": false, - "example": "'0x10000101000203040506'", + "example": "'0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0'", "comment": [ - "The L2 txHash of the deposit" + "The account to transfer from" + ] + }, + { + "name": "from_sub_account_id", + "lite_name": "fs", + "semantic_type": "uint64", + "json_type": "string", + "index": 2, + "array_depth": 0, + "optional": false, + "example": "'$GRVT_SUB_ACCOUNT_ID'", + "comment": [ + "The subaccount to transfer from (0 if transferring from main account)" ] }, { @@ -11659,7 +12458,7 @@ "lite_name": "ta", "semantic_type": "address", "json_type": "string", - "index": 2, + "index": 3, "array_depth": 0, "optional": false, "example": "'0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0'", @@ -11667,17 +12466,30 @@ "The account to deposit into" ] }, + { + "name": "to_sub_account_id", + "lite_name": "ts", + "semantic_type": "uint64", + "json_type": "string", + "index": 4, + "array_depth": 0, + "optional": false, + "example": "'$GRVT_SUB_ACCOUNT_ID'", + "comment": [ + "The subaccount to transfer to (0 if transferring to main account)" + ] + }, { "name": "currency", "lite_name": "c", "semantic_type": "Currency", "json_type": "Currency", - "index": 3, + "index": 5, "array_depth": 0, "optional": false, "example": "'USDT'", "comment": [ - "The token currency to deposit" + "The token currency to transfer" ] }, { @@ -11685,211 +12497,178 @@ "lite_name": "nt", "semantic_type": "string", "json_type": "string", - "index": 4, + "index": 6, "array_depth": 0, "optional": false, "example": "'1500.0'", "comment": [ - "The number of tokens to deposit" + "The number of tokens to transfer" ] }, { - "name": "initiated_time", - "lite_name": "it", - "semantic_type": "timestamp", - "json_type": "string", - "index": 5, + "name": "signature", + "lite_name": "s", + "semantic_type": "Signature", + "json_type": "Signature", + "index": 7, "array_depth": 0, "optional": false, - "example": "'1697788800000000000'", "comment": [ - "The timestamp when the deposit was initiated on L1 in unix nanoseconds" + "The signature of the transfer" ] }, { - "name": "confirmed_time", - "lite_name": "ct", + "name": "event_time", + "lite_name": "et", "semantic_type": "timestamp", "json_type": "string", - "index": 6, + "index": 8, "array_depth": 0, "optional": false, "example": "'1697788800000000000'", "comment": [ - "The timestamp when the deposit was confirmed on L2 in unix nanoseconds" + "The timestamp of the transfer in unix nanoseconds" ] }, { - "name": "from_address", - "lite_name": "fa", - "semantic_type": "address", - "json_type": "string", - "index": 7, - "array_depth": 0, - "optional": false, - "example": "'0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0'", - "comment": [ - "The address of the sender" - ] - } - ], - "comment": [] - }, - { - "name": "ApiDepositHistoryResponse", - "is_root": true, - "fields": [ - { - "name": "result", - "lite_name": "r", - "semantic_type": "DepositHistory", - "json_type": "DepositHistory", - "index": 0, - "array_depth": 1, + "name": "transfer_type", + "lite_name": "tt", + "semantic_type": "TransferType", + "json_type": "TransferType", + "index": 9, + "array_depth": 0, "optional": false, "comment": [ - "The deposit history matching the request account" + "The type of transfer" ] }, { - "name": "next", - "lite_name": "n", + "name": "transfer_metadata", + "lite_name": "tm", "semantic_type": "string", "json_type": "string", - "index": 1, + "index": 10, "array_depth": 0, - "optional": true, - "default": "''", - "example": "'Qw0918='", + "optional": false, "comment": [ - "The cursor to indicate when to start the next query from" + "The metadata of the transfer" ] } ], "comment": [] }, { - "name": "ApiTransferHistoryRequest", + "name": "WSTransferFeedDataV1", "is_root": true, "fields": [ { - "name": "currency", - "lite_name": "c", - "semantic_type": "Currency", - "json_type": "Currency", + "name": "stream", + "lite_name": "s", + "semantic_type": "string", + "json_type": "string", "index": 0, - "array_depth": 1, + "array_depth": 0, "optional": false, - "example": "['USDT', 'USDC']", + "example": "'v1.transfer'", "comment": [ - "The token currency to query for, if nil or empty, return all transfers. Otherwise, only entries matching the filter will be returned" + "The websocket channel to which the response is sent" ] }, { - "name": "start_time", - "lite_name": "st", - "semantic_type": "timestamp", + "name": "selector", + "lite_name": "s1", + "semantic_type": "string", "json_type": "string", "index": 1, "array_depth": 0, - "optional": true, - "default": "0", - "example": "'1697788800000000000'", + "optional": false, + "example": "'BTC_USDT_Perp'", "comment": [ - "The start time to query for in unix nanoseconds" + "Primary selector" ] }, { - "name": "end_time", - "lite_name": "et", - "semantic_type": "timestamp", + "name": "sequence_number", + "lite_name": "sn", + "semantic_type": "uint64", "json_type": "string", "index": 2, "array_depth": 0, - "optional": true, - "default": "now()", - "example": "'1697788800000000000'", + "optional": false, + "example": "'872634876'", "comment": [ - "The end time to query for in unix nanoseconds" + "A running sequence number that determines global message order within the specific stream" ] }, { - "name": "limit", - "lite_name": "l", - "semantic_type": "uint32", - "json_type": "integer", + "name": "feed", + "lite_name": "f", + "semantic_type": "TransferHistory", + "json_type": "TransferHistory", "index": 3, "array_depth": 0, - "optional": true, - "default": "500", - "example": "500", + "optional": false, "comment": [ - "The limit to query for. Defaults to 500; Max 1000" + "The transfer history matching the requested filters" ] }, { - "name": "cursor", - "lite_name": "c1", - "semantic_type": "string", + "name": "prev_sequence_number", + "lite_name": "ps", + "semantic_type": "uint64", "json_type": "string", "index": 4, "array_depth": 0, - "optional": true, - "default": "''", - "example": "''", + "optional": false, + "example": "'872634875'", "comment": [ - "The cursor to indicate when to start the next query from" + "The previous sequence number that determines global message order within the specific stream" ] } ], "comment": [ - "The request to get the historical transfers of an account", - "The history is returned in reverse chronological order", - "", - "Pagination works as follows:\u003cul\u003e\u003cli\u003eWe perform a reverse chronological lookup, starting from `end_time`. If `end_time` is not set, we start from the most recent data.\u003c/li\u003e\u003cli\u003eThe lookup is limited to `limit` records. If more data is requested, the response will contain a `next` cursor for you to query the next page.\u003c/li\u003e\u003cli\u003eIf a `cursor` is provided, it will be used to fetch results from that point onwards.\u003c/li\u003e\u003cli\u003ePagination will continue until the `start_time` is reached. If `start_time` is not set, pagination will continue as far back as our data retention policy allows.\u003c/li\u003e\u003c/ul\u003e" + "Subscribes to a feed of transfer updates." ] }, { - "name": "TransferHistory", + "name": "WSDepositFeedSelectorV1", "is_root": true, "fields": [ { - "name": "tx_id", - "lite_name": "ti", - "semantic_type": "uint64", - "json_type": "string", - "index": 0, - "array_depth": 0, - "optional": false, - "example": "'1028403'", - "comment": [ - "The transaction ID of the transfer" - ] - }, - { - "name": "from_account_id", - "lite_name": "fa", + "name": "main_account_id", + "lite_name": "ma", "semantic_type": "address", "json_type": "string", - "index": 1, + "index": 0, "array_depth": 0, "optional": false, - "example": "'0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0'", + "example": "'$GRVT_MAIN_ACCOUNT_ID'", "comment": [ - "The account to transfer from" - ] - }, + "The main account ID to request for" + ], + "selector": "primary" + } + ], + "comment": [ + "Subscribes to a feed of deposits. This will execute when there is any deposit to selected account.", + "To subscribe to a main account, specify the account ID (eg. `0x9fe3758b67ce7a2875ee4b452f01a5282d84ed8a`)." + ] + }, + { + "name": "Deposit", + "is_root": false, + "fields": [ { - "name": "from_sub_account_id", - "lite_name": "fs", - "semantic_type": "uint64", + "name": "tx_hash", + "lite_name": "th", + "semantic_type": "uint256", "json_type": "string", - "index": 2, + "index": 0, "array_depth": 0, "optional": false, - "example": "'$GRVT_SUB_ACCOUNT_ID'", + "example": "'0x1234567890123456789012345678901234567890123456789012345678901234'", "comment": [ - "The subaccount to transfer from (0 if transferring from main account)" + "The hash of the bridgemint event producing the deposit" ] }, { @@ -11897,7 +12676,7 @@ "lite_name": "ta", "semantic_type": "address", "json_type": "string", - "index": 3, + "index": 1, "array_depth": 0, "optional": false, "example": "'0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0'", @@ -11905,30 +12684,17 @@ "The account to deposit into" ] }, - { - "name": "to_sub_account_id", - "lite_name": "ts", - "semantic_type": "uint64", - "json_type": "string", - "index": 4, - "array_depth": 0, - "optional": false, - "example": "'$GRVT_SUB_ACCOUNT_ID'", - "comment": [ - "The subaccount to transfer to (0 if transferring to main account)" - ] - }, { "name": "currency", "lite_name": "c", "semantic_type": "Currency", "json_type": "Currency", - "index": 5, + "index": 2, "array_depth": 0, "optional": false, "example": "'USDT'", "comment": [ - "The token currency to transfer" + "The token currency to deposit" ] }, { @@ -11936,596 +12702,1802 @@ "lite_name": "nt", "semantic_type": "string", "json_type": "string", - "index": 6, + "index": 3, "array_depth": 0, "optional": false, - "example": "'1500.0'", + "example": "'10.50'", "comment": [ - "The number of tokens to transfer" + "The number of tokens to deposit" ] - }, + } + ], + "comment": [] + }, + { + "name": "WSDepositFeedDataV1", + "is_root": true, + "fields": [ { - "name": "signature", + "name": "stream", "lite_name": "s", - "semantic_type": "Signature", - "json_type": "Signature", - "index": 7, + "semantic_type": "string", + "json_type": "string", + "index": 0, "array_depth": 0, "optional": false, + "example": "'v1.deposit'", "comment": [ - "The signature of the transfer" + "The websocket channel to which the response is sent" ] }, { - "name": "event_time", - "lite_name": "et", - "semantic_type": "timestamp", + "name": "selector", + "lite_name": "s1", + "semantic_type": "string", "json_type": "string", - "index": 8, + "index": 1, "array_depth": 0, "optional": false, - "example": "'1697788800000000000'", + "example": "'BTC_USDT_Perp'", "comment": [ - "The timestamp of the transfer in unix nanoseconds" + "Primary selector" ] }, { - "name": "transfer_type", - "lite_name": "tt", - "semantic_type": "TransferType", - "json_type": "TransferType", - "index": 9, + "name": "sequence_number", + "lite_name": "sn", + "semantic_type": "uint64", + "json_type": "string", + "index": 2, "array_depth": 0, "optional": false, + "example": "'872634876'", "comment": [ - "The type of transfer" + "A running sequence number that determines global message order within the specific stream" ] }, { - "name": "transfer_metadata", - "lite_name": "tm", - "semantic_type": "string", + "name": "feed", + "lite_name": "f", + "semantic_type": "Deposit", + "json_type": "Deposit", + "index": 3, + "array_depth": 0, + "optional": false, + "comment": [ + "The Deposit object" + ] + }, + { + "name": "prev_sequence_number", + "lite_name": "ps", + "semantic_type": "uint64", "json_type": "string", - "index": 10, + "index": 4, "array_depth": 0, "optional": false, + "example": "'872634875'", "comment": [ - "The metadata of the transfer" + "The previous sequence number that determines global message order within the specific stream" ] } ], - "comment": [] + "comment": [ + "Subscribes to a feed of deposit updates." + ] }, { - "name": "ApiTransferHistoryResponse", + "name": "WSWithdrawalFeedSelectorV1", "is_root": true, "fields": [ { - "name": "result", - "lite_name": "r", - "semantic_type": "TransferHistory", - "json_type": "TransferHistory", + "name": "main_account_id", + "lite_name": "ma", + "semantic_type": "address", + "json_type": "string", "index": 0, - "array_depth": 1, + "array_depth": 0, "optional": false, + "example": "'$GRVT_MAIN_ACCOUNT_ID'", "comment": [ - "The transfer history matching the request account" + "The main account ID to request for" + ], + "selector": "primary" + } + ], + "comment": [ + "Subscribes to a feed of withdrawals. This will execute when there is any withdrawal from the selected account.", + "To subscribe to a main account, specify the account ID (eg. `0x9fe3758b67ce7a2875ee4b452f01a5282d84ed8a`)." + ] + }, + { + "name": "Withdrawal", + "is_root": false, + "fields": [ + { + "name": "from_account_id", + "lite_name": "fa", + "semantic_type": "address", + "json_type": "string", + "index": 0, + "array_depth": 0, + "optional": false, + "example": "'0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0'", + "comment": [ + "The subaccount to withdraw from" ] }, { - "name": "next", - "lite_name": "n", - "semantic_type": "string", + "name": "to_eth_address", + "lite_name": "te", + "semantic_type": "address", "json_type": "string", "index": 1, "array_depth": 0, - "optional": true, - "default": "''", - "example": "'Qw0918='", + "optional": false, + "example": "'0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0'", "comment": [ - "The cursor to indicate when to start the next query from" + "The ethereum address to withdraw to" + ] + }, + { + "name": "currency", + "lite_name": "c", + "semantic_type": "Currency", + "json_type": "Currency", + "index": 2, + "array_depth": 0, + "optional": false, + "example": "'USDT'", + "comment": [ + "The token currency to withdraw" + ] + }, + { + "name": "num_tokens", + "lite_name": "nt", + "semantic_type": "string", + "json_type": "string", + "index": 3, + "array_depth": 0, + "optional": false, + "example": "'10.50'", + "comment": [ + "The number of tokens to withdraw" + ] + }, + { + "name": "signature", + "lite_name": "s", + "semantic_type": "Signature", + "json_type": "Signature", + "index": 4, + "array_depth": 0, + "optional": false, + "comment": [ + "The signature of the withdrawal" ] } ], "comment": [] }, { - "name": "ApiWithdrawalHistoryRequest", + "name": "WSWithdrawalFeedDataV1", "is_root": true, "fields": [ { - "name": "currency", - "lite_name": "c", - "semantic_type": "Currency", - "json_type": "Currency", + "name": "stream", + "lite_name": "s", + "semantic_type": "string", + "json_type": "string", "index": 0, - "array_depth": 1, + "array_depth": 0, "optional": false, - "example": "['USDT', 'USDC']", + "example": "'v1.withdrawal'", "comment": [ - "The token currency to query for, if nil or empty, return all withdrawals. Otherwise, only entries matching the filter will be returned" + "The websocket channel to which the response is sent" ] }, { - "name": "start_time", - "lite_name": "st", - "semantic_type": "timestamp", + "name": "selector", + "lite_name": "s1", + "semantic_type": "string", "json_type": "string", "index": 1, "array_depth": 0, - "optional": true, - "default": "0", - "example": "'1697788800000000000'", + "optional": false, + "example": "'BTC_USDT_Perp'", "comment": [ - "The start time to query for in unix nanoseconds" + "Primary selector" ] }, { - "name": "end_time", - "lite_name": "et", - "semantic_type": "timestamp", + "name": "sequence_number", + "lite_name": "sn", + "semantic_type": "uint64", "json_type": "string", "index": 2, "array_depth": 0, - "optional": true, - "default": "now()", - "example": "'1697788800000000000'", + "optional": false, + "example": "'872634876'", "comment": [ - "The end time to query for in unix nanoseconds" + "A running sequence number that determines global message order within the specific stream" ] }, { - "name": "limit", - "lite_name": "l", - "semantic_type": "uint32", - "json_type": "integer", + "name": "feed", + "lite_name": "f", + "semantic_type": "Withdrawal", + "json_type": "Withdrawal", "index": 3, "array_depth": 0, - "optional": true, - "default": "500", - "example": "500", + "optional": false, "comment": [ - "The limit to query for. Defaults to 500; Max 1000" + "The Withdrawal object" ] }, { - "name": "cursor", - "lite_name": "c1", - "semantic_type": "string", + "name": "prev_sequence_number", + "lite_name": "ps", + "semantic_type": "uint64", "json_type": "string", "index": 4, "array_depth": 0, - "optional": true, - "default": "''", - "example": "''", + "optional": false, + "example": "'872634875'", "comment": [ - "The cursor to indicate when to start the next query from" + "The previous sequence number that determines global message order within the specific stream" ] } ], "comment": [ - "The request to get the historical withdrawals of an account", - "The history is returned in reverse chronological order", - "", - "Pagination works as follows:\u003cul\u003e\u003cli\u003eWe perform a reverse chronological lookup, starting from `end_time`. If `end_time` is not set, we start from the most recent data.\u003c/li\u003e\u003cli\u003eThe lookup is limited to `limit` records. If more data is requested, the response will contain a `next` cursor for you to query the next page.\u003c/li\u003e\u003cli\u003eIf a `cursor` is provided, it will be used to fetch results from that point onwards.\u003c/li\u003e\u003cli\u003ePagination will continue until the `start_time` is reached. If `start_time` is not set, pagination will continue as far back as our data retention policy allows.\u003c/li\u003e\u003c/ul\u003e" + "Subscribes to a feed of withdrawal updates." ] }, { - "name": "WithdrawalHistory", - "is_root": true, + "name": "CancelStatusFeed", + "is_root": false, "fields": [ { - "name": "tx_id", - "lite_name": "ti", + "name": "sub_account_id", + "lite_name": "sa", "semantic_type": "uint64", "json_type": "string", "index": 0, "array_depth": 0, "optional": false, - "example": "'1028403'", + "example": "'$GRVT_SUB_ACCOUNT_ID'", "comment": [ - "The transaction ID of the withdrawal" + "The subaccount ID that requested the cancellation" ] }, { - "name": "from_account_id", - "lite_name": "fa", - "semantic_type": "address", + "name": "client_order_id", + "lite_name": "co", + "semantic_type": "uint64", "json_type": "string", "index": 1, "array_depth": 0, "optional": false, - "example": "'0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0'", + "example": "'23042'", "comment": [ - "The subaccount to withdraw from" + "A unique identifier for the active order within a subaccount, specified by the client" ] }, { - "name": "to_eth_address", - "lite_name": "te", - "semantic_type": "address", + "name": "order_id", + "lite_name": "oi", + "semantic_type": "uint128", "json_type": "string", "index": 2, "array_depth": 0, "optional": false, - "example": "'0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0'", + "example": "'10000101000203040506'", "comment": [ - "The ethereum address to withdraw to" + "A unique 128-bit identifier for the order, deterministically generated within the GRVT backend" ] }, { - "name": "currency", - "lite_name": "c", - "semantic_type": "Currency", - "json_type": "Currency", + "name": "reason", + "lite_name": "r", + "semantic_type": "OrderRejectReason", + "json_type": "OrderRejectReason", "index": 3, "array_depth": 0, "optional": false, - "example": "'USDT'", "comment": [ - "The token currency to withdraw" + "The user-provided reason for cancelling the order" ] }, { - "name": "num_tokens", - "lite_name": "nt", - "semantic_type": "string", + "name": "update_time", + "lite_name": "ut", + "semantic_type": "timestamp", "json_type": "string", "index": 4, "array_depth": 0, - "optional": false, - "example": "'1500.0'", + "optional": true, + "default": "0", + "example": "'1697788800000000000'", "comment": [ - "The number of tokens to withdraw" + "[Filled by GRVT Backend] Time at which the cancellation status was updated by GRVT in unix nanoseconds" ] }, { - "name": "signature", - "lite_name": "s", - "semantic_type": "Signature", - "json_type": "Signature", + "name": "cancel_status", + "lite_name": "cs", + "semantic_type": "CancelStatus", + "json_type": "CancelStatus", "index": 5, "array_depth": 0, "optional": false, "comment": [ - "The signature of the withdrawal" - ] - }, - { - "name": "event_time", - "lite_name": "et", - "semantic_type": "timestamp", - "json_type": "string", - "index": 6, - "array_depth": 0, - "optional": false, - "example": "'1697788800000000000'", - "comment": [ - "The timestamp of the withdrawal in unix nanoseconds" + "Status of the cancellation attempt" ] } ], "comment": [] }, { - "name": "ApiWithdrawalHistoryResponse", + "name": "WSCancelFeedDataV1", "is_root": true, "fields": [ { - "name": "result", - "lite_name": "r", - "semantic_type": "WithdrawalHistory", - "json_type": "WithdrawalHistory", + "name": "stream", + "lite_name": "s", + "semantic_type": "string", + "json_type": "string", "index": 0, - "array_depth": 1, + "array_depth": 0, "optional": false, + "example": "'v1.cancel'", "comment": [ - "The withdrawals history matching the request account" + "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": "CancelStatusFeed", + "json_type": "CancelStatusFeed", + "index": 3, + "array_depth": 0, + "optional": false, + "comment": [ + "Data relating to the status of the cancellation attempt" + ] + }, + { + "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": "WSCancelFeedSelectorV1", + "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 time-to-live expiry events for order cancellations requested by a given subaccount.", + "**This stream presently only provides expiry updates for cancel-order requests set with a valid TTL value**.", + "Successful order cancellations will reflect as updates published to the (order-state stream)[https://api-docs.grvt.io/trading_streams/#order-state].", + "_A future release will expand the functionality of this stream to provide more general status updates on order cancellation requests._", + "Each Order can be uniquely identified by its `client_order_id`.", + "" + ] + }, + { + "name": "ApiWithdrawalRequest", + "is_root": true, + "fields": [ + { + "name": "from_account_id", + "lite_name": "fa", + "semantic_type": "address", + "json_type": "string", + "index": 0, + "array_depth": 0, + "optional": false, + "example": "'0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0'", + "comment": [ + "The main account to withdraw from" + ] + }, + { + "name": "to_eth_address", + "lite_name": "te", + "semantic_type": "address", + "json_type": "string", + "index": 1, + "array_depth": 0, + "optional": false, + "example": "'0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0'", + "comment": [ + "The Ethereum wallet to withdraw into" + ] + }, + { + "name": "currency", + "lite_name": "c", + "semantic_type": "Currency", + "json_type": "Currency", + "index": 2, + "array_depth": 0, + "optional": false, + "example": "'USDT'", + "comment": [ + "The token currency to withdraw" + ] + }, + { + "name": "num_tokens", + "lite_name": "nt", + "semantic_type": "string", + "json_type": "string", + "index": 3, + "array_depth": 0, + "optional": false, + "example": "'1500.0'", + "comment": [ + "The number of tokens to withdraw, quoted in tokenCurrency decimal units" + ] + }, + { + "name": "signature", + "lite_name": "s", + "semantic_type": "Signature", + "json_type": "Signature", + "index": 4, + "array_depth": 0, + "optional": false, + "comment": [ + "The signature of the withdrawal" + ] + } + ], + "comment": [ + "Leverage this API to initialize a withdrawal from GRVT's Hyperchain onto Ethereum.", + "Do take note that the bridging process does take time. The GRVT UI will help you keep track of bridging progress, and notify you once its complete.", + "", + "If not withdrawing the entirety of your balance, there is a minimum withdrawal amount. Currently that amount is ~25 USDT.", + "Withdrawal fees also apply to cover the cost of the Ethereum transaction.", + "Note that your funds will always remain in self-custory throughout the withdrawal process. At no stage does GRVT gain control over your funds." + ] + }, + { + "name": "ApiTransferRequest", + "is_root": true, + "fields": [ + { + "name": "from_account_id", + "lite_name": "fa", + "semantic_type": "address", + "json_type": "string", + "index": 0, + "array_depth": 0, + "optional": false, + "example": "'0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0'", + "comment": [ + "The main account to transfer from" + ] + }, + { + "name": "from_sub_account_id", + "lite_name": "fs", + "semantic_type": "uint64", + "json_type": "string", + "index": 1, + "array_depth": 0, + "optional": false, + "example": "'$GRVT_SUB_ACCOUNT_ID'", + "comment": [ + "The subaccount to transfer from (0 if transferring from main account)" + ] + }, + { + "name": "to_account_id", + "lite_name": "ta", + "semantic_type": "address", + "json_type": "string", + "index": 2, + "array_depth": 0, + "optional": false, + "example": "'0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0'", + "comment": [ + "The main account to deposit into" + ] + }, + { + "name": "to_sub_account_id", + "lite_name": "ts", + "semantic_type": "uint64", + "json_type": "string", + "index": 3, + "array_depth": 0, + "optional": false, + "example": "'$GRVT_SUB_ACCOUNT_ID'", + "comment": [ + "The subaccount to transfer to (0 if transferring to main account)" + ] + }, + { + "name": "currency", + "lite_name": "c", + "semantic_type": "Currency", + "json_type": "Currency", + "index": 4, + "array_depth": 0, + "optional": false, + "example": "'USDT'", + "comment": [ + "The token currency to transfer" + ] + }, + { + "name": "num_tokens", + "lite_name": "nt", + "semantic_type": "string", + "json_type": "string", + "index": 5, + "array_depth": 0, + "optional": false, + "example": "'1500.0'", + "comment": [ + "The number of tokens to transfer, quoted in tokenCurrency decimal units" + ] + }, + { + "name": "signature", + "lite_name": "s", + "semantic_type": "Signature", + "json_type": "Signature", + "index": 6, + "array_depth": 0, + "optional": false, + "comment": [ + "The signature of the transfer" + ] + }, + { + "name": "transfer_type", + "lite_name": "tt", + "semantic_type": "TransferType", + "json_type": "TransferType", + "index": 7, + "array_depth": 0, + "optional": false, + "comment": [ + "The type of transfer" + ] + }, + { + "name": "transfer_metadata", + "lite_name": "tm", + "semantic_type": "string", + "json_type": "string", + "index": 8, + "array_depth": 0, + "optional": false, + "example": "{\"provider\":\"XY\",\"direction\":\"WITHDRAWAL\",\"provider_tx_id\":\"txn123456\",\"chainid\":\"42161\",\"endpoint\":\"0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0\"}", + "comment": [ + "The metadata of the transfer" + ] + } + ], + "comment": [ + "This API allows you to transfer funds in multiple different ways\u003cul\u003e", + "\u003cli\u003eBetween SubAccounts within your Main Account\u003c/li\u003e", + "\u003cli\u003eBetween your MainAccount and your SubAccounts\u003c/li\u003e", + "\u003cli\u003eTo other MainAccounts that you have previously allowlisted\u003c/li\u003e", + "\u003c/ul\u003e\u003cb\u003eFast Withdrawal Funding Address\u003c/b\u003e", + "For fast withdrawals, funds must be sent to the designated funding account address. Please ensure you use the correct address based on the environment:", + "\u003cb\u003eProduction Environment Address:\u003c/b\u003e", + "\u003cem\u003e[To be updated, not ready yet]\u003c/em\u003e", + "This address should be specified as the \u003ccode\u003eto_account_id\u003c/code\u003e in your API requests for transferring funds using the transfer API. Ensure accurate input to avoid loss of funds or use the UI.", + "" + ] + }, + { + "name": "ApiDepositHistoryRequest", + "is_root": true, + "fields": [ + { + "name": "currency", + "lite_name": "c", + "semantic_type": "Currency", + "json_type": "Currency", + "index": 0, + "array_depth": 1, + "optional": false, + "example": "['USDT', 'USDC']", + "comment": [ + "The token currency to query for, if nil or empty, return all deposits. Otherwise, only entries matching the filter will be returned" + ] + }, + { + "name": "start_time", + "lite_name": "st", + "semantic_type": "timestamp", + "json_type": "string", + "index": 1, + "array_depth": 0, + "optional": true, + "default": "0", + "example": "'1697788800000000000'", + "comment": [ + "The start time to query for in unix nanoseconds" + ] + }, + { + "name": "end_time", + "lite_name": "et", + "semantic_type": "timestamp", + "json_type": "string", + "index": 2, + "array_depth": 0, + "optional": true, + "default": "now()", + "example": "'1697788800000000000'", + "comment": [ + "The end time to query for in unix nanoseconds" + ] + }, + { + "name": "limit", + "lite_name": "l", + "semantic_type": "uint32", + "json_type": "integer", + "index": 3, + "array_depth": 0, + "optional": true, + "default": "500", + "example": "500", + "comment": [ + "The limit to query for. Defaults to 500; Max 1000" + ] + }, + { + "name": "cursor", + "lite_name": "c1", + "semantic_type": "string", + "json_type": "string", + "index": 4, + "array_depth": 0, + "optional": true, + "default": "''", + "example": "''", + "comment": [ + "The cursor to indicate when to start the next query from" + ] + } + ], + "comment": [ + "The request to get the historical deposits of an account", + "The history is returned in reverse chronological order", + "", + "Pagination works as follows:\u003cul\u003e\u003cli\u003eWe perform a reverse chronological lookup, starting from `end_time`. If `end_time` is not set, we start from the most recent data.\u003c/li\u003e\u003cli\u003eThe lookup is limited to `limit` records. If more data is requested, the response will contain a `next` cursor for you to query the next page.\u003c/li\u003e\u003cli\u003eIf a `cursor` is provided, it will be used to fetch results from that point onwards.\u003c/li\u003e\u003cli\u003ePagination will continue until the `start_time` is reached. If `start_time` is not set, pagination will continue as far back as our data retention policy allows.\u003c/li\u003e\u003c/ul\u003e" + ] + }, + { + "name": "DepositHistory", + "is_root": false, + "fields": [ + { + "name": "l_1_hash", + "lite_name": "l1", + "semantic_type": "uint256", + "json_type": "string", + "index": 0, + "array_depth": 0, + "optional": false, + "example": "'0x10000101000203040506'", + "comment": [ + "The L1 txHash of the deposit" + ] + }, + { + "name": "l_2_hash", + "lite_name": "l2", + "semantic_type": "uint256", + "json_type": "string", + "index": 1, + "array_depth": 0, + "optional": false, + "example": "'0x10000101000203040506'", + "comment": [ + "The L2 txHash of the deposit" + ] + }, + { + "name": "to_account_id", + "lite_name": "ta", + "semantic_type": "address", + "json_type": "string", + "index": 2, + "array_depth": 0, + "optional": false, + "example": "'0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0'", + "comment": [ + "The account to deposit into" + ] + }, + { + "name": "currency", + "lite_name": "c", + "semantic_type": "Currency", + "json_type": "Currency", + "index": 3, + "array_depth": 0, + "optional": false, + "example": "'USDT'", + "comment": [ + "The token currency to deposit" + ] + }, + { + "name": "num_tokens", + "lite_name": "nt", + "semantic_type": "string", + "json_type": "string", + "index": 4, + "array_depth": 0, + "optional": false, + "example": "'1500.0'", + "comment": [ + "The number of tokens to deposit" + ] + }, + { + "name": "initiated_time", + "lite_name": "it", + "semantic_type": "timestamp", + "json_type": "string", + "index": 5, + "array_depth": 0, + "optional": false, + "example": "'1697788800000000000'", + "comment": [ + "The timestamp when the deposit was initiated on L1 in unix nanoseconds" + ] + }, + { + "name": "confirmed_time", + "lite_name": "ct", + "semantic_type": "timestamp", + "json_type": "string", + "index": 6, + "array_depth": 0, + "optional": false, + "example": "'1697788800000000000'", + "comment": [ + "The timestamp when the deposit was confirmed on L2 in unix nanoseconds" + ] + }, + { + "name": "from_address", + "lite_name": "fa", + "semantic_type": "address", + "json_type": "string", + "index": 7, + "array_depth": 0, + "optional": false, + "example": "'0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0'", + "comment": [ + "The address of the sender" + ] + } + ], + "comment": [] + }, + { + "name": "ApiDepositHistoryResponse", + "is_root": true, + "fields": [ + { + "name": "result", + "lite_name": "r", + "semantic_type": "DepositHistory", + "json_type": "DepositHistory", + "index": 0, + "array_depth": 1, + "optional": false, + "comment": [ + "The deposit history matching the request account" + ] + }, + { + "name": "next", + "lite_name": "n", + "semantic_type": "string", + "json_type": "string", + "index": 1, + "array_depth": 0, + "optional": true, + "default": "''", + "example": "'Qw0918='", + "comment": [ + "The cursor to indicate when to start the next query from" + ] + } + ], + "comment": [] + }, + { + "name": "ApiTransferHistoryRequest", + "is_root": true, + "fields": [ + { + "name": "currency", + "lite_name": "c", + "semantic_type": "Currency", + "json_type": "Currency", + "index": 0, + "array_depth": 1, + "optional": false, + "example": "['USDT', 'USDC']", + "comment": [ + "The token currency to query for, if nil or empty, return all transfers. Otherwise, only entries matching the filter will be returned" + ] + }, + { + "name": "start_time", + "lite_name": "st", + "semantic_type": "timestamp", + "json_type": "string", + "index": 1, + "array_depth": 0, + "optional": true, + "default": "0", + "example": "'1697788800000000000'", + "comment": [ + "The start time to query for in unix nanoseconds" + ] + }, + { + "name": "end_time", + "lite_name": "et", + "semantic_type": "timestamp", + "json_type": "string", + "index": 2, + "array_depth": 0, + "optional": true, + "default": "now()", + "example": "'1697788800000000000'", + "comment": [ + "The end time to query for in unix nanoseconds" + ] + }, + { + "name": "limit", + "lite_name": "l", + "semantic_type": "uint32", + "json_type": "integer", + "index": 3, + "array_depth": 0, + "optional": true, + "default": "500", + "example": "500", + "comment": [ + "The limit to query for. Defaults to 500; Max 1000" + ] + }, + { + "name": "cursor", + "lite_name": "c1", + "semantic_type": "string", + "json_type": "string", + "index": 4, + "array_depth": 0, + "optional": true, + "default": "''", + "example": "''", + "comment": [ + "The cursor to indicate when to start the next query from" + ] + }, + { + "name": "tx_id", + "lite_name": "ti", + "semantic_type": "uint64", + "json_type": "string", + "index": 5, + "array_depth": 0, + "optional": true, + "default": "0", + "example": "'1028403'", + "comment": [ + "The transaction ID to query for" + ] + } + ], + "comment": [ + "The request to get the historical transfers of an account", + "The history is returned in reverse chronological order", + "", + "Pagination works as follows:\u003cul\u003e\u003cli\u003eWe perform a reverse chronological lookup, starting from `end_time`. If `end_time` is not set, we start from the most recent data.\u003c/li\u003e\u003cli\u003eThe lookup is limited to `limit` records. If more data is requested, the response will contain a `next` cursor for you to query the next page.\u003c/li\u003e\u003cli\u003eIf a `cursor` is provided, it will be used to fetch results from that point onwards.\u003c/li\u003e\u003cli\u003ePagination will continue until the `start_time` is reached. If `start_time` is not set, pagination will continue as far back as our data retention policy allows.\u003c/li\u003e\u003c/ul\u003e" + ] + }, + { + "name": "ApiTransferHistoryResponse", + "is_root": true, + "fields": [ + { + "name": "result", + "lite_name": "r", + "semantic_type": "TransferHistory", + "json_type": "TransferHistory", + "index": 0, + "array_depth": 1, + "optional": false, + "comment": [ + "The transfer history matching the request account" + ] + }, + { + "name": "next", + "lite_name": "n", + "semantic_type": "string", + "json_type": "string", + "index": 1, + "array_depth": 0, + "optional": true, + "default": "''", + "example": "'Qw0918='", + "comment": [ + "The cursor to indicate when to start the next query from" + ] + } + ], + "comment": [] + }, + { + "name": "ApiWithdrawalHistoryRequest", + "is_root": true, + "fields": [ + { + "name": "currency", + "lite_name": "c", + "semantic_type": "Currency", + "json_type": "Currency", + "index": 0, + "array_depth": 1, + "optional": false, + "example": "['USDT', 'USDC']", + "comment": [ + "The token currency to query for, if nil or empty, return all withdrawals. Otherwise, only entries matching the filter will be returned" + ] + }, + { + "name": "start_time", + "lite_name": "st", + "semantic_type": "timestamp", + "json_type": "string", + "index": 1, + "array_depth": 0, + "optional": true, + "default": "0", + "example": "'1697788800000000000'", + "comment": [ + "The start time to query for in unix nanoseconds" + ] + }, + { + "name": "end_time", + "lite_name": "et", + "semantic_type": "timestamp", + "json_type": "string", + "index": 2, + "array_depth": 0, + "optional": true, + "default": "now()", + "example": "'1697788800000000000'", + "comment": [ + "The end time to query for in unix nanoseconds" + ] + }, + { + "name": "limit", + "lite_name": "l", + "semantic_type": "uint32", + "json_type": "integer", + "index": 3, + "array_depth": 0, + "optional": true, + "default": "500", + "example": "500", + "comment": [ + "The limit to query for. Defaults to 500; Max 1000" + ] + }, + { + "name": "cursor", + "lite_name": "c1", + "semantic_type": "string", + "json_type": "string", + "index": 4, + "array_depth": 0, + "optional": true, + "default": "''", + "example": "''", + "comment": [ + "The cursor to indicate when to start the next query from" + ] + } + ], + "comment": [ + "The request to get the historical withdrawals of an account", + "The history is returned in reverse chronological order", + "", + "Pagination works as follows:\u003cul\u003e\u003cli\u003eWe perform a reverse chronological lookup, starting from `end_time`. If `end_time` is not set, we start from the most recent data.\u003c/li\u003e\u003cli\u003eThe lookup is limited to `limit` records. If more data is requested, the response will contain a `next` cursor for you to query the next page.\u003c/li\u003e\u003cli\u003eIf a `cursor` is provided, it will be used to fetch results from that point onwards.\u003c/li\u003e\u003cli\u003ePagination will continue until the `start_time` is reached. If `start_time` is not set, pagination will continue as far back as our data retention policy allows.\u003c/li\u003e\u003c/ul\u003e" + ] + }, + { + "name": "WithdrawalHistory", + "is_root": true, + "fields": [ + { + "name": "tx_id", + "lite_name": "ti", + "semantic_type": "uint64", + "json_type": "string", + "index": 0, + "array_depth": 0, + "optional": false, + "example": "'1028403'", + "comment": [ + "The transaction ID of the withdrawal" + ] + }, + { + "name": "from_account_id", + "lite_name": "fa", + "semantic_type": "address", + "json_type": "string", + "index": 1, + "array_depth": 0, + "optional": false, + "example": "'0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0'", + "comment": [ + "The subaccount to withdraw from" + ] + }, + { + "name": "to_eth_address", + "lite_name": "te", + "semantic_type": "address", + "json_type": "string", + "index": 2, + "array_depth": 0, + "optional": false, + "example": "'0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0'", + "comment": [ + "The ethereum address to withdraw to" + ] + }, + { + "name": "currency", + "lite_name": "c", + "semantic_type": "Currency", + "json_type": "Currency", + "index": 3, + "array_depth": 0, + "optional": false, + "example": "'USDT'", + "comment": [ + "The token currency to withdraw" + ] + }, + { + "name": "num_tokens", + "lite_name": "nt", + "semantic_type": "string", + "json_type": "string", + "index": 4, + "array_depth": 0, + "optional": false, + "example": "'1500.0'", + "comment": [ + "The number of tokens to withdraw" + ] + }, + { + "name": "signature", + "lite_name": "s", + "semantic_type": "Signature", + "json_type": "Signature", + "index": 5, + "array_depth": 0, + "optional": false, + "comment": [ + "The signature of the withdrawal" + ] + }, + { + "name": "event_time", + "lite_name": "et", + "semantic_type": "timestamp", + "json_type": "string", + "index": 6, + "array_depth": 0, + "optional": false, + "example": "'1697788800000000000'", + "comment": [ + "The timestamp of the withdrawal in unix nanoseconds" + ] + } + ], + "comment": [] + }, + { + "name": "ApiWithdrawalHistoryResponse", + "is_root": true, + "fields": [ + { + "name": "result", + "lite_name": "r", + "semantic_type": "WithdrawalHistory", + "json_type": "WithdrawalHistory", + "index": 0, + "array_depth": 1, + "optional": false, + "comment": [ + "The withdrawals history matching the request account" + ] + }, + { + "name": "next", + "lite_name": "n", + "semantic_type": "string", + "json_type": "string", + "index": 1, + "array_depth": 0, + "optional": true, + "default": "''", + "example": "'Qw0918='", + "comment": [ + "The cursor to indicate when to start the next query from" + ] + } + ], + "comment": [] + } + ], + "enums": [ + { + "name": "BridgeType", + "values": [ + { + "name": "XY", + "value": 1, + "comment": [ + "XY Bridge type" + ] + } + ], + "comment": [] + }, + { + "name": "BrokerTag", + "values": [ + { + "name": "COIN_ROUTES", + "value": 1, + "comment": [ + "CoinRoutes" + ] + }, + { + "name": "ALERTATRON", + "value": 2, + "comment": [ + "Alertatron" + ] + }, + { + "name": "ORIGAMI", + "value": 3, + "comment": [ + "Origami" + ] + } + ], + "comment": [ + "BrokerTag is a tag for the broker that the order is sent from." + ] + }, + { + "name": "CancelStatus", + "values": [ + { + "name": "EXPIRED", + "value": 1, + "comment": [ + "Cancellation has expired because corresponding order had not arrived within the defined time-to-live window." + ] + } + ], + "comment": [] + }, + { + "name": "CandlestickInterval", + "values": [ + { + "name": "CI_1_M", + "value": 1, + "comment": [ + "1 minute" + ] + }, + { + "name": "CI_3_M", + "value": 2, + "comment": [ + "3 minutes" + ] + }, + { + "name": "CI_5_M", + "value": 3, + "comment": [ + "5 minutes" + ] + }, + { + "name": "CI_15_M", + "value": 4, + "comment": [ + "15 minutes" + ] + }, + { + "name": "CI_30_M", + "value": 5, + "comment": [ + "30 minutes" + ] + }, + { + "name": "CI_1_H", + "value": 6, + "comment": [ + "1 hour" + ] + }, + { + "name": "CI_2_H", + "value": 7, + "comment": [ + "2 hour" + ] + }, + { + "name": "CI_4_H", + "value": 8, + "comment": [ + "4 hour" + ] + }, + { + "name": "CI_6_H", + "value": 9, + "comment": [ + "6 hour" + ] + }, + { + "name": "CI_8_H", + "value": 10, + "comment": [ + "8 hour" + ] + }, + { + "name": "CI_12_H", + "value": 11, + "comment": [ + "12 hour" + ] + }, + { + "name": "CI_1_D", + "value": 12, + "comment": [ + "1 day" + ] + }, + { + "name": "CI_3_D", + "value": 13, + "comment": [ + "3 days" + ] + }, + { + "name": "CI_5_D", + "value": 14, + "comment": [ + "5 days" + ] + }, + { + "name": "CI_1_W", + "value": 15, + "comment": [ + "1 week" + ] + }, + { + "name": "CI_2_W", + "value": 16, + "comment": [ + "2 weeks" + ] + }, + { + "name": "CI_3_W", + "value": 17, + "comment": [ + "3 weeks" + ] + }, + { + "name": "CI_4_W", + "value": 18, + "comment": [ + "4 weeks" + ] + } + ], + "comment": [] + }, + { + "name": "CandlestickType", + "values": [ + { + "name": "TRADE", + "value": 1, + "comment": [ + "Tracks traded prices" + ] + }, + { + "name": "MARK", + "value": 2, + "comment": [ + "Tracks mark prices" + ] + }, + { + "name": "INDEX", + "value": 3, + "comment": [ + "Tracks index prices" + ] + }, + { + "name": "MID", + "value": 4, + "comment": [ + "Tracks book mid prices" + ] + } + ], + "comment": [] + }, + { + "name": "Currency", + "values": [ + { + "name": "USD", + "value": 1, + "comment": [ + "the USD fiat currency" + ] + }, + { + "name": "USDC", + "value": 2, + "comment": [ + "the USDC token" + ] + }, + { + "name": "USDT", + "value": 3, + "comment": [ + "the USDT token" + ] + }, + { + "name": "ETH", + "value": 4, + "comment": [ + "the ETH token" + ] + }, + { + "name": "BTC", + "value": 5, + "comment": [ + "the BTC token" + ] + }, + { + "name": "SOL", + "value": 6, + "comment": [ + "the SOL token" + ] + }, + { + "name": "ARB", + "value": 7, + "comment": [ + "the ARB token" + ] + }, + { + "name": "BNB", + "value": 8, + "comment": [ + "the BNB token" + ] + }, + { + "name": "ZK", + "value": 9, + "comment": [ + "the ZK token" + ] + }, + { + "name": "POL", + "value": 10, + "comment": [ + "the POL token" + ] + }, + { + "name": "OP", + "value": 11, + "comment": [ + "the OP token" + ] + }, + { + "name": "ATOM", + "value": 12, + "comment": [ + "the ATOM token" + ] + }, + { + "name": "KPEPE", + "value": 13, + "comment": [ + "the 1000PEPE token" + ] + }, + { + "name": "TON", + "value": 14, + "comment": [ + "the TON token" ] }, { - "name": "next", - "lite_name": "n", - "semantic_type": "string", - "json_type": "string", - "index": 1, - "array_depth": 0, - "optional": true, - "default": "''", - "example": "'Qw0918='", + "name": "XRP", + "value": 15, "comment": [ - "The cursor to indicate when to start the next query from" + "the XRP token" ] - } - ], - "comment": [] - } - ], - "enums": [ - { - "name": "BridgeType", - "values": [ + }, { - "name": "XY", - "value": 1, + "name": "XLM", + "value": 16, "comment": [ - "XY Bridge type" + "the XLM token" ] - } - ], - "comment": [] - }, - { - "name": "CandlestickInterval", - "values": [ + }, { - "name": "CI_1_M", - "value": 1, + "name": "WLD", + "value": 17, "comment": [ - "1 minute" + "the WLD token" ] }, { - "name": "CI_3_M", - "value": 2, + "name": "WIF", + "value": 18, "comment": [ - "3 minutes" + "the WIF token" ] }, { - "name": "CI_5_M", - "value": 3, + "name": "VIRTUAL", + "value": 19, "comment": [ - "5 minutes" + "the VIRTUAL token" ] }, { - "name": "CI_15_M", - "value": 4, + "name": "TRUMP", + "value": 20, "comment": [ - "15 minutes" + "the TRUMP token" ] }, { - "name": "CI_30_M", - "value": 5, + "name": "SUI", + "value": 21, "comment": [ - "30 minutes" + "the SUI token" ] }, { - "name": "CI_1_H", - "value": 6, + "name": "KSHIB", + "value": 22, "comment": [ - "1 hour" + "the 1000SHIB token" ] }, { - "name": "CI_2_H", - "value": 7, + "name": "POPCAT", + "value": 23, "comment": [ - "2 hour" + "the POPCAT token" ] }, { - "name": "CI_4_H", - "value": 8, + "name": "PENGU", + "value": 24, "comment": [ - "4 hour" + "the PENGU token" ] }, { - "name": "CI_6_H", - "value": 9, + "name": "LINK", + "value": 25, "comment": [ - "6 hour" + "the LINK token" ] }, { - "name": "CI_8_H", - "value": 10, + "name": "KBONK", + "value": 26, "comment": [ - "8 hour" + "the 1000BONK token" ] }, { - "name": "CI_12_H", - "value": 11, + "name": "JUP", + "value": 27, "comment": [ - "12 hour" + "the JUP token" ] }, { - "name": "CI_1_D", - "value": 12, + "name": "FARTCOIN", + "value": 28, "comment": [ - "1 day" + "the FARTCOIN token" ] }, { - "name": "CI_3_D", - "value": 13, + "name": "ENA", + "value": 29, "comment": [ - "3 days" + "the ENA token" ] }, { - "name": "CI_5_D", - "value": 14, + "name": "DOGE", + "value": 30, "comment": [ - "5 days" + "the DOGE token" ] }, { - "name": "CI_1_W", - "value": 15, + "name": "AIXBT", + "value": 31, "comment": [ - "1 week" + "the AIXBT token" ] }, { - "name": "CI_2_W", - "value": 16, + "name": "AI_16_Z", + "value": 32, "comment": [ - "2 weeks" + "the AI16Z token" ] }, { - "name": "CI_3_W", - "value": 17, + "name": "ADA", + "value": 33, "comment": [ - "3 weeks" + "the ADA token" ] }, { - "name": "CI_4_W", - "value": 18, + "name": "AAVE", + "value": 34, "comment": [ - "4 weeks" + "the AAVE token" ] - } - ], - "comment": [] - }, - { - "name": "CandlestickType", - "values": [ + }, { - "name": "TRADE", - "value": 1, + "name": "BERA", + "value": 35, "comment": [ - "Tracks traded prices" + "the BERA token" ] }, { - "name": "MARK", - "value": 2, + "name": "VINE", + "value": 36, "comment": [ - "Tracks mark prices" + "the VINE token" ] }, { - "name": "INDEX", - "value": 3, + "name": "PENDLE", + "value": 37, "comment": [ - "Tracks index prices" + "the PENDLE token" ] }, { - "name": "MID", - "value": 4, + "name": "UXLINK", + "value": 38, "comment": [ - "Tracks book mid prices" + "the UXLINK token" ] } ], - "comment": [] + "comment": [ + "The list of Currencies that are supported on the GRVT exchange" + ] }, { - "name": "Currency", + "name": "EpochBadgeType", "values": [ { - "name": "USD", + "name": "CHAMPION", "value": 1, "comment": [ - "the USD fiat currency" + "Champion" ] }, { - "name": "USDC", + "name": "LEGEND", "value": 2, "comment": [ - "the USDC token" + "Legend" ] }, { - "name": "USDT", + "name": "VETERAN", "value": 3, "comment": [ - "the USDT token" + "Veteran" ] }, { - "name": "ETH", + "name": "ELITE", "value": 4, "comment": [ - "the ETH token" + "Elite" ] }, { - "name": "BTC", + "name": "MASTER", "value": 5, "comment": [ - "the BTC token" + "Master" ] }, { - "name": "SOL", + "name": "EXPERT", "value": 6, "comment": [ - "the SOL token" + "Expert" ] }, { - "name": "ARB", + "name": "WARRIOR", "value": 7, "comment": [ - "the ARB token" + "Warrior" ] }, { - "name": "BNB", + "name": "SERGEANT", "value": 8, "comment": [ - "the BNB token" + "Sergeant" ] }, { - "name": "ZK", + "name": "RANGER", "value": 9, "comment": [ - "the ZK token" + "Ranger" ] }, { - "name": "POL", + "name": "CHALLENGER", "value": 10, "comment": [ - "the POL token" + "Challenger" ] }, { - "name": "OP", + "name": "APPRENTICE", "value": 11, "comment": [ - "the OP token" + "Apprentice" ] }, { - "name": "ATOM", + "name": "ROOKIE", "value": 12, "comment": [ - "the ATOM token" - ] - }, - { - "name": "KPEPE", - "value": 13, - "comment": [ - "the 1000PEPE token" - ] - }, - { - "name": "TON", - "value": 14, - "comment": [ - "the TON token" + "Rookie" ] } ], - "comment": [ - "The list of Currencies that are supported on the GRVT exchange" - ] + "comment": [] }, { "name": "InstrumentSettlementPeriod", @@ -12829,6 +14801,13 @@ "comment": [ "the market order has a limit price set" ] + }, + { + "name": "CLIENT_CANCEL_ON_DISCONNECT_TRIGGERED", + "value": 29, + "comment": [ + "client cancel on disconnect triggered" + ] } ], "comment": [] @@ -12874,6 +14853,54 @@ ], "comment": [] }, + { + "name": "RewardEpochStatus", + "values": [ + { + "name": "PAST", + "value": 1, + "comment": [ + "Past" + ] + }, + { + "name": "CURRENT", + "value": 2, + "comment": [ + "Current" + ] + }, + { + "name": "FUTURE", + "value": 3, + "comment": [ + "Future" + ] + } + ], + "comment": [] + }, + { + "name": "RewardProgramType", + "values": [ + { + "name": "ECOSYSTEM", + "value": 1, + "comment": [] + }, + { + "name": "TRADER", + "value": 2, + "comment": [] + }, + { + "name": "LP", + "value": 3, + "comment": [] + } + ], + "comment": [] + }, { "name": "SubAccountTradeInterval", "values": [ @@ -12968,6 +14995,72 @@ ], "comment": [] }, + { + "name": "TriggerBy", + "values": [ + { + "name": "UNSPECIFIED", + "value": 0, + "comment": [ + "no trigger condition" + ] + }, + { + "name": "INDEX", + "value": 1, + "comment": [ + "INDEX - Order is activated when the index price reaches the trigger price" + ] + }, + { + "name": "LAST", + "value": 2, + "comment": [ + "LAST - Order is activated when the last trade price reaches the trigger price" + ] + } + ], + "comment": [ + "Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order.", + "", + "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.", + "", + "" + ] + }, + { + "name": "TriggerType", + "values": [ + { + "name": "UNSPECIFIED", + "value": 0, + "comment": [ + "Not a trigger order. The order executes normally without any trigger conditions." + ] + }, + { + "name": "TAKE_PROFIT", + "value": 1, + "comment": [ + "Take Profit Order - Executes when the price reaches a specified level to secure profits." + ] + }, + { + "name": "STOP_LOSS", + "value": 2, + "comment": [ + "Stop Loss Order - Executes when the price reaches a specified level to limit losses." + ] + } + ], + "comment": [ + "Defines the type of trigger order used in trading, such as Take Profit or Stop Loss.", + "", + "Trigger orders allow execution based on pre-defined price conditions rather than immediate market conditions.", + "", + "" + ] + }, { "name": "Venue", "values": [ From 41af6c09be93eed5f531a39fa1165ced10ac6ec3 Mon Sep 17 00:00:00 2001 From: keithang-grvt Date: Sun, 23 Feb 2025 14:26:00 +0800 Subject: [PATCH 02/11] [RFC] Update API docs and specs --- .../schemas/aggregated_account_summary.md | 19 - ...api_aggregated_account_summary_response.md | 19 - .../schemas/api_cancel_all_orders_request.md | 38 - .../schemas/api_deposit_history_request.md | 19 - .../schemas/api_deposit_history_response.md | 19 - .../schemas/api_fill_history_request.md | 38 - .../api_funding_account_summary_response.md | 19 - .../api_funding_payment_history_response.md | 19 - .../api_get_all_instruments_response.md | 38 - .../api_get_filtered_instruments_request.md | 38 - .../api_get_filtered_instruments_response.md | 38 - .../schemas/api_get_instrument_response.md | 38 - .../api_get_latest_lp_snapshot_request.md | 19 - .../schemas/api_get_lp_info_request.md | 19 - .../schemas/api_get_lp_leaderboard_request.md | 19 - .../schemas/api_get_lp_point_request.md | 19 - .../api_latest_snap_sub_accounts_response.md | 38 - ...ist_aggregated_account_summary_response.md | 19 - .../schemas/api_open_orders_request.md | 38 - .../schemas/api_order_history_request.md | 38 - .../apidocs/schemas/api_positions_request.md | 38 - .../schemas/api_pre_deposit_check_request.md | 19 - .../schemas/api_pre_deposit_check_response.md | 19 - .../schemas/api_pre_order_check_response.md | 19 - .../apidocs/schemas/api_settlement_price.md | 38 - .../schemas/api_settlement_price_request.md | 38 - .../schemas/api_settlement_price_response.md | 38 - .../api_sub_account_history_response.md | 38 - .../api_sub_account_summary_response.md | 38 - .../schemas/api_transfer_history_request.md | 19 - .../schemas/api_transfer_history_response.md | 19 - .../apidocs/schemas/api_transfer_request.md | 19 - .../schemas/api_withdrawal_history_request.md | 19 - .../api_withdrawal_history_response.md | 19 - .../apidocs/schemas/api_withdrawal_request.md | 19 - artifacts/apidocs/schemas/currency.md | 19 - artifacts/apidocs/schemas/deposit.md | 19 - artifacts/apidocs/schemas/deposit_history.md | 19 - .../schemas/funding_account_summary.md | 19 - artifacts/apidocs/schemas/funding_payment.md | 19 - artifacts/apidocs/schemas/instrument.md | 38 - .../apidocs/schemas/pre_order_check_result.md | 19 - artifacts/apidocs/schemas/spot_balance.md | 19 - artifacts/apidocs/schemas/sub_account.md | 38 - artifacts/apidocs/schemas/transfer_history.md | 19 - artifacts/apidocs/schemas/withdrawal.md | 19 - .../apidocs/schemas/withdrawal_history.md | 19 - .../schemas/ws_deposit_feed_data_v1.md | 19 - .../schemas/ws_transfer_feed_data_v1.md | 19 - .../schemas/ws_withdrawal_feed_data_v1.md | 19 - artifacts/apidocs/trading_api.md | 1167 ----------------- src/codegen/apidocs/apidocs.py | 24 +- 52 files changed, 22 insertions(+), 2442 deletions(-) diff --git a/artifacts/apidocs/schemas/aggregated_account_summary.md b/artifacts/apidocs/schemas/aggregated_account_summary.md index 2e0f592..91f4a10 100644 --- a/artifacts/apidocs/schemas/aggregated_account_summary.md +++ b/artifacts/apidocs/schemas/aggregated_account_summary.md @@ -30,26 +30,7 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/api_aggregated_account_summary_response.md b/artifacts/apidocs/schemas/api_aggregated_account_summary_response.md index 7ac3d3c..dbe4d6d 100644 --- a/artifacts/apidocs/schemas/api_aggregated_account_summary_response.md +++ b/artifacts/apidocs/schemas/api_aggregated_account_summary_response.md @@ -36,26 +36,7 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/api_cancel_all_orders_request.md b/artifacts/apidocs/schemas/api_cancel_all_orders_request.md index 04e4be2..7792003 100644 --- a/artifacts/apidocs/schemas/api_cancel_all_orders_request.md +++ b/artifacts/apidocs/schemas/api_cancel_all_orders_request.md @@ -36,29 +36,10 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| ??? info "[Currency](/../../schemas/currency)" The list of Currencies that are supported on the GRVT exchange
@@ -79,26 +60,7 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/api_deposit_history_request.md b/artifacts/apidocs/schemas/api_deposit_history_request.md index 3017f4d..8dd39d9 100644 --- a/artifacts/apidocs/schemas/api_deposit_history_request.md +++ b/artifacts/apidocs/schemas/api_deposit_history_request.md @@ -28,26 +28,7 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/api_deposit_history_response.md b/artifacts/apidocs/schemas/api_deposit_history_response.md index b0b0e89..b1e6a7e 100644 --- a/artifacts/apidocs/schemas/api_deposit_history_response.md +++ b/artifacts/apidocs/schemas/api_deposit_history_response.md @@ -34,26 +34,7 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/api_fill_history_request.md b/artifacts/apidocs/schemas/api_fill_history_request.md index 3233067..bfb6b4e 100644 --- a/artifacts/apidocs/schemas/api_fill_history_request.md +++ b/artifacts/apidocs/schemas/api_fill_history_request.md @@ -40,29 +40,10 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| ??? info "[Currency](/../../schemas/currency)" The list of Currencies that are supported on the GRVT exchange
@@ -83,26 +64,7 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/api_funding_account_summary_response.md b/artifacts/apidocs/schemas/api_funding_account_summary_response.md index 7aa754a..6fff816 100644 --- a/artifacts/apidocs/schemas/api_funding_account_summary_response.md +++ b/artifacts/apidocs/schemas/api_funding_account_summary_response.md @@ -38,26 +38,7 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/api_funding_payment_history_response.md b/artifacts/apidocs/schemas/api_funding_payment_history_response.md index 899b673..00b1fa8 100644 --- a/artifacts/apidocs/schemas/api_funding_payment_history_response.md +++ b/artifacts/apidocs/schemas/api_funding_payment_history_response.md @@ -32,26 +32,7 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/api_get_all_instruments_response.md b/artifacts/apidocs/schemas/api_get_all_instruments_response.md index a74e1bf..194a032 100644 --- a/artifacts/apidocs/schemas/api_get_all_instruments_response.md +++ b/artifacts/apidocs/schemas/api_get_all_instruments_response.md @@ -38,29 +38,10 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| ??? info "[Currency](/../../schemas/currency)" The list of Currencies that are supported on the GRVT exchange
@@ -81,29 +62,10 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK 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_filtered_instruments_request.md b/artifacts/apidocs/schemas/api_get_filtered_instruments_request.md index 3ca0fa6..91afdfb 100644 --- a/artifacts/apidocs/schemas/api_get_filtered_instruments_request.md +++ b/artifacts/apidocs/schemas/api_get_filtered_instruments_request.md @@ -37,29 +37,10 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| ??? info "[Currency](/../../schemas/currency)" The list of Currencies that are supported on the GRVT exchange
@@ -80,26 +61,7 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/api_get_filtered_instruments_response.md b/artifacts/apidocs/schemas/api_get_filtered_instruments_response.md index d5b1c60..00eb893 100644 --- a/artifacts/apidocs/schemas/api_get_filtered_instruments_response.md +++ b/artifacts/apidocs/schemas/api_get_filtered_instruments_response.md @@ -38,29 +38,10 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| ??? info "[Currency](/../../schemas/currency)" The list of Currencies that are supported on the GRVT exchange
@@ -81,29 +62,10 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK 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 f3f3128..c345b82 100644 --- a/artifacts/apidocs/schemas/api_get_instrument_response.md +++ b/artifacts/apidocs/schemas/api_get_instrument_response.md @@ -38,29 +38,10 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| ??? info "[Currency](/../../schemas/currency)" The list of Currencies that are supported on the GRVT exchange
@@ -81,29 +62,10 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK 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 21c05a7..d60c753 100644 --- a/artifacts/apidocs/schemas/api_get_latest_lp_snapshot_request.md +++ b/artifacts/apidocs/schemas/api_get_latest_lp_snapshot_request.md @@ -32,26 +32,7 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/api_get_lp_info_request.md b/artifacts/apidocs/schemas/api_get_lp_info_request.md index 114cd51..3b014c4 100644 --- a/artifacts/apidocs/schemas/api_get_lp_info_request.md +++ b/artifacts/apidocs/schemas/api_get_lp_info_request.md @@ -32,26 +32,7 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/api_get_lp_leaderboard_request.md b/artifacts/apidocs/schemas/api_get_lp_leaderboard_request.md index e25dabe..a3f1c78 100644 --- a/artifacts/apidocs/schemas/api_get_lp_leaderboard_request.md +++ b/artifacts/apidocs/schemas/api_get_lp_leaderboard_request.md @@ -34,26 +34,7 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/api_get_lp_point_request.md b/artifacts/apidocs/schemas/api_get_lp_point_request.md index f061430..54116b6 100644 --- a/artifacts/apidocs/schemas/api_get_lp_point_request.md +++ b/artifacts/apidocs/schemas/api_get_lp_point_request.md @@ -33,26 +33,7 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| 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 42d7a41..735ee64 100644 --- a/artifacts/apidocs/schemas/api_latest_snap_sub_accounts_response.md +++ b/artifacts/apidocs/schemas/api_latest_snap_sub_accounts_response.md @@ -42,29 +42,10 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| ??? info "[SpotBalance](/../../schemas/spot_balance)" |Name
`Lite`|Type|Required
`Default`| Description | |-|-|-|-| @@ -91,29 +72,10 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK 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 ba05104..f05992f 100644 --- a/artifacts/apidocs/schemas/api_list_aggregated_account_summary_response.md +++ b/artifacts/apidocs/schemas/api_list_aggregated_account_summary_response.md @@ -40,26 +40,7 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/api_open_orders_request.md b/artifacts/apidocs/schemas/api_open_orders_request.md index f044e60..0e76b77 100644 --- a/artifacts/apidocs/schemas/api_open_orders_request.md +++ b/artifacts/apidocs/schemas/api_open_orders_request.md @@ -34,29 +34,10 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| ??? info "[Currency](/../../schemas/currency)" The list of Currencies that are supported on the GRVT exchange
@@ -77,26 +58,7 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/api_order_history_request.md b/artifacts/apidocs/schemas/api_order_history_request.md index 07a4aa7..8a47eb5 100644 --- a/artifacts/apidocs/schemas/api_order_history_request.md +++ b/artifacts/apidocs/schemas/api_order_history_request.md @@ -40,29 +40,10 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| ??? info "[Currency](/../../schemas/currency)" The list of Currencies that are supported on the GRVT exchange
@@ -83,26 +64,7 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/api_positions_request.md b/artifacts/apidocs/schemas/api_positions_request.md index 2e4722f..1aa7fdb 100644 --- a/artifacts/apidocs/schemas/api_positions_request.md +++ b/artifacts/apidocs/schemas/api_positions_request.md @@ -36,29 +36,10 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| ??? info "[Currency](/../../schemas/currency)" The list of Currencies that are supported on the GRVT exchange
@@ -79,26 +60,7 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/api_pre_deposit_check_request.md b/artifacts/apidocs/schemas/api_pre_deposit_check_request.md index cf6a28f..0cb5a85 100644 --- a/artifacts/apidocs/schemas/api_pre_deposit_check_request.md +++ b/artifacts/apidocs/schemas/api_pre_deposit_check_request.md @@ -25,29 +25,10 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK 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 9d0db80..1d679ce 100644 --- a/artifacts/apidocs/schemas/api_pre_deposit_check_response.md +++ b/artifacts/apidocs/schemas/api_pre_deposit_check_response.md @@ -23,26 +23,7 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/api_pre_order_check_response.md b/artifacts/apidocs/schemas/api_pre_order_check_response.md index daa5013..5a56900 100644 --- a/artifacts/apidocs/schemas/api_pre_order_check_response.md +++ b/artifacts/apidocs/schemas/api_pre_order_check_response.md @@ -36,26 +36,7 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/api_settlement_price.md b/artifacts/apidocs/schemas/api_settlement_price.md index 92c337f..60e0300 100644 --- a/artifacts/apidocs/schemas/api_settlement_price.md +++ b/artifacts/apidocs/schemas/api_settlement_price.md @@ -25,29 +25,10 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| ??? info "[Currency](/../../schemas/currency)" The list of Currencies that are supported on the GRVT exchange
@@ -68,26 +49,7 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/api_settlement_price_request.md b/artifacts/apidocs/schemas/api_settlement_price_request.md index bcac920..9be5b8e 100644 --- a/artifacts/apidocs/schemas/api_settlement_price_request.md +++ b/artifacts/apidocs/schemas/api_settlement_price_request.md @@ -29,29 +29,10 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| ??? info "[Currency](/../../schemas/currency)" The list of Currencies that are supported on the GRVT exchange
@@ -72,26 +53,7 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/api_settlement_price_response.md b/artifacts/apidocs/schemas/api_settlement_price_response.md index 6f3c50a..04990a9 100644 --- a/artifacts/apidocs/schemas/api_settlement_price_response.md +++ b/artifacts/apidocs/schemas/api_settlement_price_response.md @@ -30,29 +30,10 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| ??? info "[Currency](/../../schemas/currency)" The list of Currencies that are supported on the GRVT exchange
@@ -73,26 +54,7 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/api_sub_account_history_response.md b/artifacts/apidocs/schemas/api_sub_account_history_response.md index 9aba3fb..95bad3a 100644 --- a/artifacts/apidocs/schemas/api_sub_account_history_response.md +++ b/artifacts/apidocs/schemas/api_sub_account_history_response.md @@ -43,29 +43,10 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| ??? info "[SpotBalance](/../../schemas/spot_balance)" |Name
`Lite`|Type|Required
`Default`| Description | |-|-|-|-| @@ -92,29 +73,10 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK 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 08951ba..042a944 100644 --- a/artifacts/apidocs/schemas/api_sub_account_summary_response.md +++ b/artifacts/apidocs/schemas/api_sub_account_summary_response.md @@ -44,29 +44,10 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| ??? info "[SpotBalance](/../../schemas/spot_balance)" |Name
`Lite`|Type|Required
`Default`| Description | |-|-|-|-| @@ -93,29 +74,10 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| ??? info "[Positions](/../../schemas/positions)" |Name
`Lite`|Type|Required
`Default`| Description | |-|-|-|-| diff --git a/artifacts/apidocs/schemas/api_transfer_history_request.md b/artifacts/apidocs/schemas/api_transfer_history_request.md index 12a9fd6..c1fc682 100644 --- a/artifacts/apidocs/schemas/api_transfer_history_request.md +++ b/artifacts/apidocs/schemas/api_transfer_history_request.md @@ -29,26 +29,7 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/api_transfer_history_response.md b/artifacts/apidocs/schemas/api_transfer_history_response.md index ece9c77..0b2e6c0 100644 --- a/artifacts/apidocs/schemas/api_transfer_history_response.md +++ b/artifacts/apidocs/schemas/api_transfer_history_response.md @@ -37,29 +37,10 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK 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 79b6c20..3b125bf 100644 --- a/artifacts/apidocs/schemas/api_transfer_request.md +++ b/artifacts/apidocs/schemas/api_transfer_request.md @@ -32,29 +32,10 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK 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 7bc08c0..30005f0 100644 --- a/artifacts/apidocs/schemas/api_withdrawal_history_request.md +++ b/artifacts/apidocs/schemas/api_withdrawal_history_request.md @@ -28,26 +28,7 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/api_withdrawal_history_response.md b/artifacts/apidocs/schemas/api_withdrawal_history_response.md index d3dc740..7d38da5 100644 --- a/artifacts/apidocs/schemas/api_withdrawal_history_response.md +++ b/artifacts/apidocs/schemas/api_withdrawal_history_response.md @@ -33,29 +33,10 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK 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 da16d00..c79afd1 100644 --- a/artifacts/apidocs/schemas/api_withdrawal_request.md +++ b/artifacts/apidocs/schemas/api_withdrawal_request.md @@ -28,29 +28,10 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| ??? info "[Signature](/../../schemas/signature)" |Name
`Lite`|Type|Required
`Default`| Description | |-|-|-|-| diff --git a/artifacts/apidocs/schemas/currency.md b/artifacts/apidocs/schemas/currency.md index c28942f..7b268f9 100644 --- a/artifacts/apidocs/schemas/currency.md +++ b/artifacts/apidocs/schemas/currency.md @@ -18,26 +18,7 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/deposit.md b/artifacts/apidocs/schemas/deposit.md index a124b51..29d5e17 100644 --- a/artifacts/apidocs/schemas/deposit.md +++ b/artifacts/apidocs/schemas/deposit.md @@ -25,26 +25,7 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/deposit_history.md b/artifacts/apidocs/schemas/deposit_history.md index d35b7ae..95b2926 100644 --- a/artifacts/apidocs/schemas/deposit_history.md +++ b/artifacts/apidocs/schemas/deposit_history.md @@ -29,26 +29,7 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/funding_account_summary.md b/artifacts/apidocs/schemas/funding_account_summary.md index 763a2ad..1ba48cc 100644 --- a/artifacts/apidocs/schemas/funding_account_summary.md +++ b/artifacts/apidocs/schemas/funding_account_summary.md @@ -32,26 +32,7 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/funding_payment.md b/artifacts/apidocs/schemas/funding_payment.md index a396c9e..24f9d6c 100644 --- a/artifacts/apidocs/schemas/funding_payment.md +++ b/artifacts/apidocs/schemas/funding_payment.md @@ -27,26 +27,7 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/instrument.md b/artifacts/apidocs/schemas/instrument.md index e16ce94..70c3b41 100644 --- a/artifacts/apidocs/schemas/instrument.md +++ b/artifacts/apidocs/schemas/instrument.md @@ -34,29 +34,10 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| ??? info "[Currency](/../../schemas/currency)" The list of Currencies that are supported on the GRVT exchange
@@ -77,29 +58,10 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| ??? info "[Kind](/../../schemas/kind)" The list of asset kinds that are supported on the GRVT exchange
diff --git a/artifacts/apidocs/schemas/pre_order_check_result.md b/artifacts/apidocs/schemas/pre_order_check_result.md index f123868..a7185c4 100644 --- a/artifacts/apidocs/schemas/pre_order_check_result.md +++ b/artifacts/apidocs/schemas/pre_order_check_result.md @@ -32,26 +32,7 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/spot_balance.md b/artifacts/apidocs/schemas/spot_balance.md index 82e24ec..4eae88d 100644 --- a/artifacts/apidocs/schemas/spot_balance.md +++ b/artifacts/apidocs/schemas/spot_balance.md @@ -24,26 +24,7 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/sub_account.md b/artifacts/apidocs/schemas/sub_account.md index 94396c7..c947b90 100644 --- a/artifacts/apidocs/schemas/sub_account.md +++ b/artifacts/apidocs/schemas/sub_account.md @@ -38,29 +38,10 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| ??? info "[SpotBalance](/../../schemas/spot_balance)" |Name
`Lite`|Type|Required
`Default`| Description | |-|-|-|-| @@ -87,29 +68,10 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| ??? info "[Positions](/../../schemas/positions)" |Name
`Lite`|Type|Required
`Default`| Description | |-|-|-|-| diff --git a/artifacts/apidocs/schemas/transfer_history.md b/artifacts/apidocs/schemas/transfer_history.md index 55c7dea..55adcbd 100644 --- a/artifacts/apidocs/schemas/transfer_history.md +++ b/artifacts/apidocs/schemas/transfer_history.md @@ -32,29 +32,10 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK 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 ccfe3ee..1f8271e 100644 --- a/artifacts/apidocs/schemas/withdrawal.md +++ b/artifacts/apidocs/schemas/withdrawal.md @@ -26,29 +26,10 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK 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 759c235..9b835e8 100644 --- a/artifacts/apidocs/schemas/withdrawal_history.md +++ b/artifacts/apidocs/schemas/withdrawal_history.md @@ -28,29 +28,10 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| ??? info "[Signature](/../../schemas/signature)" |Name
`Lite`|Type|Required
`Default`| Description | |-|-|-|-| diff --git a/artifacts/apidocs/schemas/ws_deposit_feed_data_v1.md b/artifacts/apidocs/schemas/ws_deposit_feed_data_v1.md index 5a40a2b..eed835f 100644 --- a/artifacts/apidocs/schemas/ws_deposit_feed_data_v1.md +++ b/artifacts/apidocs/schemas/ws_deposit_feed_data_v1.md @@ -35,26 +35,7 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK token| diff --git a/artifacts/apidocs/schemas/ws_transfer_feed_data_v1.md b/artifacts/apidocs/schemas/ws_transfer_feed_data_v1.md index 12a5c74..c62c1f5 100644 --- a/artifacts/apidocs/schemas/ws_transfer_feed_data_v1.md +++ b/artifacts/apidocs/schemas/ws_transfer_feed_data_v1.md @@ -42,29 +42,10 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK 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 9739816..2a55bca 100644 --- a/artifacts/apidocs/schemas/ws_withdrawal_feed_data_v1.md +++ b/artifacts/apidocs/schemas/ws_withdrawal_feed_data_v1.md @@ -36,29 +36,10 @@ |`KPEPE` = 13|the 1000PEPE token| |`TON` = 14|the TON token| |`XRP` = 15|the XRP token| - |`XLM` = 16|the XLM token| - |`WLD` = 17|the WLD token| - |`WIF` = 18|the WIF token| - |`VIRTUAL` = 19|the VIRTUAL token| |`TRUMP` = 20|the TRUMP token| |`SUI` = 21|the SUI token| - |`KSHIB` = 22|the 1000SHIB token| - |`POPCAT` = 23|the POPCAT token| - |`PENGU` = 24|the PENGU token| - |`LINK` = 25|the LINK token| - |`KBONK` = 26|the 1000BONK token| - |`JUP` = 27|the JUP token| |`FARTCOIN` = 28|the FARTCOIN token| - |`ENA` = 29|the ENA token| - |`DOGE` = 30|the DOGE token| - |`AIXBT` = 31|the AIXBT token| - |`AI_16_Z` = 32|the AI16Z token| - |`ADA` = 33|the ADA token| - |`AAVE` = 34|the AAVE token| |`BERA` = 35|the BERA token| - |`VINE` = 36|the VINE token| - |`PENDLE` = 37|the PENDLE token| - |`UXLINK` = 38|the UXLINK 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 a4737ee..beaa500 100644 --- a/artifacts/apidocs/trading_api.md +++ b/artifacts/apidocs/trading_api.md @@ -4950,1173 +4950,6 @@ LITE ENDPOINT: lite/v1/cancel_all_trigger_orders ```

-## Position -### Dedust Position -``` -FULL ENDPOINT: full/v1/dedust_position -LITE ENDPOINT: lite/v1/dedust_position -``` - -=== "Request" -
- -8<- "docs/schemas/api_dedust_position_request.md" -
-
- !!! question "Query" - **Full Request** - ``` { .json .copy } - { - "order": { - "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", - "trigger": { - "trigger_type": "UNSPECIFIED", - "tpsl": { - "trigger_by": "UNSPECIFIED", - "trigger_price": "65038.10" - } - }, - "broker": "COIN_ROUTES" - }, - "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", - "t": { - "tt": "UNSPECIFIED", - "t": { - "tb": "UNSPECIFIED", - "tp": "65038.10" - } - }, - "b": "COIN_ROUTES" - }, - "s1": { - "s": "PENDING", - "rr": "CLIENT_CANCEL", - "bs": ["10.5"], - "ts": ["1.5"], - "ut": "1697788800000000000", - "af": ["60000.4"] - } - } - } - ``` -
-=== "Response" -
- -8<- "docs/schemas/api_dedust_position_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", - "trigger": { - "trigger_type": "UNSPECIFIED", - "tpsl": { - "trigger_by": "UNSPECIFIED", - "trigger_price": "65038.10" - } - }, - "broker": "COIN_ROUTES" - }, - "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", - "t": { - "tt": "UNSPECIFIED", - "t": { - "tb": "UNSPECIFIED", - "tp": "65038.10" - } - }, - "b": "COIN_ROUTES" - }, - "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| - |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| - |2063|400|Order size smaller than min block size in block trade venue| - |2064|400|Invalid limit price tick| - |2200|400|Order size should exactly tally to the dust portion (i.e., smaller than minimum size) of a position| - |2201|400|Order level should match or beat mark price| - |2202|400|Cannot dedust position via a market order| - |2203|400|Cannot dedust position via a post-only order| - |2204|400|Can only dedust position via a fill-or-kill order| - |2205|400|Can only dedust position via a reduce-only order| - |2206|400|Attempting to trade the wrong buy/sell direction for dedusting position| - |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| - |2090|429|Max open orders exceeded| -
-
- !!! 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/dedust_position' \ - --header "Cookie: $GRVT_COOKIE" \ - --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ - --data '{ - "order": { - "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", - "trigger": { - "trigger_type": "UNSPECIFIED", - "tpsl": { - "trigger_by": "UNSPECIFIED", - "trigger_price": "65038.10" - } - }, - "broker": "COIN_ROUTES" - }, - "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/dedust_position", - "params": { - "order": { - "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", - "trigger": { - "trigger_type": "UNSPECIFIED", - "tpsl": { - "trigger_by": "UNSPECIFIED", - "trigger_price": "65038.10" - } - }, - "broker": "COIN_ROUTES" - }, - "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/dedust_position' \ - --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", - "t": { - "tt": "UNSPECIFIED", - "t": { - "tb": "UNSPECIFIED", - "tp": "65038.10" - } - }, - "b": "COIN_ROUTES" - }, - "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/dedust_position", - "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", - "t": { - "tt": "UNSPECIFIED", - "t": { - "tb": "UNSPECIFIED", - "tp": "65038.10" - } - }, - "b": "COIN_ROUTES" - }, - "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/dedust_position' \ - --header "Cookie: $GRVT_COOKIE" \ - --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ - --data '{ - "order": { - "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", - "trigger": { - "trigger_type": "UNSPECIFIED", - "tpsl": { - "trigger_by": "UNSPECIFIED", - "trigger_price": "65038.10" - } - }, - "broker": "COIN_ROUTES" - }, - "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/dedust_position", - "params": { - "order": { - "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", - "trigger": { - "trigger_type": "UNSPECIFIED", - "tpsl": { - "trigger_by": "UNSPECIFIED", - "trigger_price": "65038.10" - } - }, - "broker": "COIN_ROUTES" - }, - "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/dedust_position' \ - --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", - "t": { - "tt": "UNSPECIFIED", - "t": { - "tb": "UNSPECIFIED", - "tp": "65038.10" - } - }, - "b": "COIN_ROUTES" - }, - "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/dedust_position", - "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", - "t": { - "tt": "UNSPECIFIED", - "t": { - "tb": "UNSPECIFIED", - "tp": "65038.10" - } - }, - "b": "COIN_ROUTES" - }, - "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/dedust_position' \ - --header "Cookie: $GRVT_COOKIE" \ - --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ - --data '{ - "order": { - "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", - "trigger": { - "trigger_type": "UNSPECIFIED", - "tpsl": { - "trigger_by": "UNSPECIFIED", - "trigger_price": "65038.10" - } - }, - "broker": "COIN_ROUTES" - }, - "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/dedust_position", - "params": { - "order": { - "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", - "trigger": { - "trigger_type": "UNSPECIFIED", - "tpsl": { - "trigger_by": "UNSPECIFIED", - "trigger_price": "65038.10" - } - }, - "broker": "COIN_ROUTES" - }, - "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/dedust_position' \ - --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", - "t": { - "tt": "UNSPECIFIED", - "t": { - "tb": "UNSPECIFIED", - "tp": "65038.10" - } - }, - "b": "COIN_ROUTES" - }, - "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/dedust_position", - "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", - "t": { - "tt": "UNSPECIFIED", - "t": { - "tb": "UNSPECIFIED", - "tp": "65038.10" - } - }, - "b": "COIN_ROUTES" - }, - "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/dedust_position' \ - --header "Cookie: $GRVT_COOKIE" \ - --header "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \ - --data '{ - "order": { - "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", - "trigger": { - "trigger_type": "UNSPECIFIED", - "tpsl": { - "trigger_by": "UNSPECIFIED", - "trigger_price": "65038.10" - } - }, - "broker": "COIN_ROUTES" - }, - "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/dedust_position", - "params": { - "order": { - "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", - "trigger": { - "trigger_type": "UNSPECIFIED", - "tpsl": { - "trigger_by": "UNSPECIFIED", - "trigger_price": "65038.10" - } - }, - "broker": "COIN_ROUTES" - }, - "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/dedust_position' \ - --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", - "t": { - "tt": "UNSPECIFIED", - "t": { - "tb": "UNSPECIFIED", - "tp": "65038.10" - } - }, - "b": "COIN_ROUTES" - }, - "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/dedust_position", - "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", - "t": { - "tt": "UNSPECIFIED", - "t": { - "tb": "UNSPECIFIED", - "tp": "65038.10" - } - }, - "b": "COIN_ROUTES" - }, - "s1": { - "s": "PENDING", - "rr": "CLIENT_CANCEL", - "bs": ["10.5"], - "ts": ["1.5"], - "ut": "1697788800000000000", - "af": ["60000.4"] - } - } - }, - "i": 123 - } - ' -w 360 - ``` -
-
## Execution ### Fill History ``` diff --git a/src/codegen/apidocs/apidocs.py b/src/codegen/apidocs/apidocs.py index 3c1b781..86231c6 100644 --- a/src/codegen/apidocs/apidocs.py +++ b/src/codegen/apidocs/apidocs.py @@ -21,10 +21,30 @@ ["JSONRPCRequest", "ApiCreateOrderRequest", "Order", "order_id"], ] -IGNORE_RPCS: list[str] = [] +IGNORE_RPCS: list[str] = ["RPCDedustPositionV1"] IGNORE_ENUM_VALUES: dict[str, list[str]] = { - # "Currency": ["SOL", "ARB", "BNB", "ZK", "POL", "OP", "ATOM", "KPEPE", "TON"], + "Currency": [ + "XLM", + "WLD", + "WIF", + "VIRTUAL", + "KSHIB", + "POPCAT", + "PENGU", + "LINK", + "KBONK", + "JUP", + "ENA", + "DOGE", + "AIXBT", + "AI_16_Z", + "ADA", + "AAVE", + "VINE", + "PENDLE", + "UXLINK", + ], } From 486f1ace12293a023205ed42a449a14b49aa60db Mon Sep 17 00:00:00 2001 From: keithang-grvt Date: Sun, 23 Feb 2025 14:53:19 +0800 Subject: [PATCH 03/11] [RFC] Update API docs and specs --- artifacts/apidocs/market_data_streams.md | 160 ---------- artifacts/apidocs/trading_api.md | 354 ----------------------- artifacts/apidocs/trading_streams.md | 178 ------------ src/codegen/apidocs/apidocs.py | 19 +- 4 files changed, 18 insertions(+), 693 deletions(-) diff --git a/artifacts/apidocs/market_data_streams.md b/artifacts/apidocs/market_data_streams.md index 8f44fc7..7cf87dd 100644 --- a/artifacts/apidocs/market_data_streams.md +++ b/artifacts/apidocs/market_data_streams.md @@ -29,7 +29,6 @@ STREAM: v1.mini.s "params": { "stream": "v1.mini.s", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -59,7 +58,6 @@ STREAM: v1.mini.s "params": { "stream": "v1.mini.s", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -124,7 +122,6 @@ STREAM: v1.mini.s "best_ask_price": "65038.01", "best_ask_size": "123456.78" }, - "prev_sequence_number": "872634875" } ``` **Lite Feed Response** @@ -146,7 +143,6 @@ STREAM: v1.mini.s "ba": "65038.01", "ba1": "123456.78" }, - "ps": "872634875" } ```
@@ -212,7 +208,6 @@ STREAM: v1.mini.s "params": { "stream": "v1.mini.s", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -228,7 +223,6 @@ STREAM: v1.mini.s "params": { "stream": "v1.mini.s", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -259,7 +253,6 @@ STREAM: v1.mini.s "p": { "s": "v1.mini.s", "s1": ["BTC_USDT_Perp@500"], - "ug": true }, "i": 123 } @@ -275,7 +268,6 @@ STREAM: v1.mini.s "p": { "s": "v1.mini.s", "s1": ["BTC_USDT_Perp@500"], - "ug": true }, "i": 123 } @@ -307,7 +299,6 @@ STREAM: v1.mini.s "params": { "stream": "v1.mini.s", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -323,7 +314,6 @@ STREAM: v1.mini.s "params": { "stream": "v1.mini.s", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -354,7 +344,6 @@ STREAM: v1.mini.s "p": { "s": "v1.mini.s", "s1": ["BTC_USDT_Perp@500"], - "ug": true }, "i": 123 } @@ -370,7 +359,6 @@ STREAM: v1.mini.s "p": { "s": "v1.mini.s", "s1": ["BTC_USDT_Perp@500"], - "ug": true }, "i": 123 } @@ -402,7 +390,6 @@ STREAM: v1.mini.s "params": { "stream": "v1.mini.s", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -418,7 +405,6 @@ STREAM: v1.mini.s "params": { "stream": "v1.mini.s", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -449,7 +435,6 @@ STREAM: v1.mini.s "p": { "s": "v1.mini.s", "s1": ["BTC_USDT_Perp@500"], - "ug": true }, "i": 123 } @@ -465,7 +450,6 @@ STREAM: v1.mini.s "p": { "s": "v1.mini.s", "s1": ["BTC_USDT_Perp@500"], - "ug": true }, "i": 123 } @@ -497,7 +481,6 @@ STREAM: v1.mini.s "params": { "stream": "v1.mini.s", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -513,7 +496,6 @@ STREAM: v1.mini.s "params": { "stream": "v1.mini.s", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -544,7 +526,6 @@ STREAM: v1.mini.s "p": { "s": "v1.mini.s", "s1": ["BTC_USDT_Perp@500"], - "ug": true }, "i": 123 } @@ -560,7 +541,6 @@ STREAM: v1.mini.s "p": { "s": "v1.mini.s", "s1": ["BTC_USDT_Perp@500"], - "ug": true }, "i": 123 } @@ -609,7 +589,6 @@ STREAM: v1.mini.d "params": { "stream": "v1.mini.d", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -639,7 +618,6 @@ STREAM: v1.mini.d "params": { "stream": "v1.mini.d", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -704,7 +682,6 @@ STREAM: v1.mini.d "best_ask_price": "65038.01", "best_ask_size": "123456.78" }, - "prev_sequence_number": "872634875" } ``` **Lite Feed Response** @@ -726,7 +703,6 @@ STREAM: v1.mini.d "ba": "65038.01", "ba1": "123456.78" }, - "ps": "872634875" } ```
@@ -792,7 +768,6 @@ STREAM: v1.mini.d "params": { "stream": "v1.mini.d", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -808,7 +783,6 @@ STREAM: v1.mini.d "params": { "stream": "v1.mini.d", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -839,7 +813,6 @@ STREAM: v1.mini.d "p": { "s": "v1.mini.d", "s1": ["BTC_USDT_Perp@500"], - "ug": true }, "i": 123 } @@ -855,7 +828,6 @@ STREAM: v1.mini.d "p": { "s": "v1.mini.d", "s1": ["BTC_USDT_Perp@500"], - "ug": true }, "i": 123 } @@ -887,7 +859,6 @@ STREAM: v1.mini.d "params": { "stream": "v1.mini.d", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -903,7 +874,6 @@ STREAM: v1.mini.d "params": { "stream": "v1.mini.d", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -934,7 +904,6 @@ STREAM: v1.mini.d "p": { "s": "v1.mini.d", "s1": ["BTC_USDT_Perp@500"], - "ug": true }, "i": 123 } @@ -950,7 +919,6 @@ STREAM: v1.mini.d "p": { "s": "v1.mini.d", "s1": ["BTC_USDT_Perp@500"], - "ug": true }, "i": 123 } @@ -982,7 +950,6 @@ STREAM: v1.mini.d "params": { "stream": "v1.mini.d", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -998,7 +965,6 @@ STREAM: v1.mini.d "params": { "stream": "v1.mini.d", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -1029,7 +995,6 @@ STREAM: v1.mini.d "p": { "s": "v1.mini.d", "s1": ["BTC_USDT_Perp@500"], - "ug": true }, "i": 123 } @@ -1045,7 +1010,6 @@ STREAM: v1.mini.d "p": { "s": "v1.mini.d", "s1": ["BTC_USDT_Perp@500"], - "ug": true }, "i": 123 } @@ -1077,7 +1041,6 @@ STREAM: v1.mini.d "params": { "stream": "v1.mini.d", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -1093,7 +1056,6 @@ STREAM: v1.mini.d "params": { "stream": "v1.mini.d", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -1124,7 +1086,6 @@ STREAM: v1.mini.d "p": { "s": "v1.mini.d", "s1": ["BTC_USDT_Perp@500"], - "ug": true }, "i": 123 } @@ -1140,7 +1101,6 @@ STREAM: v1.mini.d "p": { "s": "v1.mini.d", "s1": ["BTC_USDT_Perp@500"], - "ug": true }, "i": 123 } @@ -1189,7 +1149,6 @@ STREAM: v1.ticker.s "params": { "stream": "v1.ticker.s", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -1219,7 +1178,6 @@ STREAM: v1.ticker.s "params": { "stream": "v1.ticker.s", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -1297,7 +1255,6 @@ STREAM: v1.ticker.s "open_interest": "123456.78", "long_short_ratio": "0.5" }, - "prev_sequence_number": "872634875" } ``` **Lite Feed Response** @@ -1332,7 +1289,6 @@ STREAM: v1.ticker.s "oi": "123456.78", "ls1": "0.5" }, - "ps": "872634875" } ```
@@ -1398,7 +1354,6 @@ STREAM: v1.ticker.s "params": { "stream": "v1.ticker.s", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -1414,7 +1369,6 @@ STREAM: v1.ticker.s "params": { "stream": "v1.ticker.s", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -1445,7 +1399,6 @@ STREAM: v1.ticker.s "p": { "s": "v1.ticker.s", "s1": ["BTC_USDT_Perp@500"], - "ug": true }, "i": 123 } @@ -1461,7 +1414,6 @@ STREAM: v1.ticker.s "p": { "s": "v1.ticker.s", "s1": ["BTC_USDT_Perp@500"], - "ug": true }, "i": 123 } @@ -1493,7 +1445,6 @@ STREAM: v1.ticker.s "params": { "stream": "v1.ticker.s", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -1509,7 +1460,6 @@ STREAM: v1.ticker.s "params": { "stream": "v1.ticker.s", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -1540,7 +1490,6 @@ STREAM: v1.ticker.s "p": { "s": "v1.ticker.s", "s1": ["BTC_USDT_Perp@500"], - "ug": true }, "i": 123 } @@ -1556,7 +1505,6 @@ STREAM: v1.ticker.s "p": { "s": "v1.ticker.s", "s1": ["BTC_USDT_Perp@500"], - "ug": true }, "i": 123 } @@ -1588,7 +1536,6 @@ STREAM: v1.ticker.s "params": { "stream": "v1.ticker.s", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -1604,7 +1551,6 @@ STREAM: v1.ticker.s "params": { "stream": "v1.ticker.s", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -1635,7 +1581,6 @@ STREAM: v1.ticker.s "p": { "s": "v1.ticker.s", "s1": ["BTC_USDT_Perp@500"], - "ug": true }, "i": 123 } @@ -1651,7 +1596,6 @@ STREAM: v1.ticker.s "p": { "s": "v1.ticker.s", "s1": ["BTC_USDT_Perp@500"], - "ug": true }, "i": 123 } @@ -1683,7 +1627,6 @@ STREAM: v1.ticker.s "params": { "stream": "v1.ticker.s", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -1699,7 +1642,6 @@ STREAM: v1.ticker.s "params": { "stream": "v1.ticker.s", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -1730,7 +1672,6 @@ STREAM: v1.ticker.s "p": { "s": "v1.ticker.s", "s1": ["BTC_USDT_Perp@500"], - "ug": true }, "i": 123 } @@ -1746,7 +1687,6 @@ STREAM: v1.ticker.s "p": { "s": "v1.ticker.s", "s1": ["BTC_USDT_Perp@500"], - "ug": true }, "i": 123 } @@ -1795,7 +1735,6 @@ STREAM: v1.ticker.d "params": { "stream": "v1.ticker.d", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -1825,7 +1764,6 @@ STREAM: v1.ticker.d "params": { "stream": "v1.ticker.d", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -1903,7 +1841,6 @@ STREAM: v1.ticker.d "open_interest": "123456.78", "long_short_ratio": "0.5" }, - "prev_sequence_number": "872634875" } ``` **Lite Feed Response** @@ -1938,7 +1875,6 @@ STREAM: v1.ticker.d "oi": "123456.78", "ls1": "0.5" }, - "ps": "872634875" } ```
@@ -2004,7 +1940,6 @@ STREAM: v1.ticker.d "params": { "stream": "v1.ticker.d", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -2020,7 +1955,6 @@ STREAM: v1.ticker.d "params": { "stream": "v1.ticker.d", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -2051,7 +1985,6 @@ STREAM: v1.ticker.d "p": { "s": "v1.ticker.d", "s1": ["BTC_USDT_Perp@500"], - "ug": true }, "i": 123 } @@ -2067,7 +2000,6 @@ STREAM: v1.ticker.d "p": { "s": "v1.ticker.d", "s1": ["BTC_USDT_Perp@500"], - "ug": true }, "i": 123 } @@ -2099,7 +2031,6 @@ STREAM: v1.ticker.d "params": { "stream": "v1.ticker.d", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -2115,7 +2046,6 @@ STREAM: v1.ticker.d "params": { "stream": "v1.ticker.d", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -2146,7 +2076,6 @@ STREAM: v1.ticker.d "p": { "s": "v1.ticker.d", "s1": ["BTC_USDT_Perp@500"], - "ug": true }, "i": 123 } @@ -2162,7 +2091,6 @@ STREAM: v1.ticker.d "p": { "s": "v1.ticker.d", "s1": ["BTC_USDT_Perp@500"], - "ug": true }, "i": 123 } @@ -2194,7 +2122,6 @@ STREAM: v1.ticker.d "params": { "stream": "v1.ticker.d", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -2210,7 +2137,6 @@ STREAM: v1.ticker.d "params": { "stream": "v1.ticker.d", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -2241,7 +2167,6 @@ STREAM: v1.ticker.d "p": { "s": "v1.ticker.d", "s1": ["BTC_USDT_Perp@500"], - "ug": true }, "i": 123 } @@ -2257,7 +2182,6 @@ STREAM: v1.ticker.d "p": { "s": "v1.ticker.d", "s1": ["BTC_USDT_Perp@500"], - "ug": true }, "i": 123 } @@ -2289,7 +2213,6 @@ STREAM: v1.ticker.d "params": { "stream": "v1.ticker.d", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -2305,7 +2228,6 @@ STREAM: v1.ticker.d "params": { "stream": "v1.ticker.d", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -2336,7 +2258,6 @@ STREAM: v1.ticker.d "p": { "s": "v1.ticker.d", "s1": ["BTC_USDT_Perp@500"], - "ug": true }, "i": 123 } @@ -2352,7 +2273,6 @@ STREAM: v1.ticker.d "p": { "s": "v1.ticker.d", "s1": ["BTC_USDT_Perp@500"], - "ug": true }, "i": 123 } @@ -2402,7 +2322,6 @@ STREAM: v1.book.s "params": { "stream": "v1.book.s", "selectors": ["BTC_USDT_Perp@500-50"], - "use_global_sequence_number": true }, "id": 123 } @@ -2432,7 +2351,6 @@ STREAM: v1.book.s "params": { "stream": "v1.book.s", "selectors": ["BTC_USDT_Perp@500-50"], - "use_global_sequence_number": true }, "id": 123 } @@ -2498,7 +2416,6 @@ STREAM: v1.book.s "num_orders": 123 }] }, - "prev_sequence_number": "872634875" } ``` **Lite Feed Response** @@ -2521,7 +2438,6 @@ STREAM: v1.book.s "no": 123 }] }, - "ps": "872634875" } ```
@@ -2588,7 +2504,6 @@ STREAM: v1.book.s "params": { "stream": "v1.book.s", "selectors": ["BTC_USDT_Perp@500-50"], - "use_global_sequence_number": true }, "id": 123 } @@ -2604,7 +2519,6 @@ STREAM: v1.book.s "params": { "stream": "v1.book.s", "selectors": ["BTC_USDT_Perp@500-50"], - "use_global_sequence_number": true }, "id": 123 } @@ -2635,7 +2549,6 @@ STREAM: v1.book.s "p": { "s": "v1.book.s", "s1": ["BTC_USDT_Perp@500-50"], - "ug": true }, "i": 123 } @@ -2651,7 +2564,6 @@ STREAM: v1.book.s "p": { "s": "v1.book.s", "s1": ["BTC_USDT_Perp@500-50"], - "ug": true }, "i": 123 } @@ -2683,7 +2595,6 @@ STREAM: v1.book.s "params": { "stream": "v1.book.s", "selectors": ["BTC_USDT_Perp@500-50"], - "use_global_sequence_number": true }, "id": 123 } @@ -2699,7 +2610,6 @@ STREAM: v1.book.s "params": { "stream": "v1.book.s", "selectors": ["BTC_USDT_Perp@500-50"], - "use_global_sequence_number": true }, "id": 123 } @@ -2730,7 +2640,6 @@ STREAM: v1.book.s "p": { "s": "v1.book.s", "s1": ["BTC_USDT_Perp@500-50"], - "ug": true }, "i": 123 } @@ -2746,7 +2655,6 @@ STREAM: v1.book.s "p": { "s": "v1.book.s", "s1": ["BTC_USDT_Perp@500-50"], - "ug": true }, "i": 123 } @@ -2778,7 +2686,6 @@ STREAM: v1.book.s "params": { "stream": "v1.book.s", "selectors": ["BTC_USDT_Perp@500-50"], - "use_global_sequence_number": true }, "id": 123 } @@ -2794,7 +2701,6 @@ STREAM: v1.book.s "params": { "stream": "v1.book.s", "selectors": ["BTC_USDT_Perp@500-50"], - "use_global_sequence_number": true }, "id": 123 } @@ -2825,7 +2731,6 @@ STREAM: v1.book.s "p": { "s": "v1.book.s", "s1": ["BTC_USDT_Perp@500-50"], - "ug": true }, "i": 123 } @@ -2841,7 +2746,6 @@ STREAM: v1.book.s "p": { "s": "v1.book.s", "s1": ["BTC_USDT_Perp@500-50"], - "ug": true }, "i": 123 } @@ -2873,7 +2777,6 @@ STREAM: v1.book.s "params": { "stream": "v1.book.s", "selectors": ["BTC_USDT_Perp@500-50"], - "use_global_sequence_number": true }, "id": 123 } @@ -2889,7 +2792,6 @@ STREAM: v1.book.s "params": { "stream": "v1.book.s", "selectors": ["BTC_USDT_Perp@500-50"], - "use_global_sequence_number": true }, "id": 123 } @@ -2920,7 +2822,6 @@ STREAM: v1.book.s "p": { "s": "v1.book.s", "s1": ["BTC_USDT_Perp@500-50"], - "ug": true }, "i": 123 } @@ -2936,7 +2837,6 @@ STREAM: v1.book.s "p": { "s": "v1.book.s", "s1": ["BTC_USDT_Perp@500-50"], - "ug": true }, "i": 123 } @@ -2985,7 +2885,6 @@ STREAM: v1.book.d "params": { "stream": "v1.book.d", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -3015,7 +2914,6 @@ STREAM: v1.book.d "params": { "stream": "v1.book.d", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -3081,7 +2979,6 @@ STREAM: v1.book.d "num_orders": 123 }] }, - "prev_sequence_number": "872634875" } ``` **Lite Feed Response** @@ -3104,7 +3001,6 @@ STREAM: v1.book.d "no": 123 }] }, - "ps": "872634875" } ```
@@ -3170,7 +3066,6 @@ STREAM: v1.book.d "params": { "stream": "v1.book.d", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -3186,7 +3081,6 @@ STREAM: v1.book.d "params": { "stream": "v1.book.d", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -3217,7 +3111,6 @@ STREAM: v1.book.d "p": { "s": "v1.book.d", "s1": ["BTC_USDT_Perp@500"], - "ug": true }, "i": 123 } @@ -3233,7 +3126,6 @@ STREAM: v1.book.d "p": { "s": "v1.book.d", "s1": ["BTC_USDT_Perp@500"], - "ug": true }, "i": 123 } @@ -3265,7 +3157,6 @@ STREAM: v1.book.d "params": { "stream": "v1.book.d", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -3281,7 +3172,6 @@ STREAM: v1.book.d "params": { "stream": "v1.book.d", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -3312,7 +3202,6 @@ STREAM: v1.book.d "p": { "s": "v1.book.d", "s1": ["BTC_USDT_Perp@500"], - "ug": true }, "i": 123 } @@ -3328,7 +3217,6 @@ STREAM: v1.book.d "p": { "s": "v1.book.d", "s1": ["BTC_USDT_Perp@500"], - "ug": true }, "i": 123 } @@ -3360,7 +3248,6 @@ STREAM: v1.book.d "params": { "stream": "v1.book.d", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -3376,7 +3263,6 @@ STREAM: v1.book.d "params": { "stream": "v1.book.d", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -3407,7 +3293,6 @@ STREAM: v1.book.d "p": { "s": "v1.book.d", "s1": ["BTC_USDT_Perp@500"], - "ug": true }, "i": 123 } @@ -3423,7 +3308,6 @@ STREAM: v1.book.d "p": { "s": "v1.book.d", "s1": ["BTC_USDT_Perp@500"], - "ug": true }, "i": 123 } @@ -3455,7 +3339,6 @@ STREAM: v1.book.d "params": { "stream": "v1.book.d", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -3471,7 +3354,6 @@ STREAM: v1.book.d "params": { "stream": "v1.book.d", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -3502,7 +3384,6 @@ STREAM: v1.book.d "p": { "s": "v1.book.d", "s1": ["BTC_USDT_Perp@500"], - "ug": true }, "i": 123 } @@ -3518,7 +3399,6 @@ STREAM: v1.book.d "p": { "s": "v1.book.d", "s1": ["BTC_USDT_Perp@500"], - "ug": true }, "i": 123 } @@ -3568,7 +3448,6 @@ STREAM: v1.trade "params": { "stream": "v1.trade", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -3598,7 +3477,6 @@ STREAM: v1.trade "params": { "stream": "v1.trade", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -3663,7 +3541,6 @@ STREAM: v1.trade "trade_id": "209358-2", "venue": "ORDERBOOK" }, - "prev_sequence_number": "872634875" } ``` **Lite Feed Response** @@ -3685,7 +3562,6 @@ STREAM: v1.trade "ti": "209358-2", "v": "ORDERBOOK" }, - "ps": "872634875" } ```
@@ -3751,7 +3627,6 @@ STREAM: v1.trade "params": { "stream": "v1.trade", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -3767,7 +3642,6 @@ STREAM: v1.trade "params": { "stream": "v1.trade", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -3798,7 +3672,6 @@ STREAM: v1.trade "p": { "s": "v1.trade", "s1": ["BTC_USDT_Perp@500"], - "ug": true }, "i": 123 } @@ -3814,7 +3687,6 @@ STREAM: v1.trade "p": { "s": "v1.trade", "s1": ["BTC_USDT_Perp@500"], - "ug": true }, "i": 123 } @@ -3846,7 +3718,6 @@ STREAM: v1.trade "params": { "stream": "v1.trade", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -3862,7 +3733,6 @@ STREAM: v1.trade "params": { "stream": "v1.trade", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -3893,7 +3763,6 @@ STREAM: v1.trade "p": { "s": "v1.trade", "s1": ["BTC_USDT_Perp@500"], - "ug": true }, "i": 123 } @@ -3909,7 +3778,6 @@ STREAM: v1.trade "p": { "s": "v1.trade", "s1": ["BTC_USDT_Perp@500"], - "ug": true }, "i": 123 } @@ -3941,7 +3809,6 @@ STREAM: v1.trade "params": { "stream": "v1.trade", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -3957,7 +3824,6 @@ STREAM: v1.trade "params": { "stream": "v1.trade", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -3988,7 +3854,6 @@ STREAM: v1.trade "p": { "s": "v1.trade", "s1": ["BTC_USDT_Perp@500"], - "ug": true }, "i": 123 } @@ -4004,7 +3869,6 @@ STREAM: v1.trade "p": { "s": "v1.trade", "s1": ["BTC_USDT_Perp@500"], - "ug": true }, "i": 123 } @@ -4036,7 +3900,6 @@ STREAM: v1.trade "params": { "stream": "v1.trade", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -4052,7 +3915,6 @@ STREAM: v1.trade "params": { "stream": "v1.trade", "selectors": ["BTC_USDT_Perp@500"], - "use_global_sequence_number": true }, "id": 123 } @@ -4083,7 +3945,6 @@ STREAM: v1.trade "p": { "s": "v1.trade", "s1": ["BTC_USDT_Perp@500"], - "ug": true }, "i": 123 } @@ -4099,7 +3960,6 @@ STREAM: v1.trade "p": { "s": "v1.trade", "s1": ["BTC_USDT_Perp@500"], - "ug": true }, "i": 123 } @@ -4149,7 +4009,6 @@ STREAM: v1.candle "params": { "stream": "v1.candle", "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"], - "use_global_sequence_number": true }, "id": 123 } @@ -4179,7 +4038,6 @@ STREAM: v1.candle "params": { "stream": "v1.candle", "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"], - "use_global_sequence_number": true }, "id": 123 } @@ -4243,7 +4101,6 @@ STREAM: v1.candle "trades": 123456, "instrument": "BTC_USDT_Perp" }, - "prev_sequence_number": "872634875" } ``` **Lite Feed Response** @@ -4264,7 +4121,6 @@ STREAM: v1.candle "t": 123456, "i": "BTC_USDT_Perp" }, - "ps": "872634875" } ```
@@ -4330,7 +4186,6 @@ STREAM: v1.candle "params": { "stream": "v1.candle", "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"], - "use_global_sequence_number": true }, "id": 123 } @@ -4346,7 +4201,6 @@ STREAM: v1.candle "params": { "stream": "v1.candle", "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"], - "use_global_sequence_number": true }, "id": 123 } @@ -4377,7 +4231,6 @@ STREAM: v1.candle "p": { "s": "v1.candle", "s1": ["BTC_USDT_Perp@CI_1_M-TRADE"], - "ug": true }, "i": 123 } @@ -4393,7 +4246,6 @@ STREAM: v1.candle "p": { "s": "v1.candle", "s1": ["BTC_USDT_Perp@CI_1_M-TRADE"], - "ug": true }, "i": 123 } @@ -4425,7 +4277,6 @@ STREAM: v1.candle "params": { "stream": "v1.candle", "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"], - "use_global_sequence_number": true }, "id": 123 } @@ -4441,7 +4292,6 @@ STREAM: v1.candle "params": { "stream": "v1.candle", "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"], - "use_global_sequence_number": true }, "id": 123 } @@ -4472,7 +4322,6 @@ STREAM: v1.candle "p": { "s": "v1.candle", "s1": ["BTC_USDT_Perp@CI_1_M-TRADE"], - "ug": true }, "i": 123 } @@ -4488,7 +4337,6 @@ STREAM: v1.candle "p": { "s": "v1.candle", "s1": ["BTC_USDT_Perp@CI_1_M-TRADE"], - "ug": true }, "i": 123 } @@ -4520,7 +4368,6 @@ STREAM: v1.candle "params": { "stream": "v1.candle", "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"], - "use_global_sequence_number": true }, "id": 123 } @@ -4536,7 +4383,6 @@ STREAM: v1.candle "params": { "stream": "v1.candle", "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"], - "use_global_sequence_number": true }, "id": 123 } @@ -4567,7 +4413,6 @@ STREAM: v1.candle "p": { "s": "v1.candle", "s1": ["BTC_USDT_Perp@CI_1_M-TRADE"], - "ug": true }, "i": 123 } @@ -4583,7 +4428,6 @@ STREAM: v1.candle "p": { "s": "v1.candle", "s1": ["BTC_USDT_Perp@CI_1_M-TRADE"], - "ug": true }, "i": 123 } @@ -4615,7 +4459,6 @@ STREAM: v1.candle "params": { "stream": "v1.candle", "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"], - "use_global_sequence_number": true }, "id": 123 } @@ -4631,7 +4474,6 @@ STREAM: v1.candle "params": { "stream": "v1.candle", "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"], - "use_global_sequence_number": true }, "id": 123 } @@ -4662,7 +4504,6 @@ STREAM: v1.candle "p": { "s": "v1.candle", "s1": ["BTC_USDT_Perp@CI_1_M-TRADE"], - "ug": true }, "i": 123 } @@ -4678,7 +4519,6 @@ STREAM: v1.candle "p": { "s": "v1.candle", "s1": ["BTC_USDT_Perp@CI_1_M-TRADE"], - "ug": true }, "i": 123 } diff --git a/artifacts/apidocs/trading_api.md b/artifacts/apidocs/trading_api.md index beaa500..19e48a7 100644 --- a/artifacts/apidocs/trading_api.md +++ b/artifacts/apidocs/trading_api.md @@ -40,14 +40,6 @@ LITE ENDPOINT: lite/v1/create_order "metadata": { "client_order_id": "23042", "create_time": "1697788800000000000", - "trigger": { - "trigger_type": "UNSPECIFIED", - "tpsl": { - "trigger_by": "UNSPECIFIED", - "trigger_price": "65038.10" - } - }, - "broker": "COIN_ROUTES" }, } } @@ -78,14 +70,6 @@ LITE ENDPOINT: lite/v1/create_order "m": { "co": "23042", "ct": "1697788800000000000", - "t": { - "tt": "UNSPECIFIED", - "t": { - "tb": "UNSPECIFIED", - "tp": "65038.10" - } - }, - "b": "COIN_ROUTES" }, } } @@ -124,14 +108,6 @@ LITE ENDPOINT: lite/v1/create_order "metadata": { "client_order_id": "23042", "create_time": "1697788800000000000", - "trigger": { - "trigger_type": "UNSPECIFIED", - "tpsl": { - "trigger_by": "UNSPECIFIED", - "trigger_price": "65038.10" - } - }, - "broker": "COIN_ROUTES" }, "state": { "status": "PENDING", @@ -171,14 +147,6 @@ LITE ENDPOINT: lite/v1/create_order "m": { "co": "23042", "ct": "1697788800000000000", - "t": { - "tt": "UNSPECIFIED", - "t": { - "tb": "UNSPECIFIED", - "tp": "65038.10" - } - }, - "b": "COIN_ROUTES" }, "s1": { "s": "PENDING", @@ -298,14 +266,6 @@ LITE ENDPOINT: lite/v1/create_order "metadata": { "client_order_id": "23042", "create_time": "1697788800000000000", - "trigger": { - "trigger_type": "UNSPECIFIED", - "tpsl": { - "trigger_by": "UNSPECIFIED", - "trigger_price": "65038.10" - } - }, - "broker": "COIN_ROUTES" }, } } @@ -344,14 +304,6 @@ LITE ENDPOINT: lite/v1/create_order "metadata": { "client_order_id": "23042", "create_time": "1697788800000000000", - "trigger": { - "trigger_type": "UNSPECIFIED", - "tpsl": { - "trigger_by": "UNSPECIFIED", - "trigger_price": "65038.10" - } - }, - "broker": "COIN_ROUTES" }, } }, @@ -390,14 +342,6 @@ LITE ENDPOINT: lite/v1/create_order "m": { "co": "23042", "ct": "1697788800000000000", - "t": { - "tt": "UNSPECIFIED", - "t": { - "tb": "UNSPECIFIED", - "tp": "65038.10" - } - }, - "b": "COIN_ROUTES" }, } } @@ -436,14 +380,6 @@ LITE ENDPOINT: lite/v1/create_order "m": { "co": "23042", "ct": "1697788800000000000", - "t": { - "tt": "UNSPECIFIED", - "t": { - "tb": "UNSPECIFIED", - "tp": "65038.10" - } - }, - "b": "COIN_ROUTES" }, } }, @@ -483,14 +419,6 @@ LITE ENDPOINT: lite/v1/create_order "metadata": { "client_order_id": "23042", "create_time": "1697788800000000000", - "trigger": { - "trigger_type": "UNSPECIFIED", - "tpsl": { - "trigger_by": "UNSPECIFIED", - "trigger_price": "65038.10" - } - }, - "broker": "COIN_ROUTES" }, } } @@ -529,14 +457,6 @@ LITE ENDPOINT: lite/v1/create_order "metadata": { "client_order_id": "23042", "create_time": "1697788800000000000", - "trigger": { - "trigger_type": "UNSPECIFIED", - "tpsl": { - "trigger_by": "UNSPECIFIED", - "trigger_price": "65038.10" - } - }, - "broker": "COIN_ROUTES" }, } }, @@ -575,14 +495,6 @@ LITE ENDPOINT: lite/v1/create_order "m": { "co": "23042", "ct": "1697788800000000000", - "t": { - "tt": "UNSPECIFIED", - "t": { - "tb": "UNSPECIFIED", - "tp": "65038.10" - } - }, - "b": "COIN_ROUTES" }, } } @@ -621,14 +533,6 @@ LITE ENDPOINT: lite/v1/create_order "m": { "co": "23042", "ct": "1697788800000000000", - "t": { - "tt": "UNSPECIFIED", - "t": { - "tb": "UNSPECIFIED", - "tp": "65038.10" - } - }, - "b": "COIN_ROUTES" }, } }, @@ -668,14 +572,6 @@ LITE ENDPOINT: lite/v1/create_order "metadata": { "client_order_id": "23042", "create_time": "1697788800000000000", - "trigger": { - "trigger_type": "UNSPECIFIED", - "tpsl": { - "trigger_by": "UNSPECIFIED", - "trigger_price": "65038.10" - } - }, - "broker": "COIN_ROUTES" }, } } @@ -714,14 +610,6 @@ LITE ENDPOINT: lite/v1/create_order "metadata": { "client_order_id": "23042", "create_time": "1697788800000000000", - "trigger": { - "trigger_type": "UNSPECIFIED", - "tpsl": { - "trigger_by": "UNSPECIFIED", - "trigger_price": "65038.10" - } - }, - "broker": "COIN_ROUTES" }, } }, @@ -760,14 +648,6 @@ LITE ENDPOINT: lite/v1/create_order "m": { "co": "23042", "ct": "1697788800000000000", - "t": { - "tt": "UNSPECIFIED", - "t": { - "tb": "UNSPECIFIED", - "tp": "65038.10" - } - }, - "b": "COIN_ROUTES" }, } } @@ -806,14 +686,6 @@ LITE ENDPOINT: lite/v1/create_order "m": { "co": "23042", "ct": "1697788800000000000", - "t": { - "tt": "UNSPECIFIED", - "t": { - "tb": "UNSPECIFIED", - "tp": "65038.10" - } - }, - "b": "COIN_ROUTES" }, } }, @@ -853,14 +725,6 @@ LITE ENDPOINT: lite/v1/create_order "metadata": { "client_order_id": "23042", "create_time": "1697788800000000000", - "trigger": { - "trigger_type": "UNSPECIFIED", - "tpsl": { - "trigger_by": "UNSPECIFIED", - "trigger_price": "65038.10" - } - }, - "broker": "COIN_ROUTES" }, } } @@ -899,14 +763,6 @@ LITE ENDPOINT: lite/v1/create_order "metadata": { "client_order_id": "23042", "create_time": "1697788800000000000", - "trigger": { - "trigger_type": "UNSPECIFIED", - "tpsl": { - "trigger_by": "UNSPECIFIED", - "trigger_price": "65038.10" - } - }, - "broker": "COIN_ROUTES" }, } }, @@ -945,14 +801,6 @@ LITE ENDPOINT: lite/v1/create_order "m": { "co": "23042", "ct": "1697788800000000000", - "t": { - "tt": "UNSPECIFIED", - "t": { - "tb": "UNSPECIFIED", - "tp": "65038.10" - } - }, - "b": "COIN_ROUTES" }, } } @@ -991,14 +839,6 @@ LITE ENDPOINT: lite/v1/create_order "m": { "co": "23042", "ct": "1697788800000000000", - "t": { - "tt": "UNSPECIFIED", - "t": { - "tb": "UNSPECIFIED", - "tp": "65038.10" - } - }, - "b": "COIN_ROUTES" }, } }, @@ -1805,14 +1645,6 @@ LITE ENDPOINT: lite/v1/order "metadata": { "client_order_id": "23042", "create_time": "1697788800000000000", - "trigger": { - "trigger_type": "UNSPECIFIED", - "tpsl": { - "trigger_by": "UNSPECIFIED", - "trigger_price": "65038.10" - } - }, - "broker": "COIN_ROUTES" }, "state": { "status": "PENDING", @@ -1852,14 +1684,6 @@ LITE ENDPOINT: lite/v1/order "m": { "co": "23042", "ct": "1697788800000000000", - "t": { - "tt": "UNSPECIFIED", - "t": { - "tb": "UNSPECIFIED", - "tp": "65038.10" - } - }, - "b": "COIN_ROUTES" }, "s1": { "s": "PENDING", @@ -2235,14 +2059,6 @@ LITE ENDPOINT: lite/v1/open_orders "metadata": { "client_order_id": "23042", "create_time": "1697788800000000000", - "trigger": { - "trigger_type": "UNSPECIFIED", - "tpsl": { - "trigger_by": "UNSPECIFIED", - "trigger_price": "65038.10" - } - }, - "broker": "COIN_ROUTES" }, "state": { "status": "PENDING", @@ -2282,14 +2098,6 @@ LITE ENDPOINT: lite/v1/open_orders "m": { "co": "23042", "ct": "1697788800000000000", - "t": { - "tt": "UNSPECIFIED", - "t": { - "tb": "UNSPECIFIED", - "tp": "65038.10" - } - }, - "b": "COIN_ROUTES" }, "s1": { "s": "PENDING", @@ -2687,14 +2495,6 @@ LITE ENDPOINT: lite/v1/order_history "metadata": { "client_order_id": "23042", "create_time": "1697788800000000000", - "trigger": { - "trigger_type": "UNSPECIFIED", - "tpsl": { - "trigger_by": "UNSPECIFIED", - "trigger_price": "65038.10" - } - }, - "broker": "COIN_ROUTES" }, "state": { "status": "PENDING", @@ -2735,14 +2535,6 @@ LITE ENDPOINT: lite/v1/order_history "m": { "co": "23042", "ct": "1697788800000000000", - "t": { - "tt": "UNSPECIFIED", - "t": { - "tb": "UNSPECIFIED", - "tp": "65038.10" - } - }, - "b": "COIN_ROUTES" }, "s1": { "s": "PENDING", @@ -3173,14 +2965,6 @@ LITE ENDPOINT: lite/v1/pre_order_check "metadata": { "client_order_id": "23042", "create_time": "1697788800000000000", - "trigger": { - "trigger_type": "UNSPECIFIED", - "tpsl": { - "trigger_by": "UNSPECIFIED", - "trigger_price": "65038.10" - } - }, - "broker": "COIN_ROUTES" }, "state": { "status": "PENDING", @@ -3221,14 +3005,6 @@ LITE ENDPOINT: lite/v1/pre_order_check "m": { "co": "23042", "ct": "1697788800000000000", - "t": { - "tt": "UNSPECIFIED", - "t": { - "tb": "UNSPECIFIED", - "tp": "65038.10" - } - }, - "b": "COIN_ROUTES" }, "s1": { "s": "PENDING", @@ -3349,14 +3125,6 @@ LITE ENDPOINT: lite/v1/pre_order_check "metadata": { "client_order_id": "23042", "create_time": "1697788800000000000", - "trigger": { - "trigger_type": "UNSPECIFIED", - "tpsl": { - "trigger_by": "UNSPECIFIED", - "trigger_price": "65038.10" - } - }, - "broker": "COIN_ROUTES" }, "state": { "status": "PENDING", @@ -3405,14 +3173,6 @@ LITE ENDPOINT: lite/v1/pre_order_check "metadata": { "client_order_id": "23042", "create_time": "1697788800000000000", - "trigger": { - "trigger_type": "UNSPECIFIED", - "tpsl": { - "trigger_by": "UNSPECIFIED", - "trigger_price": "65038.10" - } - }, - "broker": "COIN_ROUTES" }, "state": { "status": "PENDING", @@ -3461,14 +3221,6 @@ LITE ENDPOINT: lite/v1/pre_order_check "m": { "co": "23042", "ct": "1697788800000000000", - "t": { - "tt": "UNSPECIFIED", - "t": { - "tb": "UNSPECIFIED", - "tp": "65038.10" - } - }, - "b": "COIN_ROUTES" }, "s1": { "s": "PENDING", @@ -3517,14 +3269,6 @@ LITE ENDPOINT: lite/v1/pre_order_check "m": { "co": "23042", "ct": "1697788800000000000", - "t": { - "tt": "UNSPECIFIED", - "t": { - "tb": "UNSPECIFIED", - "tp": "65038.10" - } - }, - "b": "COIN_ROUTES" }, "s1": { "s": "PENDING", @@ -3574,14 +3318,6 @@ LITE ENDPOINT: lite/v1/pre_order_check "metadata": { "client_order_id": "23042", "create_time": "1697788800000000000", - "trigger": { - "trigger_type": "UNSPECIFIED", - "tpsl": { - "trigger_by": "UNSPECIFIED", - "trigger_price": "65038.10" - } - }, - "broker": "COIN_ROUTES" }, "state": { "status": "PENDING", @@ -3630,14 +3366,6 @@ LITE ENDPOINT: lite/v1/pre_order_check "metadata": { "client_order_id": "23042", "create_time": "1697788800000000000", - "trigger": { - "trigger_type": "UNSPECIFIED", - "tpsl": { - "trigger_by": "UNSPECIFIED", - "trigger_price": "65038.10" - } - }, - "broker": "COIN_ROUTES" }, "state": { "status": "PENDING", @@ -3686,14 +3414,6 @@ LITE ENDPOINT: lite/v1/pre_order_check "m": { "co": "23042", "ct": "1697788800000000000", - "t": { - "tt": "UNSPECIFIED", - "t": { - "tb": "UNSPECIFIED", - "tp": "65038.10" - } - }, - "b": "COIN_ROUTES" }, "s1": { "s": "PENDING", @@ -3742,14 +3462,6 @@ LITE ENDPOINT: lite/v1/pre_order_check "m": { "co": "23042", "ct": "1697788800000000000", - "t": { - "tt": "UNSPECIFIED", - "t": { - "tb": "UNSPECIFIED", - "tp": "65038.10" - } - }, - "b": "COIN_ROUTES" }, "s1": { "s": "PENDING", @@ -3799,14 +3511,6 @@ LITE ENDPOINT: lite/v1/pre_order_check "metadata": { "client_order_id": "23042", "create_time": "1697788800000000000", - "trigger": { - "trigger_type": "UNSPECIFIED", - "tpsl": { - "trigger_by": "UNSPECIFIED", - "trigger_price": "65038.10" - } - }, - "broker": "COIN_ROUTES" }, "state": { "status": "PENDING", @@ -3855,14 +3559,6 @@ LITE ENDPOINT: lite/v1/pre_order_check "metadata": { "client_order_id": "23042", "create_time": "1697788800000000000", - "trigger": { - "trigger_type": "UNSPECIFIED", - "tpsl": { - "trigger_by": "UNSPECIFIED", - "trigger_price": "65038.10" - } - }, - "broker": "COIN_ROUTES" }, "state": { "status": "PENDING", @@ -3911,14 +3607,6 @@ LITE ENDPOINT: lite/v1/pre_order_check "m": { "co": "23042", "ct": "1697788800000000000", - "t": { - "tt": "UNSPECIFIED", - "t": { - "tb": "UNSPECIFIED", - "tp": "65038.10" - } - }, - "b": "COIN_ROUTES" }, "s1": { "s": "PENDING", @@ -3967,14 +3655,6 @@ LITE ENDPOINT: lite/v1/pre_order_check "m": { "co": "23042", "ct": "1697788800000000000", - "t": { - "tt": "UNSPECIFIED", - "t": { - "tb": "UNSPECIFIED", - "tp": "65038.10" - } - }, - "b": "COIN_ROUTES" }, "s1": { "s": "PENDING", @@ -4024,14 +3704,6 @@ LITE ENDPOINT: lite/v1/pre_order_check "metadata": { "client_order_id": "23042", "create_time": "1697788800000000000", - "trigger": { - "trigger_type": "UNSPECIFIED", - "tpsl": { - "trigger_by": "UNSPECIFIED", - "trigger_price": "65038.10" - } - }, - "broker": "COIN_ROUTES" }, "state": { "status": "PENDING", @@ -4080,14 +3752,6 @@ LITE ENDPOINT: lite/v1/pre_order_check "metadata": { "client_order_id": "23042", "create_time": "1697788800000000000", - "trigger": { - "trigger_type": "UNSPECIFIED", - "tpsl": { - "trigger_by": "UNSPECIFIED", - "trigger_price": "65038.10" - } - }, - "broker": "COIN_ROUTES" }, "state": { "status": "PENDING", @@ -4136,14 +3800,6 @@ LITE ENDPOINT: lite/v1/pre_order_check "m": { "co": "23042", "ct": "1697788800000000000", - "t": { - "tt": "UNSPECIFIED", - "t": { - "tb": "UNSPECIFIED", - "tp": "65038.10" - } - }, - "b": "COIN_ROUTES" }, "s1": { "s": "PENDING", @@ -4192,14 +3848,6 @@ LITE ENDPOINT: lite/v1/pre_order_check "m": { "co": "23042", "ct": "1697788800000000000", - "t": { - "tt": "UNSPECIFIED", - "t": { - "tb": "UNSPECIFIED", - "tp": "65038.10" - } - }, - "b": "COIN_ROUTES" }, "s1": { "s": "PENDING", @@ -5019,7 +4667,6 @@ LITE ENDPOINT: lite/v1/fill_history "venue": "ORDERBOOK", "client_order_id": "23042", "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "broker": "COIN_ROUTES" }], "next": "Qw0918=" } @@ -5047,7 +4694,6 @@ LITE ENDPOINT: lite/v1/fill_history "v": "ORDERBOOK", "co": "23042", "s1": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "b": "COIN_ROUTES" }], "n": "Qw0918=" } diff --git a/artifacts/apidocs/trading_streams.md b/artifacts/apidocs/trading_streams.md index e69dd88..eb97b2e 100644 --- a/artifacts/apidocs/trading_streams.md +++ b/artifacts/apidocs/trading_streams.md @@ -29,7 +29,6 @@ STREAM: v1.order "params": { "stream": "v1.order", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "use_global_sequence_number": true }, "id": 123 } @@ -59,7 +58,6 @@ STREAM: v1.order "params": { "stream": "v1.order", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "use_global_sequence_number": true }, "id": 123 } @@ -135,14 +133,6 @@ STREAM: v1.order "metadata": { "client_order_id": "23042", "create_time": "1697788800000000000", - "trigger": { - "trigger_type": "UNSPECIFIED", - "tpsl": { - "trigger_by": "UNSPECIFIED", - "trigger_price": "65038.10" - } - }, - "broker": "COIN_ROUTES" }, "state": { "status": "PENDING", @@ -153,7 +143,6 @@ STREAM: v1.order "avg_fill_price": ["60000.4"] } }, - "prev_sequence_number": "872634875" } ``` **Lite Feed Response** @@ -186,14 +175,6 @@ STREAM: v1.order "m": { "co": "23042", "ct": "1697788800000000000", - "t": { - "tt": "UNSPECIFIED", - "t": { - "tb": "UNSPECIFIED", - "tp": "65038.10" - } - }, - "b": "COIN_ROUTES" }, "s1": { "s": "PENDING", @@ -204,7 +185,6 @@ STREAM: v1.order "af": ["60000.4"] } }, - "ps": "872634875" } ```
@@ -275,7 +255,6 @@ STREAM: v1.order "params": { "stream": "v1.order", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "use_global_sequence_number": true }, "id": 123 } @@ -293,7 +272,6 @@ STREAM: v1.order "params": { "stream": "v1.order", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "use_global_sequence_number": true }, "id": 123 } @@ -328,7 +306,6 @@ STREAM: v1.order "p": { "s": "v1.order", "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "ug": true }, "i": 123 } @@ -346,7 +323,6 @@ STREAM: v1.order "p": { "s": "v1.order", "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "ug": true }, "i": 123 } @@ -382,7 +358,6 @@ STREAM: v1.order "params": { "stream": "v1.order", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "use_global_sequence_number": true }, "id": 123 } @@ -400,7 +375,6 @@ STREAM: v1.order "params": { "stream": "v1.order", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "use_global_sequence_number": true }, "id": 123 } @@ -435,7 +409,6 @@ STREAM: v1.order "p": { "s": "v1.order", "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "ug": true }, "i": 123 } @@ -453,7 +426,6 @@ STREAM: v1.order "p": { "s": "v1.order", "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "ug": true }, "i": 123 } @@ -489,7 +461,6 @@ STREAM: v1.order "params": { "stream": "v1.order", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "use_global_sequence_number": true }, "id": 123 } @@ -507,7 +478,6 @@ STREAM: v1.order "params": { "stream": "v1.order", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "use_global_sequence_number": true }, "id": 123 } @@ -542,7 +512,6 @@ STREAM: v1.order "p": { "s": "v1.order", "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "ug": true }, "i": 123 } @@ -560,7 +529,6 @@ STREAM: v1.order "p": { "s": "v1.order", "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "ug": true }, "i": 123 } @@ -596,7 +564,6 @@ STREAM: v1.order "params": { "stream": "v1.order", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "use_global_sequence_number": true }, "id": 123 } @@ -614,7 +581,6 @@ STREAM: v1.order "params": { "stream": "v1.order", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "use_global_sequence_number": true }, "id": 123 } @@ -649,7 +615,6 @@ STREAM: v1.order "p": { "s": "v1.order", "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "ug": true }, "i": 123 } @@ -667,7 +632,6 @@ STREAM: v1.order "p": { "s": "v1.order", "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "ug": true }, "i": 123 } @@ -718,7 +682,6 @@ STREAM: v1.state "params": { "stream": "v1.state", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "use_global_sequence_number": true }, "id": 123 } @@ -748,7 +711,6 @@ STREAM: v1.state "params": { "stream": "v1.state", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "use_global_sequence_number": true }, "id": 123 } @@ -812,7 +774,6 @@ STREAM: v1.state "avg_fill_price": ["60000.4"] } }, - "prev_sequence_number": "872634875" } ``` **Lite Feed Response** @@ -833,7 +794,6 @@ STREAM: v1.state "af": ["60000.4"] } }, - "ps": "872634875" } ```
@@ -904,7 +864,6 @@ STREAM: v1.state "params": { "stream": "v1.state", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "use_global_sequence_number": true }, "id": 123 } @@ -922,7 +881,6 @@ STREAM: v1.state "params": { "stream": "v1.state", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "use_global_sequence_number": true }, "id": 123 } @@ -957,7 +915,6 @@ STREAM: v1.state "p": { "s": "v1.state", "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "ug": true }, "i": 123 } @@ -975,7 +932,6 @@ STREAM: v1.state "p": { "s": "v1.state", "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "ug": true }, "i": 123 } @@ -1011,7 +967,6 @@ STREAM: v1.state "params": { "stream": "v1.state", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "use_global_sequence_number": true }, "id": 123 } @@ -1029,7 +984,6 @@ STREAM: v1.state "params": { "stream": "v1.state", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "use_global_sequence_number": true }, "id": 123 } @@ -1064,7 +1018,6 @@ STREAM: v1.state "p": { "s": "v1.state", "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "ug": true }, "i": 123 } @@ -1082,7 +1035,6 @@ STREAM: v1.state "p": { "s": "v1.state", "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "ug": true }, "i": 123 } @@ -1118,7 +1070,6 @@ STREAM: v1.state "params": { "stream": "v1.state", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "use_global_sequence_number": true }, "id": 123 } @@ -1136,7 +1087,6 @@ STREAM: v1.state "params": { "stream": "v1.state", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "use_global_sequence_number": true }, "id": 123 } @@ -1171,7 +1121,6 @@ STREAM: v1.state "p": { "s": "v1.state", "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "ug": true }, "i": 123 } @@ -1189,7 +1138,6 @@ STREAM: v1.state "p": { "s": "v1.state", "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "ug": true }, "i": 123 } @@ -1225,7 +1173,6 @@ STREAM: v1.state "params": { "stream": "v1.state", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "use_global_sequence_number": true }, "id": 123 } @@ -1243,7 +1190,6 @@ STREAM: v1.state "params": { "stream": "v1.state", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "use_global_sequence_number": true }, "id": 123 } @@ -1278,7 +1224,6 @@ STREAM: v1.state "p": { "s": "v1.state", "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "ug": true }, "i": 123 } @@ -1296,7 +1241,6 @@ STREAM: v1.state "p": { "s": "v1.state", "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "ug": true }, "i": 123 } @@ -1347,7 +1291,6 @@ STREAM: v1.cancel "params": { "stream": "v1.cancel", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"], - "use_global_sequence_number": true }, "id": 123 } @@ -1377,7 +1320,6 @@ STREAM: v1.cancel "params": { "stream": "v1.cancel", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"], - "use_global_sequence_number": true }, "id": 123 } @@ -1437,7 +1379,6 @@ STREAM: v1.cancel "update_time": "1697788800000000000", "cancel_status": "EXPIRED" }, - "prev_sequence_number": "872634875" } ``` **Lite Feed Response** @@ -1454,7 +1395,6 @@ STREAM: v1.cancel "ut": "1697788800000000000", "cs": "EXPIRED" }, - "ps": "872634875" } ```
@@ -1525,7 +1465,6 @@ STREAM: v1.cancel "params": { "stream": "v1.cancel", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"], - "use_global_sequence_number": true }, "id": 123 } @@ -1543,7 +1482,6 @@ STREAM: v1.cancel "params": { "stream": "v1.cancel", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"], - "use_global_sequence_number": true }, "id": 123 } @@ -1578,7 +1516,6 @@ STREAM: v1.cancel "p": { "s": "v1.cancel", "s1": ["'$GRVT_SUB_ACCOUNT_ID'"], - "ug": true }, "i": 123 } @@ -1596,7 +1533,6 @@ STREAM: v1.cancel "p": { "s": "v1.cancel", "s1": ["'$GRVT_SUB_ACCOUNT_ID'"], - "ug": true }, "i": 123 } @@ -1632,7 +1568,6 @@ STREAM: v1.cancel "params": { "stream": "v1.cancel", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"], - "use_global_sequence_number": true }, "id": 123 } @@ -1650,7 +1585,6 @@ STREAM: v1.cancel "params": { "stream": "v1.cancel", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"], - "use_global_sequence_number": true }, "id": 123 } @@ -1685,7 +1619,6 @@ STREAM: v1.cancel "p": { "s": "v1.cancel", "s1": ["'$GRVT_SUB_ACCOUNT_ID'"], - "ug": true }, "i": 123 } @@ -1703,7 +1636,6 @@ STREAM: v1.cancel "p": { "s": "v1.cancel", "s1": ["'$GRVT_SUB_ACCOUNT_ID'"], - "ug": true }, "i": 123 } @@ -1739,7 +1671,6 @@ STREAM: v1.cancel "params": { "stream": "v1.cancel", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"], - "use_global_sequence_number": true }, "id": 123 } @@ -1757,7 +1688,6 @@ STREAM: v1.cancel "params": { "stream": "v1.cancel", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"], - "use_global_sequence_number": true }, "id": 123 } @@ -1792,7 +1722,6 @@ STREAM: v1.cancel "p": { "s": "v1.cancel", "s1": ["'$GRVT_SUB_ACCOUNT_ID'"], - "ug": true }, "i": 123 } @@ -1810,7 +1739,6 @@ STREAM: v1.cancel "p": { "s": "v1.cancel", "s1": ["'$GRVT_SUB_ACCOUNT_ID'"], - "ug": true }, "i": 123 } @@ -1846,7 +1774,6 @@ STREAM: v1.cancel "params": { "stream": "v1.cancel", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"], - "use_global_sequence_number": true }, "id": 123 } @@ -1864,7 +1791,6 @@ STREAM: v1.cancel "params": { "stream": "v1.cancel", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"], - "use_global_sequence_number": true }, "id": 123 } @@ -1899,7 +1825,6 @@ STREAM: v1.cancel "p": { "s": "v1.cancel", "s1": ["'$GRVT_SUB_ACCOUNT_ID'"], - "ug": true }, "i": 123 } @@ -1917,7 +1842,6 @@ STREAM: v1.cancel "p": { "s": "v1.cancel", "s1": ["'$GRVT_SUB_ACCOUNT_ID'"], - "ug": true }, "i": 123 } @@ -1969,7 +1893,6 @@ STREAM: v1.fill "params": { "stream": "v1.fill", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "use_global_sequence_number": true }, "id": 123 } @@ -1999,7 +1922,6 @@ STREAM: v1.fill "params": { "stream": "v1.fill", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "use_global_sequence_number": true }, "id": 123 } @@ -2071,9 +1993,7 @@ STREAM: v1.fill "venue": "ORDERBOOK", "client_order_id": "23042", "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "broker": "COIN_ROUTES" }, - "prev_sequence_number": "872634875" } ``` **Lite Feed Response** @@ -2102,9 +2022,7 @@ STREAM: v1.fill "v": "ORDERBOOK", "co": "23042", "s1": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - "b": "COIN_ROUTES" }, - "ps": "872634875" } ```
@@ -2175,7 +2093,6 @@ STREAM: v1.fill "params": { "stream": "v1.fill", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "use_global_sequence_number": true }, "id": 123 } @@ -2193,7 +2110,6 @@ STREAM: v1.fill "params": { "stream": "v1.fill", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "use_global_sequence_number": true }, "id": 123 } @@ -2228,7 +2144,6 @@ STREAM: v1.fill "p": { "s": "v1.fill", "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "ug": true }, "i": 123 } @@ -2246,7 +2161,6 @@ STREAM: v1.fill "p": { "s": "v1.fill", "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "ug": true }, "i": 123 } @@ -2282,7 +2196,6 @@ STREAM: v1.fill "params": { "stream": "v1.fill", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "use_global_sequence_number": true }, "id": 123 } @@ -2300,7 +2213,6 @@ STREAM: v1.fill "params": { "stream": "v1.fill", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "use_global_sequence_number": true }, "id": 123 } @@ -2335,7 +2247,6 @@ STREAM: v1.fill "p": { "s": "v1.fill", "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "ug": true }, "i": 123 } @@ -2353,7 +2264,6 @@ STREAM: v1.fill "p": { "s": "v1.fill", "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "ug": true }, "i": 123 } @@ -2389,7 +2299,6 @@ STREAM: v1.fill "params": { "stream": "v1.fill", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "use_global_sequence_number": true }, "id": 123 } @@ -2407,7 +2316,6 @@ STREAM: v1.fill "params": { "stream": "v1.fill", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "use_global_sequence_number": true }, "id": 123 } @@ -2442,7 +2350,6 @@ STREAM: v1.fill "p": { "s": "v1.fill", "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "ug": true }, "i": 123 } @@ -2460,7 +2367,6 @@ STREAM: v1.fill "p": { "s": "v1.fill", "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "ug": true }, "i": 123 } @@ -2496,7 +2402,6 @@ STREAM: v1.fill "params": { "stream": "v1.fill", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "use_global_sequence_number": true }, "id": 123 } @@ -2514,7 +2419,6 @@ STREAM: v1.fill "params": { "stream": "v1.fill", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "use_global_sequence_number": true }, "id": 123 } @@ -2549,7 +2453,6 @@ STREAM: v1.fill "p": { "s": "v1.fill", "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "ug": true }, "i": 123 } @@ -2567,7 +2470,6 @@ STREAM: v1.fill "p": { "s": "v1.fill", "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "ug": true }, "i": 123 } @@ -2618,7 +2520,6 @@ STREAM: v1.position "params": { "stream": "v1.position", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "use_global_sequence_number": true }, "id": 123 } @@ -2648,7 +2549,6 @@ STREAM: v1.position "params": { "stream": "v1.position", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "use_global_sequence_number": true }, "id": 123 } @@ -2716,7 +2616,6 @@ STREAM: v1.position "quote_index_price": "1.0000102", "est_liquidation_price": 60000.25 }, - "prev_sequence_number": "872634875" } ``` **Lite Feed Response** @@ -2741,7 +2640,6 @@ STREAM: v1.position "qi": "1.0000102", "el": 60000.25 }, - "ps": "872634875" } ```
@@ -2812,7 +2710,6 @@ STREAM: v1.position "params": { "stream": "v1.position", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "use_global_sequence_number": true }, "id": 123 } @@ -2830,7 +2727,6 @@ STREAM: v1.position "params": { "stream": "v1.position", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "use_global_sequence_number": true }, "id": 123 } @@ -2865,7 +2761,6 @@ STREAM: v1.position "p": { "s": "v1.position", "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "ug": true }, "i": 123 } @@ -2883,7 +2778,6 @@ STREAM: v1.position "p": { "s": "v1.position", "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "ug": true }, "i": 123 } @@ -2919,7 +2813,6 @@ STREAM: v1.position "params": { "stream": "v1.position", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "use_global_sequence_number": true }, "id": 123 } @@ -2937,7 +2830,6 @@ STREAM: v1.position "params": { "stream": "v1.position", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "use_global_sequence_number": true }, "id": 123 } @@ -2972,7 +2864,6 @@ STREAM: v1.position "p": { "s": "v1.position", "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "ug": true }, "i": 123 } @@ -2990,7 +2881,6 @@ STREAM: v1.position "p": { "s": "v1.position", "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "ug": true }, "i": 123 } @@ -3026,7 +2916,6 @@ STREAM: v1.position "params": { "stream": "v1.position", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "use_global_sequence_number": true }, "id": 123 } @@ -3044,7 +2933,6 @@ STREAM: v1.position "params": { "stream": "v1.position", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "use_global_sequence_number": true }, "id": 123 } @@ -3079,7 +2967,6 @@ STREAM: v1.position "p": { "s": "v1.position", "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "ug": true }, "i": 123 } @@ -3097,7 +2984,6 @@ STREAM: v1.position "p": { "s": "v1.position", "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "ug": true }, "i": 123 } @@ -3133,7 +3019,6 @@ STREAM: v1.position "params": { "stream": "v1.position", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "use_global_sequence_number": true }, "id": 123 } @@ -3151,7 +3036,6 @@ STREAM: v1.position "params": { "stream": "v1.position", "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "use_global_sequence_number": true }, "id": 123 } @@ -3186,7 +3070,6 @@ STREAM: v1.position "p": { "s": "v1.position", "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "ug": true }, "i": 123 } @@ -3204,7 +3087,6 @@ STREAM: v1.position "p": { "s": "v1.position", "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], - "ug": true }, "i": 123 } @@ -3256,7 +3138,6 @@ STREAM: v1.deposit "params": { "stream": "v1.deposit", "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], - "use_global_sequence_number": true }, "id": 123 } @@ -3286,7 +3167,6 @@ STREAM: v1.deposit "params": { "stream": "v1.deposit", "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], - "use_global_sequence_number": true }, "id": 123 } @@ -3344,7 +3224,6 @@ STREAM: v1.deposit "currency": "USDT", "num_tokens": "10.50" }, - "prev_sequence_number": "872634875" } ``` **Lite Feed Response** @@ -3359,7 +3238,6 @@ STREAM: v1.deposit "c": "USDT", "nt": "10.50" }, - "ps": "872634875" } ```
@@ -3426,7 +3304,6 @@ STREAM: v1.deposit "params": { "stream": "v1.deposit", "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], - "use_global_sequence_number": true }, "id": 123 } @@ -3444,7 +3321,6 @@ STREAM: v1.deposit "params": { "stream": "v1.deposit", "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], - "use_global_sequence_number": true }, "id": 123 } @@ -3479,7 +3355,6 @@ STREAM: v1.deposit "p": { "s": "v1.deposit", "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"], - "ug": true }, "i": 123 } @@ -3497,7 +3372,6 @@ STREAM: v1.deposit "p": { "s": "v1.deposit", "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"], - "ug": true }, "i": 123 } @@ -3533,7 +3407,6 @@ STREAM: v1.deposit "params": { "stream": "v1.deposit", "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], - "use_global_sequence_number": true }, "id": 123 } @@ -3551,7 +3424,6 @@ STREAM: v1.deposit "params": { "stream": "v1.deposit", "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], - "use_global_sequence_number": true }, "id": 123 } @@ -3586,7 +3458,6 @@ STREAM: v1.deposit "p": { "s": "v1.deposit", "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"], - "ug": true }, "i": 123 } @@ -3604,7 +3475,6 @@ STREAM: v1.deposit "p": { "s": "v1.deposit", "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"], - "ug": true }, "i": 123 } @@ -3640,7 +3510,6 @@ STREAM: v1.deposit "params": { "stream": "v1.deposit", "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], - "use_global_sequence_number": true }, "id": 123 } @@ -3658,7 +3527,6 @@ STREAM: v1.deposit "params": { "stream": "v1.deposit", "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], - "use_global_sequence_number": true }, "id": 123 } @@ -3693,7 +3561,6 @@ STREAM: v1.deposit "p": { "s": "v1.deposit", "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"], - "ug": true }, "i": 123 } @@ -3711,7 +3578,6 @@ STREAM: v1.deposit "p": { "s": "v1.deposit", "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"], - "ug": true }, "i": 123 } @@ -3747,7 +3613,6 @@ STREAM: v1.deposit "params": { "stream": "v1.deposit", "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], - "use_global_sequence_number": true }, "id": 123 } @@ -3765,7 +3630,6 @@ STREAM: v1.deposit "params": { "stream": "v1.deposit", "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], - "use_global_sequence_number": true }, "id": 123 } @@ -3800,7 +3664,6 @@ STREAM: v1.deposit "p": { "s": "v1.deposit", "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"], - "ug": true }, "i": 123 } @@ -3818,7 +3681,6 @@ STREAM: v1.deposit "p": { "s": "v1.deposit", "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"], - "ug": true }, "i": 123 } @@ -3869,7 +3731,6 @@ STREAM: v1.transfer "params": { "stream": "v1.transfer", "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], - "use_global_sequence_number": true }, "id": 123 } @@ -3899,7 +3760,6 @@ STREAM: v1.transfer "params": { "stream": "v1.transfer", "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], - "use_global_sequence_number": true }, "id": 123 } @@ -3971,7 +3831,6 @@ STREAM: v1.transfer "transfer_type": "STANDARD", "transfer_metadata": null }, - "prev_sequence_number": "872634875" } ``` **Lite Feed Response** @@ -4000,7 +3859,6 @@ STREAM: v1.transfer "tt": "STANDARD", "tm": null }, - "ps": "872634875" } ```
@@ -4068,7 +3926,6 @@ STREAM: v1.transfer "params": { "stream": "v1.transfer", "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], - "use_global_sequence_number": true }, "id": 123 } @@ -4086,7 +3943,6 @@ STREAM: v1.transfer "params": { "stream": "v1.transfer", "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], - "use_global_sequence_number": true }, "id": 123 } @@ -4121,7 +3977,6 @@ STREAM: v1.transfer "p": { "s": "v1.transfer", "s1": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], - "ug": true }, "i": 123 } @@ -4139,7 +3994,6 @@ STREAM: v1.transfer "p": { "s": "v1.transfer", "s1": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], - "ug": true }, "i": 123 } @@ -4175,7 +4029,6 @@ STREAM: v1.transfer "params": { "stream": "v1.transfer", "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], - "use_global_sequence_number": true }, "id": 123 } @@ -4193,7 +4046,6 @@ STREAM: v1.transfer "params": { "stream": "v1.transfer", "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], - "use_global_sequence_number": true }, "id": 123 } @@ -4228,7 +4080,6 @@ STREAM: v1.transfer "p": { "s": "v1.transfer", "s1": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], - "ug": true }, "i": 123 } @@ -4246,7 +4097,6 @@ STREAM: v1.transfer "p": { "s": "v1.transfer", "s1": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], - "ug": true }, "i": 123 } @@ -4282,7 +4132,6 @@ STREAM: v1.transfer "params": { "stream": "v1.transfer", "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], - "use_global_sequence_number": true }, "id": 123 } @@ -4300,7 +4149,6 @@ STREAM: v1.transfer "params": { "stream": "v1.transfer", "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], - "use_global_sequence_number": true }, "id": 123 } @@ -4335,7 +4183,6 @@ STREAM: v1.transfer "p": { "s": "v1.transfer", "s1": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], - "ug": true }, "i": 123 } @@ -4353,7 +4200,6 @@ STREAM: v1.transfer "p": { "s": "v1.transfer", "s1": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], - "ug": true }, "i": 123 } @@ -4389,7 +4235,6 @@ STREAM: v1.transfer "params": { "stream": "v1.transfer", "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], - "use_global_sequence_number": true }, "id": 123 } @@ -4407,7 +4252,6 @@ STREAM: v1.transfer "params": { "stream": "v1.transfer", "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], - "use_global_sequence_number": true }, "id": 123 } @@ -4442,7 +4286,6 @@ STREAM: v1.transfer "p": { "s": "v1.transfer", "s1": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], - "ug": true }, "i": 123 } @@ -4460,7 +4303,6 @@ STREAM: v1.transfer "p": { "s": "v1.transfer", "s1": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], - "ug": true }, "i": 123 } @@ -4511,7 +4353,6 @@ STREAM: v1.withdrawal "params": { "stream": "v1.withdrawal", "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], - "use_global_sequence_number": true }, "id": 123 } @@ -4541,7 +4382,6 @@ STREAM: v1.withdrawal "params": { "stream": "v1.withdrawal", "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], - "use_global_sequence_number": true }, "id": 123 } @@ -4607,7 +4447,6 @@ STREAM: v1.withdrawal "nonce": 1234567890 } }, - "prev_sequence_number": "872634875" } ``` **Lite Feed Response** @@ -4630,7 +4469,6 @@ STREAM: v1.withdrawal "n": 1234567890 } }, - "ps": "872634875" } ```
@@ -4697,7 +4535,6 @@ STREAM: v1.withdrawal "params": { "stream": "v1.withdrawal", "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], - "use_global_sequence_number": true }, "id": 123 } @@ -4715,7 +4552,6 @@ STREAM: v1.withdrawal "params": { "stream": "v1.withdrawal", "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], - "use_global_sequence_number": true }, "id": 123 } @@ -4750,7 +4586,6 @@ STREAM: v1.withdrawal "p": { "s": "v1.withdrawal", "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"], - "ug": true }, "i": 123 } @@ -4768,7 +4603,6 @@ STREAM: v1.withdrawal "p": { "s": "v1.withdrawal", "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"], - "ug": true }, "i": 123 } @@ -4804,7 +4638,6 @@ STREAM: v1.withdrawal "params": { "stream": "v1.withdrawal", "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], - "use_global_sequence_number": true }, "id": 123 } @@ -4822,7 +4655,6 @@ STREAM: v1.withdrawal "params": { "stream": "v1.withdrawal", "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], - "use_global_sequence_number": true }, "id": 123 } @@ -4857,7 +4689,6 @@ STREAM: v1.withdrawal "p": { "s": "v1.withdrawal", "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"], - "ug": true }, "i": 123 } @@ -4875,7 +4706,6 @@ STREAM: v1.withdrawal "p": { "s": "v1.withdrawal", "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"], - "ug": true }, "i": 123 } @@ -4911,7 +4741,6 @@ STREAM: v1.withdrawal "params": { "stream": "v1.withdrawal", "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], - "use_global_sequence_number": true }, "id": 123 } @@ -4929,7 +4758,6 @@ STREAM: v1.withdrawal "params": { "stream": "v1.withdrawal", "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], - "use_global_sequence_number": true }, "id": 123 } @@ -4964,7 +4792,6 @@ STREAM: v1.withdrawal "p": { "s": "v1.withdrawal", "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"], - "ug": true }, "i": 123 } @@ -4982,7 +4809,6 @@ STREAM: v1.withdrawal "p": { "s": "v1.withdrawal", "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"], - "ug": true }, "i": 123 } @@ -5018,7 +4844,6 @@ STREAM: v1.withdrawal "params": { "stream": "v1.withdrawal", "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], - "use_global_sequence_number": true }, "id": 123 } @@ -5036,7 +4861,6 @@ STREAM: v1.withdrawal "params": { "stream": "v1.withdrawal", "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], - "use_global_sequence_number": true }, "id": 123 } @@ -5071,7 +4895,6 @@ STREAM: v1.withdrawal "p": { "s": "v1.withdrawal", "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"], - "ug": true }, "i": 123 } @@ -5089,7 +4912,6 @@ STREAM: v1.withdrawal "p": { "s": "v1.withdrawal", "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"], - "ug": true }, "i": 123 } diff --git a/src/codegen/apidocs/apidocs.py b/src/codegen/apidocs/apidocs.py index 86231c6..68da975 100644 --- a/src/codegen/apidocs/apidocs.py +++ b/src/codegen/apidocs/apidocs.py @@ -17,10 +17,24 @@ IGNORE_FIELD_PATHS = [ ["ApiCreateOrderRequest", "Order", "state"], ["ApiCreateOrderRequest", "Order", "order_id"], + ["ApiDedustPositionRequest"], + ["ApiDedustPositionResponse"], + ["TriggerOrderMetadata"], + ["TriggerType"], + ["TriggerBy"], + ["BrokerTag"], ["JSONRPCRequest", "ApiCreateOrderRequest", "Order", "state"], ["JSONRPCRequest", "ApiCreateOrderRequest", "Order", "order_id"], ] +# skip these fields for all structs, at all levels of nesting +IGNORE_FIELDS_ANY_PATH = [ + "prev_sequence_number", + "use_global_sequence_number", + "trigger", + "broker", +] + IGNORE_RPCS: list[str] = ["RPCDedustPositionV1"] IGNORE_ENUM_VALUES: dict[str, list[str]] = { @@ -636,7 +650,10 @@ def write_struct_example_with_generics( field_path = field_path + [struct.name] for i, field in enumerate(struct.fields): - if field_path + [field.name] in IGNORE_FIELD_PATHS: + if ( + field.name in IGNORE_FIELDS_ANY_PATH + or field_path + [field.name] in IGNORE_FIELD_PATHS + ): continue fn = field.name if is_full else field.lite_name comma = "," if i < len(struct.fields) - 1 else "" From 0861559605eef20aa99aa3eed3aaf5d0b86f2b79 Mon Sep 17 00:00:00 2001 From: keithang-grvt Date: Sun, 23 Feb 2025 14:56:40 +0800 Subject: [PATCH 04/11] [RFC] Update API docs and specs --- artifacts/apidocs/market_data_streams.md | 8 ------ artifacts/apidocs/trading_api.md | 36 ++++++++++++------------ artifacts/apidocs/trading_streams.md | 8 ------ src/codegen/apidocs/apidocs.py | 6 +++- 4 files changed, 23 insertions(+), 35 deletions(-) diff --git a/artifacts/apidocs/market_data_streams.md b/artifacts/apidocs/market_data_streams.md index 7cf87dd..1b498c6 100644 --- a/artifacts/apidocs/market_data_streams.md +++ b/artifacts/apidocs/market_data_streams.md @@ -43,7 +43,6 @@ STREAM: v1.mini.s "unsubs": [], "num_snapshots": [10], "first_sequence_number": [872634876], - "latest_sequence_number": [872634875] }, "id": 123, "method": "subscribe" @@ -603,7 +602,6 @@ STREAM: v1.mini.d "unsubs": [], "num_snapshots": [10], "first_sequence_number": [872634876], - "latest_sequence_number": [872634875] }, "id": 123, "method": "subscribe" @@ -1163,7 +1161,6 @@ STREAM: v1.ticker.s "unsubs": [], "num_snapshots": [10], "first_sequence_number": [872634876], - "latest_sequence_number": [872634875] }, "id": 123, "method": "subscribe" @@ -1749,7 +1746,6 @@ STREAM: v1.ticker.d "unsubs": [], "num_snapshots": [10], "first_sequence_number": [872634876], - "latest_sequence_number": [872634875] }, "id": 123, "method": "subscribe" @@ -2336,7 +2332,6 @@ STREAM: v1.book.s "unsubs": [], "num_snapshots": [10], "first_sequence_number": [872634876], - "latest_sequence_number": [872634875] }, "id": 123, "method": "subscribe" @@ -2899,7 +2894,6 @@ STREAM: v1.book.d "unsubs": [], "num_snapshots": [10], "first_sequence_number": [872634876], - "latest_sequence_number": [872634875] }, "id": 123, "method": "subscribe" @@ -3462,7 +3456,6 @@ STREAM: v1.trade "unsubs": [], "num_snapshots": [10], "first_sequence_number": [872634876], - "latest_sequence_number": [872634875] }, "id": 123, "method": "subscribe" @@ -4023,7 +4016,6 @@ STREAM: v1.candle "unsubs": [], "num_snapshots": [10], "first_sequence_number": [872634876], - "latest_sequence_number": [872634875] }, "id": 123, "method": "subscribe" diff --git a/artifacts/apidocs/trading_api.md b/artifacts/apidocs/trading_api.md index 19e48a7..133af30 100644 --- a/artifacts/apidocs/trading_api.md +++ b/artifacts/apidocs/trading_api.md @@ -40,7 +40,7 @@ LITE ENDPOINT: lite/v1/create_order "metadata": { "client_order_id": "23042", "create_time": "1697788800000000000", - }, + } } } ``` @@ -70,7 +70,7 @@ LITE ENDPOINT: lite/v1/create_order "m": { "co": "23042", "ct": "1697788800000000000", - }, + } } } ``` @@ -266,7 +266,7 @@ LITE ENDPOINT: lite/v1/create_order "metadata": { "client_order_id": "23042", "create_time": "1697788800000000000", - }, + } } } ' @@ -304,7 +304,7 @@ LITE ENDPOINT: lite/v1/create_order "metadata": { "client_order_id": "23042", "create_time": "1697788800000000000", - }, + } } }, "id": 123 @@ -342,7 +342,7 @@ LITE ENDPOINT: lite/v1/create_order "m": { "co": "23042", "ct": "1697788800000000000", - }, + } } } ' @@ -380,7 +380,7 @@ LITE ENDPOINT: lite/v1/create_order "m": { "co": "23042", "ct": "1697788800000000000", - }, + } } }, "i": 123 @@ -419,7 +419,7 @@ LITE ENDPOINT: lite/v1/create_order "metadata": { "client_order_id": "23042", "create_time": "1697788800000000000", - }, + } } } ' @@ -457,7 +457,7 @@ LITE ENDPOINT: lite/v1/create_order "metadata": { "client_order_id": "23042", "create_time": "1697788800000000000", - }, + } } }, "id": 123 @@ -495,7 +495,7 @@ LITE ENDPOINT: lite/v1/create_order "m": { "co": "23042", "ct": "1697788800000000000", - }, + } } } ' @@ -533,7 +533,7 @@ LITE ENDPOINT: lite/v1/create_order "m": { "co": "23042", "ct": "1697788800000000000", - }, + } } }, "i": 123 @@ -572,7 +572,7 @@ LITE ENDPOINT: lite/v1/create_order "metadata": { "client_order_id": "23042", "create_time": "1697788800000000000", - }, + } } } ' @@ -610,7 +610,7 @@ LITE ENDPOINT: lite/v1/create_order "metadata": { "client_order_id": "23042", "create_time": "1697788800000000000", - }, + } } }, "id": 123 @@ -648,7 +648,7 @@ LITE ENDPOINT: lite/v1/create_order "m": { "co": "23042", "ct": "1697788800000000000", - }, + } } } ' @@ -686,7 +686,7 @@ LITE ENDPOINT: lite/v1/create_order "m": { "co": "23042", "ct": "1697788800000000000", - }, + } } }, "i": 123 @@ -725,7 +725,7 @@ LITE ENDPOINT: lite/v1/create_order "metadata": { "client_order_id": "23042", "create_time": "1697788800000000000", - }, + } } } ' @@ -763,7 +763,7 @@ LITE ENDPOINT: lite/v1/create_order "metadata": { "client_order_id": "23042", "create_time": "1697788800000000000", - }, + } } }, "id": 123 @@ -801,7 +801,7 @@ LITE ENDPOINT: lite/v1/create_order "m": { "co": "23042", "ct": "1697788800000000000", - }, + } } } ' @@ -839,7 +839,7 @@ LITE ENDPOINT: lite/v1/create_order "m": { "co": "23042", "ct": "1697788800000000000", - }, + } } }, "i": 123 diff --git a/artifacts/apidocs/trading_streams.md b/artifacts/apidocs/trading_streams.md index eb97b2e..05c3db7 100644 --- a/artifacts/apidocs/trading_streams.md +++ b/artifacts/apidocs/trading_streams.md @@ -43,7 +43,6 @@ STREAM: v1.order "unsubs": [], "num_snapshots": [10], "first_sequence_number": [872634876], - "latest_sequence_number": [872634875] }, "id": 123, "method": "subscribe" @@ -696,7 +695,6 @@ STREAM: v1.state "unsubs": [], "num_snapshots": [10], "first_sequence_number": [872634876], - "latest_sequence_number": [872634875] }, "id": 123, "method": "subscribe" @@ -1305,7 +1303,6 @@ STREAM: v1.cancel "unsubs": [], "num_snapshots": [10], "first_sequence_number": [872634876], - "latest_sequence_number": [872634875] }, "id": 123, "method": "subscribe" @@ -1907,7 +1904,6 @@ STREAM: v1.fill "unsubs": [], "num_snapshots": [10], "first_sequence_number": [872634876], - "latest_sequence_number": [872634875] }, "id": 123, "method": "subscribe" @@ -2534,7 +2530,6 @@ STREAM: v1.position "unsubs": [], "num_snapshots": [10], "first_sequence_number": [872634876], - "latest_sequence_number": [872634875] }, "id": 123, "method": "subscribe" @@ -3152,7 +3147,6 @@ STREAM: v1.deposit "unsubs": [], "num_snapshots": [10], "first_sequence_number": [872634876], - "latest_sequence_number": [872634875] }, "id": 123, "method": "subscribe" @@ -3745,7 +3739,6 @@ STREAM: v1.transfer "unsubs": [], "num_snapshots": [10], "first_sequence_number": [872634876], - "latest_sequence_number": [872634875] }, "id": 123, "method": "subscribe" @@ -4367,7 +4360,6 @@ STREAM: v1.withdrawal "unsubs": [], "num_snapshots": [10], "first_sequence_number": [872634876], - "latest_sequence_number": [872634875] }, "id": 123, "method": "subscribe" diff --git a/src/codegen/apidocs/apidocs.py b/src/codegen/apidocs/apidocs.py index 68da975..b153151 100644 --- a/src/codegen/apidocs/apidocs.py +++ b/src/codegen/apidocs/apidocs.py @@ -1,3 +1,4 @@ +from dataclasses import fields import re from copy import deepcopy from typing import cast @@ -30,6 +31,7 @@ # skip these fields for all structs, at all levels of nesting IGNORE_FIELDS_ANY_PATH = [ "prev_sequence_number", + "latest_sequence_number", "use_global_sequence_number", "trigger", "broker", @@ -649,14 +651,16 @@ def write_struct_example_with_generics( field_path = field_path + [struct.name] + fields_skipped = 0 for i, field in enumerate(struct.fields): if ( field.name in IGNORE_FIELDS_ANY_PATH or field_path + [field.name] in IGNORE_FIELD_PATHS ): + fields_skipped += 1 continue fn = field.name if is_full else field.lite_name - comma = "," if i < len(struct.fields) - 1 else "" + comma = "," if i < len(struct.fields) - fields_skipped - 1 else "" md.write(f'"{fn}": ') for _ in range(field.array_depth): md.write("[") From f74ce41c7dbbdcc505f193133565162564fb5324 Mon Sep 17 00:00:00 2001 From: keithang-grvt Date: Sun, 23 Feb 2025 14:59:10 +0800 Subject: [PATCH 05/11] [RFC] Update API docs and specs --- artifacts/apidocs/market_data_streams.md | 336 +++++++++++----------- artifacts/apidocs/trading_api.md | 128 ++++----- artifacts/apidocs/trading_streams.md | 344 +++++++++++------------ src/codegen/apidocs/apidocs.py | 5 + 4 files changed, 409 insertions(+), 404 deletions(-) diff --git a/artifacts/apidocs/market_data_streams.md b/artifacts/apidocs/market_data_streams.md index 1b498c6..463c4dc 100644 --- a/artifacts/apidocs/market_data_streams.md +++ b/artifacts/apidocs/market_data_streams.md @@ -28,7 +28,7 @@ STREAM: v1.mini.s "method": "subscribe", "params": { "stream": "v1.mini.s", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -42,7 +42,7 @@ STREAM: v1.mini.s "subs": ["BTC_USDT_Perp@500"], "unsubs": [], "num_snapshots": [10], - "first_sequence_number": [872634876], + "first_sequence_number": [872634876] }, "id": 123, "method": "subscribe" @@ -56,7 +56,7 @@ STREAM: v1.mini.s "method": "unsubscribe", "params": { "stream": "v1.mini.s", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -120,7 +120,7 @@ STREAM: v1.mini.s "best_bid_size": "123456.78", "best_ask_price": "65038.01", "best_ask_size": "123456.78" - }, + } } ``` **Lite Feed Response** @@ -141,7 +141,7 @@ STREAM: v1.mini.s "bb1": "123456.78", "ba": "65038.01", "ba1": "123456.78" - }, + } } ```
@@ -206,7 +206,7 @@ STREAM: v1.mini.s "method": "subscribe", "params": { "stream": "v1.mini.s", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -221,7 +221,7 @@ STREAM: v1.mini.s "method": "unsubscribe", "params": { "stream": "v1.mini.s", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -251,7 +251,7 @@ STREAM: v1.mini.s "m": "subscribe", "p": { "s": "v1.mini.s", - "s1": ["BTC_USDT_Perp@500"], + "s1": ["BTC_USDT_Perp@500"] }, "i": 123 } @@ -266,7 +266,7 @@ STREAM: v1.mini.s "m": "unsubscribe", "p": { "s": "v1.mini.s", - "s1": ["BTC_USDT_Perp@500"], + "s1": ["BTC_USDT_Perp@500"] }, "i": 123 } @@ -297,7 +297,7 @@ STREAM: v1.mini.s "method": "subscribe", "params": { "stream": "v1.mini.s", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -312,7 +312,7 @@ STREAM: v1.mini.s "method": "unsubscribe", "params": { "stream": "v1.mini.s", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -342,7 +342,7 @@ STREAM: v1.mini.s "m": "subscribe", "p": { "s": "v1.mini.s", - "s1": ["BTC_USDT_Perp@500"], + "s1": ["BTC_USDT_Perp@500"] }, "i": 123 } @@ -357,7 +357,7 @@ STREAM: v1.mini.s "m": "unsubscribe", "p": { "s": "v1.mini.s", - "s1": ["BTC_USDT_Perp@500"], + "s1": ["BTC_USDT_Perp@500"] }, "i": 123 } @@ -388,7 +388,7 @@ STREAM: v1.mini.s "method": "subscribe", "params": { "stream": "v1.mini.s", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -403,7 +403,7 @@ STREAM: v1.mini.s "method": "unsubscribe", "params": { "stream": "v1.mini.s", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -433,7 +433,7 @@ STREAM: v1.mini.s "m": "subscribe", "p": { "s": "v1.mini.s", - "s1": ["BTC_USDT_Perp@500"], + "s1": ["BTC_USDT_Perp@500"] }, "i": 123 } @@ -448,7 +448,7 @@ STREAM: v1.mini.s "m": "unsubscribe", "p": { "s": "v1.mini.s", - "s1": ["BTC_USDT_Perp@500"], + "s1": ["BTC_USDT_Perp@500"] }, "i": 123 } @@ -479,7 +479,7 @@ STREAM: v1.mini.s "method": "subscribe", "params": { "stream": "v1.mini.s", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -494,7 +494,7 @@ STREAM: v1.mini.s "method": "unsubscribe", "params": { "stream": "v1.mini.s", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -524,7 +524,7 @@ STREAM: v1.mini.s "m": "subscribe", "p": { "s": "v1.mini.s", - "s1": ["BTC_USDT_Perp@500"], + "s1": ["BTC_USDT_Perp@500"] }, "i": 123 } @@ -539,7 +539,7 @@ STREAM: v1.mini.s "m": "unsubscribe", "p": { "s": "v1.mini.s", - "s1": ["BTC_USDT_Perp@500"], + "s1": ["BTC_USDT_Perp@500"] }, "i": 123 } @@ -587,7 +587,7 @@ STREAM: v1.mini.d "method": "subscribe", "params": { "stream": "v1.mini.d", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -601,7 +601,7 @@ STREAM: v1.mini.d "subs": ["BTC_USDT_Perp@500"], "unsubs": [], "num_snapshots": [10], - "first_sequence_number": [872634876], + "first_sequence_number": [872634876] }, "id": 123, "method": "subscribe" @@ -615,7 +615,7 @@ STREAM: v1.mini.d "method": "unsubscribe", "params": { "stream": "v1.mini.d", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -679,7 +679,7 @@ STREAM: v1.mini.d "best_bid_size": "123456.78", "best_ask_price": "65038.01", "best_ask_size": "123456.78" - }, + } } ``` **Lite Feed Response** @@ -700,7 +700,7 @@ STREAM: v1.mini.d "bb1": "123456.78", "ba": "65038.01", "ba1": "123456.78" - }, + } } ```
@@ -765,7 +765,7 @@ STREAM: v1.mini.d "method": "subscribe", "params": { "stream": "v1.mini.d", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -780,7 +780,7 @@ STREAM: v1.mini.d "method": "unsubscribe", "params": { "stream": "v1.mini.d", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -810,7 +810,7 @@ STREAM: v1.mini.d "m": "subscribe", "p": { "s": "v1.mini.d", - "s1": ["BTC_USDT_Perp@500"], + "s1": ["BTC_USDT_Perp@500"] }, "i": 123 } @@ -825,7 +825,7 @@ STREAM: v1.mini.d "m": "unsubscribe", "p": { "s": "v1.mini.d", - "s1": ["BTC_USDT_Perp@500"], + "s1": ["BTC_USDT_Perp@500"] }, "i": 123 } @@ -856,7 +856,7 @@ STREAM: v1.mini.d "method": "subscribe", "params": { "stream": "v1.mini.d", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -871,7 +871,7 @@ STREAM: v1.mini.d "method": "unsubscribe", "params": { "stream": "v1.mini.d", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -901,7 +901,7 @@ STREAM: v1.mini.d "m": "subscribe", "p": { "s": "v1.mini.d", - "s1": ["BTC_USDT_Perp@500"], + "s1": ["BTC_USDT_Perp@500"] }, "i": 123 } @@ -916,7 +916,7 @@ STREAM: v1.mini.d "m": "unsubscribe", "p": { "s": "v1.mini.d", - "s1": ["BTC_USDT_Perp@500"], + "s1": ["BTC_USDT_Perp@500"] }, "i": 123 } @@ -947,7 +947,7 @@ STREAM: v1.mini.d "method": "subscribe", "params": { "stream": "v1.mini.d", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -962,7 +962,7 @@ STREAM: v1.mini.d "method": "unsubscribe", "params": { "stream": "v1.mini.d", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -992,7 +992,7 @@ STREAM: v1.mini.d "m": "subscribe", "p": { "s": "v1.mini.d", - "s1": ["BTC_USDT_Perp@500"], + "s1": ["BTC_USDT_Perp@500"] }, "i": 123 } @@ -1007,7 +1007,7 @@ STREAM: v1.mini.d "m": "unsubscribe", "p": { "s": "v1.mini.d", - "s1": ["BTC_USDT_Perp@500"], + "s1": ["BTC_USDT_Perp@500"] }, "i": 123 } @@ -1038,7 +1038,7 @@ STREAM: v1.mini.d "method": "subscribe", "params": { "stream": "v1.mini.d", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -1053,7 +1053,7 @@ STREAM: v1.mini.d "method": "unsubscribe", "params": { "stream": "v1.mini.d", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -1083,7 +1083,7 @@ STREAM: v1.mini.d "m": "subscribe", "p": { "s": "v1.mini.d", - "s1": ["BTC_USDT_Perp@500"], + "s1": ["BTC_USDT_Perp@500"] }, "i": 123 } @@ -1098,7 +1098,7 @@ STREAM: v1.mini.d "m": "unsubscribe", "p": { "s": "v1.mini.d", - "s1": ["BTC_USDT_Perp@500"], + "s1": ["BTC_USDT_Perp@500"] }, "i": 123 } @@ -1146,7 +1146,7 @@ STREAM: v1.ticker.s "method": "subscribe", "params": { "stream": "v1.ticker.s", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -1160,7 +1160,7 @@ STREAM: v1.ticker.s "subs": ["BTC_USDT_Perp@500"], "unsubs": [], "num_snapshots": [10], - "first_sequence_number": [872634876], + "first_sequence_number": [872634876] }, "id": 123, "method": "subscribe" @@ -1174,7 +1174,7 @@ STREAM: v1.ticker.s "method": "unsubscribe", "params": { "stream": "v1.ticker.s", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -1251,7 +1251,7 @@ STREAM: v1.ticker.s "open_price": "65038.01", "open_interest": "123456.78", "long_short_ratio": "0.5" - }, + } } ``` **Lite Feed Response** @@ -1285,7 +1285,7 @@ STREAM: v1.ticker.s "op": "65038.01", "oi": "123456.78", "ls1": "0.5" - }, + } } ```
@@ -1350,7 +1350,7 @@ STREAM: v1.ticker.s "method": "subscribe", "params": { "stream": "v1.ticker.s", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -1365,7 +1365,7 @@ STREAM: v1.ticker.s "method": "unsubscribe", "params": { "stream": "v1.ticker.s", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -1395,7 +1395,7 @@ STREAM: v1.ticker.s "m": "subscribe", "p": { "s": "v1.ticker.s", - "s1": ["BTC_USDT_Perp@500"], + "s1": ["BTC_USDT_Perp@500"] }, "i": 123 } @@ -1410,7 +1410,7 @@ STREAM: v1.ticker.s "m": "unsubscribe", "p": { "s": "v1.ticker.s", - "s1": ["BTC_USDT_Perp@500"], + "s1": ["BTC_USDT_Perp@500"] }, "i": 123 } @@ -1441,7 +1441,7 @@ STREAM: v1.ticker.s "method": "subscribe", "params": { "stream": "v1.ticker.s", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -1456,7 +1456,7 @@ STREAM: v1.ticker.s "method": "unsubscribe", "params": { "stream": "v1.ticker.s", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -1486,7 +1486,7 @@ STREAM: v1.ticker.s "m": "subscribe", "p": { "s": "v1.ticker.s", - "s1": ["BTC_USDT_Perp@500"], + "s1": ["BTC_USDT_Perp@500"] }, "i": 123 } @@ -1501,7 +1501,7 @@ STREAM: v1.ticker.s "m": "unsubscribe", "p": { "s": "v1.ticker.s", - "s1": ["BTC_USDT_Perp@500"], + "s1": ["BTC_USDT_Perp@500"] }, "i": 123 } @@ -1532,7 +1532,7 @@ STREAM: v1.ticker.s "method": "subscribe", "params": { "stream": "v1.ticker.s", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -1547,7 +1547,7 @@ STREAM: v1.ticker.s "method": "unsubscribe", "params": { "stream": "v1.ticker.s", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -1577,7 +1577,7 @@ STREAM: v1.ticker.s "m": "subscribe", "p": { "s": "v1.ticker.s", - "s1": ["BTC_USDT_Perp@500"], + "s1": ["BTC_USDT_Perp@500"] }, "i": 123 } @@ -1592,7 +1592,7 @@ STREAM: v1.ticker.s "m": "unsubscribe", "p": { "s": "v1.ticker.s", - "s1": ["BTC_USDT_Perp@500"], + "s1": ["BTC_USDT_Perp@500"] }, "i": 123 } @@ -1623,7 +1623,7 @@ STREAM: v1.ticker.s "method": "subscribe", "params": { "stream": "v1.ticker.s", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -1638,7 +1638,7 @@ STREAM: v1.ticker.s "method": "unsubscribe", "params": { "stream": "v1.ticker.s", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -1668,7 +1668,7 @@ STREAM: v1.ticker.s "m": "subscribe", "p": { "s": "v1.ticker.s", - "s1": ["BTC_USDT_Perp@500"], + "s1": ["BTC_USDT_Perp@500"] }, "i": 123 } @@ -1683,7 +1683,7 @@ STREAM: v1.ticker.s "m": "unsubscribe", "p": { "s": "v1.ticker.s", - "s1": ["BTC_USDT_Perp@500"], + "s1": ["BTC_USDT_Perp@500"] }, "i": 123 } @@ -1731,7 +1731,7 @@ STREAM: v1.ticker.d "method": "subscribe", "params": { "stream": "v1.ticker.d", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -1745,7 +1745,7 @@ STREAM: v1.ticker.d "subs": ["BTC_USDT_Perp@500"], "unsubs": [], "num_snapshots": [10], - "first_sequence_number": [872634876], + "first_sequence_number": [872634876] }, "id": 123, "method": "subscribe" @@ -1759,7 +1759,7 @@ STREAM: v1.ticker.d "method": "unsubscribe", "params": { "stream": "v1.ticker.d", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -1836,7 +1836,7 @@ STREAM: v1.ticker.d "open_price": "65038.01", "open_interest": "123456.78", "long_short_ratio": "0.5" - }, + } } ``` **Lite Feed Response** @@ -1870,7 +1870,7 @@ STREAM: v1.ticker.d "op": "65038.01", "oi": "123456.78", "ls1": "0.5" - }, + } } ```
@@ -1935,7 +1935,7 @@ STREAM: v1.ticker.d "method": "subscribe", "params": { "stream": "v1.ticker.d", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -1950,7 +1950,7 @@ STREAM: v1.ticker.d "method": "unsubscribe", "params": { "stream": "v1.ticker.d", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -1980,7 +1980,7 @@ STREAM: v1.ticker.d "m": "subscribe", "p": { "s": "v1.ticker.d", - "s1": ["BTC_USDT_Perp@500"], + "s1": ["BTC_USDT_Perp@500"] }, "i": 123 } @@ -1995,7 +1995,7 @@ STREAM: v1.ticker.d "m": "unsubscribe", "p": { "s": "v1.ticker.d", - "s1": ["BTC_USDT_Perp@500"], + "s1": ["BTC_USDT_Perp@500"] }, "i": 123 } @@ -2026,7 +2026,7 @@ STREAM: v1.ticker.d "method": "subscribe", "params": { "stream": "v1.ticker.d", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -2041,7 +2041,7 @@ STREAM: v1.ticker.d "method": "unsubscribe", "params": { "stream": "v1.ticker.d", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -2071,7 +2071,7 @@ STREAM: v1.ticker.d "m": "subscribe", "p": { "s": "v1.ticker.d", - "s1": ["BTC_USDT_Perp@500"], + "s1": ["BTC_USDT_Perp@500"] }, "i": 123 } @@ -2086,7 +2086,7 @@ STREAM: v1.ticker.d "m": "unsubscribe", "p": { "s": "v1.ticker.d", - "s1": ["BTC_USDT_Perp@500"], + "s1": ["BTC_USDT_Perp@500"] }, "i": 123 } @@ -2117,7 +2117,7 @@ STREAM: v1.ticker.d "method": "subscribe", "params": { "stream": "v1.ticker.d", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -2132,7 +2132,7 @@ STREAM: v1.ticker.d "method": "unsubscribe", "params": { "stream": "v1.ticker.d", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -2162,7 +2162,7 @@ STREAM: v1.ticker.d "m": "subscribe", "p": { "s": "v1.ticker.d", - "s1": ["BTC_USDT_Perp@500"], + "s1": ["BTC_USDT_Perp@500"] }, "i": 123 } @@ -2177,7 +2177,7 @@ STREAM: v1.ticker.d "m": "unsubscribe", "p": { "s": "v1.ticker.d", - "s1": ["BTC_USDT_Perp@500"], + "s1": ["BTC_USDT_Perp@500"] }, "i": 123 } @@ -2208,7 +2208,7 @@ STREAM: v1.ticker.d "method": "subscribe", "params": { "stream": "v1.ticker.d", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -2223,7 +2223,7 @@ STREAM: v1.ticker.d "method": "unsubscribe", "params": { "stream": "v1.ticker.d", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -2253,7 +2253,7 @@ STREAM: v1.ticker.d "m": "subscribe", "p": { "s": "v1.ticker.d", - "s1": ["BTC_USDT_Perp@500"], + "s1": ["BTC_USDT_Perp@500"] }, "i": 123 } @@ -2268,7 +2268,7 @@ STREAM: v1.ticker.d "m": "unsubscribe", "p": { "s": "v1.ticker.d", - "s1": ["BTC_USDT_Perp@500"], + "s1": ["BTC_USDT_Perp@500"] }, "i": 123 } @@ -2317,7 +2317,7 @@ STREAM: v1.book.s "method": "subscribe", "params": { "stream": "v1.book.s", - "selectors": ["BTC_USDT_Perp@500-50"], + "selectors": ["BTC_USDT_Perp@500-50"] }, "id": 123 } @@ -2331,7 +2331,7 @@ STREAM: v1.book.s "subs": ["BTC_USDT_Perp@500-50"], "unsubs": [], "num_snapshots": [10], - "first_sequence_number": [872634876], + "first_sequence_number": [872634876] }, "id": 123, "method": "subscribe" @@ -2345,7 +2345,7 @@ STREAM: v1.book.s "method": "unsubscribe", "params": { "stream": "v1.book.s", - "selectors": ["BTC_USDT_Perp@500-50"], + "selectors": ["BTC_USDT_Perp@500-50"] }, "id": 123 } @@ -2410,7 +2410,7 @@ STREAM: v1.book.s "size": "3456.78", "num_orders": 123 }] - }, + } } ``` **Lite Feed Response** @@ -2432,7 +2432,7 @@ STREAM: v1.book.s "s": "3456.78", "no": 123 }] - }, + } } ```
@@ -2498,7 +2498,7 @@ STREAM: v1.book.s "method": "subscribe", "params": { "stream": "v1.book.s", - "selectors": ["BTC_USDT_Perp@500-50"], + "selectors": ["BTC_USDT_Perp@500-50"] }, "id": 123 } @@ -2513,7 +2513,7 @@ STREAM: v1.book.s "method": "unsubscribe", "params": { "stream": "v1.book.s", - "selectors": ["BTC_USDT_Perp@500-50"], + "selectors": ["BTC_USDT_Perp@500-50"] }, "id": 123 } @@ -2543,7 +2543,7 @@ STREAM: v1.book.s "m": "subscribe", "p": { "s": "v1.book.s", - "s1": ["BTC_USDT_Perp@500-50"], + "s1": ["BTC_USDT_Perp@500-50"] }, "i": 123 } @@ -2558,7 +2558,7 @@ STREAM: v1.book.s "m": "unsubscribe", "p": { "s": "v1.book.s", - "s1": ["BTC_USDT_Perp@500-50"], + "s1": ["BTC_USDT_Perp@500-50"] }, "i": 123 } @@ -2589,7 +2589,7 @@ STREAM: v1.book.s "method": "subscribe", "params": { "stream": "v1.book.s", - "selectors": ["BTC_USDT_Perp@500-50"], + "selectors": ["BTC_USDT_Perp@500-50"] }, "id": 123 } @@ -2604,7 +2604,7 @@ STREAM: v1.book.s "method": "unsubscribe", "params": { "stream": "v1.book.s", - "selectors": ["BTC_USDT_Perp@500-50"], + "selectors": ["BTC_USDT_Perp@500-50"] }, "id": 123 } @@ -2634,7 +2634,7 @@ STREAM: v1.book.s "m": "subscribe", "p": { "s": "v1.book.s", - "s1": ["BTC_USDT_Perp@500-50"], + "s1": ["BTC_USDT_Perp@500-50"] }, "i": 123 } @@ -2649,7 +2649,7 @@ STREAM: v1.book.s "m": "unsubscribe", "p": { "s": "v1.book.s", - "s1": ["BTC_USDT_Perp@500-50"], + "s1": ["BTC_USDT_Perp@500-50"] }, "i": 123 } @@ -2680,7 +2680,7 @@ STREAM: v1.book.s "method": "subscribe", "params": { "stream": "v1.book.s", - "selectors": ["BTC_USDT_Perp@500-50"], + "selectors": ["BTC_USDT_Perp@500-50"] }, "id": 123 } @@ -2695,7 +2695,7 @@ STREAM: v1.book.s "method": "unsubscribe", "params": { "stream": "v1.book.s", - "selectors": ["BTC_USDT_Perp@500-50"], + "selectors": ["BTC_USDT_Perp@500-50"] }, "id": 123 } @@ -2725,7 +2725,7 @@ STREAM: v1.book.s "m": "subscribe", "p": { "s": "v1.book.s", - "s1": ["BTC_USDT_Perp@500-50"], + "s1": ["BTC_USDT_Perp@500-50"] }, "i": 123 } @@ -2740,7 +2740,7 @@ STREAM: v1.book.s "m": "unsubscribe", "p": { "s": "v1.book.s", - "s1": ["BTC_USDT_Perp@500-50"], + "s1": ["BTC_USDT_Perp@500-50"] }, "i": 123 } @@ -2771,7 +2771,7 @@ STREAM: v1.book.s "method": "subscribe", "params": { "stream": "v1.book.s", - "selectors": ["BTC_USDT_Perp@500-50"], + "selectors": ["BTC_USDT_Perp@500-50"] }, "id": 123 } @@ -2786,7 +2786,7 @@ STREAM: v1.book.s "method": "unsubscribe", "params": { "stream": "v1.book.s", - "selectors": ["BTC_USDT_Perp@500-50"], + "selectors": ["BTC_USDT_Perp@500-50"] }, "id": 123 } @@ -2816,7 +2816,7 @@ STREAM: v1.book.s "m": "subscribe", "p": { "s": "v1.book.s", - "s1": ["BTC_USDT_Perp@500-50"], + "s1": ["BTC_USDT_Perp@500-50"] }, "i": 123 } @@ -2831,7 +2831,7 @@ STREAM: v1.book.s "m": "unsubscribe", "p": { "s": "v1.book.s", - "s1": ["BTC_USDT_Perp@500-50"], + "s1": ["BTC_USDT_Perp@500-50"] }, "i": 123 } @@ -2879,7 +2879,7 @@ STREAM: v1.book.d "method": "subscribe", "params": { "stream": "v1.book.d", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -2893,7 +2893,7 @@ STREAM: v1.book.d "subs": ["BTC_USDT_Perp@500"], "unsubs": [], "num_snapshots": [10], - "first_sequence_number": [872634876], + "first_sequence_number": [872634876] }, "id": 123, "method": "subscribe" @@ -2907,7 +2907,7 @@ STREAM: v1.book.d "method": "unsubscribe", "params": { "stream": "v1.book.d", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -2972,7 +2972,7 @@ STREAM: v1.book.d "size": "3456.78", "num_orders": 123 }] - }, + } } ``` **Lite Feed Response** @@ -2994,7 +2994,7 @@ STREAM: v1.book.d "s": "3456.78", "no": 123 }] - }, + } } ```
@@ -3059,7 +3059,7 @@ STREAM: v1.book.d "method": "subscribe", "params": { "stream": "v1.book.d", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -3074,7 +3074,7 @@ STREAM: v1.book.d "method": "unsubscribe", "params": { "stream": "v1.book.d", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -3104,7 +3104,7 @@ STREAM: v1.book.d "m": "subscribe", "p": { "s": "v1.book.d", - "s1": ["BTC_USDT_Perp@500"], + "s1": ["BTC_USDT_Perp@500"] }, "i": 123 } @@ -3119,7 +3119,7 @@ STREAM: v1.book.d "m": "unsubscribe", "p": { "s": "v1.book.d", - "s1": ["BTC_USDT_Perp@500"], + "s1": ["BTC_USDT_Perp@500"] }, "i": 123 } @@ -3150,7 +3150,7 @@ STREAM: v1.book.d "method": "subscribe", "params": { "stream": "v1.book.d", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -3165,7 +3165,7 @@ STREAM: v1.book.d "method": "unsubscribe", "params": { "stream": "v1.book.d", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -3195,7 +3195,7 @@ STREAM: v1.book.d "m": "subscribe", "p": { "s": "v1.book.d", - "s1": ["BTC_USDT_Perp@500"], + "s1": ["BTC_USDT_Perp@500"] }, "i": 123 } @@ -3210,7 +3210,7 @@ STREAM: v1.book.d "m": "unsubscribe", "p": { "s": "v1.book.d", - "s1": ["BTC_USDT_Perp@500"], + "s1": ["BTC_USDT_Perp@500"] }, "i": 123 } @@ -3241,7 +3241,7 @@ STREAM: v1.book.d "method": "subscribe", "params": { "stream": "v1.book.d", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -3256,7 +3256,7 @@ STREAM: v1.book.d "method": "unsubscribe", "params": { "stream": "v1.book.d", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -3286,7 +3286,7 @@ STREAM: v1.book.d "m": "subscribe", "p": { "s": "v1.book.d", - "s1": ["BTC_USDT_Perp@500"], + "s1": ["BTC_USDT_Perp@500"] }, "i": 123 } @@ -3301,7 +3301,7 @@ STREAM: v1.book.d "m": "unsubscribe", "p": { "s": "v1.book.d", - "s1": ["BTC_USDT_Perp@500"], + "s1": ["BTC_USDT_Perp@500"] }, "i": 123 } @@ -3332,7 +3332,7 @@ STREAM: v1.book.d "method": "subscribe", "params": { "stream": "v1.book.d", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -3347,7 +3347,7 @@ STREAM: v1.book.d "method": "unsubscribe", "params": { "stream": "v1.book.d", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -3377,7 +3377,7 @@ STREAM: v1.book.d "m": "subscribe", "p": { "s": "v1.book.d", - "s1": ["BTC_USDT_Perp@500"], + "s1": ["BTC_USDT_Perp@500"] }, "i": 123 } @@ -3392,7 +3392,7 @@ STREAM: v1.book.d "m": "unsubscribe", "p": { "s": "v1.book.d", - "s1": ["BTC_USDT_Perp@500"], + "s1": ["BTC_USDT_Perp@500"] }, "i": 123 } @@ -3441,7 +3441,7 @@ STREAM: v1.trade "method": "subscribe", "params": { "stream": "v1.trade", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -3455,7 +3455,7 @@ STREAM: v1.trade "subs": ["BTC_USDT_Perp@500"], "unsubs": [], "num_snapshots": [10], - "first_sequence_number": [872634876], + "first_sequence_number": [872634876] }, "id": 123, "method": "subscribe" @@ -3469,7 +3469,7 @@ STREAM: v1.trade "method": "unsubscribe", "params": { "stream": "v1.trade", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -3533,7 +3533,7 @@ STREAM: v1.trade "forward_price": "65038.01", "trade_id": "209358-2", "venue": "ORDERBOOK" - }, + } } ``` **Lite Feed Response** @@ -3554,7 +3554,7 @@ STREAM: v1.trade "fp": "65038.01", "ti": "209358-2", "v": "ORDERBOOK" - }, + } } ```
@@ -3619,7 +3619,7 @@ STREAM: v1.trade "method": "subscribe", "params": { "stream": "v1.trade", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -3634,7 +3634,7 @@ STREAM: v1.trade "method": "unsubscribe", "params": { "stream": "v1.trade", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -3664,7 +3664,7 @@ STREAM: v1.trade "m": "subscribe", "p": { "s": "v1.trade", - "s1": ["BTC_USDT_Perp@500"], + "s1": ["BTC_USDT_Perp@500"] }, "i": 123 } @@ -3679,7 +3679,7 @@ STREAM: v1.trade "m": "unsubscribe", "p": { "s": "v1.trade", - "s1": ["BTC_USDT_Perp@500"], + "s1": ["BTC_USDT_Perp@500"] }, "i": 123 } @@ -3710,7 +3710,7 @@ STREAM: v1.trade "method": "subscribe", "params": { "stream": "v1.trade", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -3725,7 +3725,7 @@ STREAM: v1.trade "method": "unsubscribe", "params": { "stream": "v1.trade", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -3755,7 +3755,7 @@ STREAM: v1.trade "m": "subscribe", "p": { "s": "v1.trade", - "s1": ["BTC_USDT_Perp@500"], + "s1": ["BTC_USDT_Perp@500"] }, "i": 123 } @@ -3770,7 +3770,7 @@ STREAM: v1.trade "m": "unsubscribe", "p": { "s": "v1.trade", - "s1": ["BTC_USDT_Perp@500"], + "s1": ["BTC_USDT_Perp@500"] }, "i": 123 } @@ -3801,7 +3801,7 @@ STREAM: v1.trade "method": "subscribe", "params": { "stream": "v1.trade", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -3816,7 +3816,7 @@ STREAM: v1.trade "method": "unsubscribe", "params": { "stream": "v1.trade", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -3846,7 +3846,7 @@ STREAM: v1.trade "m": "subscribe", "p": { "s": "v1.trade", - "s1": ["BTC_USDT_Perp@500"], + "s1": ["BTC_USDT_Perp@500"] }, "i": 123 } @@ -3861,7 +3861,7 @@ STREAM: v1.trade "m": "unsubscribe", "p": { "s": "v1.trade", - "s1": ["BTC_USDT_Perp@500"], + "s1": ["BTC_USDT_Perp@500"] }, "i": 123 } @@ -3892,7 +3892,7 @@ STREAM: v1.trade "method": "subscribe", "params": { "stream": "v1.trade", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -3907,7 +3907,7 @@ STREAM: v1.trade "method": "unsubscribe", "params": { "stream": "v1.trade", - "selectors": ["BTC_USDT_Perp@500"], + "selectors": ["BTC_USDT_Perp@500"] }, "id": 123 } @@ -3937,7 +3937,7 @@ STREAM: v1.trade "m": "subscribe", "p": { "s": "v1.trade", - "s1": ["BTC_USDT_Perp@500"], + "s1": ["BTC_USDT_Perp@500"] }, "i": 123 } @@ -3952,7 +3952,7 @@ STREAM: v1.trade "m": "unsubscribe", "p": { "s": "v1.trade", - "s1": ["BTC_USDT_Perp@500"], + "s1": ["BTC_USDT_Perp@500"] }, "i": 123 } @@ -4001,7 +4001,7 @@ STREAM: v1.candle "method": "subscribe", "params": { "stream": "v1.candle", - "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"], + "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"] }, "id": 123 } @@ -4015,7 +4015,7 @@ STREAM: v1.candle "subs": ["BTC_USDT_Perp@CI_1_M-TRADE"], "unsubs": [], "num_snapshots": [10], - "first_sequence_number": [872634876], + "first_sequence_number": [872634876] }, "id": 123, "method": "subscribe" @@ -4029,7 +4029,7 @@ STREAM: v1.candle "method": "unsubscribe", "params": { "stream": "v1.candle", - "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"], + "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"] }, "id": 123 } @@ -4092,7 +4092,7 @@ STREAM: v1.candle "volume_q": "123456.78", "trades": 123456, "instrument": "BTC_USDT_Perp" - }, + } } ``` **Lite Feed Response** @@ -4112,7 +4112,7 @@ STREAM: v1.candle "vq": "123456.78", "t": 123456, "i": "BTC_USDT_Perp" - }, + } } ```
@@ -4177,7 +4177,7 @@ STREAM: v1.candle "method": "subscribe", "params": { "stream": "v1.candle", - "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"], + "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"] }, "id": 123 } @@ -4192,7 +4192,7 @@ STREAM: v1.candle "method": "unsubscribe", "params": { "stream": "v1.candle", - "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"], + "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"] }, "id": 123 } @@ -4222,7 +4222,7 @@ STREAM: v1.candle "m": "subscribe", "p": { "s": "v1.candle", - "s1": ["BTC_USDT_Perp@CI_1_M-TRADE"], + "s1": ["BTC_USDT_Perp@CI_1_M-TRADE"] }, "i": 123 } @@ -4237,7 +4237,7 @@ STREAM: v1.candle "m": "unsubscribe", "p": { "s": "v1.candle", - "s1": ["BTC_USDT_Perp@CI_1_M-TRADE"], + "s1": ["BTC_USDT_Perp@CI_1_M-TRADE"] }, "i": 123 } @@ -4268,7 +4268,7 @@ STREAM: v1.candle "method": "subscribe", "params": { "stream": "v1.candle", - "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"], + "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"] }, "id": 123 } @@ -4283,7 +4283,7 @@ STREAM: v1.candle "method": "unsubscribe", "params": { "stream": "v1.candle", - "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"], + "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"] }, "id": 123 } @@ -4313,7 +4313,7 @@ STREAM: v1.candle "m": "subscribe", "p": { "s": "v1.candle", - "s1": ["BTC_USDT_Perp@CI_1_M-TRADE"], + "s1": ["BTC_USDT_Perp@CI_1_M-TRADE"] }, "i": 123 } @@ -4328,7 +4328,7 @@ STREAM: v1.candle "m": "unsubscribe", "p": { "s": "v1.candle", - "s1": ["BTC_USDT_Perp@CI_1_M-TRADE"], + "s1": ["BTC_USDT_Perp@CI_1_M-TRADE"] }, "i": 123 } @@ -4359,7 +4359,7 @@ STREAM: v1.candle "method": "subscribe", "params": { "stream": "v1.candle", - "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"], + "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"] }, "id": 123 } @@ -4374,7 +4374,7 @@ STREAM: v1.candle "method": "unsubscribe", "params": { "stream": "v1.candle", - "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"], + "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"] }, "id": 123 } @@ -4404,7 +4404,7 @@ STREAM: v1.candle "m": "subscribe", "p": { "s": "v1.candle", - "s1": ["BTC_USDT_Perp@CI_1_M-TRADE"], + "s1": ["BTC_USDT_Perp@CI_1_M-TRADE"] }, "i": 123 } @@ -4419,7 +4419,7 @@ STREAM: v1.candle "m": "unsubscribe", "p": { "s": "v1.candle", - "s1": ["BTC_USDT_Perp@CI_1_M-TRADE"], + "s1": ["BTC_USDT_Perp@CI_1_M-TRADE"] }, "i": 123 } @@ -4450,7 +4450,7 @@ STREAM: v1.candle "method": "subscribe", "params": { "stream": "v1.candle", - "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"], + "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"] }, "id": 123 } @@ -4465,7 +4465,7 @@ STREAM: v1.candle "method": "unsubscribe", "params": { "stream": "v1.candle", - "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"], + "selectors": ["BTC_USDT_Perp@CI_1_M-TRADE"] }, "id": 123 } @@ -4495,7 +4495,7 @@ STREAM: v1.candle "m": "subscribe", "p": { "s": "v1.candle", - "s1": ["BTC_USDT_Perp@CI_1_M-TRADE"], + "s1": ["BTC_USDT_Perp@CI_1_M-TRADE"] }, "i": 123 } @@ -4510,7 +4510,7 @@ STREAM: v1.candle "m": "unsubscribe", "p": { "s": "v1.candle", - "s1": ["BTC_USDT_Perp@CI_1_M-TRADE"], + "s1": ["BTC_USDT_Perp@CI_1_M-TRADE"] }, "i": 123 } diff --git a/artifacts/apidocs/trading_api.md b/artifacts/apidocs/trading_api.md index 133af30..7d45758 100644 --- a/artifacts/apidocs/trading_api.md +++ b/artifacts/apidocs/trading_api.md @@ -36,10 +36,10 @@ LITE ENDPOINT: lite/v1/create_order "v": 28, "expiration": "1697788800000000000", "nonce": 1234567890 - }, + } "metadata": { "client_order_id": "23042", - "create_time": "1697788800000000000", + "create_time": "1697788800000000000" } } } @@ -66,10 +66,10 @@ LITE ENDPOINT: lite/v1/create_order "v": 28, "e": "1697788800000000000", "n": 1234567890 - }, + } "m": { "co": "23042", - "ct": "1697788800000000000", + "ct": "1697788800000000000" } } } @@ -107,7 +107,7 @@ LITE ENDPOINT: lite/v1/create_order }, "metadata": { "client_order_id": "23042", - "create_time": "1697788800000000000", + "create_time": "1697788800000000000" }, "state": { "status": "PENDING", @@ -146,7 +146,7 @@ LITE ENDPOINT: lite/v1/create_order }, "m": { "co": "23042", - "ct": "1697788800000000000", + "ct": "1697788800000000000" }, "s1": { "s": "PENDING", @@ -262,10 +262,10 @@ LITE ENDPOINT: lite/v1/create_order "v": 28, "expiration": "1697788800000000000", "nonce": 1234567890 - }, + } "metadata": { "client_order_id": "23042", - "create_time": "1697788800000000000", + "create_time": "1697788800000000000" } } } @@ -300,10 +300,10 @@ LITE ENDPOINT: lite/v1/create_order "v": 28, "expiration": "1697788800000000000", "nonce": 1234567890 - }, + } "metadata": { "client_order_id": "23042", - "create_time": "1697788800000000000", + "create_time": "1697788800000000000" } } }, @@ -338,10 +338,10 @@ LITE ENDPOINT: lite/v1/create_order "v": 28, "e": "1697788800000000000", "n": 1234567890 - }, + } "m": { "co": "23042", - "ct": "1697788800000000000", + "ct": "1697788800000000000" } } } @@ -376,10 +376,10 @@ LITE ENDPOINT: lite/v1/create_order "v": 28, "e": "1697788800000000000", "n": 1234567890 - }, + } "m": { "co": "23042", - "ct": "1697788800000000000", + "ct": "1697788800000000000" } } }, @@ -415,10 +415,10 @@ LITE ENDPOINT: lite/v1/create_order "v": 28, "expiration": "1697788800000000000", "nonce": 1234567890 - }, + } "metadata": { "client_order_id": "23042", - "create_time": "1697788800000000000", + "create_time": "1697788800000000000" } } } @@ -453,10 +453,10 @@ LITE ENDPOINT: lite/v1/create_order "v": 28, "expiration": "1697788800000000000", "nonce": 1234567890 - }, + } "metadata": { "client_order_id": "23042", - "create_time": "1697788800000000000", + "create_time": "1697788800000000000" } } }, @@ -491,10 +491,10 @@ LITE ENDPOINT: lite/v1/create_order "v": 28, "e": "1697788800000000000", "n": 1234567890 - }, + } "m": { "co": "23042", - "ct": "1697788800000000000", + "ct": "1697788800000000000" } } } @@ -529,10 +529,10 @@ LITE ENDPOINT: lite/v1/create_order "v": 28, "e": "1697788800000000000", "n": 1234567890 - }, + } "m": { "co": "23042", - "ct": "1697788800000000000", + "ct": "1697788800000000000" } } }, @@ -568,10 +568,10 @@ LITE ENDPOINT: lite/v1/create_order "v": 28, "expiration": "1697788800000000000", "nonce": 1234567890 - }, + } "metadata": { "client_order_id": "23042", - "create_time": "1697788800000000000", + "create_time": "1697788800000000000" } } } @@ -606,10 +606,10 @@ LITE ENDPOINT: lite/v1/create_order "v": 28, "expiration": "1697788800000000000", "nonce": 1234567890 - }, + } "metadata": { "client_order_id": "23042", - "create_time": "1697788800000000000", + "create_time": "1697788800000000000" } } }, @@ -644,10 +644,10 @@ LITE ENDPOINT: lite/v1/create_order "v": 28, "e": "1697788800000000000", "n": 1234567890 - }, + } "m": { "co": "23042", - "ct": "1697788800000000000", + "ct": "1697788800000000000" } } } @@ -682,10 +682,10 @@ LITE ENDPOINT: lite/v1/create_order "v": 28, "e": "1697788800000000000", "n": 1234567890 - }, + } "m": { "co": "23042", - "ct": "1697788800000000000", + "ct": "1697788800000000000" } } }, @@ -721,10 +721,10 @@ LITE ENDPOINT: lite/v1/create_order "v": 28, "expiration": "1697788800000000000", "nonce": 1234567890 - }, + } "metadata": { "client_order_id": "23042", - "create_time": "1697788800000000000", + "create_time": "1697788800000000000" } } } @@ -759,10 +759,10 @@ LITE ENDPOINT: lite/v1/create_order "v": 28, "expiration": "1697788800000000000", "nonce": 1234567890 - }, + } "metadata": { "client_order_id": "23042", - "create_time": "1697788800000000000", + "create_time": "1697788800000000000" } } }, @@ -797,10 +797,10 @@ LITE ENDPOINT: lite/v1/create_order "v": 28, "e": "1697788800000000000", "n": 1234567890 - }, + } "m": { "co": "23042", - "ct": "1697788800000000000", + "ct": "1697788800000000000" } } } @@ -835,10 +835,10 @@ LITE ENDPOINT: lite/v1/create_order "v": 28, "e": "1697788800000000000", "n": 1234567890 - }, + } "m": { "co": "23042", - "ct": "1697788800000000000", + "ct": "1697788800000000000" } } }, @@ -1644,7 +1644,7 @@ LITE ENDPOINT: lite/v1/order }, "metadata": { "client_order_id": "23042", - "create_time": "1697788800000000000", + "create_time": "1697788800000000000" }, "state": { "status": "PENDING", @@ -1683,7 +1683,7 @@ LITE ENDPOINT: lite/v1/order }, "m": { "co": "23042", - "ct": "1697788800000000000", + "ct": "1697788800000000000" }, "s1": { "s": "PENDING", @@ -2058,7 +2058,7 @@ LITE ENDPOINT: lite/v1/open_orders }, "metadata": { "client_order_id": "23042", - "create_time": "1697788800000000000", + "create_time": "1697788800000000000" }, "state": { "status": "PENDING", @@ -2097,7 +2097,7 @@ LITE ENDPOINT: lite/v1/open_orders }, "m": { "co": "23042", - "ct": "1697788800000000000", + "ct": "1697788800000000000" }, "s1": { "s": "PENDING", @@ -2494,7 +2494,7 @@ LITE ENDPOINT: lite/v1/order_history }, "metadata": { "client_order_id": "23042", - "create_time": "1697788800000000000", + "create_time": "1697788800000000000" }, "state": { "status": "PENDING", @@ -2534,7 +2534,7 @@ LITE ENDPOINT: lite/v1/order_history }, "m": { "co": "23042", - "ct": "1697788800000000000", + "ct": "1697788800000000000" }, "s1": { "s": "PENDING", @@ -2964,7 +2964,7 @@ LITE ENDPOINT: lite/v1/pre_order_check }, "metadata": { "client_order_id": "23042", - "create_time": "1697788800000000000", + "create_time": "1697788800000000000" }, "state": { "status": "PENDING", @@ -3004,7 +3004,7 @@ LITE ENDPOINT: lite/v1/pre_order_check }, "m": { "co": "23042", - "ct": "1697788800000000000", + "ct": "1697788800000000000" }, "s1": { "s": "PENDING", @@ -3124,7 +3124,7 @@ LITE ENDPOINT: lite/v1/pre_order_check }, "metadata": { "client_order_id": "23042", - "create_time": "1697788800000000000", + "create_time": "1697788800000000000" }, "state": { "status": "PENDING", @@ -3172,7 +3172,7 @@ LITE ENDPOINT: lite/v1/pre_order_check }, "metadata": { "client_order_id": "23042", - "create_time": "1697788800000000000", + "create_time": "1697788800000000000" }, "state": { "status": "PENDING", @@ -3220,7 +3220,7 @@ LITE ENDPOINT: lite/v1/pre_order_check }, "m": { "co": "23042", - "ct": "1697788800000000000", + "ct": "1697788800000000000" }, "s1": { "s": "PENDING", @@ -3268,7 +3268,7 @@ LITE ENDPOINT: lite/v1/pre_order_check }, "m": { "co": "23042", - "ct": "1697788800000000000", + "ct": "1697788800000000000" }, "s1": { "s": "PENDING", @@ -3317,7 +3317,7 @@ LITE ENDPOINT: lite/v1/pre_order_check }, "metadata": { "client_order_id": "23042", - "create_time": "1697788800000000000", + "create_time": "1697788800000000000" }, "state": { "status": "PENDING", @@ -3365,7 +3365,7 @@ LITE ENDPOINT: lite/v1/pre_order_check }, "metadata": { "client_order_id": "23042", - "create_time": "1697788800000000000", + "create_time": "1697788800000000000" }, "state": { "status": "PENDING", @@ -3413,7 +3413,7 @@ LITE ENDPOINT: lite/v1/pre_order_check }, "m": { "co": "23042", - "ct": "1697788800000000000", + "ct": "1697788800000000000" }, "s1": { "s": "PENDING", @@ -3461,7 +3461,7 @@ LITE ENDPOINT: lite/v1/pre_order_check }, "m": { "co": "23042", - "ct": "1697788800000000000", + "ct": "1697788800000000000" }, "s1": { "s": "PENDING", @@ -3510,7 +3510,7 @@ LITE ENDPOINT: lite/v1/pre_order_check }, "metadata": { "client_order_id": "23042", - "create_time": "1697788800000000000", + "create_time": "1697788800000000000" }, "state": { "status": "PENDING", @@ -3558,7 +3558,7 @@ LITE ENDPOINT: lite/v1/pre_order_check }, "metadata": { "client_order_id": "23042", - "create_time": "1697788800000000000", + "create_time": "1697788800000000000" }, "state": { "status": "PENDING", @@ -3606,7 +3606,7 @@ LITE ENDPOINT: lite/v1/pre_order_check }, "m": { "co": "23042", - "ct": "1697788800000000000", + "ct": "1697788800000000000" }, "s1": { "s": "PENDING", @@ -3654,7 +3654,7 @@ LITE ENDPOINT: lite/v1/pre_order_check }, "m": { "co": "23042", - "ct": "1697788800000000000", + "ct": "1697788800000000000" }, "s1": { "s": "PENDING", @@ -3703,7 +3703,7 @@ LITE ENDPOINT: lite/v1/pre_order_check }, "metadata": { "client_order_id": "23042", - "create_time": "1697788800000000000", + "create_time": "1697788800000000000" }, "state": { "status": "PENDING", @@ -3751,7 +3751,7 @@ LITE ENDPOINT: lite/v1/pre_order_check }, "metadata": { "client_order_id": "23042", - "create_time": "1697788800000000000", + "create_time": "1697788800000000000" }, "state": { "status": "PENDING", @@ -3799,7 +3799,7 @@ LITE ENDPOINT: lite/v1/pre_order_check }, "m": { "co": "23042", - "ct": "1697788800000000000", + "ct": "1697788800000000000" }, "s1": { "s": "PENDING", @@ -3847,7 +3847,7 @@ LITE ENDPOINT: lite/v1/pre_order_check }, "m": { "co": "23042", - "ct": "1697788800000000000", + "ct": "1697788800000000000" }, "s1": { "s": "PENDING", @@ -4666,7 +4666,7 @@ LITE ENDPOINT: lite/v1/fill_history "order_id": "0x10000101000203040506", "venue": "ORDERBOOK", "client_order_id": "23042", - "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0" }], "next": "Qw0918=" } @@ -4693,7 +4693,7 @@ LITE ENDPOINT: lite/v1/fill_history "oi": "0x10000101000203040506", "v": "ORDERBOOK", "co": "23042", - "s1": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", + "s1": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0" }], "n": "Qw0918=" } diff --git a/artifacts/apidocs/trading_streams.md b/artifacts/apidocs/trading_streams.md index 05c3db7..82a6364 100644 --- a/artifacts/apidocs/trading_streams.md +++ b/artifacts/apidocs/trading_streams.md @@ -28,7 +28,7 @@ STREAM: v1.order "method": "subscribe", "params": { "stream": "v1.order", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "id": 123 } @@ -42,7 +42,7 @@ STREAM: v1.order "subs": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], "unsubs": [], "num_snapshots": [10], - "first_sequence_number": [872634876], + "first_sequence_number": [872634876] }, "id": 123, "method": "subscribe" @@ -56,7 +56,7 @@ STREAM: v1.order "method": "unsubscribe", "params": { "stream": "v1.order", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "id": 123 } @@ -131,7 +131,7 @@ STREAM: v1.order }, "metadata": { "client_order_id": "23042", - "create_time": "1697788800000000000", + "create_time": "1697788800000000000" }, "state": { "status": "PENDING", @@ -141,7 +141,7 @@ STREAM: v1.order "update_time": "1697788800000000000", "avg_fill_price": ["60000.4"] } - }, + } } ``` **Lite Feed Response** @@ -173,7 +173,7 @@ STREAM: v1.order }, "m": { "co": "23042", - "ct": "1697788800000000000", + "ct": "1697788800000000000" }, "s1": { "s": "PENDING", @@ -183,7 +183,7 @@ STREAM: v1.order "ut": "1697788800000000000", "af": ["60000.4"] } - }, + } } ```
@@ -253,7 +253,7 @@ STREAM: v1.order "method": "subscribe", "params": { "stream": "v1.order", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "id": 123 } @@ -270,7 +270,7 @@ STREAM: v1.order "method": "unsubscribe", "params": { "stream": "v1.order", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "id": 123 } @@ -304,7 +304,7 @@ STREAM: v1.order "m": "subscribe", "p": { "s": "v1.order", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "i": 123 } @@ -321,7 +321,7 @@ STREAM: v1.order "m": "unsubscribe", "p": { "s": "v1.order", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "i": 123 } @@ -356,7 +356,7 @@ STREAM: v1.order "method": "subscribe", "params": { "stream": "v1.order", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "id": 123 } @@ -373,7 +373,7 @@ STREAM: v1.order "method": "unsubscribe", "params": { "stream": "v1.order", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "id": 123 } @@ -407,7 +407,7 @@ STREAM: v1.order "m": "subscribe", "p": { "s": "v1.order", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "i": 123 } @@ -424,7 +424,7 @@ STREAM: v1.order "m": "unsubscribe", "p": { "s": "v1.order", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "i": 123 } @@ -459,7 +459,7 @@ STREAM: v1.order "method": "subscribe", "params": { "stream": "v1.order", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "id": 123 } @@ -476,7 +476,7 @@ STREAM: v1.order "method": "unsubscribe", "params": { "stream": "v1.order", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "id": 123 } @@ -510,7 +510,7 @@ STREAM: v1.order "m": "subscribe", "p": { "s": "v1.order", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "i": 123 } @@ -527,7 +527,7 @@ STREAM: v1.order "m": "unsubscribe", "p": { "s": "v1.order", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "i": 123 } @@ -562,7 +562,7 @@ STREAM: v1.order "method": "subscribe", "params": { "stream": "v1.order", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "id": 123 } @@ -579,7 +579,7 @@ STREAM: v1.order "method": "unsubscribe", "params": { "stream": "v1.order", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "id": 123 } @@ -613,7 +613,7 @@ STREAM: v1.order "m": "subscribe", "p": { "s": "v1.order", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "i": 123 } @@ -630,7 +630,7 @@ STREAM: v1.order "m": "unsubscribe", "p": { "s": "v1.order", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "i": 123 } @@ -680,7 +680,7 @@ STREAM: v1.state "method": "subscribe", "params": { "stream": "v1.state", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "id": 123 } @@ -694,7 +694,7 @@ STREAM: v1.state "subs": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], "unsubs": [], "num_snapshots": [10], - "first_sequence_number": [872634876], + "first_sequence_number": [872634876] }, "id": 123, "method": "subscribe" @@ -708,7 +708,7 @@ STREAM: v1.state "method": "unsubscribe", "params": { "stream": "v1.state", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "id": 123 } @@ -771,7 +771,7 @@ STREAM: v1.state "update_time": "1697788800000000000", "avg_fill_price": ["60000.4"] } - }, + } } ``` **Lite Feed Response** @@ -791,7 +791,7 @@ STREAM: v1.state "ut": "1697788800000000000", "af": ["60000.4"] } - }, + } } ```
@@ -861,7 +861,7 @@ STREAM: v1.state "method": "subscribe", "params": { "stream": "v1.state", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "id": 123 } @@ -878,7 +878,7 @@ STREAM: v1.state "method": "unsubscribe", "params": { "stream": "v1.state", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "id": 123 } @@ -912,7 +912,7 @@ STREAM: v1.state "m": "subscribe", "p": { "s": "v1.state", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "i": 123 } @@ -929,7 +929,7 @@ STREAM: v1.state "m": "unsubscribe", "p": { "s": "v1.state", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "i": 123 } @@ -964,7 +964,7 @@ STREAM: v1.state "method": "subscribe", "params": { "stream": "v1.state", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "id": 123 } @@ -981,7 +981,7 @@ STREAM: v1.state "method": "unsubscribe", "params": { "stream": "v1.state", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "id": 123 } @@ -1015,7 +1015,7 @@ STREAM: v1.state "m": "subscribe", "p": { "s": "v1.state", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "i": 123 } @@ -1032,7 +1032,7 @@ STREAM: v1.state "m": "unsubscribe", "p": { "s": "v1.state", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "i": 123 } @@ -1067,7 +1067,7 @@ STREAM: v1.state "method": "subscribe", "params": { "stream": "v1.state", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "id": 123 } @@ -1084,7 +1084,7 @@ STREAM: v1.state "method": "unsubscribe", "params": { "stream": "v1.state", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "id": 123 } @@ -1118,7 +1118,7 @@ STREAM: v1.state "m": "subscribe", "p": { "s": "v1.state", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "i": 123 } @@ -1135,7 +1135,7 @@ STREAM: v1.state "m": "unsubscribe", "p": { "s": "v1.state", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "i": 123 } @@ -1170,7 +1170,7 @@ STREAM: v1.state "method": "subscribe", "params": { "stream": "v1.state", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "id": 123 } @@ -1187,7 +1187,7 @@ STREAM: v1.state "method": "unsubscribe", "params": { "stream": "v1.state", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "id": 123 } @@ -1221,7 +1221,7 @@ STREAM: v1.state "m": "subscribe", "p": { "s": "v1.state", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "i": 123 } @@ -1238,7 +1238,7 @@ STREAM: v1.state "m": "unsubscribe", "p": { "s": "v1.state", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "i": 123 } @@ -1288,7 +1288,7 @@ STREAM: v1.cancel "method": "subscribe", "params": { "stream": "v1.cancel", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"] }, "id": 123 } @@ -1302,7 +1302,7 @@ STREAM: v1.cancel "subs": ["'$GRVT_SUB_ACCOUNT_ID'"], "unsubs": [], "num_snapshots": [10], - "first_sequence_number": [872634876], + "first_sequence_number": [872634876] }, "id": 123, "method": "subscribe" @@ -1316,7 +1316,7 @@ STREAM: v1.cancel "method": "unsubscribe", "params": { "stream": "v1.cancel", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"] }, "id": 123 } @@ -1375,7 +1375,7 @@ STREAM: v1.cancel "reason": "UNSPECIFIED", "update_time": "1697788800000000000", "cancel_status": "EXPIRED" - }, + } } ``` **Lite Feed Response** @@ -1391,7 +1391,7 @@ STREAM: v1.cancel "r": "UNSPECIFIED", "ut": "1697788800000000000", "cs": "EXPIRED" - }, + } } ```
@@ -1461,7 +1461,7 @@ STREAM: v1.cancel "method": "subscribe", "params": { "stream": "v1.cancel", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"] }, "id": 123 } @@ -1478,7 +1478,7 @@ STREAM: v1.cancel "method": "unsubscribe", "params": { "stream": "v1.cancel", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"] }, "id": 123 } @@ -1512,7 +1512,7 @@ STREAM: v1.cancel "m": "subscribe", "p": { "s": "v1.cancel", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'"], + "s1": ["'$GRVT_SUB_ACCOUNT_ID'"] }, "i": 123 } @@ -1529,7 +1529,7 @@ STREAM: v1.cancel "m": "unsubscribe", "p": { "s": "v1.cancel", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'"], + "s1": ["'$GRVT_SUB_ACCOUNT_ID'"] }, "i": 123 } @@ -1564,7 +1564,7 @@ STREAM: v1.cancel "method": "subscribe", "params": { "stream": "v1.cancel", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"] }, "id": 123 } @@ -1581,7 +1581,7 @@ STREAM: v1.cancel "method": "unsubscribe", "params": { "stream": "v1.cancel", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"] }, "id": 123 } @@ -1615,7 +1615,7 @@ STREAM: v1.cancel "m": "subscribe", "p": { "s": "v1.cancel", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'"], + "s1": ["'$GRVT_SUB_ACCOUNT_ID'"] }, "i": 123 } @@ -1632,7 +1632,7 @@ STREAM: v1.cancel "m": "unsubscribe", "p": { "s": "v1.cancel", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'"], + "s1": ["'$GRVT_SUB_ACCOUNT_ID'"] }, "i": 123 } @@ -1667,7 +1667,7 @@ STREAM: v1.cancel "method": "subscribe", "params": { "stream": "v1.cancel", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"] }, "id": 123 } @@ -1684,7 +1684,7 @@ STREAM: v1.cancel "method": "unsubscribe", "params": { "stream": "v1.cancel", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"] }, "id": 123 } @@ -1718,7 +1718,7 @@ STREAM: v1.cancel "m": "subscribe", "p": { "s": "v1.cancel", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'"], + "s1": ["'$GRVT_SUB_ACCOUNT_ID'"] }, "i": 123 } @@ -1735,7 +1735,7 @@ STREAM: v1.cancel "m": "unsubscribe", "p": { "s": "v1.cancel", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'"], + "s1": ["'$GRVT_SUB_ACCOUNT_ID'"] }, "i": 123 } @@ -1770,7 +1770,7 @@ STREAM: v1.cancel "method": "subscribe", "params": { "stream": "v1.cancel", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"] }, "id": 123 } @@ -1787,7 +1787,7 @@ STREAM: v1.cancel "method": "unsubscribe", "params": { "stream": "v1.cancel", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'"] }, "id": 123 } @@ -1821,7 +1821,7 @@ STREAM: v1.cancel "m": "subscribe", "p": { "s": "v1.cancel", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'"], + "s1": ["'$GRVT_SUB_ACCOUNT_ID'"] }, "i": 123 } @@ -1838,7 +1838,7 @@ STREAM: v1.cancel "m": "unsubscribe", "p": { "s": "v1.cancel", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'"], + "s1": ["'$GRVT_SUB_ACCOUNT_ID'"] }, "i": 123 } @@ -1889,7 +1889,7 @@ STREAM: v1.fill "method": "subscribe", "params": { "stream": "v1.fill", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "id": 123 } @@ -1903,7 +1903,7 @@ STREAM: v1.fill "subs": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], "unsubs": [], "num_snapshots": [10], - "first_sequence_number": [872634876], + "first_sequence_number": [872634876] }, "id": 123, "method": "subscribe" @@ -1917,7 +1917,7 @@ STREAM: v1.fill "method": "unsubscribe", "params": { "stream": "v1.fill", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "id": 123 } @@ -1988,8 +1988,8 @@ STREAM: v1.fill "order_id": "0x10000101000203040506", "venue": "ORDERBOOK", "client_order_id": "23042", - "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - }, + "signer": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0" + } } ``` **Lite Feed Response** @@ -2017,8 +2017,8 @@ STREAM: v1.fill "oi": "0x10000101000203040506", "v": "ORDERBOOK", "co": "23042", - "s1": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", - }, + "s1": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0" + } } ```
@@ -2088,7 +2088,7 @@ STREAM: v1.fill "method": "subscribe", "params": { "stream": "v1.fill", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "id": 123 } @@ -2105,7 +2105,7 @@ STREAM: v1.fill "method": "unsubscribe", "params": { "stream": "v1.fill", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "id": 123 } @@ -2139,7 +2139,7 @@ STREAM: v1.fill "m": "subscribe", "p": { "s": "v1.fill", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "i": 123 } @@ -2156,7 +2156,7 @@ STREAM: v1.fill "m": "unsubscribe", "p": { "s": "v1.fill", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "i": 123 } @@ -2191,7 +2191,7 @@ STREAM: v1.fill "method": "subscribe", "params": { "stream": "v1.fill", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "id": 123 } @@ -2208,7 +2208,7 @@ STREAM: v1.fill "method": "unsubscribe", "params": { "stream": "v1.fill", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "id": 123 } @@ -2242,7 +2242,7 @@ STREAM: v1.fill "m": "subscribe", "p": { "s": "v1.fill", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "i": 123 } @@ -2259,7 +2259,7 @@ STREAM: v1.fill "m": "unsubscribe", "p": { "s": "v1.fill", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "i": 123 } @@ -2294,7 +2294,7 @@ STREAM: v1.fill "method": "subscribe", "params": { "stream": "v1.fill", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "id": 123 } @@ -2311,7 +2311,7 @@ STREAM: v1.fill "method": "unsubscribe", "params": { "stream": "v1.fill", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "id": 123 } @@ -2345,7 +2345,7 @@ STREAM: v1.fill "m": "subscribe", "p": { "s": "v1.fill", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "i": 123 } @@ -2362,7 +2362,7 @@ STREAM: v1.fill "m": "unsubscribe", "p": { "s": "v1.fill", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "i": 123 } @@ -2397,7 +2397,7 @@ STREAM: v1.fill "method": "subscribe", "params": { "stream": "v1.fill", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "id": 123 } @@ -2414,7 +2414,7 @@ STREAM: v1.fill "method": "unsubscribe", "params": { "stream": "v1.fill", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "id": 123 } @@ -2448,7 +2448,7 @@ STREAM: v1.fill "m": "subscribe", "p": { "s": "v1.fill", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "i": 123 } @@ -2465,7 +2465,7 @@ STREAM: v1.fill "m": "unsubscribe", "p": { "s": "v1.fill", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "i": 123 } @@ -2515,7 +2515,7 @@ STREAM: v1.position "method": "subscribe", "params": { "stream": "v1.position", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "id": 123 } @@ -2529,7 +2529,7 @@ STREAM: v1.position "subs": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], "unsubs": [], "num_snapshots": [10], - "first_sequence_number": [872634876], + "first_sequence_number": [872634876] }, "id": 123, "method": "subscribe" @@ -2543,7 +2543,7 @@ STREAM: v1.position "method": "unsubscribe", "params": { "stream": "v1.position", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "id": 123 } @@ -2610,7 +2610,7 @@ STREAM: v1.position "roi": "10.20", "quote_index_price": "1.0000102", "est_liquidation_price": 60000.25 - }, + } } ``` **Lite Feed Response** @@ -2634,7 +2634,7 @@ STREAM: v1.position "r": "10.20", "qi": "1.0000102", "el": 60000.25 - }, + } } ```
@@ -2704,7 +2704,7 @@ STREAM: v1.position "method": "subscribe", "params": { "stream": "v1.position", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "id": 123 } @@ -2721,7 +2721,7 @@ STREAM: v1.position "method": "unsubscribe", "params": { "stream": "v1.position", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "id": 123 } @@ -2755,7 +2755,7 @@ STREAM: v1.position "m": "subscribe", "p": { "s": "v1.position", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "i": 123 } @@ -2772,7 +2772,7 @@ STREAM: v1.position "m": "unsubscribe", "p": { "s": "v1.position", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "i": 123 } @@ -2807,7 +2807,7 @@ STREAM: v1.position "method": "subscribe", "params": { "stream": "v1.position", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "id": 123 } @@ -2824,7 +2824,7 @@ STREAM: v1.position "method": "unsubscribe", "params": { "stream": "v1.position", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "id": 123 } @@ -2858,7 +2858,7 @@ STREAM: v1.position "m": "subscribe", "p": { "s": "v1.position", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "i": 123 } @@ -2875,7 +2875,7 @@ STREAM: v1.position "m": "unsubscribe", "p": { "s": "v1.position", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "i": 123 } @@ -2910,7 +2910,7 @@ STREAM: v1.position "method": "subscribe", "params": { "stream": "v1.position", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "id": 123 } @@ -2927,7 +2927,7 @@ STREAM: v1.position "method": "unsubscribe", "params": { "stream": "v1.position", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "id": 123 } @@ -2961,7 +2961,7 @@ STREAM: v1.position "m": "subscribe", "p": { "s": "v1.position", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "i": 123 } @@ -2978,7 +2978,7 @@ STREAM: v1.position "m": "unsubscribe", "p": { "s": "v1.position", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "i": 123 } @@ -3013,7 +3013,7 @@ STREAM: v1.position "method": "subscribe", "params": { "stream": "v1.position", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "id": 123 } @@ -3030,7 +3030,7 @@ STREAM: v1.position "method": "unsubscribe", "params": { "stream": "v1.position", - "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "selectors": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "id": 123 } @@ -3064,7 +3064,7 @@ STREAM: v1.position "m": "subscribe", "p": { "s": "v1.position", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "i": 123 } @@ -3081,7 +3081,7 @@ STREAM: v1.position "m": "unsubscribe", "p": { "s": "v1.position", - "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"], + "s1": ["'$GRVT_SUB_ACCOUNT_ID'-BTC_USDT_Perp"] }, "i": 123 } @@ -3132,7 +3132,7 @@ STREAM: v1.deposit "method": "subscribe", "params": { "stream": "v1.deposit", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"] }, "id": 123 } @@ -3146,7 +3146,7 @@ STREAM: v1.deposit "subs": ["'$GRVT_MAIN_ACCOUNT_ID'"], "unsubs": [], "num_snapshots": [10], - "first_sequence_number": [872634876], + "first_sequence_number": [872634876] }, "id": 123, "method": "subscribe" @@ -3160,7 +3160,7 @@ STREAM: v1.deposit "method": "unsubscribe", "params": { "stream": "v1.deposit", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"] }, "id": 123 } @@ -3217,7 +3217,7 @@ STREAM: v1.deposit "to_account_id": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", "currency": "USDT", "num_tokens": "10.50" - }, + } } ``` **Lite Feed Response** @@ -3231,7 +3231,7 @@ STREAM: v1.deposit "ta": "0xc73c0c2538fd9b833d20933ccc88fdaa74fcb0d0", "c": "USDT", "nt": "10.50" - }, + } } ```
@@ -3297,7 +3297,7 @@ STREAM: v1.deposit "method": "subscribe", "params": { "stream": "v1.deposit", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"] }, "id": 123 } @@ -3314,7 +3314,7 @@ STREAM: v1.deposit "method": "unsubscribe", "params": { "stream": "v1.deposit", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"] }, "id": 123 } @@ -3348,7 +3348,7 @@ STREAM: v1.deposit "m": "subscribe", "p": { "s": "v1.deposit", - "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"] }, "i": 123 } @@ -3365,7 +3365,7 @@ STREAM: v1.deposit "m": "unsubscribe", "p": { "s": "v1.deposit", - "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"] }, "i": 123 } @@ -3400,7 +3400,7 @@ STREAM: v1.deposit "method": "subscribe", "params": { "stream": "v1.deposit", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"] }, "id": 123 } @@ -3417,7 +3417,7 @@ STREAM: v1.deposit "method": "unsubscribe", "params": { "stream": "v1.deposit", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"] }, "id": 123 } @@ -3451,7 +3451,7 @@ STREAM: v1.deposit "m": "subscribe", "p": { "s": "v1.deposit", - "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"] }, "i": 123 } @@ -3468,7 +3468,7 @@ STREAM: v1.deposit "m": "unsubscribe", "p": { "s": "v1.deposit", - "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"] }, "i": 123 } @@ -3503,7 +3503,7 @@ STREAM: v1.deposit "method": "subscribe", "params": { "stream": "v1.deposit", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"] }, "id": 123 } @@ -3520,7 +3520,7 @@ STREAM: v1.deposit "method": "unsubscribe", "params": { "stream": "v1.deposit", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"] }, "id": 123 } @@ -3554,7 +3554,7 @@ STREAM: v1.deposit "m": "subscribe", "p": { "s": "v1.deposit", - "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"] }, "i": 123 } @@ -3571,7 +3571,7 @@ STREAM: v1.deposit "m": "unsubscribe", "p": { "s": "v1.deposit", - "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"] }, "i": 123 } @@ -3606,7 +3606,7 @@ STREAM: v1.deposit "method": "subscribe", "params": { "stream": "v1.deposit", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"] }, "id": 123 } @@ -3623,7 +3623,7 @@ STREAM: v1.deposit "method": "unsubscribe", "params": { "stream": "v1.deposit", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"] }, "id": 123 } @@ -3657,7 +3657,7 @@ STREAM: v1.deposit "m": "subscribe", "p": { "s": "v1.deposit", - "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"] }, "i": 123 } @@ -3674,7 +3674,7 @@ STREAM: v1.deposit "m": "unsubscribe", "p": { "s": "v1.deposit", - "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"] }, "i": 123 } @@ -3724,7 +3724,7 @@ STREAM: v1.transfer "method": "subscribe", "params": { "stream": "v1.transfer", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"] }, "id": 123 } @@ -3738,7 +3738,7 @@ STREAM: v1.transfer "subs": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], "unsubs": [], "num_snapshots": [10], - "first_sequence_number": [872634876], + "first_sequence_number": [872634876] }, "id": 123, "method": "subscribe" @@ -3752,7 +3752,7 @@ STREAM: v1.transfer "method": "unsubscribe", "params": { "stream": "v1.transfer", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"] }, "id": 123 } @@ -3823,7 +3823,7 @@ STREAM: v1.transfer "event_time": "1697788800000000000", "transfer_type": "STANDARD", "transfer_metadata": null - }, + } } ``` **Lite Feed Response** @@ -3851,7 +3851,7 @@ STREAM: v1.transfer "et": "1697788800000000000", "tt": "STANDARD", "tm": null - }, + } } ```
@@ -3918,7 +3918,7 @@ STREAM: v1.transfer "method": "subscribe", "params": { "stream": "v1.transfer", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"] }, "id": 123 } @@ -3935,7 +3935,7 @@ STREAM: v1.transfer "method": "unsubscribe", "params": { "stream": "v1.transfer", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"] }, "id": 123 } @@ -3969,7 +3969,7 @@ STREAM: v1.transfer "m": "subscribe", "p": { "s": "v1.transfer", - "s1": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], + "s1": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"] }, "i": 123 } @@ -3986,7 +3986,7 @@ STREAM: v1.transfer "m": "unsubscribe", "p": { "s": "v1.transfer", - "s1": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], + "s1": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"] }, "i": 123 } @@ -4021,7 +4021,7 @@ STREAM: v1.transfer "method": "subscribe", "params": { "stream": "v1.transfer", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"] }, "id": 123 } @@ -4038,7 +4038,7 @@ STREAM: v1.transfer "method": "unsubscribe", "params": { "stream": "v1.transfer", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"] }, "id": 123 } @@ -4072,7 +4072,7 @@ STREAM: v1.transfer "m": "subscribe", "p": { "s": "v1.transfer", - "s1": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], + "s1": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"] }, "i": 123 } @@ -4089,7 +4089,7 @@ STREAM: v1.transfer "m": "unsubscribe", "p": { "s": "v1.transfer", - "s1": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], + "s1": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"] }, "i": 123 } @@ -4124,7 +4124,7 @@ STREAM: v1.transfer "method": "subscribe", "params": { "stream": "v1.transfer", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"] }, "id": 123 } @@ -4141,7 +4141,7 @@ STREAM: v1.transfer "method": "unsubscribe", "params": { "stream": "v1.transfer", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"] }, "id": 123 } @@ -4175,7 +4175,7 @@ STREAM: v1.transfer "m": "subscribe", "p": { "s": "v1.transfer", - "s1": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], + "s1": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"] }, "i": 123 } @@ -4192,7 +4192,7 @@ STREAM: v1.transfer "m": "unsubscribe", "p": { "s": "v1.transfer", - "s1": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], + "s1": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"] }, "i": 123 } @@ -4227,7 +4227,7 @@ STREAM: v1.transfer "method": "subscribe", "params": { "stream": "v1.transfer", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"] }, "id": 123 } @@ -4244,7 +4244,7 @@ STREAM: v1.transfer "method": "unsubscribe", "params": { "stream": "v1.transfer", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"] }, "id": 123 } @@ -4278,7 +4278,7 @@ STREAM: v1.transfer "m": "subscribe", "p": { "s": "v1.transfer", - "s1": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], + "s1": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"] }, "i": 123 } @@ -4295,7 +4295,7 @@ STREAM: v1.transfer "m": "unsubscribe", "p": { "s": "v1.transfer", - "s1": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"], + "s1": ["'$GRVT_MAIN_ACCOUNT_ID'-'$GRVT_SUB_ACCOUNT_ID'"] }, "i": 123 } @@ -4345,7 +4345,7 @@ STREAM: v1.withdrawal "method": "subscribe", "params": { "stream": "v1.withdrawal", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"] }, "id": 123 } @@ -4359,7 +4359,7 @@ STREAM: v1.withdrawal "subs": ["'$GRVT_MAIN_ACCOUNT_ID'"], "unsubs": [], "num_snapshots": [10], - "first_sequence_number": [872634876], + "first_sequence_number": [872634876] }, "id": 123, "method": "subscribe" @@ -4373,7 +4373,7 @@ STREAM: v1.withdrawal "method": "unsubscribe", "params": { "stream": "v1.withdrawal", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"] }, "id": 123 } @@ -4438,7 +4438,7 @@ STREAM: v1.withdrawal "expiration": "1697788800000000000", "nonce": 1234567890 } - }, + } } ``` **Lite Feed Response** @@ -4460,7 +4460,7 @@ STREAM: v1.withdrawal "e": "1697788800000000000", "n": 1234567890 } - }, + } } ```
@@ -4526,7 +4526,7 @@ STREAM: v1.withdrawal "method": "subscribe", "params": { "stream": "v1.withdrawal", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"] }, "id": 123 } @@ -4543,7 +4543,7 @@ STREAM: v1.withdrawal "method": "unsubscribe", "params": { "stream": "v1.withdrawal", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"] }, "id": 123 } @@ -4577,7 +4577,7 @@ STREAM: v1.withdrawal "m": "subscribe", "p": { "s": "v1.withdrawal", - "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"] }, "i": 123 } @@ -4594,7 +4594,7 @@ STREAM: v1.withdrawal "m": "unsubscribe", "p": { "s": "v1.withdrawal", - "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"] }, "i": 123 } @@ -4629,7 +4629,7 @@ STREAM: v1.withdrawal "method": "subscribe", "params": { "stream": "v1.withdrawal", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"] }, "id": 123 } @@ -4646,7 +4646,7 @@ STREAM: v1.withdrawal "method": "unsubscribe", "params": { "stream": "v1.withdrawal", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"] }, "id": 123 } @@ -4680,7 +4680,7 @@ STREAM: v1.withdrawal "m": "subscribe", "p": { "s": "v1.withdrawal", - "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"] }, "i": 123 } @@ -4697,7 +4697,7 @@ STREAM: v1.withdrawal "m": "unsubscribe", "p": { "s": "v1.withdrawal", - "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"] }, "i": 123 } @@ -4732,7 +4732,7 @@ STREAM: v1.withdrawal "method": "subscribe", "params": { "stream": "v1.withdrawal", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"] }, "id": 123 } @@ -4749,7 +4749,7 @@ STREAM: v1.withdrawal "method": "unsubscribe", "params": { "stream": "v1.withdrawal", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"] }, "id": 123 } @@ -4783,7 +4783,7 @@ STREAM: v1.withdrawal "m": "subscribe", "p": { "s": "v1.withdrawal", - "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"] }, "i": 123 } @@ -4800,7 +4800,7 @@ STREAM: v1.withdrawal "m": "unsubscribe", "p": { "s": "v1.withdrawal", - "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"] }, "i": 123 } @@ -4835,7 +4835,7 @@ STREAM: v1.withdrawal "method": "subscribe", "params": { "stream": "v1.withdrawal", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"] }, "id": 123 } @@ -4852,7 +4852,7 @@ STREAM: v1.withdrawal "method": "unsubscribe", "params": { "stream": "v1.withdrawal", - "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "selectors": ["'$GRVT_MAIN_ACCOUNT_ID'"] }, "id": 123 } @@ -4886,7 +4886,7 @@ STREAM: v1.withdrawal "m": "subscribe", "p": { "s": "v1.withdrawal", - "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"] }, "i": 123 } @@ -4903,7 +4903,7 @@ STREAM: v1.withdrawal "m": "unsubscribe", "p": { "s": "v1.withdrawal", - "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"], + "s1": ["'$GRVT_MAIN_ACCOUNT_ID'"] }, "i": 123 } diff --git a/src/codegen/apidocs/apidocs.py b/src/codegen/apidocs/apidocs.py index b153151..83540d4 100644 --- a/src/codegen/apidocs/apidocs.py +++ b/src/codegen/apidocs/apidocs.py @@ -658,6 +658,11 @@ def write_struct_example_with_generics( or field_path + [field.name] in IGNORE_FIELD_PATHS ): fields_skipped += 1 + for i, field in enumerate(struct.fields): + if ( + field.name in IGNORE_FIELDS_ANY_PATH + or field_path + [field.name] in IGNORE_FIELD_PATHS + ): continue fn = field.name if is_full else field.lite_name comma = "," if i < len(struct.fields) - fields_skipped - 1 else "" From 0da709166351422abc7c4210ea97becc0f2f998b Mon Sep 17 00:00:00 2001 From: keithang-grvt Date: Sun, 23 Feb 2025 15:07:51 +0800 Subject: [PATCH 06/11] [RFC] Update API docs and specs --- .../schemas/api_cancel_order_response.md | 30 ---- .../schemas/api_create_order_request.md | 30 ---- .../schemas/api_create_order_response.md | 30 ---- .../schemas/api_dedust_position_request.md | 147 ------------------ .../schemas/api_dedust_position_response.md | 145 ----------------- .../apidocs/schemas/api_get_order_response.md | 30 ---- .../schemas/api_open_orders_response.md | 30 ---- .../schemas/api_order_history_response.md | 30 ---- .../schemas/api_pre_order_check_request.md | 30 ---- artifacts/apidocs/schemas/order.md | 30 ---- artifacts/apidocs/schemas/order_metadata.md | 30 ---- .../apidocs/schemas/trigger_order_metadata.md | 30 ---- .../apidocs/schemas/ws_order_feed_data_v1.md | 30 ---- src/codegen/apidocs/apidocs.py | 17 +- 14 files changed, 11 insertions(+), 628 deletions(-) diff --git a/artifacts/apidocs/schemas/api_cancel_order_response.md b/artifacts/apidocs/schemas/api_cancel_order_response.md index 5221294..b9cf231 100644 --- a/artifacts/apidocs/schemas/api_cancel_order_response.md +++ b/artifacts/apidocs/schemas/api_cancel_order_response.md @@ -55,36 +55,6 @@ |create_time
`ct` |string|False
`0`|[Filled by GRVT Backend] Time at which the order was received by GRVT in unix nanoseconds| |trigger
`t` |TriggerOrderMetadata|True|Trigger fields are used to support any type of trigger order such as TP/SL| |broker
`b` |BrokerTag|False
``|Specifies the broker who brokered the order| - ??? info "[TriggerOrderMetadata](/../../schemas/trigger_order_metadata)" - Contains metadata related to trigger orders, such as Take Profit (TP) or Stop Loss (SL).

Trigger orders are used to automatically execute an order when a predefined price condition is met, allowing traders to implement risk management strategies.


- - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |trigger_type
`tt` |TriggerType|True|Type of the trigger order. eg: Take Profit, Stop Loss, etc| - |tpsl
`t` |TPSLOrderMetadata|True|Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

| - ??? info "[TriggerType](/../../schemas/trigger_type)" - Defines the type of trigger order used in trading, such as Take Profit or Stop Loss.

Trigger orders allow execution based on pre-defined price conditions rather than immediate market conditions.


- - |Value| Description | - |-|-| - |`UNSPECIFIED` = 0|Not a trigger order. The order executes normally without any trigger conditions.| - |`TAKE_PROFIT` = 1|Take Profit Order - Executes when the price reaches a specified level to secure profits.| - |`STOP_LOSS` = 2|Stop Loss Order - Executes when the price reaches a specified level to limit losses.| - ??? info "[TPSLOrderMetadata](/../../schemas/tpsl_order_metadata)" - Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

### Fields:
- **triggerBy**: Defines the price type that activates the order (e.g., index price).
- **triggerPrice**: The price at which the order is triggered, expressed in `9` decimal precision.


- - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |trigger_by
`tb` |TriggerBy|True|Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order| - |trigger_price
`tp` |string|True|The Trigger Price of the order, expressed in `9` decimals.| - ??? info "[TriggerBy](/../../schemas/trigger_by)" - Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order.

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.


- - |Value| Description | - |-|-| - |`UNSPECIFIED` = 0|no trigger condition| - |`INDEX` = 1|INDEX - Order is activated when the index price reaches the trigger price| - |`LAST` = 2|LAST - Order is activated when the last trade price reaches the trigger price| ??? info "[BrokerTag](/../../schemas/broker_tag)" BrokerTag is a tag for the broker that the order is sent from.
diff --git a/artifacts/apidocs/schemas/api_create_order_request.md b/artifacts/apidocs/schemas/api_create_order_request.md index b71ea21..c345c60 100644 --- a/artifacts/apidocs/schemas/api_create_order_request.md +++ b/artifacts/apidocs/schemas/api_create_order_request.md @@ -57,36 +57,6 @@ |create_time
`ct` |string|False
`0`|[Filled by GRVT Backend] Time at which the order was received by GRVT in unix nanoseconds| |trigger
`t` |TriggerOrderMetadata|True|Trigger fields are used to support any type of trigger order such as TP/SL| |broker
`b` |BrokerTag|False
``|Specifies the broker who brokered the order| - ??? info "[TriggerOrderMetadata](/../../schemas/trigger_order_metadata)" - Contains metadata related to trigger orders, such as Take Profit (TP) or Stop Loss (SL).

Trigger orders are used to automatically execute an order when a predefined price condition is met, allowing traders to implement risk management strategies.


- - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |trigger_type
`tt` |TriggerType|True|Type of the trigger order. eg: Take Profit, Stop Loss, etc| - |tpsl
`t` |TPSLOrderMetadata|True|Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

| - ??? info "[TriggerType](/../../schemas/trigger_type)" - Defines the type of trigger order used in trading, such as Take Profit or Stop Loss.

Trigger orders allow execution based on pre-defined price conditions rather than immediate market conditions.


- - |Value| Description | - |-|-| - |`UNSPECIFIED` = 0|Not a trigger order. The order executes normally without any trigger conditions.| - |`TAKE_PROFIT` = 1|Take Profit Order - Executes when the price reaches a specified level to secure profits.| - |`STOP_LOSS` = 2|Stop Loss Order - Executes when the price reaches a specified level to limit losses.| - ??? info "[TPSLOrderMetadata](/../../schemas/tpsl_order_metadata)" - Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

### Fields:
- **triggerBy**: Defines the price type that activates the order (e.g., index price).
- **triggerPrice**: The price at which the order is triggered, expressed in `9` decimal precision.


- - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |trigger_by
`tb` |TriggerBy|True|Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order| - |trigger_price
`tp` |string|True|The Trigger Price of the order, expressed in `9` decimals.| - ??? info "[TriggerBy](/../../schemas/trigger_by)" - Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order.

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.


- - |Value| Description | - |-|-| - |`UNSPECIFIED` = 0|no trigger condition| - |`INDEX` = 1|INDEX - Order is activated when the index price reaches the trigger price| - |`LAST` = 2|LAST - Order is activated when the last trade price reaches the trigger price| ??? info "[BrokerTag](/../../schemas/broker_tag)" BrokerTag is a tag for the broker that the order is sent from.
diff --git a/artifacts/apidocs/schemas/api_create_order_response.md b/artifacts/apidocs/schemas/api_create_order_response.md index ec0bd33..8303ba5 100644 --- a/artifacts/apidocs/schemas/api_create_order_response.md +++ b/artifacts/apidocs/schemas/api_create_order_response.md @@ -55,36 +55,6 @@ |create_time
`ct` |string|False
`0`|[Filled by GRVT Backend] Time at which the order was received by GRVT in unix nanoseconds| |trigger
`t` |TriggerOrderMetadata|True|Trigger fields are used to support any type of trigger order such as TP/SL| |broker
`b` |BrokerTag|False
``|Specifies the broker who brokered the order| - ??? info "[TriggerOrderMetadata](/../../schemas/trigger_order_metadata)" - Contains metadata related to trigger orders, such as Take Profit (TP) or Stop Loss (SL).

Trigger orders are used to automatically execute an order when a predefined price condition is met, allowing traders to implement risk management strategies.


- - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |trigger_type
`tt` |TriggerType|True|Type of the trigger order. eg: Take Profit, Stop Loss, etc| - |tpsl
`t` |TPSLOrderMetadata|True|Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

| - ??? info "[TriggerType](/../../schemas/trigger_type)" - Defines the type of trigger order used in trading, such as Take Profit or Stop Loss.

Trigger orders allow execution based on pre-defined price conditions rather than immediate market conditions.


- - |Value| Description | - |-|-| - |`UNSPECIFIED` = 0|Not a trigger order. The order executes normally without any trigger conditions.| - |`TAKE_PROFIT` = 1|Take Profit Order - Executes when the price reaches a specified level to secure profits.| - |`STOP_LOSS` = 2|Stop Loss Order - Executes when the price reaches a specified level to limit losses.| - ??? info "[TPSLOrderMetadata](/../../schemas/tpsl_order_metadata)" - Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

### Fields:
- **triggerBy**: Defines the price type that activates the order (e.g., index price).
- **triggerPrice**: The price at which the order is triggered, expressed in `9` decimal precision.


- - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |trigger_by
`tb` |TriggerBy|True|Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order| - |trigger_price
`tp` |string|True|The Trigger Price of the order, expressed in `9` decimals.| - ??? info "[TriggerBy](/../../schemas/trigger_by)" - Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order.

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.


- - |Value| Description | - |-|-| - |`UNSPECIFIED` = 0|no trigger condition| - |`INDEX` = 1|INDEX - Order is activated when the index price reaches the trigger price| - |`LAST` = 2|LAST - Order is activated when the last trade price reaches the trigger price| ??? info "[BrokerTag](/../../schemas/broker_tag)" BrokerTag is a tag for the broker that the order is sent from.
diff --git a/artifacts/apidocs/schemas/api_dedust_position_request.md b/artifacts/apidocs/schemas/api_dedust_position_request.md index aed4ab8..e69de29 100644 --- a/artifacts/apidocs/schemas/api_dedust_position_request.md +++ b/artifacts/apidocs/schemas/api_dedust_position_request.md @@ -1,147 +0,0 @@ -!!! info "[ApiDedustPositionRequest](/../../schemas/api_dedust_position_request)" - Remove dust position (i.e., order quantity smaller than minimum required increment) on an account, by matching the specified order against GRVT directly. Limit price should always be better than mark price.
- - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |order
`o` |Order|True|The order 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| - |trigger
`t` |TriggerOrderMetadata|True|Trigger fields are used to support any type of trigger order such as TP/SL| - |broker
`b` |BrokerTag|False
``|Specifies the broker who brokered the order| - ??? info "[TriggerOrderMetadata](/../../schemas/trigger_order_metadata)" - Contains metadata related to trigger orders, such as Take Profit (TP) or Stop Loss (SL).

Trigger orders are used to automatically execute an order when a predefined price condition is met, allowing traders to implement risk management strategies.


- - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |trigger_type
`tt` |TriggerType|True|Type of the trigger order. eg: Take Profit, Stop Loss, etc| - |tpsl
`t` |TPSLOrderMetadata|True|Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

| - ??? info "[TriggerType](/../../schemas/trigger_type)" - Defines the type of trigger order used in trading, such as Take Profit or Stop Loss.

Trigger orders allow execution based on pre-defined price conditions rather than immediate market conditions.


- - |Value| Description | - |-|-| - |`UNSPECIFIED` = 0|Not a trigger order. The order executes normally without any trigger conditions.| - |`TAKE_PROFIT` = 1|Take Profit Order - Executes when the price reaches a specified level to secure profits.| - |`STOP_LOSS` = 2|Stop Loss Order - Executes when the price reaches a specified level to limit losses.| - ??? info "[TPSLOrderMetadata](/../../schemas/tpsl_order_metadata)" - Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

### Fields:
- **triggerBy**: Defines the price type that activates the order (e.g., index price).
- **triggerPrice**: The price at which the order is triggered, expressed in `9` decimal precision.


- - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |trigger_by
`tb` |TriggerBy|True|Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order| - |trigger_price
`tp` |string|True|The Trigger Price of the order, expressed in `9` decimals.| - ??? info "[TriggerBy](/../../schemas/trigger_by)" - Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order.

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.


- - |Value| Description | - |-|-| - |`UNSPECIFIED` = 0|no trigger condition| - |`INDEX` = 1|INDEX - Order is activated when the index price reaches the trigger price| - |`LAST` = 2|LAST - Order is activated when the last trade price reaches the trigger price| - ??? info "[BrokerTag](/../../schemas/broker_tag)" - BrokerTag is a tag for the broker that the order is sent from.
- - |Value| Description | - |-|-| - |`COIN_ROUTES` = 1|CoinRoutes| - |`ALERTATRON` = 2|Alertatron| - |`ORIGAMI` = 3|Origami| - ??? 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| diff --git a/artifacts/apidocs/schemas/api_dedust_position_response.md b/artifacts/apidocs/schemas/api_dedust_position_response.md index 3a242ce..e69de29 100644 --- a/artifacts/apidocs/schemas/api_dedust_position_response.md +++ b/artifacts/apidocs/schemas/api_dedust_position_response.md @@ -1,145 +0,0 @@ -!!! info "[ApiDedustPositionResponse](/../../schemas/api_dedust_position_response)" - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |result
`r` |Order|True|The created order| - ??? 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| - |trigger
`t` |TriggerOrderMetadata|True|Trigger fields are used to support any type of trigger order such as TP/SL| - |broker
`b` |BrokerTag|False
``|Specifies the broker who brokered the order| - ??? info "[TriggerOrderMetadata](/../../schemas/trigger_order_metadata)" - Contains metadata related to trigger orders, such as Take Profit (TP) or Stop Loss (SL).

Trigger orders are used to automatically execute an order when a predefined price condition is met, allowing traders to implement risk management strategies.


- - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |trigger_type
`tt` |TriggerType|True|Type of the trigger order. eg: Take Profit, Stop Loss, etc| - |tpsl
`t` |TPSLOrderMetadata|True|Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

| - ??? info "[TriggerType](/../../schemas/trigger_type)" - Defines the type of trigger order used in trading, such as Take Profit or Stop Loss.

Trigger orders allow execution based on pre-defined price conditions rather than immediate market conditions.


- - |Value| Description | - |-|-| - |`UNSPECIFIED` = 0|Not a trigger order. The order executes normally without any trigger conditions.| - |`TAKE_PROFIT` = 1|Take Profit Order - Executes when the price reaches a specified level to secure profits.| - |`STOP_LOSS` = 2|Stop Loss Order - Executes when the price reaches a specified level to limit losses.| - ??? info "[TPSLOrderMetadata](/../../schemas/tpsl_order_metadata)" - Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

### Fields:
- **triggerBy**: Defines the price type that activates the order (e.g., index price).
- **triggerPrice**: The price at which the order is triggered, expressed in `9` decimal precision.


- - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |trigger_by
`tb` |TriggerBy|True|Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order| - |trigger_price
`tp` |string|True|The Trigger Price of the order, expressed in `9` decimals.| - ??? info "[TriggerBy](/../../schemas/trigger_by)" - Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order.

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.


- - |Value| Description | - |-|-| - |`UNSPECIFIED` = 0|no trigger condition| - |`INDEX` = 1|INDEX - Order is activated when the index price reaches the trigger price| - |`LAST` = 2|LAST - Order is activated when the last trade price reaches the trigger price| - ??? info "[BrokerTag](/../../schemas/broker_tag)" - BrokerTag is a tag for the broker that the order is sent from.
- - |Value| Description | - |-|-| - |`COIN_ROUTES` = 1|CoinRoutes| - |`ALERTATRON` = 2|Alertatron| - |`ORIGAMI` = 3|Origami| - ??? 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| diff --git a/artifacts/apidocs/schemas/api_get_order_response.md b/artifacts/apidocs/schemas/api_get_order_response.md index 1c61354..be090e9 100644 --- a/artifacts/apidocs/schemas/api_get_order_response.md +++ b/artifacts/apidocs/schemas/api_get_order_response.md @@ -55,36 +55,6 @@ |create_time
`ct` |string|False
`0`|[Filled by GRVT Backend] Time at which the order was received by GRVT in unix nanoseconds| |trigger
`t` |TriggerOrderMetadata|True|Trigger fields are used to support any type of trigger order such as TP/SL| |broker
`b` |BrokerTag|False
``|Specifies the broker who brokered the order| - ??? info "[TriggerOrderMetadata](/../../schemas/trigger_order_metadata)" - Contains metadata related to trigger orders, such as Take Profit (TP) or Stop Loss (SL).

Trigger orders are used to automatically execute an order when a predefined price condition is met, allowing traders to implement risk management strategies.


- - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |trigger_type
`tt` |TriggerType|True|Type of the trigger order. eg: Take Profit, Stop Loss, etc| - |tpsl
`t` |TPSLOrderMetadata|True|Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

| - ??? info "[TriggerType](/../../schemas/trigger_type)" - Defines the type of trigger order used in trading, such as Take Profit or Stop Loss.

Trigger orders allow execution based on pre-defined price conditions rather than immediate market conditions.


- - |Value| Description | - |-|-| - |`UNSPECIFIED` = 0|Not a trigger order. The order executes normally without any trigger conditions.| - |`TAKE_PROFIT` = 1|Take Profit Order - Executes when the price reaches a specified level to secure profits.| - |`STOP_LOSS` = 2|Stop Loss Order - Executes when the price reaches a specified level to limit losses.| - ??? info "[TPSLOrderMetadata](/../../schemas/tpsl_order_metadata)" - Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

### Fields:
- **triggerBy**: Defines the price type that activates the order (e.g., index price).
- **triggerPrice**: The price at which the order is triggered, expressed in `9` decimal precision.


- - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |trigger_by
`tb` |TriggerBy|True|Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order| - |trigger_price
`tp` |string|True|The Trigger Price of the order, expressed in `9` decimals.| - ??? info "[TriggerBy](/../../schemas/trigger_by)" - Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order.

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.


- - |Value| Description | - |-|-| - |`UNSPECIFIED` = 0|no trigger condition| - |`INDEX` = 1|INDEX - Order is activated when the index price reaches the trigger price| - |`LAST` = 2|LAST - Order is activated when the last trade price reaches the trigger price| ??? info "[BrokerTag](/../../schemas/broker_tag)" BrokerTag is a tag for the broker that the order is sent from.
diff --git a/artifacts/apidocs/schemas/api_open_orders_response.md b/artifacts/apidocs/schemas/api_open_orders_response.md index 82cb170..afe64eb 100644 --- a/artifacts/apidocs/schemas/api_open_orders_response.md +++ b/artifacts/apidocs/schemas/api_open_orders_response.md @@ -57,36 +57,6 @@ |create_time
`ct` |string|False
`0`|[Filled by GRVT Backend] Time at which the order was received by GRVT in unix nanoseconds| |trigger
`t` |TriggerOrderMetadata|True|Trigger fields are used to support any type of trigger order such as TP/SL| |broker
`b` |BrokerTag|False
``|Specifies the broker who brokered the order| - ??? info "[TriggerOrderMetadata](/../../schemas/trigger_order_metadata)" - Contains metadata related to trigger orders, such as Take Profit (TP) or Stop Loss (SL).

Trigger orders are used to automatically execute an order when a predefined price condition is met, allowing traders to implement risk management strategies.


- - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |trigger_type
`tt` |TriggerType|True|Type of the trigger order. eg: Take Profit, Stop Loss, etc| - |tpsl
`t` |TPSLOrderMetadata|True|Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

| - ??? info "[TriggerType](/../../schemas/trigger_type)" - Defines the type of trigger order used in trading, such as Take Profit or Stop Loss.

Trigger orders allow execution based on pre-defined price conditions rather than immediate market conditions.


- - |Value| Description | - |-|-| - |`UNSPECIFIED` = 0|Not a trigger order. The order executes normally without any trigger conditions.| - |`TAKE_PROFIT` = 1|Take Profit Order - Executes when the price reaches a specified level to secure profits.| - |`STOP_LOSS` = 2|Stop Loss Order - Executes when the price reaches a specified level to limit losses.| - ??? info "[TPSLOrderMetadata](/../../schemas/tpsl_order_metadata)" - Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

### Fields:
- **triggerBy**: Defines the price type that activates the order (e.g., index price).
- **triggerPrice**: The price at which the order is triggered, expressed in `9` decimal precision.


- - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |trigger_by
`tb` |TriggerBy|True|Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order| - |trigger_price
`tp` |string|True|The Trigger Price of the order, expressed in `9` decimals.| - ??? info "[TriggerBy](/../../schemas/trigger_by)" - Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order.

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.


- - |Value| Description | - |-|-| - |`UNSPECIFIED` = 0|no trigger condition| - |`INDEX` = 1|INDEX - Order is activated when the index price reaches the trigger price| - |`LAST` = 2|LAST - Order is activated when the last trade price reaches the trigger price| ??? info "[BrokerTag](/../../schemas/broker_tag)" BrokerTag is a tag for the broker that the order is sent from.
diff --git a/artifacts/apidocs/schemas/api_order_history_response.md b/artifacts/apidocs/schemas/api_order_history_response.md index 5f76dc0..d4d44c7 100644 --- a/artifacts/apidocs/schemas/api_order_history_response.md +++ b/artifacts/apidocs/schemas/api_order_history_response.md @@ -56,36 +56,6 @@ |create_time
`ct` |string|False
`0`|[Filled by GRVT Backend] Time at which the order was received by GRVT in unix nanoseconds| |trigger
`t` |TriggerOrderMetadata|True|Trigger fields are used to support any type of trigger order such as TP/SL| |broker
`b` |BrokerTag|False
``|Specifies the broker who brokered the order| - ??? info "[TriggerOrderMetadata](/../../schemas/trigger_order_metadata)" - Contains metadata related to trigger orders, such as Take Profit (TP) or Stop Loss (SL).

Trigger orders are used to automatically execute an order when a predefined price condition is met, allowing traders to implement risk management strategies.


- - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |trigger_type
`tt` |TriggerType|True|Type of the trigger order. eg: Take Profit, Stop Loss, etc| - |tpsl
`t` |TPSLOrderMetadata|True|Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

| - ??? info "[TriggerType](/../../schemas/trigger_type)" - Defines the type of trigger order used in trading, such as Take Profit or Stop Loss.

Trigger orders allow execution based on pre-defined price conditions rather than immediate market conditions.


- - |Value| Description | - |-|-| - |`UNSPECIFIED` = 0|Not a trigger order. The order executes normally without any trigger conditions.| - |`TAKE_PROFIT` = 1|Take Profit Order - Executes when the price reaches a specified level to secure profits.| - |`STOP_LOSS` = 2|Stop Loss Order - Executes when the price reaches a specified level to limit losses.| - ??? info "[TPSLOrderMetadata](/../../schemas/tpsl_order_metadata)" - Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

### Fields:
- **triggerBy**: Defines the price type that activates the order (e.g., index price).
- **triggerPrice**: The price at which the order is triggered, expressed in `9` decimal precision.


- - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |trigger_by
`tb` |TriggerBy|True|Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order| - |trigger_price
`tp` |string|True|The Trigger Price of the order, expressed in `9` decimals.| - ??? info "[TriggerBy](/../../schemas/trigger_by)" - Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order.

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.


- - |Value| Description | - |-|-| - |`UNSPECIFIED` = 0|no trigger condition| - |`INDEX` = 1|INDEX - Order is activated when the index price reaches the trigger price| - |`LAST` = 2|LAST - Order is activated when the last trade price reaches the trigger price| ??? info "[BrokerTag](/../../schemas/broker_tag)" BrokerTag is a tag for the broker that the order is sent from.
diff --git a/artifacts/apidocs/schemas/api_pre_order_check_request.md b/artifacts/apidocs/schemas/api_pre_order_check_request.md index e489b83..0a7140a 100644 --- a/artifacts/apidocs/schemas/api_pre_order_check_request.md +++ b/artifacts/apidocs/schemas/api_pre_order_check_request.md @@ -58,36 +58,6 @@ |create_time
`ct` |string|False
`0`|[Filled by GRVT Backend] Time at which the order was received by GRVT in unix nanoseconds| |trigger
`t` |TriggerOrderMetadata|True|Trigger fields are used to support any type of trigger order such as TP/SL| |broker
`b` |BrokerTag|False
``|Specifies the broker who brokered the order| - ??? info "[TriggerOrderMetadata](/../../schemas/trigger_order_metadata)" - Contains metadata related to trigger orders, such as Take Profit (TP) or Stop Loss (SL).

Trigger orders are used to automatically execute an order when a predefined price condition is met, allowing traders to implement risk management strategies.


- - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |trigger_type
`tt` |TriggerType|True|Type of the trigger order. eg: Take Profit, Stop Loss, etc| - |tpsl
`t` |TPSLOrderMetadata|True|Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

| - ??? info "[TriggerType](/../../schemas/trigger_type)" - Defines the type of trigger order used in trading, such as Take Profit or Stop Loss.

Trigger orders allow execution based on pre-defined price conditions rather than immediate market conditions.


- - |Value| Description | - |-|-| - |`UNSPECIFIED` = 0|Not a trigger order. The order executes normally without any trigger conditions.| - |`TAKE_PROFIT` = 1|Take Profit Order - Executes when the price reaches a specified level to secure profits.| - |`STOP_LOSS` = 2|Stop Loss Order - Executes when the price reaches a specified level to limit losses.| - ??? info "[TPSLOrderMetadata](/../../schemas/tpsl_order_metadata)" - Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

### Fields:
- **triggerBy**: Defines the price type that activates the order (e.g., index price).
- **triggerPrice**: The price at which the order is triggered, expressed in `9` decimal precision.


- - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |trigger_by
`tb` |TriggerBy|True|Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order| - |trigger_price
`tp` |string|True|The Trigger Price of the order, expressed in `9` decimals.| - ??? info "[TriggerBy](/../../schemas/trigger_by)" - Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order.

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.


- - |Value| Description | - |-|-| - |`UNSPECIFIED` = 0|no trigger condition| - |`INDEX` = 1|INDEX - Order is activated when the index price reaches the trigger price| - |`LAST` = 2|LAST - Order is activated when the last trade price reaches the trigger price| ??? info "[BrokerTag](/../../schemas/broker_tag)" BrokerTag is a tag for the broker that the order is sent from.
diff --git a/artifacts/apidocs/schemas/order.md b/artifacts/apidocs/schemas/order.md index c2b0a4e..db309e0 100644 --- a/artifacts/apidocs/schemas/order.md +++ b/artifacts/apidocs/schemas/order.md @@ -51,36 +51,6 @@ |create_time
`ct` |string|False
`0`|[Filled by GRVT Backend] Time at which the order was received by GRVT in unix nanoseconds| |trigger
`t` |TriggerOrderMetadata|True|Trigger fields are used to support any type of trigger order such as TP/SL| |broker
`b` |BrokerTag|False
``|Specifies the broker who brokered the order| - ??? info "[TriggerOrderMetadata](/../../schemas/trigger_order_metadata)" - Contains metadata related to trigger orders, such as Take Profit (TP) or Stop Loss (SL).

Trigger orders are used to automatically execute an order when a predefined price condition is met, allowing traders to implement risk management strategies.


- - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |trigger_type
`tt` |TriggerType|True|Type of the trigger order. eg: Take Profit, Stop Loss, etc| - |tpsl
`t` |TPSLOrderMetadata|True|Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

| - ??? info "[TriggerType](/../../schemas/trigger_type)" - Defines the type of trigger order used in trading, such as Take Profit or Stop Loss.

Trigger orders allow execution based on pre-defined price conditions rather than immediate market conditions.


- - |Value| Description | - |-|-| - |`UNSPECIFIED` = 0|Not a trigger order. The order executes normally without any trigger conditions.| - |`TAKE_PROFIT` = 1|Take Profit Order - Executes when the price reaches a specified level to secure profits.| - |`STOP_LOSS` = 2|Stop Loss Order - Executes when the price reaches a specified level to limit losses.| - ??? info "[TPSLOrderMetadata](/../../schemas/tpsl_order_metadata)" - Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

### Fields:
- **triggerBy**: Defines the price type that activates the order (e.g., index price).
- **triggerPrice**: The price at which the order is triggered, expressed in `9` decimal precision.


- - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |trigger_by
`tb` |TriggerBy|True|Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order| - |trigger_price
`tp` |string|True|The Trigger Price of the order, expressed in `9` decimals.| - ??? info "[TriggerBy](/../../schemas/trigger_by)" - Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order.

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.


- - |Value| Description | - |-|-| - |`UNSPECIFIED` = 0|no trigger condition| - |`INDEX` = 1|INDEX - Order is activated when the index price reaches the trigger price| - |`LAST` = 2|LAST - Order is activated when the last trade price reaches the trigger price| ??? info "[BrokerTag](/../../schemas/broker_tag)" BrokerTag is a tag for the broker that the order is sent from.
diff --git a/artifacts/apidocs/schemas/order_metadata.md b/artifacts/apidocs/schemas/order_metadata.md index 5d46f22..3d335d0 100644 --- a/artifacts/apidocs/schemas/order_metadata.md +++ b/artifacts/apidocs/schemas/order_metadata.md @@ -7,36 +7,6 @@ |create_time
`ct` |string|False
`0`|[Filled by GRVT Backend] Time at which the order was received by GRVT in unix nanoseconds| |trigger
`t` |TriggerOrderMetadata|True|Trigger fields are used to support any type of trigger order such as TP/SL| |broker
`b` |BrokerTag|False
``|Specifies the broker who brokered the order| - ??? info "[TriggerOrderMetadata](/../../schemas/trigger_order_metadata)" - Contains metadata related to trigger orders, such as Take Profit (TP) or Stop Loss (SL).

Trigger orders are used to automatically execute an order when a predefined price condition is met, allowing traders to implement risk management strategies.


- - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |trigger_type
`tt` |TriggerType|True|Type of the trigger order. eg: Take Profit, Stop Loss, etc| - |tpsl
`t` |TPSLOrderMetadata|True|Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

| - ??? info "[TriggerType](/../../schemas/trigger_type)" - Defines the type of trigger order used in trading, such as Take Profit or Stop Loss.

Trigger orders allow execution based on pre-defined price conditions rather than immediate market conditions.


- - |Value| Description | - |-|-| - |`UNSPECIFIED` = 0|Not a trigger order. The order executes normally without any trigger conditions.| - |`TAKE_PROFIT` = 1|Take Profit Order - Executes when the price reaches a specified level to secure profits.| - |`STOP_LOSS` = 2|Stop Loss Order - Executes when the price reaches a specified level to limit losses.| - ??? info "[TPSLOrderMetadata](/../../schemas/tpsl_order_metadata)" - Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

### Fields:
- **triggerBy**: Defines the price type that activates the order (e.g., index price).
- **triggerPrice**: The price at which the order is triggered, expressed in `9` decimal precision.


- - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |trigger_by
`tb` |TriggerBy|True|Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order| - |trigger_price
`tp` |string|True|The Trigger Price of the order, expressed in `9` decimals.| - ??? info "[TriggerBy](/../../schemas/trigger_by)" - Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order.

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.


- - |Value| Description | - |-|-| - |`UNSPECIFIED` = 0|no trigger condition| - |`INDEX` = 1|INDEX - Order is activated when the index price reaches the trigger price| - |`LAST` = 2|LAST - Order is activated when the last trade price reaches the trigger price| ??? info "[BrokerTag](/../../schemas/broker_tag)" BrokerTag is a tag for the broker that the order is sent from.
diff --git a/artifacts/apidocs/schemas/trigger_order_metadata.md b/artifacts/apidocs/schemas/trigger_order_metadata.md index 4a97256..e69de29 100644 --- a/artifacts/apidocs/schemas/trigger_order_metadata.md +++ b/artifacts/apidocs/schemas/trigger_order_metadata.md @@ -1,30 +0,0 @@ -!!! info "[TriggerOrderMetadata](/../../schemas/trigger_order_metadata)" - Contains metadata related to trigger orders, such as Take Profit (TP) or Stop Loss (SL).

Trigger orders are used to automatically execute an order when a predefined price condition is met, allowing traders to implement risk management strategies.


- - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |trigger_type
`tt` |TriggerType|True|Type of the trigger order. eg: Take Profit, Stop Loss, etc| - |tpsl
`t` |TPSLOrderMetadata|True|Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

| - ??? info "[TriggerType](/../../schemas/trigger_type)" - Defines the type of trigger order used in trading, such as Take Profit or Stop Loss.

Trigger orders allow execution based on pre-defined price conditions rather than immediate market conditions.


- - |Value| Description | - |-|-| - |`UNSPECIFIED` = 0|Not a trigger order. The order executes normally without any trigger conditions.| - |`TAKE_PROFIT` = 1|Take Profit Order - Executes when the price reaches a specified level to secure profits.| - |`STOP_LOSS` = 2|Stop Loss Order - Executes when the price reaches a specified level to limit losses.| - ??? info "[TPSLOrderMetadata](/../../schemas/tpsl_order_metadata)" - Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

### Fields:
- **triggerBy**: Defines the price type that activates the order (e.g., index price).
- **triggerPrice**: The price at which the order is triggered, expressed in `9` decimal precision.


- - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |trigger_by
`tb` |TriggerBy|True|Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order| - |trigger_price
`tp` |string|True|The Trigger Price of the order, expressed in `9` decimals.| - ??? info "[TriggerBy](/../../schemas/trigger_by)" - Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order.

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.


- - |Value| Description | - |-|-| - |`UNSPECIFIED` = 0|no trigger condition| - |`INDEX` = 1|INDEX - Order is activated when the index price reaches the trigger price| - |`LAST` = 2|LAST - Order is activated when the last trade price reaches the trigger price| diff --git a/artifacts/apidocs/schemas/ws_order_feed_data_v1.md b/artifacts/apidocs/schemas/ws_order_feed_data_v1.md index fd36537..df3c841 100644 --- a/artifacts/apidocs/schemas/ws_order_feed_data_v1.md +++ b/artifacts/apidocs/schemas/ws_order_feed_data_v1.md @@ -59,36 +59,6 @@ |create_time
`ct` |string|False
`0`|[Filled by GRVT Backend] Time at which the order was received by GRVT in unix nanoseconds| |trigger
`t` |TriggerOrderMetadata|True|Trigger fields are used to support any type of trigger order such as TP/SL| |broker
`b` |BrokerTag|False
``|Specifies the broker who brokered the order| - ??? info "[TriggerOrderMetadata](/../../schemas/trigger_order_metadata)" - Contains metadata related to trigger orders, such as Take Profit (TP) or Stop Loss (SL).

Trigger orders are used to automatically execute an order when a predefined price condition is met, allowing traders to implement risk management strategies.


- - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |trigger_type
`tt` |TriggerType|True|Type of the trigger order. eg: Take Profit, Stop Loss, etc| - |tpsl
`t` |TPSLOrderMetadata|True|Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

| - ??? info "[TriggerType](/../../schemas/trigger_type)" - Defines the type of trigger order used in trading, such as Take Profit or Stop Loss.

Trigger orders allow execution based on pre-defined price conditions rather than immediate market conditions.


- - |Value| Description | - |-|-| - |`UNSPECIFIED` = 0|Not a trigger order. The order executes normally without any trigger conditions.| - |`TAKE_PROFIT` = 1|Take Profit Order - Executes when the price reaches a specified level to secure profits.| - |`STOP_LOSS` = 2|Stop Loss Order - Executes when the price reaches a specified level to limit losses.| - ??? info "[TPSLOrderMetadata](/../../schemas/tpsl_order_metadata)" - Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

### Fields:
- **triggerBy**: Defines the price type that activates the order (e.g., index price).
- **triggerPrice**: The price at which the order is triggered, expressed in `9` decimal precision.


- - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |trigger_by
`tb` |TriggerBy|True|Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order| - |trigger_price
`tp` |string|True|The Trigger Price of the order, expressed in `9` decimals.| - ??? info "[TriggerBy](/../../schemas/trigger_by)" - Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order.

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.


- - |Value| Description | - |-|-| - |`UNSPECIFIED` = 0|no trigger condition| - |`INDEX` = 1|INDEX - Order is activated when the index price reaches the trigger price| - |`LAST` = 2|LAST - Order is activated when the last trade price reaches the trigger price| ??? info "[BrokerTag](/../../schemas/broker_tag)" BrokerTag is a tag for the broker that the order is sent from.
diff --git a/src/codegen/apidocs/apidocs.py b/src/codegen/apidocs/apidocs.py index 83540d4..a621d1a 100644 --- a/src/codegen/apidocs/apidocs.py +++ b/src/codegen/apidocs/apidocs.py @@ -18,16 +18,19 @@ IGNORE_FIELD_PATHS = [ ["ApiCreateOrderRequest", "Order", "state"], ["ApiCreateOrderRequest", "Order", "order_id"], - ["ApiDedustPositionRequest"], - ["ApiDedustPositionResponse"], - ["TriggerOrderMetadata"], - ["TriggerType"], - ["TriggerBy"], - ["BrokerTag"], ["JSONRPCRequest", "ApiCreateOrderRequest", "Order", "state"], ["JSONRPCRequest", "ApiCreateOrderRequest", "Order", "order_id"], ] +IGNORE_STRUCTS = [ + "ApiDedustPositionRequest", + "ApiDedustPositionResponse", + "TriggerOrderMetadata", + "TriggerType", + "TriggerBy", + "BrokerTag", +] + # skip these fields for all structs, at all levels of nesting IGNORE_FIELDS_ANY_PATH = [ "prev_sequence_number", @@ -704,6 +707,8 @@ def import_struct_schema(md: MarkdownWriter, struct: Struct) -> None: def write_struct_schema( ctx: CodegenCtx, md: MarkdownWriter, struct: Struct, is_root: bool ) -> None: + if struct.name in IGNORE_STRUCTS: + return # Header path = "/../../schemas/" + inflection.underscore(struct.name).lower() if is_root: From 9b45021ef526eb551657b3856703250bf1fc0b57 Mon Sep 17 00:00:00 2001 From: keithang-grvt Date: Sun, 23 Feb 2025 15:11:07 +0800 Subject: [PATCH 07/11] [RFC] Update API docs and specs --- .../schemas/api_cancel_order_response.md | 105 +++++++++--------- .../schemas/api_create_order_request.md | 105 +++++++++--------- .../schemas/api_create_order_response.md | 105 +++++++++--------- .../schemas/api_fill_history_response.md | 5 - .../apidocs/schemas/api_get_order_response.md | 105 +++++++++--------- .../schemas/api_open_orders_response.md | 105 +++++++++--------- .../schemas/api_order_history_response.md | 105 +++++++++--------- .../schemas/api_pre_order_check_request.md | 105 +++++++++--------- artifacts/apidocs/schemas/broker_tag.md | 5 - artifacts/apidocs/schemas/fill.md | 5 - artifacts/apidocs/schemas/order.md | 105 +++++++++--------- artifacts/apidocs/schemas/order_metadata.md | 5 - .../apidocs/schemas/ws_fill_feed_data_v1.md | 5 - .../apidocs/schemas/ws_order_feed_data_v1.md | 105 +++++++++--------- src/codegen/apidocs/apidocs.py | 6 + 15 files changed, 456 insertions(+), 520 deletions(-) diff --git a/artifacts/apidocs/schemas/api_cancel_order_response.md b/artifacts/apidocs/schemas/api_cancel_order_response.md index b9cf231..2f66a4c 100644 --- a/artifacts/apidocs/schemas/api_cancel_order_response.md +++ b/artifacts/apidocs/schemas/api_cancel_order_response.md @@ -58,58 +58,53 @@ ??? info "[BrokerTag](/../../schemas/broker_tag)" BrokerTag is a tag for the broker that the order is sent from.
- |Value| Description | - |-|-| - |`COIN_ROUTES` = 1|CoinRoutes| - |`ALERTATRON` = 2|Alertatron| - |`ORIGAMI` = 3|Origami| - ??? 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| + ??? 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| diff --git a/artifacts/apidocs/schemas/api_create_order_request.md b/artifacts/apidocs/schemas/api_create_order_request.md index c345c60..f721ee2 100644 --- a/artifacts/apidocs/schemas/api_create_order_request.md +++ b/artifacts/apidocs/schemas/api_create_order_request.md @@ -60,58 +60,53 @@ ??? info "[BrokerTag](/../../schemas/broker_tag)" BrokerTag is a tag for the broker that the order is sent from.
- |Value| Description | - |-|-| - |`COIN_ROUTES` = 1|CoinRoutes| - |`ALERTATRON` = 2|Alertatron| - |`ORIGAMI` = 3|Origami| - ??? 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| + ??? 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| diff --git a/artifacts/apidocs/schemas/api_create_order_response.md b/artifacts/apidocs/schemas/api_create_order_response.md index 8303ba5..0a35bc3 100644 --- a/artifacts/apidocs/schemas/api_create_order_response.md +++ b/artifacts/apidocs/schemas/api_create_order_response.md @@ -58,58 +58,53 @@ ??? info "[BrokerTag](/../../schemas/broker_tag)" BrokerTag is a tag for the broker that the order is sent from.
- |Value| Description | - |-|-| - |`COIN_ROUTES` = 1|CoinRoutes| - |`ALERTATRON` = 2|Alertatron| - |`ORIGAMI` = 3|Origami| - ??? 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| + ??? 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| diff --git a/artifacts/apidocs/schemas/api_fill_history_response.md b/artifacts/apidocs/schemas/api_fill_history_response.md index 89dcb83..6e01447 100644 --- a/artifacts/apidocs/schemas/api_fill_history_response.md +++ b/artifacts/apidocs/schemas/api_fill_history_response.md @@ -36,8 +36,3 @@ ??? info "[BrokerTag](/../../schemas/broker_tag)" BrokerTag is a tag for the broker that the order is sent from.
- |Value| Description | - |-|-| - |`COIN_ROUTES` = 1|CoinRoutes| - |`ALERTATRON` = 2|Alertatron| - |`ORIGAMI` = 3|Origami| diff --git a/artifacts/apidocs/schemas/api_get_order_response.md b/artifacts/apidocs/schemas/api_get_order_response.md index be090e9..bdd3b3b 100644 --- a/artifacts/apidocs/schemas/api_get_order_response.md +++ b/artifacts/apidocs/schemas/api_get_order_response.md @@ -58,58 +58,53 @@ ??? info "[BrokerTag](/../../schemas/broker_tag)" BrokerTag is a tag for the broker that the order is sent from.
- |Value| Description | - |-|-| - |`COIN_ROUTES` = 1|CoinRoutes| - |`ALERTATRON` = 2|Alertatron| - |`ORIGAMI` = 3|Origami| - ??? 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| + ??? 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| diff --git a/artifacts/apidocs/schemas/api_open_orders_response.md b/artifacts/apidocs/schemas/api_open_orders_response.md index afe64eb..b2a0c29 100644 --- a/artifacts/apidocs/schemas/api_open_orders_response.md +++ b/artifacts/apidocs/schemas/api_open_orders_response.md @@ -60,58 +60,53 @@ ??? info "[BrokerTag](/../../schemas/broker_tag)" BrokerTag is a tag for the broker that the order is sent from.
- |Value| Description | - |-|-| - |`COIN_ROUTES` = 1|CoinRoutes| - |`ALERTATRON` = 2|Alertatron| - |`ORIGAMI` = 3|Origami| - ??? 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| + ??? 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| diff --git a/artifacts/apidocs/schemas/api_order_history_response.md b/artifacts/apidocs/schemas/api_order_history_response.md index d4d44c7..f1b0778 100644 --- a/artifacts/apidocs/schemas/api_order_history_response.md +++ b/artifacts/apidocs/schemas/api_order_history_response.md @@ -59,58 +59,53 @@ ??? info "[BrokerTag](/../../schemas/broker_tag)" BrokerTag is a tag for the broker that the order is sent from.
- |Value| Description | - |-|-| - |`COIN_ROUTES` = 1|CoinRoutes| - |`ALERTATRON` = 2|Alertatron| - |`ORIGAMI` = 3|Origami| - ??? 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| + ??? 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| diff --git a/artifacts/apidocs/schemas/api_pre_order_check_request.md b/artifacts/apidocs/schemas/api_pre_order_check_request.md index 0a7140a..3f9d0ad 100644 --- a/artifacts/apidocs/schemas/api_pre_order_check_request.md +++ b/artifacts/apidocs/schemas/api_pre_order_check_request.md @@ -61,58 +61,53 @@ ??? info "[BrokerTag](/../../schemas/broker_tag)" BrokerTag is a tag for the broker that the order is sent from.
- |Value| Description | - |-|-| - |`COIN_ROUTES` = 1|CoinRoutes| - |`ALERTATRON` = 2|Alertatron| - |`ORIGAMI` = 3|Origami| - ??? 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| + ??? 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| diff --git a/artifacts/apidocs/schemas/broker_tag.md b/artifacts/apidocs/schemas/broker_tag.md index a57cd82..c5532c0 100644 --- a/artifacts/apidocs/schemas/broker_tag.md +++ b/artifacts/apidocs/schemas/broker_tag.md @@ -1,8 +1,3 @@ !!! info "[BrokerTag](/../../schemas/broker_tag)" BrokerTag is a tag for the broker that the order is sent from.
- |Value| Description | - |-|-| - |`COIN_ROUTES` = 1|CoinRoutes| - |`ALERTATRON` = 2|Alertatron| - |`ORIGAMI` = 3|Origami| diff --git a/artifacts/apidocs/schemas/fill.md b/artifacts/apidocs/schemas/fill.md index 157972d..54794d3 100644 --- a/artifacts/apidocs/schemas/fill.md +++ b/artifacts/apidocs/schemas/fill.md @@ -31,8 +31,3 @@ ??? info "[BrokerTag](/../../schemas/broker_tag)" BrokerTag is a tag for the broker that the order is sent from.
- |Value| Description | - |-|-| - |`COIN_ROUTES` = 1|CoinRoutes| - |`ALERTATRON` = 2|Alertatron| - |`ORIGAMI` = 3|Origami| diff --git a/artifacts/apidocs/schemas/order.md b/artifacts/apidocs/schemas/order.md index db309e0..dc30486 100644 --- a/artifacts/apidocs/schemas/order.md +++ b/artifacts/apidocs/schemas/order.md @@ -54,58 +54,53 @@ ??? info "[BrokerTag](/../../schemas/broker_tag)" BrokerTag is a tag for the broker that the order is sent from.
- |Value| Description | - |-|-| - |`COIN_ROUTES` = 1|CoinRoutes| - |`ALERTATRON` = 2|Alertatron| - |`ORIGAMI` = 3|Origami| - ??? 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| + ??? 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| diff --git a/artifacts/apidocs/schemas/order_metadata.md b/artifacts/apidocs/schemas/order_metadata.md index 3d335d0..f591907 100644 --- a/artifacts/apidocs/schemas/order_metadata.md +++ b/artifacts/apidocs/schemas/order_metadata.md @@ -10,8 +10,3 @@ ??? info "[BrokerTag](/../../schemas/broker_tag)" BrokerTag is a tag for the broker that the order is sent from.
- |Value| Description | - |-|-| - |`COIN_ROUTES` = 1|CoinRoutes| - |`ALERTATRON` = 2|Alertatron| - |`ORIGAMI` = 3|Origami| diff --git a/artifacts/apidocs/schemas/ws_fill_feed_data_v1.md b/artifacts/apidocs/schemas/ws_fill_feed_data_v1.md index 63eed1a..25713f5 100644 --- a/artifacts/apidocs/schemas/ws_fill_feed_data_v1.md +++ b/artifacts/apidocs/schemas/ws_fill_feed_data_v1.md @@ -39,8 +39,3 @@ ??? info "[BrokerTag](/../../schemas/broker_tag)" BrokerTag is a tag for the broker that the order is sent from.
- |Value| Description | - |-|-| - |`COIN_ROUTES` = 1|CoinRoutes| - |`ALERTATRON` = 2|Alertatron| - |`ORIGAMI` = 3|Origami| diff --git a/artifacts/apidocs/schemas/ws_order_feed_data_v1.md b/artifacts/apidocs/schemas/ws_order_feed_data_v1.md index df3c841..3c0038a 100644 --- a/artifacts/apidocs/schemas/ws_order_feed_data_v1.md +++ b/artifacts/apidocs/schemas/ws_order_feed_data_v1.md @@ -62,58 +62,53 @@ ??? info "[BrokerTag](/../../schemas/broker_tag)" BrokerTag is a tag for the broker that the order is sent from.
- |Value| Description | - |-|-| - |`COIN_ROUTES` = 1|CoinRoutes| - |`ALERTATRON` = 2|Alertatron| - |`ORIGAMI` = 3|Origami| - ??? 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| + ??? 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| diff --git a/src/codegen/apidocs/apidocs.py b/src/codegen/apidocs/apidocs.py index a621d1a..3217feb 100644 --- a/src/codegen/apidocs/apidocs.py +++ b/src/codegen/apidocs/apidocs.py @@ -64,6 +64,7 @@ "PENDLE", "UXLINK", ], + "BrokerTag": ["*"], } @@ -755,6 +756,11 @@ def write_enum_schema(md: MarkdownWriter, enum: Enum, is_root: bool = False) -> write_comment(md, enum.comment) if enum.name in IGNORE_ENUM_VALUES: + if ( + len(IGNORE_ENUM_VALUES[enum.name]) == 1 + and IGNORE_ENUM_VALUES[enum.name][0] == "*" + ): + return enum.values = [ value for value in enum.values From 0bce6244b0cccf4d5c152d233a5112722c258a3f Mon Sep 17 00:00:00 2001 From: keithang-grvt Date: Sun, 23 Feb 2025 15:15:09 +0800 Subject: [PATCH 08/11] [RFC] Update API docs and specs --- artifacts/apidocs/schemas/trigger_type.md | 5 ----- src/codegen/apidocs/apidocs.py | 3 +-- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/artifacts/apidocs/schemas/trigger_type.md b/artifacts/apidocs/schemas/trigger_type.md index 581ff4e..9407e67 100644 --- a/artifacts/apidocs/schemas/trigger_type.md +++ b/artifacts/apidocs/schemas/trigger_type.md @@ -1,8 +1,3 @@ !!! info "[TriggerType](/../../schemas/trigger_type)" Defines the type of trigger order used in trading, such as Take Profit or Stop Loss.

Trigger orders allow execution based on pre-defined price conditions rather than immediate market conditions.


- |Value| Description | - |-|-| - |`UNSPECIFIED` = 0|Not a trigger order. The order executes normally without any trigger conditions.| - |`TAKE_PROFIT` = 1|Take Profit Order - Executes when the price reaches a specified level to secure profits.| - |`STOP_LOSS` = 2|Stop Loss Order - Executes when the price reaches a specified level to limit losses.| diff --git a/src/codegen/apidocs/apidocs.py b/src/codegen/apidocs/apidocs.py index 3217feb..341c8a1 100644 --- a/src/codegen/apidocs/apidocs.py +++ b/src/codegen/apidocs/apidocs.py @@ -26,9 +26,7 @@ "ApiDedustPositionRequest", "ApiDedustPositionResponse", "TriggerOrderMetadata", - "TriggerType", "TriggerBy", - "BrokerTag", ] # skip these fields for all structs, at all levels of nesting @@ -65,6 +63,7 @@ "UXLINK", ], "BrokerTag": ["*"], + "TriggerType": ["*"], } From 9c6de84d6a40bdf6b18752b0ba423ba81e373051 Mon Sep 17 00:00:00 2001 From: keithang-grvt Date: Sun, 23 Feb 2025 15:16:45 +0800 Subject: [PATCH 09/11] [RFC] Update API docs and specs --- artifacts/apidocs/schemas/ack.md | 4 - artifacts/apidocs/schemas/ack_response.md | 10 -- .../schemas/aggregated_account_summary.md | 36 ------ ...api_aggregated_account_summary_response.md | 42 ------- .../schemas/api_cancel_all_orders_request.md | 66 ---------- .../schemas/api_cancel_all_orders_response.md | 4 - .../api_cancel_on_disconnect_request.md | 7 -- .../schemas/api_cancel_order_request.md | 9 -- .../schemas/api_cancel_order_response.md | 110 ----------------- .../schemas/api_candlestick_request.md | 40 ------ .../schemas/api_candlestick_response.md | 20 --- .../schemas/api_create_order_request.md | 112 ----------------- .../schemas/api_create_order_response.md | 110 ----------------- .../schemas/api_deposit_history_request.md | 34 ------ .../schemas/api_deposit_history_response.md | 40 ------ .../schemas/api_fill_history_request.md | 70 ----------- .../schemas/api_fill_history_response.md | 38 ------ ...pi_find_ecosystem_epoch_metric_response.md | 17 --- ...api_find_ecosystem_leaderboard_response.md | 11 -- .../api_find_first_epoch_metric_response.md | 25 ---- .../api_find_trader_epoch_metric_response.md | 12 -- .../api_find_trader_leaderboard_response.md | 11 -- .../api_funding_account_summary_response.md | 44 ------- .../api_funding_payment_history_request.md | 11 -- .../api_funding_payment_history_response.md | 38 ------ .../schemas/api_funding_rate_request.md | 10 -- .../schemas/api_funding_rate_response.md | 12 -- .../api_get_all_initial_leverage_request.md | 6 - .../api_get_all_initial_leverage_response.md | 13 -- .../api_get_all_instruments_request.md | 6 - .../api_get_all_instruments_response.md | 92 -------------- .../api_get_ecosystem_leaderboard_request.md | 5 - .../api_get_ecosystem_leaderboard_response.md | 20 --- ...pi_get_ecosystem_referral_stat_response.md | 7 -- .../api_get_filtered_instruments_request.md | 67 ---------- .../api_get_filtered_instruments_response.md | 92 -------------- .../schemas/api_get_instrument_request.md | 6 - .../schemas/api_get_instrument_response.md | 92 -------------- .../api_get_latest_lp_snapshot_request.md | 38 ------ .../api_get_latest_lp_snapshot_response.md | 14 --- .../api_get_list_epoch_badge_response.md | 54 --------- .../api_get_list_flat_referral_request.md | 9 -- .../api_get_list_flat_referral_response.md | 19 --- .../api_get_list_reward_epoch_response.md | 31 ----- .../schemas/api_get_lp_info_request.md | 38 ------ .../schemas/api_get_lp_info_response.md | 11 -- .../schemas/api_get_lp_leaderboard_request.md | 40 ------ .../api_get_lp_leaderboard_response.md | 10 -- .../schemas/api_get_lp_point_request.md | 39 ------ .../schemas/api_get_lp_point_response.md | 11 -- .../apidocs/schemas/api_get_order_request.md | 8 -- .../apidocs/schemas/api_get_order_response.md | 110 ----------------- .../schemas/api_get_trader_stat_response.md | 4 - .../api_get_user_ecosystem_point_request.md | 6 - .../api_get_user_ecosystem_point_response.md | 20 --- ..._verified_ecosystem_leaderboard_request.md | 5 - .../api_latest_snap_sub_accounts_request.md | 6 - .../api_latest_snap_sub_accounts_response.md | 95 --------------- ...list_aggregated_account_summary_request.md | 4 - ...ist_aggregated_account_summary_response.md | 46 ------- .../schemas/api_mini_ticker_request.md | 6 - .../schemas/api_mini_ticker_response.md | 18 --- .../schemas/api_open_orders_request.md | 64 ---------- .../schemas/api_open_orders_response.md | 112 ----------------- .../schemas/api_order_history_request.md | 70 ----------- .../schemas/api_order_history_response.md | 111 ----------------- .../schemas/api_order_state_request.md | 8 -- .../schemas/api_order_state_response.md | 54 --------- .../schemas/api_orderbook_levels_request.md | 7 -- .../schemas/api_orderbook_levels_response.md | 23 ---- .../apidocs/schemas/api_positions_request.md | 66 ---------- .../apidocs/schemas/api_positions_response.md | 21 ---- .../schemas/api_pre_deposit_check_request.md | 35 ------ .../schemas/api_pre_deposit_check_response.md | 29 ----- .../schemas/api_pre_order_check_request.md | 113 ----------------- .../schemas/api_pre_order_check_response.md | 42 ------- .../api_query_flat_referral_stat_request.md | 6 - .../api_query_flat_referral_stat_response.md | 5 - ...resolve_epoch_ecosystem_metric_response.md | 6 - .../api_set_initial_leverage_request.md | 8 -- .../api_set_initial_leverage_response.md | 6 - .../apidocs/schemas/api_settlement_price.md | 55 --------- .../schemas/api_settlement_price_request.md | 59 --------- .../schemas/api_settlement_price_response.md | 60 --------- .../api_socialized_loss_status_response.md | 7 -- .../api_sub_account_history_request.md | 10 -- .../api_sub_account_history_response.md | 96 --------------- .../api_sub_account_summary_request.md | 4 - .../api_sub_account_summary_response.md | 97 --------------- ...i_sub_account_trade_aggregation_request.md | 20 --- ..._sub_account_trade_aggregation_response.md | 15 --- .../schemas/api_ticker_feed_data_v1.md | 33 ----- .../apidocs/schemas/api_ticker_request.md | 6 - .../apidocs/schemas/api_ticker_response.md | 33 ----- .../schemas/api_trade_history_request.md | 10 -- .../schemas/api_trade_history_response.md | 28 ----- .../apidocs/schemas/api_trade_request.md | 7 -- .../apidocs/schemas/api_trade_response.md | 27 ----- .../schemas/api_transfer_history_request.md | 35 ------ .../schemas/api_transfer_history_response.md | 58 --------- .../apidocs/schemas/api_transfer_request.md | 53 -------- .../schemas/api_withdrawal_history_request.md | 34 ------ .../api_withdrawal_history_response.md | 48 -------- .../apidocs/schemas/api_withdrawal_request.md | 43 ------- .../apidocs/schemas/approximate_lp_point.md | 6 - .../schemas/approximate_lp_snapshot.md | 10 -- artifacts/apidocs/schemas/asset_max_qty.md | 6 - .../apidocs/schemas/cancel_status_feed.md | 46 ------- artifacts/apidocs/schemas/candlestick.md | 15 --- .../schemas/claim_ecosystem_badge_response.md | 54 --------- artifacts/apidocs/schemas/deposit.md | 31 ----- artifacts/apidocs/schemas/deposit_history.md | 35 ------ .../schemas/ecosystem_leaderboard_user.md | 7 -- artifacts/apidocs/schemas/ecosystem_metric.md | 8 -- artifacts/apidocs/schemas/ecosystem_point.md | 16 --- artifacts/apidocs/schemas/empty_request.md | 5 - artifacts/apidocs/schemas/epoch_badge.md | 50 -------- .../schemas/epoch_badge_point_distribution.md | 33 ----- artifacts/apidocs/schemas/error.md | 7 -- artifacts/apidocs/schemas/fill.md | 33 ----- artifacts/apidocs/schemas/flat_referral.md | 15 --- .../schemas/funding_account_summary.md | 38 ------ artifacts/apidocs/schemas/funding_payment.md | 33 ----- artifacts/apidocs/schemas/funding_rate.md | 7 -- .../get_claimable_ecosystem_badge_response.md | 56 --------- .../schemas/initial_leverage_result.md | 7 -- artifacts/apidocs/schemas/instrument.md | 88 -------------- artifacts/apidocs/schemas/jsonrpc_request.md | 9 -- artifacts/apidocs/schemas/jsonrpc_response.md | 17 --- artifacts/apidocs/schemas/lp_point.md | 6 - artifacts/apidocs/schemas/lp_snapshot.md | 11 -- artifacts/apidocs/schemas/mini_ticker.md | 14 --- artifacts/apidocs/schemas/order.md | 106 ---------------- artifacts/apidocs/schemas/order_leg.md | 7 -- artifacts/apidocs/schemas/order_metadata.md | 12 -- artifacts/apidocs/schemas/order_state.md | 50 -------- artifacts/apidocs/schemas/order_state_feed.md | 56 --------- artifacts/apidocs/schemas/orderbook_level.md | 6 - artifacts/apidocs/schemas/orderbook_levels.md | 19 --- artifacts/apidocs/schemas/positions.md | 17 --- .../apidocs/schemas/pre_order_check_result.md | 38 ------ ..._epoch_badge_point_distribution_request.md | 13 -- ...epoch_badge_point_distribution_response.md | 37 ------ .../schemas/query_epoch_badge_request.md | 16 --- .../schemas/query_epoch_badge_response.md | 55 --------- .../query_get_latest_lp_snapshot_response.md | 15 --- .../apidocs/schemas/reward_epoch_info.md | 13 -- artifacts/apidocs/schemas/signature.md | 9 -- artifacts/apidocs/schemas/spot_balance.md | 30 ----- artifacts/apidocs/schemas/stream_reference.md | 5 - artifacts/apidocs/schemas/sub_account.md | 91 -------------- .../schemas/sub_account_trade_aggregation.md | 10 -- artifacts/apidocs/schemas/ticker.md | 29 ----- .../apidocs/schemas/tpsl_order_metadata.md | 15 --- artifacts/apidocs/schemas/trade.md | 23 ---- .../schemas/trader_leaderboard_user.md | 7 -- artifacts/apidocs/schemas/trader_metric.md | 5 - artifacts/apidocs/schemas/transfer_history.md | 53 -------- artifacts/apidocs/schemas/withdrawal.md | 41 ------- .../apidocs/schemas/withdrawal_history.md | 43 ------- .../apidocs/schemas/ws_cancel_feed_data_v1.md | 54 --------- .../schemas/ws_cancel_feed_selector_v1.md | 6 - .../schemas/ws_candlestick_feed_data_v1.md | 23 ---- .../ws_candlestick_feed_selector_v1.md | 36 ------ .../schemas/ws_deposit_feed_data_v1.md | 41 ------- .../schemas/ws_deposit_feed_selector_v1.md | 6 - .../apidocs/schemas/ws_fill_feed_data_v1.md | 41 ------- .../schemas/ws_fill_feed_selector_v1.md | 7 -- .../apidocs/schemas/ws_list_streams_params.md | 5 - .../apidocs/schemas/ws_list_streams_result.md | 11 -- .../schemas/ws_mini_ticker_feed_data_v1.md | 22 ---- .../ws_mini_ticker_feed_selector_v1.md | 7 -- .../apidocs/schemas/ws_order_feed_data_v1.md | 114 ------------------ .../schemas/ws_order_feed_selector_v1.md | 7 -- .../schemas/ws_order_state_feed_data_v1.md | 64 ---------- .../ws_order_state_feed_selector_v1.md | 7 -- .../ws_orderbook_levels_feed_data_v1.md | 27 ----- .../ws_orderbook_levels_feed_selector_v1.md | 8 -- .../schemas/ws_positions_feed_data_v1.md | 25 ---- .../schemas/ws_positions_feed_selector_v1.md | 7 -- .../apidocs/schemas/ws_subscribe_params.md | 8 -- .../schemas/ws_subscribe_request_v1_legacy.md | 10 -- .../ws_subscribe_response_v1_legacy.md | 12 -- .../apidocs/schemas/ws_subscribe_result.md | 11 -- .../apidocs/schemas/ws_ticker_feed_data_v1.md | 37 ------ .../schemas/ws_ticker_feed_selector_v1.md | 7 -- .../apidocs/schemas/ws_trade_feed_data_v1.md | 31 ----- .../schemas/ws_trade_feed_selector_v1.md | 7 -- .../schemas/ws_transfer_feed_data_v1.md | 63 ---------- .../schemas/ws_transfer_feed_selector_v1.md | 7 -- .../schemas/ws_unsubscribe_all_params.md | 5 - .../schemas/ws_unsubscribe_all_result.md | 11 -- .../apidocs/schemas/ws_unsubscribe_params.md | 8 -- .../apidocs/schemas/ws_unsubscribe_result.md | 7 -- .../schemas/ws_withdrawal_feed_data_v1.md | 51 -------- .../schemas/ws_withdrawal_feed_selector_v1.md | 6 - src/codegen/apidocs/apidocs.py | 2 +- 197 files changed, 1 insertion(+), 5899 deletions(-) diff --git a/artifacts/apidocs/schemas/ack.md b/artifacts/apidocs/schemas/ack.md index 1bf0092..e69de29 100644 --- a/artifacts/apidocs/schemas/ack.md +++ b/artifacts/apidocs/schemas/ack.md @@ -1,4 +0,0 @@ -!!! info "[Ack](/../../schemas/ack)" - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |ack
`a` |boolean|True|Gravity has acknowledged that the request has been successfully received and it will process it in the backend| diff --git a/artifacts/apidocs/schemas/ack_response.md b/artifacts/apidocs/schemas/ack_response.md index 69f7a8b..e69de29 100644 --- a/artifacts/apidocs/schemas/ack_response.md +++ b/artifacts/apidocs/schemas/ack_response.md @@ -1,10 +0,0 @@ -!!! info "[AckResponse](/../../schemas/ack_response)" - Used to acknowledge a request has been received and will be processed
- - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |result
`r` |Ack|True|The Ack Object| - ??? info "[Ack](/../../schemas/ack)" - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |ack
`a` |boolean|True|Gravity has acknowledged that the request has been successfully received and it will process it in the backend| diff --git a/artifacts/apidocs/schemas/aggregated_account_summary.md b/artifacts/apidocs/schemas/aggregated_account_summary.md index 91f4a10..e69de29 100644 --- a/artifacts/apidocs/schemas/aggregated_account_summary.md +++ b/artifacts/apidocs/schemas/aggregated_account_summary.md @@ -1,36 +0,0 @@ -!!! info "[AggregatedAccountSummary](/../../schemas/aggregated_account_summary)" - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |main_account_id
`ma` |string|True|The main account ID of the account to which the summary belongs| - |total_equity
`te` |string|True|Total equity of the main (+ sub) account, denominated in USD| - |spot_balances
`sb` |[SpotBalance]|True|The list of spot assets owned by this main (+ sub) account, and their balances| - ??? info "[SpotBalance](/../../schemas/spot_balance)" - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |currency
`c` |Currency|True|The currency you hold a spot balance in| - |balance
`b` |string|True|This currency's balance in this trading account.| - |index_price
`ip` |string|True|The index price of this currency. (reported in `USD`)| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
- - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA 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..e69de29 100644 --- a/artifacts/apidocs/schemas/api_aggregated_account_summary_response.md +++ b/artifacts/apidocs/schemas/api_aggregated_account_summary_response.md @@ -1,42 +0,0 @@ -!!! info "[ApiAggregatedAccountSummaryResponse](/../../schemas/api_aggregated_account_summary_response)" - The aggregated account summary, that reports the total equity and spot balances of a funding (main) account, and its constituent trading (sub) accounts
- - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |result
`r` |AggregatedAccountSummary|True|The aggregated account summary| - ??? info "[AggregatedAccountSummary](/../../schemas/aggregated_account_summary)" - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |main_account_id
`ma` |string|True|The main account ID of the account to which the summary belongs| - |total_equity
`te` |string|True|Total equity of the main (+ sub) account, denominated in USD| - |spot_balances
`sb` |[SpotBalance]|True|The list of spot assets owned by this main (+ sub) account, and their balances| - ??? info "[SpotBalance](/../../schemas/spot_balance)" - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |currency
`c` |Currency|True|The currency you hold a spot balance in| - |balance
`b` |string|True|This currency's balance in this trading account.| - |index_price
`ip` |string|True|The index price of this currency. (reported in `USD`)| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
- - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA 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..e69de29 100644 --- a/artifacts/apidocs/schemas/api_cancel_all_orders_request.md +++ b/artifacts/apidocs/schemas/api_cancel_all_orders_request.md @@ -1,66 +0,0 @@ -!!! info "[ApiCancelAllOrdersRequest](/../../schemas/api_cancel_all_orders_request)" - Cancel all orders on the orderbook for this trading account. This may not match new orders in flight.
- - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |sub_account_id
`sa` |string|True|The subaccount ID cancelling all orders| - |kind
`k` |[Kind]|False
`all`|The kind filter to apply. If nil, this defaults to all kinds. Otherwise, only entries matching the filter will be cancelled| - |base
`b` |[Currency]|False
`all`|The base filter to apply. If nil, this defaults to all bases. Otherwise, only entries matching the filter will be cancelled| - |quote
`q` |[Currency]|False
`all`|The quote filter to apply. If nil, this defaults to all quotes. Otherwise, only entries matching the filter will be cancelled| - ??? info "[Kind](/../../schemas/kind)" - The list of asset kinds that are supported on the GRVT exchange
- - |Value| Description | - |-|-| - |`PERPETUAL` = 1|the perpetual asset kind| - |`FUTURE` = 2|the future asset kind| - |`CALL` = 3|the call option asset kind| - |`PUT` = 4|the put option asset kind| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
- - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
- - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/api_cancel_all_orders_response.md b/artifacts/apidocs/schemas/api_cancel_all_orders_response.md index 8894694..e69de29 100644 --- a/artifacts/apidocs/schemas/api_cancel_all_orders_response.md +++ b/artifacts/apidocs/schemas/api_cancel_all_orders_response.md @@ -1,4 +0,0 @@ -!!! info "[ApiCancelAllOrdersResponse](/../../schemas/api_cancel_all_orders_response)" - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |result
`r` |integer|True|The number of orders cancelled| diff --git a/artifacts/apidocs/schemas/api_cancel_on_disconnect_request.md b/artifacts/apidocs/schemas/api_cancel_on_disconnect_request.md index 2fdc090..e69de29 100644 --- a/artifacts/apidocs/schemas/api_cancel_on_disconnect_request.md +++ b/artifacts/apidocs/schemas/api_cancel_on_disconnect_request.md @@ -1,7 +0,0 @@ -!!! info "[ApiCancelOnDisconnectRequest](/../../schemas/api_cancel_on_disconnect_request)" - Auto-Cancel All Open Orders when the countdown time hits zero.

Market Maker inputs a countdown time parameter in milliseconds (e.g. 120000 for 120s) rounded down to the smallest second follows the following logic:
- Market Maker initially entered a value between 0 -> 1000, which is rounded to 0: will result in termination of their COD
- Market Maker initially entered a value between 1001 -> 300_000, which is rounded to the nearest second: will result in refresh of their COD
- Market Maker initially entered a value bigger than 300_000, which will result in error (upper bound)
Market Maker will send a heartbeat message by calling the endpoint at specific intervals (ex. every 30 seconds) to the server to refresh the count down.

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
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |sub_account_id
`sa` |string|True|The subaccount ID cancelling the orders for| - |countdown_time
`ct` |string|False
`1000`|Countdown time in milliseconds (ex. 120000 for 120s).

0 to disable the timer.

Does not accept negative values.

Minimum acceptable value is 1,000.

Maximum acceptable value is 300,000| diff --git a/artifacts/apidocs/schemas/api_cancel_order_request.md b/artifacts/apidocs/schemas/api_cancel_order_request.md index 49be94f..e69de29 100644 --- a/artifacts/apidocs/schemas/api_cancel_order_request.md +++ b/artifacts/apidocs/schemas/api_cancel_order_request.md @@ -1,9 +0,0 @@ -!!! info "[ApiCancelOrderRequest](/../../schemas/api_cancel_order_request)" - Cancel an order on the orderbook for this trading account. Either `order_id` or `client_order_id` must be provided.
- - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |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
`500`|Specifies the time-to-live (in milliseconds) for this cancellation.
During this period, any order creation with a matching `client_order_id` will also be cancelled.
This mechanism helps mitigate time-of-flight issues where cancellations might arrive before the corresponding orders.
Hence, cancellation by `order_id` ignores this field as the exchange can only assign `order_id`s to already-processed order creations.
The duration cannot be negative, is rounded down to the nearest 100ms (e.g., `670` -> `600`, `30` -> `0`) and capped at 5 seconds (i.e., `5000`).
Value of `0` or omission disables the TTL mechanism, so only orders already existing in matcher state at request time will be searched.
| diff --git a/artifacts/apidocs/schemas/api_cancel_order_response.md b/artifacts/apidocs/schemas/api_cancel_order_response.md index 2f66a4c..e69de29 100644 --- a/artifacts/apidocs/schemas/api_cancel_order_response.md +++ b/artifacts/apidocs/schemas/api_cancel_order_response.md @@ -1,110 +0,0 @@ -!!! info "[ApiCancelOrderResponse](/../../schemas/api_cancel_order_response)" - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |result
`r` |Order|True|The cancelled order| - ??? 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| - |trigger
`t` |TriggerOrderMetadata|True|Trigger fields are used to support any type of trigger order such as TP/SL| - |broker
`b` |BrokerTag|False
``|Specifies the broker who brokered the order| - ??? info "[BrokerTag](/../../schemas/broker_tag)" - BrokerTag is a tag for the broker that the order is sent from.
- - ??? 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| diff --git a/artifacts/apidocs/schemas/api_candlestick_request.md b/artifacts/apidocs/schemas/api_candlestick_request.md index 03c8474..e69de29 100644 --- a/artifacts/apidocs/schemas/api_candlestick_request.md +++ b/artifacts/apidocs/schemas/api_candlestick_request.md @@ -1,40 +0,0 @@ -!!! info "[ApiCandlestickRequest](/../../schemas/api_candlestick_request)" - Kline/Candlestick bars for an instrument. Klines are uniquely identified by their instrument, type, interval, and open time.

Pagination works as follows:
  • We perform a reverse chronological lookup, starting from `end_time`. If `end_time` is not set, we start from the most recent data.
  • The lookup is limited to `limit` records. If more data is requested, the response will contain a `next` cursor for you to query the next page.
  • If a `cursor` is provided, it will be used to fetch results from that point onwards.
  • Pagination will continue until the `start_time` is reached. If `start_time` is not set, pagination will continue as far back as our data retention policy allows.

- - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |instrument
`i` |string|True|The readable instrument name:
  • Perpetual: `ETH_USDT_Perp`
  • Future: `BTC_USDT_Fut_20Oct23`
  • Call: `ETH_USDT_Call_20Oct23_2800`
  • Put: `ETH_USDT_Put_20Oct23_2800`
| - |interval
`i1` |CandlestickInterval|True|The interval of each candlestick| - |type
`t` |CandlestickType|True|The type of candlestick data to retrieve| - |start_time
`st` |string|False
`0`|Start time of kline data in unix nanoseconds| - |end_time
`et` |string|False
`now()`|End time of kline data in unix nanoseconds| - |limit
`l` |integer|False
`500`|The limit to query for. Defaults to 500; Max 1000| - |cursor
`c` |string|False
`''`|The cursor to indicate when to start the query from| - ??? info "[CandlestickInterval](/../../schemas/candlestick_interval)" - |Value| Description | - |-|-| - |`CI_1_M` = 1|1 minute| - |`CI_3_M` = 2|3 minutes| - |`CI_5_M` = 3|5 minutes| - |`CI_15_M` = 4|15 minutes| - |`CI_30_M` = 5|30 minutes| - |`CI_1_H` = 6|1 hour| - |`CI_2_H` = 7|2 hour| - |`CI_4_H` = 8|4 hour| - |`CI_6_H` = 9|6 hour| - |`CI_8_H` = 10|8 hour| - |`CI_12_H` = 11|12 hour| - |`CI_1_D` = 12|1 day| - |`CI_3_D` = 13|3 days| - |`CI_5_D` = 14|5 days| - |`CI_1_W` = 15|1 week| - |`CI_2_W` = 16|2 weeks| - |`CI_3_W` = 17|3 weeks| - |`CI_4_W` = 18|4 weeks| - ??? info "[CandlestickType](/../../schemas/candlestick_type)" - |Value| Description | - |-|-| - |`TRADE` = 1|Tracks traded prices| - |`MARK` = 2|Tracks mark prices| - |`INDEX` = 3|Tracks index prices| - |`MID` = 4|Tracks book mid prices| diff --git a/artifacts/apidocs/schemas/api_candlestick_response.md b/artifacts/apidocs/schemas/api_candlestick_response.md index 4f69d76..e69de29 100644 --- a/artifacts/apidocs/schemas/api_candlestick_response.md +++ b/artifacts/apidocs/schemas/api_candlestick_response.md @@ -1,20 +0,0 @@ -!!! info "[ApiCandlestickResponse](/../../schemas/api_candlestick_response)" - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |result
`r` |[Candlestick]|True|The candlestick result set for given interval| - |next
`n` |string|False
`''`|The cursor to indicate when to start the next query from| - ??? info "[Candlestick](/../../schemas/candlestick)" -
- - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |open_time
`ot` |string|True|Open time of kline bar in unix nanoseconds| - |close_time
`ct` |string|True|Close time of kline bar in unix nanosecond| - |open
`o` |string|True|The open price, expressed in underlying currency resolution units| - |close
`c` |string|True|The close price, expressed in underlying currency resolution units| - |high
`h` |string|True|The high price, expressed in underlying currency resolution units| - |low
`l` |string|True|The low price, expressed in underlying currency resolution units| - |volume_b
`vb` |string|True|The underlying volume transacted, expressed in base asset decimal units| - |volume_q
`vq` |string|True|The quote volume transacted, expressed in quote asset decimal units| - |trades
`t` |integer|True|The number of trades transacted| - |instrument
`i` |string|True|The readable instrument name:
  • Perpetual: `ETH_USDT_Perp`
  • Future: `BTC_USDT_Fut_20Oct23`
  • Call: `ETH_USDT_Call_20Oct23_2800`
  • Put: `ETH_USDT_Put_20Oct23_2800`
| diff --git a/artifacts/apidocs/schemas/api_create_order_request.md b/artifacts/apidocs/schemas/api_create_order_request.md index f721ee2..e69de29 100644 --- a/artifacts/apidocs/schemas/api_create_order_request.md +++ b/artifacts/apidocs/schemas/api_create_order_request.md @@ -1,112 +0,0 @@ -!!! info "[ApiCreateOrderRequest](/../../schemas/api_create_order_request)" - Create an order on the orderbook for this trading account.
- - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |order
`o` |Order|True|The order 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| - |trigger
`t` |TriggerOrderMetadata|True|Trigger fields are used to support any type of trigger order such as TP/SL| - |broker
`b` |BrokerTag|False
``|Specifies the broker who brokered the order| - ??? info "[BrokerTag](/../../schemas/broker_tag)" - BrokerTag is a tag for the broker that the order is sent from.
- - ??? 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| diff --git a/artifacts/apidocs/schemas/api_create_order_response.md b/artifacts/apidocs/schemas/api_create_order_response.md index 0a35bc3..e69de29 100644 --- a/artifacts/apidocs/schemas/api_create_order_response.md +++ b/artifacts/apidocs/schemas/api_create_order_response.md @@ -1,110 +0,0 @@ -!!! info "[ApiCreateOrderResponse](/../../schemas/api_create_order_response)" - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |result
`r` |Order|True|The created order| - ??? 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| - |trigger
`t` |TriggerOrderMetadata|True|Trigger fields are used to support any type of trigger order such as TP/SL| - |broker
`b` |BrokerTag|False
``|Specifies the broker who brokered the order| - ??? info "[BrokerTag](/../../schemas/broker_tag)" - BrokerTag is a tag for the broker that the order is sent from.
- - ??? 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| diff --git a/artifacts/apidocs/schemas/api_deposit_history_request.md b/artifacts/apidocs/schemas/api_deposit_history_request.md index 8dd39d9..e69de29 100644 --- a/artifacts/apidocs/schemas/api_deposit_history_request.md +++ b/artifacts/apidocs/schemas/api_deposit_history_request.md @@ -1,34 +0,0 @@ -!!! info "[ApiDepositHistoryRequest](/../../schemas/api_deposit_history_request)" - The request to get the historical deposits of an account
The history is returned in reverse chronological order

Pagination works as follows:
  • We perform a reverse chronological lookup, starting from `end_time`. If `end_time` is not set, we start from the most recent data.
  • The lookup is limited to `limit` records. If more data is requested, the response will contain a `next` cursor for you to query the next page.
  • If a `cursor` is provided, it will be used to fetch results from that point onwards.
  • Pagination will continue until the `start_time` is reached. If `start_time` is not set, pagination will continue as far back as our data retention policy allows.

- - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |currency
`c` |[Currency]|True|The token currency to query for, if nil or empty, return all deposits. Otherwise, only entries matching the filter will be returned| - |start_time
`st` |string|False
`0`|The start time to query for in unix nanoseconds| - |end_time
`et` |string|False
`now()`|The end time to query for in unix nanoseconds| - |limit
`l` |integer|False
`500`|The limit to query for. Defaults to 500; Max 1000| - |cursor
`c1` |string|False
`''`|The cursor to indicate when to start the next query from| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
- - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/api_deposit_history_response.md b/artifacts/apidocs/schemas/api_deposit_history_response.md index b1e6a7e..e69de29 100644 --- a/artifacts/apidocs/schemas/api_deposit_history_response.md +++ b/artifacts/apidocs/schemas/api_deposit_history_response.md @@ -1,40 +0,0 @@ -!!! info "[ApiDepositHistoryResponse](/../../schemas/api_deposit_history_response)" - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |result
`r` |[DepositHistory]|True|The deposit history matching the request account| - |next
`n` |string|False
`''`|The cursor to indicate when to start the next query from| - ??? info "[DepositHistory](/../../schemas/deposit_history)" - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |l_1_hash
`l1` |string|True|The L1 txHash of the deposit| - |l_2_hash
`l2` |string|True|The L2 txHash of the deposit| - |to_account_id
`ta` |string|True|The account to deposit into| - |currency
`c` |Currency|True|The token currency to deposit| - |num_tokens
`nt` |string|True|The number of tokens to deposit| - |initiated_time
`it` |string|True|The timestamp when the deposit was initiated on L1 in unix nanoseconds| - |confirmed_time
`ct` |string|True|The timestamp when the deposit was confirmed on L2 in unix nanoseconds| - |from_address
`fa` |string|True|The address of the sender| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
- - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/api_fill_history_request.md b/artifacts/apidocs/schemas/api_fill_history_request.md index bfb6b4e..e69de29 100644 --- a/artifacts/apidocs/schemas/api_fill_history_request.md +++ b/artifacts/apidocs/schemas/api_fill_history_request.md @@ -1,70 +0,0 @@ -!!! info "[ApiFillHistoryRequest](/../../schemas/api_fill_history_request)" - Query for all historical fills made by a single account. A single order can be matched multiple times, hence there is no real way to uniquely identify a trade.

Pagination works as follows:
  • We perform a reverse chronological lookup, starting from `end_time`. If `end_time` is not set, we start from the most recent data.
  • The lookup is limited to `limit` records. If more data is requested, the response will contain a `next` cursor for you to query the next page.
  • If a `cursor` is provided, it will be used to fetch results from that point onwards.
  • Pagination will continue until the `start_time` is reached. If `start_time` is not set, pagination will continue as far back as our data retention policy allows.

- - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |sub_account_id
`sa` |string|True|The sub account ID to request for| - |kind
`k` |[Kind]|False
`all`|The kind filter to apply. If nil, this defaults to all kinds. Otherwise, only entries matching the filter will be returned| - |base
`b` |[Currency]|False
`all`|The base filter to apply. If nil, this defaults to all bases. Otherwise, only entries matching the filter will be returned| - |quote
`q` |[Currency]|False
`all`|The quote filter to apply. If nil, this defaults to all quotes. Otherwise, only entries matching the filter will be returned| - |start_time
`st` |string|False
`0`|The start time to apply in unix nanoseconds. If nil, this defaults to all start times. Otherwise, only entries matching the filter will be returned| - |end_time
`et` |string|False
`now()`|The end time to apply in unix nanoseconds. If nil, this defaults to all end times. Otherwise, only entries matching the filter will be returned| - |limit
`l` |integer|False
`500`|The limit to query for. Defaults to 500; Max 1000| - |cursor
`c` |string|False
`''`|The cursor to indicate when to start the query from| - ??? info "[Kind](/../../schemas/kind)" - The list of asset kinds that are supported on the GRVT exchange
- - |Value| Description | - |-|-| - |`PERPETUAL` = 1|the perpetual asset kind| - |`FUTURE` = 2|the future asset kind| - |`CALL` = 3|the call option asset kind| - |`PUT` = 4|the put option asset kind| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
- - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
- - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/api_fill_history_response.md b/artifacts/apidocs/schemas/api_fill_history_response.md index 6e01447..e69de29 100644 --- a/artifacts/apidocs/schemas/api_fill_history_response.md +++ b/artifacts/apidocs/schemas/api_fill_history_response.md @@ -1,38 +0,0 @@ -!!! info "[ApiFillHistoryResponse](/../../schemas/api_fill_history_response)" - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |result
`r` |[Fill]|True|The private trades matching the request asset| - |next
`n` |string|True|The cursor to indicate when to start the query from| - ??? info "[Fill](/../../schemas/fill)" - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |event_time
`et` |string|True|Time at which the event was emitted in unix nanoseconds| - |sub_account_id
`sa` |string|True|The sub account ID that participated in the trade| - |instrument
`i` |string|True|The instrument being represented| - |is_buyer
`ib` |boolean|True|The side that the subaccount took on the trade| - |is_taker
`it` |boolean|True|The role that the subaccount took on the trade| - |size
`s` |string|True|The number of assets being traded, expressed in base asset decimal units| - |price
`p` |string|True|The traded price, expressed in `9` decimals| - |mark_price
`mp` |string|True|The mark price of the instrument at point of trade, expressed in `9` decimals| - |index_price
`ip` |string|True|The index price of the instrument at point of trade, expressed in `9` decimals| - |interest_rate
`ir` |string|True|The interest rate of the underlying at point of trade, expressed in centibeeps (1/100th of a basis point)| - |forward_price
`fp` |string|True|[Options] The forward price of the option at point of trade, expressed in `9` decimals| - |realized_pnl
`rp` |string|True|The realized PnL of the trade, expressed in quote asset decimal units (0 if increasing position size)| - |fee
`f` |string|True|The fees paid on the trade, expressed in quote asset decimal unit (negative if maker rebate applied)| - |fee_rate
`fr` |string|True|The fee rate paid on the trade| - |trade_id
`ti` |string|True|A trade identifier, globally unique, and monotonically increasing (not by `1`).
All trades sharing a single taker execution share the same first component (before `-`), and `event_time`.
`trade_id` is guaranteed to be consistent across MarketData `Trade` and Trading `Fill`.| - |order_id
`oi` |string|True|An order identifier| - |venue
`v` |Venue|True|The venue where the trade occurred| - |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| - |signer
`s1` |string|True|The address (public key) of the wallet signing the payload| - |broker
`b` |BrokerTag|False
``|Specifies the broker who brokered the order| - ??? info "[Venue](/../../schemas/venue)" - The list of Trading Venues that are supported on the GRVT exchange
- - |Value| Description | - |-|-| - |`ORDERBOOK` = 1|the trade is cleared on the orderbook venue| - |`RFQ` = 2|the trade is cleared on the RFQ venue| - ??? info "[BrokerTag](/../../schemas/broker_tag)" - BrokerTag is a tag for the broker that the order is sent from.
- diff --git a/artifacts/apidocs/schemas/api_find_ecosystem_epoch_metric_response.md b/artifacts/apidocs/schemas/api_find_ecosystem_epoch_metric_response.md index c48ebd4..e69de29 100644 --- a/artifacts/apidocs/schemas/api_find_ecosystem_epoch_metric_response.md +++ b/artifacts/apidocs/schemas/api_find_ecosystem_epoch_metric_response.md @@ -1,17 +0,0 @@ -!!! info "[ApiFindEcosystemEpochMetricResponse](/../../schemas/api_find_ecosystem_epoch_metric_response)" - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |metric
`m` |EcosystemMetric|True|The epoch metric| - |rank
`r` |integer|True|The rank of the account in the ecosystem| - |total
`t` |integer|True|The total number of accounts in the ecosystem| - |last_calculated_at
`lc` |string|True|The time when the ecosystem points were last calculated| - |total_direct_invite_count
`td` |integer|True|Direct invite count without relying on epochs| - |total_indirect_invite_count
`ti` |integer|True|Indirect invite count without relying on epochs| - ??? info "[EcosystemMetric](/../../schemas/ecosystem_metric)" - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |direct_invite_count
`di` |integer|True|Direct invite count| - |indirect_invite_count
`ii` |integer|True|Indirect invite count| - |direct_invite_trading_volume
`di1` |string|True|Direct invite trading volume| - |indirect_invite_trading_volume
`ii1` |string|True|Indirect invite trading volume| - |total_point
`tp` |string|True|Total ecosystem point of this epoch/phase| diff --git a/artifacts/apidocs/schemas/api_find_ecosystem_leaderboard_response.md b/artifacts/apidocs/schemas/api_find_ecosystem_leaderboard_response.md index a4399ef..e69de29 100644 --- a/artifacts/apidocs/schemas/api_find_ecosystem_leaderboard_response.md +++ b/artifacts/apidocs/schemas/api_find_ecosystem_leaderboard_response.md @@ -1,11 +0,0 @@ -!!! info "[ApiFindEcosystemLeaderboardResponse](/../../schemas/api_find_ecosystem_leaderboard_response)" - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |users
`u` |[EcosystemLeaderboardUser]|True|The list of ecosystem leaderboard users| - ??? info "[EcosystemLeaderboardUser](/../../schemas/ecosystem_leaderboard_user)" - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |account_id
`ai` |string|True|The off chain account id| - |rank
`r` |integer|True|The rank of the account in the ecosystem| - |total_point
`tp` |string|True|Total ecosystem point| - |twitter_username
`tu` |string|True|The twitter username of the account| diff --git a/artifacts/apidocs/schemas/api_find_first_epoch_metric_response.md b/artifacts/apidocs/schemas/api_find_first_epoch_metric_response.md index a5788a9..e69de29 100644 --- a/artifacts/apidocs/schemas/api_find_first_epoch_metric_response.md +++ b/artifacts/apidocs/schemas/api_find_first_epoch_metric_response.md @@ -1,25 +0,0 @@ -!!! info "[ApiFindFirstEpochMetricResponse](/../../schemas/api_find_first_epoch_metric_response)" - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |phase_zero_metric
`pz` |EcosystemMetric|True|Phase zero metric| - |phase_one_metric
`po` |EcosystemMetric|True|Phase one metric| - |rank
`r` |integer|True|The rank of the account in the ecosystem| - |total
`t` |integer|True|The total number of accounts in the ecosystem| - |total_point
`tp` |string|True|Total ecosystem point of the first epoch| - |last_calculated_at
`lc` |string|True|The time when the ecosystem points were last calculated| - ??? info "[EcosystemMetric](/../../schemas/ecosystem_metric)" - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |direct_invite_count
`di` |integer|True|Direct invite count| - |indirect_invite_count
`ii` |integer|True|Indirect invite count| - |direct_invite_trading_volume
`di1` |string|True|Direct invite trading volume| - |indirect_invite_trading_volume
`ii1` |string|True|Indirect invite trading volume| - |total_point
`tp` |string|True|Total ecosystem point of this epoch/phase| - ??? info "[EcosystemMetric](/../../schemas/ecosystem_metric)" - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |direct_invite_count
`di` |integer|True|Direct invite count| - |indirect_invite_count
`ii` |integer|True|Indirect invite count| - |direct_invite_trading_volume
`di1` |string|True|Direct invite trading volume| - |indirect_invite_trading_volume
`ii1` |string|True|Indirect invite trading volume| - |total_point
`tp` |string|True|Total ecosystem point of this epoch/phase| diff --git a/artifacts/apidocs/schemas/api_find_trader_epoch_metric_response.md b/artifacts/apidocs/schemas/api_find_trader_epoch_metric_response.md index 912603d..e69de29 100644 --- a/artifacts/apidocs/schemas/api_find_trader_epoch_metric_response.md +++ b/artifacts/apidocs/schemas/api_find_trader_epoch_metric_response.md @@ -1,12 +0,0 @@ -!!! info "[ApiFindTraderEpochMetricResponse](/../../schemas/api_find_trader_epoch_metric_response)" - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |metric
`m` |TraderMetric|True|Phase zero metric| - |rank
`r` |integer|True|The rank of the account in the trader| - |total
`t` |integer|True|The total number of accounts in the trader| - |last_calculated_at
`lc` |string|True|The time when the trader points were last calculated| - ??? info "[TraderMetric](/../../schemas/trader_metric)" - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |total_fee
`tf` |string|True|Total fee paid| - |total_point
`tp` |number|True|Total trader point of this epoch/phase| diff --git a/artifacts/apidocs/schemas/api_find_trader_leaderboard_response.md b/artifacts/apidocs/schemas/api_find_trader_leaderboard_response.md index 7e17222..e69de29 100644 --- a/artifacts/apidocs/schemas/api_find_trader_leaderboard_response.md +++ b/artifacts/apidocs/schemas/api_find_trader_leaderboard_response.md @@ -1,11 +0,0 @@ -!!! info "[ApiFindTraderLeaderboardResponse](/../../schemas/api_find_trader_leaderboard_response)" - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |users
`u` |[TraderLeaderboardUser]|True|The list of trader leaderboard users| - ??? info "[TraderLeaderboardUser](/../../schemas/trader_leaderboard_user)" - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |account_id
`ai` |string|True|The off chain account id| - |rank
`r` |integer|True|The rank of the account in the Trader| - |total_point
`tp` |number|True|Total Trader point| - |twitter_username
`tu` |string|True|The twitter username of the account| diff --git a/artifacts/apidocs/schemas/api_funding_account_summary_response.md b/artifacts/apidocs/schemas/api_funding_account_summary_response.md index 6fff816..e69de29 100644 --- a/artifacts/apidocs/schemas/api_funding_account_summary_response.md +++ b/artifacts/apidocs/schemas/api_funding_account_summary_response.md @@ -1,44 +0,0 @@ -!!! info "[ApiFundingAccountSummaryResponse](/../../schemas/api_funding_account_summary_response)" - The funding account summary, that reports the total equity and spot balances of a funding (main) account
- - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |result
`r` |FundingAccountSummary|True|The funding account summary| - ??? info "[FundingAccountSummary](/../../schemas/funding_account_summary)" - The funding account summary, that reports the total equity and spot balances of a funding (main) account
- - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |main_account_id
`ma` |string|True|The main account ID of the account to which the summary belongs| - |total_equity
`te` |string|True|Total equity of the main account, denominated in USD| - |spot_balances
`sb` |[SpotBalance]|True|The list of spot assets owned by this main account, and their balances| - ??? info "[SpotBalance](/../../schemas/spot_balance)" - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |currency
`c` |Currency|True|The currency you hold a spot balance in| - |balance
`b` |string|True|This currency's balance in this trading account.| - |index_price
`ip` |string|True|The index price of this currency. (reported in `USD`)| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
- - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/api_funding_payment_history_request.md b/artifacts/apidocs/schemas/api_funding_payment_history_request.md index 33f4166..e69de29 100644 --- a/artifacts/apidocs/schemas/api_funding_payment_history_request.md +++ b/artifacts/apidocs/schemas/api_funding_payment_history_request.md @@ -1,11 +0,0 @@ -!!! info "[ApiFundingPaymentHistoryRequest](/../../schemas/api_funding_payment_history_request)" - Query for all historical funding payments made by a single account.

Pagination works as follows:
  • We perform a reverse chronological lookup, starting from `end_time`. If `end_time` is not set, we start from the most recent data.
  • The lookup is limited to `limit` records. If more data is requested, the response will contain a `next` cursor for you to query the next page.
  • If a `cursor` is provided, it will be used to fetch results from that point onwards.
  • Pagination will continue until the `start_time` is reached. If `start_time` is not set, pagination will continue as far back as our data retention policy allows.

- - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |sub_account_id
`sa` |string|True|The sub account ID to request for| - |instrument
`i` |string|False
`all`|The perpetual instrument to filter for| - |start_time
`st` |string|False
`0`|The start time to apply in unix nanoseconds. If nil, this defaults to all start times. Otherwise, only entries matching the filter will be returned| - |end_time
`et` |string|False
`now()`|The end time to apply in unix nanoseconds. If nil, this defaults to all end times. Otherwise, only entries matching the filter will be returned| - |limit
`l` |integer|False
`500`|The limit to query for. Defaults to 500; Max 1000| - |cursor
`c` |string|False
`''`|The cursor to indicate when to start the query from| diff --git a/artifacts/apidocs/schemas/api_funding_payment_history_response.md b/artifacts/apidocs/schemas/api_funding_payment_history_response.md index 00b1fa8..e69de29 100644 --- a/artifacts/apidocs/schemas/api_funding_payment_history_response.md +++ b/artifacts/apidocs/schemas/api_funding_payment_history_response.md @@ -1,38 +0,0 @@ -!!! info "[ApiFundingPaymentHistoryResponse](/../../schemas/api_funding_payment_history_response)" - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |result
`r` |[FundingPayment]|True|The funding payments matching the request asset| - |next
`n` |string|True|The cursor to indicate when to start the query from| - ??? info "[FundingPayment](/../../schemas/funding_payment)" - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |event_time
`et` |string|True|Time at which the event was emitted in unix nanoseconds| - |sub_account_id
`sa` |string|True|The sub account ID that made the funding payment| - |instrument
`i` |string|True|The perpetual instrument being funded| - |currency
`c` |Currency|True|The currency of the funding payment| - |amount
`a` |string|True|The amount of the funding payment. Positive if paid, negative if received| - |tx_id
`ti` |string|True|The transaction ID of the funding payment.
Funding payments can be triggered by a trade, transfer, or liquidation.
The `tx_id` will match the corresponding `trade_id` or `tx_id`.| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
- - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/api_funding_rate_request.md b/artifacts/apidocs/schemas/api_funding_rate_request.md index 6389aa5..e69de29 100644 --- a/artifacts/apidocs/schemas/api_funding_rate_request.md +++ b/artifacts/apidocs/schemas/api_funding_rate_request.md @@ -1,10 +0,0 @@ -!!! info "[ApiFundingRateRequest](/../../schemas/api_funding_rate_request)" - Lookup the historical funding rate of a perpetual future.

Pagination works as follows:
  • We perform a reverse chronological lookup, starting from `end_time`. If `end_time` is not set, we start from the most recent data.
  • The lookup is limited to `limit` records. If more data is requested, the response will contain a `next` cursor for you to query the next page.
  • If a `cursor` is provided, it will be used to fetch results from that point onwards.
  • Pagination will continue until the `start_time` is reached. If `start_time` is not set, pagination will continue as far back as our data retention policy allows.

- - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |instrument
`i` |string|True|The readable instrument name:
  • Perpetual: `ETH_USDT_Perp`
  • Future: `BTC_USDT_Fut_20Oct23`
  • Call: `ETH_USDT_Call_20Oct23_2800`
  • Put: `ETH_USDT_Put_20Oct23_2800`
| - |start_time
`st` |string|False
`0`|Start time of funding rate in unix nanoseconds| - |end_time
`et` |string|False
`now()`|End time of funding rate in unix nanoseconds| - |limit
`l` |integer|False
`500`|The limit to query for. Defaults to 500; Max 1000| - |cursor
`c` |string|False
`''`|The cursor to indicate when to start the query from| diff --git a/artifacts/apidocs/schemas/api_funding_rate_response.md b/artifacts/apidocs/schemas/api_funding_rate_response.md index ba70608..e69de29 100644 --- a/artifacts/apidocs/schemas/api_funding_rate_response.md +++ b/artifacts/apidocs/schemas/api_funding_rate_response.md @@ -1,12 +0,0 @@ -!!! info "[ApiFundingRateResponse](/../../schemas/api_funding_rate_response)" - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |result
`r` |[FundingRate]|True|The funding rate result set for given interval| - |next
`n` |string|False
`''`|The cursor to indicate when to start the next query from| - ??? info "[FundingRate](/../../schemas/funding_rate)" - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |instrument
`i` |string|True|The readable instrument name:
  • Perpetual: `ETH_USDT_Perp`
  • Future: `BTC_USDT_Fut_20Oct23`
  • Call: `ETH_USDT_Call_20Oct23_2800`
  • Put: `ETH_USDT_Put_20Oct23_2800`
| - |funding_rate
`fr` |string|True|The funding rate of the instrument, expressed in percentage points| - |funding_time
`ft` |string|True|The funding timestamp of the funding rate, expressed in unix nanoseconds| - |mark_price
`mp` |string|True|The mark price of the instrument at funding timestamp, expressed in `9` decimals| diff --git a/artifacts/apidocs/schemas/api_get_all_initial_leverage_request.md b/artifacts/apidocs/schemas/api_get_all_initial_leverage_request.md index e09d435..e69de29 100644 --- a/artifacts/apidocs/schemas/api_get_all_initial_leverage_request.md +++ b/artifacts/apidocs/schemas/api_get_all_initial_leverage_request.md @@ -1,6 +0,0 @@ -!!! info "[ApiGetAllInitialLeverageRequest](/../../schemas/api_get_all_initial_leverage_request)" - The request to get the initial leverage of a sub account
- - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |sub_account_id
`sa` |string|True|The sub account ID to get the leverage for| diff --git a/artifacts/apidocs/schemas/api_get_all_initial_leverage_response.md b/artifacts/apidocs/schemas/api_get_all_initial_leverage_response.md index 55a1e63..e69de29 100644 --- a/artifacts/apidocs/schemas/api_get_all_initial_leverage_response.md +++ b/artifacts/apidocs/schemas/api_get_all_initial_leverage_response.md @@ -1,13 +0,0 @@ -!!! info "[ApiGetAllInitialLeverageResponse](/../../schemas/api_get_all_initial_leverage_response)" - The response to get the initial leverage of a sub account
- - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |results
`r` |[InitialLeverageResult]|True|The initial leverage of the sub account| - ??? info "[InitialLeverageResult](/../../schemas/initial_leverage_result)" - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |instrument
`i` |string|True|The instrument to get the leverage for| - |leverage
`l` |string|True|The initial leverage of the sub account| - |min_leverage
`ml` |string|True|The min leverage this sub account can set| - |max_leverage
`ml1` |string|True|The max leverage this sub account can set| diff --git a/artifacts/apidocs/schemas/api_get_all_instruments_request.md b/artifacts/apidocs/schemas/api_get_all_instruments_request.md index c13510d..e69de29 100644 --- a/artifacts/apidocs/schemas/api_get_all_instruments_request.md +++ b/artifacts/apidocs/schemas/api_get_all_instruments_request.md @@ -1,6 +0,0 @@ -!!! info "[ApiGetAllInstrumentsRequest](/../../schemas/api_get_all_instruments_request)" - Fetch all instruments
- - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |is_active
`ia` |boolean|False
`false`|Fetch only active instruments| diff --git a/artifacts/apidocs/schemas/api_get_all_instruments_response.md b/artifacts/apidocs/schemas/api_get_all_instruments_response.md index 194a032..e69de29 100644 --- a/artifacts/apidocs/schemas/api_get_all_instruments_response.md +++ b/artifacts/apidocs/schemas/api_get_all_instruments_response.md @@ -1,92 +0,0 @@ -!!! info "[ApiGetAllInstrumentsResponse](/../../schemas/api_get_all_instruments_response)" - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |result
`r` |[Instrument]|True|List of instruments| - ??? info "[Instrument](/../../schemas/instrument)" - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |instrument
`i` |string|True|The readable instrument name:
  • Perpetual: `ETH_USDT_Perp`
  • Future: `BTC_USDT_Fut_20Oct23`
  • Call: `ETH_USDT_Call_20Oct23_2800`
  • Put: `ETH_USDT_Put_20Oct23_2800`
| - |instrument_hash
`ih` |string|True|The asset ID used for instrument signing.| - |base
`b` |Currency|True|The base currency| - |quote
`q` |Currency|True|The quote currency| - |kind
`k` |Kind|True|The kind of instrument| - |venues
`v` |[Venue]|True|Venues that this instrument can be traded at| - |settlement_period
`sp1` |InstrumentSettlementPeriod|True|The settlement period of the instrument| - |base_decimals
`bd` |integer|True|The smallest denomination of the base asset supported by GRVT (+3 represents 0.001, -3 represents 1000, 0 represents 1)| - |quote_decimals
`qd` |integer|True|The smallest denomination of the quote asset supported by GRVT (+3 represents 0.001, -3 represents 1000, 0 represents 1)| - |tick_size
`ts` |string|True|The size of a single tick, expressed in price decimal units| - |min_size
`ms` |string|True|The minimum contract size, expressed in base asset decimal units| - |create_time
`ct` |string|True|Creation time in unix nanoseconds| - |max_position_size
`mp` |string|True|The maximum position size, expressed in base asset decimal units| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
- - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
- - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| - ??? info "[Kind](/../../schemas/kind)" - The list of asset kinds that are supported on the GRVT exchange
- - |Value| Description | - |-|-| - |`PERPETUAL` = 1|the perpetual asset kind| - |`FUTURE` = 2|the future asset kind| - |`CALL` = 3|the call option asset kind| - |`PUT` = 4|the put option asset kind| - ??? info "[Venue](/../../schemas/venue)" - The list of Trading Venues that are supported on the GRVT exchange
- - |Value| Description | - |-|-| - |`ORDERBOOK` = 1|the trade is cleared on the orderbook venue| - |`RFQ` = 2|the trade is cleared on the RFQ venue| - ??? info "[InstrumentSettlementPeriod](/../../schemas/instrument_settlement_period)" - |Value| Description | - |-|-| - |`PERPETUAL` = 1|Instrument settles through perpetual funding cycles| - |`DAILY` = 2|Instrument settles at an expiry date, marked as a daily instrument| - |`WEEKLY` = 3|Instrument settles at an expiry date, marked as a weekly instrument| - |`MONTHLY` = 4|Instrument settles at an expiry date, marked as a monthly instrument| - |`QUARTERLY` = 5|Instrument settles at an expiry date, marked as a quarterly instrument| diff --git a/artifacts/apidocs/schemas/api_get_ecosystem_leaderboard_request.md b/artifacts/apidocs/schemas/api_get_ecosystem_leaderboard_request.md index 209678b..e69de29 100644 --- a/artifacts/apidocs/schemas/api_get_ecosystem_leaderboard_request.md +++ b/artifacts/apidocs/schemas/api_get_ecosystem_leaderboard_request.md @@ -1,5 +0,0 @@ -!!! info "[ApiGetEcosystemLeaderboardRequest](/../../schemas/api_get_ecosystem_leaderboard_request)" - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |calculate_from
`cf` |string|True|Start time of the epoch - phase| - |limit
`l` |integer|True|The number of accounts to return| diff --git a/artifacts/apidocs/schemas/api_get_ecosystem_leaderboard_response.md b/artifacts/apidocs/schemas/api_get_ecosystem_leaderboard_response.md index 4e64a5b..e69de29 100644 --- a/artifacts/apidocs/schemas/api_get_ecosystem_leaderboard_response.md +++ b/artifacts/apidocs/schemas/api_get_ecosystem_leaderboard_response.md @@ -1,20 +0,0 @@ -!!! info "[ApiGetEcosystemLeaderboardResponse](/../../schemas/api_get_ecosystem_leaderboard_response)" - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |points
`p` |[EcosystemPoint]|True|The list of ecosystem points| - ??? info "[EcosystemPoint](/../../schemas/ecosystem_point)" -
- - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |account_id
`ai` |string|True|The off chain account id| - |main_account_id
`ma` |string|True|The main account id| - |total_point
`tp` |string|True|Total ecosystem point| - |direct_invite_count
`di` |integer|True|Direct invite count| - |indirect_invite_count
`ii` |integer|True|Indirect invite count| - |direct_invite_trading_volume
`di1` |string|True|Direct invite trading volume| - |indirect_invite_trading_volume
`ii1` |string|True|Indirect invite trading volume| - |calculate_at
`ca` |string|True|The time when the ecosystem point is calculated| - |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| diff --git a/artifacts/apidocs/schemas/api_get_ecosystem_referral_stat_response.md b/artifacts/apidocs/schemas/api_get_ecosystem_referral_stat_response.md index a8c80f0..e69de29 100644 --- a/artifacts/apidocs/schemas/api_get_ecosystem_referral_stat_response.md +++ b/artifacts/apidocs/schemas/api_get_ecosystem_referral_stat_response.md @@ -1,7 +0,0 @@ -!!! info "[ApiGetEcosystemReferralStatResponse](/../../schemas/api_get_ecosystem_referral_stat_response)" - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |direct_invite_count
`di` |integer|True|Direct invite count| - |indirect_invite_count
`ii` |integer|True|Indirect invite count| - |direct_invite_trading_volume
`di1` |string|True|Total volume traded by direct invites multiple by 1e9| - |indirect_invite_trading_volume
`ii1` |string|True|Total volume traded by indirect invites multiple by 1e9| diff --git a/artifacts/apidocs/schemas/api_get_filtered_instruments_request.md b/artifacts/apidocs/schemas/api_get_filtered_instruments_request.md index 91afdfb..e69de29 100644 --- a/artifacts/apidocs/schemas/api_get_filtered_instruments_request.md +++ b/artifacts/apidocs/schemas/api_get_filtered_instruments_request.md @@ -1,67 +0,0 @@ -!!! info "[ApiGetFilteredInstrumentsRequest](/../../schemas/api_get_filtered_instruments_request)" - Fetch a list of instruments based on the filters provided
- - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |kind
`k` |[Kind]|False
`all`|The kind filter to apply. If nil, this defaults to all kinds. Otherwise, only entries matching the filter will be returned| - |base
`b` |[Currency]|False
`all`|The base filter to apply. If nil, this defaults to all bases. Otherwise, only entries matching the filter will be returned| - |quote
`q` |[Currency]|False
`all`|The quote filter to apply. If nil, this defaults to all quotes. Otherwise, only entries matching the filter will be returned| - |is_active
`ia` |boolean|False
`false`|Request for active instruments only| - |limit
`l` |integer|False
`500`|The limit to query for. Defaults to 500; Max 100000| - ??? info "[Kind](/../../schemas/kind)" - The list of asset kinds that are supported on the GRVT exchange
- - |Value| Description | - |-|-| - |`PERPETUAL` = 1|the perpetual asset kind| - |`FUTURE` = 2|the future asset kind| - |`CALL` = 3|the call option asset kind| - |`PUT` = 4|the put option asset kind| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
- - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
- - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA 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..e69de29 100644 --- a/artifacts/apidocs/schemas/api_get_filtered_instruments_response.md +++ b/artifacts/apidocs/schemas/api_get_filtered_instruments_response.md @@ -1,92 +0,0 @@ -!!! info "[ApiGetFilteredInstrumentsResponse](/../../schemas/api_get_filtered_instruments_response)" - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |result
`r` |[Instrument]|True|The instruments matching the request filter| - ??? info "[Instrument](/../../schemas/instrument)" - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |instrument
`i` |string|True|The readable instrument name:
  • Perpetual: `ETH_USDT_Perp`
  • Future: `BTC_USDT_Fut_20Oct23`
  • Call: `ETH_USDT_Call_20Oct23_2800`
  • Put: `ETH_USDT_Put_20Oct23_2800`
| - |instrument_hash
`ih` |string|True|The asset ID used for instrument signing.| - |base
`b` |Currency|True|The base currency| - |quote
`q` |Currency|True|The quote currency| - |kind
`k` |Kind|True|The kind of instrument| - |venues
`v` |[Venue]|True|Venues that this instrument can be traded at| - |settlement_period
`sp1` |InstrumentSettlementPeriod|True|The settlement period of the instrument| - |base_decimals
`bd` |integer|True|The smallest denomination of the base asset supported by GRVT (+3 represents 0.001, -3 represents 1000, 0 represents 1)| - |quote_decimals
`qd` |integer|True|The smallest denomination of the quote asset supported by GRVT (+3 represents 0.001, -3 represents 1000, 0 represents 1)| - |tick_size
`ts` |string|True|The size of a single tick, expressed in price decimal units| - |min_size
`ms` |string|True|The minimum contract size, expressed in base asset decimal units| - |create_time
`ct` |string|True|Creation time in unix nanoseconds| - |max_position_size
`mp` |string|True|The maximum position size, expressed in base asset decimal units| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
- - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
- - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| - ??? info "[Kind](/../../schemas/kind)" - The list of asset kinds that are supported on the GRVT exchange
- - |Value| Description | - |-|-| - |`PERPETUAL` = 1|the perpetual asset kind| - |`FUTURE` = 2|the future asset kind| - |`CALL` = 3|the call option asset kind| - |`PUT` = 4|the put option asset kind| - ??? info "[Venue](/../../schemas/venue)" - The list of Trading Venues that are supported on the GRVT exchange
- - |Value| Description | - |-|-| - |`ORDERBOOK` = 1|the trade is cleared on the orderbook venue| - |`RFQ` = 2|the trade is cleared on the RFQ venue| - ??? info "[InstrumentSettlementPeriod](/../../schemas/instrument_settlement_period)" - |Value| Description | - |-|-| - |`PERPETUAL` = 1|Instrument settles through perpetual funding cycles| - |`DAILY` = 2|Instrument settles at an expiry date, marked as a daily instrument| - |`WEEKLY` = 3|Instrument settles at an expiry date, marked as a weekly instrument| - |`MONTHLY` = 4|Instrument settles at an expiry date, marked as a monthly instrument| - |`QUARTERLY` = 5|Instrument settles at an expiry date, marked as a quarterly instrument| diff --git a/artifacts/apidocs/schemas/api_get_instrument_request.md b/artifacts/apidocs/schemas/api_get_instrument_request.md index a54cf3f..e69de29 100644 --- a/artifacts/apidocs/schemas/api_get_instrument_request.md +++ b/artifacts/apidocs/schemas/api_get_instrument_request.md @@ -1,6 +0,0 @@ -!!! info "[ApiGetInstrumentRequest](/../../schemas/api_get_instrument_request)" - Fetch a single instrument by supplying the asset or instrument name
- - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |instrument
`i` |string|True|The readable instrument name:
  • Perpetual: `ETH_USDT_Perp`
  • Future: `BTC_USDT_Fut_20Oct23`
  • Call: `ETH_USDT_Call_20Oct23_2800`
  • Put: `ETH_USDT_Put_20Oct23_2800`
| diff --git a/artifacts/apidocs/schemas/api_get_instrument_response.md b/artifacts/apidocs/schemas/api_get_instrument_response.md index c345b82..e69de29 100644 --- a/artifacts/apidocs/schemas/api_get_instrument_response.md +++ b/artifacts/apidocs/schemas/api_get_instrument_response.md @@ -1,92 +0,0 @@ -!!! info "[ApiGetInstrumentResponse](/../../schemas/api_get_instrument_response)" - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |result
`r` |Instrument|True|The instrument matching the request asset| - ??? info "[Instrument](/../../schemas/instrument)" - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |instrument
`i` |string|True|The readable instrument name:
  • Perpetual: `ETH_USDT_Perp`
  • Future: `BTC_USDT_Fut_20Oct23`
  • Call: `ETH_USDT_Call_20Oct23_2800`
  • Put: `ETH_USDT_Put_20Oct23_2800`
| - |instrument_hash
`ih` |string|True|The asset ID used for instrument signing.| - |base
`b` |Currency|True|The base currency| - |quote
`q` |Currency|True|The quote currency| - |kind
`k` |Kind|True|The kind of instrument| - |venues
`v` |[Venue]|True|Venues that this instrument can be traded at| - |settlement_period
`sp1` |InstrumentSettlementPeriod|True|The settlement period of the instrument| - |base_decimals
`bd` |integer|True|The smallest denomination of the base asset supported by GRVT (+3 represents 0.001, -3 represents 1000, 0 represents 1)| - |quote_decimals
`qd` |integer|True|The smallest denomination of the quote asset supported by GRVT (+3 represents 0.001, -3 represents 1000, 0 represents 1)| - |tick_size
`ts` |string|True|The size of a single tick, expressed in price decimal units| - |min_size
`ms` |string|True|The minimum contract size, expressed in base asset decimal units| - |create_time
`ct` |string|True|Creation time in unix nanoseconds| - |max_position_size
`mp` |string|True|The maximum position size, expressed in base asset decimal units| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
- - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
- - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| - ??? info "[Kind](/../../schemas/kind)" - The list of asset kinds that are supported on the GRVT exchange
- - |Value| Description | - |-|-| - |`PERPETUAL` = 1|the perpetual asset kind| - |`FUTURE` = 2|the future asset kind| - |`CALL` = 3|the call option asset kind| - |`PUT` = 4|the put option asset kind| - ??? info "[Venue](/../../schemas/venue)" - The list of Trading Venues that are supported on the GRVT exchange
- - |Value| Description | - |-|-| - |`ORDERBOOK` = 1|the trade is cleared on the orderbook venue| - |`RFQ` = 2|the trade is cleared on the RFQ venue| - ??? info "[InstrumentSettlementPeriod](/../../schemas/instrument_settlement_period)" - |Value| Description | - |-|-| - |`PERPETUAL` = 1|Instrument settles through perpetual funding cycles| - |`DAILY` = 2|Instrument settles at an expiry date, marked as a daily instrument| - |`WEEKLY` = 3|Instrument settles at an expiry date, marked as a weekly instrument| - |`MONTHLY` = 4|Instrument settles at an expiry date, marked as a monthly instrument| - |`QUARTERLY` = 5|Instrument settles at an expiry date, marked as a quarterly instrument| 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..e69de29 100644 --- a/artifacts/apidocs/schemas/api_get_latest_lp_snapshot_request.md +++ b/artifacts/apidocs/schemas/api_get_latest_lp_snapshot_request.md @@ -1,38 +0,0 @@ -!!! info "[ApiGetLatestLPSnapshotRequest](/../../schemas/api_get_latest_lp_snapshot_request)" - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |kind
`k` |Kind|False
`0`|The kind filter to apply| - |base
`b` |Currency|False
`0`|The base filter to apply| - ??? info "[Kind](/../../schemas/kind)" - The list of asset kinds that are supported on the GRVT exchange
- - |Value| Description | - |-|-| - |`PERPETUAL` = 1|the perpetual asset kind| - |`FUTURE` = 2|the future asset kind| - |`CALL` = 3|the call option asset kind| - |`PUT` = 4|the put option asset kind| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
- - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/api_get_latest_lp_snapshot_response.md b/artifacts/apidocs/schemas/api_get_latest_lp_snapshot_response.md index fecc350..e69de29 100644 --- a/artifacts/apidocs/schemas/api_get_latest_lp_snapshot_response.md +++ b/artifacts/apidocs/schemas/api_get_latest_lp_snapshot_response.md @@ -1,14 +0,0 @@ -!!! info "[ApiGetLatestLPSnapshotResponse](/../../schemas/api_get_latest_lp_snapshot_response)" - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |snapshot
`s` |ApproximateLPSnapshot|True|The latest LP snapshot| - ??? info "[ApproximateLPSnapshot](/../../schemas/approximate_lp_snapshot)" - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |main_account_id
`ma` |string|True|The main account id| - |underlying_multiplier
`um` |string|True|Underlying multiplier| - |market_share_multiplier
`ms` |string|True|Market share multiplier| - |bid_fast_market_multiplier
`bf` |integer|True|Fast market multiplier| - |ask_fast_market_multiplier
`af` |integer|True|Fast market multiplier| - |liquidity_score
`ls` |string|True|Liquidity score| - |calculate_at
`ca` |string|True|The time when the snapshot was calculated| diff --git a/artifacts/apidocs/schemas/api_get_list_epoch_badge_response.md b/artifacts/apidocs/schemas/api_get_list_epoch_badge_response.md index 115d6d5..e69de29 100644 --- a/artifacts/apidocs/schemas/api_get_list_epoch_badge_response.md +++ b/artifacts/apidocs/schemas/api_get_list_epoch_badge_response.md @@ -1,54 +0,0 @@ -!!! info "[ApiGetListEpochBadgeResponse](/../../schemas/api_get_list_epoch_badge_response)" - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |result
`r` |[EpochBadge]|True|The list of epoch badges| - ??? info "[EpochBadge](/../../schemas/epoch_badge)" - |Name
`Lite`|Type|Required
`Default`| Description | - |-|-|-|-| - |account_id
`ai` |string|True|The off chain account id| - |main_account_id
`ma` |string|True|The account ID| - |type
`t` |RewardProgramType|True|The type of the reward program| - |epoch
`e` |integer|True|The epoch number| - |epoch_start_time
`es` |string|True|The start time of the epoch| - |epoch_end_time
`ee` |string|True|The end time of the epoch| - |badge
`b` |EpochBadgeType|True|The type of the badge| - |distributed_badges
`db` |[EpochBadgeType]|True|The distributed badges| - |total_point
`tp` |string|True|Total point| - |rank
`r` |integer|True|Rank| - |claimed_at
`ca` |string|True|The time when the badge was claimed, or the epoch end time if the user has already completed the KYC process| - ??? info "[RewardProgramType](/../../schemas/reward_program_type)" - |Value| Description | - |-|-| - |`ECOSYSTEM` = 1|| - |`TRADER` = 2|| - |`LP` = 3|| - ??? info "[EpochBadgeType](/../../schemas/epoch_badge_type)" - |Value| Description | - |-|-| - |`CHAMPION` = 1|Champion| - |`LEGEND` = 2|Legend| - |`VETERAN` = 3|Veteran| - |`ELITE` = 4|Elite| - |`MASTER` = 5|Master| - |`EXPERT` = 6|Expert| - |`WARRIOR` = 7|Warrior| - |`SERGEANT` = 8|Sergeant| - |`RANGER` = 9|Ranger| - |`CHALLENGER` = 10|Challenger| - |`APPRENTICE` = 11|Apprentice| - |`ROOKIE` = 12|Rookie| - ??? info "[EpochBadgeType](/../../schemas/epoch_badge_type)" - |Value| Description | - |-|-| - |`CHAMPION` = 1|Champion| - |`LEGEND` = 2|Legend| - |`VETERAN` = 3|Veteran| - |`ELITE` = 4|Elite| - |`MASTER` = 5|Master| - |`EXPERT` = 6|Expert| - |`WARRIOR` = 7|Warrior| - |`SERGEANT` = 8|Sergeant| - |`RANGER` = 9|Ranger| - |`CHALLENGER` = 10|Challenger| - |`APPRENTICE` = 11|Apprentice| - |`ROOKIE` = 12|Rookie| diff --git a/artifacts/apidocs/schemas/api_get_list_flat_referral_request.md b/artifacts/apidocs/schemas/api_get_list_flat_referral_request.md index c67e647..e69de29 100644 --- a/artifacts/apidocs/schemas/api_get_list_flat_referral_request.md +++ b/artifacts/apidocs/schemas/api_get_list_flat_referral_request.md @@ -1,9 +0,0 @@ -!!! info "[ApiGetListFlatReferralRequest](/../../schemas/api_get_list_flat_referral_request)" - startTime and endTime are optional parameters. The semantics of these parameters are as follows:

    - - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |referral_id
    `ri` |string|True|The off chain referrer account id to get all flat referrals| - |start_time
    `st` |string|False
    `0`|Optional. Start time in unix nanoseconds| - |end_time
    `et` |string|False
    `now()`|Optional. End time in unix nanoseconds| - |account_id
    `ai` |string|True|The off chain account id to get all user's referrers| diff --git a/artifacts/apidocs/schemas/api_get_list_flat_referral_response.md b/artifacts/apidocs/schemas/api_get_list_flat_referral_response.md index 01d3d78..e69de29 100644 --- a/artifacts/apidocs/schemas/api_get_list_flat_referral_response.md +++ b/artifacts/apidocs/schemas/api_get_list_flat_referral_response.md @@ -1,19 +0,0 @@ -!!! info "[ApiGetListFlatReferralResponse](/../../schemas/api_get_list_flat_referral_response)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |flat_referrals
    `fr` |[FlatReferral]|True|The list of flat referrals| - ??? info "[FlatReferral](/../../schemas/flat_referral)" -
    - - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |account_id
    `ai` |string|True|The off chain account id| - |referrer_id
    `ri` |string|True|The off chain referrer account id| - |referrer_level
    `rl` |integer|True|The referrer level; 1: direct referrer, 2: indirect referrer| - |account_create_time
    `ac` |string|True|The account creation time| - |main_account_id
    `ma` |string|True|The main account id| - |referrer_main_account_id
    `rm` |string|True|The referrer main account id| - |is_business
    `ib` |boolean|True|The account is a business account or not| - |is_kyc_completed
    `ik` |boolean|True|The account is KYC verified or not| - |kyc_completed_at
    `kc` |string|True|The KYC completed time| - |kyc_type
    `kt` |string|True|The KYC type, can be 'individual' or 'business'| diff --git a/artifacts/apidocs/schemas/api_get_list_reward_epoch_response.md b/artifacts/apidocs/schemas/api_get_list_reward_epoch_response.md index 6d1f1ff..e69de29 100644 --- a/artifacts/apidocs/schemas/api_get_list_reward_epoch_response.md +++ b/artifacts/apidocs/schemas/api_get_list_reward_epoch_response.md @@ -1,31 +0,0 @@ -!!! info "[ApiGetListRewardEpochResponse](/../../schemas/api_get_list_reward_epoch_response)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |ecosystem_epochs
    `ee` |[RewardEpochInfo]|True|The list of epoch for ecosystem reward| - |trading_epochs
    `te` |[RewardEpochInfo]|True|The list of epoch for trader reward and lp reward| - ??? info "[RewardEpochInfo](/../../schemas/reward_epoch_info)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |epoch
    `e` |integer|True|The epoch number| - |epoch_start_time
    `es` |string|True|The start time of the epoch| - |epoch_end_time
    `ee` |string|True|The end time of the epoch| - |status
    `s` |RewardEpochStatus|True|The status of the epoch| - ??? info "[RewardEpochStatus](/../../schemas/reward_epoch_status)" - |Value| Description | - |-|-| - |`PAST` = 1|Past| - |`CURRENT` = 2|Current| - |`FUTURE` = 3|Future| - ??? info "[RewardEpochInfo](/../../schemas/reward_epoch_info)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |epoch
    `e` |integer|True|The epoch number| - |epoch_start_time
    `es` |string|True|The start time of the epoch| - |epoch_end_time
    `ee` |string|True|The end time of the epoch| - |status
    `s` |RewardEpochStatus|True|The status of the epoch| - ??? info "[RewardEpochStatus](/../../schemas/reward_epoch_status)" - |Value| Description | - |-|-| - |`PAST` = 1|Past| - |`CURRENT` = 2|Current| - |`FUTURE` = 3|Future| diff --git a/artifacts/apidocs/schemas/api_get_lp_info_request.md b/artifacts/apidocs/schemas/api_get_lp_info_request.md index 3b014c4..e69de29 100644 --- a/artifacts/apidocs/schemas/api_get_lp_info_request.md +++ b/artifacts/apidocs/schemas/api_get_lp_info_request.md @@ -1,38 +0,0 @@ -!!! info "[ApiGetLPInfoRequest](/../../schemas/api_get_lp_info_request)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |kind
    `k` |Kind|True|The kind filter to apply| - |base
    `b` |Currency|False
    `0`|The base filter to apply| - ??? info "[Kind](/../../schemas/kind)" - The list of asset kinds that are supported on the GRVT exchange
    - - |Value| Description | - |-|-| - |`PERPETUAL` = 1|the perpetual asset kind| - |`FUTURE` = 2|the future asset kind| - |`CALL` = 3|the call option asset kind| - |`PUT` = 4|the put option asset kind| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
    - - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/api_get_lp_info_response.md b/artifacts/apidocs/schemas/api_get_lp_info_response.md index fe27632..e69de29 100644 --- a/artifacts/apidocs/schemas/api_get_lp_info_response.md +++ b/artifacts/apidocs/schemas/api_get_lp_info_response.md @@ -1,11 +0,0 @@ -!!! info "[ApiGetLPInfoResponse](/../../schemas/api_get_lp_info_response)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |is_lp_maker
    `il` |boolean|True|Is LP maker| - |spread_score_value_multiplier
    `ss` |string|True|The spread score value multiplier| - |depth_score_value_multiplier
    `ds` |string|True|The depth score value multiplier| - |market_share_value_multiplier
    `ms` |string|True|The market share value multiplier| - |underlying_multiplier
    `um` |string|True|Underlying multiplier| - |market_share_multiplier
    `ms1` |string|True|The market share multiplier, equal to the maker trading volume in the past 2 hours| - |ask_fast_market_multiplier
    `af` |integer|True|Ask fast market multiplier| - |bid_fast_market_multiplier
    `bf` |integer|True|Bid fast market multiplier| diff --git a/artifacts/apidocs/schemas/api_get_lp_leaderboard_request.md b/artifacts/apidocs/schemas/api_get_lp_leaderboard_request.md index a3f1c78..e69de29 100644 --- a/artifacts/apidocs/schemas/api_get_lp_leaderboard_request.md +++ b/artifacts/apidocs/schemas/api_get_lp_leaderboard_request.md @@ -1,40 +0,0 @@ -!!! info "[ApiGetLPLeaderboardRequest](/../../schemas/api_get_lp_leaderboard_request)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |epoch
    `e` |integer|False
    `0`|The epoch to filter| - |limit
    `l` |integer|True|The number of accounts to return| - |kind
    `k` |Kind|True|The kind filter to apply| - |base
    `b` |Currency|True|The base filter to apply| - ??? info "[Kind](/../../schemas/kind)" - The list of asset kinds that are supported on the GRVT exchange
    - - |Value| Description | - |-|-| - |`PERPETUAL` = 1|the perpetual asset kind| - |`FUTURE` = 2|the future asset kind| - |`CALL` = 3|the call option asset kind| - |`PUT` = 4|the put option asset kind| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
    - - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/api_get_lp_leaderboard_response.md b/artifacts/apidocs/schemas/api_get_lp_leaderboard_response.md index be6b445..e69de29 100644 --- a/artifacts/apidocs/schemas/api_get_lp_leaderboard_response.md +++ b/artifacts/apidocs/schemas/api_get_lp_leaderboard_response.md @@ -1,10 +0,0 @@ -!!! info "[ApiGetLPLeaderboardResponse](/../../schemas/api_get_lp_leaderboard_response)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |points
    `p` |[ApproximateLPPoint]|True|The list of LP points| - ??? info "[ApproximateLPPoint](/../../schemas/approximate_lp_point)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |off_chain_account_id
    `oc` |string|True|The off chain account id| - |liquidity_score
    `ls` |string|True|Liquidity score| - |rank
    `r` |integer|True|The rank of user in the LP leaderboard| diff --git a/artifacts/apidocs/schemas/api_get_lp_point_request.md b/artifacts/apidocs/schemas/api_get_lp_point_request.md index 54116b6..e69de29 100644 --- a/artifacts/apidocs/schemas/api_get_lp_point_request.md +++ b/artifacts/apidocs/schemas/api_get_lp_point_request.md @@ -1,39 +0,0 @@ -!!! info "[ApiGetLPPointRequest](/../../schemas/api_get_lp_point_request)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |epoch
    `e` |integer|False
    `0`|The epoch to filter| - |kind
    `k` |Kind|False
    `0`|Optional. The kind filter to apply| - |base
    `b` |Currency|False
    `0`|Optional. The base filter to apply| - ??? info "[Kind](/../../schemas/kind)" - The list of asset kinds that are supported on the GRVT exchange
    - - |Value| Description | - |-|-| - |`PERPETUAL` = 1|the perpetual asset kind| - |`FUTURE` = 2|the future asset kind| - |`CALL` = 3|the call option asset kind| - |`PUT` = 4|the put option asset kind| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
    - - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/api_get_lp_point_response.md b/artifacts/apidocs/schemas/api_get_lp_point_response.md index c1443f6..e69de29 100644 --- a/artifacts/apidocs/schemas/api_get_lp_point_response.md +++ b/artifacts/apidocs/schemas/api_get_lp_point_response.md @@ -1,11 +0,0 @@ -!!! info "[ApiGetLPPointResponse](/../../schemas/api_get_lp_point_response)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |point
    `p` |LPPoint|True|LP points of user| - |maker_count
    `mc` |integer|True|The number of maker| - ??? info "[LPPoint](/../../schemas/lp_point)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |main_account_id
    `ma` |string|True|The main account id| - |liquidity_score
    `ls` |string|True|Liquidity score| - |rank
    `r` |integer|True|The rank of user in the LP leaderboard| diff --git a/artifacts/apidocs/schemas/api_get_order_request.md b/artifacts/apidocs/schemas/api_get_order_request.md index 57d9c79..e69de29 100644 --- a/artifacts/apidocs/schemas/api_get_order_request.md +++ b/artifacts/apidocs/schemas/api_get_order_request.md @@ -1,8 +0,0 @@ -!!! info "[ApiGetOrderRequest](/../../schemas/api_get_order_request)" - Retrieve the order for the account. Either `order_id` or `client_order_id` must be provided.
    - - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |sub_account_id
    `sa` |string|True|The subaccount ID to filter by| - |order_id
    `oi` |string|False
    `0`|Filter for `order_id`| - |client_order_id
    `co` |string|False
    `0`|Filter for `client_order_id`| diff --git a/artifacts/apidocs/schemas/api_get_order_response.md b/artifacts/apidocs/schemas/api_get_order_response.md index bdd3b3b..e69de29 100644 --- a/artifacts/apidocs/schemas/api_get_order_response.md +++ b/artifacts/apidocs/schemas/api_get_order_response.md @@ -1,110 +0,0 @@ -!!! info "[ApiGetOrderResponse](/../../schemas/api_get_order_response)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |result
    `r` |Order|True|The order object for the requested filter| - ??? 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| - |trigger
    `t` |TriggerOrderMetadata|True|Trigger fields are used to support any type of trigger order such as TP/SL| - |broker
    `b` |BrokerTag|False
    ``|Specifies the broker who brokered the order| - ??? info "[BrokerTag](/../../schemas/broker_tag)" - BrokerTag is a tag for the broker that the order is sent from.
    - - ??? 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| diff --git a/artifacts/apidocs/schemas/api_get_trader_stat_response.md b/artifacts/apidocs/schemas/api_get_trader_stat_response.md index d833474..e69de29 100644 --- a/artifacts/apidocs/schemas/api_get_trader_stat_response.md +++ b/artifacts/apidocs/schemas/api_get_trader_stat_response.md @@ -1,4 +0,0 @@ -!!! info "[ApiGetTraderStatResponse](/../../schemas/api_get_trader_stat_response)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |total_fee
    `tf` |string|True|Total fee paid| diff --git a/artifacts/apidocs/schemas/api_get_user_ecosystem_point_request.md b/artifacts/apidocs/schemas/api_get_user_ecosystem_point_request.md index ca73086..e69de29 100644 --- a/artifacts/apidocs/schemas/api_get_user_ecosystem_point_request.md +++ b/artifacts/apidocs/schemas/api_get_user_ecosystem_point_request.md @@ -1,6 +0,0 @@ -!!! info "[ApiGetUserEcosystemPointRequest](/../../schemas/api_get_user_ecosystem_point_request)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |account_id
    `ai` |string|True|The off chain account id| - |calculate_from
    `cf` |string|True|Start time of the epoch - phase| - |include_user_rank
    `iu` |boolean|True|Include user rank in the response| 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..e69de29 100644 --- a/artifacts/apidocs/schemas/api_get_user_ecosystem_point_response.md +++ b/artifacts/apidocs/schemas/api_get_user_ecosystem_point_response.md @@ -1,20 +0,0 @@ -!!! info "[ApiGetUserEcosystemPointResponse](/../../schemas/api_get_user_ecosystem_point_response)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |points
    `p` |[EcosystemPoint]|True|The list of ecosystem points| - ??? info "[EcosystemPoint](/../../schemas/ecosystem_point)" -
    - - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |account_id
    `ai` |string|True|The off chain account id| - |main_account_id
    `ma` |string|True|The main account id| - |total_point
    `tp` |string|True|Total ecosystem point| - |direct_invite_count
    `di` |integer|True|Direct invite count| - |indirect_invite_count
    `ii` |integer|True|Indirect invite count| - |direct_invite_trading_volume
    `di1` |string|True|Direct invite trading volume| - |indirect_invite_trading_volume
    `ii1` |string|True|Indirect invite trading volume| - |calculate_at
    `ca` |string|True|The time when the ecosystem point is calculated| - |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| diff --git a/artifacts/apidocs/schemas/api_get_verified_ecosystem_leaderboard_request.md b/artifacts/apidocs/schemas/api_get_verified_ecosystem_leaderboard_request.md index 6604e10..e69de29 100644 --- a/artifacts/apidocs/schemas/api_get_verified_ecosystem_leaderboard_request.md +++ b/artifacts/apidocs/schemas/api_get_verified_ecosystem_leaderboard_request.md @@ -1,5 +0,0 @@ -!!! info "[ApiGetVerifiedEcosystemLeaderboardRequest](/../../schemas/api_get_verified_ecosystem_leaderboard_request)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |calculate_from
    `cf` |string|True|Start time of the epoch| - |completed_kyc_before
    `ck` |string|True|Completed KYC before this time| diff --git a/artifacts/apidocs/schemas/api_latest_snap_sub_accounts_request.md b/artifacts/apidocs/schemas/api_latest_snap_sub_accounts_request.md index 69ec03a..e69de29 100644 --- a/artifacts/apidocs/schemas/api_latest_snap_sub_accounts_request.md +++ b/artifacts/apidocs/schemas/api_latest_snap_sub_accounts_request.md @@ -1,6 +0,0 @@ -!!! info "[ApiLatestSnapSubAccountsRequest](/../../schemas/api_latest_snap_sub_accounts_request)" - The request to get the latest snapshot of list sub account

    - - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |sub_account_i_ds
    `sa` |[string]|True|The list of sub account ids to query| 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..e69de29 100644 --- a/artifacts/apidocs/schemas/api_latest_snap_sub_accounts_response.md +++ b/artifacts/apidocs/schemas/api_latest_snap_sub_accounts_response.md @@ -1,95 +0,0 @@ -!!! info "[ApiLatestSnapSubAccountsResponse](/../../schemas/api_latest_snap_sub_accounts_response)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |result
    `r` |[SubAccount]|True|The sub account history matching the request sub account| - ??? info "[SubAccount](/../../schemas/sub_account)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |event_time
    `et` |string|True|Time at which the event was emitted in unix nanoseconds| - |sub_account_id
    `sa` |string|True|The sub account ID this entry refers to| - |margin_type
    `mt` |MarginType|True|The type of margin algorithm this subaccount uses| - |settle_currency
    `sc` |Currency|True|The settlement, margin, and reporting currency of this account.
    This subaccount can only open positions quoted in this currency

    In the future, when users select a Multi-Currency Margin Type, this will be USD
    All other assets are converted to this currency for the purpose of calculating margin| - |unrealized_pnl
    `up` |string|True|The total unrealized PnL of all positions owned by this subaccount, denominated in quote currency decimal units.
    `unrealized_pnl = sum(position.unrealized_pnl * position.quote_index_price) / settle_index_price`| - |total_equity
    `te` |string|True|The notional value of your account if all positions are closed, excluding trading fees (reported in `settle_currency`).
    `total_equity = sum(spot_balance.balance * spot_balance.index_price) / settle_index_price + unrealized_pnl`| - |initial_margin
    `im` |string|True|The `total_equity` required to open positions in the account (reported in `settle_currency`).
    Computation is different depending on account's `margin_type`| - |maintenance_margin
    `mm` |string|True|The `total_equity` required to avoid liquidation of positions in the account (reported in `settle_currency`).
    Computation is different depending on account's `margin_type`| - |available_balance
    `ab` |string|True|The notional value available to transfer out of the trading account into the funding account (reported in `settle_currency`).
    `available_balance = total_equity - initial_margin - min(unrealized_pnl, 0)`| - |spot_balances
    `sb` |[SpotBalance]|True|The list of spot assets owned by this sub account, and their balances| - |positions
    `p` |[Positions]|True|The list of positions owned by this sub account| - |settle_index_price
    `si` |string|True|The index price of the settle currency. (reported in `USD`)| - ??? info "[MarginType](/../../schemas/margin_type)" - |Value| Description | - |-|-| - |`SIMPLE_CROSS_MARGIN` = 2|Simple Cross Margin Mode: all assets have a predictable margin impact, the whole subaccount shares a single margin| - |`PORTFOLIO_CROSS_MARGIN` = 3|Portfolio Cross Margin Mode: asset margin impact is analysed on portfolio level, the whole subaccount shares a single margin| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
    - - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| - ??? info "[SpotBalance](/../../schemas/spot_balance)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |currency
    `c` |Currency|True|The currency you hold a spot balance in| - |balance
    `b` |string|True|This currency's balance in this trading account.| - |index_price
    `ip` |string|True|The index price of this currency. (reported in `USD`)| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
    - - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| - ??? info "[Positions](/../../schemas/positions)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |event_time
    `et` |string|True|Time at which the event was emitted in unix nanoseconds| - |sub_account_id
    `sa` |string|True|The sub account ID that participated in the trade| - |instrument
    `i` |string|True|The instrument being represented| - |size
    `s` |string|True|The size of the position, expressed in base asset decimal units. Negative for short positions| - |notional
    `n` |string|True|The notional value of the position, negative for short assets, expressed in quote asset decimal units| - |entry_price
    `ep` |string|True|The entry price of the position, expressed in `9` decimals
    Whenever increasing the size of a position, the entry price is updated to the new average entry price
    `new_entry_price = (old_entry_price * old_size + trade_price * trade_size) / (old_size + trade_size)`| - |exit_price
    `ep1` |string|True|The exit price of the position, expressed in `9` decimals
    Whenever decreasing the size of a position, the exit price is updated to the new average exit price
    `new_exit_price = (old_exit_price * old_exit_trade_size + trade_price * trade_size) / (old_exit_trade_size + trade_size)`| - |mark_price
    `mp` |string|True|The mark price of the position, expressed in `9` decimals| - |unrealized_pnl
    `up` |string|True|The unrealized PnL of the position, expressed in quote asset decimal units
    `unrealized_pnl = (mark_price - entry_price) * size`| - |realized_pnl
    `rp` |string|True|The realized PnL of the position, expressed in quote asset decimal units
    `realized_pnl = (exit_price - entry_price) * exit_trade_size`| - |total_pnl
    `tp` |string|True|The total PnL of the position, expressed in quote asset decimal units
    `total_pnl = realized_pnl + unrealized_pnl`| - |roi
    `r` |string|True|The ROI of the position, expressed as a percentage
    `roi = (total_pnl / (entry_price * abs(size))) * 100^`| - |quote_index_price
    `qi` |string|True|The index price of the quote currency. (reported in `USD`)| - |est_liquidation_price
    `el` |string|True|The estimated liquidation price| diff --git a/artifacts/apidocs/schemas/api_list_aggregated_account_summary_request.md b/artifacts/apidocs/schemas/api_list_aggregated_account_summary_request.md index 4902964..e69de29 100644 --- a/artifacts/apidocs/schemas/api_list_aggregated_account_summary_request.md +++ b/artifacts/apidocs/schemas/api_list_aggregated_account_summary_request.md @@ -1,4 +0,0 @@ -!!! info "[ApiListAggregatedAccountSummaryRequest](/../../schemas/api_list_aggregated_account_summary_request)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |main_account_ids
    `ma` |[unknown]|True|The list of main account ID to request for| 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..e69de29 100644 --- a/artifacts/apidocs/schemas/api_list_aggregated_account_summary_response.md +++ b/artifacts/apidocs/schemas/api_list_aggregated_account_summary_response.md @@ -1,46 +0,0 @@ -!!! info "[ApiListAggregatedAccountSummaryResponse](/../../schemas/api_list_aggregated_account_summary_response)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |account_summaries
    `as` |[ApiAggregatedAccountSummaryResponse]|True|The list of aggregated account summaries of requested main accounts| - ??? info "[ApiAggregatedAccountSummaryResponse](/../../schemas/api_aggregated_account_summary_response)" - The aggregated account summary, that reports the total equity and spot balances of a funding (main) account, and its constituent trading (sub) accounts
    - - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |result
    `r` |AggregatedAccountSummary|True|The aggregated account summary| - ??? info "[AggregatedAccountSummary](/../../schemas/aggregated_account_summary)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |main_account_id
    `ma` |string|True|The main account ID of the account to which the summary belongs| - |total_equity
    `te` |string|True|Total equity of the main (+ sub) account, denominated in USD| - |spot_balances
    `sb` |[SpotBalance]|True|The list of spot assets owned by this main (+ sub) account, and their balances| - ??? info "[SpotBalance](/../../schemas/spot_balance)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |currency
    `c` |Currency|True|The currency you hold a spot balance in| - |balance
    `b` |string|True|This currency's balance in this trading account.| - |index_price
    `ip` |string|True|The index price of this currency. (reported in `USD`)| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
    - - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/api_mini_ticker_request.md b/artifacts/apidocs/schemas/api_mini_ticker_request.md index e9b4cc6..e69de29 100644 --- a/artifacts/apidocs/schemas/api_mini_ticker_request.md +++ b/artifacts/apidocs/schemas/api_mini_ticker_request.md @@ -1,6 +0,0 @@ -!!! info "[ApiMiniTickerRequest](/../../schemas/api_mini_ticker_request)" - Retrieves a single mini ticker value for a single instrument. Please do not use this to repeatedly poll for data -- a websocket subscription is much more performant, and useful.
    - - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |instrument
    `i` |string|True|The readable instrument name:
    • Perpetual: `ETH_USDT_Perp`
    • Future: `BTC_USDT_Fut_20Oct23`
    • Call: `ETH_USDT_Call_20Oct23_2800`
    • Put: `ETH_USDT_Put_20Oct23_2800`
    | diff --git a/artifacts/apidocs/schemas/api_mini_ticker_response.md b/artifacts/apidocs/schemas/api_mini_ticker_response.md index dd22cdc..e69de29 100644 --- a/artifacts/apidocs/schemas/api_mini_ticker_response.md +++ b/artifacts/apidocs/schemas/api_mini_ticker_response.md @@ -1,18 +0,0 @@ -!!! info "[ApiMiniTickerResponse](/../../schemas/api_mini_ticker_response)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |result
    `r` |MiniTicker|True|The mini ticker matching the request asset| - ??? info "[MiniTicker](/../../schemas/mini_ticker)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |event_time
    `et` |string|False
    `None`|Time at which the event was emitted in unix nanoseconds| - |instrument
    `i` |string|False
    `None`|The readable instrument name:
    • Perpetual: `ETH_USDT_Perp`
    • Future: `BTC_USDT_Fut_20Oct23`
    • Call: `ETH_USDT_Call_20Oct23_2800`
    • Put: `ETH_USDT_Put_20Oct23_2800`
    | - |mark_price
    `mp` |string|False
    `None`|The mark price of the instrument, expressed in `9` decimals| - |index_price
    `ip` |string|False
    `None`|The index price of the instrument, expressed in `9` decimals| - |last_price
    `lp` |string|False
    `None`|The last traded price of the instrument (also close price), expressed in `9` decimals| - |last_size
    `ls` |string|False
    `None`|The number of assets traded in the last trade, expressed in base asset decimal units| - |mid_price
    `mp1` |string|False
    `None`|The mid price of the instrument, expressed in `9` decimals| - |best_bid_price
    `bb` |string|False
    `None`|The best bid price of the instrument, expressed in `9` decimals| - |best_bid_size
    `bb1` |string|False
    `None`|The number of assets offered on the best bid price of the instrument, expressed in base asset decimal units| - |best_ask_price
    `ba` |string|False
    `None`|The best ask price of the instrument, expressed in `9` decimals| - |best_ask_size
    `ba1` |string|False
    `None`|The number of assets offered on the best ask price of the instrument, expressed in base asset decimal units| diff --git a/artifacts/apidocs/schemas/api_open_orders_request.md b/artifacts/apidocs/schemas/api_open_orders_request.md index 0e76b77..e69de29 100644 --- a/artifacts/apidocs/schemas/api_open_orders_request.md +++ b/artifacts/apidocs/schemas/api_open_orders_request.md @@ -1,64 +0,0 @@ -!!! info "[ApiOpenOrdersRequest](/../../schemas/api_open_orders_request)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |sub_account_id
    `sa` |string|True|The subaccount ID to filter by| - |kind
    `k` |[Kind]|False
    `all`|The kind filter to apply. If nil, this defaults to all kinds. Otherwise, only entries matching the filter will be returned| - |base
    `b` |[Currency]|False
    `all`|The base filter to apply. If nil, this defaults to all bases. Otherwise, only entries matching the filter will be returned| - |quote
    `q` |[Currency]|False
    `all`|The quote filter to apply. If nil, this defaults to all quotes. Otherwise, only entries matching the filter will be returned| - ??? info "[Kind](/../../schemas/kind)" - The list of asset kinds that are supported on the GRVT exchange
    - - |Value| Description | - |-|-| - |`PERPETUAL` = 1|the perpetual asset kind| - |`FUTURE` = 2|the future asset kind| - |`CALL` = 3|the call option asset kind| - |`PUT` = 4|the put option asset kind| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
    - - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
    - - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/api_open_orders_response.md b/artifacts/apidocs/schemas/api_open_orders_response.md index b2a0c29..e69de29 100644 --- a/artifacts/apidocs/schemas/api_open_orders_response.md +++ b/artifacts/apidocs/schemas/api_open_orders_response.md @@ -1,112 +0,0 @@ -!!! info "[ApiOpenOrdersResponse](/../../schemas/api_open_orders_response)" - Retrieves all open orders for the account. This may not match new orders in flight.
    - - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |result
    `r` |[Order]|True|The Open Orders matching the request filter| - ??? 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| - |trigger
    `t` |TriggerOrderMetadata|True|Trigger fields are used to support any type of trigger order such as TP/SL| - |broker
    `b` |BrokerTag|False
    ``|Specifies the broker who brokered the order| - ??? info "[BrokerTag](/../../schemas/broker_tag)" - BrokerTag is a tag for the broker that the order is sent from.
    - - ??? 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| diff --git a/artifacts/apidocs/schemas/api_order_history_request.md b/artifacts/apidocs/schemas/api_order_history_request.md index 8a47eb5..e69de29 100644 --- a/artifacts/apidocs/schemas/api_order_history_request.md +++ b/artifacts/apidocs/schemas/api_order_history_request.md @@ -1,70 +0,0 @@ -!!! info "[ApiOrderHistoryRequest](/../../schemas/api_order_history_request)" - Retrieves the order history for the account.

    Pagination works as follows:
    • We perform a reverse chronological lookup, starting from `end_time`. If `end_time` is not set, we start from the most recent data.
    • The lookup is limited to `limit` records. If more data is requested, the response will contain a `next` cursor for you to query the next page.
    • If a `cursor` is provided, it will be used to fetch results from that point onwards.
    • Pagination will continue until the `start_time` is reached. If `start_time` is not set, pagination will continue as far back as our data retention policy allows.

    - - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |sub_account_id
    `sa` |string|True|The subaccount ID to filter by| - |kind
    `k` |[Kind]|False
    `all`|The kind filter to apply. If nil, this defaults to all kinds. Otherwise, only entries matching the filter will be returned| - |base
    `b` |[Currency]|False
    `all`|The base filter to apply. If nil, this defaults to all bases. Otherwise, only entries matching the filter will be returned| - |quote
    `q` |[Currency]|False
    `all`|The quote filter to apply. If nil, this defaults to all quotes. Otherwise, only entries matching the filter will be returned| - |start_time
    `st` |string|False
    `0`|The start time to apply in nanoseconds. If nil, this defaults to all start times. Otherwise, only entries matching the filter will be returned| - |end_time
    `et` |string|False
    `now()`|The end time to apply in nanoseconds. If nil, this defaults to all end times. Otherwise, only entries matching the filter will be returned| - |limit
    `l` |integer|False
    `500`|The limit to query for. Defaults to 500; Max 1000| - |cursor
    `c` |string|False
    `''`|The cursor to indicate when to start the query from| - ??? info "[Kind](/../../schemas/kind)" - The list of asset kinds that are supported on the GRVT exchange
    - - |Value| Description | - |-|-| - |`PERPETUAL` = 1|the perpetual asset kind| - |`FUTURE` = 2|the future asset kind| - |`CALL` = 3|the call option asset kind| - |`PUT` = 4|the put option asset kind| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
    - - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
    - - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/api_order_history_response.md b/artifacts/apidocs/schemas/api_order_history_response.md index f1b0778..e69de29 100644 --- a/artifacts/apidocs/schemas/api_order_history_response.md +++ b/artifacts/apidocs/schemas/api_order_history_response.md @@ -1,111 +0,0 @@ -!!! info "[ApiOrderHistoryResponse](/../../schemas/api_order_history_response)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |result
    `r` |[Order]|True|The Open Orders matching the request filter| - |next
    `n` |string|True|The cursor to indicate when to start the query from| - ??? 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| - |trigger
    `t` |TriggerOrderMetadata|True|Trigger fields are used to support any type of trigger order such as TP/SL| - |broker
    `b` |BrokerTag|False
    ``|Specifies the broker who brokered the order| - ??? info "[BrokerTag](/../../schemas/broker_tag)" - BrokerTag is a tag for the broker that the order is sent from.
    - - ??? 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| diff --git a/artifacts/apidocs/schemas/api_order_state_request.md b/artifacts/apidocs/schemas/api_order_state_request.md index 56b8bef..e69de29 100644 --- a/artifacts/apidocs/schemas/api_order_state_request.md +++ b/artifacts/apidocs/schemas/api_order_state_request.md @@ -1,8 +0,0 @@ -!!! info "[ApiOrderStateRequest](/../../schemas/api_order_state_request)" - Retrieve the order state for the account. Either `order_id` or `client_order_id` must be provided.
    - - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |sub_account_id
    `sa` |string|True|The subaccount ID to filter by| - |order_id
    `oi` |string|False
    `0`|Filter for `order_id`| - |client_order_id
    `co` |string|False
    `0`|Filter for `client_order_id`| diff --git a/artifacts/apidocs/schemas/api_order_state_response.md b/artifacts/apidocs/schemas/api_order_state_response.md index 2744a2f..e69de29 100644 --- a/artifacts/apidocs/schemas/api_order_state_response.md +++ b/artifacts/apidocs/schemas/api_order_state_response.md @@ -1,54 +0,0 @@ -!!! info "[ApiOrderStateResponse](/../../schemas/api_order_state_response)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |state
    `s` |OrderState|True|The order state for the requested filter| - ??? 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| diff --git a/artifacts/apidocs/schemas/api_orderbook_levels_request.md b/artifacts/apidocs/schemas/api_orderbook_levels_request.md index 5c97be7..e69de29 100644 --- a/artifacts/apidocs/schemas/api_orderbook_levels_request.md +++ b/artifacts/apidocs/schemas/api_orderbook_levels_request.md @@ -1,7 +0,0 @@ -!!! info "[ApiOrderbookLevelsRequest](/../../schemas/api_orderbook_levels_request)" - Retrieves aggregated price depth for a single instrument, with a maximum depth of 10 levels. Do not use this to poll for data -- a websocket subscription is much more performant, and useful.
    - - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |instrument
    `i` |string|True|The readable instrument name:
    • Perpetual: `ETH_USDT_Perp`
    • Future: `BTC_USDT_Fut_20Oct23`
    • Call: `ETH_USDT_Call_20Oct23_2800`
    • Put: `ETH_USDT_Put_20Oct23_2800`
    | - |depth
    `d` |integer|True|Depth of the order book to be retrieved (10, 50, 100, 500)| diff --git a/artifacts/apidocs/schemas/api_orderbook_levels_response.md b/artifacts/apidocs/schemas/api_orderbook_levels_response.md index 01ac8f2..e69de29 100644 --- a/artifacts/apidocs/schemas/api_orderbook_levels_response.md +++ b/artifacts/apidocs/schemas/api_orderbook_levels_response.md @@ -1,23 +0,0 @@ -!!! info "[ApiOrderbookLevelsResponse](/../../schemas/api_orderbook_levels_response)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |result
    `r` |OrderbookLevels|True|The orderbook levels objects matching the request asset| - ??? info "[OrderbookLevels](/../../schemas/orderbook_levels)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |event_time
    `et` |string|True|Time at which the event was emitted in unix nanoseconds| - |instrument
    `i` |string|True|The readable instrument name:
    • Perpetual: `ETH_USDT_Perp`
    • Future: `BTC_USDT_Fut_20Oct23`
    • Call: `ETH_USDT_Call_20Oct23_2800`
    • Put: `ETH_USDT_Put_20Oct23_2800`
    | - |bids
    `b` |[OrderbookLevel]|True|The list of best bids up till query depth| - |asks
    `a` |[OrderbookLevel]|True|The list of best asks up till query depth| - ??? info "[OrderbookLevel](/../../schemas/orderbook_level)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |price
    `p` |string|True|The price of the level, expressed in `9` decimals| - |size
    `s` |string|True|The number of assets offered, expressed in base asset decimal units| - |num_orders
    `no` |integer|True|The number of open orders at this level| - ??? info "[OrderbookLevel](/../../schemas/orderbook_level)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |price
    `p` |string|True|The price of the level, expressed in `9` decimals| - |size
    `s` |string|True|The number of assets offered, expressed in base asset decimal units| - |num_orders
    `no` |integer|True|The number of open orders at this level| diff --git a/artifacts/apidocs/schemas/api_positions_request.md b/artifacts/apidocs/schemas/api_positions_request.md index 1aa7fdb..e69de29 100644 --- a/artifacts/apidocs/schemas/api_positions_request.md +++ b/artifacts/apidocs/schemas/api_positions_request.md @@ -1,66 +0,0 @@ -!!! info "[ApiPositionsRequest](/../../schemas/api_positions_request)" - Query the positions of a sub account
    - - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |sub_account_id
    `sa` |string|True|The sub account ID to request for| - |kind
    `k` |[Kind]|False
    `all`|The kind filter to apply. If nil, this defaults to all kinds. Otherwise, only entries matching the filter will be returned| - |base
    `b` |[Currency]|False
    `all`|The base filter to apply. If nil, this defaults to all bases. Otherwise, only entries matching the filter will be returned| - |quote
    `q` |[Currency]|False
    `all`|The quote filter to apply. If nil, this defaults to all quotes. Otherwise, only entries matching the filter will be returned| - ??? info "[Kind](/../../schemas/kind)" - The list of asset kinds that are supported on the GRVT exchange
    - - |Value| Description | - |-|-| - |`PERPETUAL` = 1|the perpetual asset kind| - |`FUTURE` = 2|the future asset kind| - |`CALL` = 3|the call option asset kind| - |`PUT` = 4|the put option asset kind| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
    - - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
    - - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/api_positions_response.md b/artifacts/apidocs/schemas/api_positions_response.md index 8527406..e69de29 100644 --- a/artifacts/apidocs/schemas/api_positions_response.md +++ b/artifacts/apidocs/schemas/api_positions_response.md @@ -1,21 +0,0 @@ -!!! info "[ApiPositionsResponse](/../../schemas/api_positions_response)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |result
    `r` |[Positions]|True|The positions matching the request filter| - ??? info "[Positions](/../../schemas/positions)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |event_time
    `et` |string|True|Time at which the event was emitted in unix nanoseconds| - |sub_account_id
    `sa` |string|True|The sub account ID that participated in the trade| - |instrument
    `i` |string|True|The instrument being represented| - |size
    `s` |string|True|The size of the position, expressed in base asset decimal units. Negative for short positions| - |notional
    `n` |string|True|The notional value of the position, negative for short assets, expressed in quote asset decimal units| - |entry_price
    `ep` |string|True|The entry price of the position, expressed in `9` decimals
    Whenever increasing the size of a position, the entry price is updated to the new average entry price
    `new_entry_price = (old_entry_price * old_size + trade_price * trade_size) / (old_size + trade_size)`| - |exit_price
    `ep1` |string|True|The exit price of the position, expressed in `9` decimals
    Whenever decreasing the size of a position, the exit price is updated to the new average exit price
    `new_exit_price = (old_exit_price * old_exit_trade_size + trade_price * trade_size) / (old_exit_trade_size + trade_size)`| - |mark_price
    `mp` |string|True|The mark price of the position, expressed in `9` decimals| - |unrealized_pnl
    `up` |string|True|The unrealized PnL of the position, expressed in quote asset decimal units
    `unrealized_pnl = (mark_price - entry_price) * size`| - |realized_pnl
    `rp` |string|True|The realized PnL of the position, expressed in quote asset decimal units
    `realized_pnl = (exit_price - entry_price) * exit_trade_size`| - |total_pnl
    `tp` |string|True|The total PnL of the position, expressed in quote asset decimal units
    `total_pnl = realized_pnl + unrealized_pnl`| - |roi
    `r` |string|True|The ROI of the position, expressed as a percentage
    `roi = (total_pnl / (entry_price * abs(size))) * 100^`| - |quote_index_price
    `qi` |string|True|The index price of the quote currency. (reported in `USD`)| - |est_liquidation_price
    `el` |string|True|The estimated liquidation price| diff --git a/artifacts/apidocs/schemas/api_pre_deposit_check_request.md b/artifacts/apidocs/schemas/api_pre_deposit_check_request.md index 0cb5a85..e69de29 100644 --- a/artifacts/apidocs/schemas/api_pre_deposit_check_request.md +++ b/artifacts/apidocs/schemas/api_pre_deposit_check_request.md @@ -1,35 +0,0 @@ -!!! info "[ApiPreDepositCheckRequest](/../../schemas/api_pre_deposit_check_request)" - UI only for bridge deposits through non native bridge. Currently only supports XY Finance bridge account.
    - - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |currency
    `c` |Currency|True|The currency you hold the deposit in| - |bridge
    `b` |BridgeType|True|The bridge type to conduct checks for| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
    - - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| - ??? info "[BridgeType](/../../schemas/bridge_type)" - |Value| Description | - |-|-| - |`XY` = 1|XY Bridge type| diff --git a/artifacts/apidocs/schemas/api_pre_deposit_check_response.md b/artifacts/apidocs/schemas/api_pre_deposit_check_response.md index 1d679ce..e69de29 100644 --- a/artifacts/apidocs/schemas/api_pre_deposit_check_response.md +++ b/artifacts/apidocs/schemas/api_pre_deposit_check_response.md @@ -1,29 +0,0 @@ -!!! info "[ApiPreDepositCheckResponse](/../../schemas/api_pre_deposit_check_response)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |max_deposit_limit
    `md` |string|True|Max Deposit Limit reported for the Bridge Account reported in the currency balance| - |currency
    `c` |Currency|True|The currency you hold the deposit in| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
    - - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/api_pre_order_check_request.md b/artifacts/apidocs/schemas/api_pre_order_check_request.md index 3f9d0ad..e69de29 100644 --- a/artifacts/apidocs/schemas/api_pre_order_check_request.md +++ b/artifacts/apidocs/schemas/api_pre_order_check_request.md @@ -1,113 +0,0 @@ -!!! info "[ApiPreOrderCheckRequest](/../../schemas/api_pre_order_check_request)" - Get pre-order check information for a new order
    - - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |sub_account_id
    `sa` |string|True|The subaccount ID of orders to query| - |orders
    `o` |[Order]|True|The order to do pre-order check| - ??? 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| - |trigger
    `t` |TriggerOrderMetadata|True|Trigger fields are used to support any type of trigger order such as TP/SL| - |broker
    `b` |BrokerTag|False
    ``|Specifies the broker who brokered the order| - ??? info "[BrokerTag](/../../schemas/broker_tag)" - BrokerTag is a tag for the broker that the order is sent from.
    - - ??? 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| diff --git a/artifacts/apidocs/schemas/api_pre_order_check_response.md b/artifacts/apidocs/schemas/api_pre_order_check_response.md index 5a56900..e69de29 100644 --- a/artifacts/apidocs/schemas/api_pre_order_check_response.md +++ b/artifacts/apidocs/schemas/api_pre_order_check_response.md @@ -1,42 +0,0 @@ -!!! info "[ApiPreOrderCheckResponse](/../../schemas/api_pre_order_check_response)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |results
    `r` |[PreOrderCheckResult]|True|Pre order check for each new order in the request| - ??? info "[PreOrderCheckResult](/../../schemas/pre_order_check_result)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |max_qty
    `mq` |[AssetMaxQty]|True|The maximum quantity for each leg| - |margin_required
    `mr` |string|True|The margin required for the order (reported in `settle_currency`)| - |order_valid
    `ov` |boolean|True|Whether the order is valid| - |reason
    `r` |string|True|The reason the order is invalid, if any| - |settle_currency
    `sc` |Currency|True|The subAccount settle currency| - ??? info "[AssetMaxQty](/../../schemas/asset_max_qty)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |asset
    `a` |string|True|The asset associated with the max quantity| - |max_buy_qty
    `mb` |string|True|The maximum buy quantity| - |max_sell_qty
    `ms` |string|True|The maximum sell quantity| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
    - - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/api_query_flat_referral_stat_request.md b/artifacts/apidocs/schemas/api_query_flat_referral_stat_request.md index f3361f8..e69de29 100644 --- a/artifacts/apidocs/schemas/api_query_flat_referral_stat_request.md +++ b/artifacts/apidocs/schemas/api_query_flat_referral_stat_request.md @@ -1,6 +0,0 @@ -!!! info "[ApiQueryFlatReferralStatRequest](/../../schemas/api_query_flat_referral_stat_request)" - Query flat referral stats
    - - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |account_id
    `ai` |string|True|The off chain account id to get referral stats| diff --git a/artifacts/apidocs/schemas/api_query_flat_referral_stat_response.md b/artifacts/apidocs/schemas/api_query_flat_referral_stat_response.md index 57e80c0..e69de29 100644 --- a/artifacts/apidocs/schemas/api_query_flat_referral_stat_response.md +++ b/artifacts/apidocs/schemas/api_query_flat_referral_stat_response.md @@ -1,5 +0,0 @@ -!!! info "[ApiQueryFlatReferralStatResponse](/../../schemas/api_query_flat_referral_stat_response)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |direct_invite_count
    `di` |integer|True|Direct invite count| - |indirect_invite_count
    `ii` |integer|True|Indirect invite count| diff --git a/artifacts/apidocs/schemas/api_resolve_epoch_ecosystem_metric_response.md b/artifacts/apidocs/schemas/api_resolve_epoch_ecosystem_metric_response.md index 6c408f5..e69de29 100644 --- a/artifacts/apidocs/schemas/api_resolve_epoch_ecosystem_metric_response.md +++ b/artifacts/apidocs/schemas/api_resolve_epoch_ecosystem_metric_response.md @@ -1,6 +0,0 @@ -!!! info "[ApiResolveEpochEcosystemMetricResponse](/../../schemas/api_resolve_epoch_ecosystem_metric_response)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |epoch_name
    `en` |string|True|The name of the epoch| - |point
    `p` |integer|True|Ecosystem points up to the most recently calculated time within this epoch| - |last_calculated_time
    `lc` |string|True|The time in unix nanoseconds when the ecosystem points were last calculated| diff --git a/artifacts/apidocs/schemas/api_set_initial_leverage_request.md b/artifacts/apidocs/schemas/api_set_initial_leverage_request.md index 10e6027..e69de29 100644 --- a/artifacts/apidocs/schemas/api_set_initial_leverage_request.md +++ b/artifacts/apidocs/schemas/api_set_initial_leverage_request.md @@ -1,8 +0,0 @@ -!!! info "[ApiSetInitialLeverageRequest](/../../schemas/api_set_initial_leverage_request)" - The request to set the initial leverage of a sub account
    - - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |sub_account_id
    `sa` |string|True|The sub account ID to set the leverage for| - |instrument
    `i` |string|True|The instrument to set the leverage for| - |leverage
    `l` |string|True|The leverage to set for the sub account| diff --git a/artifacts/apidocs/schemas/api_set_initial_leverage_response.md b/artifacts/apidocs/schemas/api_set_initial_leverage_response.md index 415d0cc..e69de29 100644 --- a/artifacts/apidocs/schemas/api_set_initial_leverage_response.md +++ b/artifacts/apidocs/schemas/api_set_initial_leverage_response.md @@ -1,6 +0,0 @@ -!!! info "[ApiSetInitialLeverageResponse](/../../schemas/api_set_initial_leverage_response)" - The response to set the initial leverage of a sub account
    - - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |success
    `s` |boolean|True|Whether the leverage was set successfully| diff --git a/artifacts/apidocs/schemas/api_settlement_price.md b/artifacts/apidocs/schemas/api_settlement_price.md index 60e0300..e69de29 100644 --- a/artifacts/apidocs/schemas/api_settlement_price.md +++ b/artifacts/apidocs/schemas/api_settlement_price.md @@ -1,55 +0,0 @@ -!!! info "[APISettlementPrice](/../../schemas/api_settlement_price)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |base
    `b` |Currency|True|The base currency of the settlement price| - |quote
    `q` |Currency|True|The quote currency of the settlement price| - |settlement_time
    `st` |string|True|The settlement timestamp of the settlement price, expressed in unix nanoseconds| - |settlement_price
    `sp` |string|True|The settlement price, expressed in `9` decimals| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
    - - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
    - - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/api_settlement_price_request.md b/artifacts/apidocs/schemas/api_settlement_price_request.md index 9be5b8e..e69de29 100644 --- a/artifacts/apidocs/schemas/api_settlement_price_request.md +++ b/artifacts/apidocs/schemas/api_settlement_price_request.md @@ -1,59 +0,0 @@ -!!! info "[ApiSettlementPriceRequest](/../../schemas/api_settlement_price_request)" - Lookup the historical settlement price of various pairs.

    Pagination works as follows:
    • We perform a reverse chronological lookup, starting from `end_time`. If `end_time` is not set, we start from the most recent data.
    • The lookup is limited to `limit` records. If more data is requested, the response will contain a `next` cursor for you to query the next page.
    • If a `cursor` is provided, it will be used to fetch results from that point onwards.
    • Pagination will continue until the `start_time` is reached. If `start_time` is not set, pagination will continue as far back as our data retention policy allows.

    - - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |base
    `b` |Currency|True|The base currency to select| - |quote
    `q` |Currency|True|The quote currency to select| - |start_time
    `st` |string|False
    `0`|Start time of settlement price in unix nanoseconds| - |end_time
    `et` |string|False
    `now()`|End time of settlement price in unix nanoseconds| - |limit
    `l` |integer|False
    `30`|The limit to query for. Defaults to 500; Max 1000| - |cursor
    `c` |string|False
    `''`|The cursor to indicate when to start the query from| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
    - - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
    - - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/api_settlement_price_response.md b/artifacts/apidocs/schemas/api_settlement_price_response.md index 04990a9..e69de29 100644 --- a/artifacts/apidocs/schemas/api_settlement_price_response.md +++ b/artifacts/apidocs/schemas/api_settlement_price_response.md @@ -1,60 +0,0 @@ -!!! info "[ApiSettlementPriceResponse](/../../schemas/api_settlement_price_response)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |result
    `r` |[APISettlementPrice]|True|The funding rate result set for given interval| - |next
    `n` |string|False
    `''`|The cursor to indicate when to start the next query from| - ??? info "[APISettlementPrice](/../../schemas/api_settlement_price)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |base
    `b` |Currency|True|The base currency of the settlement price| - |quote
    `q` |Currency|True|The quote currency of the settlement price| - |settlement_time
    `st` |string|True|The settlement timestamp of the settlement price, expressed in unix nanoseconds| - |settlement_price
    `sp` |string|True|The settlement price, expressed in `9` decimals| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
    - - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
    - - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/api_socialized_loss_status_response.md b/artifacts/apidocs/schemas/api_socialized_loss_status_response.md index a57e0bc..e69de29 100644 --- a/artifacts/apidocs/schemas/api_socialized_loss_status_response.md +++ b/artifacts/apidocs/schemas/api_socialized_loss_status_response.md @@ -1,7 +0,0 @@ -!!! info "[ApiSocializedLossStatusResponse](/../../schemas/api_socialized_loss_status_response)" - The socialized loss status.
    - - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |is_active
    `ia` |boolean|True|Whether the socialized loss is active| - |haircut_ratio
    `hr` |string|True|The socialized loss haircut ratio in centi-beeps| diff --git a/artifacts/apidocs/schemas/api_sub_account_history_request.md b/artifacts/apidocs/schemas/api_sub_account_history_request.md index 8162539..e69de29 100644 --- a/artifacts/apidocs/schemas/api_sub_account_history_request.md +++ b/artifacts/apidocs/schemas/api_sub_account_history_request.md @@ -1,10 +0,0 @@ -!!! info "[ApiSubAccountHistoryRequest](/../../schemas/api_sub_account_history_request)" - The request to get the history of a sub account
    SubAccount Summary values are snapshotted once every hour
    No snapshots are taken if the sub account has no activity in the hourly window
    History is preserved only for the last 30 days

    Pagination works as follows:
    • We perform a reverse chronological lookup, starting from `end_time`. If `end_time` is not set, we start from the most recent data.
    • The lookup is limited to `limit` records. If more data is requested, the response will contain a `next` cursor for you to query the next page.
    • If a `cursor` is provided, it will be used to fetch results from that point onwards.
    • Pagination will continue until the `start_time` is reached. If `start_time` is not set, pagination will continue as far back as our data retention policy allows.

    - - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |sub_account_id
    `sa` |string|True|The sub account ID to request for| - |start_time
    `st` |string|False
    `0`|Start time of sub account history in unix nanoseconds| - |end_time
    `et` |string|False
    `now()`|End time of sub account history in unix nanoseconds| - |limit
    `l` |integer|False
    `500`|The limit to query for. Defaults to 500; Max 1000| - |cursor
    `c` |string|False
    `''`|The cursor to indicate when to start the next query from| diff --git a/artifacts/apidocs/schemas/api_sub_account_history_response.md b/artifacts/apidocs/schemas/api_sub_account_history_response.md index 95bad3a..e69de29 100644 --- a/artifacts/apidocs/schemas/api_sub_account_history_response.md +++ b/artifacts/apidocs/schemas/api_sub_account_history_response.md @@ -1,96 +0,0 @@ -!!! info "[ApiSubAccountHistoryResponse](/../../schemas/api_sub_account_history_response)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |result
    `r` |[SubAccount]|True|The sub account history matching the request sub account| - |next
    `n` |string|True|The cursor to indicate when to start the next query from| - ??? info "[SubAccount](/../../schemas/sub_account)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |event_time
    `et` |string|True|Time at which the event was emitted in unix nanoseconds| - |sub_account_id
    `sa` |string|True|The sub account ID this entry refers to| - |margin_type
    `mt` |MarginType|True|The type of margin algorithm this subaccount uses| - |settle_currency
    `sc` |Currency|True|The settlement, margin, and reporting currency of this account.
    This subaccount can only open positions quoted in this currency

    In the future, when users select a Multi-Currency Margin Type, this will be USD
    All other assets are converted to this currency for the purpose of calculating margin| - |unrealized_pnl
    `up` |string|True|The total unrealized PnL of all positions owned by this subaccount, denominated in quote currency decimal units.
    `unrealized_pnl = sum(position.unrealized_pnl * position.quote_index_price) / settle_index_price`| - |total_equity
    `te` |string|True|The notional value of your account if all positions are closed, excluding trading fees (reported in `settle_currency`).
    `total_equity = sum(spot_balance.balance * spot_balance.index_price) / settle_index_price + unrealized_pnl`| - |initial_margin
    `im` |string|True|The `total_equity` required to open positions in the account (reported in `settle_currency`).
    Computation is different depending on account's `margin_type`| - |maintenance_margin
    `mm` |string|True|The `total_equity` required to avoid liquidation of positions in the account (reported in `settle_currency`).
    Computation is different depending on account's `margin_type`| - |available_balance
    `ab` |string|True|The notional value available to transfer out of the trading account into the funding account (reported in `settle_currency`).
    `available_balance = total_equity - initial_margin - min(unrealized_pnl, 0)`| - |spot_balances
    `sb` |[SpotBalance]|True|The list of spot assets owned by this sub account, and their balances| - |positions
    `p` |[Positions]|True|The list of positions owned by this sub account| - |settle_index_price
    `si` |string|True|The index price of the settle currency. (reported in `USD`)| - ??? info "[MarginType](/../../schemas/margin_type)" - |Value| Description | - |-|-| - |`SIMPLE_CROSS_MARGIN` = 2|Simple Cross Margin Mode: all assets have a predictable margin impact, the whole subaccount shares a single margin| - |`PORTFOLIO_CROSS_MARGIN` = 3|Portfolio Cross Margin Mode: asset margin impact is analysed on portfolio level, the whole subaccount shares a single margin| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
    - - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| - ??? info "[SpotBalance](/../../schemas/spot_balance)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |currency
    `c` |Currency|True|The currency you hold a spot balance in| - |balance
    `b` |string|True|This currency's balance in this trading account.| - |index_price
    `ip` |string|True|The index price of this currency. (reported in `USD`)| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
    - - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| - ??? info "[Positions](/../../schemas/positions)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |event_time
    `et` |string|True|Time at which the event was emitted in unix nanoseconds| - |sub_account_id
    `sa` |string|True|The sub account ID that participated in the trade| - |instrument
    `i` |string|True|The instrument being represented| - |size
    `s` |string|True|The size of the position, expressed in base asset decimal units. Negative for short positions| - |notional
    `n` |string|True|The notional value of the position, negative for short assets, expressed in quote asset decimal units| - |entry_price
    `ep` |string|True|The entry price of the position, expressed in `9` decimals
    Whenever increasing the size of a position, the entry price is updated to the new average entry price
    `new_entry_price = (old_entry_price * old_size + trade_price * trade_size) / (old_size + trade_size)`| - |exit_price
    `ep1` |string|True|The exit price of the position, expressed in `9` decimals
    Whenever decreasing the size of a position, the exit price is updated to the new average exit price
    `new_exit_price = (old_exit_price * old_exit_trade_size + trade_price * trade_size) / (old_exit_trade_size + trade_size)`| - |mark_price
    `mp` |string|True|The mark price of the position, expressed in `9` decimals| - |unrealized_pnl
    `up` |string|True|The unrealized PnL of the position, expressed in quote asset decimal units
    `unrealized_pnl = (mark_price - entry_price) * size`| - |realized_pnl
    `rp` |string|True|The realized PnL of the position, expressed in quote asset decimal units
    `realized_pnl = (exit_price - entry_price) * exit_trade_size`| - |total_pnl
    `tp` |string|True|The total PnL of the position, expressed in quote asset decimal units
    `total_pnl = realized_pnl + unrealized_pnl`| - |roi
    `r` |string|True|The ROI of the position, expressed as a percentage
    `roi = (total_pnl / (entry_price * abs(size))) * 100^`| - |quote_index_price
    `qi` |string|True|The index price of the quote currency. (reported in `USD`)| - |est_liquidation_price
    `el` |string|True|The estimated liquidation price| diff --git a/artifacts/apidocs/schemas/api_sub_account_summary_request.md b/artifacts/apidocs/schemas/api_sub_account_summary_request.md index 870e4f3..e69de29 100644 --- a/artifacts/apidocs/schemas/api_sub_account_summary_request.md +++ b/artifacts/apidocs/schemas/api_sub_account_summary_request.md @@ -1,4 +0,0 @@ -!!! info "[ApiSubAccountSummaryRequest](/../../schemas/api_sub_account_summary_request)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |sub_account_id
    `sa` |string|True|The subaccount ID to filter by| diff --git a/artifacts/apidocs/schemas/api_sub_account_summary_response.md b/artifacts/apidocs/schemas/api_sub_account_summary_response.md index 042a944..e69de29 100644 --- a/artifacts/apidocs/schemas/api_sub_account_summary_response.md +++ b/artifacts/apidocs/schemas/api_sub_account_summary_response.md @@ -1,97 +0,0 @@ -!!! info "[ApiSubAccountSummaryResponse](/../../schemas/api_sub_account_summary_response)" - Query for sub-account details, including base currency balance, all derivative positions, margin levels, and P&L.
    - - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |result
    `r` |SubAccount|True|The sub account matching the request sub account| - ??? info "[SubAccount](/../../schemas/sub_account)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |event_time
    `et` |string|True|Time at which the event was emitted in unix nanoseconds| - |sub_account_id
    `sa` |string|True|The sub account ID this entry refers to| - |margin_type
    `mt` |MarginType|True|The type of margin algorithm this subaccount uses| - |settle_currency
    `sc` |Currency|True|The settlement, margin, and reporting currency of this account.
    This subaccount can only open positions quoted in this currency

    In the future, when users select a Multi-Currency Margin Type, this will be USD
    All other assets are converted to this currency for the purpose of calculating margin| - |unrealized_pnl
    `up` |string|True|The total unrealized PnL of all positions owned by this subaccount, denominated in quote currency decimal units.
    `unrealized_pnl = sum(position.unrealized_pnl * position.quote_index_price) / settle_index_price`| - |total_equity
    `te` |string|True|The notional value of your account if all positions are closed, excluding trading fees (reported in `settle_currency`).
    `total_equity = sum(spot_balance.balance * spot_balance.index_price) / settle_index_price + unrealized_pnl`| - |initial_margin
    `im` |string|True|The `total_equity` required to open positions in the account (reported in `settle_currency`).
    Computation is different depending on account's `margin_type`| - |maintenance_margin
    `mm` |string|True|The `total_equity` required to avoid liquidation of positions in the account (reported in `settle_currency`).
    Computation is different depending on account's `margin_type`| - |available_balance
    `ab` |string|True|The notional value available to transfer out of the trading account into the funding account (reported in `settle_currency`).
    `available_balance = total_equity - initial_margin - min(unrealized_pnl, 0)`| - |spot_balances
    `sb` |[SpotBalance]|True|The list of spot assets owned by this sub account, and their balances| - |positions
    `p` |[Positions]|True|The list of positions owned by this sub account| - |settle_index_price
    `si` |string|True|The index price of the settle currency. (reported in `USD`)| - ??? info "[MarginType](/../../schemas/margin_type)" - |Value| Description | - |-|-| - |`SIMPLE_CROSS_MARGIN` = 2|Simple Cross Margin Mode: all assets have a predictable margin impact, the whole subaccount shares a single margin| - |`PORTFOLIO_CROSS_MARGIN` = 3|Portfolio Cross Margin Mode: asset margin impact is analysed on portfolio level, the whole subaccount shares a single margin| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
    - - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| - ??? info "[SpotBalance](/../../schemas/spot_balance)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |currency
    `c` |Currency|True|The currency you hold a spot balance in| - |balance
    `b` |string|True|This currency's balance in this trading account.| - |index_price
    `ip` |string|True|The index price of this currency. (reported in `USD`)| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
    - - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| - ??? info "[Positions](/../../schemas/positions)" - |Name
    `Lite`|Type|Required
    `Default`| Description | - |-|-|-|-| - |event_time
    `et` |string|True|Time at which the event was emitted in unix nanoseconds| - |sub_account_id
    `sa` |string|True|The sub account ID that participated in the trade| - |instrument
    `i` |string|True|The instrument being represented| - |size
    `s` |string|True|The size of the position, expressed in base asset decimal units. Negative for short positions| - |notional
    `n` |string|True|The notional value of the position, negative for short assets, expressed in quote asset decimal units| - |entry_price
    `ep` |string|True|The entry price of the position, expressed in `9` decimals
    Whenever increasing the size of a position, the entry price is updated to the new average entry price
    `new_entry_price = (old_entry_price * old_size + trade_price * trade_size) / (old_size + trade_size)`| - |exit_price
    `ep1` |string|True|The exit price of the position, expressed in `9` decimals
    Whenever decreasing the size of a position, the exit price is updated to the new average exit price
    `new_exit_price = (old_exit_price * old_exit_trade_size + trade_price * trade_size) / (old_exit_trade_size + trade_size)`| - |mark_price
    `mp` |string|True|The mark price of the position, expressed in `9` decimals| - |unrealized_pnl
    `up` |string|True|The unrealized PnL of the position, expressed in quote asset decimal units
    `unrealized_pnl = (mark_price - entry_price) * size`| - |realized_pnl
    `rp` |string|True|The realized PnL of the position, expressed in quote asset decimal units
    `realized_pnl = (exit_price - entry_price) * exit_trade_size`| - |total_pnl
    `tp` |string|True|The total PnL of the position, expressed in quote asset decimal units
    `total_pnl = realized_pnl + unrealized_pnl`| - |roi
    `r` |string|True|The ROI of the position, expressed as a percentage
    `roi = (total_pnl / (entry_price * abs(size))) * 100^`| - |quote_index_price
    `qi` |string|True|The index price of the quote currency. (reported in `USD`)| - |est_liquidation_price
    `el` |string|True|The estimated liquidation price| 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..e69de29 100644 --- a/artifacts/apidocs/schemas/api_sub_account_trade_aggregation_request.md +++ b/artifacts/apidocs/schemas/api_sub_account_trade_aggregation_request.md @@ -1,20 +0,0 @@ -!!! info "[ApiSubAccountTradeAggregationRequest](/../../schemas/api_sub_account_trade_aggregation_request)" - startTime are optional parameters. The semantics of these parameters are as follows:

      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |limit
      `l` |integer|True|Optional. The limit of the number of results to return| - |interval
      `i` |SubAccountTradeInterval|True|The interval of each sub account trade| - |sub_account_i_ds
      `sa` |[string]|True|The list of sub account ids to query| - |start_interval
      `si` |string|True|Optional. The starting time in unix nanoseconds of a specific interval to query| - |start_time
      `st` |string|False
      `0`|Optional. Start time in unix nanoseconds| - |end_time
      `et` |string|False
      `now()`|Optional. End time in unix nanoseconds| - |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| - ??? info "[SubAccountTradeInterval](/../../schemas/sub_account_trade_interval)" - |Value| Description | - |-|-| - |`SAT_1_MO` = 1|1 month| - |`SAT_1_D` = 2|1 day| - |`SAT_1_H` = 3|1 hour| 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..e69de29 100644 --- a/artifacts/apidocs/schemas/api_sub_account_trade_aggregation_response.md +++ b/artifacts/apidocs/schemas/api_sub_account_trade_aggregation_response.md @@ -1,15 +0,0 @@ -!!! info "[ApiSubAccountTradeAggregationResponse](/../../schemas/api_sub_account_trade_aggregation_response)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |result
      `r` |[SubAccountTradeAggregation]|True|The sub account trade aggregation result set for given interval| - |next
      `n` |string|False
      `''`|The cursor to indicate when to start the next query from| - ??? info "[SubAccountTradeAggregation](/../../schemas/sub_account_trade_aggregation)" - Similar to sub-account trade, but not divided by individual assets.
      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |sub_account_id
      `sa` |string|True|The sub account id| - |total_fee
      `tf` |string|True|Total fee paid| - |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| diff --git a/artifacts/apidocs/schemas/api_ticker_feed_data_v1.md b/artifacts/apidocs/schemas/api_ticker_feed_data_v1.md index 1ec949c..e69de29 100644 --- a/artifacts/apidocs/schemas/api_ticker_feed_data_v1.md +++ b/artifacts/apidocs/schemas/api_ticker_feed_data_v1.md @@ -1,33 +0,0 @@ -!!! info "[ApiTickerFeedDataV1](/../../schemas/api_ticker_feed_data_v1)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |result
      `r` |Ticker|True|The mini ticker matching the request asset| - ??? info "[Ticker](/../../schemas/ticker)" - Derived data such as the below, will not be included by default:
      - 24 hour volume (`buyVolume + sellVolume`)
      - 24 hour taker buy/sell ratio (`buyVolume / sellVolume`)
      - 24 hour average trade price (`volumeQ / volumeU`)
      - 24 hour average trade volume (`volume / trades`)
      - 24 hour percentage change (`24hStatChange / 24hStat`)
      - 48 hour statistics (`2 * 24hStat - 24hStatChange`)

      To query for an extended ticker payload, leverage the `greeks` and the `derived` flags.
      Ticker extensions are currently under design to offer you more convenience.
      These flags are only supported on the `Ticker Snapshot` WS endpoint, and on the `Ticker` API endpoint.

      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |event_time
      `et` |string|False
      `None`|Time at which the event was emitted in unix nanoseconds| - |instrument
      `i` |string|False
      `None`|The readable instrument name:
      • Perpetual: `ETH_USDT_Perp`
      • Future: `BTC_USDT_Fut_20Oct23`
      • Call: `ETH_USDT_Call_20Oct23_2800`
      • Put: `ETH_USDT_Put_20Oct23_2800`
      | - |mark_price
      `mp` |string|False
      `None`|The mark price of the instrument, expressed in `9` decimals| - |index_price
      `ip` |string|False
      `None`|The index price of the instrument, expressed in `9` decimals| - |last_price
      `lp` |string|False
      `None`|The last traded price of the instrument (also close price), expressed in `9` decimals| - |last_size
      `ls` |string|False
      `None`|The number of assets traded in the last trade, expressed in base asset decimal units| - |mid_price
      `mp1` |string|False
      `None`|The mid price of the instrument, expressed in `9` decimals| - |best_bid_price
      `bb` |string|False
      `None`|The best bid price of the instrument, expressed in `9` decimals| - |best_bid_size
      `bb1` |string|False
      `None`|The number of assets offered on the best bid price of the instrument, expressed in base asset decimal units| - |best_ask_price
      `ba` |string|False
      `None`|The best ask price of the instrument, expressed in `9` decimals| - |best_ask_size
      `ba1` |string|False
      `None`|The number of assets offered on the best ask price of the instrument, expressed in base asset decimal units| - |funding_rate_8h_curr
      `fr` |string|False
      `None`|The current funding rate of the instrument, expressed in percentage points| - |funding_rate_8h_avg
      `fr1` |string|False
      `None`|The average funding rate of the instrument (over last 8h), expressed in percentage points| - |interest_rate
      `ir` |string|False
      `None`|The interest rate of the underlying, expressed in centibeeps (1/100th of a basis point)| - |forward_price
      `fp` |string|False
      `None`|[Options] The forward price of the option, expressed in `9` decimals| - |buy_volume_24h_b
      `bv` |string|False
      `None`|The 24 hour taker buy volume of the instrument, expressed in base asset decimal units| - |sell_volume_24h_b
      `sv` |string|False
      `None`|The 24 hour taker sell volume of the instrument, expressed in base asset decimal units| - |buy_volume_24h_q
      `bv1` |string|False
      `None`|The 24 hour taker buy volume of the instrument, expressed in quote asset decimal units| - |sell_volume_24h_q
      `sv1` |string|False
      `None`|The 24 hour taker sell volume of the instrument, expressed in quote asset decimal units| - |high_price
      `hp` |string|False
      `None`|The 24 hour highest traded price of the instrument, expressed in `9` decimals| - |low_price
      `lp1` |string|False
      `None`|The 24 hour lowest traded price of the instrument, expressed in `9` decimals| - |open_price
      `op` |string|False
      `None`|The 24 hour first traded price of the instrument, expressed in `9` decimals| - |open_interest
      `oi` |string|False
      `None`|The open interest in the instrument, expressed in base asset decimal units| - |long_short_ratio
      `ls1` |string|False
      `None`|The ratio of accounts that are net long vs net short on this instrument| diff --git a/artifacts/apidocs/schemas/api_ticker_request.md b/artifacts/apidocs/schemas/api_ticker_request.md index 19d60d5..e69de29 100644 --- a/artifacts/apidocs/schemas/api_ticker_request.md +++ b/artifacts/apidocs/schemas/api_ticker_request.md @@ -1,6 +0,0 @@ -!!! info "[ApiTickerRequest](/../../schemas/api_ticker_request)" - Retrieves a single ticker value for a single instrument. Please do not use this to repeatedly poll for data -- a websocket subscription is much more performant, and useful.
      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |instrument
      `i` |string|True|The readable instrument name:
      • Perpetual: `ETH_USDT_Perp`
      • Future: `BTC_USDT_Fut_20Oct23`
      • Call: `ETH_USDT_Call_20Oct23_2800`
      • Put: `ETH_USDT_Put_20Oct23_2800`
      | diff --git a/artifacts/apidocs/schemas/api_ticker_response.md b/artifacts/apidocs/schemas/api_ticker_response.md index 86fb1f4..e69de29 100644 --- a/artifacts/apidocs/schemas/api_ticker_response.md +++ b/artifacts/apidocs/schemas/api_ticker_response.md @@ -1,33 +0,0 @@ -!!! info "[ApiTickerResponse](/../../schemas/api_ticker_response)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |result
      `r` |Ticker|True|The mini ticker matching the request asset| - ??? info "[Ticker](/../../schemas/ticker)" - Derived data such as the below, will not be included by default:
      - 24 hour volume (`buyVolume + sellVolume`)
      - 24 hour taker buy/sell ratio (`buyVolume / sellVolume`)
      - 24 hour average trade price (`volumeQ / volumeU`)
      - 24 hour average trade volume (`volume / trades`)
      - 24 hour percentage change (`24hStatChange / 24hStat`)
      - 48 hour statistics (`2 * 24hStat - 24hStatChange`)

      To query for an extended ticker payload, leverage the `greeks` and the `derived` flags.
      Ticker extensions are currently under design to offer you more convenience.
      These flags are only supported on the `Ticker Snapshot` WS endpoint, and on the `Ticker` API endpoint.

      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |event_time
      `et` |string|False
      `None`|Time at which the event was emitted in unix nanoseconds| - |instrument
      `i` |string|False
      `None`|The readable instrument name:
      • Perpetual: `ETH_USDT_Perp`
      • Future: `BTC_USDT_Fut_20Oct23`
      • Call: `ETH_USDT_Call_20Oct23_2800`
      • Put: `ETH_USDT_Put_20Oct23_2800`
      | - |mark_price
      `mp` |string|False
      `None`|The mark price of the instrument, expressed in `9` decimals| - |index_price
      `ip` |string|False
      `None`|The index price of the instrument, expressed in `9` decimals| - |last_price
      `lp` |string|False
      `None`|The last traded price of the instrument (also close price), expressed in `9` decimals| - |last_size
      `ls` |string|False
      `None`|The number of assets traded in the last trade, expressed in base asset decimal units| - |mid_price
      `mp1` |string|False
      `None`|The mid price of the instrument, expressed in `9` decimals| - |best_bid_price
      `bb` |string|False
      `None`|The best bid price of the instrument, expressed in `9` decimals| - |best_bid_size
      `bb1` |string|False
      `None`|The number of assets offered on the best bid price of the instrument, expressed in base asset decimal units| - |best_ask_price
      `ba` |string|False
      `None`|The best ask price of the instrument, expressed in `9` decimals| - |best_ask_size
      `ba1` |string|False
      `None`|The number of assets offered on the best ask price of the instrument, expressed in base asset decimal units| - |funding_rate_8h_curr
      `fr` |string|False
      `None`|The current funding rate of the instrument, expressed in percentage points| - |funding_rate_8h_avg
      `fr1` |string|False
      `None`|The average funding rate of the instrument (over last 8h), expressed in percentage points| - |interest_rate
      `ir` |string|False
      `None`|The interest rate of the underlying, expressed in centibeeps (1/100th of a basis point)| - |forward_price
      `fp` |string|False
      `None`|[Options] The forward price of the option, expressed in `9` decimals| - |buy_volume_24h_b
      `bv` |string|False
      `None`|The 24 hour taker buy volume of the instrument, expressed in base asset decimal units| - |sell_volume_24h_b
      `sv` |string|False
      `None`|The 24 hour taker sell volume of the instrument, expressed in base asset decimal units| - |buy_volume_24h_q
      `bv1` |string|False
      `None`|The 24 hour taker buy volume of the instrument, expressed in quote asset decimal units| - |sell_volume_24h_q
      `sv1` |string|False
      `None`|The 24 hour taker sell volume of the instrument, expressed in quote asset decimal units| - |high_price
      `hp` |string|False
      `None`|The 24 hour highest traded price of the instrument, expressed in `9` decimals| - |low_price
      `lp1` |string|False
      `None`|The 24 hour lowest traded price of the instrument, expressed in `9` decimals| - |open_price
      `op` |string|False
      `None`|The 24 hour first traded price of the instrument, expressed in `9` decimals| - |open_interest
      `oi` |string|False
      `None`|The open interest in the instrument, expressed in base asset decimal units| - |long_short_ratio
      `ls1` |string|False
      `None`|The ratio of accounts that are net long vs net short on this instrument| diff --git a/artifacts/apidocs/schemas/api_trade_history_request.md b/artifacts/apidocs/schemas/api_trade_history_request.md index 274e8db..e69de29 100644 --- a/artifacts/apidocs/schemas/api_trade_history_request.md +++ b/artifacts/apidocs/schemas/api_trade_history_request.md @@ -1,10 +0,0 @@ -!!! info "[ApiTradeHistoryRequest](/../../schemas/api_trade_history_request)" - Perform historical lookup of public trades in any given instrument.
      This endpoint offers public trading data, use the Trading APIs instead to query for your personalized trade tape.
      Only data from the last three months will be retained.

      Pagination works as follows:
      • We perform a reverse chronological lookup, starting from `end_time`. If `end_time` is not set, we start from the most recent data.
      • The lookup is limited to `limit` records. If more data is requested, the response will contain a `next` cursor for you to query the next page.
      • If a `cursor` is provided, it will be used to fetch results from that point onwards.
      • Pagination will continue until the `start_time` is reached. If `start_time` is not set, pagination will continue as far back as our data retention policy allows.

      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |instrument
      `i` |string|True|The readable instrument name:
      • Perpetual: `ETH_USDT_Perp`
      • Future: `BTC_USDT_Fut_20Oct23`
      • Call: `ETH_USDT_Call_20Oct23_2800`
      • Put: `ETH_USDT_Put_20Oct23_2800`
      | - |start_time
      `st` |string|False
      `0`|The start time to apply in nanoseconds. If nil, this defaults to all start times. Otherwise, only entries matching the filter will be returned| - |end_time
      `et` |string|False
      `now()`|The end time to apply in nanoseconds. If nil, this defaults to all end times. Otherwise, only entries matching the filter will be returned| - |limit
      `l` |integer|False
      `500`|The limit to query for. Defaults to 500; Max 1000| - |cursor
      `c` |string|False
      `''`|The cursor to indicate when to start the query from| diff --git a/artifacts/apidocs/schemas/api_trade_history_response.md b/artifacts/apidocs/schemas/api_trade_history_response.md index 634a047..e69de29 100644 --- a/artifacts/apidocs/schemas/api_trade_history_response.md +++ b/artifacts/apidocs/schemas/api_trade_history_response.md @@ -1,28 +0,0 @@ -!!! info "[ApiTradeHistoryResponse](/../../schemas/api_trade_history_response)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |result
      `r` |[Trade]|True|The public trades matching the request asset| - |next
      `n` |string|False
      `''`|The cursor to indicate when to start the next query from| - ??? info "[Trade](/../../schemas/trade)" - All private RFQs and Private AXEs will be filtered out from the responses
      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |event_time
      `et` |string|True|Time at which the event was emitted in unix nanoseconds| - |instrument
      `i` |string|True|The readable instrument name:
      • Perpetual: `ETH_USDT_Perp`
      • Future: `BTC_USDT_Fut_20Oct23`
      • Call: `ETH_USDT_Call_20Oct23_2800`
      • Put: `ETH_USDT_Put_20Oct23_2800`
      | - |is_taker_buyer
      `it` |boolean|True|If taker was the buyer on the trade| - |size
      `s` |string|True|The number of assets being traded, expressed in base asset decimal units| - |price
      `p` |string|True|The traded price, expressed in `9` decimals| - |mark_price
      `mp` |string|True|The mark price of the instrument at point of trade, expressed in `9` decimals| - |index_price
      `ip` |string|True|The index price of the instrument at point of trade, expressed in `9` decimals| - |interest_rate
      `ir` |string|True|The interest rate of the underlying at point of trade, expressed in centibeeps (1/100th of a basis point)| - |forward_price
      `fp` |string|True|[Options] The forward price of the option at point of trade, expressed in `9` decimals| - |trade_id
      `ti` |string|True|A trade identifier, globally unique, and monotonically increasing (not by `1`).
      All trades sharing a single taker execution share the same first component (before `-`), and `event_time`.
      `trade_id` is guaranteed to be consistent across MarketData `Trade` and Trading `Fill`.| - |venue
      `v` |Venue|True|The venue where the trade occurred| - ??? info "[Venue](/../../schemas/venue)" - The list of Trading Venues that are supported on the GRVT exchange
      - - |Value| Description | - |-|-| - |`ORDERBOOK` = 1|the trade is cleared on the orderbook venue| - |`RFQ` = 2|the trade is cleared on the RFQ venue| diff --git a/artifacts/apidocs/schemas/api_trade_request.md b/artifacts/apidocs/schemas/api_trade_request.md index dcb5e48..e69de29 100644 --- a/artifacts/apidocs/schemas/api_trade_request.md +++ b/artifacts/apidocs/schemas/api_trade_request.md @@ -1,7 +0,0 @@ -!!! info "[ApiTradeRequest](/../../schemas/api_trade_request)" - Retrieves up to 1000 of the most recent trades in any given instrument. Do not use this to poll for data -- a websocket subscription is much more performant, and useful.
      This endpoint offers public trading data, use the Trading APIs instead to query for your personalized trade tape.
      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |instrument
      `i` |string|True|The readable instrument name:
      • Perpetual: `ETH_USDT_Perp`
      • Future: `BTC_USDT_Fut_20Oct23`
      • Call: `ETH_USDT_Call_20Oct23_2800`
      • Put: `ETH_USDT_Put_20Oct23_2800`
      | - |limit
      `l` |integer|True|The limit to query for. Defaults to 500; Max 1000| diff --git a/artifacts/apidocs/schemas/api_trade_response.md b/artifacts/apidocs/schemas/api_trade_response.md index 8e1f882..e69de29 100644 --- a/artifacts/apidocs/schemas/api_trade_response.md +++ b/artifacts/apidocs/schemas/api_trade_response.md @@ -1,27 +0,0 @@ -!!! info "[ApiTradeResponse](/../../schemas/api_trade_response)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |result
      `r` |[Trade]|True|The public trades matching the request asset| - ??? info "[Trade](/../../schemas/trade)" - All private RFQs and Private AXEs will be filtered out from the responses
      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |event_time
      `et` |string|True|Time at which the event was emitted in unix nanoseconds| - |instrument
      `i` |string|True|The readable instrument name:
      • Perpetual: `ETH_USDT_Perp`
      • Future: `BTC_USDT_Fut_20Oct23`
      • Call: `ETH_USDT_Call_20Oct23_2800`
      • Put: `ETH_USDT_Put_20Oct23_2800`
      | - |is_taker_buyer
      `it` |boolean|True|If taker was the buyer on the trade| - |size
      `s` |string|True|The number of assets being traded, expressed in base asset decimal units| - |price
      `p` |string|True|The traded price, expressed in `9` decimals| - |mark_price
      `mp` |string|True|The mark price of the instrument at point of trade, expressed in `9` decimals| - |index_price
      `ip` |string|True|The index price of the instrument at point of trade, expressed in `9` decimals| - |interest_rate
      `ir` |string|True|The interest rate of the underlying at point of trade, expressed in centibeeps (1/100th of a basis point)| - |forward_price
      `fp` |string|True|[Options] The forward price of the option at point of trade, expressed in `9` decimals| - |trade_id
      `ti` |string|True|A trade identifier, globally unique, and monotonically increasing (not by `1`).
      All trades sharing a single taker execution share the same first component (before `-`), and `event_time`.
      `trade_id` is guaranteed to be consistent across MarketData `Trade` and Trading `Fill`.| - |venue
      `v` |Venue|True|The venue where the trade occurred| - ??? info "[Venue](/../../schemas/venue)" - The list of Trading Venues that are supported on the GRVT exchange
      - - |Value| Description | - |-|-| - |`ORDERBOOK` = 1|the trade is cleared on the orderbook venue| - |`RFQ` = 2|the trade is cleared on the RFQ venue| diff --git a/artifacts/apidocs/schemas/api_transfer_history_request.md b/artifacts/apidocs/schemas/api_transfer_history_request.md index c1fc682..e69de29 100644 --- a/artifacts/apidocs/schemas/api_transfer_history_request.md +++ b/artifacts/apidocs/schemas/api_transfer_history_request.md @@ -1,35 +0,0 @@ -!!! info "[ApiTransferHistoryRequest](/../../schemas/api_transfer_history_request)" - The request to get the historical transfers of an account
      The history is returned in reverse chronological order

      Pagination works as follows:
      • We perform a reverse chronological lookup, starting from `end_time`. If `end_time` is not set, we start from the most recent data.
      • The lookup is limited to `limit` records. If more data is requested, the response will contain a `next` cursor for you to query the next page.
      • If a `cursor` is provided, it will be used to fetch results from that point onwards.
      • Pagination will continue until the `start_time` is reached. If `start_time` is not set, pagination will continue as far back as our data retention policy allows.

      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |currency
      `c` |[Currency]|True|The token currency to query for, if nil or empty, return all transfers. Otherwise, only entries matching the filter will be returned| - |start_time
      `st` |string|False
      `0`|The start time to query for in unix nanoseconds| - |end_time
      `et` |string|False
      `now()`|The end time to query for in unix nanoseconds| - |limit
      `l` |integer|False
      `500`|The limit to query for. Defaults to 500; Max 1000| - |cursor
      `c1` |string|False
      `''`|The cursor to indicate when to start the next query from| - |tx_id
      `ti` |string|False
      `0`|The transaction ID to query for| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
      - - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/api_transfer_history_response.md b/artifacts/apidocs/schemas/api_transfer_history_response.md index 0b2e6c0..e69de29 100644 --- a/artifacts/apidocs/schemas/api_transfer_history_response.md +++ b/artifacts/apidocs/schemas/api_transfer_history_response.md @@ -1,58 +0,0 @@ -!!! info "[ApiTransferHistoryResponse](/../../schemas/api_transfer_history_response)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |result
      `r` |[TransferHistory]|True|The transfer history matching the request account| - |next
      `n` |string|False
      `''`|The cursor to indicate when to start the next query from| - ??? info "[TransferHistory](/../../schemas/transfer_history)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |tx_id
      `ti` |string|True|The transaction ID of the transfer| - |from_account_id
      `fa` |string|True|The account to transfer from| - |from_sub_account_id
      `fs` |string|True|The subaccount to transfer from (0 if transferring from main account)| - |to_account_id
      `ta` |string|True|The account to deposit into| - |to_sub_account_id
      `ts` |string|True|The subaccount to transfer to (0 if transferring to main account)| - |currency
      `c` |Currency|True|The token currency to transfer| - |num_tokens
      `nt` |string|True|The number of tokens to transfer| - |signature
      `s` |Signature|True|The signature of the transfer| - |event_time
      `et` |string|True|The timestamp of the transfer in unix nanoseconds| - |transfer_type
      `tt` |TransferType|True|The type of transfer| - |transfer_metadata
      `tm` |string|True|The metadata of the transfer| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
      - - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| - ??? 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 "[TransferType](/../../schemas/transfer_type)" - |Value| Description | - |-|-| - |`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| diff --git a/artifacts/apidocs/schemas/api_transfer_request.md b/artifacts/apidocs/schemas/api_transfer_request.md index 3b125bf..e69de29 100644 --- a/artifacts/apidocs/schemas/api_transfer_request.md +++ b/artifacts/apidocs/schemas/api_transfer_request.md @@ -1,53 +0,0 @@ -!!! info "[ApiTransferRequest](/../../schemas/api_transfer_request)" - This API allows you to transfer funds in multiple different ways

      • Between SubAccounts within your Main Account

      • Between your MainAccount and your SubAccounts

      • To other MainAccounts that you have previously allowlisted

      Fast Withdrawal Funding Address
      For fast withdrawals, funds must be sent to the designated funding account address. Please ensure you use the correct address based on the environment:
      Production Environment Address:
      [To be updated, not ready yet]
      This address should be specified as the to_account_id in your API requests for transferring funds using the transfer API. Ensure accurate input to avoid loss of funds or use the UI.

      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |from_account_id
      `fa` |string|True|The main account to transfer from| - |from_sub_account_id
      `fs` |string|True|The subaccount to transfer from (0 if transferring from main account)| - |to_account_id
      `ta` |string|True|The main account to deposit into| - |to_sub_account_id
      `ts` |string|True|The subaccount to transfer to (0 if transferring to main account)| - |currency
      `c` |Currency|True|The token currency to transfer| - |num_tokens
      `nt` |string|True|The number of tokens to transfer, quoted in tokenCurrency decimal units| - |signature
      `s` |Signature|True|The signature of the transfer| - |transfer_type
      `tt` |TransferType|True|The type of transfer| - |transfer_metadata
      `tm` |string|True|The metadata of the transfer| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
      - - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| - ??? 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 "[TransferType](/../../schemas/transfer_type)" - |Value| Description | - |-|-| - |`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| diff --git a/artifacts/apidocs/schemas/api_withdrawal_history_request.md b/artifacts/apidocs/schemas/api_withdrawal_history_request.md index 30005f0..e69de29 100644 --- a/artifacts/apidocs/schemas/api_withdrawal_history_request.md +++ b/artifacts/apidocs/schemas/api_withdrawal_history_request.md @@ -1,34 +0,0 @@ -!!! info "[ApiWithdrawalHistoryRequest](/../../schemas/api_withdrawal_history_request)" - The request to get the historical withdrawals of an account
      The history is returned in reverse chronological order

      Pagination works as follows:
      • We perform a reverse chronological lookup, starting from `end_time`. If `end_time` is not set, we start from the most recent data.
      • The lookup is limited to `limit` records. If more data is requested, the response will contain a `next` cursor for you to query the next page.
      • If a `cursor` is provided, it will be used to fetch results from that point onwards.
      • Pagination will continue until the `start_time` is reached. If `start_time` is not set, pagination will continue as far back as our data retention policy allows.

      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |currency
      `c` |[Currency]|True|The token currency to query for, if nil or empty, return all withdrawals. Otherwise, only entries matching the filter will be returned| - |start_time
      `st` |string|False
      `0`|The start time to query for in unix nanoseconds| - |end_time
      `et` |string|False
      `now()`|The end time to query for in unix nanoseconds| - |limit
      `l` |integer|False
      `500`|The limit to query for. Defaults to 500; Max 1000| - |cursor
      `c1` |string|False
      `''`|The cursor to indicate when to start the next query from| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
      - - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/api_withdrawal_history_response.md b/artifacts/apidocs/schemas/api_withdrawal_history_response.md index 7d38da5..e69de29 100644 --- a/artifacts/apidocs/schemas/api_withdrawal_history_response.md +++ b/artifacts/apidocs/schemas/api_withdrawal_history_response.md @@ -1,48 +0,0 @@ -!!! info "[ApiWithdrawalHistoryResponse](/../../schemas/api_withdrawal_history_response)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |result
      `r` |[WithdrawalHistory]|True|The withdrawals history matching the request account| - |next
      `n` |string|False
      `''`|The cursor to indicate when to start the next query from| - ??? info "[WithdrawalHistory](/../../schemas/withdrawal_history)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |tx_id
      `ti` |string|True|The transaction ID of the withdrawal| - |from_account_id
      `fa` |string|True|The subaccount to withdraw from| - |to_eth_address
      `te` |string|True|The ethereum address to withdraw to| - |currency
      `c` |Currency|True|The token currency to withdraw| - |num_tokens
      `nt` |string|True|The number of tokens to withdraw| - |signature
      `s` |Signature|True|The signature of the withdrawal| - |event_time
      `et` |string|True|The timestamp of the withdrawal in unix nanoseconds| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
      - - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| - ??? 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.| diff --git a/artifacts/apidocs/schemas/api_withdrawal_request.md b/artifacts/apidocs/schemas/api_withdrawal_request.md index c79afd1..e69de29 100644 --- a/artifacts/apidocs/schemas/api_withdrawal_request.md +++ b/artifacts/apidocs/schemas/api_withdrawal_request.md @@ -1,43 +0,0 @@ -!!! info "[ApiWithdrawalRequest](/../../schemas/api_withdrawal_request)" - Leverage this API to initialize a withdrawal from GRVT's Hyperchain onto Ethereum.
      Do take note that the bridging process does take time. The GRVT UI will help you keep track of bridging progress, and notify you once its complete.

      If not withdrawing the entirety of your balance, there is a minimum withdrawal amount. Currently that amount is ~25 USDT.
      Withdrawal fees also apply to cover the cost of the Ethereum transaction.
      Note that your funds will always remain in self-custory throughout the withdrawal process. At no stage does GRVT gain control over your funds.
      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |from_account_id
      `fa` |string|True|The main account to withdraw from| - |to_eth_address
      `te` |string|True|The Ethereum wallet to withdraw into| - |currency
      `c` |Currency|True|The token currency to withdraw| - |num_tokens
      `nt` |string|True|The number of tokens to withdraw, quoted in tokenCurrency decimal units| - |signature
      `s` |Signature|True|The signature of the withdrawal| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
      - - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| - ??? 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.| diff --git a/artifacts/apidocs/schemas/approximate_lp_point.md b/artifacts/apidocs/schemas/approximate_lp_point.md index 13b9f96..e69de29 100644 --- a/artifacts/apidocs/schemas/approximate_lp_point.md +++ b/artifacts/apidocs/schemas/approximate_lp_point.md @@ -1,6 +0,0 @@ -!!! info "[ApproximateLPPoint](/../../schemas/approximate_lp_point)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |off_chain_account_id
      `oc` |string|True|The off chain account id| - |liquidity_score
      `ls` |string|True|Liquidity score| - |rank
      `r` |integer|True|The rank of user in the LP leaderboard| diff --git a/artifacts/apidocs/schemas/approximate_lp_snapshot.md b/artifacts/apidocs/schemas/approximate_lp_snapshot.md index 53049e6..e69de29 100644 --- a/artifacts/apidocs/schemas/approximate_lp_snapshot.md +++ b/artifacts/apidocs/schemas/approximate_lp_snapshot.md @@ -1,10 +0,0 @@ -!!! info "[ApproximateLPSnapshot](/../../schemas/approximate_lp_snapshot)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |main_account_id
      `ma` |string|True|The main account id| - |underlying_multiplier
      `um` |string|True|Underlying multiplier| - |market_share_multiplier
      `ms` |string|True|Market share multiplier| - |bid_fast_market_multiplier
      `bf` |integer|True|Fast market multiplier| - |ask_fast_market_multiplier
      `af` |integer|True|Fast market multiplier| - |liquidity_score
      `ls` |string|True|Liquidity score| - |calculate_at
      `ca` |string|True|The time when the snapshot was calculated| diff --git a/artifacts/apidocs/schemas/asset_max_qty.md b/artifacts/apidocs/schemas/asset_max_qty.md index 4be3de2..e69de29 100644 --- a/artifacts/apidocs/schemas/asset_max_qty.md +++ b/artifacts/apidocs/schemas/asset_max_qty.md @@ -1,6 +0,0 @@ -!!! info "[AssetMaxQty](/../../schemas/asset_max_qty)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |asset
      `a` |string|True|The asset associated with the max quantity| - |max_buy_qty
      `mb` |string|True|The maximum buy quantity| - |max_sell_qty
      `ms` |string|True|The maximum sell quantity| diff --git a/artifacts/apidocs/schemas/cancel_status_feed.md b/artifacts/apidocs/schemas/cancel_status_feed.md index f0e5279..e69de29 100644 --- a/artifacts/apidocs/schemas/cancel_status_feed.md +++ b/artifacts/apidocs/schemas/cancel_status_feed.md @@ -1,46 +0,0 @@ -!!! info "[CancelStatusFeed](/../../schemas/cancel_status_feed)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |sub_account_id
      `sa` |string|True|The subaccount ID that requested the cancellation| - |client_order_id
      `co` |string|True|A unique identifier for the active order within a subaccount, specified by the client| - |order_id
      `oi` |string|True|A unique 128-bit identifier for the order, deterministically generated within the GRVT backend| - |reason
      `r` |OrderRejectReason|True|The user-provided reason for cancelling the order| - |update_time
      `ut` |string|False
      `0`|[Filled by GRVT Backend] Time at which the cancellation status was updated by GRVT in unix nanoseconds| - |cancel_status
      `cs` |CancelStatus|True|Status of the cancellation attempt| - ??? 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| - ??? 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.| diff --git a/artifacts/apidocs/schemas/candlestick.md b/artifacts/apidocs/schemas/candlestick.md index 4db93ec..e69de29 100644 --- a/artifacts/apidocs/schemas/candlestick.md +++ b/artifacts/apidocs/schemas/candlestick.md @@ -1,15 +0,0 @@ -!!! info "[Candlestick](/../../schemas/candlestick)" -
      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |open_time
      `ot` |string|True|Open time of kline bar in unix nanoseconds| - |close_time
      `ct` |string|True|Close time of kline bar in unix nanosecond| - |open
      `o` |string|True|The open price, expressed in underlying currency resolution units| - |close
      `c` |string|True|The close price, expressed in underlying currency resolution units| - |high
      `h` |string|True|The high price, expressed in underlying currency resolution units| - |low
      `l` |string|True|The low price, expressed in underlying currency resolution units| - |volume_b
      `vb` |string|True|The underlying volume transacted, expressed in base asset decimal units| - |volume_q
      `vq` |string|True|The quote volume transacted, expressed in quote asset decimal units| - |trades
      `t` |integer|True|The number of trades transacted| - |instrument
      `i` |string|True|The readable instrument name:
      • Perpetual: `ETH_USDT_Perp`
      • Future: `BTC_USDT_Fut_20Oct23`
      • Call: `ETH_USDT_Call_20Oct23_2800`
      • Put: `ETH_USDT_Put_20Oct23_2800`
      | diff --git a/artifacts/apidocs/schemas/claim_ecosystem_badge_response.md b/artifacts/apidocs/schemas/claim_ecosystem_badge_response.md index ba155e6..e69de29 100644 --- a/artifacts/apidocs/schemas/claim_ecosystem_badge_response.md +++ b/artifacts/apidocs/schemas/claim_ecosystem_badge_response.md @@ -1,54 +0,0 @@ -!!! info "[ClaimEcosystemBadgeResponse](/../../schemas/claim_ecosystem_badge_response)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |badge
      `b` |EpochBadge|True|The epoch badge| - ??? info "[EpochBadge](/../../schemas/epoch_badge)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |account_id
      `ai` |string|True|The off chain account id| - |main_account_id
      `ma` |string|True|The account ID| - |type
      `t` |RewardProgramType|True|The type of the reward program| - |epoch
      `e` |integer|True|The epoch number| - |epoch_start_time
      `es` |string|True|The start time of the epoch| - |epoch_end_time
      `ee` |string|True|The end time of the epoch| - |badge
      `b` |EpochBadgeType|True|The type of the badge| - |distributed_badges
      `db` |[EpochBadgeType]|True|The distributed badges| - |total_point
      `tp` |string|True|Total point| - |rank
      `r` |integer|True|Rank| - |claimed_at
      `ca` |string|True|The time when the badge was claimed, or the epoch end time if the user has already completed the KYC process| - ??? info "[RewardProgramType](/../../schemas/reward_program_type)" - |Value| Description | - |-|-| - |`ECOSYSTEM` = 1|| - |`TRADER` = 2|| - |`LP` = 3|| - ??? info "[EpochBadgeType](/../../schemas/epoch_badge_type)" - |Value| Description | - |-|-| - |`CHAMPION` = 1|Champion| - |`LEGEND` = 2|Legend| - |`VETERAN` = 3|Veteran| - |`ELITE` = 4|Elite| - |`MASTER` = 5|Master| - |`EXPERT` = 6|Expert| - |`WARRIOR` = 7|Warrior| - |`SERGEANT` = 8|Sergeant| - |`RANGER` = 9|Ranger| - |`CHALLENGER` = 10|Challenger| - |`APPRENTICE` = 11|Apprentice| - |`ROOKIE` = 12|Rookie| - ??? info "[EpochBadgeType](/../../schemas/epoch_badge_type)" - |Value| Description | - |-|-| - |`CHAMPION` = 1|Champion| - |`LEGEND` = 2|Legend| - |`VETERAN` = 3|Veteran| - |`ELITE` = 4|Elite| - |`MASTER` = 5|Master| - |`EXPERT` = 6|Expert| - |`WARRIOR` = 7|Warrior| - |`SERGEANT` = 8|Sergeant| - |`RANGER` = 9|Ranger| - |`CHALLENGER` = 10|Challenger| - |`APPRENTICE` = 11|Apprentice| - |`ROOKIE` = 12|Rookie| diff --git a/artifacts/apidocs/schemas/deposit.md b/artifacts/apidocs/schemas/deposit.md index 29d5e17..e69de29 100644 --- a/artifacts/apidocs/schemas/deposit.md +++ b/artifacts/apidocs/schemas/deposit.md @@ -1,31 +0,0 @@ -!!! info "[Deposit](/../../schemas/deposit)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |tx_hash
      `th` |string|True|The hash of the bridgemint event producing the deposit| - |to_account_id
      `ta` |string|True|The account to deposit into| - |currency
      `c` |Currency|True|The token currency to deposit| - |num_tokens
      `nt` |string|True|The number of tokens to deposit| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
      - - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/deposit_history.md b/artifacts/apidocs/schemas/deposit_history.md index 95b2926..e69de29 100644 --- a/artifacts/apidocs/schemas/deposit_history.md +++ b/artifacts/apidocs/schemas/deposit_history.md @@ -1,35 +0,0 @@ -!!! info "[DepositHistory](/../../schemas/deposit_history)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |l_1_hash
      `l1` |string|True|The L1 txHash of the deposit| - |l_2_hash
      `l2` |string|True|The L2 txHash of the deposit| - |to_account_id
      `ta` |string|True|The account to deposit into| - |currency
      `c` |Currency|True|The token currency to deposit| - |num_tokens
      `nt` |string|True|The number of tokens to deposit| - |initiated_time
      `it` |string|True|The timestamp when the deposit was initiated on L1 in unix nanoseconds| - |confirmed_time
      `ct` |string|True|The timestamp when the deposit was confirmed on L2 in unix nanoseconds| - |from_address
      `fa` |string|True|The address of the sender| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
      - - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/ecosystem_leaderboard_user.md b/artifacts/apidocs/schemas/ecosystem_leaderboard_user.md index aa1101f..e69de29 100644 --- a/artifacts/apidocs/schemas/ecosystem_leaderboard_user.md +++ b/artifacts/apidocs/schemas/ecosystem_leaderboard_user.md @@ -1,7 +0,0 @@ -!!! info "[EcosystemLeaderboardUser](/../../schemas/ecosystem_leaderboard_user)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |account_id
      `ai` |string|True|The off chain account id| - |rank
      `r` |integer|True|The rank of the account in the ecosystem| - |total_point
      `tp` |string|True|Total ecosystem point| - |twitter_username
      `tu` |string|True|The twitter username of the account| diff --git a/artifacts/apidocs/schemas/ecosystem_metric.md b/artifacts/apidocs/schemas/ecosystem_metric.md index 687d5e6..e69de29 100644 --- a/artifacts/apidocs/schemas/ecosystem_metric.md +++ b/artifacts/apidocs/schemas/ecosystem_metric.md @@ -1,8 +0,0 @@ -!!! info "[EcosystemMetric](/../../schemas/ecosystem_metric)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |direct_invite_count
      `di` |integer|True|Direct invite count| - |indirect_invite_count
      `ii` |integer|True|Indirect invite count| - |direct_invite_trading_volume
      `di1` |string|True|Direct invite trading volume| - |indirect_invite_trading_volume
      `ii1` |string|True|Indirect invite trading volume| - |total_point
      `tp` |string|True|Total ecosystem point of this epoch/phase| diff --git a/artifacts/apidocs/schemas/ecosystem_point.md b/artifacts/apidocs/schemas/ecosystem_point.md index 8318444..e69de29 100644 --- a/artifacts/apidocs/schemas/ecosystem_point.md +++ b/artifacts/apidocs/schemas/ecosystem_point.md @@ -1,16 +0,0 @@ -!!! info "[EcosystemPoint](/../../schemas/ecosystem_point)" -
      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |account_id
      `ai` |string|True|The off chain account id| - |main_account_id
      `ma` |string|True|The main account id| - |total_point
      `tp` |string|True|Total ecosystem point| - |direct_invite_count
      `di` |integer|True|Direct invite count| - |indirect_invite_count
      `ii` |integer|True|Indirect invite count| - |direct_invite_trading_volume
      `di1` |string|True|Direct invite trading volume| - |indirect_invite_trading_volume
      `ii1` |string|True|Indirect invite trading volume| - |calculate_at
      `ca` |string|True|The time when the ecosystem point is calculated| - |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| diff --git a/artifacts/apidocs/schemas/empty_request.md b/artifacts/apidocs/schemas/empty_request.md index 97f3c00..e69de29 100644 --- a/artifacts/apidocs/schemas/empty_request.md +++ b/artifacts/apidocs/schemas/empty_request.md @@ -1,5 +0,0 @@ -!!! info "[EmptyRequest](/../../schemas/empty_request)" - Used for requests that do not require any parameters
      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| diff --git a/artifacts/apidocs/schemas/epoch_badge.md b/artifacts/apidocs/schemas/epoch_badge.md index 2827adf..e69de29 100644 --- a/artifacts/apidocs/schemas/epoch_badge.md +++ b/artifacts/apidocs/schemas/epoch_badge.md @@ -1,50 +0,0 @@ -!!! info "[EpochBadge](/../../schemas/epoch_badge)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |account_id
      `ai` |string|True|The off chain account id| - |main_account_id
      `ma` |string|True|The account ID| - |type
      `t` |RewardProgramType|True|The type of the reward program| - |epoch
      `e` |integer|True|The epoch number| - |epoch_start_time
      `es` |string|True|The start time of the epoch| - |epoch_end_time
      `ee` |string|True|The end time of the epoch| - |badge
      `b` |EpochBadgeType|True|The type of the badge| - |distributed_badges
      `db` |[EpochBadgeType]|True|The distributed badges| - |total_point
      `tp` |string|True|Total point| - |rank
      `r` |integer|True|Rank| - |claimed_at
      `ca` |string|True|The time when the badge was claimed, or the epoch end time if the user has already completed the KYC process| - ??? info "[RewardProgramType](/../../schemas/reward_program_type)" - |Value| Description | - |-|-| - |`ECOSYSTEM` = 1|| - |`TRADER` = 2|| - |`LP` = 3|| - ??? info "[EpochBadgeType](/../../schemas/epoch_badge_type)" - |Value| Description | - |-|-| - |`CHAMPION` = 1|Champion| - |`LEGEND` = 2|Legend| - |`VETERAN` = 3|Veteran| - |`ELITE` = 4|Elite| - |`MASTER` = 5|Master| - |`EXPERT` = 6|Expert| - |`WARRIOR` = 7|Warrior| - |`SERGEANT` = 8|Sergeant| - |`RANGER` = 9|Ranger| - |`CHALLENGER` = 10|Challenger| - |`APPRENTICE` = 11|Apprentice| - |`ROOKIE` = 12|Rookie| - ??? info "[EpochBadgeType](/../../schemas/epoch_badge_type)" - |Value| Description | - |-|-| - |`CHAMPION` = 1|Champion| - |`LEGEND` = 2|Legend| - |`VETERAN` = 3|Veteran| - |`ELITE` = 4|Elite| - |`MASTER` = 5|Master| - |`EXPERT` = 6|Expert| - |`WARRIOR` = 7|Warrior| - |`SERGEANT` = 8|Sergeant| - |`RANGER` = 9|Ranger| - |`CHALLENGER` = 10|Challenger| - |`APPRENTICE` = 11|Apprentice| - |`ROOKIE` = 12|Rookie| diff --git a/artifacts/apidocs/schemas/epoch_badge_point_distribution.md b/artifacts/apidocs/schemas/epoch_badge_point_distribution.md index 6f7dede..e69de29 100644 --- a/artifacts/apidocs/schemas/epoch_badge_point_distribution.md +++ b/artifacts/apidocs/schemas/epoch_badge_point_distribution.md @@ -1,33 +0,0 @@ -!!! info "[EpochBadgePointDistribution](/../../schemas/epoch_badge_point_distribution)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |badge
      `b` |EpochBadgeType|True|The type of the badge| - |epoch
      `e` |integer|True|The epoch number| - |type
      `t` |RewardProgramType|True|The type of the reward program| - |min_point
      `mp` |string|True|The minimum point to get the badge| - |max_point
      `mp1` |string|True|The maximum point to get the badge| - |min_rank
      `mr` |integer|True|The minimum rank to get the badge| - |max_rank
      `mr1` |integer|True|The maximum rank to get the badge| - |total_point
      `tp` |string|True|The total point to get the badge| - |count
      `c` |integer|True|The number of users to get the badge| - ??? info "[EpochBadgeType](/../../schemas/epoch_badge_type)" - |Value| Description | - |-|-| - |`CHAMPION` = 1|Champion| - |`LEGEND` = 2|Legend| - |`VETERAN` = 3|Veteran| - |`ELITE` = 4|Elite| - |`MASTER` = 5|Master| - |`EXPERT` = 6|Expert| - |`WARRIOR` = 7|Warrior| - |`SERGEANT` = 8|Sergeant| - |`RANGER` = 9|Ranger| - |`CHALLENGER` = 10|Challenger| - |`APPRENTICE` = 11|Apprentice| - |`ROOKIE` = 12|Rookie| - ??? info "[RewardProgramType](/../../schemas/reward_program_type)" - |Value| Description | - |-|-| - |`ECOSYSTEM` = 1|| - |`TRADER` = 2|| - |`LP` = 3|| diff --git a/artifacts/apidocs/schemas/error.md b/artifacts/apidocs/schemas/error.md index e864262..e69de29 100644 --- a/artifacts/apidocs/schemas/error.md +++ b/artifacts/apidocs/schemas/error.md @@ -1,7 +0,0 @@ -!!! info "[Error](/../../schemas/error)" - An error response
      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |code
      `c` |integer|True|The error code for the request| - |message
      `m` |string|True|The error message for the request| diff --git a/artifacts/apidocs/schemas/fill.md b/artifacts/apidocs/schemas/fill.md index 54794d3..e69de29 100644 --- a/artifacts/apidocs/schemas/fill.md +++ b/artifacts/apidocs/schemas/fill.md @@ -1,33 +0,0 @@ -!!! info "[Fill](/../../schemas/fill)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |event_time
      `et` |string|True|Time at which the event was emitted in unix nanoseconds| - |sub_account_id
      `sa` |string|True|The sub account ID that participated in the trade| - |instrument
      `i` |string|True|The instrument being represented| - |is_buyer
      `ib` |boolean|True|The side that the subaccount took on the trade| - |is_taker
      `it` |boolean|True|The role that the subaccount took on the trade| - |size
      `s` |string|True|The number of assets being traded, expressed in base asset decimal units| - |price
      `p` |string|True|The traded price, expressed in `9` decimals| - |mark_price
      `mp` |string|True|The mark price of the instrument at point of trade, expressed in `9` decimals| - |index_price
      `ip` |string|True|The index price of the instrument at point of trade, expressed in `9` decimals| - |interest_rate
      `ir` |string|True|The interest rate of the underlying at point of trade, expressed in centibeeps (1/100th of a basis point)| - |forward_price
      `fp` |string|True|[Options] The forward price of the option at point of trade, expressed in `9` decimals| - |realized_pnl
      `rp` |string|True|The realized PnL of the trade, expressed in quote asset decimal units (0 if increasing position size)| - |fee
      `f` |string|True|The fees paid on the trade, expressed in quote asset decimal unit (negative if maker rebate applied)| - |fee_rate
      `fr` |string|True|The fee rate paid on the trade| - |trade_id
      `ti` |string|True|A trade identifier, globally unique, and monotonically increasing (not by `1`).
      All trades sharing a single taker execution share the same first component (before `-`), and `event_time`.
      `trade_id` is guaranteed to be consistent across MarketData `Trade` and Trading `Fill`.| - |order_id
      `oi` |string|True|An order identifier| - |venue
      `v` |Venue|True|The venue where the trade occurred| - |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| - |signer
      `s1` |string|True|The address (public key) of the wallet signing the payload| - |broker
      `b` |BrokerTag|False
      ``|Specifies the broker who brokered the order| - ??? info "[Venue](/../../schemas/venue)" - The list of Trading Venues that are supported on the GRVT exchange
      - - |Value| Description | - |-|-| - |`ORDERBOOK` = 1|the trade is cleared on the orderbook venue| - |`RFQ` = 2|the trade is cleared on the RFQ venue| - ??? info "[BrokerTag](/../../schemas/broker_tag)" - BrokerTag is a tag for the broker that the order is sent from.
      - diff --git a/artifacts/apidocs/schemas/flat_referral.md b/artifacts/apidocs/schemas/flat_referral.md index 9e17431..e69de29 100644 --- a/artifacts/apidocs/schemas/flat_referral.md +++ b/artifacts/apidocs/schemas/flat_referral.md @@ -1,15 +0,0 @@ -!!! info "[FlatReferral](/../../schemas/flat_referral)" -
      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |account_id
      `ai` |string|True|The off chain account id| - |referrer_id
      `ri` |string|True|The off chain referrer account id| - |referrer_level
      `rl` |integer|True|The referrer level; 1: direct referrer, 2: indirect referrer| - |account_create_time
      `ac` |string|True|The account creation time| - |main_account_id
      `ma` |string|True|The main account id| - |referrer_main_account_id
      `rm` |string|True|The referrer main account id| - |is_business
      `ib` |boolean|True|The account is a business account or not| - |is_kyc_completed
      `ik` |boolean|True|The account is KYC verified or not| - |kyc_completed_at
      `kc` |string|True|The KYC completed time| - |kyc_type
      `kt` |string|True|The KYC type, can be 'individual' or 'business'| diff --git a/artifacts/apidocs/schemas/funding_account_summary.md b/artifacts/apidocs/schemas/funding_account_summary.md index 1ba48cc..e69de29 100644 --- a/artifacts/apidocs/schemas/funding_account_summary.md +++ b/artifacts/apidocs/schemas/funding_account_summary.md @@ -1,38 +0,0 @@ -!!! info "[FundingAccountSummary](/../../schemas/funding_account_summary)" - The funding account summary, that reports the total equity and spot balances of a funding (main) account
      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |main_account_id
      `ma` |string|True|The main account ID of the account to which the summary belongs| - |total_equity
      `te` |string|True|Total equity of the main account, denominated in USD| - |spot_balances
      `sb` |[SpotBalance]|True|The list of spot assets owned by this main account, and their balances| - ??? info "[SpotBalance](/../../schemas/spot_balance)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |currency
      `c` |Currency|True|The currency you hold a spot balance in| - |balance
      `b` |string|True|This currency's balance in this trading account.| - |index_price
      `ip` |string|True|The index price of this currency. (reported in `USD`)| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
      - - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/funding_payment.md b/artifacts/apidocs/schemas/funding_payment.md index 24f9d6c..e69de29 100644 --- a/artifacts/apidocs/schemas/funding_payment.md +++ b/artifacts/apidocs/schemas/funding_payment.md @@ -1,33 +0,0 @@ -!!! info "[FundingPayment](/../../schemas/funding_payment)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |event_time
      `et` |string|True|Time at which the event was emitted in unix nanoseconds| - |sub_account_id
      `sa` |string|True|The sub account ID that made the funding payment| - |instrument
      `i` |string|True|The perpetual instrument being funded| - |currency
      `c` |Currency|True|The currency of the funding payment| - |amount
      `a` |string|True|The amount of the funding payment. Positive if paid, negative if received| - |tx_id
      `ti` |string|True|The transaction ID of the funding payment.
      Funding payments can be triggered by a trade, transfer, or liquidation.
      The `tx_id` will match the corresponding `trade_id` or `tx_id`.| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
      - - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/funding_rate.md b/artifacts/apidocs/schemas/funding_rate.md index 8f47179..e69de29 100644 --- a/artifacts/apidocs/schemas/funding_rate.md +++ b/artifacts/apidocs/schemas/funding_rate.md @@ -1,7 +0,0 @@ -!!! info "[FundingRate](/../../schemas/funding_rate)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |instrument
      `i` |string|True|The readable instrument name:
      • Perpetual: `ETH_USDT_Perp`
      • Future: `BTC_USDT_Fut_20Oct23`
      • Call: `ETH_USDT_Call_20Oct23_2800`
      • Put: `ETH_USDT_Put_20Oct23_2800`
      | - |funding_rate
      `fr` |string|True|The funding rate of the instrument, expressed in percentage points| - |funding_time
      `ft` |string|True|The funding timestamp of the funding rate, expressed in unix nanoseconds| - |mark_price
      `mp` |string|True|The mark price of the instrument at funding timestamp, expressed in `9` decimals| diff --git a/artifacts/apidocs/schemas/get_claimable_ecosystem_badge_response.md b/artifacts/apidocs/schemas/get_claimable_ecosystem_badge_response.md index 8572e59..e69de29 100644 --- a/artifacts/apidocs/schemas/get_claimable_ecosystem_badge_response.md +++ b/artifacts/apidocs/schemas/get_claimable_ecosystem_badge_response.md @@ -1,56 +0,0 @@ -!!! info "[GetClaimableEcosystemBadgeResponse](/../../schemas/get_claimable_ecosystem_badge_response)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |badge
      `b` |EpochBadge|True|The epoch badge| - |is_claimable
      `ic` |boolean|True|Whether the badge is claimable| - |claimable_until
      `cu` |string|True|The time when the badge is claimable| - ??? info "[EpochBadge](/../../schemas/epoch_badge)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |account_id
      `ai` |string|True|The off chain account id| - |main_account_id
      `ma` |string|True|The account ID| - |type
      `t` |RewardProgramType|True|The type of the reward program| - |epoch
      `e` |integer|True|The epoch number| - |epoch_start_time
      `es` |string|True|The start time of the epoch| - |epoch_end_time
      `ee` |string|True|The end time of the epoch| - |badge
      `b` |EpochBadgeType|True|The type of the badge| - |distributed_badges
      `db` |[EpochBadgeType]|True|The distributed badges| - |total_point
      `tp` |string|True|Total point| - |rank
      `r` |integer|True|Rank| - |claimed_at
      `ca` |string|True|The time when the badge was claimed, or the epoch end time if the user has already completed the KYC process| - ??? info "[RewardProgramType](/../../schemas/reward_program_type)" - |Value| Description | - |-|-| - |`ECOSYSTEM` = 1|| - |`TRADER` = 2|| - |`LP` = 3|| - ??? info "[EpochBadgeType](/../../schemas/epoch_badge_type)" - |Value| Description | - |-|-| - |`CHAMPION` = 1|Champion| - |`LEGEND` = 2|Legend| - |`VETERAN` = 3|Veteran| - |`ELITE` = 4|Elite| - |`MASTER` = 5|Master| - |`EXPERT` = 6|Expert| - |`WARRIOR` = 7|Warrior| - |`SERGEANT` = 8|Sergeant| - |`RANGER` = 9|Ranger| - |`CHALLENGER` = 10|Challenger| - |`APPRENTICE` = 11|Apprentice| - |`ROOKIE` = 12|Rookie| - ??? info "[EpochBadgeType](/../../schemas/epoch_badge_type)" - |Value| Description | - |-|-| - |`CHAMPION` = 1|Champion| - |`LEGEND` = 2|Legend| - |`VETERAN` = 3|Veteran| - |`ELITE` = 4|Elite| - |`MASTER` = 5|Master| - |`EXPERT` = 6|Expert| - |`WARRIOR` = 7|Warrior| - |`SERGEANT` = 8|Sergeant| - |`RANGER` = 9|Ranger| - |`CHALLENGER` = 10|Challenger| - |`APPRENTICE` = 11|Apprentice| - |`ROOKIE` = 12|Rookie| diff --git a/artifacts/apidocs/schemas/initial_leverage_result.md b/artifacts/apidocs/schemas/initial_leverage_result.md index f6c5cb0..e69de29 100644 --- a/artifacts/apidocs/schemas/initial_leverage_result.md +++ b/artifacts/apidocs/schemas/initial_leverage_result.md @@ -1,7 +0,0 @@ -!!! info "[InitialLeverageResult](/../../schemas/initial_leverage_result)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |instrument
      `i` |string|True|The instrument to get the leverage for| - |leverage
      `l` |string|True|The initial leverage of the sub account| - |min_leverage
      `ml` |string|True|The min leverage this sub account can set| - |max_leverage
      `ml1` |string|True|The max leverage this sub account can set| diff --git a/artifacts/apidocs/schemas/instrument.md b/artifacts/apidocs/schemas/instrument.md index 70c3b41..e69de29 100644 --- a/artifacts/apidocs/schemas/instrument.md +++ b/artifacts/apidocs/schemas/instrument.md @@ -1,88 +0,0 @@ -!!! info "[Instrument](/../../schemas/instrument)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |instrument
      `i` |string|True|The readable instrument name:
      • Perpetual: `ETH_USDT_Perp`
      • Future: `BTC_USDT_Fut_20Oct23`
      • Call: `ETH_USDT_Call_20Oct23_2800`
      • Put: `ETH_USDT_Put_20Oct23_2800`
      | - |instrument_hash
      `ih` |string|True|The asset ID used for instrument signing.| - |base
      `b` |Currency|True|The base currency| - |quote
      `q` |Currency|True|The quote currency| - |kind
      `k` |Kind|True|The kind of instrument| - |venues
      `v` |[Venue]|True|Venues that this instrument can be traded at| - |settlement_period
      `sp1` |InstrumentSettlementPeriod|True|The settlement period of the instrument| - |base_decimals
      `bd` |integer|True|The smallest denomination of the base asset supported by GRVT (+3 represents 0.001, -3 represents 1000, 0 represents 1)| - |quote_decimals
      `qd` |integer|True|The smallest denomination of the quote asset supported by GRVT (+3 represents 0.001, -3 represents 1000, 0 represents 1)| - |tick_size
      `ts` |string|True|The size of a single tick, expressed in price decimal units| - |min_size
      `ms` |string|True|The minimum contract size, expressed in base asset decimal units| - |create_time
      `ct` |string|True|Creation time in unix nanoseconds| - |max_position_size
      `mp` |string|True|The maximum position size, expressed in base asset decimal units| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
      - - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
      - - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| - ??? info "[Kind](/../../schemas/kind)" - The list of asset kinds that are supported on the GRVT exchange
      - - |Value| Description | - |-|-| - |`PERPETUAL` = 1|the perpetual asset kind| - |`FUTURE` = 2|the future asset kind| - |`CALL` = 3|the call option asset kind| - |`PUT` = 4|the put option asset kind| - ??? info "[Venue](/../../schemas/venue)" - The list of Trading Venues that are supported on the GRVT exchange
      - - |Value| Description | - |-|-| - |`ORDERBOOK` = 1|the trade is cleared on the orderbook venue| - |`RFQ` = 2|the trade is cleared on the RFQ venue| - ??? info "[InstrumentSettlementPeriod](/../../schemas/instrument_settlement_period)" - |Value| Description | - |-|-| - |`PERPETUAL` = 1|Instrument settles through perpetual funding cycles| - |`DAILY` = 2|Instrument settles at an expiry date, marked as a daily instrument| - |`WEEKLY` = 3|Instrument settles at an expiry date, marked as a weekly instrument| - |`MONTHLY` = 4|Instrument settles at an expiry date, marked as a monthly instrument| - |`QUARTERLY` = 5|Instrument settles at an expiry date, marked as a quarterly instrument| diff --git a/artifacts/apidocs/schemas/jsonrpc_request.md b/artifacts/apidocs/schemas/jsonrpc_request.md index 6f18dc3..e69de29 100644 --- a/artifacts/apidocs/schemas/jsonrpc_request.md +++ b/artifacts/apidocs/schemas/jsonrpc_request.md @@ -1,9 +0,0 @@ -!!! info "[JSONRPCRequest](/../../schemas/jsonrpc_request)" - All Websocket JSON RPC Requests are housed in this wrapper. You may specify a stream, and a list of feeds to subscribe to.
      If a `request_id` is supplied in this JSON RPC request, it will be propagated back to any relevant JSON RPC responses (including error).
      When subscribing to the same primary selector again, the previous secondary selector will be replaced. See `Overview` page for more details.
      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |jsonrpc
      `j` |string|True|The JSON RPC version to use for the request| - |method
      `m` |string|True|The method to use for the request (eg: `subscribe` / `unsubscribe` / `v1/instrument` )| - |params
      `p` |object|True|The parameters for the request| - |id
      `i` |integer|False
      `0`|Optional Field which is used to match the response by the client.
      If not passed, this field will not be returned| diff --git a/artifacts/apidocs/schemas/jsonrpc_response.md b/artifacts/apidocs/schemas/jsonrpc_response.md index 05dc32f..e69de29 100644 --- a/artifacts/apidocs/schemas/jsonrpc_response.md +++ b/artifacts/apidocs/schemas/jsonrpc_response.md @@ -1,17 +0,0 @@ -!!! info "[JSONRPCResponse](/../../schemas/jsonrpc_response)" - All Websocket JSON RPC Responses are housed in this wrapper. It returns a confirmation of the JSON RPC subscribe request.
      If a `request_id` is supplied in the JSON RPC request, it will be propagated back in this JSON RPC response.
      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |jsonrpc
      `j` |string|True|The JSON RPC version to use for the request| - |result
      `r` |object|False
      `null`|The result for the request| - |error
      `e` |Error|False
      `null`|The error for the request| - |id
      `i` |integer|False
      `0`|Optional Field which is used to match the response by the client.
      If not passed, this field will not be returned| - |method
      `m` |string|True|The method used in the request for this response (eg: `subscribe` / `unsubscribe` / `v1/instrument` )| - ??? info "[Error](/../../schemas/error)" - An error response
      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |code
      `c` |integer|True|The error code for the request| - |message
      `m` |string|True|The error message for the request| diff --git a/artifacts/apidocs/schemas/lp_point.md b/artifacts/apidocs/schemas/lp_point.md index 975f3fd..e69de29 100644 --- a/artifacts/apidocs/schemas/lp_point.md +++ b/artifacts/apidocs/schemas/lp_point.md @@ -1,6 +0,0 @@ -!!! info "[LPPoint](/../../schemas/lp_point)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |main_account_id
      `ma` |string|True|The main account id| - |liquidity_score
      `ls` |string|True|Liquidity score| - |rank
      `r` |integer|True|The rank of user in the LP leaderboard| diff --git a/artifacts/apidocs/schemas/lp_snapshot.md b/artifacts/apidocs/schemas/lp_snapshot.md index 93baebb..e69de29 100644 --- a/artifacts/apidocs/schemas/lp_snapshot.md +++ b/artifacts/apidocs/schemas/lp_snapshot.md @@ -1,11 +0,0 @@ -!!! info "[LPSnapshot](/../../schemas/lp_snapshot)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |main_account_id
      `ma` |string|True|The main account id| - |lp_asset
      `la` |string|True|The LP Asset| - |underlying_multiplier
      `um` |string|True|Underlying multiplier| - |maker_trading_volume
      `mt` |string|True|Maker trading volume| - |bid_fast_market_multiplier
      `bf` |integer|True|Fast market multiplier| - |ask_fast_market_multiplier
      `af` |integer|True|Fast market multiplier| - |liquidity_score
      `ls` |string|True|Liquidity score| - |calculate_at
      `ca` |string|True|The time when the snapshot was calculated| diff --git a/artifacts/apidocs/schemas/mini_ticker.md b/artifacts/apidocs/schemas/mini_ticker.md index 5825c1d..e69de29 100644 --- a/artifacts/apidocs/schemas/mini_ticker.md +++ b/artifacts/apidocs/schemas/mini_ticker.md @@ -1,14 +0,0 @@ -!!! info "[MiniTicker](/../../schemas/mini_ticker)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |event_time
      `et` |string|False
      `None`|Time at which the event was emitted in unix nanoseconds| - |instrument
      `i` |string|False
      `None`|The readable instrument name:
      • Perpetual: `ETH_USDT_Perp`
      • Future: `BTC_USDT_Fut_20Oct23`
      • Call: `ETH_USDT_Call_20Oct23_2800`
      • Put: `ETH_USDT_Put_20Oct23_2800`
      | - |mark_price
      `mp` |string|False
      `None`|The mark price of the instrument, expressed in `9` decimals| - |index_price
      `ip` |string|False
      `None`|The index price of the instrument, expressed in `9` decimals| - |last_price
      `lp` |string|False
      `None`|The last traded price of the instrument (also close price), expressed in `9` decimals| - |last_size
      `ls` |string|False
      `None`|The number of assets traded in the last trade, expressed in base asset decimal units| - |mid_price
      `mp1` |string|False
      `None`|The mid price of the instrument, expressed in `9` decimals| - |best_bid_price
      `bb` |string|False
      `None`|The best bid price of the instrument, expressed in `9` decimals| - |best_bid_size
      `bb1` |string|False
      `None`|The number of assets offered on the best bid price of the instrument, expressed in base asset decimal units| - |best_ask_price
      `ba` |string|False
      `None`|The best ask price of the instrument, expressed in `9` decimals| - |best_ask_size
      `ba1` |string|False
      `None`|The number of assets offered on the best ask price of the instrument, expressed in base asset decimal units| diff --git a/artifacts/apidocs/schemas/order.md b/artifacts/apidocs/schemas/order.md index dc30486..e69de29 100644 --- a/artifacts/apidocs/schemas/order.md +++ b/artifacts/apidocs/schemas/order.md @@ -1,106 +0,0 @@ -!!! 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| - |trigger
      `t` |TriggerOrderMetadata|True|Trigger fields are used to support any type of trigger order such as TP/SL| - |broker
      `b` |BrokerTag|False
      ``|Specifies the broker who brokered the order| - ??? info "[BrokerTag](/../../schemas/broker_tag)" - BrokerTag is a tag for the broker that the order is sent from.
      - - ??? 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| diff --git a/artifacts/apidocs/schemas/order_leg.md b/artifacts/apidocs/schemas/order_leg.md index e708e86..e69de29 100644 --- a/artifacts/apidocs/schemas/order_leg.md +++ b/artifacts/apidocs/schemas/order_leg.md @@ -1,7 +0,0 @@ -!!! 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| diff --git a/artifacts/apidocs/schemas/order_metadata.md b/artifacts/apidocs/schemas/order_metadata.md index f591907..e69de29 100644 --- a/artifacts/apidocs/schemas/order_metadata.md +++ b/artifacts/apidocs/schemas/order_metadata.md @@ -1,12 +0,0 @@ -!!! 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| - |trigger
      `t` |TriggerOrderMetadata|True|Trigger fields are used to support any type of trigger order such as TP/SL| - |broker
      `b` |BrokerTag|False
      ``|Specifies the broker who brokered the order| - ??? info "[BrokerTag](/../../schemas/broker_tag)" - BrokerTag is a tag for the broker that the order is sent from.
      - diff --git a/artifacts/apidocs/schemas/order_state.md b/artifacts/apidocs/schemas/order_state.md index a3c24c7..e69de29 100644 --- a/artifacts/apidocs/schemas/order_state.md +++ b/artifacts/apidocs/schemas/order_state.md @@ -1,50 +0,0 @@ -!!! 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| diff --git a/artifacts/apidocs/schemas/order_state_feed.md b/artifacts/apidocs/schemas/order_state_feed.md index 3d25347..e69de29 100644 --- a/artifacts/apidocs/schemas/order_state_feed.md +++ b/artifacts/apidocs/schemas/order_state_feed.md @@ -1,56 +0,0 @@ -!!! info "[OrderStateFeed](/../../schemas/order_state_feed)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |order_id
      `oi` |string|True|A unique 128-bit identifier for the order, deterministically generated within the GRVT backend| - |client_order_id
      `co` |string|True|A unique identifier for the active order within a subaccount, specified by the client| - |order_state
      `os` |OrderState|True|The order state object being created or updated| - ??? 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| diff --git a/artifacts/apidocs/schemas/orderbook_level.md b/artifacts/apidocs/schemas/orderbook_level.md index 3988d20..e69de29 100644 --- a/artifacts/apidocs/schemas/orderbook_level.md +++ b/artifacts/apidocs/schemas/orderbook_level.md @@ -1,6 +0,0 @@ -!!! info "[OrderbookLevel](/../../schemas/orderbook_level)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |price
      `p` |string|True|The price of the level, expressed in `9` decimals| - |size
      `s` |string|True|The number of assets offered, expressed in base asset decimal units| - |num_orders
      `no` |integer|True|The number of open orders at this level| diff --git a/artifacts/apidocs/schemas/orderbook_levels.md b/artifacts/apidocs/schemas/orderbook_levels.md index 413b3b2..e69de29 100644 --- a/artifacts/apidocs/schemas/orderbook_levels.md +++ b/artifacts/apidocs/schemas/orderbook_levels.md @@ -1,19 +0,0 @@ -!!! info "[OrderbookLevels](/../../schemas/orderbook_levels)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |event_time
      `et` |string|True|Time at which the event was emitted in unix nanoseconds| - |instrument
      `i` |string|True|The readable instrument name:
      • Perpetual: `ETH_USDT_Perp`
      • Future: `BTC_USDT_Fut_20Oct23`
      • Call: `ETH_USDT_Call_20Oct23_2800`
      • Put: `ETH_USDT_Put_20Oct23_2800`
      | - |bids
      `b` |[OrderbookLevel]|True|The list of best bids up till query depth| - |asks
      `a` |[OrderbookLevel]|True|The list of best asks up till query depth| - ??? info "[OrderbookLevel](/../../schemas/orderbook_level)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |price
      `p` |string|True|The price of the level, expressed in `9` decimals| - |size
      `s` |string|True|The number of assets offered, expressed in base asset decimal units| - |num_orders
      `no` |integer|True|The number of open orders at this level| - ??? info "[OrderbookLevel](/../../schemas/orderbook_level)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |price
      `p` |string|True|The price of the level, expressed in `9` decimals| - |size
      `s` |string|True|The number of assets offered, expressed in base asset decimal units| - |num_orders
      `no` |integer|True|The number of open orders at this level| diff --git a/artifacts/apidocs/schemas/positions.md b/artifacts/apidocs/schemas/positions.md index 96665d3..e69de29 100644 --- a/artifacts/apidocs/schemas/positions.md +++ b/artifacts/apidocs/schemas/positions.md @@ -1,17 +0,0 @@ -!!! info "[Positions](/../../schemas/positions)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |event_time
      `et` |string|True|Time at which the event was emitted in unix nanoseconds| - |sub_account_id
      `sa` |string|True|The sub account ID that participated in the trade| - |instrument
      `i` |string|True|The instrument being represented| - |size
      `s` |string|True|The size of the position, expressed in base asset decimal units. Negative for short positions| - |notional
      `n` |string|True|The notional value of the position, negative for short assets, expressed in quote asset decimal units| - |entry_price
      `ep` |string|True|The entry price of the position, expressed in `9` decimals
      Whenever increasing the size of a position, the entry price is updated to the new average entry price
      `new_entry_price = (old_entry_price * old_size + trade_price * trade_size) / (old_size + trade_size)`| - |exit_price
      `ep1` |string|True|The exit price of the position, expressed in `9` decimals
      Whenever decreasing the size of a position, the exit price is updated to the new average exit price
      `new_exit_price = (old_exit_price * old_exit_trade_size + trade_price * trade_size) / (old_exit_trade_size + trade_size)`| - |mark_price
      `mp` |string|True|The mark price of the position, expressed in `9` decimals| - |unrealized_pnl
      `up` |string|True|The unrealized PnL of the position, expressed in quote asset decimal units
      `unrealized_pnl = (mark_price - entry_price) * size`| - |realized_pnl
      `rp` |string|True|The realized PnL of the position, expressed in quote asset decimal units
      `realized_pnl = (exit_price - entry_price) * exit_trade_size`| - |total_pnl
      `tp` |string|True|The total PnL of the position, expressed in quote asset decimal units
      `total_pnl = realized_pnl + unrealized_pnl`| - |roi
      `r` |string|True|The ROI of the position, expressed as a percentage
      `roi = (total_pnl / (entry_price * abs(size))) * 100^`| - |quote_index_price
      `qi` |string|True|The index price of the quote currency. (reported in `USD`)| - |est_liquidation_price
      `el` |string|True|The estimated liquidation price| diff --git a/artifacts/apidocs/schemas/pre_order_check_result.md b/artifacts/apidocs/schemas/pre_order_check_result.md index a7185c4..e69de29 100644 --- a/artifacts/apidocs/schemas/pre_order_check_result.md +++ b/artifacts/apidocs/schemas/pre_order_check_result.md @@ -1,38 +0,0 @@ -!!! info "[PreOrderCheckResult](/../../schemas/pre_order_check_result)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |max_qty
      `mq` |[AssetMaxQty]|True|The maximum quantity for each leg| - |margin_required
      `mr` |string|True|The margin required for the order (reported in `settle_currency`)| - |order_valid
      `ov` |boolean|True|Whether the order is valid| - |reason
      `r` |string|True|The reason the order is invalid, if any| - |settle_currency
      `sc` |Currency|True|The subAccount settle currency| - ??? info "[AssetMaxQty](/../../schemas/asset_max_qty)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |asset
      `a` |string|True|The asset associated with the max quantity| - |max_buy_qty
      `mb` |string|True|The maximum buy quantity| - |max_sell_qty
      `ms` |string|True|The maximum sell quantity| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
      - - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/query_epoch_badge_point_distribution_request.md b/artifacts/apidocs/schemas/query_epoch_badge_point_distribution_request.md index 937a21d..e69de29 100644 --- a/artifacts/apidocs/schemas/query_epoch_badge_point_distribution_request.md +++ b/artifacts/apidocs/schemas/query_epoch_badge_point_distribution_request.md @@ -1,13 +0,0 @@ -!!! info "[QueryEpochBadgePointDistributionRequest](/../../schemas/query_epoch_badge_point_distribution_request)" - Query list of epoch badges
      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |epoch
      `e` |integer|False
      `'all'`|The numerical epoch index| - |type
      `t` |RewardProgramType|True|The type of the reward program| - ??? info "[RewardProgramType](/../../schemas/reward_program_type)" - |Value| Description | - |-|-| - |`ECOSYSTEM` = 1|| - |`TRADER` = 2|| - |`LP` = 3|| diff --git a/artifacts/apidocs/schemas/query_epoch_badge_point_distribution_response.md b/artifacts/apidocs/schemas/query_epoch_badge_point_distribution_response.md index 3831ba8..e69de29 100644 --- a/artifacts/apidocs/schemas/query_epoch_badge_point_distribution_response.md +++ b/artifacts/apidocs/schemas/query_epoch_badge_point_distribution_response.md @@ -1,37 +0,0 @@ -!!! info "[QueryEpochBadgePointDistributionResponse](/../../schemas/query_epoch_badge_point_distribution_response)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |result
      `r` |[EpochBadgePointDistribution]|True|The list of epoch badges| - ??? info "[EpochBadgePointDistribution](/../../schemas/epoch_badge_point_distribution)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |badge
      `b` |EpochBadgeType|True|The type of the badge| - |epoch
      `e` |integer|True|The epoch number| - |type
      `t` |RewardProgramType|True|The type of the reward program| - |min_point
      `mp` |string|True|The minimum point to get the badge| - |max_point
      `mp1` |string|True|The maximum point to get the badge| - |min_rank
      `mr` |integer|True|The minimum rank to get the badge| - |max_rank
      `mr1` |integer|True|The maximum rank to get the badge| - |total_point
      `tp` |string|True|The total point to get the badge| - |count
      `c` |integer|True|The number of users to get the badge| - ??? info "[EpochBadgeType](/../../schemas/epoch_badge_type)" - |Value| Description | - |-|-| - |`CHAMPION` = 1|Champion| - |`LEGEND` = 2|Legend| - |`VETERAN` = 3|Veteran| - |`ELITE` = 4|Elite| - |`MASTER` = 5|Master| - |`EXPERT` = 6|Expert| - |`WARRIOR` = 7|Warrior| - |`SERGEANT` = 8|Sergeant| - |`RANGER` = 9|Ranger| - |`CHALLENGER` = 10|Challenger| - |`APPRENTICE` = 11|Apprentice| - |`ROOKIE` = 12|Rookie| - ??? info "[RewardProgramType](/../../schemas/reward_program_type)" - |Value| Description | - |-|-| - |`ECOSYSTEM` = 1|| - |`TRADER` = 2|| - |`LP` = 3|| diff --git a/artifacts/apidocs/schemas/query_epoch_badge_request.md b/artifacts/apidocs/schemas/query_epoch_badge_request.md index 6cac69e..e69de29 100644 --- a/artifacts/apidocs/schemas/query_epoch_badge_request.md +++ b/artifacts/apidocs/schemas/query_epoch_badge_request.md @@ -1,16 +0,0 @@ -!!! info "[QueryEpochBadgeRequest](/../../schemas/query_epoch_badge_request)" - Query list of epoch badges
      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |account_id
      `ai` |string|False
      `'all'`|The off chain account id to get referral stats| - |epoch
      `e` |integer|False
      `'all'`|The numerical epoch index| - |type
      `t` |RewardProgramType|False
      `'all'`|The type of the reward program| - |limit
      `l` |integer|False
      `'500'`|The limit to query for. Defaults to 500; Max 1000| - |cursor
      `c` |string|False
      `'all'`|The cursor to indicate when to start the query from| - ??? info "[RewardProgramType](/../../schemas/reward_program_type)" - |Value| Description | - |-|-| - |`ECOSYSTEM` = 1|| - |`TRADER` = 2|| - |`LP` = 3|| diff --git a/artifacts/apidocs/schemas/query_epoch_badge_response.md b/artifacts/apidocs/schemas/query_epoch_badge_response.md index 9700a5a..e69de29 100644 --- a/artifacts/apidocs/schemas/query_epoch_badge_response.md +++ b/artifacts/apidocs/schemas/query_epoch_badge_response.md @@ -1,55 +0,0 @@ -!!! info "[QueryEpochBadgeResponse](/../../schemas/query_epoch_badge_response)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |result
      `r` |[EpochBadge]|True|The list of epoch badges| - |next
      `n` |string|True|The cursor to indicate when to start the query from| - ??? info "[EpochBadge](/../../schemas/epoch_badge)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |account_id
      `ai` |string|True|The off chain account id| - |main_account_id
      `ma` |string|True|The account ID| - |type
      `t` |RewardProgramType|True|The type of the reward program| - |epoch
      `e` |integer|True|The epoch number| - |epoch_start_time
      `es` |string|True|The start time of the epoch| - |epoch_end_time
      `ee` |string|True|The end time of the epoch| - |badge
      `b` |EpochBadgeType|True|The type of the badge| - |distributed_badges
      `db` |[EpochBadgeType]|True|The distributed badges| - |total_point
      `tp` |string|True|Total point| - |rank
      `r` |integer|True|Rank| - |claimed_at
      `ca` |string|True|The time when the badge was claimed, or the epoch end time if the user has already completed the KYC process| - ??? info "[RewardProgramType](/../../schemas/reward_program_type)" - |Value| Description | - |-|-| - |`ECOSYSTEM` = 1|| - |`TRADER` = 2|| - |`LP` = 3|| - ??? info "[EpochBadgeType](/../../schemas/epoch_badge_type)" - |Value| Description | - |-|-| - |`CHAMPION` = 1|Champion| - |`LEGEND` = 2|Legend| - |`VETERAN` = 3|Veteran| - |`ELITE` = 4|Elite| - |`MASTER` = 5|Master| - |`EXPERT` = 6|Expert| - |`WARRIOR` = 7|Warrior| - |`SERGEANT` = 8|Sergeant| - |`RANGER` = 9|Ranger| - |`CHALLENGER` = 10|Challenger| - |`APPRENTICE` = 11|Apprentice| - |`ROOKIE` = 12|Rookie| - ??? info "[EpochBadgeType](/../../schemas/epoch_badge_type)" - |Value| Description | - |-|-| - |`CHAMPION` = 1|Champion| - |`LEGEND` = 2|Legend| - |`VETERAN` = 3|Veteran| - |`ELITE` = 4|Elite| - |`MASTER` = 5|Master| - |`EXPERT` = 6|Expert| - |`WARRIOR` = 7|Warrior| - |`SERGEANT` = 8|Sergeant| - |`RANGER` = 9|Ranger| - |`CHALLENGER` = 10|Challenger| - |`APPRENTICE` = 11|Apprentice| - |`ROOKIE` = 12|Rookie| diff --git a/artifacts/apidocs/schemas/query_get_latest_lp_snapshot_response.md b/artifacts/apidocs/schemas/query_get_latest_lp_snapshot_response.md index 97ebfb2..e69de29 100644 --- a/artifacts/apidocs/schemas/query_get_latest_lp_snapshot_response.md +++ b/artifacts/apidocs/schemas/query_get_latest_lp_snapshot_response.md @@ -1,15 +0,0 @@ -!!! info "[QueryGetLatestLPSnapshotResponse](/../../schemas/query_get_latest_lp_snapshot_response)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |snapshot
      `s` |LPSnapshot|True|The latest LP snapshot| - ??? info "[LPSnapshot](/../../schemas/lp_snapshot)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |main_account_id
      `ma` |string|True|The main account id| - |lp_asset
      `la` |string|True|The LP Asset| - |underlying_multiplier
      `um` |string|True|Underlying multiplier| - |maker_trading_volume
      `mt` |string|True|Maker trading volume| - |bid_fast_market_multiplier
      `bf` |integer|True|Fast market multiplier| - |ask_fast_market_multiplier
      `af` |integer|True|Fast market multiplier| - |liquidity_score
      `ls` |string|True|Liquidity score| - |calculate_at
      `ca` |string|True|The time when the snapshot was calculated| diff --git a/artifacts/apidocs/schemas/reward_epoch_info.md b/artifacts/apidocs/schemas/reward_epoch_info.md index e598eaf..e69de29 100644 --- a/artifacts/apidocs/schemas/reward_epoch_info.md +++ b/artifacts/apidocs/schemas/reward_epoch_info.md @@ -1,13 +0,0 @@ -!!! info "[RewardEpochInfo](/../../schemas/reward_epoch_info)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |epoch
      `e` |integer|True|The epoch number| - |epoch_start_time
      `es` |string|True|The start time of the epoch| - |epoch_end_time
      `ee` |string|True|The end time of the epoch| - |status
      `s` |RewardEpochStatus|True|The status of the epoch| - ??? info "[RewardEpochStatus](/../../schemas/reward_epoch_status)" - |Value| Description | - |-|-| - |`PAST` = 1|Past| - |`CURRENT` = 2|Current| - |`FUTURE` = 3|Future| diff --git a/artifacts/apidocs/schemas/signature.md b/artifacts/apidocs/schemas/signature.md index f896cdf..e69de29 100644 --- a/artifacts/apidocs/schemas/signature.md +++ b/artifacts/apidocs/schemas/signature.md @@ -1,9 +0,0 @@ -!!! 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.| diff --git a/artifacts/apidocs/schemas/spot_balance.md b/artifacts/apidocs/schemas/spot_balance.md index 4eae88d..e69de29 100644 --- a/artifacts/apidocs/schemas/spot_balance.md +++ b/artifacts/apidocs/schemas/spot_balance.md @@ -1,30 +0,0 @@ -!!! info "[SpotBalance](/../../schemas/spot_balance)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |currency
      `c` |Currency|True|The currency you hold a spot balance in| - |balance
      `b` |string|True|This currency's balance in this trading account.| - |index_price
      `ip` |string|True|The index price of this currency. (reported in `USD`)| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
      - - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/stream_reference.md b/artifacts/apidocs/schemas/stream_reference.md index 75dc903..e69de29 100644 --- a/artifacts/apidocs/schemas/stream_reference.md +++ b/artifacts/apidocs/schemas/stream_reference.md @@ -1,5 +0,0 @@ -!!! info "[StreamReference](/../../schemas/stream_reference)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |stream
      `s` |string|True|The channel to subscribe to (eg: ticker.s / ticker.d)| - |selectors
      `s1` |[string]|True|The list of selectors for the stream| diff --git a/artifacts/apidocs/schemas/sub_account.md b/artifacts/apidocs/schemas/sub_account.md index c947b90..e69de29 100644 --- a/artifacts/apidocs/schemas/sub_account.md +++ b/artifacts/apidocs/schemas/sub_account.md @@ -1,91 +0,0 @@ -!!! info "[SubAccount](/../../schemas/sub_account)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |event_time
      `et` |string|True|Time at which the event was emitted in unix nanoseconds| - |sub_account_id
      `sa` |string|True|The sub account ID this entry refers to| - |margin_type
      `mt` |MarginType|True|The type of margin algorithm this subaccount uses| - |settle_currency
      `sc` |Currency|True|The settlement, margin, and reporting currency of this account.
      This subaccount can only open positions quoted in this currency

      In the future, when users select a Multi-Currency Margin Type, this will be USD
      All other assets are converted to this currency for the purpose of calculating margin| - |unrealized_pnl
      `up` |string|True|The total unrealized PnL of all positions owned by this subaccount, denominated in quote currency decimal units.
      `unrealized_pnl = sum(position.unrealized_pnl * position.quote_index_price) / settle_index_price`| - |total_equity
      `te` |string|True|The notional value of your account if all positions are closed, excluding trading fees (reported in `settle_currency`).
      `total_equity = sum(spot_balance.balance * spot_balance.index_price) / settle_index_price + unrealized_pnl`| - |initial_margin
      `im` |string|True|The `total_equity` required to open positions in the account (reported in `settle_currency`).
      Computation is different depending on account's `margin_type`| - |maintenance_margin
      `mm` |string|True|The `total_equity` required to avoid liquidation of positions in the account (reported in `settle_currency`).
      Computation is different depending on account's `margin_type`| - |available_balance
      `ab` |string|True|The notional value available to transfer out of the trading account into the funding account (reported in `settle_currency`).
      `available_balance = total_equity - initial_margin - min(unrealized_pnl, 0)`| - |spot_balances
      `sb` |[SpotBalance]|True|The list of spot assets owned by this sub account, and their balances| - |positions
      `p` |[Positions]|True|The list of positions owned by this sub account| - |settle_index_price
      `si` |string|True|The index price of the settle currency. (reported in `USD`)| - ??? info "[MarginType](/../../schemas/margin_type)" - |Value| Description | - |-|-| - |`SIMPLE_CROSS_MARGIN` = 2|Simple Cross Margin Mode: all assets have a predictable margin impact, the whole subaccount shares a single margin| - |`PORTFOLIO_CROSS_MARGIN` = 3|Portfolio Cross Margin Mode: asset margin impact is analysed on portfolio level, the whole subaccount shares a single margin| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
      - - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| - ??? info "[SpotBalance](/../../schemas/spot_balance)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |currency
      `c` |Currency|True|The currency you hold a spot balance in| - |balance
      `b` |string|True|This currency's balance in this trading account.| - |index_price
      `ip` |string|True|The index price of this currency. (reported in `USD`)| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
      - - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| - ??? info "[Positions](/../../schemas/positions)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |event_time
      `et` |string|True|Time at which the event was emitted in unix nanoseconds| - |sub_account_id
      `sa` |string|True|The sub account ID that participated in the trade| - |instrument
      `i` |string|True|The instrument being represented| - |size
      `s` |string|True|The size of the position, expressed in base asset decimal units. Negative for short positions| - |notional
      `n` |string|True|The notional value of the position, negative for short assets, expressed in quote asset decimal units| - |entry_price
      `ep` |string|True|The entry price of the position, expressed in `9` decimals
      Whenever increasing the size of a position, the entry price is updated to the new average entry price
      `new_entry_price = (old_entry_price * old_size + trade_price * trade_size) / (old_size + trade_size)`| - |exit_price
      `ep1` |string|True|The exit price of the position, expressed in `9` decimals
      Whenever decreasing the size of a position, the exit price is updated to the new average exit price
      `new_exit_price = (old_exit_price * old_exit_trade_size + trade_price * trade_size) / (old_exit_trade_size + trade_size)`| - |mark_price
      `mp` |string|True|The mark price of the position, expressed in `9` decimals| - |unrealized_pnl
      `up` |string|True|The unrealized PnL of the position, expressed in quote asset decimal units
      `unrealized_pnl = (mark_price - entry_price) * size`| - |realized_pnl
      `rp` |string|True|The realized PnL of the position, expressed in quote asset decimal units
      `realized_pnl = (exit_price - entry_price) * exit_trade_size`| - |total_pnl
      `tp` |string|True|The total PnL of the position, expressed in quote asset decimal units
      `total_pnl = realized_pnl + unrealized_pnl`| - |roi
      `r` |string|True|The ROI of the position, expressed as a percentage
      `roi = (total_pnl / (entry_price * abs(size))) * 100^`| - |quote_index_price
      `qi` |string|True|The index price of the quote currency. (reported in `USD`)| - |est_liquidation_price
      `el` |string|True|The estimated liquidation price| diff --git a/artifacts/apidocs/schemas/sub_account_trade_aggregation.md b/artifacts/apidocs/schemas/sub_account_trade_aggregation.md index 268c60f..e69de29 100644 --- a/artifacts/apidocs/schemas/sub_account_trade_aggregation.md +++ b/artifacts/apidocs/schemas/sub_account_trade_aggregation.md @@ -1,10 +0,0 @@ -!!! info "[SubAccountTradeAggregation](/../../schemas/sub_account_trade_aggregation)" - Similar to sub-account trade, but not divided by individual assets.
      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |sub_account_id
      `sa` |string|True|The sub account id| - |total_fee
      `tf` |string|True|Total fee paid| - |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| diff --git a/artifacts/apidocs/schemas/ticker.md b/artifacts/apidocs/schemas/ticker.md index d0546a0..e69de29 100644 --- a/artifacts/apidocs/schemas/ticker.md +++ b/artifacts/apidocs/schemas/ticker.md @@ -1,29 +0,0 @@ -!!! info "[Ticker](/../../schemas/ticker)" - Derived data such as the below, will not be included by default:
      - 24 hour volume (`buyVolume + sellVolume`)
      - 24 hour taker buy/sell ratio (`buyVolume / sellVolume`)
      - 24 hour average trade price (`volumeQ / volumeU`)
      - 24 hour average trade volume (`volume / trades`)
      - 24 hour percentage change (`24hStatChange / 24hStat`)
      - 48 hour statistics (`2 * 24hStat - 24hStatChange`)

      To query for an extended ticker payload, leverage the `greeks` and the `derived` flags.
      Ticker extensions are currently under design to offer you more convenience.
      These flags are only supported on the `Ticker Snapshot` WS endpoint, and on the `Ticker` API endpoint.

      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |event_time
      `et` |string|False
      `None`|Time at which the event was emitted in unix nanoseconds| - |instrument
      `i` |string|False
      `None`|The readable instrument name:
      • Perpetual: `ETH_USDT_Perp`
      • Future: `BTC_USDT_Fut_20Oct23`
      • Call: `ETH_USDT_Call_20Oct23_2800`
      • Put: `ETH_USDT_Put_20Oct23_2800`
      | - |mark_price
      `mp` |string|False
      `None`|The mark price of the instrument, expressed in `9` decimals| - |index_price
      `ip` |string|False
      `None`|The index price of the instrument, expressed in `9` decimals| - |last_price
      `lp` |string|False
      `None`|The last traded price of the instrument (also close price), expressed in `9` decimals| - |last_size
      `ls` |string|False
      `None`|The number of assets traded in the last trade, expressed in base asset decimal units| - |mid_price
      `mp1` |string|False
      `None`|The mid price of the instrument, expressed in `9` decimals| - |best_bid_price
      `bb` |string|False
      `None`|The best bid price of the instrument, expressed in `9` decimals| - |best_bid_size
      `bb1` |string|False
      `None`|The number of assets offered on the best bid price of the instrument, expressed in base asset decimal units| - |best_ask_price
      `ba` |string|False
      `None`|The best ask price of the instrument, expressed in `9` decimals| - |best_ask_size
      `ba1` |string|False
      `None`|The number of assets offered on the best ask price of the instrument, expressed in base asset decimal units| - |funding_rate_8h_curr
      `fr` |string|False
      `None`|The current funding rate of the instrument, expressed in percentage points| - |funding_rate_8h_avg
      `fr1` |string|False
      `None`|The average funding rate of the instrument (over last 8h), expressed in percentage points| - |interest_rate
      `ir` |string|False
      `None`|The interest rate of the underlying, expressed in centibeeps (1/100th of a basis point)| - |forward_price
      `fp` |string|False
      `None`|[Options] The forward price of the option, expressed in `9` decimals| - |buy_volume_24h_b
      `bv` |string|False
      `None`|The 24 hour taker buy volume of the instrument, expressed in base asset decimal units| - |sell_volume_24h_b
      `sv` |string|False
      `None`|The 24 hour taker sell volume of the instrument, expressed in base asset decimal units| - |buy_volume_24h_q
      `bv1` |string|False
      `None`|The 24 hour taker buy volume of the instrument, expressed in quote asset decimal units| - |sell_volume_24h_q
      `sv1` |string|False
      `None`|The 24 hour taker sell volume of the instrument, expressed in quote asset decimal units| - |high_price
      `hp` |string|False
      `None`|The 24 hour highest traded price of the instrument, expressed in `9` decimals| - |low_price
      `lp1` |string|False
      `None`|The 24 hour lowest traded price of the instrument, expressed in `9` decimals| - |open_price
      `op` |string|False
      `None`|The 24 hour first traded price of the instrument, expressed in `9` decimals| - |open_interest
      `oi` |string|False
      `None`|The open interest in the instrument, expressed in base asset decimal units| - |long_short_ratio
      `ls1` |string|False
      `None`|The ratio of accounts that are net long vs net short on this instrument| diff --git a/artifacts/apidocs/schemas/tpsl_order_metadata.md b/artifacts/apidocs/schemas/tpsl_order_metadata.md index 0b760a8..e69de29 100644 --- a/artifacts/apidocs/schemas/tpsl_order_metadata.md +++ b/artifacts/apidocs/schemas/tpsl_order_metadata.md @@ -1,15 +0,0 @@ -!!! info "[TPSLOrderMetadata](/../../schemas/tpsl_order_metadata)" - Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

      ### Fields:
      - **triggerBy**: Defines the price type that activates the order (e.g., index price).
      - **triggerPrice**: The price at which the order is triggered, expressed in `9` decimal precision.


      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |trigger_by
      `tb` |TriggerBy|True|Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order| - |trigger_price
      `tp` |string|True|The Trigger Price of the order, expressed in `9` decimals.| - ??? info "[TriggerBy](/../../schemas/trigger_by)" - Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order.

      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.


      - - |Value| Description | - |-|-| - |`UNSPECIFIED` = 0|no trigger condition| - |`INDEX` = 1|INDEX - Order is activated when the index price reaches the trigger price| - |`LAST` = 2|LAST - Order is activated when the last trade price reaches the trigger price| diff --git a/artifacts/apidocs/schemas/trade.md b/artifacts/apidocs/schemas/trade.md index 6958f5e..e69de29 100644 --- a/artifacts/apidocs/schemas/trade.md +++ b/artifacts/apidocs/schemas/trade.md @@ -1,23 +0,0 @@ -!!! info "[Trade](/../../schemas/trade)" - All private RFQs and Private AXEs will be filtered out from the responses
      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |event_time
      `et` |string|True|Time at which the event was emitted in unix nanoseconds| - |instrument
      `i` |string|True|The readable instrument name:
      • Perpetual: `ETH_USDT_Perp`
      • Future: `BTC_USDT_Fut_20Oct23`
      • Call: `ETH_USDT_Call_20Oct23_2800`
      • Put: `ETH_USDT_Put_20Oct23_2800`
      | - |is_taker_buyer
      `it` |boolean|True|If taker was the buyer on the trade| - |size
      `s` |string|True|The number of assets being traded, expressed in base asset decimal units| - |price
      `p` |string|True|The traded price, expressed in `9` decimals| - |mark_price
      `mp` |string|True|The mark price of the instrument at point of trade, expressed in `9` decimals| - |index_price
      `ip` |string|True|The index price of the instrument at point of trade, expressed in `9` decimals| - |interest_rate
      `ir` |string|True|The interest rate of the underlying at point of trade, expressed in centibeeps (1/100th of a basis point)| - |forward_price
      `fp` |string|True|[Options] The forward price of the option at point of trade, expressed in `9` decimals| - |trade_id
      `ti` |string|True|A trade identifier, globally unique, and monotonically increasing (not by `1`).
      All trades sharing a single taker execution share the same first component (before `-`), and `event_time`.
      `trade_id` is guaranteed to be consistent across MarketData `Trade` and Trading `Fill`.| - |venue
      `v` |Venue|True|The venue where the trade occurred| - ??? info "[Venue](/../../schemas/venue)" - The list of Trading Venues that are supported on the GRVT exchange
      - - |Value| Description | - |-|-| - |`ORDERBOOK` = 1|the trade is cleared on the orderbook venue| - |`RFQ` = 2|the trade is cleared on the RFQ venue| diff --git a/artifacts/apidocs/schemas/trader_leaderboard_user.md b/artifacts/apidocs/schemas/trader_leaderboard_user.md index ca29ba6..e69de29 100644 --- a/artifacts/apidocs/schemas/trader_leaderboard_user.md +++ b/artifacts/apidocs/schemas/trader_leaderboard_user.md @@ -1,7 +0,0 @@ -!!! info "[TraderLeaderboardUser](/../../schemas/trader_leaderboard_user)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |account_id
      `ai` |string|True|The off chain account id| - |rank
      `r` |integer|True|The rank of the account in the Trader| - |total_point
      `tp` |number|True|Total Trader point| - |twitter_username
      `tu` |string|True|The twitter username of the account| diff --git a/artifacts/apidocs/schemas/trader_metric.md b/artifacts/apidocs/schemas/trader_metric.md index 4530b04..e69de29 100644 --- a/artifacts/apidocs/schemas/trader_metric.md +++ b/artifacts/apidocs/schemas/trader_metric.md @@ -1,5 +0,0 @@ -!!! info "[TraderMetric](/../../schemas/trader_metric)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |total_fee
      `tf` |string|True|Total fee paid| - |total_point
      `tp` |number|True|Total trader point of this epoch/phase| diff --git a/artifacts/apidocs/schemas/transfer_history.md b/artifacts/apidocs/schemas/transfer_history.md index 55adcbd..e69de29 100644 --- a/artifacts/apidocs/schemas/transfer_history.md +++ b/artifacts/apidocs/schemas/transfer_history.md @@ -1,53 +0,0 @@ -!!! info "[TransferHistory](/../../schemas/transfer_history)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |tx_id
      `ti` |string|True|The transaction ID of the transfer| - |from_account_id
      `fa` |string|True|The account to transfer from| - |from_sub_account_id
      `fs` |string|True|The subaccount to transfer from (0 if transferring from main account)| - |to_account_id
      `ta` |string|True|The account to deposit into| - |to_sub_account_id
      `ts` |string|True|The subaccount to transfer to (0 if transferring to main account)| - |currency
      `c` |Currency|True|The token currency to transfer| - |num_tokens
      `nt` |string|True|The number of tokens to transfer| - |signature
      `s` |Signature|True|The signature of the transfer| - |event_time
      `et` |string|True|The timestamp of the transfer in unix nanoseconds| - |transfer_type
      `tt` |TransferType|True|The type of transfer| - |transfer_metadata
      `tm` |string|True|The metadata of the transfer| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
      - - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| - ??? 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 "[TransferType](/../../schemas/transfer_type)" - |Value| Description | - |-|-| - |`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| diff --git a/artifacts/apidocs/schemas/withdrawal.md b/artifacts/apidocs/schemas/withdrawal.md index 1f8271e..e69de29 100644 --- a/artifacts/apidocs/schemas/withdrawal.md +++ b/artifacts/apidocs/schemas/withdrawal.md @@ -1,41 +0,0 @@ -!!! info "[Withdrawal](/../../schemas/withdrawal)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |from_account_id
      `fa` |string|True|The subaccount to withdraw from| - |to_eth_address
      `te` |string|True|The ethereum address to withdraw to| - |currency
      `c` |Currency|True|The token currency to withdraw| - |num_tokens
      `nt` |string|True|The number of tokens to withdraw| - |signature
      `s` |Signature|True|The signature of the withdrawal| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
      - - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| - ??? 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.| diff --git a/artifacts/apidocs/schemas/withdrawal_history.md b/artifacts/apidocs/schemas/withdrawal_history.md index 9b835e8..e69de29 100644 --- a/artifacts/apidocs/schemas/withdrawal_history.md +++ b/artifacts/apidocs/schemas/withdrawal_history.md @@ -1,43 +0,0 @@ -!!! info "[WithdrawalHistory](/../../schemas/withdrawal_history)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |tx_id
      `ti` |string|True|The transaction ID of the withdrawal| - |from_account_id
      `fa` |string|True|The subaccount to withdraw from| - |to_eth_address
      `te` |string|True|The ethereum address to withdraw to| - |currency
      `c` |Currency|True|The token currency to withdraw| - |num_tokens
      `nt` |string|True|The number of tokens to withdraw| - |signature
      `s` |Signature|True|The signature of the withdrawal| - |event_time
      `et` |string|True|The timestamp of the withdrawal in unix nanoseconds| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
      - - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| - ??? 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.| diff --git a/artifacts/apidocs/schemas/ws_cancel_feed_data_v1.md b/artifacts/apidocs/schemas/ws_cancel_feed_data_v1.md index 0206e12..e69de29 100644 --- a/artifacts/apidocs/schemas/ws_cancel_feed_data_v1.md +++ b/artifacts/apidocs/schemas/ws_cancel_feed_data_v1.md @@ -1,54 +0,0 @@ -!!! info "[WSCancelFeedDataV1](/../../schemas/ws_cancel_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` |CancelStatusFeed|True|Data relating to the status of the cancellation attempt| - |prev_sequence_number
      `ps` |string|True|The previous sequence number that determines global message order within the specific stream| - ??? info "[CancelStatusFeed](/../../schemas/cancel_status_feed)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |sub_account_id
      `sa` |string|True|The subaccount ID that requested the cancellation| - |client_order_id
      `co` |string|True|A unique identifier for the active order within a subaccount, specified by the client| - |order_id
      `oi` |string|True|A unique 128-bit identifier for the order, deterministically generated within the GRVT backend| - |reason
      `r` |OrderRejectReason|True|The user-provided reason for cancelling the order| - |update_time
      `ut` |string|False
      `0`|[Filled by GRVT Backend] Time at which the cancellation status was updated by GRVT in unix nanoseconds| - |cancel_status
      `cs` |CancelStatus|True|Status of the cancellation attempt| - ??? 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| - ??? 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.| diff --git a/artifacts/apidocs/schemas/ws_cancel_feed_selector_v1.md b/artifacts/apidocs/schemas/ws_cancel_feed_selector_v1.md index 016d250..e69de29 100644 --- a/artifacts/apidocs/schemas/ws_cancel_feed_selector_v1.md +++ b/artifacts/apidocs/schemas/ws_cancel_feed_selector_v1.md @@ -1,6 +0,0 @@ -!!! info "[WSCancelFeedSelectorV1](/../../schemas/ws_cancel_feed_selector_v1)" - Subscribes to a feed of time-to-live expiry events for order cancellations requested by a given subaccount.
      **This stream presently only provides expiry updates for cancel-order requests set with a valid TTL value**.
      Successful order cancellations will reflect as updates published to the (order-state stream)[https://api-docs.grvt.io/trading_streams/#order-state].
      _A future release will expand the functionality of this stream to provide more general status updates on order cancellation requests._
      Each Order can be uniquely identified by its `client_order_id`.

      - - |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_candlestick_feed_data_v1.md b/artifacts/apidocs/schemas/ws_candlestick_feed_data_v1.md index 04fab98..e69de29 100644 --- a/artifacts/apidocs/schemas/ws_candlestick_feed_data_v1.md +++ b/artifacts/apidocs/schemas/ws_candlestick_feed_data_v1.md @@ -1,23 +0,0 @@ -!!! info "[WSCandlestickFeedDataV1](/../../schemas/ws_candlestick_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` |Candlestick|True|A candlestick entry matching the request filters| - |prev_sequence_number
      `ps` |string|True|The previous sequence number that determines global message order within the specific stream| - ??? info "[Candlestick](/../../schemas/candlestick)" -
      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |open_time
      `ot` |string|True|Open time of kline bar in unix nanoseconds| - |close_time
      `ct` |string|True|Close time of kline bar in unix nanosecond| - |open
      `o` |string|True|The open price, expressed in underlying currency resolution units| - |close
      `c` |string|True|The close price, expressed in underlying currency resolution units| - |high
      `h` |string|True|The high price, expressed in underlying currency resolution units| - |low
      `l` |string|True|The low price, expressed in underlying currency resolution units| - |volume_b
      `vb` |string|True|The underlying volume transacted, expressed in base asset decimal units| - |volume_q
      `vq` |string|True|The quote volume transacted, expressed in quote asset decimal units| - |trades
      `t` |integer|True|The number of trades transacted| - |instrument
      `i` |string|True|The readable instrument name:
      • Perpetual: `ETH_USDT_Perp`
      • Future: `BTC_USDT_Fut_20Oct23`
      • Call: `ETH_USDT_Call_20Oct23_2800`
      • Put: `ETH_USDT_Put_20Oct23_2800`
      | diff --git a/artifacts/apidocs/schemas/ws_candlestick_feed_selector_v1.md b/artifacts/apidocs/schemas/ws_candlestick_feed_selector_v1.md index 186e781..e69de29 100644 --- a/artifacts/apidocs/schemas/ws_candlestick_feed_selector_v1.md +++ b/artifacts/apidocs/schemas/ws_candlestick_feed_selector_v1.md @@ -1,36 +0,0 @@ -!!! info "[WSCandlestickFeedSelectorV1](/../../schemas/ws_candlestick_feed_selector_v1)" - Subscribes to a stream of Kline/Candlestick updates for an instrument. A Kline is uniquely identified by its open time.
      A new Kline is published every interval (if it exists). Upon subscription, the server will send the 5 most recent Kline for the requested interval.
      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |instrument
      `i` |string|True|The readable instrument name:
      • Perpetual: `ETH_USDT_Perp`
      • Future: `BTC_USDT_Fut_20Oct23`
      • Call: `ETH_USDT_Call_20Oct23_2800`
      • Put: `ETH_USDT_Put_20Oct23_2800`
      | - |interval
      `i1` |CandlestickInterval|True|The interval of each candlestick| - |type
      `t` |CandlestickType|True|The type of candlestick data to retrieve| - ??? info "[CandlestickInterval](/../../schemas/candlestick_interval)" - |Value| Description | - |-|-| - |`CI_1_M` = 1|1 minute| - |`CI_3_M` = 2|3 minutes| - |`CI_5_M` = 3|5 minutes| - |`CI_15_M` = 4|15 minutes| - |`CI_30_M` = 5|30 minutes| - |`CI_1_H` = 6|1 hour| - |`CI_2_H` = 7|2 hour| - |`CI_4_H` = 8|4 hour| - |`CI_6_H` = 9|6 hour| - |`CI_8_H` = 10|8 hour| - |`CI_12_H` = 11|12 hour| - |`CI_1_D` = 12|1 day| - |`CI_3_D` = 13|3 days| - |`CI_5_D` = 14|5 days| - |`CI_1_W` = 15|1 week| - |`CI_2_W` = 16|2 weeks| - |`CI_3_W` = 17|3 weeks| - |`CI_4_W` = 18|4 weeks| - ??? info "[CandlestickType](/../../schemas/candlestick_type)" - |Value| Description | - |-|-| - |`TRADE` = 1|Tracks traded prices| - |`MARK` = 2|Tracks mark prices| - |`INDEX` = 3|Tracks index prices| - |`MID` = 4|Tracks book mid prices| diff --git a/artifacts/apidocs/schemas/ws_deposit_feed_data_v1.md b/artifacts/apidocs/schemas/ws_deposit_feed_data_v1.md index eed835f..e69de29 100644 --- a/artifacts/apidocs/schemas/ws_deposit_feed_data_v1.md +++ b/artifacts/apidocs/schemas/ws_deposit_feed_data_v1.md @@ -1,41 +0,0 @@ -!!! info "[WSDepositFeedDataV1](/../../schemas/ws_deposit_feed_data_v1)" - Subscribes to a feed of deposit updates.
      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |stream
      `s` |string|True|The websocket channel to which the response is sent| - |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` |Deposit|True|The Deposit object| - |prev_sequence_number
      `ps` |string|True|The previous sequence number that determines global message order within the specific stream| - ??? info "[Deposit](/../../schemas/deposit)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |tx_hash
      `th` |string|True|The hash of the bridgemint event producing the deposit| - |to_account_id
      `ta` |string|True|The account to deposit into| - |currency
      `c` |Currency|True|The token currency to deposit| - |num_tokens
      `nt` |string|True|The number of tokens to deposit| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
      - - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/ws_deposit_feed_selector_v1.md b/artifacts/apidocs/schemas/ws_deposit_feed_selector_v1.md index 9ef7ba4..e69de29 100644 --- a/artifacts/apidocs/schemas/ws_deposit_feed_selector_v1.md +++ b/artifacts/apidocs/schemas/ws_deposit_feed_selector_v1.md @@ -1,6 +0,0 @@ -!!! info "[WSDepositFeedSelectorV1](/../../schemas/ws_deposit_feed_selector_v1)" - Subscribes to a feed of deposits. This will execute when there is any deposit to selected account.
      To subscribe to a main account, specify the account ID (eg. `0x9fe3758b67ce7a2875ee4b452f01a5282d84ed8a`).
      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |main_account_id
      `ma` |string|True|The main account ID to request for| diff --git a/artifacts/apidocs/schemas/ws_fill_feed_data_v1.md b/artifacts/apidocs/schemas/ws_fill_feed_data_v1.md index 25713f5..e69de29 100644 --- a/artifacts/apidocs/schemas/ws_fill_feed_data_v1.md +++ b/artifacts/apidocs/schemas/ws_fill_feed_data_v1.md @@ -1,41 +0,0 @@ -!!! info "[WSFillFeedDataV1](/../../schemas/ws_fill_feed_data_v1)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |stream
      `s` |string|True|The websocket channel to which the response is sent| - |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` |Fill|True|A private trade matching the request filter| - |prev_sequence_number
      `ps` |string|True|The previous sequence number that determines global message order within the specific stream| - ??? info "[Fill](/../../schemas/fill)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |event_time
      `et` |string|True|Time at which the event was emitted in unix nanoseconds| - |sub_account_id
      `sa` |string|True|The sub account ID that participated in the trade| - |instrument
      `i` |string|True|The instrument being represented| - |is_buyer
      `ib` |boolean|True|The side that the subaccount took on the trade| - |is_taker
      `it` |boolean|True|The role that the subaccount took on the trade| - |size
      `s` |string|True|The number of assets being traded, expressed in base asset decimal units| - |price
      `p` |string|True|The traded price, expressed in `9` decimals| - |mark_price
      `mp` |string|True|The mark price of the instrument at point of trade, expressed in `9` decimals| - |index_price
      `ip` |string|True|The index price of the instrument at point of trade, expressed in `9` decimals| - |interest_rate
      `ir` |string|True|The interest rate of the underlying at point of trade, expressed in centibeeps (1/100th of a basis point)| - |forward_price
      `fp` |string|True|[Options] The forward price of the option at point of trade, expressed in `9` decimals| - |realized_pnl
      `rp` |string|True|The realized PnL of the trade, expressed in quote asset decimal units (0 if increasing position size)| - |fee
      `f` |string|True|The fees paid on the trade, expressed in quote asset decimal unit (negative if maker rebate applied)| - |fee_rate
      `fr` |string|True|The fee rate paid on the trade| - |trade_id
      `ti` |string|True|A trade identifier, globally unique, and monotonically increasing (not by `1`).
      All trades sharing a single taker execution share the same first component (before `-`), and `event_time`.
      `trade_id` is guaranteed to be consistent across MarketData `Trade` and Trading `Fill`.| - |order_id
      `oi` |string|True|An order identifier| - |venue
      `v` |Venue|True|The venue where the trade occurred| - |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| - |signer
      `s1` |string|True|The address (public key) of the wallet signing the payload| - |broker
      `b` |BrokerTag|False
      ``|Specifies the broker who brokered the order| - ??? info "[Venue](/../../schemas/venue)" - The list of Trading Venues that are supported on the GRVT exchange
      - - |Value| Description | - |-|-| - |`ORDERBOOK` = 1|the trade is cleared on the orderbook venue| - |`RFQ` = 2|the trade is cleared on the RFQ venue| - ??? info "[BrokerTag](/../../schemas/broker_tag)" - BrokerTag is a tag for the broker that the order is sent from.
      - diff --git a/artifacts/apidocs/schemas/ws_fill_feed_selector_v1.md b/artifacts/apidocs/schemas/ws_fill_feed_selector_v1.md index 1747ce4..e69de29 100644 --- a/artifacts/apidocs/schemas/ws_fill_feed_selector_v1.md +++ b/artifacts/apidocs/schemas/ws_fill_feed_selector_v1.md @@ -1,7 +0,0 @@ -!!! info "[WSFillFeedSelectorV1](/../../schemas/ws_fill_feed_selector_v1)" - Subscribes to a feed of private trade updates. This happens when a trade is executed.
      To subscribe to all private trades, specify an empty `instrument` (eg. `2345123`).
      Otherwise, specify the `instrument` to only receive private trades for that instrument (eg. `2345123-BTC_USDT_Perp`).
      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |sub_account_id
      `sa` |string|True|The sub account ID to request for| - |instrument
      `i` |string|False
      `'all'`|The instrument filter to apply.| diff --git a/artifacts/apidocs/schemas/ws_list_streams_params.md b/artifacts/apidocs/schemas/ws_list_streams_params.md index b103006..e69de29 100644 --- a/artifacts/apidocs/schemas/ws_list_streams_params.md +++ b/artifacts/apidocs/schemas/ws_list_streams_params.md @@ -1,5 +0,0 @@ -!!! info "[WSListStreamsParams](/../../schemas/ws_list_streams_params)" - List down all the streams this connection has connected to.
      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| diff --git a/artifacts/apidocs/schemas/ws_list_streams_result.md b/artifacts/apidocs/schemas/ws_list_streams_result.md index a02e7cb..e69de29 100644 --- a/artifacts/apidocs/schemas/ws_list_streams_result.md +++ b/artifacts/apidocs/schemas/ws_list_streams_result.md @@ -1,11 +0,0 @@ -!!! info "[WSListStreamsResult](/../../schemas/ws_list_streams_result)" - Returns a list of all rooms the client has subscribed to.
      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |stream_reference
      `sr` |[StreamReference]|True|The list of stream references the connection is connected to| - ??? info "[StreamReference](/../../schemas/stream_reference)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |stream
      `s` |string|True|The channel to subscribe to (eg: ticker.s / ticker.d)| - |selectors
      `s1` |[string]|True|The list of selectors for the stream| diff --git a/artifacts/apidocs/schemas/ws_mini_ticker_feed_data_v1.md b/artifacts/apidocs/schemas/ws_mini_ticker_feed_data_v1.md index 9a5fd62..e69de29 100644 --- a/artifacts/apidocs/schemas/ws_mini_ticker_feed_data_v1.md +++ b/artifacts/apidocs/schemas/ws_mini_ticker_feed_data_v1.md @@ -1,22 +0,0 @@ -!!! info "[WSMiniTickerFeedDataV1](/../../schemas/ws_mini_ticker_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` |MiniTicker|True|A mini ticker matching the request filter| - |prev_sequence_number
      `ps` |string|True|The previous sequence number that determines global message order within the specific stream| - ??? info "[MiniTicker](/../../schemas/mini_ticker)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |event_time
      `et` |string|False
      `None`|Time at which the event was emitted in unix nanoseconds| - |instrument
      `i` |string|False
      `None`|The readable instrument name:
      • Perpetual: `ETH_USDT_Perp`
      • Future: `BTC_USDT_Fut_20Oct23`
      • Call: `ETH_USDT_Call_20Oct23_2800`
      • Put: `ETH_USDT_Put_20Oct23_2800`
      | - |mark_price
      `mp` |string|False
      `None`|The mark price of the instrument, expressed in `9` decimals| - |index_price
      `ip` |string|False
      `None`|The index price of the instrument, expressed in `9` decimals| - |last_price
      `lp` |string|False
      `None`|The last traded price of the instrument (also close price), expressed in `9` decimals| - |last_size
      `ls` |string|False
      `None`|The number of assets traded in the last trade, expressed in base asset decimal units| - |mid_price
      `mp1` |string|False
      `None`|The mid price of the instrument, expressed in `9` decimals| - |best_bid_price
      `bb` |string|False
      `None`|The best bid price of the instrument, expressed in `9` decimals| - |best_bid_size
      `bb1` |string|False
      `None`|The number of assets offered on the best bid price of the instrument, expressed in base asset decimal units| - |best_ask_price
      `ba` |string|False
      `None`|The best ask price of the instrument, expressed in `9` decimals| - |best_ask_size
      `ba1` |string|False
      `None`|The number of assets offered on the best ask price of the instrument, expressed in base asset decimal units| diff --git a/artifacts/apidocs/schemas/ws_mini_ticker_feed_selector_v1.md b/artifacts/apidocs/schemas/ws_mini_ticker_feed_selector_v1.md index bac191b..e69de29 100644 --- a/artifacts/apidocs/schemas/ws_mini_ticker_feed_selector_v1.md +++ b/artifacts/apidocs/schemas/ws_mini_ticker_feed_selector_v1.md @@ -1,7 +0,0 @@ -!!! info "[WSMiniTickerFeedSelectorV1](/../../schemas/ws_mini_ticker_feed_selector_v1)" - Subscribes to a mini ticker feed for a single instrument. The `mini.s` channel offers simpler integration. To experience higher publishing rates, please use the `mini.d` channel.
      Unlike the `mini.d` channel which publishes an initial snapshot, then only streams deltas after, the `mini.s` channel publishes full snapshots at each feed.

      The Delta feed will work as follows:
      • On subscription, the server will send a full snapshot of the mini ticker.
      • After the snapshot, the server will only send deltas of the mini ticker.
      • The server will send a delta if any of the fields in the mini ticker have changed.


      Field Semantics:
      • [DeltaOnly] If a field is not updated, {}
      • If a field is updated, {field: '123'}
      • If a field is set to zero, {field: '0'}
      • If a field is set to null, {field: ''}

      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |instrument
      `i` |string|True|The readable instrument name:
      • Perpetual: `ETH_USDT_Perp`
      • Future: `BTC_USDT_Fut_20Oct23`
      • Call: `ETH_USDT_Call_20Oct23_2800`
      • Put: `ETH_USDT_Put_20Oct23_2800`
      | - |rate
      `r` |integer|True|The minimal rate at which we publish feeds (in milliseconds)
      Delta (0 - `raw`, 50, 100, 200, 500, 1000, 5000)
      Snapshot (200, 500, 1000, 5000)| diff --git a/artifacts/apidocs/schemas/ws_order_feed_data_v1.md b/artifacts/apidocs/schemas/ws_order_feed_data_v1.md index 3c0038a..e69de29 100644 --- a/artifacts/apidocs/schemas/ws_order_feed_data_v1.md +++ b/artifacts/apidocs/schemas/ws_order_feed_data_v1.md @@ -1,114 +0,0 @@ -!!! info "[WSOrderFeedDataV1](/../../schemas/ws_order_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` |Order|True|The order object being created or updated| - |prev_sequence_number
      `ps` |string|True|The previous sequence number that determines global message order within the specific stream| - ??? 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| - |trigger
      `t` |TriggerOrderMetadata|True|Trigger fields are used to support any type of trigger order such as TP/SL| - |broker
      `b` |BrokerTag|False
      ``|Specifies the broker who brokered the order| - ??? info "[BrokerTag](/../../schemas/broker_tag)" - BrokerTag is a tag for the broker that the order is sent from.
      - - ??? 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| diff --git a/artifacts/apidocs/schemas/ws_order_feed_selector_v1.md b/artifacts/apidocs/schemas/ws_order_feed_selector_v1.md index a011280..e69de29 100644 --- a/artifacts/apidocs/schemas/ws_order_feed_selector_v1.md +++ b/artifacts/apidocs/schemas/ws_order_feed_selector_v1.md @@ -1,7 +0,0 @@ -!!! info "[WSOrderFeedSelectorV1](/../../schemas/ws_order_feed_selector_v1)" - Subscribes to a feed of order updates pertaining to orders made by your account.
      Each Order can be uniquely identified by its `order_id` or `client_order_id`.
      To subscribe to all orders, specify an empty `instrument` (eg. `2345123`).
      Otherwise, specify the `instrument` to only receive orders for that instrument (eg. `2345123-BTC_USDT_Perp`).
      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |sub_account_id
      `sa` |string|True|The subaccount ID to filter by| - |instrument
      `i` |string|False
      `'all'`|The instrument filter to apply.| 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 ce19912..e69de29 100644 --- a/artifacts/apidocs/schemas/ws_order_state_feed_data_v1.md +++ b/artifacts/apidocs/schemas/ws_order_state_feed_data_v1.md @@ -1,64 +0,0 @@ -!!! info "[WSOrderStateFeedDataV1](/../../schemas/ws_order_state_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` |OrderStateFeed|True|The Order State Feed| - |prev_sequence_number
      `ps` |string|True|The previous sequence number that determines global message order within the specific stream| - ??? info "[OrderStateFeed](/../../schemas/order_state_feed)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |order_id
      `oi` |string|True|A unique 128-bit identifier for the order, deterministically generated within the GRVT backend| - |client_order_id
      `co` |string|True|A unique identifier for the active order within a subaccount, specified by the client| - |order_state
      `os` |OrderState|True|The order state object being created or updated| - ??? 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| diff --git a/artifacts/apidocs/schemas/ws_order_state_feed_selector_v1.md b/artifacts/apidocs/schemas/ws_order_state_feed_selector_v1.md index 28813c9..e69de29 100644 --- a/artifacts/apidocs/schemas/ws_order_state_feed_selector_v1.md +++ b/artifacts/apidocs/schemas/ws_order_state_feed_selector_v1.md @@ -1,7 +0,0 @@ -!!! info "[WSOrderStateFeedSelectorV1](/../../schemas/ws_order_state_feed_selector_v1)" - Subscribes to a feed of order updates pertaining to orders made by your account.
      Unlike the Order Stream, this only streams state updates, drastically improving throughput, and latency.
      Each Order can be uniquely identified by its `order_id` or `client_order_id`.
      To subscribe to all orders, specify an empty `instrument` (eg. `2345123`).
      Otherwise, specify the `instrument` to only receive orders for that instrument (eg. `2345123-BTC_USDT_Perp`).
      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |sub_account_id
      `sa` |string|True|The subaccount ID to filter by| - |instrument
      `i` |string|False
      `'all'`|The instrument filter to apply.| diff --git a/artifacts/apidocs/schemas/ws_orderbook_levels_feed_data_v1.md b/artifacts/apidocs/schemas/ws_orderbook_levels_feed_data_v1.md index 22ebdae..e69de29 100644 --- a/artifacts/apidocs/schemas/ws_orderbook_levels_feed_data_v1.md +++ b/artifacts/apidocs/schemas/ws_orderbook_levels_feed_data_v1.md @@ -1,27 +0,0 @@ -!!! info "[WSOrderbookLevelsFeedDataV1](/../../schemas/ws_orderbook_levels_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` |OrderbookLevels|True|An orderbook levels object matching the request filter| - |prev_sequence_number
      `ps` |string|True|The previous sequence number that determines global message order within the specific stream| - ??? info "[OrderbookLevels](/../../schemas/orderbook_levels)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |event_time
      `et` |string|True|Time at which the event was emitted in unix nanoseconds| - |instrument
      `i` |string|True|The readable instrument name:
      • Perpetual: `ETH_USDT_Perp`
      • Future: `BTC_USDT_Fut_20Oct23`
      • Call: `ETH_USDT_Call_20Oct23_2800`
      • Put: `ETH_USDT_Put_20Oct23_2800`
      | - |bids
      `b` |[OrderbookLevel]|True|The list of best bids up till query depth| - |asks
      `a` |[OrderbookLevel]|True|The list of best asks up till query depth| - ??? info "[OrderbookLevel](/../../schemas/orderbook_level)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |price
      `p` |string|True|The price of the level, expressed in `9` decimals| - |size
      `s` |string|True|The number of assets offered, expressed in base asset decimal units| - |num_orders
      `no` |integer|True|The number of open orders at this level| - ??? info "[OrderbookLevel](/../../schemas/orderbook_level)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |price
      `p` |string|True|The price of the level, expressed in `9` decimals| - |size
      `s` |string|True|The number of assets offered, expressed in base asset decimal units| - |num_orders
      `no` |integer|True|The number of open orders at this level| diff --git a/artifacts/apidocs/schemas/ws_orderbook_levels_feed_selector_v1.md b/artifacts/apidocs/schemas/ws_orderbook_levels_feed_selector_v1.md index f091c62..e69de29 100644 --- a/artifacts/apidocs/schemas/ws_orderbook_levels_feed_selector_v1.md +++ b/artifacts/apidocs/schemas/ws_orderbook_levels_feed_selector_v1.md @@ -1,8 +0,0 @@ -!!! info "[WSOrderbookLevelsFeedSelectorV1](/../../schemas/ws_orderbook_levels_feed_selector_v1)" - Subscribes to aggregated orderbook updates for a single instrument. The `book.s` channel offers simpler integration. To experience higher publishing rates, please use the `book.d` channel.
      Unlike the `book.d` channel which publishes an initial snapshot, then only streams deltas after, the `book.s` channel publishes full snapshots at each feed.

      The Delta feed will work as follows:
      • On subscription, the server will send a full snapshot of all levels of the Orderbook.
      • After the snapshot, the server will only send levels that have changed in value.


      Subscription Pattern:
      • Delta - `instrument@rate`
      • Snapshot - `instrument@rate-depth`


      Field Semantics:
      • [DeltaOnly] If a level is not updated, level not published
      • If a level is updated, {size: '123'}
      • If a level is set to zero, {size: '0'}
      • Incoming levels will be published as soon as price moves
      • Outgoing levels will be published with `size = 0`

      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |instrument
      `i` |string|True|The readable instrument name:
      • Perpetual: `ETH_USDT_Perp`
      • Future: `BTC_USDT_Fut_20Oct23`
      • Call: `ETH_USDT_Call_20Oct23_2800`
      • Put: `ETH_USDT_Put_20Oct23_2800`
      | - |rate
      `r` |integer|True|The minimal rate at which we publish feeds (in milliseconds)
      Delta (50, 100, 500, 1000)
      Snapshot (500, 1000)| - |depth
      `d` |integer|False
      `'0'`|Depth of the order book to be retrieved
      Delta(0 - `unlimited`)
      Snapshot(10, 50, 100, 500)| diff --git a/artifacts/apidocs/schemas/ws_positions_feed_data_v1.md b/artifacts/apidocs/schemas/ws_positions_feed_data_v1.md index 34429db..e69de29 100644 --- a/artifacts/apidocs/schemas/ws_positions_feed_data_v1.md +++ b/artifacts/apidocs/schemas/ws_positions_feed_data_v1.md @@ -1,25 +0,0 @@ -!!! info "[WSPositionsFeedDataV1](/../../schemas/ws_positions_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` |Positions|True|A Position being created or updated matching the request filter| - |prev_sequence_number
      `ps` |string|True|The previous sequence number that determines global message order within the specific stream| - ??? info "[Positions](/../../schemas/positions)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |event_time
      `et` |string|True|Time at which the event was emitted in unix nanoseconds| - |sub_account_id
      `sa` |string|True|The sub account ID that participated in the trade| - |instrument
      `i` |string|True|The instrument being represented| - |size
      `s` |string|True|The size of the position, expressed in base asset decimal units. Negative for short positions| - |notional
      `n` |string|True|The notional value of the position, negative for short assets, expressed in quote asset decimal units| - |entry_price
      `ep` |string|True|The entry price of the position, expressed in `9` decimals
      Whenever increasing the size of a position, the entry price is updated to the new average entry price
      `new_entry_price = (old_entry_price * old_size + trade_price * trade_size) / (old_size + trade_size)`| - |exit_price
      `ep1` |string|True|The exit price of the position, expressed in `9` decimals
      Whenever decreasing the size of a position, the exit price is updated to the new average exit price
      `new_exit_price = (old_exit_price * old_exit_trade_size + trade_price * trade_size) / (old_exit_trade_size + trade_size)`| - |mark_price
      `mp` |string|True|The mark price of the position, expressed in `9` decimals| - |unrealized_pnl
      `up` |string|True|The unrealized PnL of the position, expressed in quote asset decimal units
      `unrealized_pnl = (mark_price - entry_price) * size`| - |realized_pnl
      `rp` |string|True|The realized PnL of the position, expressed in quote asset decimal units
      `realized_pnl = (exit_price - entry_price) * exit_trade_size`| - |total_pnl
      `tp` |string|True|The total PnL of the position, expressed in quote asset decimal units
      `total_pnl = realized_pnl + unrealized_pnl`| - |roi
      `r` |string|True|The ROI of the position, expressed as a percentage
      `roi = (total_pnl / (entry_price * abs(size))) * 100^`| - |quote_index_price
      `qi` |string|True|The index price of the quote currency. (reported in `USD`)| - |est_liquidation_price
      `el` |string|True|The estimated liquidation price| diff --git a/artifacts/apidocs/schemas/ws_positions_feed_selector_v1.md b/artifacts/apidocs/schemas/ws_positions_feed_selector_v1.md index 1766ac9..e69de29 100644 --- a/artifacts/apidocs/schemas/ws_positions_feed_selector_v1.md +++ b/artifacts/apidocs/schemas/ws_positions_feed_selector_v1.md @@ -1,7 +0,0 @@ -!!! info "[WSPositionsFeedSelectorV1](/../../schemas/ws_positions_feed_selector_v1)" - Subscribes to a feed of position updates. This happens when a trade is executed.
      To subscribe to all positions, specify an empty `instrument` (eg. `2345123`).
      Otherwise, specify the `instrument` to only receive positions for that instrument (eg. `2345123-BTC_USDT_Perp`).
      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |sub_account_id
      `sa` |string|True|The subaccount ID to filter by| - |instrument
      `i` |string|False
      `'all'`|The instrument filter to apply.| diff --git a/artifacts/apidocs/schemas/ws_subscribe_params.md b/artifacts/apidocs/schemas/ws_subscribe_params.md index e79ced4..e69de29 100644 --- a/artifacts/apidocs/schemas/ws_subscribe_params.md +++ b/artifacts/apidocs/schemas/ws_subscribe_params.md @@ -1,8 +0,0 @@ -!!! info "[WSSubscribeParams](/../../schemas/ws_subscribe_params)" - All V1 Websocket Subscription Requests are housed in this wrapper. You may specify a stream, and a list of feeds to subscribe to.
      When subscribing to the same primary selector again, the previous secondary selector will be replaced. See `Overview` page for more details.
      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |stream
      `s` |string|True|The channel to subscribe to (eg: ticker.s / ticker.d)| - |selectors
      `s1` |[string]|True|The list of feeds to subscribe to| - |use_global_sequence_number
      `ug` |boolean|False
      `false`|Whether to use the global sequence number for the stream| diff --git a/artifacts/apidocs/schemas/ws_subscribe_request_v1_legacy.md b/artifacts/apidocs/schemas/ws_subscribe_request_v1_legacy.md index 2e5924d..e69de29 100644 --- a/artifacts/apidocs/schemas/ws_subscribe_request_v1_legacy.md +++ b/artifacts/apidocs/schemas/ws_subscribe_request_v1_legacy.md @@ -1,10 +0,0 @@ -!!! info "[WSSubscribeRequestV1Legacy](/../../schemas/ws_subscribe_request_v1_legacy)" - All V1 Websocket Requests are housed in this wrapper. You may specify a stream, and a list of feeds to subscribe to.
      If a `request_id` is supplied in this JSON RPC request, it will be propagated back to any relevant JSON RPC responses (including error).
      When subscribing to the same primary selector again, the previous secondary selector will be replaced. See `Overview` page for more details.
      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |request_id
      `ri` |integer|False
      `0`|Optional Field which is used to match the response by the client.
      If not passed, this field will not be returned| - |stream
      `s` |string|True|The channel to subscribe to (eg: ticker.s / ticker.d)| - |feed
      `f` |[string]|True|The list of feeds to subscribe to| - |method
      `m` |string|True|The method to use for the request (eg: subscribe / unsubscribe)| - |is_full
      `if` |boolean|False
      `false`|Whether the request is for full data or lite data| diff --git a/artifacts/apidocs/schemas/ws_subscribe_response_v1_legacy.md b/artifacts/apidocs/schemas/ws_subscribe_response_v1_legacy.md index dce4145..e69de29 100644 --- a/artifacts/apidocs/schemas/ws_subscribe_response_v1_legacy.md +++ b/artifacts/apidocs/schemas/ws_subscribe_response_v1_legacy.md @@ -1,12 +0,0 @@ -!!! info "[WSSubscribeResponseV1Legacy](/../../schemas/ws_subscribe_response_v1_legacy)" - All V1 Websocket Responses are housed in this wrapper. It returns a confirmation of the JSON RPC subscribe request.
      If a `request_id` is supplied in the JSON RPC request, it will be propagated back in this JSON RPC response.
      To ensure you always know if you have missed any payloads, GRVT servers apply the following heuristics to sequence numbers:
      • All snapshot payloads will have a sequence number of `0`. All delta payloads will have a sequence number of `1+`. So its easy to distinguish between snapshots, and deltas
      • Num snapshots returned in Response (per stream): You can ensure that you received the right number of snapshots
      • First sequence number returned in Response (per stream): You can ensure that you received the first stream, without gaps from snapshots
      • Sequence numbers should always monotonically increase by `1`. If it decreases, or increases by more than `1`. Please reconnect
      • Duplicate sequence numbers are possible due to network retries. If you receive a duplicate, please ignore it, or idempotently re-update it.

      When subscribing to the same primary selector again, the previous secondary selector will be replaced. See `Overview` page for more details.
      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |request_id
      `ri` |integer|False
      `0`|Optional Field which is used to match the response by the client.
      If not passed, this field will not be returned| - |stream
      `s` |string|True|The channel to subscribe to (eg: ticker.s / ticker.d)| - |subs
      `s1` |[string]|True|The list of feeds subscribed to| - |unsubs
      `u` |[string]|True|The list of feeds unsubscribed from| - |num_snapshots
      `ns` |[integer]|True|The number of snapshot payloads to expect for each subscribed feed. Returned in same order as `subs`| - |first_sequence_number
      `fs` |[string]|True|The first sequence number to expect for each subscribed feed. Returned in same order as `subs`| - |latest_sequence_number
      `ls` |[string]|True|The sequence number of the most recent message in the stream. Next received sequence number must be larger than this one. Returned in same order as `subs`| diff --git a/artifacts/apidocs/schemas/ws_subscribe_result.md b/artifacts/apidocs/schemas/ws_subscribe_result.md index 084eb60..e69de29 100644 --- a/artifacts/apidocs/schemas/ws_subscribe_result.md +++ b/artifacts/apidocs/schemas/ws_subscribe_result.md @@ -1,11 +0,0 @@ -!!! info "[WSSubscribeResult](/../../schemas/ws_subscribe_result)" - To ensure you always know if you have missed any payloads, GRVT servers apply the following heuristics to sequence numbers:
      • All snapshot payloads will have a sequence number of `0`. All delta payloads will have a sequence number of `1+`. So its easy to distinguish between snapshots, and deltas
      • Num snapshots returned in Response (per stream): You can ensure that you received the right number of snapshots
      • First sequence number returned in Response (per stream): You can ensure that you received the first stream, without gaps from snapshots
      • Sequence numbers should always monotonically increase by `1`. If it decreases, or increases by more than `1`. Please reconnect
      • Duplicate sequence numbers are possible due to network retries. If you receive a duplicate, please ignore it, or idempotently re-update it.

      When subscribing to the same primary selector again, the previous secondary selector will be replaced. See `Overview` page for more details.
      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |stream
      `s` |string|True|The channel to subscribe to (eg: ticker.s / ticker.d)| - |subs
      `s1` |[string]|True|The list of feeds subscribed to| - |unsubs
      `u` |[string]|True|The list of feeds unsubscribed from| - |num_snapshots
      `ns` |[integer]|True|The number of snapshot payloads to expect for each subscribed feed. Returned in same order as `subs`| - |first_sequence_number
      `fs` |[string]|True|The first sequence number to expect for each subscribed feed. Returned in same order as `subs`| - |latest_sequence_number
      `ls` |[string]|True|The sequence number of the most recent message in the stream. Next received sequence number must be larger than this one. Returned in same order as `subs`| diff --git a/artifacts/apidocs/schemas/ws_ticker_feed_data_v1.md b/artifacts/apidocs/schemas/ws_ticker_feed_data_v1.md index f8dc199..e69de29 100644 --- a/artifacts/apidocs/schemas/ws_ticker_feed_data_v1.md +++ b/artifacts/apidocs/schemas/ws_ticker_feed_data_v1.md @@ -1,37 +0,0 @@ -!!! info "[WSTickerFeedDataV1](/../../schemas/ws_ticker_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` |Ticker|True|A ticker matching the request filter| - |prev_sequence_number
      `ps` |string|True|The previous sequence number that determines global message order within the specific stream| - ??? info "[Ticker](/../../schemas/ticker)" - Derived data such as the below, will not be included by default:
      - 24 hour volume (`buyVolume + sellVolume`)
      - 24 hour taker buy/sell ratio (`buyVolume / sellVolume`)
      - 24 hour average trade price (`volumeQ / volumeU`)
      - 24 hour average trade volume (`volume / trades`)
      - 24 hour percentage change (`24hStatChange / 24hStat`)
      - 48 hour statistics (`2 * 24hStat - 24hStatChange`)

      To query for an extended ticker payload, leverage the `greeks` and the `derived` flags.
      Ticker extensions are currently under design to offer you more convenience.
      These flags are only supported on the `Ticker Snapshot` WS endpoint, and on the `Ticker` API endpoint.

      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |event_time
      `et` |string|False
      `None`|Time at which the event was emitted in unix nanoseconds| - |instrument
      `i` |string|False
      `None`|The readable instrument name:
      • Perpetual: `ETH_USDT_Perp`
      • Future: `BTC_USDT_Fut_20Oct23`
      • Call: `ETH_USDT_Call_20Oct23_2800`
      • Put: `ETH_USDT_Put_20Oct23_2800`
      | - |mark_price
      `mp` |string|False
      `None`|The mark price of the instrument, expressed in `9` decimals| - |index_price
      `ip` |string|False
      `None`|The index price of the instrument, expressed in `9` decimals| - |last_price
      `lp` |string|False
      `None`|The last traded price of the instrument (also close price), expressed in `9` decimals| - |last_size
      `ls` |string|False
      `None`|The number of assets traded in the last trade, expressed in base asset decimal units| - |mid_price
      `mp1` |string|False
      `None`|The mid price of the instrument, expressed in `9` decimals| - |best_bid_price
      `bb` |string|False
      `None`|The best bid price of the instrument, expressed in `9` decimals| - |best_bid_size
      `bb1` |string|False
      `None`|The number of assets offered on the best bid price of the instrument, expressed in base asset decimal units| - |best_ask_price
      `ba` |string|False
      `None`|The best ask price of the instrument, expressed in `9` decimals| - |best_ask_size
      `ba1` |string|False
      `None`|The number of assets offered on the best ask price of the instrument, expressed in base asset decimal units| - |funding_rate_8h_curr
      `fr` |string|False
      `None`|The current funding rate of the instrument, expressed in percentage points| - |funding_rate_8h_avg
      `fr1` |string|False
      `None`|The average funding rate of the instrument (over last 8h), expressed in percentage points| - |interest_rate
      `ir` |string|False
      `None`|The interest rate of the underlying, expressed in centibeeps (1/100th of a basis point)| - |forward_price
      `fp` |string|False
      `None`|[Options] The forward price of the option, expressed in `9` decimals| - |buy_volume_24h_b
      `bv` |string|False
      `None`|The 24 hour taker buy volume of the instrument, expressed in base asset decimal units| - |sell_volume_24h_b
      `sv` |string|False
      `None`|The 24 hour taker sell volume of the instrument, expressed in base asset decimal units| - |buy_volume_24h_q
      `bv1` |string|False
      `None`|The 24 hour taker buy volume of the instrument, expressed in quote asset decimal units| - |sell_volume_24h_q
      `sv1` |string|False
      `None`|The 24 hour taker sell volume of the instrument, expressed in quote asset decimal units| - |high_price
      `hp` |string|False
      `None`|The 24 hour highest traded price of the instrument, expressed in `9` decimals| - |low_price
      `lp1` |string|False
      `None`|The 24 hour lowest traded price of the instrument, expressed in `9` decimals| - |open_price
      `op` |string|False
      `None`|The 24 hour first traded price of the instrument, expressed in `9` decimals| - |open_interest
      `oi` |string|False
      `None`|The open interest in the instrument, expressed in base asset decimal units| - |long_short_ratio
      `ls1` |string|False
      `None`|The ratio of accounts that are net long vs net short on this instrument| diff --git a/artifacts/apidocs/schemas/ws_ticker_feed_selector_v1.md b/artifacts/apidocs/schemas/ws_ticker_feed_selector_v1.md index 0f4d5af..e69de29 100644 --- a/artifacts/apidocs/schemas/ws_ticker_feed_selector_v1.md +++ b/artifacts/apidocs/schemas/ws_ticker_feed_selector_v1.md @@ -1,7 +0,0 @@ -!!! info "[WSTickerFeedSelectorV1](/../../schemas/ws_ticker_feed_selector_v1)" - Subscribes to a ticker feed for a single instrument. The `ticker.s` channel offers simpler integration. To experience higher publishing rates, please use the `ticker.d` channel.
      Unlike the `ticker.d` channel which publishes an initial snapshot, then only streams deltas after, the `ticker.s` channel publishes full snapshots at each feed.

      The Delta feed will work as follows:
      • On subscription, the server will send a full snapshot of the ticker.
      • After the snapshot, the server will only send deltas of the ticker.
      • The server will send a delta if any of the fields in the ticker have changed.


      Field Semantics:
      • [DeltaOnly] If a field is not updated, {}
      • If a field is updated, {field: '123'}
      • If a field is set to zero, {field: '0'}
      • If a field is set to null, {field: ''}

      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |instrument
      `i` |string|True|The readable instrument name:
      • Perpetual: `ETH_USDT_Perp`
      • Future: `BTC_USDT_Fut_20Oct23`
      • Call: `ETH_USDT_Call_20Oct23_2800`
      • Put: `ETH_USDT_Put_20Oct23_2800`
      | - |rate
      `r` |integer|True|The minimal rate at which we publish feeds (in milliseconds)
      Delta (100, 200, 500, 1000, 5000)
      Snapshot (500, 1000, 5000)| diff --git a/artifacts/apidocs/schemas/ws_trade_feed_data_v1.md b/artifacts/apidocs/schemas/ws_trade_feed_data_v1.md index e1c1d55..e69de29 100644 --- a/artifacts/apidocs/schemas/ws_trade_feed_data_v1.md +++ b/artifacts/apidocs/schemas/ws_trade_feed_data_v1.md @@ -1,31 +0,0 @@ -!!! info "[WSTradeFeedDataV1](/../../schemas/ws_trade_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` |Trade|True|A public trade matching the request filter| - |prev_sequence_number
      `ps` |string|True|The previous sequence number that determines global message order within the specific stream| - ??? info "[Trade](/../../schemas/trade)" - All private RFQs and Private AXEs will be filtered out from the responses
      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |event_time
      `et` |string|True|Time at which the event was emitted in unix nanoseconds| - |instrument
      `i` |string|True|The readable instrument name:
      • Perpetual: `ETH_USDT_Perp`
      • Future: `BTC_USDT_Fut_20Oct23`
      • Call: `ETH_USDT_Call_20Oct23_2800`
      • Put: `ETH_USDT_Put_20Oct23_2800`
      | - |is_taker_buyer
      `it` |boolean|True|If taker was the buyer on the trade| - |size
      `s` |string|True|The number of assets being traded, expressed in base asset decimal units| - |price
      `p` |string|True|The traded price, expressed in `9` decimals| - |mark_price
      `mp` |string|True|The mark price of the instrument at point of trade, expressed in `9` decimals| - |index_price
      `ip` |string|True|The index price of the instrument at point of trade, expressed in `9` decimals| - |interest_rate
      `ir` |string|True|The interest rate of the underlying at point of trade, expressed in centibeeps (1/100th of a basis point)| - |forward_price
      `fp` |string|True|[Options] The forward price of the option at point of trade, expressed in `9` decimals| - |trade_id
      `ti` |string|True|A trade identifier, globally unique, and monotonically increasing (not by `1`).
      All trades sharing a single taker execution share the same first component (before `-`), and `event_time`.
      `trade_id` is guaranteed to be consistent across MarketData `Trade` and Trading `Fill`.| - |venue
      `v` |Venue|True|The venue where the trade occurred| - ??? info "[Venue](/../../schemas/venue)" - The list of Trading Venues that are supported on the GRVT exchange
      - - |Value| Description | - |-|-| - |`ORDERBOOK` = 1|the trade is cleared on the orderbook venue| - |`RFQ` = 2|the trade is cleared on the RFQ venue| diff --git a/artifacts/apidocs/schemas/ws_trade_feed_selector_v1.md b/artifacts/apidocs/schemas/ws_trade_feed_selector_v1.md index bc3e2fd..e69de29 100644 --- a/artifacts/apidocs/schemas/ws_trade_feed_selector_v1.md +++ b/artifacts/apidocs/schemas/ws_trade_feed_selector_v1.md @@ -1,7 +0,0 @@ -!!! info "[WSTradeFeedSelectorV1](/../../schemas/ws_trade_feed_selector_v1)" - Subscribes to a stream of Public Trades for an instrument.
      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |instrument
      `i` |string|True|The readable instrument name:
      • Perpetual: `ETH_USDT_Perp`
      • Future: `BTC_USDT_Fut_20Oct23`
      • Call: `ETH_USDT_Call_20Oct23_2800`
      • Put: `ETH_USDT_Put_20Oct23_2800`
      | - |limit
      `l` |integer|True|The limit to query for. Valid values are (50, 200, 500, 1000). Default is 50| diff --git a/artifacts/apidocs/schemas/ws_transfer_feed_data_v1.md b/artifacts/apidocs/schemas/ws_transfer_feed_data_v1.md index c62c1f5..e69de29 100644 --- a/artifacts/apidocs/schemas/ws_transfer_feed_data_v1.md +++ b/artifacts/apidocs/schemas/ws_transfer_feed_data_v1.md @@ -1,63 +0,0 @@ -!!! info "[WSTransferFeedDataV1](/../../schemas/ws_transfer_feed_data_v1)" - Subscribes to a feed of transfer updates.
      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |stream
      `s` |string|True|The websocket channel to which the response is sent| - |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` |TransferHistory|True|The transfer history matching the requested filters| - |prev_sequence_number
      `ps` |string|True|The previous sequence number that determines global message order within the specific stream| - ??? info "[TransferHistory](/../../schemas/transfer_history)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |tx_id
      `ti` |string|True|The transaction ID of the transfer| - |from_account_id
      `fa` |string|True|The account to transfer from| - |from_sub_account_id
      `fs` |string|True|The subaccount to transfer from (0 if transferring from main account)| - |to_account_id
      `ta` |string|True|The account to deposit into| - |to_sub_account_id
      `ts` |string|True|The subaccount to transfer to (0 if transferring to main account)| - |currency
      `c` |Currency|True|The token currency to transfer| - |num_tokens
      `nt` |string|True|The number of tokens to transfer| - |signature
      `s` |Signature|True|The signature of the transfer| - |event_time
      `et` |string|True|The timestamp of the transfer in unix nanoseconds| - |transfer_type
      `tt` |TransferType|True|The type of transfer| - |transfer_metadata
      `tm` |string|True|The metadata of the transfer| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
      - - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| - ??? 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 "[TransferType](/../../schemas/transfer_type)" - |Value| Description | - |-|-| - |`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| diff --git a/artifacts/apidocs/schemas/ws_transfer_feed_selector_v1.md b/artifacts/apidocs/schemas/ws_transfer_feed_selector_v1.md index 5900b5e..e69de29 100644 --- a/artifacts/apidocs/schemas/ws_transfer_feed_selector_v1.md +++ b/artifacts/apidocs/schemas/ws_transfer_feed_selector_v1.md @@ -1,7 +0,0 @@ -!!! info "[WSTransferFeedSelectorV1](/../../schemas/ws_transfer_feed_selector_v1)" - Subscribes to a feed of transfers. This will execute when there is any transfer to or from the selected account.
      To subscribe to a main account, specify the account ID (eg. `0x9fe3758b67ce7a2875ee4b452f01a5282d84ed8a`).
      To subscribe to a sub account, specify the main account and the sub account dash separated (eg. `0x9fe3758b67ce7a2875ee4b452f01a5282d84ed8a-1920109784202388`).
      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |main_account_id
      `ma` |string|True|The main account ID to request for| - |sub_account_id
      `sa` |string|False
      `'0'`|The sub account ID to request for| diff --git a/artifacts/apidocs/schemas/ws_unsubscribe_all_params.md b/artifacts/apidocs/schemas/ws_unsubscribe_all_params.md index 1e1636d..e69de29 100644 --- a/artifacts/apidocs/schemas/ws_unsubscribe_all_params.md +++ b/artifacts/apidocs/schemas/ws_unsubscribe_all_params.md @@ -1,5 +0,0 @@ -!!! info "[WSUnsubscribeAllParams](/../../schemas/ws_unsubscribe_all_params)" - All V1 Websocket Unsubscription Request to unsubscribe from all active websocket streams.
      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| diff --git a/artifacts/apidocs/schemas/ws_unsubscribe_all_result.md b/artifacts/apidocs/schemas/ws_unsubscribe_all_result.md index aae2c8e..e69de29 100644 --- a/artifacts/apidocs/schemas/ws_unsubscribe_all_result.md +++ b/artifacts/apidocs/schemas/ws_unsubscribe_all_result.md @@ -1,11 +0,0 @@ -!!! info "[WSUnsubscribeAllResult](/../../schemas/ws_unsubscribe_all_result)" - Returns a list of all rooms the client has unsubscribed from.
      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |stream_reference
      `sr` |[StreamReference]|True|The list of stream references unsubscribed from| - ??? info "[StreamReference](/../../schemas/stream_reference)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |stream
      `s` |string|True|The channel to subscribe to (eg: ticker.s / ticker.d)| - |selectors
      `s1` |[string]|True|The list of selectors for the stream| diff --git a/artifacts/apidocs/schemas/ws_unsubscribe_params.md b/artifacts/apidocs/schemas/ws_unsubscribe_params.md index 071d96c..e69de29 100644 --- a/artifacts/apidocs/schemas/ws_unsubscribe_params.md +++ b/artifacts/apidocs/schemas/ws_unsubscribe_params.md @@ -1,8 +0,0 @@ -!!! info "[WSUnsubscribeParams](/../../schemas/ws_unsubscribe_params)" - All V1 Websocket Unsubscription Requests are housed in this wrapper. You may specify a stream, and a list of feeds to unsubscribe from.
      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |stream
      `s` |string|True|The channel to unsubscribe from (eg: ticker.s / ticker.d)| - |selectors
      `s1` |[string]|True|The list of feeds to unsubscribe from| - |use_global_sequence_number
      `ug` |boolean|False
      `false`|Whether to use the global sequence number for the stream| diff --git a/artifacts/apidocs/schemas/ws_unsubscribe_result.md b/artifacts/apidocs/schemas/ws_unsubscribe_result.md index 09bd37b..e69de29 100644 --- a/artifacts/apidocs/schemas/ws_unsubscribe_result.md +++ b/artifacts/apidocs/schemas/ws_unsubscribe_result.md @@ -1,7 +0,0 @@ -!!! info "[WSUnsubscribeResult](/../../schemas/ws_unsubscribe_result)" - Returns a confirmation of all unsubscribes
      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |stream
      `s` |string|True|The channel to subscribe to (eg: ticker.s / ticker.d)| - |unsubs
      `u` |[string]|True|The list of feeds unsubscribed from| diff --git a/artifacts/apidocs/schemas/ws_withdrawal_feed_data_v1.md b/artifacts/apidocs/schemas/ws_withdrawal_feed_data_v1.md index 2a55bca..e69de29 100644 --- a/artifacts/apidocs/schemas/ws_withdrawal_feed_data_v1.md +++ b/artifacts/apidocs/schemas/ws_withdrawal_feed_data_v1.md @@ -1,51 +0,0 @@ -!!! info "[WSWithdrawalFeedDataV1](/../../schemas/ws_withdrawal_feed_data_v1)" - Subscribes to a feed of withdrawal updates.
      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |stream
      `s` |string|True|The websocket channel to which the response is sent| - |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` |Withdrawal|True|The Withdrawal object| - |prev_sequence_number
      `ps` |string|True|The previous sequence number that determines global message order within the specific stream| - ??? info "[Withdrawal](/../../schemas/withdrawal)" - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |from_account_id
      `fa` |string|True|The subaccount to withdraw from| - |to_eth_address
      `te` |string|True|The ethereum address to withdraw to| - |currency
      `c` |Currency|True|The token currency to withdraw| - |num_tokens
      `nt` |string|True|The number of tokens to withdraw| - |signature
      `s` |Signature|True|The signature of the withdrawal| - ??? info "[Currency](/../../schemas/currency)" - The list of Currencies that are supported on the GRVT exchange
      - - |Value| Description | - |-|-| - |`USD` = 1|the USD fiat currency| - |`USDC` = 2|the USDC token| - |`USDT` = 3|the USDT token| - |`ETH` = 4|the ETH token| - |`BTC` = 5|the BTC token| - |`SOL` = 6|the SOL token| - |`ARB` = 7|the ARB token| - |`BNB` = 8|the BNB token| - |`ZK` = 9|the ZK token| - |`POL` = 10|the POL token| - |`OP` = 11|the OP token| - |`ATOM` = 12|the ATOM token| - |`KPEPE` = 13|the 1000PEPE token| - |`TON` = 14|the TON token| - |`XRP` = 15|the XRP token| - |`TRUMP` = 20|the TRUMP token| - |`SUI` = 21|the SUI token| - |`FARTCOIN` = 28|the FARTCOIN token| - |`BERA` = 35|the BERA token| - ??? 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.| diff --git a/artifacts/apidocs/schemas/ws_withdrawal_feed_selector_v1.md b/artifacts/apidocs/schemas/ws_withdrawal_feed_selector_v1.md index 86e6511..e69de29 100644 --- a/artifacts/apidocs/schemas/ws_withdrawal_feed_selector_v1.md +++ b/artifacts/apidocs/schemas/ws_withdrawal_feed_selector_v1.md @@ -1,6 +0,0 @@ -!!! info "[WSWithdrawalFeedSelectorV1](/../../schemas/ws_withdrawal_feed_selector_v1)" - Subscribes to a feed of withdrawals. This will execute when there is any withdrawal from the selected account.
      To subscribe to a main account, specify the account ID (eg. `0x9fe3758b67ce7a2875ee4b452f01a5282d84ed8a`).
      - - |Name
      `Lite`|Type|Required
      `Default`| Description | - |-|-|-|-| - |main_account_id
      `ma` |string|True|The main account ID to request for| diff --git a/src/codegen/apidocs/apidocs.py b/src/codegen/apidocs/apidocs.py index 341c8a1..4e58a0d 100644 --- a/src/codegen/apidocs/apidocs.py +++ b/src/codegen/apidocs/apidocs.py @@ -707,7 +707,7 @@ def import_struct_schema(md: MarkdownWriter, struct: Struct) -> None: def write_struct_schema( ctx: CodegenCtx, md: MarkdownWriter, struct: Struct, is_root: bool ) -> None: - if struct.name in IGNORE_STRUCTS: + if struct.name in IGNORE_STRUCTS or IGNORE_FIELDS_ANY_PATH: return # Header path = "/../../schemas/" + inflection.underscore(struct.name).lower() From 7099864ecc0e9fc536bcbaedefd492e650fb1f45 Mon Sep 17 00:00:00 2001 From: keithang-grvt Date: Sun, 23 Feb 2025 15:18:59 +0800 Subject: [PATCH 10/11] fix field ignoring --- src/codegen/apidocs/apidocs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/codegen/apidocs/apidocs.py b/src/codegen/apidocs/apidocs.py index 4e58a0d..1d475a9 100644 --- a/src/codegen/apidocs/apidocs.py +++ b/src/codegen/apidocs/apidocs.py @@ -707,7 +707,7 @@ def import_struct_schema(md: MarkdownWriter, struct: Struct) -> None: def write_struct_schema( ctx: CodegenCtx, md: MarkdownWriter, struct: Struct, is_root: bool ) -> None: - if struct.name in IGNORE_STRUCTS or IGNORE_FIELDS_ANY_PATH: + if struct.name in IGNORE_STRUCTS or struct.name in IGNORE_FIELDS_ANY_PATH: return # Header path = "/../../schemas/" + inflection.underscore(struct.name).lower() From e765c9249345c8ec302c03acb97ad3b9f2739d38 Mon Sep 17 00:00:00 2001 From: keithang-grvt Date: Sun, 23 Feb 2025 15:19:47 +0800 Subject: [PATCH 11/11] [RFC] Update API docs and specs --- artifacts/apidocs/schemas/ack.md | 4 + artifacts/apidocs/schemas/ack_response.md | 10 ++ .../schemas/aggregated_account_summary.md | 36 ++++++ ...api_aggregated_account_summary_response.md | 42 +++++++ .../schemas/api_cancel_all_orders_request.md | 66 ++++++++++ .../schemas/api_cancel_all_orders_response.md | 4 + .../api_cancel_on_disconnect_request.md | 7 ++ .../schemas/api_cancel_order_request.md | 9 ++ .../schemas/api_cancel_order_response.md | 110 +++++++++++++++++ .../schemas/api_candlestick_request.md | 40 ++++++ .../schemas/api_candlestick_response.md | 20 +++ .../schemas/api_create_order_request.md | 112 +++++++++++++++++ .../schemas/api_create_order_response.md | 110 +++++++++++++++++ .../schemas/api_deposit_history_request.md | 34 ++++++ .../schemas/api_deposit_history_response.md | 40 ++++++ .../schemas/api_fill_history_request.md | 70 +++++++++++ .../schemas/api_fill_history_response.md | 38 ++++++ ...pi_find_ecosystem_epoch_metric_response.md | 17 +++ ...api_find_ecosystem_leaderboard_response.md | 11 ++ .../api_find_first_epoch_metric_response.md | 25 ++++ .../api_find_trader_epoch_metric_response.md | 12 ++ .../api_find_trader_leaderboard_response.md | 11 ++ .../api_funding_account_summary_response.md | 44 +++++++ .../api_funding_payment_history_request.md | 11 ++ .../api_funding_payment_history_response.md | 38 ++++++ .../schemas/api_funding_rate_request.md | 10 ++ .../schemas/api_funding_rate_response.md | 12 ++ .../api_get_all_initial_leverage_request.md | 6 + .../api_get_all_initial_leverage_response.md | 13 ++ .../api_get_all_instruments_request.md | 6 + .../api_get_all_instruments_response.md | 92 ++++++++++++++ .../api_get_ecosystem_leaderboard_request.md | 5 + .../api_get_ecosystem_leaderboard_response.md | 20 +++ ...pi_get_ecosystem_referral_stat_response.md | 7 ++ .../api_get_filtered_instruments_request.md | 67 ++++++++++ .../api_get_filtered_instruments_response.md | 92 ++++++++++++++ .../schemas/api_get_instrument_request.md | 6 + .../schemas/api_get_instrument_response.md | 92 ++++++++++++++ .../api_get_latest_lp_snapshot_request.md | 38 ++++++ .../api_get_latest_lp_snapshot_response.md | 14 +++ .../api_get_list_epoch_badge_response.md | 54 +++++++++ .../api_get_list_flat_referral_request.md | 9 ++ .../api_get_list_flat_referral_response.md | 19 +++ .../api_get_list_reward_epoch_response.md | 31 +++++ .../schemas/api_get_lp_info_request.md | 38 ++++++ .../schemas/api_get_lp_info_response.md | 11 ++ .../schemas/api_get_lp_leaderboard_request.md | 40 ++++++ .../api_get_lp_leaderboard_response.md | 10 ++ .../schemas/api_get_lp_point_request.md | 39 ++++++ .../schemas/api_get_lp_point_response.md | 11 ++ .../apidocs/schemas/api_get_order_request.md | 8 ++ .../apidocs/schemas/api_get_order_response.md | 110 +++++++++++++++++ .../schemas/api_get_trader_stat_response.md | 4 + .../api_get_user_ecosystem_point_request.md | 6 + .../api_get_user_ecosystem_point_response.md | 20 +++ ..._verified_ecosystem_leaderboard_request.md | 5 + .../api_latest_snap_sub_accounts_request.md | 6 + .../api_latest_snap_sub_accounts_response.md | 95 +++++++++++++++ ...list_aggregated_account_summary_request.md | 4 + ...ist_aggregated_account_summary_response.md | 46 +++++++ .../schemas/api_mini_ticker_request.md | 6 + .../schemas/api_mini_ticker_response.md | 18 +++ .../schemas/api_open_orders_request.md | 64 ++++++++++ .../schemas/api_open_orders_response.md | 112 +++++++++++++++++ .../schemas/api_order_history_request.md | 70 +++++++++++ .../schemas/api_order_history_response.md | 111 +++++++++++++++++ .../schemas/api_order_state_request.md | 8 ++ .../schemas/api_order_state_response.md | 54 +++++++++ .../schemas/api_orderbook_levels_request.md | 7 ++ .../schemas/api_orderbook_levels_response.md | 23 ++++ .../apidocs/schemas/api_positions_request.md | 66 ++++++++++ .../apidocs/schemas/api_positions_response.md | 21 ++++ .../schemas/api_pre_deposit_check_request.md | 35 ++++++ .../schemas/api_pre_deposit_check_response.md | 29 +++++ .../schemas/api_pre_order_check_request.md | 113 +++++++++++++++++ .../schemas/api_pre_order_check_response.md | 42 +++++++ .../api_query_flat_referral_stat_request.md | 6 + .../api_query_flat_referral_stat_response.md | 5 + ...resolve_epoch_ecosystem_metric_response.md | 6 + .../api_set_initial_leverage_request.md | 8 ++ .../api_set_initial_leverage_response.md | 6 + .../apidocs/schemas/api_settlement_price.md | 55 +++++++++ .../schemas/api_settlement_price_request.md | 59 +++++++++ .../schemas/api_settlement_price_response.md | 60 +++++++++ .../api_socialized_loss_status_response.md | 7 ++ .../api_sub_account_history_request.md | 10 ++ .../api_sub_account_history_response.md | 96 +++++++++++++++ .../api_sub_account_summary_request.md | 4 + .../api_sub_account_summary_response.md | 97 +++++++++++++++ ...i_sub_account_trade_aggregation_request.md | 20 +++ ..._sub_account_trade_aggregation_response.md | 15 +++ .../schemas/api_ticker_feed_data_v1.md | 33 +++++ .../apidocs/schemas/api_ticker_request.md | 6 + .../apidocs/schemas/api_ticker_response.md | 33 +++++ .../schemas/api_trade_history_request.md | 10 ++ .../schemas/api_trade_history_response.md | 28 +++++ .../apidocs/schemas/api_trade_request.md | 7 ++ .../apidocs/schemas/api_trade_response.md | 27 +++++ .../schemas/api_transfer_history_request.md | 35 ++++++ .../schemas/api_transfer_history_response.md | 58 +++++++++ .../apidocs/schemas/api_transfer_request.md | 53 ++++++++ .../schemas/api_withdrawal_history_request.md | 34 ++++++ .../api_withdrawal_history_response.md | 48 ++++++++ .../apidocs/schemas/api_withdrawal_request.md | 43 +++++++ .../apidocs/schemas/approximate_lp_point.md | 6 + .../schemas/approximate_lp_snapshot.md | 10 ++ artifacts/apidocs/schemas/asset_max_qty.md | 6 + .../apidocs/schemas/cancel_status_feed.md | 46 +++++++ artifacts/apidocs/schemas/candlestick.md | 15 +++ .../schemas/claim_ecosystem_badge_response.md | 54 +++++++++ artifacts/apidocs/schemas/deposit.md | 31 +++++ artifacts/apidocs/schemas/deposit_history.md | 35 ++++++ .../schemas/ecosystem_leaderboard_user.md | 7 ++ artifacts/apidocs/schemas/ecosystem_metric.md | 8 ++ artifacts/apidocs/schemas/ecosystem_point.md | 16 +++ artifacts/apidocs/schemas/empty_request.md | 5 + artifacts/apidocs/schemas/epoch_badge.md | 50 ++++++++ .../schemas/epoch_badge_point_distribution.md | 33 +++++ artifacts/apidocs/schemas/error.md | 7 ++ artifacts/apidocs/schemas/fill.md | 33 +++++ artifacts/apidocs/schemas/flat_referral.md | 15 +++ .../schemas/funding_account_summary.md | 38 ++++++ artifacts/apidocs/schemas/funding_payment.md | 33 +++++ artifacts/apidocs/schemas/funding_rate.md | 7 ++ .../get_claimable_ecosystem_badge_response.md | 56 +++++++++ .../schemas/initial_leverage_result.md | 7 ++ artifacts/apidocs/schemas/instrument.md | 88 ++++++++++++++ artifacts/apidocs/schemas/jsonrpc_request.md | 9 ++ artifacts/apidocs/schemas/jsonrpc_response.md | 17 +++ artifacts/apidocs/schemas/lp_point.md | 6 + artifacts/apidocs/schemas/lp_snapshot.md | 11 ++ artifacts/apidocs/schemas/mini_ticker.md | 14 +++ artifacts/apidocs/schemas/order.md | 106 ++++++++++++++++ artifacts/apidocs/schemas/order_leg.md | 7 ++ artifacts/apidocs/schemas/order_metadata.md | 12 ++ artifacts/apidocs/schemas/order_state.md | 50 ++++++++ artifacts/apidocs/schemas/order_state_feed.md | 56 +++++++++ artifacts/apidocs/schemas/orderbook_level.md | 6 + artifacts/apidocs/schemas/orderbook_levels.md | 19 +++ artifacts/apidocs/schemas/positions.md | 17 +++ .../apidocs/schemas/pre_order_check_result.md | 38 ++++++ ..._epoch_badge_point_distribution_request.md | 13 ++ ...epoch_badge_point_distribution_response.md | 37 ++++++ .../schemas/query_epoch_badge_request.md | 16 +++ .../schemas/query_epoch_badge_response.md | 55 +++++++++ .../query_get_latest_lp_snapshot_response.md | 15 +++ .../apidocs/schemas/reward_epoch_info.md | 13 ++ artifacts/apidocs/schemas/signature.md | 9 ++ artifacts/apidocs/schemas/spot_balance.md | 30 +++++ artifacts/apidocs/schemas/stream_reference.md | 5 + artifacts/apidocs/schemas/sub_account.md | 91 ++++++++++++++ .../schemas/sub_account_trade_aggregation.md | 10 ++ artifacts/apidocs/schemas/ticker.md | 29 +++++ .../apidocs/schemas/tpsl_order_metadata.md | 15 +++ artifacts/apidocs/schemas/trade.md | 23 ++++ .../schemas/trader_leaderboard_user.md | 7 ++ artifacts/apidocs/schemas/trader_metric.md | 5 + artifacts/apidocs/schemas/transfer_history.md | 53 ++++++++ artifacts/apidocs/schemas/withdrawal.md | 41 +++++++ .../apidocs/schemas/withdrawal_history.md | 43 +++++++ .../apidocs/schemas/ws_cancel_feed_data_v1.md | 54 +++++++++ .../schemas/ws_cancel_feed_selector_v1.md | 6 + .../schemas/ws_candlestick_feed_data_v1.md | 23 ++++ .../ws_candlestick_feed_selector_v1.md | 36 ++++++ .../schemas/ws_deposit_feed_data_v1.md | 41 +++++++ .../schemas/ws_deposit_feed_selector_v1.md | 6 + .../apidocs/schemas/ws_fill_feed_data_v1.md | 41 +++++++ .../schemas/ws_fill_feed_selector_v1.md | 7 ++ .../apidocs/schemas/ws_list_streams_params.md | 5 + .../apidocs/schemas/ws_list_streams_result.md | 11 ++ .../schemas/ws_mini_ticker_feed_data_v1.md | 22 ++++ .../ws_mini_ticker_feed_selector_v1.md | 7 ++ .../apidocs/schemas/ws_order_feed_data_v1.md | 114 ++++++++++++++++++ .../schemas/ws_order_feed_selector_v1.md | 7 ++ .../schemas/ws_order_state_feed_data_v1.md | 64 ++++++++++ .../ws_order_state_feed_selector_v1.md | 7 ++ .../ws_orderbook_levels_feed_data_v1.md | 27 +++++ .../ws_orderbook_levels_feed_selector_v1.md | 8 ++ .../schemas/ws_positions_feed_data_v1.md | 25 ++++ .../schemas/ws_positions_feed_selector_v1.md | 7 ++ .../apidocs/schemas/ws_subscribe_params.md | 8 ++ .../schemas/ws_subscribe_request_v1_legacy.md | 10 ++ .../ws_subscribe_response_v1_legacy.md | 12 ++ .../apidocs/schemas/ws_subscribe_result.md | 11 ++ .../apidocs/schemas/ws_ticker_feed_data_v1.md | 37 ++++++ .../schemas/ws_ticker_feed_selector_v1.md | 7 ++ .../apidocs/schemas/ws_trade_feed_data_v1.md | 31 +++++ .../schemas/ws_trade_feed_selector_v1.md | 7 ++ .../schemas/ws_transfer_feed_data_v1.md | 63 ++++++++++ .../schemas/ws_transfer_feed_selector_v1.md | 7 ++ .../schemas/ws_unsubscribe_all_params.md | 5 + .../schemas/ws_unsubscribe_all_result.md | 11 ++ .../apidocs/schemas/ws_unsubscribe_params.md | 8 ++ .../apidocs/schemas/ws_unsubscribe_result.md | 7 ++ .../schemas/ws_withdrawal_feed_data_v1.md | 51 ++++++++ .../schemas/ws_withdrawal_feed_selector_v1.md | 6 + 196 files changed, 5898 insertions(+) diff --git a/artifacts/apidocs/schemas/ack.md b/artifacts/apidocs/schemas/ack.md index e69de29..1bf0092 100644 --- a/artifacts/apidocs/schemas/ack.md +++ b/artifacts/apidocs/schemas/ack.md @@ -0,0 +1,4 @@ +!!! info "[Ack](/../../schemas/ack)" + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |ack
      `a` |boolean|True|Gravity has acknowledged that the request has been successfully received and it will process it in the backend| diff --git a/artifacts/apidocs/schemas/ack_response.md b/artifacts/apidocs/schemas/ack_response.md index e69de29..69f7a8b 100644 --- a/artifacts/apidocs/schemas/ack_response.md +++ b/artifacts/apidocs/schemas/ack_response.md @@ -0,0 +1,10 @@ +!!! info "[AckResponse](/../../schemas/ack_response)" + Used to acknowledge a request has been received and will be processed
      + + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |result
      `r` |Ack|True|The Ack Object| + ??? info "[Ack](/../../schemas/ack)" + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |ack
      `a` |boolean|True|Gravity has acknowledged that the request has been successfully received and it will process it in the backend| diff --git a/artifacts/apidocs/schemas/aggregated_account_summary.md b/artifacts/apidocs/schemas/aggregated_account_summary.md index e69de29..91f4a10 100644 --- a/artifacts/apidocs/schemas/aggregated_account_summary.md +++ b/artifacts/apidocs/schemas/aggregated_account_summary.md @@ -0,0 +1,36 @@ +!!! info "[AggregatedAccountSummary](/../../schemas/aggregated_account_summary)" + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |main_account_id
      `ma` |string|True|The main account ID of the account to which the summary belongs| + |total_equity
      `te` |string|True|Total equity of the main (+ sub) account, denominated in USD| + |spot_balances
      `sb` |[SpotBalance]|True|The list of spot assets owned by this main (+ sub) account, and their balances| + ??? info "[SpotBalance](/../../schemas/spot_balance)" + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |currency
      `c` |Currency|True|The currency you hold a spot balance in| + |balance
      `b` |string|True|This currency's balance in this trading account.| + |index_price
      `ip` |string|True|The index price of this currency. (reported in `USD`)| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
      + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/api_aggregated_account_summary_response.md b/artifacts/apidocs/schemas/api_aggregated_account_summary_response.md index e69de29..dbe4d6d 100644 --- a/artifacts/apidocs/schemas/api_aggregated_account_summary_response.md +++ b/artifacts/apidocs/schemas/api_aggregated_account_summary_response.md @@ -0,0 +1,42 @@ +!!! info "[ApiAggregatedAccountSummaryResponse](/../../schemas/api_aggregated_account_summary_response)" + The aggregated account summary, that reports the total equity and spot balances of a funding (main) account, and its constituent trading (sub) accounts
      + + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |result
      `r` |AggregatedAccountSummary|True|The aggregated account summary| + ??? info "[AggregatedAccountSummary](/../../schemas/aggregated_account_summary)" + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |main_account_id
      `ma` |string|True|The main account ID of the account to which the summary belongs| + |total_equity
      `te` |string|True|Total equity of the main (+ sub) account, denominated in USD| + |spot_balances
      `sb` |[SpotBalance]|True|The list of spot assets owned by this main (+ sub) account, and their balances| + ??? info "[SpotBalance](/../../schemas/spot_balance)" + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |currency
      `c` |Currency|True|The currency you hold a spot balance in| + |balance
      `b` |string|True|This currency's balance in this trading account.| + |index_price
      `ip` |string|True|The index price of this currency. (reported in `USD`)| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
      + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/api_cancel_all_orders_request.md b/artifacts/apidocs/schemas/api_cancel_all_orders_request.md index e69de29..7792003 100644 --- a/artifacts/apidocs/schemas/api_cancel_all_orders_request.md +++ b/artifacts/apidocs/schemas/api_cancel_all_orders_request.md @@ -0,0 +1,66 @@ +!!! info "[ApiCancelAllOrdersRequest](/../../schemas/api_cancel_all_orders_request)" + Cancel all orders on the orderbook for this trading account. This may not match new orders in flight.
      + + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |sub_account_id
      `sa` |string|True|The subaccount ID cancelling all orders| + |kind
      `k` |[Kind]|False
      `all`|The kind filter to apply. If nil, this defaults to all kinds. Otherwise, only entries matching the filter will be cancelled| + |base
      `b` |[Currency]|False
      `all`|The base filter to apply. If nil, this defaults to all bases. Otherwise, only entries matching the filter will be cancelled| + |quote
      `q` |[Currency]|False
      `all`|The quote filter to apply. If nil, this defaults to all quotes. Otherwise, only entries matching the filter will be cancelled| + ??? info "[Kind](/../../schemas/kind)" + The list of asset kinds that are supported on the GRVT exchange
      + + |Value| Description | + |-|-| + |`PERPETUAL` = 1|the perpetual asset kind| + |`FUTURE` = 2|the future asset kind| + |`CALL` = 3|the call option asset kind| + |`PUT` = 4|the put option asset kind| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
      + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
      + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/api_cancel_all_orders_response.md b/artifacts/apidocs/schemas/api_cancel_all_orders_response.md index e69de29..8894694 100644 --- a/artifacts/apidocs/schemas/api_cancel_all_orders_response.md +++ b/artifacts/apidocs/schemas/api_cancel_all_orders_response.md @@ -0,0 +1,4 @@ +!!! info "[ApiCancelAllOrdersResponse](/../../schemas/api_cancel_all_orders_response)" + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |result
      `r` |integer|True|The number of orders cancelled| diff --git a/artifacts/apidocs/schemas/api_cancel_on_disconnect_request.md b/artifacts/apidocs/schemas/api_cancel_on_disconnect_request.md index e69de29..2fdc090 100644 --- a/artifacts/apidocs/schemas/api_cancel_on_disconnect_request.md +++ b/artifacts/apidocs/schemas/api_cancel_on_disconnect_request.md @@ -0,0 +1,7 @@ +!!! info "[ApiCancelOnDisconnectRequest](/../../schemas/api_cancel_on_disconnect_request)" + Auto-Cancel All Open Orders when the countdown time hits zero.

      Market Maker inputs a countdown time parameter in milliseconds (e.g. 120000 for 120s) rounded down to the smallest second follows the following logic:
      - Market Maker initially entered a value between 0 -> 1000, which is rounded to 0: will result in termination of their COD
      - Market Maker initially entered a value between 1001 -> 300_000, which is rounded to the nearest second: will result in refresh of their COD
      - Market Maker initially entered a value bigger than 300_000, which will result in error (upper bound)
      Market Maker will send a heartbeat message by calling the endpoint at specific intervals (ex. every 30 seconds) to the server to refresh the count down.

      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
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |sub_account_id
      `sa` |string|True|The subaccount ID cancelling the orders for| + |countdown_time
      `ct` |string|False
      `1000`|Countdown time in milliseconds (ex. 120000 for 120s).

      0 to disable the timer.

      Does not accept negative values.

      Minimum acceptable value is 1,000.

      Maximum acceptable value is 300,000| diff --git a/artifacts/apidocs/schemas/api_cancel_order_request.md b/artifacts/apidocs/schemas/api_cancel_order_request.md index e69de29..49be94f 100644 --- a/artifacts/apidocs/schemas/api_cancel_order_request.md +++ b/artifacts/apidocs/schemas/api_cancel_order_request.md @@ -0,0 +1,9 @@ +!!! info "[ApiCancelOrderRequest](/../../schemas/api_cancel_order_request)" + Cancel an order on the orderbook for this trading account. Either `order_id` or `client_order_id` must be provided.
      + + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |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
      `500`|Specifies the time-to-live (in milliseconds) for this cancellation.
      During this period, any order creation with a matching `client_order_id` will also be cancelled.
      This mechanism helps mitigate time-of-flight issues where cancellations might arrive before the corresponding orders.
      Hence, cancellation by `order_id` ignores this field as the exchange can only assign `order_id`s to already-processed order creations.
      The duration cannot be negative, is rounded down to the nearest 100ms (e.g., `670` -> `600`, `30` -> `0`) and capped at 5 seconds (i.e., `5000`).
      Value of `0` or omission disables the TTL mechanism, so only orders already existing in matcher state at request time will be searched.
      | diff --git a/artifacts/apidocs/schemas/api_cancel_order_response.md b/artifacts/apidocs/schemas/api_cancel_order_response.md index e69de29..2f66a4c 100644 --- a/artifacts/apidocs/schemas/api_cancel_order_response.md +++ b/artifacts/apidocs/schemas/api_cancel_order_response.md @@ -0,0 +1,110 @@ +!!! info "[ApiCancelOrderResponse](/../../schemas/api_cancel_order_response)" + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |result
      `r` |Order|True|The cancelled order| + ??? 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| + |trigger
      `t` |TriggerOrderMetadata|True|Trigger fields are used to support any type of trigger order such as TP/SL| + |broker
      `b` |BrokerTag|False
      ``|Specifies the broker who brokered the order| + ??? info "[BrokerTag](/../../schemas/broker_tag)" + BrokerTag is a tag for the broker that the order is sent from.
      + + ??? 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| diff --git a/artifacts/apidocs/schemas/api_candlestick_request.md b/artifacts/apidocs/schemas/api_candlestick_request.md index e69de29..03c8474 100644 --- a/artifacts/apidocs/schemas/api_candlestick_request.md +++ b/artifacts/apidocs/schemas/api_candlestick_request.md @@ -0,0 +1,40 @@ +!!! info "[ApiCandlestickRequest](/../../schemas/api_candlestick_request)" + Kline/Candlestick bars for an instrument. Klines are uniquely identified by their instrument, type, interval, and open time.

      Pagination works as follows:
      • We perform a reverse chronological lookup, starting from `end_time`. If `end_time` is not set, we start from the most recent data.
      • The lookup is limited to `limit` records. If more data is requested, the response will contain a `next` cursor for you to query the next page.
      • If a `cursor` is provided, it will be used to fetch results from that point onwards.
      • Pagination will continue until the `start_time` is reached. If `start_time` is not set, pagination will continue as far back as our data retention policy allows.

      + + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |instrument
      `i` |string|True|The readable instrument name:
      • Perpetual: `ETH_USDT_Perp`
      • Future: `BTC_USDT_Fut_20Oct23`
      • Call: `ETH_USDT_Call_20Oct23_2800`
      • Put: `ETH_USDT_Put_20Oct23_2800`
      | + |interval
      `i1` |CandlestickInterval|True|The interval of each candlestick| + |type
      `t` |CandlestickType|True|The type of candlestick data to retrieve| + |start_time
      `st` |string|False
      `0`|Start time of kline data in unix nanoseconds| + |end_time
      `et` |string|False
      `now()`|End time of kline data in unix nanoseconds| + |limit
      `l` |integer|False
      `500`|The limit to query for. Defaults to 500; Max 1000| + |cursor
      `c` |string|False
      `''`|The cursor to indicate when to start the query from| + ??? info "[CandlestickInterval](/../../schemas/candlestick_interval)" + |Value| Description | + |-|-| + |`CI_1_M` = 1|1 minute| + |`CI_3_M` = 2|3 minutes| + |`CI_5_M` = 3|5 minutes| + |`CI_15_M` = 4|15 minutes| + |`CI_30_M` = 5|30 minutes| + |`CI_1_H` = 6|1 hour| + |`CI_2_H` = 7|2 hour| + |`CI_4_H` = 8|4 hour| + |`CI_6_H` = 9|6 hour| + |`CI_8_H` = 10|8 hour| + |`CI_12_H` = 11|12 hour| + |`CI_1_D` = 12|1 day| + |`CI_3_D` = 13|3 days| + |`CI_5_D` = 14|5 days| + |`CI_1_W` = 15|1 week| + |`CI_2_W` = 16|2 weeks| + |`CI_3_W` = 17|3 weeks| + |`CI_4_W` = 18|4 weeks| + ??? info "[CandlestickType](/../../schemas/candlestick_type)" + |Value| Description | + |-|-| + |`TRADE` = 1|Tracks traded prices| + |`MARK` = 2|Tracks mark prices| + |`INDEX` = 3|Tracks index prices| + |`MID` = 4|Tracks book mid prices| diff --git a/artifacts/apidocs/schemas/api_candlestick_response.md b/artifacts/apidocs/schemas/api_candlestick_response.md index e69de29..4f69d76 100644 --- a/artifacts/apidocs/schemas/api_candlestick_response.md +++ b/artifacts/apidocs/schemas/api_candlestick_response.md @@ -0,0 +1,20 @@ +!!! info "[ApiCandlestickResponse](/../../schemas/api_candlestick_response)" + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |result
      `r` |[Candlestick]|True|The candlestick result set for given interval| + |next
      `n` |string|False
      `''`|The cursor to indicate when to start the next query from| + ??? info "[Candlestick](/../../schemas/candlestick)" +
      + + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |open_time
      `ot` |string|True|Open time of kline bar in unix nanoseconds| + |close_time
      `ct` |string|True|Close time of kline bar in unix nanosecond| + |open
      `o` |string|True|The open price, expressed in underlying currency resolution units| + |close
      `c` |string|True|The close price, expressed in underlying currency resolution units| + |high
      `h` |string|True|The high price, expressed in underlying currency resolution units| + |low
      `l` |string|True|The low price, expressed in underlying currency resolution units| + |volume_b
      `vb` |string|True|The underlying volume transacted, expressed in base asset decimal units| + |volume_q
      `vq` |string|True|The quote volume transacted, expressed in quote asset decimal units| + |trades
      `t` |integer|True|The number of trades transacted| + |instrument
      `i` |string|True|The readable instrument name:
      • Perpetual: `ETH_USDT_Perp`
      • Future: `BTC_USDT_Fut_20Oct23`
      • Call: `ETH_USDT_Call_20Oct23_2800`
      • Put: `ETH_USDT_Put_20Oct23_2800`
      | diff --git a/artifacts/apidocs/schemas/api_create_order_request.md b/artifacts/apidocs/schemas/api_create_order_request.md index e69de29..f721ee2 100644 --- a/artifacts/apidocs/schemas/api_create_order_request.md +++ b/artifacts/apidocs/schemas/api_create_order_request.md @@ -0,0 +1,112 @@ +!!! info "[ApiCreateOrderRequest](/../../schemas/api_create_order_request)" + Create an order on the orderbook for this trading account.
      + + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |order
      `o` |Order|True|The order 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| + |trigger
      `t` |TriggerOrderMetadata|True|Trigger fields are used to support any type of trigger order such as TP/SL| + |broker
      `b` |BrokerTag|False
      ``|Specifies the broker who brokered the order| + ??? info "[BrokerTag](/../../schemas/broker_tag)" + BrokerTag is a tag for the broker that the order is sent from.
      + + ??? 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| diff --git a/artifacts/apidocs/schemas/api_create_order_response.md b/artifacts/apidocs/schemas/api_create_order_response.md index e69de29..0a35bc3 100644 --- a/artifacts/apidocs/schemas/api_create_order_response.md +++ b/artifacts/apidocs/schemas/api_create_order_response.md @@ -0,0 +1,110 @@ +!!! info "[ApiCreateOrderResponse](/../../schemas/api_create_order_response)" + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |result
      `r` |Order|True|The created order| + ??? 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| + |trigger
      `t` |TriggerOrderMetadata|True|Trigger fields are used to support any type of trigger order such as TP/SL| + |broker
      `b` |BrokerTag|False
      ``|Specifies the broker who brokered the order| + ??? info "[BrokerTag](/../../schemas/broker_tag)" + BrokerTag is a tag for the broker that the order is sent from.
      + + ??? 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| diff --git a/artifacts/apidocs/schemas/api_deposit_history_request.md b/artifacts/apidocs/schemas/api_deposit_history_request.md index e69de29..8dd39d9 100644 --- a/artifacts/apidocs/schemas/api_deposit_history_request.md +++ b/artifacts/apidocs/schemas/api_deposit_history_request.md @@ -0,0 +1,34 @@ +!!! info "[ApiDepositHistoryRequest](/../../schemas/api_deposit_history_request)" + The request to get the historical deposits of an account
      The history is returned in reverse chronological order

      Pagination works as follows:
      • We perform a reverse chronological lookup, starting from `end_time`. If `end_time` is not set, we start from the most recent data.
      • The lookup is limited to `limit` records. If more data is requested, the response will contain a `next` cursor for you to query the next page.
      • If a `cursor` is provided, it will be used to fetch results from that point onwards.
      • Pagination will continue until the `start_time` is reached. If `start_time` is not set, pagination will continue as far back as our data retention policy allows.

      + + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |currency
      `c` |[Currency]|True|The token currency to query for, if nil or empty, return all deposits. Otherwise, only entries matching the filter will be returned| + |start_time
      `st` |string|False
      `0`|The start time to query for in unix nanoseconds| + |end_time
      `et` |string|False
      `now()`|The end time to query for in unix nanoseconds| + |limit
      `l` |integer|False
      `500`|The limit to query for. Defaults to 500; Max 1000| + |cursor
      `c1` |string|False
      `''`|The cursor to indicate when to start the next query from| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
      + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/api_deposit_history_response.md b/artifacts/apidocs/schemas/api_deposit_history_response.md index e69de29..b1e6a7e 100644 --- a/artifacts/apidocs/schemas/api_deposit_history_response.md +++ b/artifacts/apidocs/schemas/api_deposit_history_response.md @@ -0,0 +1,40 @@ +!!! info "[ApiDepositHistoryResponse](/../../schemas/api_deposit_history_response)" + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |result
      `r` |[DepositHistory]|True|The deposit history matching the request account| + |next
      `n` |string|False
      `''`|The cursor to indicate when to start the next query from| + ??? info "[DepositHistory](/../../schemas/deposit_history)" + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |l_1_hash
      `l1` |string|True|The L1 txHash of the deposit| + |l_2_hash
      `l2` |string|True|The L2 txHash of the deposit| + |to_account_id
      `ta` |string|True|The account to deposit into| + |currency
      `c` |Currency|True|The token currency to deposit| + |num_tokens
      `nt` |string|True|The number of tokens to deposit| + |initiated_time
      `it` |string|True|The timestamp when the deposit was initiated on L1 in unix nanoseconds| + |confirmed_time
      `ct` |string|True|The timestamp when the deposit was confirmed on L2 in unix nanoseconds| + |from_address
      `fa` |string|True|The address of the sender| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
      + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/api_fill_history_request.md b/artifacts/apidocs/schemas/api_fill_history_request.md index e69de29..bfb6b4e 100644 --- a/artifacts/apidocs/schemas/api_fill_history_request.md +++ b/artifacts/apidocs/schemas/api_fill_history_request.md @@ -0,0 +1,70 @@ +!!! info "[ApiFillHistoryRequest](/../../schemas/api_fill_history_request)" + Query for all historical fills made by a single account. A single order can be matched multiple times, hence there is no real way to uniquely identify a trade.

      Pagination works as follows:
      • We perform a reverse chronological lookup, starting from `end_time`. If `end_time` is not set, we start from the most recent data.
      • The lookup is limited to `limit` records. If more data is requested, the response will contain a `next` cursor for you to query the next page.
      • If a `cursor` is provided, it will be used to fetch results from that point onwards.
      • Pagination will continue until the `start_time` is reached. If `start_time` is not set, pagination will continue as far back as our data retention policy allows.

      + + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |sub_account_id
      `sa` |string|True|The sub account ID to request for| + |kind
      `k` |[Kind]|False
      `all`|The kind filter to apply. If nil, this defaults to all kinds. Otherwise, only entries matching the filter will be returned| + |base
      `b` |[Currency]|False
      `all`|The base filter to apply. If nil, this defaults to all bases. Otherwise, only entries matching the filter will be returned| + |quote
      `q` |[Currency]|False
      `all`|The quote filter to apply. If nil, this defaults to all quotes. Otherwise, only entries matching the filter will be returned| + |start_time
      `st` |string|False
      `0`|The start time to apply in unix nanoseconds. If nil, this defaults to all start times. Otherwise, only entries matching the filter will be returned| + |end_time
      `et` |string|False
      `now()`|The end time to apply in unix nanoseconds. If nil, this defaults to all end times. Otherwise, only entries matching the filter will be returned| + |limit
      `l` |integer|False
      `500`|The limit to query for. Defaults to 500; Max 1000| + |cursor
      `c` |string|False
      `''`|The cursor to indicate when to start the query from| + ??? info "[Kind](/../../schemas/kind)" + The list of asset kinds that are supported on the GRVT exchange
      + + |Value| Description | + |-|-| + |`PERPETUAL` = 1|the perpetual asset kind| + |`FUTURE` = 2|the future asset kind| + |`CALL` = 3|the call option asset kind| + |`PUT` = 4|the put option asset kind| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
      + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
      + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/api_fill_history_response.md b/artifacts/apidocs/schemas/api_fill_history_response.md index e69de29..6e01447 100644 --- a/artifacts/apidocs/schemas/api_fill_history_response.md +++ b/artifacts/apidocs/schemas/api_fill_history_response.md @@ -0,0 +1,38 @@ +!!! info "[ApiFillHistoryResponse](/../../schemas/api_fill_history_response)" + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |result
      `r` |[Fill]|True|The private trades matching the request asset| + |next
      `n` |string|True|The cursor to indicate when to start the query from| + ??? info "[Fill](/../../schemas/fill)" + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |event_time
      `et` |string|True|Time at which the event was emitted in unix nanoseconds| + |sub_account_id
      `sa` |string|True|The sub account ID that participated in the trade| + |instrument
      `i` |string|True|The instrument being represented| + |is_buyer
      `ib` |boolean|True|The side that the subaccount took on the trade| + |is_taker
      `it` |boolean|True|The role that the subaccount took on the trade| + |size
      `s` |string|True|The number of assets being traded, expressed in base asset decimal units| + |price
      `p` |string|True|The traded price, expressed in `9` decimals| + |mark_price
      `mp` |string|True|The mark price of the instrument at point of trade, expressed in `9` decimals| + |index_price
      `ip` |string|True|The index price of the instrument at point of trade, expressed in `9` decimals| + |interest_rate
      `ir` |string|True|The interest rate of the underlying at point of trade, expressed in centibeeps (1/100th of a basis point)| + |forward_price
      `fp` |string|True|[Options] The forward price of the option at point of trade, expressed in `9` decimals| + |realized_pnl
      `rp` |string|True|The realized PnL of the trade, expressed in quote asset decimal units (0 if increasing position size)| + |fee
      `f` |string|True|The fees paid on the trade, expressed in quote asset decimal unit (negative if maker rebate applied)| + |fee_rate
      `fr` |string|True|The fee rate paid on the trade| + |trade_id
      `ti` |string|True|A trade identifier, globally unique, and monotonically increasing (not by `1`).
      All trades sharing a single taker execution share the same first component (before `-`), and `event_time`.
      `trade_id` is guaranteed to be consistent across MarketData `Trade` and Trading `Fill`.| + |order_id
      `oi` |string|True|An order identifier| + |venue
      `v` |Venue|True|The venue where the trade occurred| + |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| + |signer
      `s1` |string|True|The address (public key) of the wallet signing the payload| + |broker
      `b` |BrokerTag|False
      ``|Specifies the broker who brokered the order| + ??? info "[Venue](/../../schemas/venue)" + The list of Trading Venues that are supported on the GRVT exchange
      + + |Value| Description | + |-|-| + |`ORDERBOOK` = 1|the trade is cleared on the orderbook venue| + |`RFQ` = 2|the trade is cleared on the RFQ venue| + ??? info "[BrokerTag](/../../schemas/broker_tag)" + BrokerTag is a tag for the broker that the order is sent from.
      + diff --git a/artifacts/apidocs/schemas/api_find_ecosystem_epoch_metric_response.md b/artifacts/apidocs/schemas/api_find_ecosystem_epoch_metric_response.md index e69de29..c48ebd4 100644 --- a/artifacts/apidocs/schemas/api_find_ecosystem_epoch_metric_response.md +++ b/artifacts/apidocs/schemas/api_find_ecosystem_epoch_metric_response.md @@ -0,0 +1,17 @@ +!!! info "[ApiFindEcosystemEpochMetricResponse](/../../schemas/api_find_ecosystem_epoch_metric_response)" + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |metric
      `m` |EcosystemMetric|True|The epoch metric| + |rank
      `r` |integer|True|The rank of the account in the ecosystem| + |total
      `t` |integer|True|The total number of accounts in the ecosystem| + |last_calculated_at
      `lc` |string|True|The time when the ecosystem points were last calculated| + |total_direct_invite_count
      `td` |integer|True|Direct invite count without relying on epochs| + |total_indirect_invite_count
      `ti` |integer|True|Indirect invite count without relying on epochs| + ??? info "[EcosystemMetric](/../../schemas/ecosystem_metric)" + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |direct_invite_count
      `di` |integer|True|Direct invite count| + |indirect_invite_count
      `ii` |integer|True|Indirect invite count| + |direct_invite_trading_volume
      `di1` |string|True|Direct invite trading volume| + |indirect_invite_trading_volume
      `ii1` |string|True|Indirect invite trading volume| + |total_point
      `tp` |string|True|Total ecosystem point of this epoch/phase| diff --git a/artifacts/apidocs/schemas/api_find_ecosystem_leaderboard_response.md b/artifacts/apidocs/schemas/api_find_ecosystem_leaderboard_response.md index e69de29..a4399ef 100644 --- a/artifacts/apidocs/schemas/api_find_ecosystem_leaderboard_response.md +++ b/artifacts/apidocs/schemas/api_find_ecosystem_leaderboard_response.md @@ -0,0 +1,11 @@ +!!! info "[ApiFindEcosystemLeaderboardResponse](/../../schemas/api_find_ecosystem_leaderboard_response)" + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |users
      `u` |[EcosystemLeaderboardUser]|True|The list of ecosystem leaderboard users| + ??? info "[EcosystemLeaderboardUser](/../../schemas/ecosystem_leaderboard_user)" + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |account_id
      `ai` |string|True|The off chain account id| + |rank
      `r` |integer|True|The rank of the account in the ecosystem| + |total_point
      `tp` |string|True|Total ecosystem point| + |twitter_username
      `tu` |string|True|The twitter username of the account| diff --git a/artifacts/apidocs/schemas/api_find_first_epoch_metric_response.md b/artifacts/apidocs/schemas/api_find_first_epoch_metric_response.md index e69de29..a5788a9 100644 --- a/artifacts/apidocs/schemas/api_find_first_epoch_metric_response.md +++ b/artifacts/apidocs/schemas/api_find_first_epoch_metric_response.md @@ -0,0 +1,25 @@ +!!! info "[ApiFindFirstEpochMetricResponse](/../../schemas/api_find_first_epoch_metric_response)" + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |phase_zero_metric
      `pz` |EcosystemMetric|True|Phase zero metric| + |phase_one_metric
      `po` |EcosystemMetric|True|Phase one metric| + |rank
      `r` |integer|True|The rank of the account in the ecosystem| + |total
      `t` |integer|True|The total number of accounts in the ecosystem| + |total_point
      `tp` |string|True|Total ecosystem point of the first epoch| + |last_calculated_at
      `lc` |string|True|The time when the ecosystem points were last calculated| + ??? info "[EcosystemMetric](/../../schemas/ecosystem_metric)" + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |direct_invite_count
      `di` |integer|True|Direct invite count| + |indirect_invite_count
      `ii` |integer|True|Indirect invite count| + |direct_invite_trading_volume
      `di1` |string|True|Direct invite trading volume| + |indirect_invite_trading_volume
      `ii1` |string|True|Indirect invite trading volume| + |total_point
      `tp` |string|True|Total ecosystem point of this epoch/phase| + ??? info "[EcosystemMetric](/../../schemas/ecosystem_metric)" + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |direct_invite_count
      `di` |integer|True|Direct invite count| + |indirect_invite_count
      `ii` |integer|True|Indirect invite count| + |direct_invite_trading_volume
      `di1` |string|True|Direct invite trading volume| + |indirect_invite_trading_volume
      `ii1` |string|True|Indirect invite trading volume| + |total_point
      `tp` |string|True|Total ecosystem point of this epoch/phase| diff --git a/artifacts/apidocs/schemas/api_find_trader_epoch_metric_response.md b/artifacts/apidocs/schemas/api_find_trader_epoch_metric_response.md index e69de29..912603d 100644 --- a/artifacts/apidocs/schemas/api_find_trader_epoch_metric_response.md +++ b/artifacts/apidocs/schemas/api_find_trader_epoch_metric_response.md @@ -0,0 +1,12 @@ +!!! info "[ApiFindTraderEpochMetricResponse](/../../schemas/api_find_trader_epoch_metric_response)" + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |metric
      `m` |TraderMetric|True|Phase zero metric| + |rank
      `r` |integer|True|The rank of the account in the trader| + |total
      `t` |integer|True|The total number of accounts in the trader| + |last_calculated_at
      `lc` |string|True|The time when the trader points were last calculated| + ??? info "[TraderMetric](/../../schemas/trader_metric)" + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |total_fee
      `tf` |string|True|Total fee paid| + |total_point
      `tp` |number|True|Total trader point of this epoch/phase| diff --git a/artifacts/apidocs/schemas/api_find_trader_leaderboard_response.md b/artifacts/apidocs/schemas/api_find_trader_leaderboard_response.md index e69de29..7e17222 100644 --- a/artifacts/apidocs/schemas/api_find_trader_leaderboard_response.md +++ b/artifacts/apidocs/schemas/api_find_trader_leaderboard_response.md @@ -0,0 +1,11 @@ +!!! info "[ApiFindTraderLeaderboardResponse](/../../schemas/api_find_trader_leaderboard_response)" + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |users
      `u` |[TraderLeaderboardUser]|True|The list of trader leaderboard users| + ??? info "[TraderLeaderboardUser](/../../schemas/trader_leaderboard_user)" + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |account_id
      `ai` |string|True|The off chain account id| + |rank
      `r` |integer|True|The rank of the account in the Trader| + |total_point
      `tp` |number|True|Total Trader point| + |twitter_username
      `tu` |string|True|The twitter username of the account| diff --git a/artifacts/apidocs/schemas/api_funding_account_summary_response.md b/artifacts/apidocs/schemas/api_funding_account_summary_response.md index e69de29..6fff816 100644 --- a/artifacts/apidocs/schemas/api_funding_account_summary_response.md +++ b/artifacts/apidocs/schemas/api_funding_account_summary_response.md @@ -0,0 +1,44 @@ +!!! info "[ApiFundingAccountSummaryResponse](/../../schemas/api_funding_account_summary_response)" + The funding account summary, that reports the total equity and spot balances of a funding (main) account
      + + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |result
      `r` |FundingAccountSummary|True|The funding account summary| + ??? info "[FundingAccountSummary](/../../schemas/funding_account_summary)" + The funding account summary, that reports the total equity and spot balances of a funding (main) account
      + + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |main_account_id
      `ma` |string|True|The main account ID of the account to which the summary belongs| + |total_equity
      `te` |string|True|Total equity of the main account, denominated in USD| + |spot_balances
      `sb` |[SpotBalance]|True|The list of spot assets owned by this main account, and their balances| + ??? info "[SpotBalance](/../../schemas/spot_balance)" + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |currency
      `c` |Currency|True|The currency you hold a spot balance in| + |balance
      `b` |string|True|This currency's balance in this trading account.| + |index_price
      `ip` |string|True|The index price of this currency. (reported in `USD`)| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
      + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/api_funding_payment_history_request.md b/artifacts/apidocs/schemas/api_funding_payment_history_request.md index e69de29..33f4166 100644 --- a/artifacts/apidocs/schemas/api_funding_payment_history_request.md +++ b/artifacts/apidocs/schemas/api_funding_payment_history_request.md @@ -0,0 +1,11 @@ +!!! info "[ApiFundingPaymentHistoryRequest](/../../schemas/api_funding_payment_history_request)" + Query for all historical funding payments made by a single account.

      Pagination works as follows:
      • We perform a reverse chronological lookup, starting from `end_time`. If `end_time` is not set, we start from the most recent data.
      • The lookup is limited to `limit` records. If more data is requested, the response will contain a `next` cursor for you to query the next page.
      • If a `cursor` is provided, it will be used to fetch results from that point onwards.
      • Pagination will continue until the `start_time` is reached. If `start_time` is not set, pagination will continue as far back as our data retention policy allows.

      + + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |sub_account_id
      `sa` |string|True|The sub account ID to request for| + |instrument
      `i` |string|False
      `all`|The perpetual instrument to filter for| + |start_time
      `st` |string|False
      `0`|The start time to apply in unix nanoseconds. If nil, this defaults to all start times. Otherwise, only entries matching the filter will be returned| + |end_time
      `et` |string|False
      `now()`|The end time to apply in unix nanoseconds. If nil, this defaults to all end times. Otherwise, only entries matching the filter will be returned| + |limit
      `l` |integer|False
      `500`|The limit to query for. Defaults to 500; Max 1000| + |cursor
      `c` |string|False
      `''`|The cursor to indicate when to start the query from| diff --git a/artifacts/apidocs/schemas/api_funding_payment_history_response.md b/artifacts/apidocs/schemas/api_funding_payment_history_response.md index e69de29..00b1fa8 100644 --- a/artifacts/apidocs/schemas/api_funding_payment_history_response.md +++ b/artifacts/apidocs/schemas/api_funding_payment_history_response.md @@ -0,0 +1,38 @@ +!!! info "[ApiFundingPaymentHistoryResponse](/../../schemas/api_funding_payment_history_response)" + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |result
      `r` |[FundingPayment]|True|The funding payments matching the request asset| + |next
      `n` |string|True|The cursor to indicate when to start the query from| + ??? info "[FundingPayment](/../../schemas/funding_payment)" + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |event_time
      `et` |string|True|Time at which the event was emitted in unix nanoseconds| + |sub_account_id
      `sa` |string|True|The sub account ID that made the funding payment| + |instrument
      `i` |string|True|The perpetual instrument being funded| + |currency
      `c` |Currency|True|The currency of the funding payment| + |amount
      `a` |string|True|The amount of the funding payment. Positive if paid, negative if received| + |tx_id
      `ti` |string|True|The transaction ID of the funding payment.
      Funding payments can be triggered by a trade, transfer, or liquidation.
      The `tx_id` will match the corresponding `trade_id` or `tx_id`.| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
      + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/api_funding_rate_request.md b/artifacts/apidocs/schemas/api_funding_rate_request.md index e69de29..6389aa5 100644 --- a/artifacts/apidocs/schemas/api_funding_rate_request.md +++ b/artifacts/apidocs/schemas/api_funding_rate_request.md @@ -0,0 +1,10 @@ +!!! info "[ApiFundingRateRequest](/../../schemas/api_funding_rate_request)" + Lookup the historical funding rate of a perpetual future.

      Pagination works as follows:
      • We perform a reverse chronological lookup, starting from `end_time`. If `end_time` is not set, we start from the most recent data.
      • The lookup is limited to `limit` records. If more data is requested, the response will contain a `next` cursor for you to query the next page.
      • If a `cursor` is provided, it will be used to fetch results from that point onwards.
      • Pagination will continue until the `start_time` is reached. If `start_time` is not set, pagination will continue as far back as our data retention policy allows.

      + + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |instrument
      `i` |string|True|The readable instrument name:
      • Perpetual: `ETH_USDT_Perp`
      • Future: `BTC_USDT_Fut_20Oct23`
      • Call: `ETH_USDT_Call_20Oct23_2800`
      • Put: `ETH_USDT_Put_20Oct23_2800`
      | + |start_time
      `st` |string|False
      `0`|Start time of funding rate in unix nanoseconds| + |end_time
      `et` |string|False
      `now()`|End time of funding rate in unix nanoseconds| + |limit
      `l` |integer|False
      `500`|The limit to query for. Defaults to 500; Max 1000| + |cursor
      `c` |string|False
      `''`|The cursor to indicate when to start the query from| diff --git a/artifacts/apidocs/schemas/api_funding_rate_response.md b/artifacts/apidocs/schemas/api_funding_rate_response.md index e69de29..ba70608 100644 --- a/artifacts/apidocs/schemas/api_funding_rate_response.md +++ b/artifacts/apidocs/schemas/api_funding_rate_response.md @@ -0,0 +1,12 @@ +!!! info "[ApiFundingRateResponse](/../../schemas/api_funding_rate_response)" + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |result
      `r` |[FundingRate]|True|The funding rate result set for given interval| + |next
      `n` |string|False
      `''`|The cursor to indicate when to start the next query from| + ??? info "[FundingRate](/../../schemas/funding_rate)" + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |instrument
      `i` |string|True|The readable instrument name:
      • Perpetual: `ETH_USDT_Perp`
      • Future: `BTC_USDT_Fut_20Oct23`
      • Call: `ETH_USDT_Call_20Oct23_2800`
      • Put: `ETH_USDT_Put_20Oct23_2800`
      | + |funding_rate
      `fr` |string|True|The funding rate of the instrument, expressed in percentage points| + |funding_time
      `ft` |string|True|The funding timestamp of the funding rate, expressed in unix nanoseconds| + |mark_price
      `mp` |string|True|The mark price of the instrument at funding timestamp, expressed in `9` decimals| diff --git a/artifacts/apidocs/schemas/api_get_all_initial_leverage_request.md b/artifacts/apidocs/schemas/api_get_all_initial_leverage_request.md index e69de29..e09d435 100644 --- a/artifacts/apidocs/schemas/api_get_all_initial_leverage_request.md +++ b/artifacts/apidocs/schemas/api_get_all_initial_leverage_request.md @@ -0,0 +1,6 @@ +!!! info "[ApiGetAllInitialLeverageRequest](/../../schemas/api_get_all_initial_leverage_request)" + The request to get the initial leverage of a sub account
      + + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |sub_account_id
      `sa` |string|True|The sub account ID to get the leverage for| diff --git a/artifacts/apidocs/schemas/api_get_all_initial_leverage_response.md b/artifacts/apidocs/schemas/api_get_all_initial_leverage_response.md index e69de29..55a1e63 100644 --- a/artifacts/apidocs/schemas/api_get_all_initial_leverage_response.md +++ b/artifacts/apidocs/schemas/api_get_all_initial_leverage_response.md @@ -0,0 +1,13 @@ +!!! info "[ApiGetAllInitialLeverageResponse](/../../schemas/api_get_all_initial_leverage_response)" + The response to get the initial leverage of a sub account
      + + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |results
      `r` |[InitialLeverageResult]|True|The initial leverage of the sub account| + ??? info "[InitialLeverageResult](/../../schemas/initial_leverage_result)" + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |instrument
      `i` |string|True|The instrument to get the leverage for| + |leverage
      `l` |string|True|The initial leverage of the sub account| + |min_leverage
      `ml` |string|True|The min leverage this sub account can set| + |max_leverage
      `ml1` |string|True|The max leverage this sub account can set| diff --git a/artifacts/apidocs/schemas/api_get_all_instruments_request.md b/artifacts/apidocs/schemas/api_get_all_instruments_request.md index e69de29..c13510d 100644 --- a/artifacts/apidocs/schemas/api_get_all_instruments_request.md +++ b/artifacts/apidocs/schemas/api_get_all_instruments_request.md @@ -0,0 +1,6 @@ +!!! info "[ApiGetAllInstrumentsRequest](/../../schemas/api_get_all_instruments_request)" + Fetch all instruments
      + + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |is_active
      `ia` |boolean|False
      `false`|Fetch only active instruments| diff --git a/artifacts/apidocs/schemas/api_get_all_instruments_response.md b/artifacts/apidocs/schemas/api_get_all_instruments_response.md index e69de29..194a032 100644 --- a/artifacts/apidocs/schemas/api_get_all_instruments_response.md +++ b/artifacts/apidocs/schemas/api_get_all_instruments_response.md @@ -0,0 +1,92 @@ +!!! info "[ApiGetAllInstrumentsResponse](/../../schemas/api_get_all_instruments_response)" + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |result
      `r` |[Instrument]|True|List of instruments| + ??? info "[Instrument](/../../schemas/instrument)" + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |instrument
      `i` |string|True|The readable instrument name:
      • Perpetual: `ETH_USDT_Perp`
      • Future: `BTC_USDT_Fut_20Oct23`
      • Call: `ETH_USDT_Call_20Oct23_2800`
      • Put: `ETH_USDT_Put_20Oct23_2800`
      | + |instrument_hash
      `ih` |string|True|The asset ID used for instrument signing.| + |base
      `b` |Currency|True|The base currency| + |quote
      `q` |Currency|True|The quote currency| + |kind
      `k` |Kind|True|The kind of instrument| + |venues
      `v` |[Venue]|True|Venues that this instrument can be traded at| + |settlement_period
      `sp1` |InstrumentSettlementPeriod|True|The settlement period of the instrument| + |base_decimals
      `bd` |integer|True|The smallest denomination of the base asset supported by GRVT (+3 represents 0.001, -3 represents 1000, 0 represents 1)| + |quote_decimals
      `qd` |integer|True|The smallest denomination of the quote asset supported by GRVT (+3 represents 0.001, -3 represents 1000, 0 represents 1)| + |tick_size
      `ts` |string|True|The size of a single tick, expressed in price decimal units| + |min_size
      `ms` |string|True|The minimum contract size, expressed in base asset decimal units| + |create_time
      `ct` |string|True|Creation time in unix nanoseconds| + |max_position_size
      `mp` |string|True|The maximum position size, expressed in base asset decimal units| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
      + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
      + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| + ??? info "[Kind](/../../schemas/kind)" + The list of asset kinds that are supported on the GRVT exchange
      + + |Value| Description | + |-|-| + |`PERPETUAL` = 1|the perpetual asset kind| + |`FUTURE` = 2|the future asset kind| + |`CALL` = 3|the call option asset kind| + |`PUT` = 4|the put option asset kind| + ??? info "[Venue](/../../schemas/venue)" + The list of Trading Venues that are supported on the GRVT exchange
      + + |Value| Description | + |-|-| + |`ORDERBOOK` = 1|the trade is cleared on the orderbook venue| + |`RFQ` = 2|the trade is cleared on the RFQ venue| + ??? info "[InstrumentSettlementPeriod](/../../schemas/instrument_settlement_period)" + |Value| Description | + |-|-| + |`PERPETUAL` = 1|Instrument settles through perpetual funding cycles| + |`DAILY` = 2|Instrument settles at an expiry date, marked as a daily instrument| + |`WEEKLY` = 3|Instrument settles at an expiry date, marked as a weekly instrument| + |`MONTHLY` = 4|Instrument settles at an expiry date, marked as a monthly instrument| + |`QUARTERLY` = 5|Instrument settles at an expiry date, marked as a quarterly instrument| diff --git a/artifacts/apidocs/schemas/api_get_ecosystem_leaderboard_request.md b/artifacts/apidocs/schemas/api_get_ecosystem_leaderboard_request.md index e69de29..209678b 100644 --- a/artifacts/apidocs/schemas/api_get_ecosystem_leaderboard_request.md +++ b/artifacts/apidocs/schemas/api_get_ecosystem_leaderboard_request.md @@ -0,0 +1,5 @@ +!!! info "[ApiGetEcosystemLeaderboardRequest](/../../schemas/api_get_ecosystem_leaderboard_request)" + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |calculate_from
      `cf` |string|True|Start time of the epoch - phase| + |limit
      `l` |integer|True|The number of accounts to return| diff --git a/artifacts/apidocs/schemas/api_get_ecosystem_leaderboard_response.md b/artifacts/apidocs/schemas/api_get_ecosystem_leaderboard_response.md index e69de29..4e64a5b 100644 --- a/artifacts/apidocs/schemas/api_get_ecosystem_leaderboard_response.md +++ b/artifacts/apidocs/schemas/api_get_ecosystem_leaderboard_response.md @@ -0,0 +1,20 @@ +!!! info "[ApiGetEcosystemLeaderboardResponse](/../../schemas/api_get_ecosystem_leaderboard_response)" + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |points
      `p` |[EcosystemPoint]|True|The list of ecosystem points| + ??? info "[EcosystemPoint](/../../schemas/ecosystem_point)" +
      + + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |account_id
      `ai` |string|True|The off chain account id| + |main_account_id
      `ma` |string|True|The main account id| + |total_point
      `tp` |string|True|Total ecosystem point| + |direct_invite_count
      `di` |integer|True|Direct invite count| + |indirect_invite_count
      `ii` |integer|True|Indirect invite count| + |direct_invite_trading_volume
      `di1` |string|True|Direct invite trading volume| + |indirect_invite_trading_volume
      `ii1` |string|True|Indirect invite trading volume| + |calculate_at
      `ca` |string|True|The time when the ecosystem point is calculated| + |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| diff --git a/artifacts/apidocs/schemas/api_get_ecosystem_referral_stat_response.md b/artifacts/apidocs/schemas/api_get_ecosystem_referral_stat_response.md index e69de29..a8c80f0 100644 --- a/artifacts/apidocs/schemas/api_get_ecosystem_referral_stat_response.md +++ b/artifacts/apidocs/schemas/api_get_ecosystem_referral_stat_response.md @@ -0,0 +1,7 @@ +!!! info "[ApiGetEcosystemReferralStatResponse](/../../schemas/api_get_ecosystem_referral_stat_response)" + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |direct_invite_count
      `di` |integer|True|Direct invite count| + |indirect_invite_count
      `ii` |integer|True|Indirect invite count| + |direct_invite_trading_volume
      `di1` |string|True|Total volume traded by direct invites multiple by 1e9| + |indirect_invite_trading_volume
      `ii1` |string|True|Total volume traded by indirect invites multiple by 1e9| diff --git a/artifacts/apidocs/schemas/api_get_filtered_instruments_request.md b/artifacts/apidocs/schemas/api_get_filtered_instruments_request.md index e69de29..91afdfb 100644 --- a/artifacts/apidocs/schemas/api_get_filtered_instruments_request.md +++ b/artifacts/apidocs/schemas/api_get_filtered_instruments_request.md @@ -0,0 +1,67 @@ +!!! info "[ApiGetFilteredInstrumentsRequest](/../../schemas/api_get_filtered_instruments_request)" + Fetch a list of instruments based on the filters provided
      + + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |kind
      `k` |[Kind]|False
      `all`|The kind filter to apply. If nil, this defaults to all kinds. Otherwise, only entries matching the filter will be returned| + |base
      `b` |[Currency]|False
      `all`|The base filter to apply. If nil, this defaults to all bases. Otherwise, only entries matching the filter will be returned| + |quote
      `q` |[Currency]|False
      `all`|The quote filter to apply. If nil, this defaults to all quotes. Otherwise, only entries matching the filter will be returned| + |is_active
      `ia` |boolean|False
      `false`|Request for active instruments only| + |limit
      `l` |integer|False
      `500`|The limit to query for. Defaults to 500; Max 100000| + ??? info "[Kind](/../../schemas/kind)" + The list of asset kinds that are supported on the GRVT exchange
      + + |Value| Description | + |-|-| + |`PERPETUAL` = 1|the perpetual asset kind| + |`FUTURE` = 2|the future asset kind| + |`CALL` = 3|the call option asset kind| + |`PUT` = 4|the put option asset kind| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
      + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
      + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/api_get_filtered_instruments_response.md b/artifacts/apidocs/schemas/api_get_filtered_instruments_response.md index e69de29..00eb893 100644 --- a/artifacts/apidocs/schemas/api_get_filtered_instruments_response.md +++ b/artifacts/apidocs/schemas/api_get_filtered_instruments_response.md @@ -0,0 +1,92 @@ +!!! info "[ApiGetFilteredInstrumentsResponse](/../../schemas/api_get_filtered_instruments_response)" + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |result
      `r` |[Instrument]|True|The instruments matching the request filter| + ??? info "[Instrument](/../../schemas/instrument)" + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |instrument
      `i` |string|True|The readable instrument name:
      • Perpetual: `ETH_USDT_Perp`
      • Future: `BTC_USDT_Fut_20Oct23`
      • Call: `ETH_USDT_Call_20Oct23_2800`
      • Put: `ETH_USDT_Put_20Oct23_2800`
      | + |instrument_hash
      `ih` |string|True|The asset ID used for instrument signing.| + |base
      `b` |Currency|True|The base currency| + |quote
      `q` |Currency|True|The quote currency| + |kind
      `k` |Kind|True|The kind of instrument| + |venues
      `v` |[Venue]|True|Venues that this instrument can be traded at| + |settlement_period
      `sp1` |InstrumentSettlementPeriod|True|The settlement period of the instrument| + |base_decimals
      `bd` |integer|True|The smallest denomination of the base asset supported by GRVT (+3 represents 0.001, -3 represents 1000, 0 represents 1)| + |quote_decimals
      `qd` |integer|True|The smallest denomination of the quote asset supported by GRVT (+3 represents 0.001, -3 represents 1000, 0 represents 1)| + |tick_size
      `ts` |string|True|The size of a single tick, expressed in price decimal units| + |min_size
      `ms` |string|True|The minimum contract size, expressed in base asset decimal units| + |create_time
      `ct` |string|True|Creation time in unix nanoseconds| + |max_position_size
      `mp` |string|True|The maximum position size, expressed in base asset decimal units| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
      + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
      + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| + ??? info "[Kind](/../../schemas/kind)" + The list of asset kinds that are supported on the GRVT exchange
      + + |Value| Description | + |-|-| + |`PERPETUAL` = 1|the perpetual asset kind| + |`FUTURE` = 2|the future asset kind| + |`CALL` = 3|the call option asset kind| + |`PUT` = 4|the put option asset kind| + ??? info "[Venue](/../../schemas/venue)" + The list of Trading Venues that are supported on the GRVT exchange
      + + |Value| Description | + |-|-| + |`ORDERBOOK` = 1|the trade is cleared on the orderbook venue| + |`RFQ` = 2|the trade is cleared on the RFQ venue| + ??? info "[InstrumentSettlementPeriod](/../../schemas/instrument_settlement_period)" + |Value| Description | + |-|-| + |`PERPETUAL` = 1|Instrument settles through perpetual funding cycles| + |`DAILY` = 2|Instrument settles at an expiry date, marked as a daily instrument| + |`WEEKLY` = 3|Instrument settles at an expiry date, marked as a weekly instrument| + |`MONTHLY` = 4|Instrument settles at an expiry date, marked as a monthly instrument| + |`QUARTERLY` = 5|Instrument settles at an expiry date, marked as a quarterly instrument| diff --git a/artifacts/apidocs/schemas/api_get_instrument_request.md b/artifacts/apidocs/schemas/api_get_instrument_request.md index e69de29..a54cf3f 100644 --- a/artifacts/apidocs/schemas/api_get_instrument_request.md +++ b/artifacts/apidocs/schemas/api_get_instrument_request.md @@ -0,0 +1,6 @@ +!!! info "[ApiGetInstrumentRequest](/../../schemas/api_get_instrument_request)" + Fetch a single instrument by supplying the asset or instrument name
      + + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |instrument
      `i` |string|True|The readable instrument name:
      • Perpetual: `ETH_USDT_Perp`
      • Future: `BTC_USDT_Fut_20Oct23`
      • Call: `ETH_USDT_Call_20Oct23_2800`
      • Put: `ETH_USDT_Put_20Oct23_2800`
      | diff --git a/artifacts/apidocs/schemas/api_get_instrument_response.md b/artifacts/apidocs/schemas/api_get_instrument_response.md index e69de29..c345b82 100644 --- a/artifacts/apidocs/schemas/api_get_instrument_response.md +++ b/artifacts/apidocs/schemas/api_get_instrument_response.md @@ -0,0 +1,92 @@ +!!! info "[ApiGetInstrumentResponse](/../../schemas/api_get_instrument_response)" + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |result
      `r` |Instrument|True|The instrument matching the request asset| + ??? info "[Instrument](/../../schemas/instrument)" + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |instrument
      `i` |string|True|The readable instrument name:
      • Perpetual: `ETH_USDT_Perp`
      • Future: `BTC_USDT_Fut_20Oct23`
      • Call: `ETH_USDT_Call_20Oct23_2800`
      • Put: `ETH_USDT_Put_20Oct23_2800`
      | + |instrument_hash
      `ih` |string|True|The asset ID used for instrument signing.| + |base
      `b` |Currency|True|The base currency| + |quote
      `q` |Currency|True|The quote currency| + |kind
      `k` |Kind|True|The kind of instrument| + |venues
      `v` |[Venue]|True|Venues that this instrument can be traded at| + |settlement_period
      `sp1` |InstrumentSettlementPeriod|True|The settlement period of the instrument| + |base_decimals
      `bd` |integer|True|The smallest denomination of the base asset supported by GRVT (+3 represents 0.001, -3 represents 1000, 0 represents 1)| + |quote_decimals
      `qd` |integer|True|The smallest denomination of the quote asset supported by GRVT (+3 represents 0.001, -3 represents 1000, 0 represents 1)| + |tick_size
      `ts` |string|True|The size of a single tick, expressed in price decimal units| + |min_size
      `ms` |string|True|The minimum contract size, expressed in base asset decimal units| + |create_time
      `ct` |string|True|Creation time in unix nanoseconds| + |max_position_size
      `mp` |string|True|The maximum position size, expressed in base asset decimal units| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
      + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
      + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| + ??? info "[Kind](/../../schemas/kind)" + The list of asset kinds that are supported on the GRVT exchange
      + + |Value| Description | + |-|-| + |`PERPETUAL` = 1|the perpetual asset kind| + |`FUTURE` = 2|the future asset kind| + |`CALL` = 3|the call option asset kind| + |`PUT` = 4|the put option asset kind| + ??? info "[Venue](/../../schemas/venue)" + The list of Trading Venues that are supported on the GRVT exchange
      + + |Value| Description | + |-|-| + |`ORDERBOOK` = 1|the trade is cleared on the orderbook venue| + |`RFQ` = 2|the trade is cleared on the RFQ venue| + ??? info "[InstrumentSettlementPeriod](/../../schemas/instrument_settlement_period)" + |Value| Description | + |-|-| + |`PERPETUAL` = 1|Instrument settles through perpetual funding cycles| + |`DAILY` = 2|Instrument settles at an expiry date, marked as a daily instrument| + |`WEEKLY` = 3|Instrument settles at an expiry date, marked as a weekly instrument| + |`MONTHLY` = 4|Instrument settles at an expiry date, marked as a monthly instrument| + |`QUARTERLY` = 5|Instrument settles at an expiry date, marked as a quarterly instrument| 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 e69de29..d60c753 100644 --- a/artifacts/apidocs/schemas/api_get_latest_lp_snapshot_request.md +++ b/artifacts/apidocs/schemas/api_get_latest_lp_snapshot_request.md @@ -0,0 +1,38 @@ +!!! info "[ApiGetLatestLPSnapshotRequest](/../../schemas/api_get_latest_lp_snapshot_request)" + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |kind
      `k` |Kind|False
      `0`|The kind filter to apply| + |base
      `b` |Currency|False
      `0`|The base filter to apply| + ??? info "[Kind](/../../schemas/kind)" + The list of asset kinds that are supported on the GRVT exchange
      + + |Value| Description | + |-|-| + |`PERPETUAL` = 1|the perpetual asset kind| + |`FUTURE` = 2|the future asset kind| + |`CALL` = 3|the call option asset kind| + |`PUT` = 4|the put option asset kind| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
      + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/api_get_latest_lp_snapshot_response.md b/artifacts/apidocs/schemas/api_get_latest_lp_snapshot_response.md index e69de29..fecc350 100644 --- a/artifacts/apidocs/schemas/api_get_latest_lp_snapshot_response.md +++ b/artifacts/apidocs/schemas/api_get_latest_lp_snapshot_response.md @@ -0,0 +1,14 @@ +!!! info "[ApiGetLatestLPSnapshotResponse](/../../schemas/api_get_latest_lp_snapshot_response)" + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |snapshot
      `s` |ApproximateLPSnapshot|True|The latest LP snapshot| + ??? info "[ApproximateLPSnapshot](/../../schemas/approximate_lp_snapshot)" + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |main_account_id
      `ma` |string|True|The main account id| + |underlying_multiplier
      `um` |string|True|Underlying multiplier| + |market_share_multiplier
      `ms` |string|True|Market share multiplier| + |bid_fast_market_multiplier
      `bf` |integer|True|Fast market multiplier| + |ask_fast_market_multiplier
      `af` |integer|True|Fast market multiplier| + |liquidity_score
      `ls` |string|True|Liquidity score| + |calculate_at
      `ca` |string|True|The time when the snapshot was calculated| diff --git a/artifacts/apidocs/schemas/api_get_list_epoch_badge_response.md b/artifacts/apidocs/schemas/api_get_list_epoch_badge_response.md index e69de29..115d6d5 100644 --- a/artifacts/apidocs/schemas/api_get_list_epoch_badge_response.md +++ b/artifacts/apidocs/schemas/api_get_list_epoch_badge_response.md @@ -0,0 +1,54 @@ +!!! info "[ApiGetListEpochBadgeResponse](/../../schemas/api_get_list_epoch_badge_response)" + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |result
      `r` |[EpochBadge]|True|The list of epoch badges| + ??? info "[EpochBadge](/../../schemas/epoch_badge)" + |Name
      `Lite`|Type|Required
      `Default`| Description | + |-|-|-|-| + |account_id
      `ai` |string|True|The off chain account id| + |main_account_id
      `ma` |string|True|The account ID| + |type
      `t` |RewardProgramType|True|The type of the reward program| + |epoch
      `e` |integer|True|The epoch number| + |epoch_start_time
      `es` |string|True|The start time of the epoch| + |epoch_end_time
      `ee` |string|True|The end time of the epoch| + |badge
      `b` |EpochBadgeType|True|The type of the badge| + |distributed_badges
      `db` |[EpochBadgeType]|True|The distributed badges| + |total_point
      `tp` |string|True|Total point| + |rank
      `r` |integer|True|Rank| + |claimed_at
      `ca` |string|True|The time when the badge was claimed, or the epoch end time if the user has already completed the KYC process| + ??? info "[RewardProgramType](/../../schemas/reward_program_type)" + |Value| Description | + |-|-| + |`ECOSYSTEM` = 1|| + |`TRADER` = 2|| + |`LP` = 3|| + ??? info "[EpochBadgeType](/../../schemas/epoch_badge_type)" + |Value| Description | + |-|-| + |`CHAMPION` = 1|Champion| + |`LEGEND` = 2|Legend| + |`VETERAN` = 3|Veteran| + |`ELITE` = 4|Elite| + |`MASTER` = 5|Master| + |`EXPERT` = 6|Expert| + |`WARRIOR` = 7|Warrior| + |`SERGEANT` = 8|Sergeant| + |`RANGER` = 9|Ranger| + |`CHALLENGER` = 10|Challenger| + |`APPRENTICE` = 11|Apprentice| + |`ROOKIE` = 12|Rookie| + ??? info "[EpochBadgeType](/../../schemas/epoch_badge_type)" + |Value| Description | + |-|-| + |`CHAMPION` = 1|Champion| + |`LEGEND` = 2|Legend| + |`VETERAN` = 3|Veteran| + |`ELITE` = 4|Elite| + |`MASTER` = 5|Master| + |`EXPERT` = 6|Expert| + |`WARRIOR` = 7|Warrior| + |`SERGEANT` = 8|Sergeant| + |`RANGER` = 9|Ranger| + |`CHALLENGER` = 10|Challenger| + |`APPRENTICE` = 11|Apprentice| + |`ROOKIE` = 12|Rookie| diff --git a/artifacts/apidocs/schemas/api_get_list_flat_referral_request.md b/artifacts/apidocs/schemas/api_get_list_flat_referral_request.md index e69de29..c67e647 100644 --- a/artifacts/apidocs/schemas/api_get_list_flat_referral_request.md +++ b/artifacts/apidocs/schemas/api_get_list_flat_referral_request.md @@ -0,0 +1,9 @@ +!!! info "[ApiGetListFlatReferralRequest](/../../schemas/api_get_list_flat_referral_request)" + startTime and endTime are optional parameters. The semantics of these parameters are as follows:

        + + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |referral_id
        `ri` |string|True|The off chain referrer account id to get all flat referrals| + |start_time
        `st` |string|False
        `0`|Optional. Start time in unix nanoseconds| + |end_time
        `et` |string|False
        `now()`|Optional. End time in unix nanoseconds| + |account_id
        `ai` |string|True|The off chain account id to get all user's referrers| diff --git a/artifacts/apidocs/schemas/api_get_list_flat_referral_response.md b/artifacts/apidocs/schemas/api_get_list_flat_referral_response.md index e69de29..01d3d78 100644 --- a/artifacts/apidocs/schemas/api_get_list_flat_referral_response.md +++ b/artifacts/apidocs/schemas/api_get_list_flat_referral_response.md @@ -0,0 +1,19 @@ +!!! info "[ApiGetListFlatReferralResponse](/../../schemas/api_get_list_flat_referral_response)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |flat_referrals
        `fr` |[FlatReferral]|True|The list of flat referrals| + ??? info "[FlatReferral](/../../schemas/flat_referral)" +
        + + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |account_id
        `ai` |string|True|The off chain account id| + |referrer_id
        `ri` |string|True|The off chain referrer account id| + |referrer_level
        `rl` |integer|True|The referrer level; 1: direct referrer, 2: indirect referrer| + |account_create_time
        `ac` |string|True|The account creation time| + |main_account_id
        `ma` |string|True|The main account id| + |referrer_main_account_id
        `rm` |string|True|The referrer main account id| + |is_business
        `ib` |boolean|True|The account is a business account or not| + |is_kyc_completed
        `ik` |boolean|True|The account is KYC verified or not| + |kyc_completed_at
        `kc` |string|True|The KYC completed time| + |kyc_type
        `kt` |string|True|The KYC type, can be 'individual' or 'business'| diff --git a/artifacts/apidocs/schemas/api_get_list_reward_epoch_response.md b/artifacts/apidocs/schemas/api_get_list_reward_epoch_response.md index e69de29..6d1f1ff 100644 --- a/artifacts/apidocs/schemas/api_get_list_reward_epoch_response.md +++ b/artifacts/apidocs/schemas/api_get_list_reward_epoch_response.md @@ -0,0 +1,31 @@ +!!! info "[ApiGetListRewardEpochResponse](/../../schemas/api_get_list_reward_epoch_response)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |ecosystem_epochs
        `ee` |[RewardEpochInfo]|True|The list of epoch for ecosystem reward| + |trading_epochs
        `te` |[RewardEpochInfo]|True|The list of epoch for trader reward and lp reward| + ??? info "[RewardEpochInfo](/../../schemas/reward_epoch_info)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |epoch
        `e` |integer|True|The epoch number| + |epoch_start_time
        `es` |string|True|The start time of the epoch| + |epoch_end_time
        `ee` |string|True|The end time of the epoch| + |status
        `s` |RewardEpochStatus|True|The status of the epoch| + ??? info "[RewardEpochStatus](/../../schemas/reward_epoch_status)" + |Value| Description | + |-|-| + |`PAST` = 1|Past| + |`CURRENT` = 2|Current| + |`FUTURE` = 3|Future| + ??? info "[RewardEpochInfo](/../../schemas/reward_epoch_info)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |epoch
        `e` |integer|True|The epoch number| + |epoch_start_time
        `es` |string|True|The start time of the epoch| + |epoch_end_time
        `ee` |string|True|The end time of the epoch| + |status
        `s` |RewardEpochStatus|True|The status of the epoch| + ??? info "[RewardEpochStatus](/../../schemas/reward_epoch_status)" + |Value| Description | + |-|-| + |`PAST` = 1|Past| + |`CURRENT` = 2|Current| + |`FUTURE` = 3|Future| diff --git a/artifacts/apidocs/schemas/api_get_lp_info_request.md b/artifacts/apidocs/schemas/api_get_lp_info_request.md index e69de29..3b014c4 100644 --- a/artifacts/apidocs/schemas/api_get_lp_info_request.md +++ b/artifacts/apidocs/schemas/api_get_lp_info_request.md @@ -0,0 +1,38 @@ +!!! info "[ApiGetLPInfoRequest](/../../schemas/api_get_lp_info_request)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |kind
        `k` |Kind|True|The kind filter to apply| + |base
        `b` |Currency|False
        `0`|The base filter to apply| + ??? info "[Kind](/../../schemas/kind)" + The list of asset kinds that are supported on the GRVT exchange
        + + |Value| Description | + |-|-| + |`PERPETUAL` = 1|the perpetual asset kind| + |`FUTURE` = 2|the future asset kind| + |`CALL` = 3|the call option asset kind| + |`PUT` = 4|the put option asset kind| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
        + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/api_get_lp_info_response.md b/artifacts/apidocs/schemas/api_get_lp_info_response.md index e69de29..fe27632 100644 --- a/artifacts/apidocs/schemas/api_get_lp_info_response.md +++ b/artifacts/apidocs/schemas/api_get_lp_info_response.md @@ -0,0 +1,11 @@ +!!! info "[ApiGetLPInfoResponse](/../../schemas/api_get_lp_info_response)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |is_lp_maker
        `il` |boolean|True|Is LP maker| + |spread_score_value_multiplier
        `ss` |string|True|The spread score value multiplier| + |depth_score_value_multiplier
        `ds` |string|True|The depth score value multiplier| + |market_share_value_multiplier
        `ms` |string|True|The market share value multiplier| + |underlying_multiplier
        `um` |string|True|Underlying multiplier| + |market_share_multiplier
        `ms1` |string|True|The market share multiplier, equal to the maker trading volume in the past 2 hours| + |ask_fast_market_multiplier
        `af` |integer|True|Ask fast market multiplier| + |bid_fast_market_multiplier
        `bf` |integer|True|Bid fast market multiplier| diff --git a/artifacts/apidocs/schemas/api_get_lp_leaderboard_request.md b/artifacts/apidocs/schemas/api_get_lp_leaderboard_request.md index e69de29..a3f1c78 100644 --- a/artifacts/apidocs/schemas/api_get_lp_leaderboard_request.md +++ b/artifacts/apidocs/schemas/api_get_lp_leaderboard_request.md @@ -0,0 +1,40 @@ +!!! info "[ApiGetLPLeaderboardRequest](/../../schemas/api_get_lp_leaderboard_request)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |epoch
        `e` |integer|False
        `0`|The epoch to filter| + |limit
        `l` |integer|True|The number of accounts to return| + |kind
        `k` |Kind|True|The kind filter to apply| + |base
        `b` |Currency|True|The base filter to apply| + ??? info "[Kind](/../../schemas/kind)" + The list of asset kinds that are supported on the GRVT exchange
        + + |Value| Description | + |-|-| + |`PERPETUAL` = 1|the perpetual asset kind| + |`FUTURE` = 2|the future asset kind| + |`CALL` = 3|the call option asset kind| + |`PUT` = 4|the put option asset kind| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
        + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/api_get_lp_leaderboard_response.md b/artifacts/apidocs/schemas/api_get_lp_leaderboard_response.md index e69de29..be6b445 100644 --- a/artifacts/apidocs/schemas/api_get_lp_leaderboard_response.md +++ b/artifacts/apidocs/schemas/api_get_lp_leaderboard_response.md @@ -0,0 +1,10 @@ +!!! info "[ApiGetLPLeaderboardResponse](/../../schemas/api_get_lp_leaderboard_response)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |points
        `p` |[ApproximateLPPoint]|True|The list of LP points| + ??? info "[ApproximateLPPoint](/../../schemas/approximate_lp_point)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |off_chain_account_id
        `oc` |string|True|The off chain account id| + |liquidity_score
        `ls` |string|True|Liquidity score| + |rank
        `r` |integer|True|The rank of user in the LP leaderboard| diff --git a/artifacts/apidocs/schemas/api_get_lp_point_request.md b/artifacts/apidocs/schemas/api_get_lp_point_request.md index e69de29..54116b6 100644 --- a/artifacts/apidocs/schemas/api_get_lp_point_request.md +++ b/artifacts/apidocs/schemas/api_get_lp_point_request.md @@ -0,0 +1,39 @@ +!!! info "[ApiGetLPPointRequest](/../../schemas/api_get_lp_point_request)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |epoch
        `e` |integer|False
        `0`|The epoch to filter| + |kind
        `k` |Kind|False
        `0`|Optional. The kind filter to apply| + |base
        `b` |Currency|False
        `0`|Optional. The base filter to apply| + ??? info "[Kind](/../../schemas/kind)" + The list of asset kinds that are supported on the GRVT exchange
        + + |Value| Description | + |-|-| + |`PERPETUAL` = 1|the perpetual asset kind| + |`FUTURE` = 2|the future asset kind| + |`CALL` = 3|the call option asset kind| + |`PUT` = 4|the put option asset kind| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
        + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/api_get_lp_point_response.md b/artifacts/apidocs/schemas/api_get_lp_point_response.md index e69de29..c1443f6 100644 --- a/artifacts/apidocs/schemas/api_get_lp_point_response.md +++ b/artifacts/apidocs/schemas/api_get_lp_point_response.md @@ -0,0 +1,11 @@ +!!! info "[ApiGetLPPointResponse](/../../schemas/api_get_lp_point_response)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |point
        `p` |LPPoint|True|LP points of user| + |maker_count
        `mc` |integer|True|The number of maker| + ??? info "[LPPoint](/../../schemas/lp_point)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |main_account_id
        `ma` |string|True|The main account id| + |liquidity_score
        `ls` |string|True|Liquidity score| + |rank
        `r` |integer|True|The rank of user in the LP leaderboard| diff --git a/artifacts/apidocs/schemas/api_get_order_request.md b/artifacts/apidocs/schemas/api_get_order_request.md index e69de29..57d9c79 100644 --- a/artifacts/apidocs/schemas/api_get_order_request.md +++ b/artifacts/apidocs/schemas/api_get_order_request.md @@ -0,0 +1,8 @@ +!!! info "[ApiGetOrderRequest](/../../schemas/api_get_order_request)" + Retrieve the order for the account. Either `order_id` or `client_order_id` must be provided.
        + + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |sub_account_id
        `sa` |string|True|The subaccount ID to filter by| + |order_id
        `oi` |string|False
        `0`|Filter for `order_id`| + |client_order_id
        `co` |string|False
        `0`|Filter for `client_order_id`| diff --git a/artifacts/apidocs/schemas/api_get_order_response.md b/artifacts/apidocs/schemas/api_get_order_response.md index e69de29..bdd3b3b 100644 --- a/artifacts/apidocs/schemas/api_get_order_response.md +++ b/artifacts/apidocs/schemas/api_get_order_response.md @@ -0,0 +1,110 @@ +!!! info "[ApiGetOrderResponse](/../../schemas/api_get_order_response)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |result
        `r` |Order|True|The order object for the requested filter| + ??? 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| + |trigger
        `t` |TriggerOrderMetadata|True|Trigger fields are used to support any type of trigger order such as TP/SL| + |broker
        `b` |BrokerTag|False
        ``|Specifies the broker who brokered the order| + ??? info "[BrokerTag](/../../schemas/broker_tag)" + BrokerTag is a tag for the broker that the order is sent from.
        + + ??? 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| diff --git a/artifacts/apidocs/schemas/api_get_trader_stat_response.md b/artifacts/apidocs/schemas/api_get_trader_stat_response.md index e69de29..d833474 100644 --- a/artifacts/apidocs/schemas/api_get_trader_stat_response.md +++ b/artifacts/apidocs/schemas/api_get_trader_stat_response.md @@ -0,0 +1,4 @@ +!!! info "[ApiGetTraderStatResponse](/../../schemas/api_get_trader_stat_response)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |total_fee
        `tf` |string|True|Total fee paid| diff --git a/artifacts/apidocs/schemas/api_get_user_ecosystem_point_request.md b/artifacts/apidocs/schemas/api_get_user_ecosystem_point_request.md index e69de29..ca73086 100644 --- a/artifacts/apidocs/schemas/api_get_user_ecosystem_point_request.md +++ b/artifacts/apidocs/schemas/api_get_user_ecosystem_point_request.md @@ -0,0 +1,6 @@ +!!! info "[ApiGetUserEcosystemPointRequest](/../../schemas/api_get_user_ecosystem_point_request)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |account_id
        `ai` |string|True|The off chain account id| + |calculate_from
        `cf` |string|True|Start time of the epoch - phase| + |include_user_rank
        `iu` |boolean|True|Include user rank in the response| 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 e69de29..7e355ca 100644 --- a/artifacts/apidocs/schemas/api_get_user_ecosystem_point_response.md +++ b/artifacts/apidocs/schemas/api_get_user_ecosystem_point_response.md @@ -0,0 +1,20 @@ +!!! info "[ApiGetUserEcosystemPointResponse](/../../schemas/api_get_user_ecosystem_point_response)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |points
        `p` |[EcosystemPoint]|True|The list of ecosystem points| + ??? info "[EcosystemPoint](/../../schemas/ecosystem_point)" +
        + + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |account_id
        `ai` |string|True|The off chain account id| + |main_account_id
        `ma` |string|True|The main account id| + |total_point
        `tp` |string|True|Total ecosystem point| + |direct_invite_count
        `di` |integer|True|Direct invite count| + |indirect_invite_count
        `ii` |integer|True|Indirect invite count| + |direct_invite_trading_volume
        `di1` |string|True|Direct invite trading volume| + |indirect_invite_trading_volume
        `ii1` |string|True|Indirect invite trading volume| + |calculate_at
        `ca` |string|True|The time when the ecosystem point is calculated| + |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| diff --git a/artifacts/apidocs/schemas/api_get_verified_ecosystem_leaderboard_request.md b/artifacts/apidocs/schemas/api_get_verified_ecosystem_leaderboard_request.md index e69de29..6604e10 100644 --- a/artifacts/apidocs/schemas/api_get_verified_ecosystem_leaderboard_request.md +++ b/artifacts/apidocs/schemas/api_get_verified_ecosystem_leaderboard_request.md @@ -0,0 +1,5 @@ +!!! info "[ApiGetVerifiedEcosystemLeaderboardRequest](/../../schemas/api_get_verified_ecosystem_leaderboard_request)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |calculate_from
        `cf` |string|True|Start time of the epoch| + |completed_kyc_before
        `ck` |string|True|Completed KYC before this time| diff --git a/artifacts/apidocs/schemas/api_latest_snap_sub_accounts_request.md b/artifacts/apidocs/schemas/api_latest_snap_sub_accounts_request.md index e69de29..69ec03a 100644 --- a/artifacts/apidocs/schemas/api_latest_snap_sub_accounts_request.md +++ b/artifacts/apidocs/schemas/api_latest_snap_sub_accounts_request.md @@ -0,0 +1,6 @@ +!!! info "[ApiLatestSnapSubAccountsRequest](/../../schemas/api_latest_snap_sub_accounts_request)" + The request to get the latest snapshot of list sub account

        + + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |sub_account_i_ds
        `sa` |[string]|True|The list of sub account ids to query| 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 e69de29..735ee64 100644 --- a/artifacts/apidocs/schemas/api_latest_snap_sub_accounts_response.md +++ b/artifacts/apidocs/schemas/api_latest_snap_sub_accounts_response.md @@ -0,0 +1,95 @@ +!!! info "[ApiLatestSnapSubAccountsResponse](/../../schemas/api_latest_snap_sub_accounts_response)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |result
        `r` |[SubAccount]|True|The sub account history matching the request sub account| + ??? info "[SubAccount](/../../schemas/sub_account)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |event_time
        `et` |string|True|Time at which the event was emitted in unix nanoseconds| + |sub_account_id
        `sa` |string|True|The sub account ID this entry refers to| + |margin_type
        `mt` |MarginType|True|The type of margin algorithm this subaccount uses| + |settle_currency
        `sc` |Currency|True|The settlement, margin, and reporting currency of this account.
        This subaccount can only open positions quoted in this currency

        In the future, when users select a Multi-Currency Margin Type, this will be USD
        All other assets are converted to this currency for the purpose of calculating margin| + |unrealized_pnl
        `up` |string|True|The total unrealized PnL of all positions owned by this subaccount, denominated in quote currency decimal units.
        `unrealized_pnl = sum(position.unrealized_pnl * position.quote_index_price) / settle_index_price`| + |total_equity
        `te` |string|True|The notional value of your account if all positions are closed, excluding trading fees (reported in `settle_currency`).
        `total_equity = sum(spot_balance.balance * spot_balance.index_price) / settle_index_price + unrealized_pnl`| + |initial_margin
        `im` |string|True|The `total_equity` required to open positions in the account (reported in `settle_currency`).
        Computation is different depending on account's `margin_type`| + |maintenance_margin
        `mm` |string|True|The `total_equity` required to avoid liquidation of positions in the account (reported in `settle_currency`).
        Computation is different depending on account's `margin_type`| + |available_balance
        `ab` |string|True|The notional value available to transfer out of the trading account into the funding account (reported in `settle_currency`).
        `available_balance = total_equity - initial_margin - min(unrealized_pnl, 0)`| + |spot_balances
        `sb` |[SpotBalance]|True|The list of spot assets owned by this sub account, and their balances| + |positions
        `p` |[Positions]|True|The list of positions owned by this sub account| + |settle_index_price
        `si` |string|True|The index price of the settle currency. (reported in `USD`)| + ??? info "[MarginType](/../../schemas/margin_type)" + |Value| Description | + |-|-| + |`SIMPLE_CROSS_MARGIN` = 2|Simple Cross Margin Mode: all assets have a predictable margin impact, the whole subaccount shares a single margin| + |`PORTFOLIO_CROSS_MARGIN` = 3|Portfolio Cross Margin Mode: asset margin impact is analysed on portfolio level, the whole subaccount shares a single margin| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
        + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| + ??? info "[SpotBalance](/../../schemas/spot_balance)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |currency
        `c` |Currency|True|The currency you hold a spot balance in| + |balance
        `b` |string|True|This currency's balance in this trading account.| + |index_price
        `ip` |string|True|The index price of this currency. (reported in `USD`)| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
        + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| + ??? info "[Positions](/../../schemas/positions)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |event_time
        `et` |string|True|Time at which the event was emitted in unix nanoseconds| + |sub_account_id
        `sa` |string|True|The sub account ID that participated in the trade| + |instrument
        `i` |string|True|The instrument being represented| + |size
        `s` |string|True|The size of the position, expressed in base asset decimal units. Negative for short positions| + |notional
        `n` |string|True|The notional value of the position, negative for short assets, expressed in quote asset decimal units| + |entry_price
        `ep` |string|True|The entry price of the position, expressed in `9` decimals
        Whenever increasing the size of a position, the entry price is updated to the new average entry price
        `new_entry_price = (old_entry_price * old_size + trade_price * trade_size) / (old_size + trade_size)`| + |exit_price
        `ep1` |string|True|The exit price of the position, expressed in `9` decimals
        Whenever decreasing the size of a position, the exit price is updated to the new average exit price
        `new_exit_price = (old_exit_price * old_exit_trade_size + trade_price * trade_size) / (old_exit_trade_size + trade_size)`| + |mark_price
        `mp` |string|True|The mark price of the position, expressed in `9` decimals| + |unrealized_pnl
        `up` |string|True|The unrealized PnL of the position, expressed in quote asset decimal units
        `unrealized_pnl = (mark_price - entry_price) * size`| + |realized_pnl
        `rp` |string|True|The realized PnL of the position, expressed in quote asset decimal units
        `realized_pnl = (exit_price - entry_price) * exit_trade_size`| + |total_pnl
        `tp` |string|True|The total PnL of the position, expressed in quote asset decimal units
        `total_pnl = realized_pnl + unrealized_pnl`| + |roi
        `r` |string|True|The ROI of the position, expressed as a percentage
        `roi = (total_pnl / (entry_price * abs(size))) * 100^`| + |quote_index_price
        `qi` |string|True|The index price of the quote currency. (reported in `USD`)| + |est_liquidation_price
        `el` |string|True|The estimated liquidation price| diff --git a/artifacts/apidocs/schemas/api_list_aggregated_account_summary_request.md b/artifacts/apidocs/schemas/api_list_aggregated_account_summary_request.md index e69de29..4902964 100644 --- a/artifacts/apidocs/schemas/api_list_aggregated_account_summary_request.md +++ b/artifacts/apidocs/schemas/api_list_aggregated_account_summary_request.md @@ -0,0 +1,4 @@ +!!! info "[ApiListAggregatedAccountSummaryRequest](/../../schemas/api_list_aggregated_account_summary_request)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |main_account_ids
        `ma` |[unknown]|True|The list of main account ID to request for| 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 e69de29..f05992f 100644 --- a/artifacts/apidocs/schemas/api_list_aggregated_account_summary_response.md +++ b/artifacts/apidocs/schemas/api_list_aggregated_account_summary_response.md @@ -0,0 +1,46 @@ +!!! info "[ApiListAggregatedAccountSummaryResponse](/../../schemas/api_list_aggregated_account_summary_response)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |account_summaries
        `as` |[ApiAggregatedAccountSummaryResponse]|True|The list of aggregated account summaries of requested main accounts| + ??? info "[ApiAggregatedAccountSummaryResponse](/../../schemas/api_aggregated_account_summary_response)" + The aggregated account summary, that reports the total equity and spot balances of a funding (main) account, and its constituent trading (sub) accounts
        + + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |result
        `r` |AggregatedAccountSummary|True|The aggregated account summary| + ??? info "[AggregatedAccountSummary](/../../schemas/aggregated_account_summary)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |main_account_id
        `ma` |string|True|The main account ID of the account to which the summary belongs| + |total_equity
        `te` |string|True|Total equity of the main (+ sub) account, denominated in USD| + |spot_balances
        `sb` |[SpotBalance]|True|The list of spot assets owned by this main (+ sub) account, and their balances| + ??? info "[SpotBalance](/../../schemas/spot_balance)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |currency
        `c` |Currency|True|The currency you hold a spot balance in| + |balance
        `b` |string|True|This currency's balance in this trading account.| + |index_price
        `ip` |string|True|The index price of this currency. (reported in `USD`)| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
        + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/api_mini_ticker_request.md b/artifacts/apidocs/schemas/api_mini_ticker_request.md index e69de29..e9b4cc6 100644 --- a/artifacts/apidocs/schemas/api_mini_ticker_request.md +++ b/artifacts/apidocs/schemas/api_mini_ticker_request.md @@ -0,0 +1,6 @@ +!!! info "[ApiMiniTickerRequest](/../../schemas/api_mini_ticker_request)" + Retrieves a single mini ticker value for a single instrument. Please do not use this to repeatedly poll for data -- a websocket subscription is much more performant, and useful.
        + + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |instrument
        `i` |string|True|The readable instrument name:
        • Perpetual: `ETH_USDT_Perp`
        • Future: `BTC_USDT_Fut_20Oct23`
        • Call: `ETH_USDT_Call_20Oct23_2800`
        • Put: `ETH_USDT_Put_20Oct23_2800`
        | diff --git a/artifacts/apidocs/schemas/api_mini_ticker_response.md b/artifacts/apidocs/schemas/api_mini_ticker_response.md index e69de29..dd22cdc 100644 --- a/artifacts/apidocs/schemas/api_mini_ticker_response.md +++ b/artifacts/apidocs/schemas/api_mini_ticker_response.md @@ -0,0 +1,18 @@ +!!! info "[ApiMiniTickerResponse](/../../schemas/api_mini_ticker_response)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |result
        `r` |MiniTicker|True|The mini ticker matching the request asset| + ??? info "[MiniTicker](/../../schemas/mini_ticker)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |event_time
        `et` |string|False
        `None`|Time at which the event was emitted in unix nanoseconds| + |instrument
        `i` |string|False
        `None`|The readable instrument name:
        • Perpetual: `ETH_USDT_Perp`
        • Future: `BTC_USDT_Fut_20Oct23`
        • Call: `ETH_USDT_Call_20Oct23_2800`
        • Put: `ETH_USDT_Put_20Oct23_2800`
        | + |mark_price
        `mp` |string|False
        `None`|The mark price of the instrument, expressed in `9` decimals| + |index_price
        `ip` |string|False
        `None`|The index price of the instrument, expressed in `9` decimals| + |last_price
        `lp` |string|False
        `None`|The last traded price of the instrument (also close price), expressed in `9` decimals| + |last_size
        `ls` |string|False
        `None`|The number of assets traded in the last trade, expressed in base asset decimal units| + |mid_price
        `mp1` |string|False
        `None`|The mid price of the instrument, expressed in `9` decimals| + |best_bid_price
        `bb` |string|False
        `None`|The best bid price of the instrument, expressed in `9` decimals| + |best_bid_size
        `bb1` |string|False
        `None`|The number of assets offered on the best bid price of the instrument, expressed in base asset decimal units| + |best_ask_price
        `ba` |string|False
        `None`|The best ask price of the instrument, expressed in `9` decimals| + |best_ask_size
        `ba1` |string|False
        `None`|The number of assets offered on the best ask price of the instrument, expressed in base asset decimal units| diff --git a/artifacts/apidocs/schemas/api_open_orders_request.md b/artifacts/apidocs/schemas/api_open_orders_request.md index e69de29..0e76b77 100644 --- a/artifacts/apidocs/schemas/api_open_orders_request.md +++ b/artifacts/apidocs/schemas/api_open_orders_request.md @@ -0,0 +1,64 @@ +!!! info "[ApiOpenOrdersRequest](/../../schemas/api_open_orders_request)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |sub_account_id
        `sa` |string|True|The subaccount ID to filter by| + |kind
        `k` |[Kind]|False
        `all`|The kind filter to apply. If nil, this defaults to all kinds. Otherwise, only entries matching the filter will be returned| + |base
        `b` |[Currency]|False
        `all`|The base filter to apply. If nil, this defaults to all bases. Otherwise, only entries matching the filter will be returned| + |quote
        `q` |[Currency]|False
        `all`|The quote filter to apply. If nil, this defaults to all quotes. Otherwise, only entries matching the filter will be returned| + ??? info "[Kind](/../../schemas/kind)" + The list of asset kinds that are supported on the GRVT exchange
        + + |Value| Description | + |-|-| + |`PERPETUAL` = 1|the perpetual asset kind| + |`FUTURE` = 2|the future asset kind| + |`CALL` = 3|the call option asset kind| + |`PUT` = 4|the put option asset kind| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
        + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
        + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/api_open_orders_response.md b/artifacts/apidocs/schemas/api_open_orders_response.md index e69de29..b2a0c29 100644 --- a/artifacts/apidocs/schemas/api_open_orders_response.md +++ b/artifacts/apidocs/schemas/api_open_orders_response.md @@ -0,0 +1,112 @@ +!!! info "[ApiOpenOrdersResponse](/../../schemas/api_open_orders_response)" + Retrieves all open orders for the account. This may not match new orders in flight.
        + + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |result
        `r` |[Order]|True|The Open Orders matching the request filter| + ??? 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| + |trigger
        `t` |TriggerOrderMetadata|True|Trigger fields are used to support any type of trigger order such as TP/SL| + |broker
        `b` |BrokerTag|False
        ``|Specifies the broker who brokered the order| + ??? info "[BrokerTag](/../../schemas/broker_tag)" + BrokerTag is a tag for the broker that the order is sent from.
        + + ??? 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| diff --git a/artifacts/apidocs/schemas/api_order_history_request.md b/artifacts/apidocs/schemas/api_order_history_request.md index e69de29..8a47eb5 100644 --- a/artifacts/apidocs/schemas/api_order_history_request.md +++ b/artifacts/apidocs/schemas/api_order_history_request.md @@ -0,0 +1,70 @@ +!!! info "[ApiOrderHistoryRequest](/../../schemas/api_order_history_request)" + Retrieves the order history for the account.

        Pagination works as follows:
        • We perform a reverse chronological lookup, starting from `end_time`. If `end_time` is not set, we start from the most recent data.
        • The lookup is limited to `limit` records. If more data is requested, the response will contain a `next` cursor for you to query the next page.
        • If a `cursor` is provided, it will be used to fetch results from that point onwards.
        • Pagination will continue until the `start_time` is reached. If `start_time` is not set, pagination will continue as far back as our data retention policy allows.

        + + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |sub_account_id
        `sa` |string|True|The subaccount ID to filter by| + |kind
        `k` |[Kind]|False
        `all`|The kind filter to apply. If nil, this defaults to all kinds. Otherwise, only entries matching the filter will be returned| + |base
        `b` |[Currency]|False
        `all`|The base filter to apply. If nil, this defaults to all bases. Otherwise, only entries matching the filter will be returned| + |quote
        `q` |[Currency]|False
        `all`|The quote filter to apply. If nil, this defaults to all quotes. Otherwise, only entries matching the filter will be returned| + |start_time
        `st` |string|False
        `0`|The start time to apply in nanoseconds. If nil, this defaults to all start times. Otherwise, only entries matching the filter will be returned| + |end_time
        `et` |string|False
        `now()`|The end time to apply in nanoseconds. If nil, this defaults to all end times. Otherwise, only entries matching the filter will be returned| + |limit
        `l` |integer|False
        `500`|The limit to query for. Defaults to 500; Max 1000| + |cursor
        `c` |string|False
        `''`|The cursor to indicate when to start the query from| + ??? info "[Kind](/../../schemas/kind)" + The list of asset kinds that are supported on the GRVT exchange
        + + |Value| Description | + |-|-| + |`PERPETUAL` = 1|the perpetual asset kind| + |`FUTURE` = 2|the future asset kind| + |`CALL` = 3|the call option asset kind| + |`PUT` = 4|the put option asset kind| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
        + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
        + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/api_order_history_response.md b/artifacts/apidocs/schemas/api_order_history_response.md index e69de29..f1b0778 100644 --- a/artifacts/apidocs/schemas/api_order_history_response.md +++ b/artifacts/apidocs/schemas/api_order_history_response.md @@ -0,0 +1,111 @@ +!!! info "[ApiOrderHistoryResponse](/../../schemas/api_order_history_response)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |result
        `r` |[Order]|True|The Open Orders matching the request filter| + |next
        `n` |string|True|The cursor to indicate when to start the query from| + ??? 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| + |trigger
        `t` |TriggerOrderMetadata|True|Trigger fields are used to support any type of trigger order such as TP/SL| + |broker
        `b` |BrokerTag|False
        ``|Specifies the broker who brokered the order| + ??? info "[BrokerTag](/../../schemas/broker_tag)" + BrokerTag is a tag for the broker that the order is sent from.
        + + ??? 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| diff --git a/artifacts/apidocs/schemas/api_order_state_request.md b/artifacts/apidocs/schemas/api_order_state_request.md index e69de29..56b8bef 100644 --- a/artifacts/apidocs/schemas/api_order_state_request.md +++ b/artifacts/apidocs/schemas/api_order_state_request.md @@ -0,0 +1,8 @@ +!!! info "[ApiOrderStateRequest](/../../schemas/api_order_state_request)" + Retrieve the order state for the account. Either `order_id` or `client_order_id` must be provided.
        + + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |sub_account_id
        `sa` |string|True|The subaccount ID to filter by| + |order_id
        `oi` |string|False
        `0`|Filter for `order_id`| + |client_order_id
        `co` |string|False
        `0`|Filter for `client_order_id`| diff --git a/artifacts/apidocs/schemas/api_order_state_response.md b/artifacts/apidocs/schemas/api_order_state_response.md index e69de29..2744a2f 100644 --- a/artifacts/apidocs/schemas/api_order_state_response.md +++ b/artifacts/apidocs/schemas/api_order_state_response.md @@ -0,0 +1,54 @@ +!!! info "[ApiOrderStateResponse](/../../schemas/api_order_state_response)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |state
        `s` |OrderState|True|The order state for the requested filter| + ??? 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| diff --git a/artifacts/apidocs/schemas/api_orderbook_levels_request.md b/artifacts/apidocs/schemas/api_orderbook_levels_request.md index e69de29..5c97be7 100644 --- a/artifacts/apidocs/schemas/api_orderbook_levels_request.md +++ b/artifacts/apidocs/schemas/api_orderbook_levels_request.md @@ -0,0 +1,7 @@ +!!! info "[ApiOrderbookLevelsRequest](/../../schemas/api_orderbook_levels_request)" + Retrieves aggregated price depth for a single instrument, with a maximum depth of 10 levels. Do not use this to poll for data -- a websocket subscription is much more performant, and useful.
        + + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |instrument
        `i` |string|True|The readable instrument name:
        • Perpetual: `ETH_USDT_Perp`
        • Future: `BTC_USDT_Fut_20Oct23`
        • Call: `ETH_USDT_Call_20Oct23_2800`
        • Put: `ETH_USDT_Put_20Oct23_2800`
        | + |depth
        `d` |integer|True|Depth of the order book to be retrieved (10, 50, 100, 500)| diff --git a/artifacts/apidocs/schemas/api_orderbook_levels_response.md b/artifacts/apidocs/schemas/api_orderbook_levels_response.md index e69de29..01ac8f2 100644 --- a/artifacts/apidocs/schemas/api_orderbook_levels_response.md +++ b/artifacts/apidocs/schemas/api_orderbook_levels_response.md @@ -0,0 +1,23 @@ +!!! info "[ApiOrderbookLevelsResponse](/../../schemas/api_orderbook_levels_response)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |result
        `r` |OrderbookLevels|True|The orderbook levels objects matching the request asset| + ??? info "[OrderbookLevels](/../../schemas/orderbook_levels)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |event_time
        `et` |string|True|Time at which the event was emitted in unix nanoseconds| + |instrument
        `i` |string|True|The readable instrument name:
        • Perpetual: `ETH_USDT_Perp`
        • Future: `BTC_USDT_Fut_20Oct23`
        • Call: `ETH_USDT_Call_20Oct23_2800`
        • Put: `ETH_USDT_Put_20Oct23_2800`
        | + |bids
        `b` |[OrderbookLevel]|True|The list of best bids up till query depth| + |asks
        `a` |[OrderbookLevel]|True|The list of best asks up till query depth| + ??? info "[OrderbookLevel](/../../schemas/orderbook_level)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |price
        `p` |string|True|The price of the level, expressed in `9` decimals| + |size
        `s` |string|True|The number of assets offered, expressed in base asset decimal units| + |num_orders
        `no` |integer|True|The number of open orders at this level| + ??? info "[OrderbookLevel](/../../schemas/orderbook_level)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |price
        `p` |string|True|The price of the level, expressed in `9` decimals| + |size
        `s` |string|True|The number of assets offered, expressed in base asset decimal units| + |num_orders
        `no` |integer|True|The number of open orders at this level| diff --git a/artifacts/apidocs/schemas/api_positions_request.md b/artifacts/apidocs/schemas/api_positions_request.md index e69de29..1aa7fdb 100644 --- a/artifacts/apidocs/schemas/api_positions_request.md +++ b/artifacts/apidocs/schemas/api_positions_request.md @@ -0,0 +1,66 @@ +!!! info "[ApiPositionsRequest](/../../schemas/api_positions_request)" + Query the positions of a sub account
        + + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |sub_account_id
        `sa` |string|True|The sub account ID to request for| + |kind
        `k` |[Kind]|False
        `all`|The kind filter to apply. If nil, this defaults to all kinds. Otherwise, only entries matching the filter will be returned| + |base
        `b` |[Currency]|False
        `all`|The base filter to apply. If nil, this defaults to all bases. Otherwise, only entries matching the filter will be returned| + |quote
        `q` |[Currency]|False
        `all`|The quote filter to apply. If nil, this defaults to all quotes. Otherwise, only entries matching the filter will be returned| + ??? info "[Kind](/../../schemas/kind)" + The list of asset kinds that are supported on the GRVT exchange
        + + |Value| Description | + |-|-| + |`PERPETUAL` = 1|the perpetual asset kind| + |`FUTURE` = 2|the future asset kind| + |`CALL` = 3|the call option asset kind| + |`PUT` = 4|the put option asset kind| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
        + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
        + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/api_positions_response.md b/artifacts/apidocs/schemas/api_positions_response.md index e69de29..8527406 100644 --- a/artifacts/apidocs/schemas/api_positions_response.md +++ b/artifacts/apidocs/schemas/api_positions_response.md @@ -0,0 +1,21 @@ +!!! info "[ApiPositionsResponse](/../../schemas/api_positions_response)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |result
        `r` |[Positions]|True|The positions matching the request filter| + ??? info "[Positions](/../../schemas/positions)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |event_time
        `et` |string|True|Time at which the event was emitted in unix nanoseconds| + |sub_account_id
        `sa` |string|True|The sub account ID that participated in the trade| + |instrument
        `i` |string|True|The instrument being represented| + |size
        `s` |string|True|The size of the position, expressed in base asset decimal units. Negative for short positions| + |notional
        `n` |string|True|The notional value of the position, negative for short assets, expressed in quote asset decimal units| + |entry_price
        `ep` |string|True|The entry price of the position, expressed in `9` decimals
        Whenever increasing the size of a position, the entry price is updated to the new average entry price
        `new_entry_price = (old_entry_price * old_size + trade_price * trade_size) / (old_size + trade_size)`| + |exit_price
        `ep1` |string|True|The exit price of the position, expressed in `9` decimals
        Whenever decreasing the size of a position, the exit price is updated to the new average exit price
        `new_exit_price = (old_exit_price * old_exit_trade_size + trade_price * trade_size) / (old_exit_trade_size + trade_size)`| + |mark_price
        `mp` |string|True|The mark price of the position, expressed in `9` decimals| + |unrealized_pnl
        `up` |string|True|The unrealized PnL of the position, expressed in quote asset decimal units
        `unrealized_pnl = (mark_price - entry_price) * size`| + |realized_pnl
        `rp` |string|True|The realized PnL of the position, expressed in quote asset decimal units
        `realized_pnl = (exit_price - entry_price) * exit_trade_size`| + |total_pnl
        `tp` |string|True|The total PnL of the position, expressed in quote asset decimal units
        `total_pnl = realized_pnl + unrealized_pnl`| + |roi
        `r` |string|True|The ROI of the position, expressed as a percentage
        `roi = (total_pnl / (entry_price * abs(size))) * 100^`| + |quote_index_price
        `qi` |string|True|The index price of the quote currency. (reported in `USD`)| + |est_liquidation_price
        `el` |string|True|The estimated liquidation price| diff --git a/artifacts/apidocs/schemas/api_pre_deposit_check_request.md b/artifacts/apidocs/schemas/api_pre_deposit_check_request.md index e69de29..0cb5a85 100644 --- a/artifacts/apidocs/schemas/api_pre_deposit_check_request.md +++ b/artifacts/apidocs/schemas/api_pre_deposit_check_request.md @@ -0,0 +1,35 @@ +!!! info "[ApiPreDepositCheckRequest](/../../schemas/api_pre_deposit_check_request)" + UI only for bridge deposits through non native bridge. Currently only supports XY Finance bridge account.
        + + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |currency
        `c` |Currency|True|The currency you hold the deposit in| + |bridge
        `b` |BridgeType|True|The bridge type to conduct checks for| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
        + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| + ??? info "[BridgeType](/../../schemas/bridge_type)" + |Value| Description | + |-|-| + |`XY` = 1|XY Bridge type| diff --git a/artifacts/apidocs/schemas/api_pre_deposit_check_response.md b/artifacts/apidocs/schemas/api_pre_deposit_check_response.md index e69de29..1d679ce 100644 --- a/artifacts/apidocs/schemas/api_pre_deposit_check_response.md +++ b/artifacts/apidocs/schemas/api_pre_deposit_check_response.md @@ -0,0 +1,29 @@ +!!! info "[ApiPreDepositCheckResponse](/../../schemas/api_pre_deposit_check_response)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |max_deposit_limit
        `md` |string|True|Max Deposit Limit reported for the Bridge Account reported in the currency balance| + |currency
        `c` |Currency|True|The currency you hold the deposit in| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
        + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/api_pre_order_check_request.md b/artifacts/apidocs/schemas/api_pre_order_check_request.md index e69de29..3f9d0ad 100644 --- a/artifacts/apidocs/schemas/api_pre_order_check_request.md +++ b/artifacts/apidocs/schemas/api_pre_order_check_request.md @@ -0,0 +1,113 @@ +!!! info "[ApiPreOrderCheckRequest](/../../schemas/api_pre_order_check_request)" + Get pre-order check information for a new order
        + + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |sub_account_id
        `sa` |string|True|The subaccount ID of orders to query| + |orders
        `o` |[Order]|True|The order to do pre-order check| + ??? 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| + |trigger
        `t` |TriggerOrderMetadata|True|Trigger fields are used to support any type of trigger order such as TP/SL| + |broker
        `b` |BrokerTag|False
        ``|Specifies the broker who brokered the order| + ??? info "[BrokerTag](/../../schemas/broker_tag)" + BrokerTag is a tag for the broker that the order is sent from.
        + + ??? 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| diff --git a/artifacts/apidocs/schemas/api_pre_order_check_response.md b/artifacts/apidocs/schemas/api_pre_order_check_response.md index e69de29..5a56900 100644 --- a/artifacts/apidocs/schemas/api_pre_order_check_response.md +++ b/artifacts/apidocs/schemas/api_pre_order_check_response.md @@ -0,0 +1,42 @@ +!!! info "[ApiPreOrderCheckResponse](/../../schemas/api_pre_order_check_response)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |results
        `r` |[PreOrderCheckResult]|True|Pre order check for each new order in the request| + ??? info "[PreOrderCheckResult](/../../schemas/pre_order_check_result)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |max_qty
        `mq` |[AssetMaxQty]|True|The maximum quantity for each leg| + |margin_required
        `mr` |string|True|The margin required for the order (reported in `settle_currency`)| + |order_valid
        `ov` |boolean|True|Whether the order is valid| + |reason
        `r` |string|True|The reason the order is invalid, if any| + |settle_currency
        `sc` |Currency|True|The subAccount settle currency| + ??? info "[AssetMaxQty](/../../schemas/asset_max_qty)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |asset
        `a` |string|True|The asset associated with the max quantity| + |max_buy_qty
        `mb` |string|True|The maximum buy quantity| + |max_sell_qty
        `ms` |string|True|The maximum sell quantity| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
        + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/api_query_flat_referral_stat_request.md b/artifacts/apidocs/schemas/api_query_flat_referral_stat_request.md index e69de29..f3361f8 100644 --- a/artifacts/apidocs/schemas/api_query_flat_referral_stat_request.md +++ b/artifacts/apidocs/schemas/api_query_flat_referral_stat_request.md @@ -0,0 +1,6 @@ +!!! info "[ApiQueryFlatReferralStatRequest](/../../schemas/api_query_flat_referral_stat_request)" + Query flat referral stats
        + + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |account_id
        `ai` |string|True|The off chain account id to get referral stats| diff --git a/artifacts/apidocs/schemas/api_query_flat_referral_stat_response.md b/artifacts/apidocs/schemas/api_query_flat_referral_stat_response.md index e69de29..57e80c0 100644 --- a/artifacts/apidocs/schemas/api_query_flat_referral_stat_response.md +++ b/artifacts/apidocs/schemas/api_query_flat_referral_stat_response.md @@ -0,0 +1,5 @@ +!!! info "[ApiQueryFlatReferralStatResponse](/../../schemas/api_query_flat_referral_stat_response)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |direct_invite_count
        `di` |integer|True|Direct invite count| + |indirect_invite_count
        `ii` |integer|True|Indirect invite count| diff --git a/artifacts/apidocs/schemas/api_resolve_epoch_ecosystem_metric_response.md b/artifacts/apidocs/schemas/api_resolve_epoch_ecosystem_metric_response.md index e69de29..6c408f5 100644 --- a/artifacts/apidocs/schemas/api_resolve_epoch_ecosystem_metric_response.md +++ b/artifacts/apidocs/schemas/api_resolve_epoch_ecosystem_metric_response.md @@ -0,0 +1,6 @@ +!!! info "[ApiResolveEpochEcosystemMetricResponse](/../../schemas/api_resolve_epoch_ecosystem_metric_response)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |epoch_name
        `en` |string|True|The name of the epoch| + |point
        `p` |integer|True|Ecosystem points up to the most recently calculated time within this epoch| + |last_calculated_time
        `lc` |string|True|The time in unix nanoseconds when the ecosystem points were last calculated| diff --git a/artifacts/apidocs/schemas/api_set_initial_leverage_request.md b/artifacts/apidocs/schemas/api_set_initial_leverage_request.md index e69de29..10e6027 100644 --- a/artifacts/apidocs/schemas/api_set_initial_leverage_request.md +++ b/artifacts/apidocs/schemas/api_set_initial_leverage_request.md @@ -0,0 +1,8 @@ +!!! info "[ApiSetInitialLeverageRequest](/../../schemas/api_set_initial_leverage_request)" + The request to set the initial leverage of a sub account
        + + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |sub_account_id
        `sa` |string|True|The sub account ID to set the leverage for| + |instrument
        `i` |string|True|The instrument to set the leverage for| + |leverage
        `l` |string|True|The leverage to set for the sub account| diff --git a/artifacts/apidocs/schemas/api_set_initial_leverage_response.md b/artifacts/apidocs/schemas/api_set_initial_leverage_response.md index e69de29..415d0cc 100644 --- a/artifacts/apidocs/schemas/api_set_initial_leverage_response.md +++ b/artifacts/apidocs/schemas/api_set_initial_leverage_response.md @@ -0,0 +1,6 @@ +!!! info "[ApiSetInitialLeverageResponse](/../../schemas/api_set_initial_leverage_response)" + The response to set the initial leverage of a sub account
        + + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |success
        `s` |boolean|True|Whether the leverage was set successfully| diff --git a/artifacts/apidocs/schemas/api_settlement_price.md b/artifacts/apidocs/schemas/api_settlement_price.md index e69de29..60e0300 100644 --- a/artifacts/apidocs/schemas/api_settlement_price.md +++ b/artifacts/apidocs/schemas/api_settlement_price.md @@ -0,0 +1,55 @@ +!!! info "[APISettlementPrice](/../../schemas/api_settlement_price)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |base
        `b` |Currency|True|The base currency of the settlement price| + |quote
        `q` |Currency|True|The quote currency of the settlement price| + |settlement_time
        `st` |string|True|The settlement timestamp of the settlement price, expressed in unix nanoseconds| + |settlement_price
        `sp` |string|True|The settlement price, expressed in `9` decimals| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
        + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
        + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/api_settlement_price_request.md b/artifacts/apidocs/schemas/api_settlement_price_request.md index e69de29..9be5b8e 100644 --- a/artifacts/apidocs/schemas/api_settlement_price_request.md +++ b/artifacts/apidocs/schemas/api_settlement_price_request.md @@ -0,0 +1,59 @@ +!!! info "[ApiSettlementPriceRequest](/../../schemas/api_settlement_price_request)" + Lookup the historical settlement price of various pairs.

        Pagination works as follows:
        • We perform a reverse chronological lookup, starting from `end_time`. If `end_time` is not set, we start from the most recent data.
        • The lookup is limited to `limit` records. If more data is requested, the response will contain a `next` cursor for you to query the next page.
        • If a `cursor` is provided, it will be used to fetch results from that point onwards.
        • Pagination will continue until the `start_time` is reached. If `start_time` is not set, pagination will continue as far back as our data retention policy allows.

        + + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |base
        `b` |Currency|True|The base currency to select| + |quote
        `q` |Currency|True|The quote currency to select| + |start_time
        `st` |string|False
        `0`|Start time of settlement price in unix nanoseconds| + |end_time
        `et` |string|False
        `now()`|End time of settlement price in unix nanoseconds| + |limit
        `l` |integer|False
        `30`|The limit to query for. Defaults to 500; Max 1000| + |cursor
        `c` |string|False
        `''`|The cursor to indicate when to start the query from| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
        + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
        + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/api_settlement_price_response.md b/artifacts/apidocs/schemas/api_settlement_price_response.md index e69de29..04990a9 100644 --- a/artifacts/apidocs/schemas/api_settlement_price_response.md +++ b/artifacts/apidocs/schemas/api_settlement_price_response.md @@ -0,0 +1,60 @@ +!!! info "[ApiSettlementPriceResponse](/../../schemas/api_settlement_price_response)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |result
        `r` |[APISettlementPrice]|True|The funding rate result set for given interval| + |next
        `n` |string|False
        `''`|The cursor to indicate when to start the next query from| + ??? info "[APISettlementPrice](/../../schemas/api_settlement_price)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |base
        `b` |Currency|True|The base currency of the settlement price| + |quote
        `q` |Currency|True|The quote currency of the settlement price| + |settlement_time
        `st` |string|True|The settlement timestamp of the settlement price, expressed in unix nanoseconds| + |settlement_price
        `sp` |string|True|The settlement price, expressed in `9` decimals| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
        + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
        + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/api_socialized_loss_status_response.md b/artifacts/apidocs/schemas/api_socialized_loss_status_response.md index e69de29..a57e0bc 100644 --- a/artifacts/apidocs/schemas/api_socialized_loss_status_response.md +++ b/artifacts/apidocs/schemas/api_socialized_loss_status_response.md @@ -0,0 +1,7 @@ +!!! info "[ApiSocializedLossStatusResponse](/../../schemas/api_socialized_loss_status_response)" + The socialized loss status.
        + + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |is_active
        `ia` |boolean|True|Whether the socialized loss is active| + |haircut_ratio
        `hr` |string|True|The socialized loss haircut ratio in centi-beeps| diff --git a/artifacts/apidocs/schemas/api_sub_account_history_request.md b/artifacts/apidocs/schemas/api_sub_account_history_request.md index e69de29..8162539 100644 --- a/artifacts/apidocs/schemas/api_sub_account_history_request.md +++ b/artifacts/apidocs/schemas/api_sub_account_history_request.md @@ -0,0 +1,10 @@ +!!! info "[ApiSubAccountHistoryRequest](/../../schemas/api_sub_account_history_request)" + The request to get the history of a sub account
        SubAccount Summary values are snapshotted once every hour
        No snapshots are taken if the sub account has no activity in the hourly window
        History is preserved only for the last 30 days

        Pagination works as follows:
        • We perform a reverse chronological lookup, starting from `end_time`. If `end_time` is not set, we start from the most recent data.
        • The lookup is limited to `limit` records. If more data is requested, the response will contain a `next` cursor for you to query the next page.
        • If a `cursor` is provided, it will be used to fetch results from that point onwards.
        • Pagination will continue until the `start_time` is reached. If `start_time` is not set, pagination will continue as far back as our data retention policy allows.

        + + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |sub_account_id
        `sa` |string|True|The sub account ID to request for| + |start_time
        `st` |string|False
        `0`|Start time of sub account history in unix nanoseconds| + |end_time
        `et` |string|False
        `now()`|End time of sub account history in unix nanoseconds| + |limit
        `l` |integer|False
        `500`|The limit to query for. Defaults to 500; Max 1000| + |cursor
        `c` |string|False
        `''`|The cursor to indicate when to start the next query from| diff --git a/artifacts/apidocs/schemas/api_sub_account_history_response.md b/artifacts/apidocs/schemas/api_sub_account_history_response.md index e69de29..95bad3a 100644 --- a/artifacts/apidocs/schemas/api_sub_account_history_response.md +++ b/artifacts/apidocs/schemas/api_sub_account_history_response.md @@ -0,0 +1,96 @@ +!!! info "[ApiSubAccountHistoryResponse](/../../schemas/api_sub_account_history_response)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |result
        `r` |[SubAccount]|True|The sub account history matching the request sub account| + |next
        `n` |string|True|The cursor to indicate when to start the next query from| + ??? info "[SubAccount](/../../schemas/sub_account)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |event_time
        `et` |string|True|Time at which the event was emitted in unix nanoseconds| + |sub_account_id
        `sa` |string|True|The sub account ID this entry refers to| + |margin_type
        `mt` |MarginType|True|The type of margin algorithm this subaccount uses| + |settle_currency
        `sc` |Currency|True|The settlement, margin, and reporting currency of this account.
        This subaccount can only open positions quoted in this currency

        In the future, when users select a Multi-Currency Margin Type, this will be USD
        All other assets are converted to this currency for the purpose of calculating margin| + |unrealized_pnl
        `up` |string|True|The total unrealized PnL of all positions owned by this subaccount, denominated in quote currency decimal units.
        `unrealized_pnl = sum(position.unrealized_pnl * position.quote_index_price) / settle_index_price`| + |total_equity
        `te` |string|True|The notional value of your account if all positions are closed, excluding trading fees (reported in `settle_currency`).
        `total_equity = sum(spot_balance.balance * spot_balance.index_price) / settle_index_price + unrealized_pnl`| + |initial_margin
        `im` |string|True|The `total_equity` required to open positions in the account (reported in `settle_currency`).
        Computation is different depending on account's `margin_type`| + |maintenance_margin
        `mm` |string|True|The `total_equity` required to avoid liquidation of positions in the account (reported in `settle_currency`).
        Computation is different depending on account's `margin_type`| + |available_balance
        `ab` |string|True|The notional value available to transfer out of the trading account into the funding account (reported in `settle_currency`).
        `available_balance = total_equity - initial_margin - min(unrealized_pnl, 0)`| + |spot_balances
        `sb` |[SpotBalance]|True|The list of spot assets owned by this sub account, and their balances| + |positions
        `p` |[Positions]|True|The list of positions owned by this sub account| + |settle_index_price
        `si` |string|True|The index price of the settle currency. (reported in `USD`)| + ??? info "[MarginType](/../../schemas/margin_type)" + |Value| Description | + |-|-| + |`SIMPLE_CROSS_MARGIN` = 2|Simple Cross Margin Mode: all assets have a predictable margin impact, the whole subaccount shares a single margin| + |`PORTFOLIO_CROSS_MARGIN` = 3|Portfolio Cross Margin Mode: asset margin impact is analysed on portfolio level, the whole subaccount shares a single margin| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
        + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| + ??? info "[SpotBalance](/../../schemas/spot_balance)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |currency
        `c` |Currency|True|The currency you hold a spot balance in| + |balance
        `b` |string|True|This currency's balance in this trading account.| + |index_price
        `ip` |string|True|The index price of this currency. (reported in `USD`)| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
        + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| + ??? info "[Positions](/../../schemas/positions)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |event_time
        `et` |string|True|Time at which the event was emitted in unix nanoseconds| + |sub_account_id
        `sa` |string|True|The sub account ID that participated in the trade| + |instrument
        `i` |string|True|The instrument being represented| + |size
        `s` |string|True|The size of the position, expressed in base asset decimal units. Negative for short positions| + |notional
        `n` |string|True|The notional value of the position, negative for short assets, expressed in quote asset decimal units| + |entry_price
        `ep` |string|True|The entry price of the position, expressed in `9` decimals
        Whenever increasing the size of a position, the entry price is updated to the new average entry price
        `new_entry_price = (old_entry_price * old_size + trade_price * trade_size) / (old_size + trade_size)`| + |exit_price
        `ep1` |string|True|The exit price of the position, expressed in `9` decimals
        Whenever decreasing the size of a position, the exit price is updated to the new average exit price
        `new_exit_price = (old_exit_price * old_exit_trade_size + trade_price * trade_size) / (old_exit_trade_size + trade_size)`| + |mark_price
        `mp` |string|True|The mark price of the position, expressed in `9` decimals| + |unrealized_pnl
        `up` |string|True|The unrealized PnL of the position, expressed in quote asset decimal units
        `unrealized_pnl = (mark_price - entry_price) * size`| + |realized_pnl
        `rp` |string|True|The realized PnL of the position, expressed in quote asset decimal units
        `realized_pnl = (exit_price - entry_price) * exit_trade_size`| + |total_pnl
        `tp` |string|True|The total PnL of the position, expressed in quote asset decimal units
        `total_pnl = realized_pnl + unrealized_pnl`| + |roi
        `r` |string|True|The ROI of the position, expressed as a percentage
        `roi = (total_pnl / (entry_price * abs(size))) * 100^`| + |quote_index_price
        `qi` |string|True|The index price of the quote currency. (reported in `USD`)| + |est_liquidation_price
        `el` |string|True|The estimated liquidation price| diff --git a/artifacts/apidocs/schemas/api_sub_account_summary_request.md b/artifacts/apidocs/schemas/api_sub_account_summary_request.md index e69de29..870e4f3 100644 --- a/artifacts/apidocs/schemas/api_sub_account_summary_request.md +++ b/artifacts/apidocs/schemas/api_sub_account_summary_request.md @@ -0,0 +1,4 @@ +!!! info "[ApiSubAccountSummaryRequest](/../../schemas/api_sub_account_summary_request)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |sub_account_id
        `sa` |string|True|The subaccount ID to filter by| diff --git a/artifacts/apidocs/schemas/api_sub_account_summary_response.md b/artifacts/apidocs/schemas/api_sub_account_summary_response.md index e69de29..042a944 100644 --- a/artifacts/apidocs/schemas/api_sub_account_summary_response.md +++ b/artifacts/apidocs/schemas/api_sub_account_summary_response.md @@ -0,0 +1,97 @@ +!!! info "[ApiSubAccountSummaryResponse](/../../schemas/api_sub_account_summary_response)" + Query for sub-account details, including base currency balance, all derivative positions, margin levels, and P&L.
        + + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |result
        `r` |SubAccount|True|The sub account matching the request sub account| + ??? info "[SubAccount](/../../schemas/sub_account)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |event_time
        `et` |string|True|Time at which the event was emitted in unix nanoseconds| + |sub_account_id
        `sa` |string|True|The sub account ID this entry refers to| + |margin_type
        `mt` |MarginType|True|The type of margin algorithm this subaccount uses| + |settle_currency
        `sc` |Currency|True|The settlement, margin, and reporting currency of this account.
        This subaccount can only open positions quoted in this currency

        In the future, when users select a Multi-Currency Margin Type, this will be USD
        All other assets are converted to this currency for the purpose of calculating margin| + |unrealized_pnl
        `up` |string|True|The total unrealized PnL of all positions owned by this subaccount, denominated in quote currency decimal units.
        `unrealized_pnl = sum(position.unrealized_pnl * position.quote_index_price) / settle_index_price`| + |total_equity
        `te` |string|True|The notional value of your account if all positions are closed, excluding trading fees (reported in `settle_currency`).
        `total_equity = sum(spot_balance.balance * spot_balance.index_price) / settle_index_price + unrealized_pnl`| + |initial_margin
        `im` |string|True|The `total_equity` required to open positions in the account (reported in `settle_currency`).
        Computation is different depending on account's `margin_type`| + |maintenance_margin
        `mm` |string|True|The `total_equity` required to avoid liquidation of positions in the account (reported in `settle_currency`).
        Computation is different depending on account's `margin_type`| + |available_balance
        `ab` |string|True|The notional value available to transfer out of the trading account into the funding account (reported in `settle_currency`).
        `available_balance = total_equity - initial_margin - min(unrealized_pnl, 0)`| + |spot_balances
        `sb` |[SpotBalance]|True|The list of spot assets owned by this sub account, and their balances| + |positions
        `p` |[Positions]|True|The list of positions owned by this sub account| + |settle_index_price
        `si` |string|True|The index price of the settle currency. (reported in `USD`)| + ??? info "[MarginType](/../../schemas/margin_type)" + |Value| Description | + |-|-| + |`SIMPLE_CROSS_MARGIN` = 2|Simple Cross Margin Mode: all assets have a predictable margin impact, the whole subaccount shares a single margin| + |`PORTFOLIO_CROSS_MARGIN` = 3|Portfolio Cross Margin Mode: asset margin impact is analysed on portfolio level, the whole subaccount shares a single margin| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
        + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| + ??? info "[SpotBalance](/../../schemas/spot_balance)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |currency
        `c` |Currency|True|The currency you hold a spot balance in| + |balance
        `b` |string|True|This currency's balance in this trading account.| + |index_price
        `ip` |string|True|The index price of this currency. (reported in `USD`)| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
        + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| + ??? info "[Positions](/../../schemas/positions)" + |Name
        `Lite`|Type|Required
        `Default`| Description | + |-|-|-|-| + |event_time
        `et` |string|True|Time at which the event was emitted in unix nanoseconds| + |sub_account_id
        `sa` |string|True|The sub account ID that participated in the trade| + |instrument
        `i` |string|True|The instrument being represented| + |size
        `s` |string|True|The size of the position, expressed in base asset decimal units. Negative for short positions| + |notional
        `n` |string|True|The notional value of the position, negative for short assets, expressed in quote asset decimal units| + |entry_price
        `ep` |string|True|The entry price of the position, expressed in `9` decimals
        Whenever increasing the size of a position, the entry price is updated to the new average entry price
        `new_entry_price = (old_entry_price * old_size + trade_price * trade_size) / (old_size + trade_size)`| + |exit_price
        `ep1` |string|True|The exit price of the position, expressed in `9` decimals
        Whenever decreasing the size of a position, the exit price is updated to the new average exit price
        `new_exit_price = (old_exit_price * old_exit_trade_size + trade_price * trade_size) / (old_exit_trade_size + trade_size)`| + |mark_price
        `mp` |string|True|The mark price of the position, expressed in `9` decimals| + |unrealized_pnl
        `up` |string|True|The unrealized PnL of the position, expressed in quote asset decimal units
        `unrealized_pnl = (mark_price - entry_price) * size`| + |realized_pnl
        `rp` |string|True|The realized PnL of the position, expressed in quote asset decimal units
        `realized_pnl = (exit_price - entry_price) * exit_trade_size`| + |total_pnl
        `tp` |string|True|The total PnL of the position, expressed in quote asset decimal units
        `total_pnl = realized_pnl + unrealized_pnl`| + |roi
        `r` |string|True|The ROI of the position, expressed as a percentage
        `roi = (total_pnl / (entry_price * abs(size))) * 100^`| + |quote_index_price
        `qi` |string|True|The index price of the quote currency. (reported in `USD`)| + |est_liquidation_price
        `el` |string|True|The estimated liquidation price| 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 e69de29..ecac4c1 100644 --- a/artifacts/apidocs/schemas/api_sub_account_trade_aggregation_request.md +++ b/artifacts/apidocs/schemas/api_sub_account_trade_aggregation_request.md @@ -0,0 +1,20 @@ +!!! info "[ApiSubAccountTradeAggregationRequest](/../../schemas/api_sub_account_trade_aggregation_request)" + startTime are optional parameters. The semantics of these parameters are as follows:

          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |limit
          `l` |integer|True|Optional. The limit of the number of results to return| + |interval
          `i` |SubAccountTradeInterval|True|The interval of each sub account trade| + |sub_account_i_ds
          `sa` |[string]|True|The list of sub account ids to query| + |start_interval
          `si` |string|True|Optional. The starting time in unix nanoseconds of a specific interval to query| + |start_time
          `st` |string|False
          `0`|Optional. Start time in unix nanoseconds| + |end_time
          `et` |string|False
          `now()`|Optional. End time in unix nanoseconds| + |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| + ??? info "[SubAccountTradeInterval](/../../schemas/sub_account_trade_interval)" + |Value| Description | + |-|-| + |`SAT_1_MO` = 1|1 month| + |`SAT_1_D` = 2|1 day| + |`SAT_1_H` = 3|1 hour| 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 e69de29..7740ace 100644 --- a/artifacts/apidocs/schemas/api_sub_account_trade_aggregation_response.md +++ b/artifacts/apidocs/schemas/api_sub_account_trade_aggregation_response.md @@ -0,0 +1,15 @@ +!!! info "[ApiSubAccountTradeAggregationResponse](/../../schemas/api_sub_account_trade_aggregation_response)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |result
          `r` |[SubAccountTradeAggregation]|True|The sub account trade aggregation result set for given interval| + |next
          `n` |string|False
          `''`|The cursor to indicate when to start the next query from| + ??? info "[SubAccountTradeAggregation](/../../schemas/sub_account_trade_aggregation)" + Similar to sub-account trade, but not divided by individual assets.
          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |sub_account_id
          `sa` |string|True|The sub account id| + |total_fee
          `tf` |string|True|Total fee paid| + |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| diff --git a/artifacts/apidocs/schemas/api_ticker_feed_data_v1.md b/artifacts/apidocs/schemas/api_ticker_feed_data_v1.md index e69de29..1ec949c 100644 --- a/artifacts/apidocs/schemas/api_ticker_feed_data_v1.md +++ b/artifacts/apidocs/schemas/api_ticker_feed_data_v1.md @@ -0,0 +1,33 @@ +!!! info "[ApiTickerFeedDataV1](/../../schemas/api_ticker_feed_data_v1)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |result
          `r` |Ticker|True|The mini ticker matching the request asset| + ??? info "[Ticker](/../../schemas/ticker)" + Derived data such as the below, will not be included by default:
          - 24 hour volume (`buyVolume + sellVolume`)
          - 24 hour taker buy/sell ratio (`buyVolume / sellVolume`)
          - 24 hour average trade price (`volumeQ / volumeU`)
          - 24 hour average trade volume (`volume / trades`)
          - 24 hour percentage change (`24hStatChange / 24hStat`)
          - 48 hour statistics (`2 * 24hStat - 24hStatChange`)

          To query for an extended ticker payload, leverage the `greeks` and the `derived` flags.
          Ticker extensions are currently under design to offer you more convenience.
          These flags are only supported on the `Ticker Snapshot` WS endpoint, and on the `Ticker` API endpoint.

          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |event_time
          `et` |string|False
          `None`|Time at which the event was emitted in unix nanoseconds| + |instrument
          `i` |string|False
          `None`|The readable instrument name:
          • Perpetual: `ETH_USDT_Perp`
          • Future: `BTC_USDT_Fut_20Oct23`
          • Call: `ETH_USDT_Call_20Oct23_2800`
          • Put: `ETH_USDT_Put_20Oct23_2800`
          | + |mark_price
          `mp` |string|False
          `None`|The mark price of the instrument, expressed in `9` decimals| + |index_price
          `ip` |string|False
          `None`|The index price of the instrument, expressed in `9` decimals| + |last_price
          `lp` |string|False
          `None`|The last traded price of the instrument (also close price), expressed in `9` decimals| + |last_size
          `ls` |string|False
          `None`|The number of assets traded in the last trade, expressed in base asset decimal units| + |mid_price
          `mp1` |string|False
          `None`|The mid price of the instrument, expressed in `9` decimals| + |best_bid_price
          `bb` |string|False
          `None`|The best bid price of the instrument, expressed in `9` decimals| + |best_bid_size
          `bb1` |string|False
          `None`|The number of assets offered on the best bid price of the instrument, expressed in base asset decimal units| + |best_ask_price
          `ba` |string|False
          `None`|The best ask price of the instrument, expressed in `9` decimals| + |best_ask_size
          `ba1` |string|False
          `None`|The number of assets offered on the best ask price of the instrument, expressed in base asset decimal units| + |funding_rate_8h_curr
          `fr` |string|False
          `None`|The current funding rate of the instrument, expressed in percentage points| + |funding_rate_8h_avg
          `fr1` |string|False
          `None`|The average funding rate of the instrument (over last 8h), expressed in percentage points| + |interest_rate
          `ir` |string|False
          `None`|The interest rate of the underlying, expressed in centibeeps (1/100th of a basis point)| + |forward_price
          `fp` |string|False
          `None`|[Options] The forward price of the option, expressed in `9` decimals| + |buy_volume_24h_b
          `bv` |string|False
          `None`|The 24 hour taker buy volume of the instrument, expressed in base asset decimal units| + |sell_volume_24h_b
          `sv` |string|False
          `None`|The 24 hour taker sell volume of the instrument, expressed in base asset decimal units| + |buy_volume_24h_q
          `bv1` |string|False
          `None`|The 24 hour taker buy volume of the instrument, expressed in quote asset decimal units| + |sell_volume_24h_q
          `sv1` |string|False
          `None`|The 24 hour taker sell volume of the instrument, expressed in quote asset decimal units| + |high_price
          `hp` |string|False
          `None`|The 24 hour highest traded price of the instrument, expressed in `9` decimals| + |low_price
          `lp1` |string|False
          `None`|The 24 hour lowest traded price of the instrument, expressed in `9` decimals| + |open_price
          `op` |string|False
          `None`|The 24 hour first traded price of the instrument, expressed in `9` decimals| + |open_interest
          `oi` |string|False
          `None`|The open interest in the instrument, expressed in base asset decimal units| + |long_short_ratio
          `ls1` |string|False
          `None`|The ratio of accounts that are net long vs net short on this instrument| diff --git a/artifacts/apidocs/schemas/api_ticker_request.md b/artifacts/apidocs/schemas/api_ticker_request.md index e69de29..19d60d5 100644 --- a/artifacts/apidocs/schemas/api_ticker_request.md +++ b/artifacts/apidocs/schemas/api_ticker_request.md @@ -0,0 +1,6 @@ +!!! info "[ApiTickerRequest](/../../schemas/api_ticker_request)" + Retrieves a single ticker value for a single instrument. Please do not use this to repeatedly poll for data -- a websocket subscription is much more performant, and useful.
          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |instrument
          `i` |string|True|The readable instrument name:
          • Perpetual: `ETH_USDT_Perp`
          • Future: `BTC_USDT_Fut_20Oct23`
          • Call: `ETH_USDT_Call_20Oct23_2800`
          • Put: `ETH_USDT_Put_20Oct23_2800`
          | diff --git a/artifacts/apidocs/schemas/api_ticker_response.md b/artifacts/apidocs/schemas/api_ticker_response.md index e69de29..86fb1f4 100644 --- a/artifacts/apidocs/schemas/api_ticker_response.md +++ b/artifacts/apidocs/schemas/api_ticker_response.md @@ -0,0 +1,33 @@ +!!! info "[ApiTickerResponse](/../../schemas/api_ticker_response)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |result
          `r` |Ticker|True|The mini ticker matching the request asset| + ??? info "[Ticker](/../../schemas/ticker)" + Derived data such as the below, will not be included by default:
          - 24 hour volume (`buyVolume + sellVolume`)
          - 24 hour taker buy/sell ratio (`buyVolume / sellVolume`)
          - 24 hour average trade price (`volumeQ / volumeU`)
          - 24 hour average trade volume (`volume / trades`)
          - 24 hour percentage change (`24hStatChange / 24hStat`)
          - 48 hour statistics (`2 * 24hStat - 24hStatChange`)

          To query for an extended ticker payload, leverage the `greeks` and the `derived` flags.
          Ticker extensions are currently under design to offer you more convenience.
          These flags are only supported on the `Ticker Snapshot` WS endpoint, and on the `Ticker` API endpoint.

          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |event_time
          `et` |string|False
          `None`|Time at which the event was emitted in unix nanoseconds| + |instrument
          `i` |string|False
          `None`|The readable instrument name:
          • Perpetual: `ETH_USDT_Perp`
          • Future: `BTC_USDT_Fut_20Oct23`
          • Call: `ETH_USDT_Call_20Oct23_2800`
          • Put: `ETH_USDT_Put_20Oct23_2800`
          | + |mark_price
          `mp` |string|False
          `None`|The mark price of the instrument, expressed in `9` decimals| + |index_price
          `ip` |string|False
          `None`|The index price of the instrument, expressed in `9` decimals| + |last_price
          `lp` |string|False
          `None`|The last traded price of the instrument (also close price), expressed in `9` decimals| + |last_size
          `ls` |string|False
          `None`|The number of assets traded in the last trade, expressed in base asset decimal units| + |mid_price
          `mp1` |string|False
          `None`|The mid price of the instrument, expressed in `9` decimals| + |best_bid_price
          `bb` |string|False
          `None`|The best bid price of the instrument, expressed in `9` decimals| + |best_bid_size
          `bb1` |string|False
          `None`|The number of assets offered on the best bid price of the instrument, expressed in base asset decimal units| + |best_ask_price
          `ba` |string|False
          `None`|The best ask price of the instrument, expressed in `9` decimals| + |best_ask_size
          `ba1` |string|False
          `None`|The number of assets offered on the best ask price of the instrument, expressed in base asset decimal units| + |funding_rate_8h_curr
          `fr` |string|False
          `None`|The current funding rate of the instrument, expressed in percentage points| + |funding_rate_8h_avg
          `fr1` |string|False
          `None`|The average funding rate of the instrument (over last 8h), expressed in percentage points| + |interest_rate
          `ir` |string|False
          `None`|The interest rate of the underlying, expressed in centibeeps (1/100th of a basis point)| + |forward_price
          `fp` |string|False
          `None`|[Options] The forward price of the option, expressed in `9` decimals| + |buy_volume_24h_b
          `bv` |string|False
          `None`|The 24 hour taker buy volume of the instrument, expressed in base asset decimal units| + |sell_volume_24h_b
          `sv` |string|False
          `None`|The 24 hour taker sell volume of the instrument, expressed in base asset decimal units| + |buy_volume_24h_q
          `bv1` |string|False
          `None`|The 24 hour taker buy volume of the instrument, expressed in quote asset decimal units| + |sell_volume_24h_q
          `sv1` |string|False
          `None`|The 24 hour taker sell volume of the instrument, expressed in quote asset decimal units| + |high_price
          `hp` |string|False
          `None`|The 24 hour highest traded price of the instrument, expressed in `9` decimals| + |low_price
          `lp1` |string|False
          `None`|The 24 hour lowest traded price of the instrument, expressed in `9` decimals| + |open_price
          `op` |string|False
          `None`|The 24 hour first traded price of the instrument, expressed in `9` decimals| + |open_interest
          `oi` |string|False
          `None`|The open interest in the instrument, expressed in base asset decimal units| + |long_short_ratio
          `ls1` |string|False
          `None`|The ratio of accounts that are net long vs net short on this instrument| diff --git a/artifacts/apidocs/schemas/api_trade_history_request.md b/artifacts/apidocs/schemas/api_trade_history_request.md index e69de29..274e8db 100644 --- a/artifacts/apidocs/schemas/api_trade_history_request.md +++ b/artifacts/apidocs/schemas/api_trade_history_request.md @@ -0,0 +1,10 @@ +!!! info "[ApiTradeHistoryRequest](/../../schemas/api_trade_history_request)" + Perform historical lookup of public trades in any given instrument.
          This endpoint offers public trading data, use the Trading APIs instead to query for your personalized trade tape.
          Only data from the last three months will be retained.

          Pagination works as follows:
          • We perform a reverse chronological lookup, starting from `end_time`. If `end_time` is not set, we start from the most recent data.
          • The lookup is limited to `limit` records. If more data is requested, the response will contain a `next` cursor for you to query the next page.
          • If a `cursor` is provided, it will be used to fetch results from that point onwards.
          • Pagination will continue until the `start_time` is reached. If `start_time` is not set, pagination will continue as far back as our data retention policy allows.

          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |instrument
          `i` |string|True|The readable instrument name:
          • Perpetual: `ETH_USDT_Perp`
          • Future: `BTC_USDT_Fut_20Oct23`
          • Call: `ETH_USDT_Call_20Oct23_2800`
          • Put: `ETH_USDT_Put_20Oct23_2800`
          | + |start_time
          `st` |string|False
          `0`|The start time to apply in nanoseconds. If nil, this defaults to all start times. Otherwise, only entries matching the filter will be returned| + |end_time
          `et` |string|False
          `now()`|The end time to apply in nanoseconds. If nil, this defaults to all end times. Otherwise, only entries matching the filter will be returned| + |limit
          `l` |integer|False
          `500`|The limit to query for. Defaults to 500; Max 1000| + |cursor
          `c` |string|False
          `''`|The cursor to indicate when to start the query from| diff --git a/artifacts/apidocs/schemas/api_trade_history_response.md b/artifacts/apidocs/schemas/api_trade_history_response.md index e69de29..634a047 100644 --- a/artifacts/apidocs/schemas/api_trade_history_response.md +++ b/artifacts/apidocs/schemas/api_trade_history_response.md @@ -0,0 +1,28 @@ +!!! info "[ApiTradeHistoryResponse](/../../schemas/api_trade_history_response)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |result
          `r` |[Trade]|True|The public trades matching the request asset| + |next
          `n` |string|False
          `''`|The cursor to indicate when to start the next query from| + ??? info "[Trade](/../../schemas/trade)" + All private RFQs and Private AXEs will be filtered out from the responses
          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |event_time
          `et` |string|True|Time at which the event was emitted in unix nanoseconds| + |instrument
          `i` |string|True|The readable instrument name:
          • Perpetual: `ETH_USDT_Perp`
          • Future: `BTC_USDT_Fut_20Oct23`
          • Call: `ETH_USDT_Call_20Oct23_2800`
          • Put: `ETH_USDT_Put_20Oct23_2800`
          | + |is_taker_buyer
          `it` |boolean|True|If taker was the buyer on the trade| + |size
          `s` |string|True|The number of assets being traded, expressed in base asset decimal units| + |price
          `p` |string|True|The traded price, expressed in `9` decimals| + |mark_price
          `mp` |string|True|The mark price of the instrument at point of trade, expressed in `9` decimals| + |index_price
          `ip` |string|True|The index price of the instrument at point of trade, expressed in `9` decimals| + |interest_rate
          `ir` |string|True|The interest rate of the underlying at point of trade, expressed in centibeeps (1/100th of a basis point)| + |forward_price
          `fp` |string|True|[Options] The forward price of the option at point of trade, expressed in `9` decimals| + |trade_id
          `ti` |string|True|A trade identifier, globally unique, and monotonically increasing (not by `1`).
          All trades sharing a single taker execution share the same first component (before `-`), and `event_time`.
          `trade_id` is guaranteed to be consistent across MarketData `Trade` and Trading `Fill`.| + |venue
          `v` |Venue|True|The venue where the trade occurred| + ??? info "[Venue](/../../schemas/venue)" + The list of Trading Venues that are supported on the GRVT exchange
          + + |Value| Description | + |-|-| + |`ORDERBOOK` = 1|the trade is cleared on the orderbook venue| + |`RFQ` = 2|the trade is cleared on the RFQ venue| diff --git a/artifacts/apidocs/schemas/api_trade_request.md b/artifacts/apidocs/schemas/api_trade_request.md index e69de29..dcb5e48 100644 --- a/artifacts/apidocs/schemas/api_trade_request.md +++ b/artifacts/apidocs/schemas/api_trade_request.md @@ -0,0 +1,7 @@ +!!! info "[ApiTradeRequest](/../../schemas/api_trade_request)" + Retrieves up to 1000 of the most recent trades in any given instrument. Do not use this to poll for data -- a websocket subscription is much more performant, and useful.
          This endpoint offers public trading data, use the Trading APIs instead to query for your personalized trade tape.
          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |instrument
          `i` |string|True|The readable instrument name:
          • Perpetual: `ETH_USDT_Perp`
          • Future: `BTC_USDT_Fut_20Oct23`
          • Call: `ETH_USDT_Call_20Oct23_2800`
          • Put: `ETH_USDT_Put_20Oct23_2800`
          | + |limit
          `l` |integer|True|The limit to query for. Defaults to 500; Max 1000| diff --git a/artifacts/apidocs/schemas/api_trade_response.md b/artifacts/apidocs/schemas/api_trade_response.md index e69de29..8e1f882 100644 --- a/artifacts/apidocs/schemas/api_trade_response.md +++ b/artifacts/apidocs/schemas/api_trade_response.md @@ -0,0 +1,27 @@ +!!! info "[ApiTradeResponse](/../../schemas/api_trade_response)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |result
          `r` |[Trade]|True|The public trades matching the request asset| + ??? info "[Trade](/../../schemas/trade)" + All private RFQs and Private AXEs will be filtered out from the responses
          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |event_time
          `et` |string|True|Time at which the event was emitted in unix nanoseconds| + |instrument
          `i` |string|True|The readable instrument name:
          • Perpetual: `ETH_USDT_Perp`
          • Future: `BTC_USDT_Fut_20Oct23`
          • Call: `ETH_USDT_Call_20Oct23_2800`
          • Put: `ETH_USDT_Put_20Oct23_2800`
          | + |is_taker_buyer
          `it` |boolean|True|If taker was the buyer on the trade| + |size
          `s` |string|True|The number of assets being traded, expressed in base asset decimal units| + |price
          `p` |string|True|The traded price, expressed in `9` decimals| + |mark_price
          `mp` |string|True|The mark price of the instrument at point of trade, expressed in `9` decimals| + |index_price
          `ip` |string|True|The index price of the instrument at point of trade, expressed in `9` decimals| + |interest_rate
          `ir` |string|True|The interest rate of the underlying at point of trade, expressed in centibeeps (1/100th of a basis point)| + |forward_price
          `fp` |string|True|[Options] The forward price of the option at point of trade, expressed in `9` decimals| + |trade_id
          `ti` |string|True|A trade identifier, globally unique, and monotonically increasing (not by `1`).
          All trades sharing a single taker execution share the same first component (before `-`), and `event_time`.
          `trade_id` is guaranteed to be consistent across MarketData `Trade` and Trading `Fill`.| + |venue
          `v` |Venue|True|The venue where the trade occurred| + ??? info "[Venue](/../../schemas/venue)" + The list of Trading Venues that are supported on the GRVT exchange
          + + |Value| Description | + |-|-| + |`ORDERBOOK` = 1|the trade is cleared on the orderbook venue| + |`RFQ` = 2|the trade is cleared on the RFQ venue| diff --git a/artifacts/apidocs/schemas/api_transfer_history_request.md b/artifacts/apidocs/schemas/api_transfer_history_request.md index e69de29..c1fc682 100644 --- a/artifacts/apidocs/schemas/api_transfer_history_request.md +++ b/artifacts/apidocs/schemas/api_transfer_history_request.md @@ -0,0 +1,35 @@ +!!! info "[ApiTransferHistoryRequest](/../../schemas/api_transfer_history_request)" + The request to get the historical transfers of an account
          The history is returned in reverse chronological order

          Pagination works as follows:
          • We perform a reverse chronological lookup, starting from `end_time`. If `end_time` is not set, we start from the most recent data.
          • The lookup is limited to `limit` records. If more data is requested, the response will contain a `next` cursor for you to query the next page.
          • If a `cursor` is provided, it will be used to fetch results from that point onwards.
          • Pagination will continue until the `start_time` is reached. If `start_time` is not set, pagination will continue as far back as our data retention policy allows.

          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |currency
          `c` |[Currency]|True|The token currency to query for, if nil or empty, return all transfers. Otherwise, only entries matching the filter will be returned| + |start_time
          `st` |string|False
          `0`|The start time to query for in unix nanoseconds| + |end_time
          `et` |string|False
          `now()`|The end time to query for in unix nanoseconds| + |limit
          `l` |integer|False
          `500`|The limit to query for. Defaults to 500; Max 1000| + |cursor
          `c1` |string|False
          `''`|The cursor to indicate when to start the next query from| + |tx_id
          `ti` |string|False
          `0`|The transaction ID to query for| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
          + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/api_transfer_history_response.md b/artifacts/apidocs/schemas/api_transfer_history_response.md index e69de29..0b2e6c0 100644 --- a/artifacts/apidocs/schemas/api_transfer_history_response.md +++ b/artifacts/apidocs/schemas/api_transfer_history_response.md @@ -0,0 +1,58 @@ +!!! info "[ApiTransferHistoryResponse](/../../schemas/api_transfer_history_response)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |result
          `r` |[TransferHistory]|True|The transfer history matching the request account| + |next
          `n` |string|False
          `''`|The cursor to indicate when to start the next query from| + ??? info "[TransferHistory](/../../schemas/transfer_history)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |tx_id
          `ti` |string|True|The transaction ID of the transfer| + |from_account_id
          `fa` |string|True|The account to transfer from| + |from_sub_account_id
          `fs` |string|True|The subaccount to transfer from (0 if transferring from main account)| + |to_account_id
          `ta` |string|True|The account to deposit into| + |to_sub_account_id
          `ts` |string|True|The subaccount to transfer to (0 if transferring to main account)| + |currency
          `c` |Currency|True|The token currency to transfer| + |num_tokens
          `nt` |string|True|The number of tokens to transfer| + |signature
          `s` |Signature|True|The signature of the transfer| + |event_time
          `et` |string|True|The timestamp of the transfer in unix nanoseconds| + |transfer_type
          `tt` |TransferType|True|The type of transfer| + |transfer_metadata
          `tm` |string|True|The metadata of the transfer| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
          + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| + ??? 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 "[TransferType](/../../schemas/transfer_type)" + |Value| Description | + |-|-| + |`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| diff --git a/artifacts/apidocs/schemas/api_transfer_request.md b/artifacts/apidocs/schemas/api_transfer_request.md index e69de29..3b125bf 100644 --- a/artifacts/apidocs/schemas/api_transfer_request.md +++ b/artifacts/apidocs/schemas/api_transfer_request.md @@ -0,0 +1,53 @@ +!!! info "[ApiTransferRequest](/../../schemas/api_transfer_request)" + This API allows you to transfer funds in multiple different ways

          • Between SubAccounts within your Main Account

          • Between your MainAccount and your SubAccounts

          • To other MainAccounts that you have previously allowlisted

          Fast Withdrawal Funding Address
          For fast withdrawals, funds must be sent to the designated funding account address. Please ensure you use the correct address based on the environment:
          Production Environment Address:
          [To be updated, not ready yet]
          This address should be specified as the to_account_id in your API requests for transferring funds using the transfer API. Ensure accurate input to avoid loss of funds or use the UI.

          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |from_account_id
          `fa` |string|True|The main account to transfer from| + |from_sub_account_id
          `fs` |string|True|The subaccount to transfer from (0 if transferring from main account)| + |to_account_id
          `ta` |string|True|The main account to deposit into| + |to_sub_account_id
          `ts` |string|True|The subaccount to transfer to (0 if transferring to main account)| + |currency
          `c` |Currency|True|The token currency to transfer| + |num_tokens
          `nt` |string|True|The number of tokens to transfer, quoted in tokenCurrency decimal units| + |signature
          `s` |Signature|True|The signature of the transfer| + |transfer_type
          `tt` |TransferType|True|The type of transfer| + |transfer_metadata
          `tm` |string|True|The metadata of the transfer| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
          + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| + ??? 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 "[TransferType](/../../schemas/transfer_type)" + |Value| Description | + |-|-| + |`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| diff --git a/artifacts/apidocs/schemas/api_withdrawal_history_request.md b/artifacts/apidocs/schemas/api_withdrawal_history_request.md index e69de29..30005f0 100644 --- a/artifacts/apidocs/schemas/api_withdrawal_history_request.md +++ b/artifacts/apidocs/schemas/api_withdrawal_history_request.md @@ -0,0 +1,34 @@ +!!! info "[ApiWithdrawalHistoryRequest](/../../schemas/api_withdrawal_history_request)" + The request to get the historical withdrawals of an account
          The history is returned in reverse chronological order

          Pagination works as follows:
          • We perform a reverse chronological lookup, starting from `end_time`. If `end_time` is not set, we start from the most recent data.
          • The lookup is limited to `limit` records. If more data is requested, the response will contain a `next` cursor for you to query the next page.
          • If a `cursor` is provided, it will be used to fetch results from that point onwards.
          • Pagination will continue until the `start_time` is reached. If `start_time` is not set, pagination will continue as far back as our data retention policy allows.

          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |currency
          `c` |[Currency]|True|The token currency to query for, if nil or empty, return all withdrawals. Otherwise, only entries matching the filter will be returned| + |start_time
          `st` |string|False
          `0`|The start time to query for in unix nanoseconds| + |end_time
          `et` |string|False
          `now()`|The end time to query for in unix nanoseconds| + |limit
          `l` |integer|False
          `500`|The limit to query for. Defaults to 500; Max 1000| + |cursor
          `c1` |string|False
          `''`|The cursor to indicate when to start the next query from| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
          + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/api_withdrawal_history_response.md b/artifacts/apidocs/schemas/api_withdrawal_history_response.md index e69de29..7d38da5 100644 --- a/artifacts/apidocs/schemas/api_withdrawal_history_response.md +++ b/artifacts/apidocs/schemas/api_withdrawal_history_response.md @@ -0,0 +1,48 @@ +!!! info "[ApiWithdrawalHistoryResponse](/../../schemas/api_withdrawal_history_response)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |result
          `r` |[WithdrawalHistory]|True|The withdrawals history matching the request account| + |next
          `n` |string|False
          `''`|The cursor to indicate when to start the next query from| + ??? info "[WithdrawalHistory](/../../schemas/withdrawal_history)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |tx_id
          `ti` |string|True|The transaction ID of the withdrawal| + |from_account_id
          `fa` |string|True|The subaccount to withdraw from| + |to_eth_address
          `te` |string|True|The ethereum address to withdraw to| + |currency
          `c` |Currency|True|The token currency to withdraw| + |num_tokens
          `nt` |string|True|The number of tokens to withdraw| + |signature
          `s` |Signature|True|The signature of the withdrawal| + |event_time
          `et` |string|True|The timestamp of the withdrawal in unix nanoseconds| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
          + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| + ??? 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.| diff --git a/artifacts/apidocs/schemas/api_withdrawal_request.md b/artifacts/apidocs/schemas/api_withdrawal_request.md index e69de29..c79afd1 100644 --- a/artifacts/apidocs/schemas/api_withdrawal_request.md +++ b/artifacts/apidocs/schemas/api_withdrawal_request.md @@ -0,0 +1,43 @@ +!!! info "[ApiWithdrawalRequest](/../../schemas/api_withdrawal_request)" + Leverage this API to initialize a withdrawal from GRVT's Hyperchain onto Ethereum.
          Do take note that the bridging process does take time. The GRVT UI will help you keep track of bridging progress, and notify you once its complete.

          If not withdrawing the entirety of your balance, there is a minimum withdrawal amount. Currently that amount is ~25 USDT.
          Withdrawal fees also apply to cover the cost of the Ethereum transaction.
          Note that your funds will always remain in self-custory throughout the withdrawal process. At no stage does GRVT gain control over your funds.
          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |from_account_id
          `fa` |string|True|The main account to withdraw from| + |to_eth_address
          `te` |string|True|The Ethereum wallet to withdraw into| + |currency
          `c` |Currency|True|The token currency to withdraw| + |num_tokens
          `nt` |string|True|The number of tokens to withdraw, quoted in tokenCurrency decimal units| + |signature
          `s` |Signature|True|The signature of the withdrawal| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
          + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| + ??? 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.| diff --git a/artifacts/apidocs/schemas/approximate_lp_point.md b/artifacts/apidocs/schemas/approximate_lp_point.md index e69de29..13b9f96 100644 --- a/artifacts/apidocs/schemas/approximate_lp_point.md +++ b/artifacts/apidocs/schemas/approximate_lp_point.md @@ -0,0 +1,6 @@ +!!! info "[ApproximateLPPoint](/../../schemas/approximate_lp_point)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |off_chain_account_id
          `oc` |string|True|The off chain account id| + |liquidity_score
          `ls` |string|True|Liquidity score| + |rank
          `r` |integer|True|The rank of user in the LP leaderboard| diff --git a/artifacts/apidocs/schemas/approximate_lp_snapshot.md b/artifacts/apidocs/schemas/approximate_lp_snapshot.md index e69de29..53049e6 100644 --- a/artifacts/apidocs/schemas/approximate_lp_snapshot.md +++ b/artifacts/apidocs/schemas/approximate_lp_snapshot.md @@ -0,0 +1,10 @@ +!!! info "[ApproximateLPSnapshot](/../../schemas/approximate_lp_snapshot)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |main_account_id
          `ma` |string|True|The main account id| + |underlying_multiplier
          `um` |string|True|Underlying multiplier| + |market_share_multiplier
          `ms` |string|True|Market share multiplier| + |bid_fast_market_multiplier
          `bf` |integer|True|Fast market multiplier| + |ask_fast_market_multiplier
          `af` |integer|True|Fast market multiplier| + |liquidity_score
          `ls` |string|True|Liquidity score| + |calculate_at
          `ca` |string|True|The time when the snapshot was calculated| diff --git a/artifacts/apidocs/schemas/asset_max_qty.md b/artifacts/apidocs/schemas/asset_max_qty.md index e69de29..4be3de2 100644 --- a/artifacts/apidocs/schemas/asset_max_qty.md +++ b/artifacts/apidocs/schemas/asset_max_qty.md @@ -0,0 +1,6 @@ +!!! info "[AssetMaxQty](/../../schemas/asset_max_qty)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |asset
          `a` |string|True|The asset associated with the max quantity| + |max_buy_qty
          `mb` |string|True|The maximum buy quantity| + |max_sell_qty
          `ms` |string|True|The maximum sell quantity| diff --git a/artifacts/apidocs/schemas/cancel_status_feed.md b/artifacts/apidocs/schemas/cancel_status_feed.md index e69de29..f0e5279 100644 --- a/artifacts/apidocs/schemas/cancel_status_feed.md +++ b/artifacts/apidocs/schemas/cancel_status_feed.md @@ -0,0 +1,46 @@ +!!! info "[CancelStatusFeed](/../../schemas/cancel_status_feed)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |sub_account_id
          `sa` |string|True|The subaccount ID that requested the cancellation| + |client_order_id
          `co` |string|True|A unique identifier for the active order within a subaccount, specified by the client| + |order_id
          `oi` |string|True|A unique 128-bit identifier for the order, deterministically generated within the GRVT backend| + |reason
          `r` |OrderRejectReason|True|The user-provided reason for cancelling the order| + |update_time
          `ut` |string|False
          `0`|[Filled by GRVT Backend] Time at which the cancellation status was updated by GRVT in unix nanoseconds| + |cancel_status
          `cs` |CancelStatus|True|Status of the cancellation attempt| + ??? 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| + ??? 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.| diff --git a/artifacts/apidocs/schemas/candlestick.md b/artifacts/apidocs/schemas/candlestick.md index e69de29..4db93ec 100644 --- a/artifacts/apidocs/schemas/candlestick.md +++ b/artifacts/apidocs/schemas/candlestick.md @@ -0,0 +1,15 @@ +!!! info "[Candlestick](/../../schemas/candlestick)" +
          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |open_time
          `ot` |string|True|Open time of kline bar in unix nanoseconds| + |close_time
          `ct` |string|True|Close time of kline bar in unix nanosecond| + |open
          `o` |string|True|The open price, expressed in underlying currency resolution units| + |close
          `c` |string|True|The close price, expressed in underlying currency resolution units| + |high
          `h` |string|True|The high price, expressed in underlying currency resolution units| + |low
          `l` |string|True|The low price, expressed in underlying currency resolution units| + |volume_b
          `vb` |string|True|The underlying volume transacted, expressed in base asset decimal units| + |volume_q
          `vq` |string|True|The quote volume transacted, expressed in quote asset decimal units| + |trades
          `t` |integer|True|The number of trades transacted| + |instrument
          `i` |string|True|The readable instrument name:
          • Perpetual: `ETH_USDT_Perp`
          • Future: `BTC_USDT_Fut_20Oct23`
          • Call: `ETH_USDT_Call_20Oct23_2800`
          • Put: `ETH_USDT_Put_20Oct23_2800`
          | diff --git a/artifacts/apidocs/schemas/claim_ecosystem_badge_response.md b/artifacts/apidocs/schemas/claim_ecosystem_badge_response.md index e69de29..ba155e6 100644 --- a/artifacts/apidocs/schemas/claim_ecosystem_badge_response.md +++ b/artifacts/apidocs/schemas/claim_ecosystem_badge_response.md @@ -0,0 +1,54 @@ +!!! info "[ClaimEcosystemBadgeResponse](/../../schemas/claim_ecosystem_badge_response)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |badge
          `b` |EpochBadge|True|The epoch badge| + ??? info "[EpochBadge](/../../schemas/epoch_badge)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |account_id
          `ai` |string|True|The off chain account id| + |main_account_id
          `ma` |string|True|The account ID| + |type
          `t` |RewardProgramType|True|The type of the reward program| + |epoch
          `e` |integer|True|The epoch number| + |epoch_start_time
          `es` |string|True|The start time of the epoch| + |epoch_end_time
          `ee` |string|True|The end time of the epoch| + |badge
          `b` |EpochBadgeType|True|The type of the badge| + |distributed_badges
          `db` |[EpochBadgeType]|True|The distributed badges| + |total_point
          `tp` |string|True|Total point| + |rank
          `r` |integer|True|Rank| + |claimed_at
          `ca` |string|True|The time when the badge was claimed, or the epoch end time if the user has already completed the KYC process| + ??? info "[RewardProgramType](/../../schemas/reward_program_type)" + |Value| Description | + |-|-| + |`ECOSYSTEM` = 1|| + |`TRADER` = 2|| + |`LP` = 3|| + ??? info "[EpochBadgeType](/../../schemas/epoch_badge_type)" + |Value| Description | + |-|-| + |`CHAMPION` = 1|Champion| + |`LEGEND` = 2|Legend| + |`VETERAN` = 3|Veteran| + |`ELITE` = 4|Elite| + |`MASTER` = 5|Master| + |`EXPERT` = 6|Expert| + |`WARRIOR` = 7|Warrior| + |`SERGEANT` = 8|Sergeant| + |`RANGER` = 9|Ranger| + |`CHALLENGER` = 10|Challenger| + |`APPRENTICE` = 11|Apprentice| + |`ROOKIE` = 12|Rookie| + ??? info "[EpochBadgeType](/../../schemas/epoch_badge_type)" + |Value| Description | + |-|-| + |`CHAMPION` = 1|Champion| + |`LEGEND` = 2|Legend| + |`VETERAN` = 3|Veteran| + |`ELITE` = 4|Elite| + |`MASTER` = 5|Master| + |`EXPERT` = 6|Expert| + |`WARRIOR` = 7|Warrior| + |`SERGEANT` = 8|Sergeant| + |`RANGER` = 9|Ranger| + |`CHALLENGER` = 10|Challenger| + |`APPRENTICE` = 11|Apprentice| + |`ROOKIE` = 12|Rookie| diff --git a/artifacts/apidocs/schemas/deposit.md b/artifacts/apidocs/schemas/deposit.md index e69de29..29d5e17 100644 --- a/artifacts/apidocs/schemas/deposit.md +++ b/artifacts/apidocs/schemas/deposit.md @@ -0,0 +1,31 @@ +!!! info "[Deposit](/../../schemas/deposit)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |tx_hash
          `th` |string|True|The hash of the bridgemint event producing the deposit| + |to_account_id
          `ta` |string|True|The account to deposit into| + |currency
          `c` |Currency|True|The token currency to deposit| + |num_tokens
          `nt` |string|True|The number of tokens to deposit| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
          + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/deposit_history.md b/artifacts/apidocs/schemas/deposit_history.md index e69de29..95b2926 100644 --- a/artifacts/apidocs/schemas/deposit_history.md +++ b/artifacts/apidocs/schemas/deposit_history.md @@ -0,0 +1,35 @@ +!!! info "[DepositHistory](/../../schemas/deposit_history)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |l_1_hash
          `l1` |string|True|The L1 txHash of the deposit| + |l_2_hash
          `l2` |string|True|The L2 txHash of the deposit| + |to_account_id
          `ta` |string|True|The account to deposit into| + |currency
          `c` |Currency|True|The token currency to deposit| + |num_tokens
          `nt` |string|True|The number of tokens to deposit| + |initiated_time
          `it` |string|True|The timestamp when the deposit was initiated on L1 in unix nanoseconds| + |confirmed_time
          `ct` |string|True|The timestamp when the deposit was confirmed on L2 in unix nanoseconds| + |from_address
          `fa` |string|True|The address of the sender| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
          + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/ecosystem_leaderboard_user.md b/artifacts/apidocs/schemas/ecosystem_leaderboard_user.md index e69de29..aa1101f 100644 --- a/artifacts/apidocs/schemas/ecosystem_leaderboard_user.md +++ b/artifacts/apidocs/schemas/ecosystem_leaderboard_user.md @@ -0,0 +1,7 @@ +!!! info "[EcosystemLeaderboardUser](/../../schemas/ecosystem_leaderboard_user)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |account_id
          `ai` |string|True|The off chain account id| + |rank
          `r` |integer|True|The rank of the account in the ecosystem| + |total_point
          `tp` |string|True|Total ecosystem point| + |twitter_username
          `tu` |string|True|The twitter username of the account| diff --git a/artifacts/apidocs/schemas/ecosystem_metric.md b/artifacts/apidocs/schemas/ecosystem_metric.md index e69de29..687d5e6 100644 --- a/artifacts/apidocs/schemas/ecosystem_metric.md +++ b/artifacts/apidocs/schemas/ecosystem_metric.md @@ -0,0 +1,8 @@ +!!! info "[EcosystemMetric](/../../schemas/ecosystem_metric)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |direct_invite_count
          `di` |integer|True|Direct invite count| + |indirect_invite_count
          `ii` |integer|True|Indirect invite count| + |direct_invite_trading_volume
          `di1` |string|True|Direct invite trading volume| + |indirect_invite_trading_volume
          `ii1` |string|True|Indirect invite trading volume| + |total_point
          `tp` |string|True|Total ecosystem point of this epoch/phase| diff --git a/artifacts/apidocs/schemas/ecosystem_point.md b/artifacts/apidocs/schemas/ecosystem_point.md index e69de29..8318444 100644 --- a/artifacts/apidocs/schemas/ecosystem_point.md +++ b/artifacts/apidocs/schemas/ecosystem_point.md @@ -0,0 +1,16 @@ +!!! info "[EcosystemPoint](/../../schemas/ecosystem_point)" +
          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |account_id
          `ai` |string|True|The off chain account id| + |main_account_id
          `ma` |string|True|The main account id| + |total_point
          `tp` |string|True|Total ecosystem point| + |direct_invite_count
          `di` |integer|True|Direct invite count| + |indirect_invite_count
          `ii` |integer|True|Indirect invite count| + |direct_invite_trading_volume
          `di1` |string|True|Direct invite trading volume| + |indirect_invite_trading_volume
          `ii1` |string|True|Indirect invite trading volume| + |calculate_at
          `ca` |string|True|The time when the ecosystem point is calculated| + |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| diff --git a/artifacts/apidocs/schemas/empty_request.md b/artifacts/apidocs/schemas/empty_request.md index e69de29..97f3c00 100644 --- a/artifacts/apidocs/schemas/empty_request.md +++ b/artifacts/apidocs/schemas/empty_request.md @@ -0,0 +1,5 @@ +!!! info "[EmptyRequest](/../../schemas/empty_request)" + Used for requests that do not require any parameters
          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| diff --git a/artifacts/apidocs/schemas/epoch_badge.md b/artifacts/apidocs/schemas/epoch_badge.md index e69de29..2827adf 100644 --- a/artifacts/apidocs/schemas/epoch_badge.md +++ b/artifacts/apidocs/schemas/epoch_badge.md @@ -0,0 +1,50 @@ +!!! info "[EpochBadge](/../../schemas/epoch_badge)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |account_id
          `ai` |string|True|The off chain account id| + |main_account_id
          `ma` |string|True|The account ID| + |type
          `t` |RewardProgramType|True|The type of the reward program| + |epoch
          `e` |integer|True|The epoch number| + |epoch_start_time
          `es` |string|True|The start time of the epoch| + |epoch_end_time
          `ee` |string|True|The end time of the epoch| + |badge
          `b` |EpochBadgeType|True|The type of the badge| + |distributed_badges
          `db` |[EpochBadgeType]|True|The distributed badges| + |total_point
          `tp` |string|True|Total point| + |rank
          `r` |integer|True|Rank| + |claimed_at
          `ca` |string|True|The time when the badge was claimed, or the epoch end time if the user has already completed the KYC process| + ??? info "[RewardProgramType](/../../schemas/reward_program_type)" + |Value| Description | + |-|-| + |`ECOSYSTEM` = 1|| + |`TRADER` = 2|| + |`LP` = 3|| + ??? info "[EpochBadgeType](/../../schemas/epoch_badge_type)" + |Value| Description | + |-|-| + |`CHAMPION` = 1|Champion| + |`LEGEND` = 2|Legend| + |`VETERAN` = 3|Veteran| + |`ELITE` = 4|Elite| + |`MASTER` = 5|Master| + |`EXPERT` = 6|Expert| + |`WARRIOR` = 7|Warrior| + |`SERGEANT` = 8|Sergeant| + |`RANGER` = 9|Ranger| + |`CHALLENGER` = 10|Challenger| + |`APPRENTICE` = 11|Apprentice| + |`ROOKIE` = 12|Rookie| + ??? info "[EpochBadgeType](/../../schemas/epoch_badge_type)" + |Value| Description | + |-|-| + |`CHAMPION` = 1|Champion| + |`LEGEND` = 2|Legend| + |`VETERAN` = 3|Veteran| + |`ELITE` = 4|Elite| + |`MASTER` = 5|Master| + |`EXPERT` = 6|Expert| + |`WARRIOR` = 7|Warrior| + |`SERGEANT` = 8|Sergeant| + |`RANGER` = 9|Ranger| + |`CHALLENGER` = 10|Challenger| + |`APPRENTICE` = 11|Apprentice| + |`ROOKIE` = 12|Rookie| diff --git a/artifacts/apidocs/schemas/epoch_badge_point_distribution.md b/artifacts/apidocs/schemas/epoch_badge_point_distribution.md index e69de29..6f7dede 100644 --- a/artifacts/apidocs/schemas/epoch_badge_point_distribution.md +++ b/artifacts/apidocs/schemas/epoch_badge_point_distribution.md @@ -0,0 +1,33 @@ +!!! info "[EpochBadgePointDistribution](/../../schemas/epoch_badge_point_distribution)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |badge
          `b` |EpochBadgeType|True|The type of the badge| + |epoch
          `e` |integer|True|The epoch number| + |type
          `t` |RewardProgramType|True|The type of the reward program| + |min_point
          `mp` |string|True|The minimum point to get the badge| + |max_point
          `mp1` |string|True|The maximum point to get the badge| + |min_rank
          `mr` |integer|True|The minimum rank to get the badge| + |max_rank
          `mr1` |integer|True|The maximum rank to get the badge| + |total_point
          `tp` |string|True|The total point to get the badge| + |count
          `c` |integer|True|The number of users to get the badge| + ??? info "[EpochBadgeType](/../../schemas/epoch_badge_type)" + |Value| Description | + |-|-| + |`CHAMPION` = 1|Champion| + |`LEGEND` = 2|Legend| + |`VETERAN` = 3|Veteran| + |`ELITE` = 4|Elite| + |`MASTER` = 5|Master| + |`EXPERT` = 6|Expert| + |`WARRIOR` = 7|Warrior| + |`SERGEANT` = 8|Sergeant| + |`RANGER` = 9|Ranger| + |`CHALLENGER` = 10|Challenger| + |`APPRENTICE` = 11|Apprentice| + |`ROOKIE` = 12|Rookie| + ??? info "[RewardProgramType](/../../schemas/reward_program_type)" + |Value| Description | + |-|-| + |`ECOSYSTEM` = 1|| + |`TRADER` = 2|| + |`LP` = 3|| diff --git a/artifacts/apidocs/schemas/error.md b/artifacts/apidocs/schemas/error.md index e69de29..e864262 100644 --- a/artifacts/apidocs/schemas/error.md +++ b/artifacts/apidocs/schemas/error.md @@ -0,0 +1,7 @@ +!!! info "[Error](/../../schemas/error)" + An error response
          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |code
          `c` |integer|True|The error code for the request| + |message
          `m` |string|True|The error message for the request| diff --git a/artifacts/apidocs/schemas/fill.md b/artifacts/apidocs/schemas/fill.md index e69de29..54794d3 100644 --- a/artifacts/apidocs/schemas/fill.md +++ b/artifacts/apidocs/schemas/fill.md @@ -0,0 +1,33 @@ +!!! info "[Fill](/../../schemas/fill)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |event_time
          `et` |string|True|Time at which the event was emitted in unix nanoseconds| + |sub_account_id
          `sa` |string|True|The sub account ID that participated in the trade| + |instrument
          `i` |string|True|The instrument being represented| + |is_buyer
          `ib` |boolean|True|The side that the subaccount took on the trade| + |is_taker
          `it` |boolean|True|The role that the subaccount took on the trade| + |size
          `s` |string|True|The number of assets being traded, expressed in base asset decimal units| + |price
          `p` |string|True|The traded price, expressed in `9` decimals| + |mark_price
          `mp` |string|True|The mark price of the instrument at point of trade, expressed in `9` decimals| + |index_price
          `ip` |string|True|The index price of the instrument at point of trade, expressed in `9` decimals| + |interest_rate
          `ir` |string|True|The interest rate of the underlying at point of trade, expressed in centibeeps (1/100th of a basis point)| + |forward_price
          `fp` |string|True|[Options] The forward price of the option at point of trade, expressed in `9` decimals| + |realized_pnl
          `rp` |string|True|The realized PnL of the trade, expressed in quote asset decimal units (0 if increasing position size)| + |fee
          `f` |string|True|The fees paid on the trade, expressed in quote asset decimal unit (negative if maker rebate applied)| + |fee_rate
          `fr` |string|True|The fee rate paid on the trade| + |trade_id
          `ti` |string|True|A trade identifier, globally unique, and monotonically increasing (not by `1`).
          All trades sharing a single taker execution share the same first component (before `-`), and `event_time`.
          `trade_id` is guaranteed to be consistent across MarketData `Trade` and Trading `Fill`.| + |order_id
          `oi` |string|True|An order identifier| + |venue
          `v` |Venue|True|The venue where the trade occurred| + |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| + |signer
          `s1` |string|True|The address (public key) of the wallet signing the payload| + |broker
          `b` |BrokerTag|False
          ``|Specifies the broker who brokered the order| + ??? info "[Venue](/../../schemas/venue)" + The list of Trading Venues that are supported on the GRVT exchange
          + + |Value| Description | + |-|-| + |`ORDERBOOK` = 1|the trade is cleared on the orderbook venue| + |`RFQ` = 2|the trade is cleared on the RFQ venue| + ??? info "[BrokerTag](/../../schemas/broker_tag)" + BrokerTag is a tag for the broker that the order is sent from.
          + diff --git a/artifacts/apidocs/schemas/flat_referral.md b/artifacts/apidocs/schemas/flat_referral.md index e69de29..9e17431 100644 --- a/artifacts/apidocs/schemas/flat_referral.md +++ b/artifacts/apidocs/schemas/flat_referral.md @@ -0,0 +1,15 @@ +!!! info "[FlatReferral](/../../schemas/flat_referral)" +
          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |account_id
          `ai` |string|True|The off chain account id| + |referrer_id
          `ri` |string|True|The off chain referrer account id| + |referrer_level
          `rl` |integer|True|The referrer level; 1: direct referrer, 2: indirect referrer| + |account_create_time
          `ac` |string|True|The account creation time| + |main_account_id
          `ma` |string|True|The main account id| + |referrer_main_account_id
          `rm` |string|True|The referrer main account id| + |is_business
          `ib` |boolean|True|The account is a business account or not| + |is_kyc_completed
          `ik` |boolean|True|The account is KYC verified or not| + |kyc_completed_at
          `kc` |string|True|The KYC completed time| + |kyc_type
          `kt` |string|True|The KYC type, can be 'individual' or 'business'| diff --git a/artifacts/apidocs/schemas/funding_account_summary.md b/artifacts/apidocs/schemas/funding_account_summary.md index e69de29..1ba48cc 100644 --- a/artifacts/apidocs/schemas/funding_account_summary.md +++ b/artifacts/apidocs/schemas/funding_account_summary.md @@ -0,0 +1,38 @@ +!!! info "[FundingAccountSummary](/../../schemas/funding_account_summary)" + The funding account summary, that reports the total equity and spot balances of a funding (main) account
          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |main_account_id
          `ma` |string|True|The main account ID of the account to which the summary belongs| + |total_equity
          `te` |string|True|Total equity of the main account, denominated in USD| + |spot_balances
          `sb` |[SpotBalance]|True|The list of spot assets owned by this main account, and their balances| + ??? info "[SpotBalance](/../../schemas/spot_balance)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |currency
          `c` |Currency|True|The currency you hold a spot balance in| + |balance
          `b` |string|True|This currency's balance in this trading account.| + |index_price
          `ip` |string|True|The index price of this currency. (reported in `USD`)| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
          + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/funding_payment.md b/artifacts/apidocs/schemas/funding_payment.md index e69de29..24f9d6c 100644 --- a/artifacts/apidocs/schemas/funding_payment.md +++ b/artifacts/apidocs/schemas/funding_payment.md @@ -0,0 +1,33 @@ +!!! info "[FundingPayment](/../../schemas/funding_payment)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |event_time
          `et` |string|True|Time at which the event was emitted in unix nanoseconds| + |sub_account_id
          `sa` |string|True|The sub account ID that made the funding payment| + |instrument
          `i` |string|True|The perpetual instrument being funded| + |currency
          `c` |Currency|True|The currency of the funding payment| + |amount
          `a` |string|True|The amount of the funding payment. Positive if paid, negative if received| + |tx_id
          `ti` |string|True|The transaction ID of the funding payment.
          Funding payments can be triggered by a trade, transfer, or liquidation.
          The `tx_id` will match the corresponding `trade_id` or `tx_id`.| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
          + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/funding_rate.md b/artifacts/apidocs/schemas/funding_rate.md index e69de29..8f47179 100644 --- a/artifacts/apidocs/schemas/funding_rate.md +++ b/artifacts/apidocs/schemas/funding_rate.md @@ -0,0 +1,7 @@ +!!! info "[FundingRate](/../../schemas/funding_rate)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |instrument
          `i` |string|True|The readable instrument name:
          • Perpetual: `ETH_USDT_Perp`
          • Future: `BTC_USDT_Fut_20Oct23`
          • Call: `ETH_USDT_Call_20Oct23_2800`
          • Put: `ETH_USDT_Put_20Oct23_2800`
          | + |funding_rate
          `fr` |string|True|The funding rate of the instrument, expressed in percentage points| + |funding_time
          `ft` |string|True|The funding timestamp of the funding rate, expressed in unix nanoseconds| + |mark_price
          `mp` |string|True|The mark price of the instrument at funding timestamp, expressed in `9` decimals| diff --git a/artifacts/apidocs/schemas/get_claimable_ecosystem_badge_response.md b/artifacts/apidocs/schemas/get_claimable_ecosystem_badge_response.md index e69de29..8572e59 100644 --- a/artifacts/apidocs/schemas/get_claimable_ecosystem_badge_response.md +++ b/artifacts/apidocs/schemas/get_claimable_ecosystem_badge_response.md @@ -0,0 +1,56 @@ +!!! info "[GetClaimableEcosystemBadgeResponse](/../../schemas/get_claimable_ecosystem_badge_response)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |badge
          `b` |EpochBadge|True|The epoch badge| + |is_claimable
          `ic` |boolean|True|Whether the badge is claimable| + |claimable_until
          `cu` |string|True|The time when the badge is claimable| + ??? info "[EpochBadge](/../../schemas/epoch_badge)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |account_id
          `ai` |string|True|The off chain account id| + |main_account_id
          `ma` |string|True|The account ID| + |type
          `t` |RewardProgramType|True|The type of the reward program| + |epoch
          `e` |integer|True|The epoch number| + |epoch_start_time
          `es` |string|True|The start time of the epoch| + |epoch_end_time
          `ee` |string|True|The end time of the epoch| + |badge
          `b` |EpochBadgeType|True|The type of the badge| + |distributed_badges
          `db` |[EpochBadgeType]|True|The distributed badges| + |total_point
          `tp` |string|True|Total point| + |rank
          `r` |integer|True|Rank| + |claimed_at
          `ca` |string|True|The time when the badge was claimed, or the epoch end time if the user has already completed the KYC process| + ??? info "[RewardProgramType](/../../schemas/reward_program_type)" + |Value| Description | + |-|-| + |`ECOSYSTEM` = 1|| + |`TRADER` = 2|| + |`LP` = 3|| + ??? info "[EpochBadgeType](/../../schemas/epoch_badge_type)" + |Value| Description | + |-|-| + |`CHAMPION` = 1|Champion| + |`LEGEND` = 2|Legend| + |`VETERAN` = 3|Veteran| + |`ELITE` = 4|Elite| + |`MASTER` = 5|Master| + |`EXPERT` = 6|Expert| + |`WARRIOR` = 7|Warrior| + |`SERGEANT` = 8|Sergeant| + |`RANGER` = 9|Ranger| + |`CHALLENGER` = 10|Challenger| + |`APPRENTICE` = 11|Apprentice| + |`ROOKIE` = 12|Rookie| + ??? info "[EpochBadgeType](/../../schemas/epoch_badge_type)" + |Value| Description | + |-|-| + |`CHAMPION` = 1|Champion| + |`LEGEND` = 2|Legend| + |`VETERAN` = 3|Veteran| + |`ELITE` = 4|Elite| + |`MASTER` = 5|Master| + |`EXPERT` = 6|Expert| + |`WARRIOR` = 7|Warrior| + |`SERGEANT` = 8|Sergeant| + |`RANGER` = 9|Ranger| + |`CHALLENGER` = 10|Challenger| + |`APPRENTICE` = 11|Apprentice| + |`ROOKIE` = 12|Rookie| diff --git a/artifacts/apidocs/schemas/initial_leverage_result.md b/artifacts/apidocs/schemas/initial_leverage_result.md index e69de29..f6c5cb0 100644 --- a/artifacts/apidocs/schemas/initial_leverage_result.md +++ b/artifacts/apidocs/schemas/initial_leverage_result.md @@ -0,0 +1,7 @@ +!!! info "[InitialLeverageResult](/../../schemas/initial_leverage_result)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |instrument
          `i` |string|True|The instrument to get the leverage for| + |leverage
          `l` |string|True|The initial leverage of the sub account| + |min_leverage
          `ml` |string|True|The min leverage this sub account can set| + |max_leverage
          `ml1` |string|True|The max leverage this sub account can set| diff --git a/artifacts/apidocs/schemas/instrument.md b/artifacts/apidocs/schemas/instrument.md index e69de29..70c3b41 100644 --- a/artifacts/apidocs/schemas/instrument.md +++ b/artifacts/apidocs/schemas/instrument.md @@ -0,0 +1,88 @@ +!!! info "[Instrument](/../../schemas/instrument)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |instrument
          `i` |string|True|The readable instrument name:
          • Perpetual: `ETH_USDT_Perp`
          • Future: `BTC_USDT_Fut_20Oct23`
          • Call: `ETH_USDT_Call_20Oct23_2800`
          • Put: `ETH_USDT_Put_20Oct23_2800`
          | + |instrument_hash
          `ih` |string|True|The asset ID used for instrument signing.| + |base
          `b` |Currency|True|The base currency| + |quote
          `q` |Currency|True|The quote currency| + |kind
          `k` |Kind|True|The kind of instrument| + |venues
          `v` |[Venue]|True|Venues that this instrument can be traded at| + |settlement_period
          `sp1` |InstrumentSettlementPeriod|True|The settlement period of the instrument| + |base_decimals
          `bd` |integer|True|The smallest denomination of the base asset supported by GRVT (+3 represents 0.001, -3 represents 1000, 0 represents 1)| + |quote_decimals
          `qd` |integer|True|The smallest denomination of the quote asset supported by GRVT (+3 represents 0.001, -3 represents 1000, 0 represents 1)| + |tick_size
          `ts` |string|True|The size of a single tick, expressed in price decimal units| + |min_size
          `ms` |string|True|The minimum contract size, expressed in base asset decimal units| + |create_time
          `ct` |string|True|Creation time in unix nanoseconds| + |max_position_size
          `mp` |string|True|The maximum position size, expressed in base asset decimal units| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
          + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
          + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| + ??? info "[Kind](/../../schemas/kind)" + The list of asset kinds that are supported on the GRVT exchange
          + + |Value| Description | + |-|-| + |`PERPETUAL` = 1|the perpetual asset kind| + |`FUTURE` = 2|the future asset kind| + |`CALL` = 3|the call option asset kind| + |`PUT` = 4|the put option asset kind| + ??? info "[Venue](/../../schemas/venue)" + The list of Trading Venues that are supported on the GRVT exchange
          + + |Value| Description | + |-|-| + |`ORDERBOOK` = 1|the trade is cleared on the orderbook venue| + |`RFQ` = 2|the trade is cleared on the RFQ venue| + ??? info "[InstrumentSettlementPeriod](/../../schemas/instrument_settlement_period)" + |Value| Description | + |-|-| + |`PERPETUAL` = 1|Instrument settles through perpetual funding cycles| + |`DAILY` = 2|Instrument settles at an expiry date, marked as a daily instrument| + |`WEEKLY` = 3|Instrument settles at an expiry date, marked as a weekly instrument| + |`MONTHLY` = 4|Instrument settles at an expiry date, marked as a monthly instrument| + |`QUARTERLY` = 5|Instrument settles at an expiry date, marked as a quarterly instrument| diff --git a/artifacts/apidocs/schemas/jsonrpc_request.md b/artifacts/apidocs/schemas/jsonrpc_request.md index e69de29..6f18dc3 100644 --- a/artifacts/apidocs/schemas/jsonrpc_request.md +++ b/artifacts/apidocs/schemas/jsonrpc_request.md @@ -0,0 +1,9 @@ +!!! info "[JSONRPCRequest](/../../schemas/jsonrpc_request)" + All Websocket JSON RPC Requests are housed in this wrapper. You may specify a stream, and a list of feeds to subscribe to.
          If a `request_id` is supplied in this JSON RPC request, it will be propagated back to any relevant JSON RPC responses (including error).
          When subscribing to the same primary selector again, the previous secondary selector will be replaced. See `Overview` page for more details.
          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |jsonrpc
          `j` |string|True|The JSON RPC version to use for the request| + |method
          `m` |string|True|The method to use for the request (eg: `subscribe` / `unsubscribe` / `v1/instrument` )| + |params
          `p` |object|True|The parameters for the request| + |id
          `i` |integer|False
          `0`|Optional Field which is used to match the response by the client.
          If not passed, this field will not be returned| diff --git a/artifacts/apidocs/schemas/jsonrpc_response.md b/artifacts/apidocs/schemas/jsonrpc_response.md index e69de29..05dc32f 100644 --- a/artifacts/apidocs/schemas/jsonrpc_response.md +++ b/artifacts/apidocs/schemas/jsonrpc_response.md @@ -0,0 +1,17 @@ +!!! info "[JSONRPCResponse](/../../schemas/jsonrpc_response)" + All Websocket JSON RPC Responses are housed in this wrapper. It returns a confirmation of the JSON RPC subscribe request.
          If a `request_id` is supplied in the JSON RPC request, it will be propagated back in this JSON RPC response.
          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |jsonrpc
          `j` |string|True|The JSON RPC version to use for the request| + |result
          `r` |object|False
          `null`|The result for the request| + |error
          `e` |Error|False
          `null`|The error for the request| + |id
          `i` |integer|False
          `0`|Optional Field which is used to match the response by the client.
          If not passed, this field will not be returned| + |method
          `m` |string|True|The method used in the request for this response (eg: `subscribe` / `unsubscribe` / `v1/instrument` )| + ??? info "[Error](/../../schemas/error)" + An error response
          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |code
          `c` |integer|True|The error code for the request| + |message
          `m` |string|True|The error message for the request| diff --git a/artifacts/apidocs/schemas/lp_point.md b/artifacts/apidocs/schemas/lp_point.md index e69de29..975f3fd 100644 --- a/artifacts/apidocs/schemas/lp_point.md +++ b/artifacts/apidocs/schemas/lp_point.md @@ -0,0 +1,6 @@ +!!! info "[LPPoint](/../../schemas/lp_point)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |main_account_id
          `ma` |string|True|The main account id| + |liquidity_score
          `ls` |string|True|Liquidity score| + |rank
          `r` |integer|True|The rank of user in the LP leaderboard| diff --git a/artifacts/apidocs/schemas/lp_snapshot.md b/artifacts/apidocs/schemas/lp_snapshot.md index e69de29..93baebb 100644 --- a/artifacts/apidocs/schemas/lp_snapshot.md +++ b/artifacts/apidocs/schemas/lp_snapshot.md @@ -0,0 +1,11 @@ +!!! info "[LPSnapshot](/../../schemas/lp_snapshot)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |main_account_id
          `ma` |string|True|The main account id| + |lp_asset
          `la` |string|True|The LP Asset| + |underlying_multiplier
          `um` |string|True|Underlying multiplier| + |maker_trading_volume
          `mt` |string|True|Maker trading volume| + |bid_fast_market_multiplier
          `bf` |integer|True|Fast market multiplier| + |ask_fast_market_multiplier
          `af` |integer|True|Fast market multiplier| + |liquidity_score
          `ls` |string|True|Liquidity score| + |calculate_at
          `ca` |string|True|The time when the snapshot was calculated| diff --git a/artifacts/apidocs/schemas/mini_ticker.md b/artifacts/apidocs/schemas/mini_ticker.md index e69de29..5825c1d 100644 --- a/artifacts/apidocs/schemas/mini_ticker.md +++ b/artifacts/apidocs/schemas/mini_ticker.md @@ -0,0 +1,14 @@ +!!! info "[MiniTicker](/../../schemas/mini_ticker)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |event_time
          `et` |string|False
          `None`|Time at which the event was emitted in unix nanoseconds| + |instrument
          `i` |string|False
          `None`|The readable instrument name:
          • Perpetual: `ETH_USDT_Perp`
          • Future: `BTC_USDT_Fut_20Oct23`
          • Call: `ETH_USDT_Call_20Oct23_2800`
          • Put: `ETH_USDT_Put_20Oct23_2800`
          | + |mark_price
          `mp` |string|False
          `None`|The mark price of the instrument, expressed in `9` decimals| + |index_price
          `ip` |string|False
          `None`|The index price of the instrument, expressed in `9` decimals| + |last_price
          `lp` |string|False
          `None`|The last traded price of the instrument (also close price), expressed in `9` decimals| + |last_size
          `ls` |string|False
          `None`|The number of assets traded in the last trade, expressed in base asset decimal units| + |mid_price
          `mp1` |string|False
          `None`|The mid price of the instrument, expressed in `9` decimals| + |best_bid_price
          `bb` |string|False
          `None`|The best bid price of the instrument, expressed in `9` decimals| + |best_bid_size
          `bb1` |string|False
          `None`|The number of assets offered on the best bid price of the instrument, expressed in base asset decimal units| + |best_ask_price
          `ba` |string|False
          `None`|The best ask price of the instrument, expressed in `9` decimals| + |best_ask_size
          `ba1` |string|False
          `None`|The number of assets offered on the best ask price of the instrument, expressed in base asset decimal units| diff --git a/artifacts/apidocs/schemas/order.md b/artifacts/apidocs/schemas/order.md index e69de29..dc30486 100644 --- a/artifacts/apidocs/schemas/order.md +++ b/artifacts/apidocs/schemas/order.md @@ -0,0 +1,106 @@ +!!! 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| + |trigger
          `t` |TriggerOrderMetadata|True|Trigger fields are used to support any type of trigger order such as TP/SL| + |broker
          `b` |BrokerTag|False
          ``|Specifies the broker who brokered the order| + ??? info "[BrokerTag](/../../schemas/broker_tag)" + BrokerTag is a tag for the broker that the order is sent from.
          + + ??? 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| diff --git a/artifacts/apidocs/schemas/order_leg.md b/artifacts/apidocs/schemas/order_leg.md index e69de29..e708e86 100644 --- a/artifacts/apidocs/schemas/order_leg.md +++ b/artifacts/apidocs/schemas/order_leg.md @@ -0,0 +1,7 @@ +!!! 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| diff --git a/artifacts/apidocs/schemas/order_metadata.md b/artifacts/apidocs/schemas/order_metadata.md index e69de29..f591907 100644 --- a/artifacts/apidocs/schemas/order_metadata.md +++ b/artifacts/apidocs/schemas/order_metadata.md @@ -0,0 +1,12 @@ +!!! 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| + |trigger
          `t` |TriggerOrderMetadata|True|Trigger fields are used to support any type of trigger order such as TP/SL| + |broker
          `b` |BrokerTag|False
          ``|Specifies the broker who brokered the order| + ??? info "[BrokerTag](/../../schemas/broker_tag)" + BrokerTag is a tag for the broker that the order is sent from.
          + diff --git a/artifacts/apidocs/schemas/order_state.md b/artifacts/apidocs/schemas/order_state.md index e69de29..a3c24c7 100644 --- a/artifacts/apidocs/schemas/order_state.md +++ b/artifacts/apidocs/schemas/order_state.md @@ -0,0 +1,50 @@ +!!! 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| diff --git a/artifacts/apidocs/schemas/order_state_feed.md b/artifacts/apidocs/schemas/order_state_feed.md index e69de29..3d25347 100644 --- a/artifacts/apidocs/schemas/order_state_feed.md +++ b/artifacts/apidocs/schemas/order_state_feed.md @@ -0,0 +1,56 @@ +!!! info "[OrderStateFeed](/../../schemas/order_state_feed)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |order_id
          `oi` |string|True|A unique 128-bit identifier for the order, deterministically generated within the GRVT backend| + |client_order_id
          `co` |string|True|A unique identifier for the active order within a subaccount, specified by the client| + |order_state
          `os` |OrderState|True|The order state object being created or updated| + ??? 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| diff --git a/artifacts/apidocs/schemas/orderbook_level.md b/artifacts/apidocs/schemas/orderbook_level.md index e69de29..3988d20 100644 --- a/artifacts/apidocs/schemas/orderbook_level.md +++ b/artifacts/apidocs/schemas/orderbook_level.md @@ -0,0 +1,6 @@ +!!! info "[OrderbookLevel](/../../schemas/orderbook_level)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |price
          `p` |string|True|The price of the level, expressed in `9` decimals| + |size
          `s` |string|True|The number of assets offered, expressed in base asset decimal units| + |num_orders
          `no` |integer|True|The number of open orders at this level| diff --git a/artifacts/apidocs/schemas/orderbook_levels.md b/artifacts/apidocs/schemas/orderbook_levels.md index e69de29..413b3b2 100644 --- a/artifacts/apidocs/schemas/orderbook_levels.md +++ b/artifacts/apidocs/schemas/orderbook_levels.md @@ -0,0 +1,19 @@ +!!! info "[OrderbookLevels](/../../schemas/orderbook_levels)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |event_time
          `et` |string|True|Time at which the event was emitted in unix nanoseconds| + |instrument
          `i` |string|True|The readable instrument name:
          • Perpetual: `ETH_USDT_Perp`
          • Future: `BTC_USDT_Fut_20Oct23`
          • Call: `ETH_USDT_Call_20Oct23_2800`
          • Put: `ETH_USDT_Put_20Oct23_2800`
          | + |bids
          `b` |[OrderbookLevel]|True|The list of best bids up till query depth| + |asks
          `a` |[OrderbookLevel]|True|The list of best asks up till query depth| + ??? info "[OrderbookLevel](/../../schemas/orderbook_level)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |price
          `p` |string|True|The price of the level, expressed in `9` decimals| + |size
          `s` |string|True|The number of assets offered, expressed in base asset decimal units| + |num_orders
          `no` |integer|True|The number of open orders at this level| + ??? info "[OrderbookLevel](/../../schemas/orderbook_level)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |price
          `p` |string|True|The price of the level, expressed in `9` decimals| + |size
          `s` |string|True|The number of assets offered, expressed in base asset decimal units| + |num_orders
          `no` |integer|True|The number of open orders at this level| diff --git a/artifacts/apidocs/schemas/positions.md b/artifacts/apidocs/schemas/positions.md index e69de29..96665d3 100644 --- a/artifacts/apidocs/schemas/positions.md +++ b/artifacts/apidocs/schemas/positions.md @@ -0,0 +1,17 @@ +!!! info "[Positions](/../../schemas/positions)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |event_time
          `et` |string|True|Time at which the event was emitted in unix nanoseconds| + |sub_account_id
          `sa` |string|True|The sub account ID that participated in the trade| + |instrument
          `i` |string|True|The instrument being represented| + |size
          `s` |string|True|The size of the position, expressed in base asset decimal units. Negative for short positions| + |notional
          `n` |string|True|The notional value of the position, negative for short assets, expressed in quote asset decimal units| + |entry_price
          `ep` |string|True|The entry price of the position, expressed in `9` decimals
          Whenever increasing the size of a position, the entry price is updated to the new average entry price
          `new_entry_price = (old_entry_price * old_size + trade_price * trade_size) / (old_size + trade_size)`| + |exit_price
          `ep1` |string|True|The exit price of the position, expressed in `9` decimals
          Whenever decreasing the size of a position, the exit price is updated to the new average exit price
          `new_exit_price = (old_exit_price * old_exit_trade_size + trade_price * trade_size) / (old_exit_trade_size + trade_size)`| + |mark_price
          `mp` |string|True|The mark price of the position, expressed in `9` decimals| + |unrealized_pnl
          `up` |string|True|The unrealized PnL of the position, expressed in quote asset decimal units
          `unrealized_pnl = (mark_price - entry_price) * size`| + |realized_pnl
          `rp` |string|True|The realized PnL of the position, expressed in quote asset decimal units
          `realized_pnl = (exit_price - entry_price) * exit_trade_size`| + |total_pnl
          `tp` |string|True|The total PnL of the position, expressed in quote asset decimal units
          `total_pnl = realized_pnl + unrealized_pnl`| + |roi
          `r` |string|True|The ROI of the position, expressed as a percentage
          `roi = (total_pnl / (entry_price * abs(size))) * 100^`| + |quote_index_price
          `qi` |string|True|The index price of the quote currency. (reported in `USD`)| + |est_liquidation_price
          `el` |string|True|The estimated liquidation price| diff --git a/artifacts/apidocs/schemas/pre_order_check_result.md b/artifacts/apidocs/schemas/pre_order_check_result.md index e69de29..a7185c4 100644 --- a/artifacts/apidocs/schemas/pre_order_check_result.md +++ b/artifacts/apidocs/schemas/pre_order_check_result.md @@ -0,0 +1,38 @@ +!!! info "[PreOrderCheckResult](/../../schemas/pre_order_check_result)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |max_qty
          `mq` |[AssetMaxQty]|True|The maximum quantity for each leg| + |margin_required
          `mr` |string|True|The margin required for the order (reported in `settle_currency`)| + |order_valid
          `ov` |boolean|True|Whether the order is valid| + |reason
          `r` |string|True|The reason the order is invalid, if any| + |settle_currency
          `sc` |Currency|True|The subAccount settle currency| + ??? info "[AssetMaxQty](/../../schemas/asset_max_qty)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |asset
          `a` |string|True|The asset associated with the max quantity| + |max_buy_qty
          `mb` |string|True|The maximum buy quantity| + |max_sell_qty
          `ms` |string|True|The maximum sell quantity| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
          + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/query_epoch_badge_point_distribution_request.md b/artifacts/apidocs/schemas/query_epoch_badge_point_distribution_request.md index e69de29..937a21d 100644 --- a/artifacts/apidocs/schemas/query_epoch_badge_point_distribution_request.md +++ b/artifacts/apidocs/schemas/query_epoch_badge_point_distribution_request.md @@ -0,0 +1,13 @@ +!!! info "[QueryEpochBadgePointDistributionRequest](/../../schemas/query_epoch_badge_point_distribution_request)" + Query list of epoch badges
          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |epoch
          `e` |integer|False
          `'all'`|The numerical epoch index| + |type
          `t` |RewardProgramType|True|The type of the reward program| + ??? info "[RewardProgramType](/../../schemas/reward_program_type)" + |Value| Description | + |-|-| + |`ECOSYSTEM` = 1|| + |`TRADER` = 2|| + |`LP` = 3|| diff --git a/artifacts/apidocs/schemas/query_epoch_badge_point_distribution_response.md b/artifacts/apidocs/schemas/query_epoch_badge_point_distribution_response.md index e69de29..3831ba8 100644 --- a/artifacts/apidocs/schemas/query_epoch_badge_point_distribution_response.md +++ b/artifacts/apidocs/schemas/query_epoch_badge_point_distribution_response.md @@ -0,0 +1,37 @@ +!!! info "[QueryEpochBadgePointDistributionResponse](/../../schemas/query_epoch_badge_point_distribution_response)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |result
          `r` |[EpochBadgePointDistribution]|True|The list of epoch badges| + ??? info "[EpochBadgePointDistribution](/../../schemas/epoch_badge_point_distribution)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |badge
          `b` |EpochBadgeType|True|The type of the badge| + |epoch
          `e` |integer|True|The epoch number| + |type
          `t` |RewardProgramType|True|The type of the reward program| + |min_point
          `mp` |string|True|The minimum point to get the badge| + |max_point
          `mp1` |string|True|The maximum point to get the badge| + |min_rank
          `mr` |integer|True|The minimum rank to get the badge| + |max_rank
          `mr1` |integer|True|The maximum rank to get the badge| + |total_point
          `tp` |string|True|The total point to get the badge| + |count
          `c` |integer|True|The number of users to get the badge| + ??? info "[EpochBadgeType](/../../schemas/epoch_badge_type)" + |Value| Description | + |-|-| + |`CHAMPION` = 1|Champion| + |`LEGEND` = 2|Legend| + |`VETERAN` = 3|Veteran| + |`ELITE` = 4|Elite| + |`MASTER` = 5|Master| + |`EXPERT` = 6|Expert| + |`WARRIOR` = 7|Warrior| + |`SERGEANT` = 8|Sergeant| + |`RANGER` = 9|Ranger| + |`CHALLENGER` = 10|Challenger| + |`APPRENTICE` = 11|Apprentice| + |`ROOKIE` = 12|Rookie| + ??? info "[RewardProgramType](/../../schemas/reward_program_type)" + |Value| Description | + |-|-| + |`ECOSYSTEM` = 1|| + |`TRADER` = 2|| + |`LP` = 3|| diff --git a/artifacts/apidocs/schemas/query_epoch_badge_request.md b/artifacts/apidocs/schemas/query_epoch_badge_request.md index e69de29..6cac69e 100644 --- a/artifacts/apidocs/schemas/query_epoch_badge_request.md +++ b/artifacts/apidocs/schemas/query_epoch_badge_request.md @@ -0,0 +1,16 @@ +!!! info "[QueryEpochBadgeRequest](/../../schemas/query_epoch_badge_request)" + Query list of epoch badges
          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |account_id
          `ai` |string|False
          `'all'`|The off chain account id to get referral stats| + |epoch
          `e` |integer|False
          `'all'`|The numerical epoch index| + |type
          `t` |RewardProgramType|False
          `'all'`|The type of the reward program| + |limit
          `l` |integer|False
          `'500'`|The limit to query for. Defaults to 500; Max 1000| + |cursor
          `c` |string|False
          `'all'`|The cursor to indicate when to start the query from| + ??? info "[RewardProgramType](/../../schemas/reward_program_type)" + |Value| Description | + |-|-| + |`ECOSYSTEM` = 1|| + |`TRADER` = 2|| + |`LP` = 3|| diff --git a/artifacts/apidocs/schemas/query_epoch_badge_response.md b/artifacts/apidocs/schemas/query_epoch_badge_response.md index e69de29..9700a5a 100644 --- a/artifacts/apidocs/schemas/query_epoch_badge_response.md +++ b/artifacts/apidocs/schemas/query_epoch_badge_response.md @@ -0,0 +1,55 @@ +!!! info "[QueryEpochBadgeResponse](/../../schemas/query_epoch_badge_response)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |result
          `r` |[EpochBadge]|True|The list of epoch badges| + |next
          `n` |string|True|The cursor to indicate when to start the query from| + ??? info "[EpochBadge](/../../schemas/epoch_badge)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |account_id
          `ai` |string|True|The off chain account id| + |main_account_id
          `ma` |string|True|The account ID| + |type
          `t` |RewardProgramType|True|The type of the reward program| + |epoch
          `e` |integer|True|The epoch number| + |epoch_start_time
          `es` |string|True|The start time of the epoch| + |epoch_end_time
          `ee` |string|True|The end time of the epoch| + |badge
          `b` |EpochBadgeType|True|The type of the badge| + |distributed_badges
          `db` |[EpochBadgeType]|True|The distributed badges| + |total_point
          `tp` |string|True|Total point| + |rank
          `r` |integer|True|Rank| + |claimed_at
          `ca` |string|True|The time when the badge was claimed, or the epoch end time if the user has already completed the KYC process| + ??? info "[RewardProgramType](/../../schemas/reward_program_type)" + |Value| Description | + |-|-| + |`ECOSYSTEM` = 1|| + |`TRADER` = 2|| + |`LP` = 3|| + ??? info "[EpochBadgeType](/../../schemas/epoch_badge_type)" + |Value| Description | + |-|-| + |`CHAMPION` = 1|Champion| + |`LEGEND` = 2|Legend| + |`VETERAN` = 3|Veteran| + |`ELITE` = 4|Elite| + |`MASTER` = 5|Master| + |`EXPERT` = 6|Expert| + |`WARRIOR` = 7|Warrior| + |`SERGEANT` = 8|Sergeant| + |`RANGER` = 9|Ranger| + |`CHALLENGER` = 10|Challenger| + |`APPRENTICE` = 11|Apprentice| + |`ROOKIE` = 12|Rookie| + ??? info "[EpochBadgeType](/../../schemas/epoch_badge_type)" + |Value| Description | + |-|-| + |`CHAMPION` = 1|Champion| + |`LEGEND` = 2|Legend| + |`VETERAN` = 3|Veteran| + |`ELITE` = 4|Elite| + |`MASTER` = 5|Master| + |`EXPERT` = 6|Expert| + |`WARRIOR` = 7|Warrior| + |`SERGEANT` = 8|Sergeant| + |`RANGER` = 9|Ranger| + |`CHALLENGER` = 10|Challenger| + |`APPRENTICE` = 11|Apprentice| + |`ROOKIE` = 12|Rookie| diff --git a/artifacts/apidocs/schemas/query_get_latest_lp_snapshot_response.md b/artifacts/apidocs/schemas/query_get_latest_lp_snapshot_response.md index e69de29..97ebfb2 100644 --- a/artifacts/apidocs/schemas/query_get_latest_lp_snapshot_response.md +++ b/artifacts/apidocs/schemas/query_get_latest_lp_snapshot_response.md @@ -0,0 +1,15 @@ +!!! info "[QueryGetLatestLPSnapshotResponse](/../../schemas/query_get_latest_lp_snapshot_response)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |snapshot
          `s` |LPSnapshot|True|The latest LP snapshot| + ??? info "[LPSnapshot](/../../schemas/lp_snapshot)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |main_account_id
          `ma` |string|True|The main account id| + |lp_asset
          `la` |string|True|The LP Asset| + |underlying_multiplier
          `um` |string|True|Underlying multiplier| + |maker_trading_volume
          `mt` |string|True|Maker trading volume| + |bid_fast_market_multiplier
          `bf` |integer|True|Fast market multiplier| + |ask_fast_market_multiplier
          `af` |integer|True|Fast market multiplier| + |liquidity_score
          `ls` |string|True|Liquidity score| + |calculate_at
          `ca` |string|True|The time when the snapshot was calculated| diff --git a/artifacts/apidocs/schemas/reward_epoch_info.md b/artifacts/apidocs/schemas/reward_epoch_info.md index e69de29..e598eaf 100644 --- a/artifacts/apidocs/schemas/reward_epoch_info.md +++ b/artifacts/apidocs/schemas/reward_epoch_info.md @@ -0,0 +1,13 @@ +!!! info "[RewardEpochInfo](/../../schemas/reward_epoch_info)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |epoch
          `e` |integer|True|The epoch number| + |epoch_start_time
          `es` |string|True|The start time of the epoch| + |epoch_end_time
          `ee` |string|True|The end time of the epoch| + |status
          `s` |RewardEpochStatus|True|The status of the epoch| + ??? info "[RewardEpochStatus](/../../schemas/reward_epoch_status)" + |Value| Description | + |-|-| + |`PAST` = 1|Past| + |`CURRENT` = 2|Current| + |`FUTURE` = 3|Future| diff --git a/artifacts/apidocs/schemas/signature.md b/artifacts/apidocs/schemas/signature.md index e69de29..f896cdf 100644 --- a/artifacts/apidocs/schemas/signature.md +++ b/artifacts/apidocs/schemas/signature.md @@ -0,0 +1,9 @@ +!!! 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.| diff --git a/artifacts/apidocs/schemas/spot_balance.md b/artifacts/apidocs/schemas/spot_balance.md index e69de29..4eae88d 100644 --- a/artifacts/apidocs/schemas/spot_balance.md +++ b/artifacts/apidocs/schemas/spot_balance.md @@ -0,0 +1,30 @@ +!!! info "[SpotBalance](/../../schemas/spot_balance)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |currency
          `c` |Currency|True|The currency you hold a spot balance in| + |balance
          `b` |string|True|This currency's balance in this trading account.| + |index_price
          `ip` |string|True|The index price of this currency. (reported in `USD`)| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
          + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/stream_reference.md b/artifacts/apidocs/schemas/stream_reference.md index e69de29..75dc903 100644 --- a/artifacts/apidocs/schemas/stream_reference.md +++ b/artifacts/apidocs/schemas/stream_reference.md @@ -0,0 +1,5 @@ +!!! info "[StreamReference](/../../schemas/stream_reference)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |stream
          `s` |string|True|The channel to subscribe to (eg: ticker.s / ticker.d)| + |selectors
          `s1` |[string]|True|The list of selectors for the stream| diff --git a/artifacts/apidocs/schemas/sub_account.md b/artifacts/apidocs/schemas/sub_account.md index e69de29..c947b90 100644 --- a/artifacts/apidocs/schemas/sub_account.md +++ b/artifacts/apidocs/schemas/sub_account.md @@ -0,0 +1,91 @@ +!!! info "[SubAccount](/../../schemas/sub_account)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |event_time
          `et` |string|True|Time at which the event was emitted in unix nanoseconds| + |sub_account_id
          `sa` |string|True|The sub account ID this entry refers to| + |margin_type
          `mt` |MarginType|True|The type of margin algorithm this subaccount uses| + |settle_currency
          `sc` |Currency|True|The settlement, margin, and reporting currency of this account.
          This subaccount can only open positions quoted in this currency

          In the future, when users select a Multi-Currency Margin Type, this will be USD
          All other assets are converted to this currency for the purpose of calculating margin| + |unrealized_pnl
          `up` |string|True|The total unrealized PnL of all positions owned by this subaccount, denominated in quote currency decimal units.
          `unrealized_pnl = sum(position.unrealized_pnl * position.quote_index_price) / settle_index_price`| + |total_equity
          `te` |string|True|The notional value of your account if all positions are closed, excluding trading fees (reported in `settle_currency`).
          `total_equity = sum(spot_balance.balance * spot_balance.index_price) / settle_index_price + unrealized_pnl`| + |initial_margin
          `im` |string|True|The `total_equity` required to open positions in the account (reported in `settle_currency`).
          Computation is different depending on account's `margin_type`| + |maintenance_margin
          `mm` |string|True|The `total_equity` required to avoid liquidation of positions in the account (reported in `settle_currency`).
          Computation is different depending on account's `margin_type`| + |available_balance
          `ab` |string|True|The notional value available to transfer out of the trading account into the funding account (reported in `settle_currency`).
          `available_balance = total_equity - initial_margin - min(unrealized_pnl, 0)`| + |spot_balances
          `sb` |[SpotBalance]|True|The list of spot assets owned by this sub account, and their balances| + |positions
          `p` |[Positions]|True|The list of positions owned by this sub account| + |settle_index_price
          `si` |string|True|The index price of the settle currency. (reported in `USD`)| + ??? info "[MarginType](/../../schemas/margin_type)" + |Value| Description | + |-|-| + |`SIMPLE_CROSS_MARGIN` = 2|Simple Cross Margin Mode: all assets have a predictable margin impact, the whole subaccount shares a single margin| + |`PORTFOLIO_CROSS_MARGIN` = 3|Portfolio Cross Margin Mode: asset margin impact is analysed on portfolio level, the whole subaccount shares a single margin| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
          + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| + ??? info "[SpotBalance](/../../schemas/spot_balance)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |currency
          `c` |Currency|True|The currency you hold a spot balance in| + |balance
          `b` |string|True|This currency's balance in this trading account.| + |index_price
          `ip` |string|True|The index price of this currency. (reported in `USD`)| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
          + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| + ??? info "[Positions](/../../schemas/positions)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |event_time
          `et` |string|True|Time at which the event was emitted in unix nanoseconds| + |sub_account_id
          `sa` |string|True|The sub account ID that participated in the trade| + |instrument
          `i` |string|True|The instrument being represented| + |size
          `s` |string|True|The size of the position, expressed in base asset decimal units. Negative for short positions| + |notional
          `n` |string|True|The notional value of the position, negative for short assets, expressed in quote asset decimal units| + |entry_price
          `ep` |string|True|The entry price of the position, expressed in `9` decimals
          Whenever increasing the size of a position, the entry price is updated to the new average entry price
          `new_entry_price = (old_entry_price * old_size + trade_price * trade_size) / (old_size + trade_size)`| + |exit_price
          `ep1` |string|True|The exit price of the position, expressed in `9` decimals
          Whenever decreasing the size of a position, the exit price is updated to the new average exit price
          `new_exit_price = (old_exit_price * old_exit_trade_size + trade_price * trade_size) / (old_exit_trade_size + trade_size)`| + |mark_price
          `mp` |string|True|The mark price of the position, expressed in `9` decimals| + |unrealized_pnl
          `up` |string|True|The unrealized PnL of the position, expressed in quote asset decimal units
          `unrealized_pnl = (mark_price - entry_price) * size`| + |realized_pnl
          `rp` |string|True|The realized PnL of the position, expressed in quote asset decimal units
          `realized_pnl = (exit_price - entry_price) * exit_trade_size`| + |total_pnl
          `tp` |string|True|The total PnL of the position, expressed in quote asset decimal units
          `total_pnl = realized_pnl + unrealized_pnl`| + |roi
          `r` |string|True|The ROI of the position, expressed as a percentage
          `roi = (total_pnl / (entry_price * abs(size))) * 100^`| + |quote_index_price
          `qi` |string|True|The index price of the quote currency. (reported in `USD`)| + |est_liquidation_price
          `el` |string|True|The estimated liquidation price| diff --git a/artifacts/apidocs/schemas/sub_account_trade_aggregation.md b/artifacts/apidocs/schemas/sub_account_trade_aggregation.md index e69de29..268c60f 100644 --- a/artifacts/apidocs/schemas/sub_account_trade_aggregation.md +++ b/artifacts/apidocs/schemas/sub_account_trade_aggregation.md @@ -0,0 +1,10 @@ +!!! info "[SubAccountTradeAggregation](/../../schemas/sub_account_trade_aggregation)" + Similar to sub-account trade, but not divided by individual assets.
          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |sub_account_id
          `sa` |string|True|The sub account id| + |total_fee
          `tf` |string|True|Total fee paid| + |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| diff --git a/artifacts/apidocs/schemas/ticker.md b/artifacts/apidocs/schemas/ticker.md index e69de29..d0546a0 100644 --- a/artifacts/apidocs/schemas/ticker.md +++ b/artifacts/apidocs/schemas/ticker.md @@ -0,0 +1,29 @@ +!!! info "[Ticker](/../../schemas/ticker)" + Derived data such as the below, will not be included by default:
          - 24 hour volume (`buyVolume + sellVolume`)
          - 24 hour taker buy/sell ratio (`buyVolume / sellVolume`)
          - 24 hour average trade price (`volumeQ / volumeU`)
          - 24 hour average trade volume (`volume / trades`)
          - 24 hour percentage change (`24hStatChange / 24hStat`)
          - 48 hour statistics (`2 * 24hStat - 24hStatChange`)

          To query for an extended ticker payload, leverage the `greeks` and the `derived` flags.
          Ticker extensions are currently under design to offer you more convenience.
          These flags are only supported on the `Ticker Snapshot` WS endpoint, and on the `Ticker` API endpoint.

          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |event_time
          `et` |string|False
          `None`|Time at which the event was emitted in unix nanoseconds| + |instrument
          `i` |string|False
          `None`|The readable instrument name:
          • Perpetual: `ETH_USDT_Perp`
          • Future: `BTC_USDT_Fut_20Oct23`
          • Call: `ETH_USDT_Call_20Oct23_2800`
          • Put: `ETH_USDT_Put_20Oct23_2800`
          | + |mark_price
          `mp` |string|False
          `None`|The mark price of the instrument, expressed in `9` decimals| + |index_price
          `ip` |string|False
          `None`|The index price of the instrument, expressed in `9` decimals| + |last_price
          `lp` |string|False
          `None`|The last traded price of the instrument (also close price), expressed in `9` decimals| + |last_size
          `ls` |string|False
          `None`|The number of assets traded in the last trade, expressed in base asset decimal units| + |mid_price
          `mp1` |string|False
          `None`|The mid price of the instrument, expressed in `9` decimals| + |best_bid_price
          `bb` |string|False
          `None`|The best bid price of the instrument, expressed in `9` decimals| + |best_bid_size
          `bb1` |string|False
          `None`|The number of assets offered on the best bid price of the instrument, expressed in base asset decimal units| + |best_ask_price
          `ba` |string|False
          `None`|The best ask price of the instrument, expressed in `9` decimals| + |best_ask_size
          `ba1` |string|False
          `None`|The number of assets offered on the best ask price of the instrument, expressed in base asset decimal units| + |funding_rate_8h_curr
          `fr` |string|False
          `None`|The current funding rate of the instrument, expressed in percentage points| + |funding_rate_8h_avg
          `fr1` |string|False
          `None`|The average funding rate of the instrument (over last 8h), expressed in percentage points| + |interest_rate
          `ir` |string|False
          `None`|The interest rate of the underlying, expressed in centibeeps (1/100th of a basis point)| + |forward_price
          `fp` |string|False
          `None`|[Options] The forward price of the option, expressed in `9` decimals| + |buy_volume_24h_b
          `bv` |string|False
          `None`|The 24 hour taker buy volume of the instrument, expressed in base asset decimal units| + |sell_volume_24h_b
          `sv` |string|False
          `None`|The 24 hour taker sell volume of the instrument, expressed in base asset decimal units| + |buy_volume_24h_q
          `bv1` |string|False
          `None`|The 24 hour taker buy volume of the instrument, expressed in quote asset decimal units| + |sell_volume_24h_q
          `sv1` |string|False
          `None`|The 24 hour taker sell volume of the instrument, expressed in quote asset decimal units| + |high_price
          `hp` |string|False
          `None`|The 24 hour highest traded price of the instrument, expressed in `9` decimals| + |low_price
          `lp1` |string|False
          `None`|The 24 hour lowest traded price of the instrument, expressed in `9` decimals| + |open_price
          `op` |string|False
          `None`|The 24 hour first traded price of the instrument, expressed in `9` decimals| + |open_interest
          `oi` |string|False
          `None`|The open interest in the instrument, expressed in base asset decimal units| + |long_short_ratio
          `ls1` |string|False
          `None`|The ratio of accounts that are net long vs net short on this instrument| diff --git a/artifacts/apidocs/schemas/tpsl_order_metadata.md b/artifacts/apidocs/schemas/tpsl_order_metadata.md index e69de29..0b760a8 100644 --- a/artifacts/apidocs/schemas/tpsl_order_metadata.md +++ b/artifacts/apidocs/schemas/tpsl_order_metadata.md @@ -0,0 +1,15 @@ +!!! info "[TPSLOrderMetadata](/../../schemas/tpsl_order_metadata)" + Contains metadata for Take Profit (TP) and Stop Loss (SL) trigger orders.

          ### Fields:
          - **triggerBy**: Defines the price type that activates the order (e.g., index price).
          - **triggerPrice**: The price at which the order is triggered, expressed in `9` decimal precision.


          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |trigger_by
          `tb` |TriggerBy|True|Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order| + |trigger_price
          `tp` |string|True|The Trigger Price of the order, expressed in `9` decimals.| + ??? info "[TriggerBy](/../../schemas/trigger_by)" + Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order.

          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.


          + + |Value| Description | + |-|-| + |`UNSPECIFIED` = 0|no trigger condition| + |`INDEX` = 1|INDEX - Order is activated when the index price reaches the trigger price| + |`LAST` = 2|LAST - Order is activated when the last trade price reaches the trigger price| diff --git a/artifacts/apidocs/schemas/trade.md b/artifacts/apidocs/schemas/trade.md index e69de29..6958f5e 100644 --- a/artifacts/apidocs/schemas/trade.md +++ b/artifacts/apidocs/schemas/trade.md @@ -0,0 +1,23 @@ +!!! info "[Trade](/../../schemas/trade)" + All private RFQs and Private AXEs will be filtered out from the responses
          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |event_time
          `et` |string|True|Time at which the event was emitted in unix nanoseconds| + |instrument
          `i` |string|True|The readable instrument name:
          • Perpetual: `ETH_USDT_Perp`
          • Future: `BTC_USDT_Fut_20Oct23`
          • Call: `ETH_USDT_Call_20Oct23_2800`
          • Put: `ETH_USDT_Put_20Oct23_2800`
          | + |is_taker_buyer
          `it` |boolean|True|If taker was the buyer on the trade| + |size
          `s` |string|True|The number of assets being traded, expressed in base asset decimal units| + |price
          `p` |string|True|The traded price, expressed in `9` decimals| + |mark_price
          `mp` |string|True|The mark price of the instrument at point of trade, expressed in `9` decimals| + |index_price
          `ip` |string|True|The index price of the instrument at point of trade, expressed in `9` decimals| + |interest_rate
          `ir` |string|True|The interest rate of the underlying at point of trade, expressed in centibeeps (1/100th of a basis point)| + |forward_price
          `fp` |string|True|[Options] The forward price of the option at point of trade, expressed in `9` decimals| + |trade_id
          `ti` |string|True|A trade identifier, globally unique, and monotonically increasing (not by `1`).
          All trades sharing a single taker execution share the same first component (before `-`), and `event_time`.
          `trade_id` is guaranteed to be consistent across MarketData `Trade` and Trading `Fill`.| + |venue
          `v` |Venue|True|The venue where the trade occurred| + ??? info "[Venue](/../../schemas/venue)" + The list of Trading Venues that are supported on the GRVT exchange
          + + |Value| Description | + |-|-| + |`ORDERBOOK` = 1|the trade is cleared on the orderbook venue| + |`RFQ` = 2|the trade is cleared on the RFQ venue| diff --git a/artifacts/apidocs/schemas/trader_leaderboard_user.md b/artifacts/apidocs/schemas/trader_leaderboard_user.md index e69de29..ca29ba6 100644 --- a/artifacts/apidocs/schemas/trader_leaderboard_user.md +++ b/artifacts/apidocs/schemas/trader_leaderboard_user.md @@ -0,0 +1,7 @@ +!!! info "[TraderLeaderboardUser](/../../schemas/trader_leaderboard_user)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |account_id
          `ai` |string|True|The off chain account id| + |rank
          `r` |integer|True|The rank of the account in the Trader| + |total_point
          `tp` |number|True|Total Trader point| + |twitter_username
          `tu` |string|True|The twitter username of the account| diff --git a/artifacts/apidocs/schemas/trader_metric.md b/artifacts/apidocs/schemas/trader_metric.md index e69de29..4530b04 100644 --- a/artifacts/apidocs/schemas/trader_metric.md +++ b/artifacts/apidocs/schemas/trader_metric.md @@ -0,0 +1,5 @@ +!!! info "[TraderMetric](/../../schemas/trader_metric)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |total_fee
          `tf` |string|True|Total fee paid| + |total_point
          `tp` |number|True|Total trader point of this epoch/phase| diff --git a/artifacts/apidocs/schemas/transfer_history.md b/artifacts/apidocs/schemas/transfer_history.md index e69de29..55adcbd 100644 --- a/artifacts/apidocs/schemas/transfer_history.md +++ b/artifacts/apidocs/schemas/transfer_history.md @@ -0,0 +1,53 @@ +!!! info "[TransferHistory](/../../schemas/transfer_history)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |tx_id
          `ti` |string|True|The transaction ID of the transfer| + |from_account_id
          `fa` |string|True|The account to transfer from| + |from_sub_account_id
          `fs` |string|True|The subaccount to transfer from (0 if transferring from main account)| + |to_account_id
          `ta` |string|True|The account to deposit into| + |to_sub_account_id
          `ts` |string|True|The subaccount to transfer to (0 if transferring to main account)| + |currency
          `c` |Currency|True|The token currency to transfer| + |num_tokens
          `nt` |string|True|The number of tokens to transfer| + |signature
          `s` |Signature|True|The signature of the transfer| + |event_time
          `et` |string|True|The timestamp of the transfer in unix nanoseconds| + |transfer_type
          `tt` |TransferType|True|The type of transfer| + |transfer_metadata
          `tm` |string|True|The metadata of the transfer| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
          + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| + ??? 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 "[TransferType](/../../schemas/transfer_type)" + |Value| Description | + |-|-| + |`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| diff --git a/artifacts/apidocs/schemas/withdrawal.md b/artifacts/apidocs/schemas/withdrawal.md index e69de29..1f8271e 100644 --- a/artifacts/apidocs/schemas/withdrawal.md +++ b/artifacts/apidocs/schemas/withdrawal.md @@ -0,0 +1,41 @@ +!!! info "[Withdrawal](/../../schemas/withdrawal)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |from_account_id
          `fa` |string|True|The subaccount to withdraw from| + |to_eth_address
          `te` |string|True|The ethereum address to withdraw to| + |currency
          `c` |Currency|True|The token currency to withdraw| + |num_tokens
          `nt` |string|True|The number of tokens to withdraw| + |signature
          `s` |Signature|True|The signature of the withdrawal| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
          + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| + ??? 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.| diff --git a/artifacts/apidocs/schemas/withdrawal_history.md b/artifacts/apidocs/schemas/withdrawal_history.md index e69de29..9b835e8 100644 --- a/artifacts/apidocs/schemas/withdrawal_history.md +++ b/artifacts/apidocs/schemas/withdrawal_history.md @@ -0,0 +1,43 @@ +!!! info "[WithdrawalHistory](/../../schemas/withdrawal_history)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |tx_id
          `ti` |string|True|The transaction ID of the withdrawal| + |from_account_id
          `fa` |string|True|The subaccount to withdraw from| + |to_eth_address
          `te` |string|True|The ethereum address to withdraw to| + |currency
          `c` |Currency|True|The token currency to withdraw| + |num_tokens
          `nt` |string|True|The number of tokens to withdraw| + |signature
          `s` |Signature|True|The signature of the withdrawal| + |event_time
          `et` |string|True|The timestamp of the withdrawal in unix nanoseconds| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
          + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| + ??? 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.| diff --git a/artifacts/apidocs/schemas/ws_cancel_feed_data_v1.md b/artifacts/apidocs/schemas/ws_cancel_feed_data_v1.md index e69de29..0206e12 100644 --- a/artifacts/apidocs/schemas/ws_cancel_feed_data_v1.md +++ b/artifacts/apidocs/schemas/ws_cancel_feed_data_v1.md @@ -0,0 +1,54 @@ +!!! info "[WSCancelFeedDataV1](/../../schemas/ws_cancel_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` |CancelStatusFeed|True|Data relating to the status of the cancellation attempt| + |prev_sequence_number
          `ps` |string|True|The previous sequence number that determines global message order within the specific stream| + ??? info "[CancelStatusFeed](/../../schemas/cancel_status_feed)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |sub_account_id
          `sa` |string|True|The subaccount ID that requested the cancellation| + |client_order_id
          `co` |string|True|A unique identifier for the active order within a subaccount, specified by the client| + |order_id
          `oi` |string|True|A unique 128-bit identifier for the order, deterministically generated within the GRVT backend| + |reason
          `r` |OrderRejectReason|True|The user-provided reason for cancelling the order| + |update_time
          `ut` |string|False
          `0`|[Filled by GRVT Backend] Time at which the cancellation status was updated by GRVT in unix nanoseconds| + |cancel_status
          `cs` |CancelStatus|True|Status of the cancellation attempt| + ??? 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| + ??? 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.| diff --git a/artifacts/apidocs/schemas/ws_cancel_feed_selector_v1.md b/artifacts/apidocs/schemas/ws_cancel_feed_selector_v1.md index e69de29..016d250 100644 --- a/artifacts/apidocs/schemas/ws_cancel_feed_selector_v1.md +++ b/artifacts/apidocs/schemas/ws_cancel_feed_selector_v1.md @@ -0,0 +1,6 @@ +!!! info "[WSCancelFeedSelectorV1](/../../schemas/ws_cancel_feed_selector_v1)" + Subscribes to a feed of time-to-live expiry events for order cancellations requested by a given subaccount.
          **This stream presently only provides expiry updates for cancel-order requests set with a valid TTL value**.
          Successful order cancellations will reflect as updates published to the (order-state stream)[https://api-docs.grvt.io/trading_streams/#order-state].
          _A future release will expand the functionality of this stream to provide more general status updates on order cancellation requests._
          Each Order can be uniquely identified by its `client_order_id`.

          + + |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_candlestick_feed_data_v1.md b/artifacts/apidocs/schemas/ws_candlestick_feed_data_v1.md index e69de29..04fab98 100644 --- a/artifacts/apidocs/schemas/ws_candlestick_feed_data_v1.md +++ b/artifacts/apidocs/schemas/ws_candlestick_feed_data_v1.md @@ -0,0 +1,23 @@ +!!! info "[WSCandlestickFeedDataV1](/../../schemas/ws_candlestick_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` |Candlestick|True|A candlestick entry matching the request filters| + |prev_sequence_number
          `ps` |string|True|The previous sequence number that determines global message order within the specific stream| + ??? info "[Candlestick](/../../schemas/candlestick)" +
          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |open_time
          `ot` |string|True|Open time of kline bar in unix nanoseconds| + |close_time
          `ct` |string|True|Close time of kline bar in unix nanosecond| + |open
          `o` |string|True|The open price, expressed in underlying currency resolution units| + |close
          `c` |string|True|The close price, expressed in underlying currency resolution units| + |high
          `h` |string|True|The high price, expressed in underlying currency resolution units| + |low
          `l` |string|True|The low price, expressed in underlying currency resolution units| + |volume_b
          `vb` |string|True|The underlying volume transacted, expressed in base asset decimal units| + |volume_q
          `vq` |string|True|The quote volume transacted, expressed in quote asset decimal units| + |trades
          `t` |integer|True|The number of trades transacted| + |instrument
          `i` |string|True|The readable instrument name:
          • Perpetual: `ETH_USDT_Perp`
          • Future: `BTC_USDT_Fut_20Oct23`
          • Call: `ETH_USDT_Call_20Oct23_2800`
          • Put: `ETH_USDT_Put_20Oct23_2800`
          | diff --git a/artifacts/apidocs/schemas/ws_candlestick_feed_selector_v1.md b/artifacts/apidocs/schemas/ws_candlestick_feed_selector_v1.md index e69de29..186e781 100644 --- a/artifacts/apidocs/schemas/ws_candlestick_feed_selector_v1.md +++ b/artifacts/apidocs/schemas/ws_candlestick_feed_selector_v1.md @@ -0,0 +1,36 @@ +!!! info "[WSCandlestickFeedSelectorV1](/../../schemas/ws_candlestick_feed_selector_v1)" + Subscribes to a stream of Kline/Candlestick updates for an instrument. A Kline is uniquely identified by its open time.
          A new Kline is published every interval (if it exists). Upon subscription, the server will send the 5 most recent Kline for the requested interval.
          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |instrument
          `i` |string|True|The readable instrument name:
          • Perpetual: `ETH_USDT_Perp`
          • Future: `BTC_USDT_Fut_20Oct23`
          • Call: `ETH_USDT_Call_20Oct23_2800`
          • Put: `ETH_USDT_Put_20Oct23_2800`
          | + |interval
          `i1` |CandlestickInterval|True|The interval of each candlestick| + |type
          `t` |CandlestickType|True|The type of candlestick data to retrieve| + ??? info "[CandlestickInterval](/../../schemas/candlestick_interval)" + |Value| Description | + |-|-| + |`CI_1_M` = 1|1 minute| + |`CI_3_M` = 2|3 minutes| + |`CI_5_M` = 3|5 minutes| + |`CI_15_M` = 4|15 minutes| + |`CI_30_M` = 5|30 minutes| + |`CI_1_H` = 6|1 hour| + |`CI_2_H` = 7|2 hour| + |`CI_4_H` = 8|4 hour| + |`CI_6_H` = 9|6 hour| + |`CI_8_H` = 10|8 hour| + |`CI_12_H` = 11|12 hour| + |`CI_1_D` = 12|1 day| + |`CI_3_D` = 13|3 days| + |`CI_5_D` = 14|5 days| + |`CI_1_W` = 15|1 week| + |`CI_2_W` = 16|2 weeks| + |`CI_3_W` = 17|3 weeks| + |`CI_4_W` = 18|4 weeks| + ??? info "[CandlestickType](/../../schemas/candlestick_type)" + |Value| Description | + |-|-| + |`TRADE` = 1|Tracks traded prices| + |`MARK` = 2|Tracks mark prices| + |`INDEX` = 3|Tracks index prices| + |`MID` = 4|Tracks book mid prices| diff --git a/artifacts/apidocs/schemas/ws_deposit_feed_data_v1.md b/artifacts/apidocs/schemas/ws_deposit_feed_data_v1.md index e69de29..eed835f 100644 --- a/artifacts/apidocs/schemas/ws_deposit_feed_data_v1.md +++ b/artifacts/apidocs/schemas/ws_deposit_feed_data_v1.md @@ -0,0 +1,41 @@ +!!! info "[WSDepositFeedDataV1](/../../schemas/ws_deposit_feed_data_v1)" + Subscribes to a feed of deposit updates.
          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |stream
          `s` |string|True|The websocket channel to which the response is sent| + |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` |Deposit|True|The Deposit object| + |prev_sequence_number
          `ps` |string|True|The previous sequence number that determines global message order within the specific stream| + ??? info "[Deposit](/../../schemas/deposit)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |tx_hash
          `th` |string|True|The hash of the bridgemint event producing the deposit| + |to_account_id
          `ta` |string|True|The account to deposit into| + |currency
          `c` |Currency|True|The token currency to deposit| + |num_tokens
          `nt` |string|True|The number of tokens to deposit| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
          + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| diff --git a/artifacts/apidocs/schemas/ws_deposit_feed_selector_v1.md b/artifacts/apidocs/schemas/ws_deposit_feed_selector_v1.md index e69de29..9ef7ba4 100644 --- a/artifacts/apidocs/schemas/ws_deposit_feed_selector_v1.md +++ b/artifacts/apidocs/schemas/ws_deposit_feed_selector_v1.md @@ -0,0 +1,6 @@ +!!! info "[WSDepositFeedSelectorV1](/../../schemas/ws_deposit_feed_selector_v1)" + Subscribes to a feed of deposits. This will execute when there is any deposit to selected account.
          To subscribe to a main account, specify the account ID (eg. `0x9fe3758b67ce7a2875ee4b452f01a5282d84ed8a`).
          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |main_account_id
          `ma` |string|True|The main account ID to request for| diff --git a/artifacts/apidocs/schemas/ws_fill_feed_data_v1.md b/artifacts/apidocs/schemas/ws_fill_feed_data_v1.md index e69de29..25713f5 100644 --- a/artifacts/apidocs/schemas/ws_fill_feed_data_v1.md +++ b/artifacts/apidocs/schemas/ws_fill_feed_data_v1.md @@ -0,0 +1,41 @@ +!!! info "[WSFillFeedDataV1](/../../schemas/ws_fill_feed_data_v1)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |stream
          `s` |string|True|The websocket channel to which the response is sent| + |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` |Fill|True|A private trade matching the request filter| + |prev_sequence_number
          `ps` |string|True|The previous sequence number that determines global message order within the specific stream| + ??? info "[Fill](/../../schemas/fill)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |event_time
          `et` |string|True|Time at which the event was emitted in unix nanoseconds| + |sub_account_id
          `sa` |string|True|The sub account ID that participated in the trade| + |instrument
          `i` |string|True|The instrument being represented| + |is_buyer
          `ib` |boolean|True|The side that the subaccount took on the trade| + |is_taker
          `it` |boolean|True|The role that the subaccount took on the trade| + |size
          `s` |string|True|The number of assets being traded, expressed in base asset decimal units| + |price
          `p` |string|True|The traded price, expressed in `9` decimals| + |mark_price
          `mp` |string|True|The mark price of the instrument at point of trade, expressed in `9` decimals| + |index_price
          `ip` |string|True|The index price of the instrument at point of trade, expressed in `9` decimals| + |interest_rate
          `ir` |string|True|The interest rate of the underlying at point of trade, expressed in centibeeps (1/100th of a basis point)| + |forward_price
          `fp` |string|True|[Options] The forward price of the option at point of trade, expressed in `9` decimals| + |realized_pnl
          `rp` |string|True|The realized PnL of the trade, expressed in quote asset decimal units (0 if increasing position size)| + |fee
          `f` |string|True|The fees paid on the trade, expressed in quote asset decimal unit (negative if maker rebate applied)| + |fee_rate
          `fr` |string|True|The fee rate paid on the trade| + |trade_id
          `ti` |string|True|A trade identifier, globally unique, and monotonically increasing (not by `1`).
          All trades sharing a single taker execution share the same first component (before `-`), and `event_time`.
          `trade_id` is guaranteed to be consistent across MarketData `Trade` and Trading `Fill`.| + |order_id
          `oi` |string|True|An order identifier| + |venue
          `v` |Venue|True|The venue where the trade occurred| + |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| + |signer
          `s1` |string|True|The address (public key) of the wallet signing the payload| + |broker
          `b` |BrokerTag|False
          ``|Specifies the broker who brokered the order| + ??? info "[Venue](/../../schemas/venue)" + The list of Trading Venues that are supported on the GRVT exchange
          + + |Value| Description | + |-|-| + |`ORDERBOOK` = 1|the trade is cleared on the orderbook venue| + |`RFQ` = 2|the trade is cleared on the RFQ venue| + ??? info "[BrokerTag](/../../schemas/broker_tag)" + BrokerTag is a tag for the broker that the order is sent from.
          + diff --git a/artifacts/apidocs/schemas/ws_fill_feed_selector_v1.md b/artifacts/apidocs/schemas/ws_fill_feed_selector_v1.md index e69de29..1747ce4 100644 --- a/artifacts/apidocs/schemas/ws_fill_feed_selector_v1.md +++ b/artifacts/apidocs/schemas/ws_fill_feed_selector_v1.md @@ -0,0 +1,7 @@ +!!! info "[WSFillFeedSelectorV1](/../../schemas/ws_fill_feed_selector_v1)" + Subscribes to a feed of private trade updates. This happens when a trade is executed.
          To subscribe to all private trades, specify an empty `instrument` (eg. `2345123`).
          Otherwise, specify the `instrument` to only receive private trades for that instrument (eg. `2345123-BTC_USDT_Perp`).
          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |sub_account_id
          `sa` |string|True|The sub account ID to request for| + |instrument
          `i` |string|False
          `'all'`|The instrument filter to apply.| diff --git a/artifacts/apidocs/schemas/ws_list_streams_params.md b/artifacts/apidocs/schemas/ws_list_streams_params.md index e69de29..b103006 100644 --- a/artifacts/apidocs/schemas/ws_list_streams_params.md +++ b/artifacts/apidocs/schemas/ws_list_streams_params.md @@ -0,0 +1,5 @@ +!!! info "[WSListStreamsParams](/../../schemas/ws_list_streams_params)" + List down all the streams this connection has connected to.
          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| diff --git a/artifacts/apidocs/schemas/ws_list_streams_result.md b/artifacts/apidocs/schemas/ws_list_streams_result.md index e69de29..a02e7cb 100644 --- a/artifacts/apidocs/schemas/ws_list_streams_result.md +++ b/artifacts/apidocs/schemas/ws_list_streams_result.md @@ -0,0 +1,11 @@ +!!! info "[WSListStreamsResult](/../../schemas/ws_list_streams_result)" + Returns a list of all rooms the client has subscribed to.
          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |stream_reference
          `sr` |[StreamReference]|True|The list of stream references the connection is connected to| + ??? info "[StreamReference](/../../schemas/stream_reference)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |stream
          `s` |string|True|The channel to subscribe to (eg: ticker.s / ticker.d)| + |selectors
          `s1` |[string]|True|The list of selectors for the stream| diff --git a/artifacts/apidocs/schemas/ws_mini_ticker_feed_data_v1.md b/artifacts/apidocs/schemas/ws_mini_ticker_feed_data_v1.md index e69de29..9a5fd62 100644 --- a/artifacts/apidocs/schemas/ws_mini_ticker_feed_data_v1.md +++ b/artifacts/apidocs/schemas/ws_mini_ticker_feed_data_v1.md @@ -0,0 +1,22 @@ +!!! info "[WSMiniTickerFeedDataV1](/../../schemas/ws_mini_ticker_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` |MiniTicker|True|A mini ticker matching the request filter| + |prev_sequence_number
          `ps` |string|True|The previous sequence number that determines global message order within the specific stream| + ??? info "[MiniTicker](/../../schemas/mini_ticker)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |event_time
          `et` |string|False
          `None`|Time at which the event was emitted in unix nanoseconds| + |instrument
          `i` |string|False
          `None`|The readable instrument name:
          • Perpetual: `ETH_USDT_Perp`
          • Future: `BTC_USDT_Fut_20Oct23`
          • Call: `ETH_USDT_Call_20Oct23_2800`
          • Put: `ETH_USDT_Put_20Oct23_2800`
          | + |mark_price
          `mp` |string|False
          `None`|The mark price of the instrument, expressed in `9` decimals| + |index_price
          `ip` |string|False
          `None`|The index price of the instrument, expressed in `9` decimals| + |last_price
          `lp` |string|False
          `None`|The last traded price of the instrument (also close price), expressed in `9` decimals| + |last_size
          `ls` |string|False
          `None`|The number of assets traded in the last trade, expressed in base asset decimal units| + |mid_price
          `mp1` |string|False
          `None`|The mid price of the instrument, expressed in `9` decimals| + |best_bid_price
          `bb` |string|False
          `None`|The best bid price of the instrument, expressed in `9` decimals| + |best_bid_size
          `bb1` |string|False
          `None`|The number of assets offered on the best bid price of the instrument, expressed in base asset decimal units| + |best_ask_price
          `ba` |string|False
          `None`|The best ask price of the instrument, expressed in `9` decimals| + |best_ask_size
          `ba1` |string|False
          `None`|The number of assets offered on the best ask price of the instrument, expressed in base asset decimal units| diff --git a/artifacts/apidocs/schemas/ws_mini_ticker_feed_selector_v1.md b/artifacts/apidocs/schemas/ws_mini_ticker_feed_selector_v1.md index e69de29..bac191b 100644 --- a/artifacts/apidocs/schemas/ws_mini_ticker_feed_selector_v1.md +++ b/artifacts/apidocs/schemas/ws_mini_ticker_feed_selector_v1.md @@ -0,0 +1,7 @@ +!!! info "[WSMiniTickerFeedSelectorV1](/../../schemas/ws_mini_ticker_feed_selector_v1)" + Subscribes to a mini ticker feed for a single instrument. The `mini.s` channel offers simpler integration. To experience higher publishing rates, please use the `mini.d` channel.
          Unlike the `mini.d` channel which publishes an initial snapshot, then only streams deltas after, the `mini.s` channel publishes full snapshots at each feed.

          The Delta feed will work as follows:
          • On subscription, the server will send a full snapshot of the mini ticker.
          • After the snapshot, the server will only send deltas of the mini ticker.
          • The server will send a delta if any of the fields in the mini ticker have changed.


          Field Semantics:
          • [DeltaOnly] If a field is not updated, {}
          • If a field is updated, {field: '123'}
          • If a field is set to zero, {field: '0'}
          • If a field is set to null, {field: ''}

          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |instrument
          `i` |string|True|The readable instrument name:
          • Perpetual: `ETH_USDT_Perp`
          • Future: `BTC_USDT_Fut_20Oct23`
          • Call: `ETH_USDT_Call_20Oct23_2800`
          • Put: `ETH_USDT_Put_20Oct23_2800`
          | + |rate
          `r` |integer|True|The minimal rate at which we publish feeds (in milliseconds)
          Delta (0 - `raw`, 50, 100, 200, 500, 1000, 5000)
          Snapshot (200, 500, 1000, 5000)| diff --git a/artifacts/apidocs/schemas/ws_order_feed_data_v1.md b/artifacts/apidocs/schemas/ws_order_feed_data_v1.md index e69de29..3c0038a 100644 --- a/artifacts/apidocs/schemas/ws_order_feed_data_v1.md +++ b/artifacts/apidocs/schemas/ws_order_feed_data_v1.md @@ -0,0 +1,114 @@ +!!! info "[WSOrderFeedDataV1](/../../schemas/ws_order_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` |Order|True|The order object being created or updated| + |prev_sequence_number
          `ps` |string|True|The previous sequence number that determines global message order within the specific stream| + ??? 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| + |trigger
          `t` |TriggerOrderMetadata|True|Trigger fields are used to support any type of trigger order such as TP/SL| + |broker
          `b` |BrokerTag|False
          ``|Specifies the broker who brokered the order| + ??? info "[BrokerTag](/../../schemas/broker_tag)" + BrokerTag is a tag for the broker that the order is sent from.
          + + ??? 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| diff --git a/artifacts/apidocs/schemas/ws_order_feed_selector_v1.md b/artifacts/apidocs/schemas/ws_order_feed_selector_v1.md index e69de29..a011280 100644 --- a/artifacts/apidocs/schemas/ws_order_feed_selector_v1.md +++ b/artifacts/apidocs/schemas/ws_order_feed_selector_v1.md @@ -0,0 +1,7 @@ +!!! info "[WSOrderFeedSelectorV1](/../../schemas/ws_order_feed_selector_v1)" + Subscribes to a feed of order updates pertaining to orders made by your account.
          Each Order can be uniquely identified by its `order_id` or `client_order_id`.
          To subscribe to all orders, specify an empty `instrument` (eg. `2345123`).
          Otherwise, specify the `instrument` to only receive orders for that instrument (eg. `2345123-BTC_USDT_Perp`).
          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |sub_account_id
          `sa` |string|True|The subaccount ID to filter by| + |instrument
          `i` |string|False
          `'all'`|The instrument filter to apply.| 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 e69de29..ce19912 100644 --- a/artifacts/apidocs/schemas/ws_order_state_feed_data_v1.md +++ b/artifacts/apidocs/schemas/ws_order_state_feed_data_v1.md @@ -0,0 +1,64 @@ +!!! info "[WSOrderStateFeedDataV1](/../../schemas/ws_order_state_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` |OrderStateFeed|True|The Order State Feed| + |prev_sequence_number
          `ps` |string|True|The previous sequence number that determines global message order within the specific stream| + ??? info "[OrderStateFeed](/../../schemas/order_state_feed)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |order_id
          `oi` |string|True|A unique 128-bit identifier for the order, deterministically generated within the GRVT backend| + |client_order_id
          `co` |string|True|A unique identifier for the active order within a subaccount, specified by the client| + |order_state
          `os` |OrderState|True|The order state object being created or updated| + ??? 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| diff --git a/artifacts/apidocs/schemas/ws_order_state_feed_selector_v1.md b/artifacts/apidocs/schemas/ws_order_state_feed_selector_v1.md index e69de29..28813c9 100644 --- a/artifacts/apidocs/schemas/ws_order_state_feed_selector_v1.md +++ b/artifacts/apidocs/schemas/ws_order_state_feed_selector_v1.md @@ -0,0 +1,7 @@ +!!! info "[WSOrderStateFeedSelectorV1](/../../schemas/ws_order_state_feed_selector_v1)" + Subscribes to a feed of order updates pertaining to orders made by your account.
          Unlike the Order Stream, this only streams state updates, drastically improving throughput, and latency.
          Each Order can be uniquely identified by its `order_id` or `client_order_id`.
          To subscribe to all orders, specify an empty `instrument` (eg. `2345123`).
          Otherwise, specify the `instrument` to only receive orders for that instrument (eg. `2345123-BTC_USDT_Perp`).
          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |sub_account_id
          `sa` |string|True|The subaccount ID to filter by| + |instrument
          `i` |string|False
          `'all'`|The instrument filter to apply.| diff --git a/artifacts/apidocs/schemas/ws_orderbook_levels_feed_data_v1.md b/artifacts/apidocs/schemas/ws_orderbook_levels_feed_data_v1.md index e69de29..22ebdae 100644 --- a/artifacts/apidocs/schemas/ws_orderbook_levels_feed_data_v1.md +++ b/artifacts/apidocs/schemas/ws_orderbook_levels_feed_data_v1.md @@ -0,0 +1,27 @@ +!!! info "[WSOrderbookLevelsFeedDataV1](/../../schemas/ws_orderbook_levels_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` |OrderbookLevels|True|An orderbook levels object matching the request filter| + |prev_sequence_number
          `ps` |string|True|The previous sequence number that determines global message order within the specific stream| + ??? info "[OrderbookLevels](/../../schemas/orderbook_levels)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |event_time
          `et` |string|True|Time at which the event was emitted in unix nanoseconds| + |instrument
          `i` |string|True|The readable instrument name:
          • Perpetual: `ETH_USDT_Perp`
          • Future: `BTC_USDT_Fut_20Oct23`
          • Call: `ETH_USDT_Call_20Oct23_2800`
          • Put: `ETH_USDT_Put_20Oct23_2800`
          | + |bids
          `b` |[OrderbookLevel]|True|The list of best bids up till query depth| + |asks
          `a` |[OrderbookLevel]|True|The list of best asks up till query depth| + ??? info "[OrderbookLevel](/../../schemas/orderbook_level)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |price
          `p` |string|True|The price of the level, expressed in `9` decimals| + |size
          `s` |string|True|The number of assets offered, expressed in base asset decimal units| + |num_orders
          `no` |integer|True|The number of open orders at this level| + ??? info "[OrderbookLevel](/../../schemas/orderbook_level)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |price
          `p` |string|True|The price of the level, expressed in `9` decimals| + |size
          `s` |string|True|The number of assets offered, expressed in base asset decimal units| + |num_orders
          `no` |integer|True|The number of open orders at this level| diff --git a/artifacts/apidocs/schemas/ws_orderbook_levels_feed_selector_v1.md b/artifacts/apidocs/schemas/ws_orderbook_levels_feed_selector_v1.md index e69de29..f091c62 100644 --- a/artifacts/apidocs/schemas/ws_orderbook_levels_feed_selector_v1.md +++ b/artifacts/apidocs/schemas/ws_orderbook_levels_feed_selector_v1.md @@ -0,0 +1,8 @@ +!!! info "[WSOrderbookLevelsFeedSelectorV1](/../../schemas/ws_orderbook_levels_feed_selector_v1)" + Subscribes to aggregated orderbook updates for a single instrument. The `book.s` channel offers simpler integration. To experience higher publishing rates, please use the `book.d` channel.
          Unlike the `book.d` channel which publishes an initial snapshot, then only streams deltas after, the `book.s` channel publishes full snapshots at each feed.

          The Delta feed will work as follows:
          • On subscription, the server will send a full snapshot of all levels of the Orderbook.
          • After the snapshot, the server will only send levels that have changed in value.


          Subscription Pattern:
          • Delta - `instrument@rate`
          • Snapshot - `instrument@rate-depth`


          Field Semantics:
          • [DeltaOnly] If a level is not updated, level not published
          • If a level is updated, {size: '123'}
          • If a level is set to zero, {size: '0'}
          • Incoming levels will be published as soon as price moves
          • Outgoing levels will be published with `size = 0`

          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |instrument
          `i` |string|True|The readable instrument name:
          • Perpetual: `ETH_USDT_Perp`
          • Future: `BTC_USDT_Fut_20Oct23`
          • Call: `ETH_USDT_Call_20Oct23_2800`
          • Put: `ETH_USDT_Put_20Oct23_2800`
          | + |rate
          `r` |integer|True|The minimal rate at which we publish feeds (in milliseconds)
          Delta (50, 100, 500, 1000)
          Snapshot (500, 1000)| + |depth
          `d` |integer|False
          `'0'`|Depth of the order book to be retrieved
          Delta(0 - `unlimited`)
          Snapshot(10, 50, 100, 500)| diff --git a/artifacts/apidocs/schemas/ws_positions_feed_data_v1.md b/artifacts/apidocs/schemas/ws_positions_feed_data_v1.md index e69de29..34429db 100644 --- a/artifacts/apidocs/schemas/ws_positions_feed_data_v1.md +++ b/artifacts/apidocs/schemas/ws_positions_feed_data_v1.md @@ -0,0 +1,25 @@ +!!! info "[WSPositionsFeedDataV1](/../../schemas/ws_positions_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` |Positions|True|A Position being created or updated matching the request filter| + |prev_sequence_number
          `ps` |string|True|The previous sequence number that determines global message order within the specific stream| + ??? info "[Positions](/../../schemas/positions)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |event_time
          `et` |string|True|Time at which the event was emitted in unix nanoseconds| + |sub_account_id
          `sa` |string|True|The sub account ID that participated in the trade| + |instrument
          `i` |string|True|The instrument being represented| + |size
          `s` |string|True|The size of the position, expressed in base asset decimal units. Negative for short positions| + |notional
          `n` |string|True|The notional value of the position, negative for short assets, expressed in quote asset decimal units| + |entry_price
          `ep` |string|True|The entry price of the position, expressed in `9` decimals
          Whenever increasing the size of a position, the entry price is updated to the new average entry price
          `new_entry_price = (old_entry_price * old_size + trade_price * trade_size) / (old_size + trade_size)`| + |exit_price
          `ep1` |string|True|The exit price of the position, expressed in `9` decimals
          Whenever decreasing the size of a position, the exit price is updated to the new average exit price
          `new_exit_price = (old_exit_price * old_exit_trade_size + trade_price * trade_size) / (old_exit_trade_size + trade_size)`| + |mark_price
          `mp` |string|True|The mark price of the position, expressed in `9` decimals| + |unrealized_pnl
          `up` |string|True|The unrealized PnL of the position, expressed in quote asset decimal units
          `unrealized_pnl = (mark_price - entry_price) * size`| + |realized_pnl
          `rp` |string|True|The realized PnL of the position, expressed in quote asset decimal units
          `realized_pnl = (exit_price - entry_price) * exit_trade_size`| + |total_pnl
          `tp` |string|True|The total PnL of the position, expressed in quote asset decimal units
          `total_pnl = realized_pnl + unrealized_pnl`| + |roi
          `r` |string|True|The ROI of the position, expressed as a percentage
          `roi = (total_pnl / (entry_price * abs(size))) * 100^`| + |quote_index_price
          `qi` |string|True|The index price of the quote currency. (reported in `USD`)| + |est_liquidation_price
          `el` |string|True|The estimated liquidation price| diff --git a/artifacts/apidocs/schemas/ws_positions_feed_selector_v1.md b/artifacts/apidocs/schemas/ws_positions_feed_selector_v1.md index e69de29..1766ac9 100644 --- a/artifacts/apidocs/schemas/ws_positions_feed_selector_v1.md +++ b/artifacts/apidocs/schemas/ws_positions_feed_selector_v1.md @@ -0,0 +1,7 @@ +!!! info "[WSPositionsFeedSelectorV1](/../../schemas/ws_positions_feed_selector_v1)" + Subscribes to a feed of position updates. This happens when a trade is executed.
          To subscribe to all positions, specify an empty `instrument` (eg. `2345123`).
          Otherwise, specify the `instrument` to only receive positions for that instrument (eg. `2345123-BTC_USDT_Perp`).
          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |sub_account_id
          `sa` |string|True|The subaccount ID to filter by| + |instrument
          `i` |string|False
          `'all'`|The instrument filter to apply.| diff --git a/artifacts/apidocs/schemas/ws_subscribe_params.md b/artifacts/apidocs/schemas/ws_subscribe_params.md index e69de29..e79ced4 100644 --- a/artifacts/apidocs/schemas/ws_subscribe_params.md +++ b/artifacts/apidocs/schemas/ws_subscribe_params.md @@ -0,0 +1,8 @@ +!!! info "[WSSubscribeParams](/../../schemas/ws_subscribe_params)" + All V1 Websocket Subscription Requests are housed in this wrapper. You may specify a stream, and a list of feeds to subscribe to.
          When subscribing to the same primary selector again, the previous secondary selector will be replaced. See `Overview` page for more details.
          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |stream
          `s` |string|True|The channel to subscribe to (eg: ticker.s / ticker.d)| + |selectors
          `s1` |[string]|True|The list of feeds to subscribe to| + |use_global_sequence_number
          `ug` |boolean|False
          `false`|Whether to use the global sequence number for the stream| diff --git a/artifacts/apidocs/schemas/ws_subscribe_request_v1_legacy.md b/artifacts/apidocs/schemas/ws_subscribe_request_v1_legacy.md index e69de29..2e5924d 100644 --- a/artifacts/apidocs/schemas/ws_subscribe_request_v1_legacy.md +++ b/artifacts/apidocs/schemas/ws_subscribe_request_v1_legacy.md @@ -0,0 +1,10 @@ +!!! info "[WSSubscribeRequestV1Legacy](/../../schemas/ws_subscribe_request_v1_legacy)" + All V1 Websocket Requests are housed in this wrapper. You may specify a stream, and a list of feeds to subscribe to.
          If a `request_id` is supplied in this JSON RPC request, it will be propagated back to any relevant JSON RPC responses (including error).
          When subscribing to the same primary selector again, the previous secondary selector will be replaced. See `Overview` page for more details.
          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |request_id
          `ri` |integer|False
          `0`|Optional Field which is used to match the response by the client.
          If not passed, this field will not be returned| + |stream
          `s` |string|True|The channel to subscribe to (eg: ticker.s / ticker.d)| + |feed
          `f` |[string]|True|The list of feeds to subscribe to| + |method
          `m` |string|True|The method to use for the request (eg: subscribe / unsubscribe)| + |is_full
          `if` |boolean|False
          `false`|Whether the request is for full data or lite data| diff --git a/artifacts/apidocs/schemas/ws_subscribe_response_v1_legacy.md b/artifacts/apidocs/schemas/ws_subscribe_response_v1_legacy.md index e69de29..dce4145 100644 --- a/artifacts/apidocs/schemas/ws_subscribe_response_v1_legacy.md +++ b/artifacts/apidocs/schemas/ws_subscribe_response_v1_legacy.md @@ -0,0 +1,12 @@ +!!! info "[WSSubscribeResponseV1Legacy](/../../schemas/ws_subscribe_response_v1_legacy)" + All V1 Websocket Responses are housed in this wrapper. It returns a confirmation of the JSON RPC subscribe request.
          If a `request_id` is supplied in the JSON RPC request, it will be propagated back in this JSON RPC response.
          To ensure you always know if you have missed any payloads, GRVT servers apply the following heuristics to sequence numbers:
          • All snapshot payloads will have a sequence number of `0`. All delta payloads will have a sequence number of `1+`. So its easy to distinguish between snapshots, and deltas
          • Num snapshots returned in Response (per stream): You can ensure that you received the right number of snapshots
          • First sequence number returned in Response (per stream): You can ensure that you received the first stream, without gaps from snapshots
          • Sequence numbers should always monotonically increase by `1`. If it decreases, or increases by more than `1`. Please reconnect
          • Duplicate sequence numbers are possible due to network retries. If you receive a duplicate, please ignore it, or idempotently re-update it.

          When subscribing to the same primary selector again, the previous secondary selector will be replaced. See `Overview` page for more details.
          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |request_id
          `ri` |integer|False
          `0`|Optional Field which is used to match the response by the client.
          If not passed, this field will not be returned| + |stream
          `s` |string|True|The channel to subscribe to (eg: ticker.s / ticker.d)| + |subs
          `s1` |[string]|True|The list of feeds subscribed to| + |unsubs
          `u` |[string]|True|The list of feeds unsubscribed from| + |num_snapshots
          `ns` |[integer]|True|The number of snapshot payloads to expect for each subscribed feed. Returned in same order as `subs`| + |first_sequence_number
          `fs` |[string]|True|The first sequence number to expect for each subscribed feed. Returned in same order as `subs`| + |latest_sequence_number
          `ls` |[string]|True|The sequence number of the most recent message in the stream. Next received sequence number must be larger than this one. Returned in same order as `subs`| diff --git a/artifacts/apidocs/schemas/ws_subscribe_result.md b/artifacts/apidocs/schemas/ws_subscribe_result.md index e69de29..084eb60 100644 --- a/artifacts/apidocs/schemas/ws_subscribe_result.md +++ b/artifacts/apidocs/schemas/ws_subscribe_result.md @@ -0,0 +1,11 @@ +!!! info "[WSSubscribeResult](/../../schemas/ws_subscribe_result)" + To ensure you always know if you have missed any payloads, GRVT servers apply the following heuristics to sequence numbers:
          • All snapshot payloads will have a sequence number of `0`. All delta payloads will have a sequence number of `1+`. So its easy to distinguish between snapshots, and deltas
          • Num snapshots returned in Response (per stream): You can ensure that you received the right number of snapshots
          • First sequence number returned in Response (per stream): You can ensure that you received the first stream, without gaps from snapshots
          • Sequence numbers should always monotonically increase by `1`. If it decreases, or increases by more than `1`. Please reconnect
          • Duplicate sequence numbers are possible due to network retries. If you receive a duplicate, please ignore it, or idempotently re-update it.

          When subscribing to the same primary selector again, the previous secondary selector will be replaced. See `Overview` page for more details.
          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |stream
          `s` |string|True|The channel to subscribe to (eg: ticker.s / ticker.d)| + |subs
          `s1` |[string]|True|The list of feeds subscribed to| + |unsubs
          `u` |[string]|True|The list of feeds unsubscribed from| + |num_snapshots
          `ns` |[integer]|True|The number of snapshot payloads to expect for each subscribed feed. Returned in same order as `subs`| + |first_sequence_number
          `fs` |[string]|True|The first sequence number to expect for each subscribed feed. Returned in same order as `subs`| + |latest_sequence_number
          `ls` |[string]|True|The sequence number of the most recent message in the stream. Next received sequence number must be larger than this one. Returned in same order as `subs`| diff --git a/artifacts/apidocs/schemas/ws_ticker_feed_data_v1.md b/artifacts/apidocs/schemas/ws_ticker_feed_data_v1.md index e69de29..f8dc199 100644 --- a/artifacts/apidocs/schemas/ws_ticker_feed_data_v1.md +++ b/artifacts/apidocs/schemas/ws_ticker_feed_data_v1.md @@ -0,0 +1,37 @@ +!!! info "[WSTickerFeedDataV1](/../../schemas/ws_ticker_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` |Ticker|True|A ticker matching the request filter| + |prev_sequence_number
          `ps` |string|True|The previous sequence number that determines global message order within the specific stream| + ??? info "[Ticker](/../../schemas/ticker)" + Derived data such as the below, will not be included by default:
          - 24 hour volume (`buyVolume + sellVolume`)
          - 24 hour taker buy/sell ratio (`buyVolume / sellVolume`)
          - 24 hour average trade price (`volumeQ / volumeU`)
          - 24 hour average trade volume (`volume / trades`)
          - 24 hour percentage change (`24hStatChange / 24hStat`)
          - 48 hour statistics (`2 * 24hStat - 24hStatChange`)

          To query for an extended ticker payload, leverage the `greeks` and the `derived` flags.
          Ticker extensions are currently under design to offer you more convenience.
          These flags are only supported on the `Ticker Snapshot` WS endpoint, and on the `Ticker` API endpoint.

          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |event_time
          `et` |string|False
          `None`|Time at which the event was emitted in unix nanoseconds| + |instrument
          `i` |string|False
          `None`|The readable instrument name:
          • Perpetual: `ETH_USDT_Perp`
          • Future: `BTC_USDT_Fut_20Oct23`
          • Call: `ETH_USDT_Call_20Oct23_2800`
          • Put: `ETH_USDT_Put_20Oct23_2800`
          | + |mark_price
          `mp` |string|False
          `None`|The mark price of the instrument, expressed in `9` decimals| + |index_price
          `ip` |string|False
          `None`|The index price of the instrument, expressed in `9` decimals| + |last_price
          `lp` |string|False
          `None`|The last traded price of the instrument (also close price), expressed in `9` decimals| + |last_size
          `ls` |string|False
          `None`|The number of assets traded in the last trade, expressed in base asset decimal units| + |mid_price
          `mp1` |string|False
          `None`|The mid price of the instrument, expressed in `9` decimals| + |best_bid_price
          `bb` |string|False
          `None`|The best bid price of the instrument, expressed in `9` decimals| + |best_bid_size
          `bb1` |string|False
          `None`|The number of assets offered on the best bid price of the instrument, expressed in base asset decimal units| + |best_ask_price
          `ba` |string|False
          `None`|The best ask price of the instrument, expressed in `9` decimals| + |best_ask_size
          `ba1` |string|False
          `None`|The number of assets offered on the best ask price of the instrument, expressed in base asset decimal units| + |funding_rate_8h_curr
          `fr` |string|False
          `None`|The current funding rate of the instrument, expressed in percentage points| + |funding_rate_8h_avg
          `fr1` |string|False
          `None`|The average funding rate of the instrument (over last 8h), expressed in percentage points| + |interest_rate
          `ir` |string|False
          `None`|The interest rate of the underlying, expressed in centibeeps (1/100th of a basis point)| + |forward_price
          `fp` |string|False
          `None`|[Options] The forward price of the option, expressed in `9` decimals| + |buy_volume_24h_b
          `bv` |string|False
          `None`|The 24 hour taker buy volume of the instrument, expressed in base asset decimal units| + |sell_volume_24h_b
          `sv` |string|False
          `None`|The 24 hour taker sell volume of the instrument, expressed in base asset decimal units| + |buy_volume_24h_q
          `bv1` |string|False
          `None`|The 24 hour taker buy volume of the instrument, expressed in quote asset decimal units| + |sell_volume_24h_q
          `sv1` |string|False
          `None`|The 24 hour taker sell volume of the instrument, expressed in quote asset decimal units| + |high_price
          `hp` |string|False
          `None`|The 24 hour highest traded price of the instrument, expressed in `9` decimals| + |low_price
          `lp1` |string|False
          `None`|The 24 hour lowest traded price of the instrument, expressed in `9` decimals| + |open_price
          `op` |string|False
          `None`|The 24 hour first traded price of the instrument, expressed in `9` decimals| + |open_interest
          `oi` |string|False
          `None`|The open interest in the instrument, expressed in base asset decimal units| + |long_short_ratio
          `ls1` |string|False
          `None`|The ratio of accounts that are net long vs net short on this instrument| diff --git a/artifacts/apidocs/schemas/ws_ticker_feed_selector_v1.md b/artifacts/apidocs/schemas/ws_ticker_feed_selector_v1.md index e69de29..0f4d5af 100644 --- a/artifacts/apidocs/schemas/ws_ticker_feed_selector_v1.md +++ b/artifacts/apidocs/schemas/ws_ticker_feed_selector_v1.md @@ -0,0 +1,7 @@ +!!! info "[WSTickerFeedSelectorV1](/../../schemas/ws_ticker_feed_selector_v1)" + Subscribes to a ticker feed for a single instrument. The `ticker.s` channel offers simpler integration. To experience higher publishing rates, please use the `ticker.d` channel.
          Unlike the `ticker.d` channel which publishes an initial snapshot, then only streams deltas after, the `ticker.s` channel publishes full snapshots at each feed.

          The Delta feed will work as follows:
          • On subscription, the server will send a full snapshot of the ticker.
          • After the snapshot, the server will only send deltas of the ticker.
          • The server will send a delta if any of the fields in the ticker have changed.


          Field Semantics:
          • [DeltaOnly] If a field is not updated, {}
          • If a field is updated, {field: '123'}
          • If a field is set to zero, {field: '0'}
          • If a field is set to null, {field: ''}

          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |instrument
          `i` |string|True|The readable instrument name:
          • Perpetual: `ETH_USDT_Perp`
          • Future: `BTC_USDT_Fut_20Oct23`
          • Call: `ETH_USDT_Call_20Oct23_2800`
          • Put: `ETH_USDT_Put_20Oct23_2800`
          | + |rate
          `r` |integer|True|The minimal rate at which we publish feeds (in milliseconds)
          Delta (100, 200, 500, 1000, 5000)
          Snapshot (500, 1000, 5000)| diff --git a/artifacts/apidocs/schemas/ws_trade_feed_data_v1.md b/artifacts/apidocs/schemas/ws_trade_feed_data_v1.md index e69de29..e1c1d55 100644 --- a/artifacts/apidocs/schemas/ws_trade_feed_data_v1.md +++ b/artifacts/apidocs/schemas/ws_trade_feed_data_v1.md @@ -0,0 +1,31 @@ +!!! info "[WSTradeFeedDataV1](/../../schemas/ws_trade_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` |Trade|True|A public trade matching the request filter| + |prev_sequence_number
          `ps` |string|True|The previous sequence number that determines global message order within the specific stream| + ??? info "[Trade](/../../schemas/trade)" + All private RFQs and Private AXEs will be filtered out from the responses
          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |event_time
          `et` |string|True|Time at which the event was emitted in unix nanoseconds| + |instrument
          `i` |string|True|The readable instrument name:
          • Perpetual: `ETH_USDT_Perp`
          • Future: `BTC_USDT_Fut_20Oct23`
          • Call: `ETH_USDT_Call_20Oct23_2800`
          • Put: `ETH_USDT_Put_20Oct23_2800`
          | + |is_taker_buyer
          `it` |boolean|True|If taker was the buyer on the trade| + |size
          `s` |string|True|The number of assets being traded, expressed in base asset decimal units| + |price
          `p` |string|True|The traded price, expressed in `9` decimals| + |mark_price
          `mp` |string|True|The mark price of the instrument at point of trade, expressed in `9` decimals| + |index_price
          `ip` |string|True|The index price of the instrument at point of trade, expressed in `9` decimals| + |interest_rate
          `ir` |string|True|The interest rate of the underlying at point of trade, expressed in centibeeps (1/100th of a basis point)| + |forward_price
          `fp` |string|True|[Options] The forward price of the option at point of trade, expressed in `9` decimals| + |trade_id
          `ti` |string|True|A trade identifier, globally unique, and monotonically increasing (not by `1`).
          All trades sharing a single taker execution share the same first component (before `-`), and `event_time`.
          `trade_id` is guaranteed to be consistent across MarketData `Trade` and Trading `Fill`.| + |venue
          `v` |Venue|True|The venue where the trade occurred| + ??? info "[Venue](/../../schemas/venue)" + The list of Trading Venues that are supported on the GRVT exchange
          + + |Value| Description | + |-|-| + |`ORDERBOOK` = 1|the trade is cleared on the orderbook venue| + |`RFQ` = 2|the trade is cleared on the RFQ venue| diff --git a/artifacts/apidocs/schemas/ws_trade_feed_selector_v1.md b/artifacts/apidocs/schemas/ws_trade_feed_selector_v1.md index e69de29..bc3e2fd 100644 --- a/artifacts/apidocs/schemas/ws_trade_feed_selector_v1.md +++ b/artifacts/apidocs/schemas/ws_trade_feed_selector_v1.md @@ -0,0 +1,7 @@ +!!! info "[WSTradeFeedSelectorV1](/../../schemas/ws_trade_feed_selector_v1)" + Subscribes to a stream of Public Trades for an instrument.
          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |instrument
          `i` |string|True|The readable instrument name:
          • Perpetual: `ETH_USDT_Perp`
          • Future: `BTC_USDT_Fut_20Oct23`
          • Call: `ETH_USDT_Call_20Oct23_2800`
          • Put: `ETH_USDT_Put_20Oct23_2800`
          | + |limit
          `l` |integer|True|The limit to query for. Valid values are (50, 200, 500, 1000). Default is 50| diff --git a/artifacts/apidocs/schemas/ws_transfer_feed_data_v1.md b/artifacts/apidocs/schemas/ws_transfer_feed_data_v1.md index e69de29..c62c1f5 100644 --- a/artifacts/apidocs/schemas/ws_transfer_feed_data_v1.md +++ b/artifacts/apidocs/schemas/ws_transfer_feed_data_v1.md @@ -0,0 +1,63 @@ +!!! info "[WSTransferFeedDataV1](/../../schemas/ws_transfer_feed_data_v1)" + Subscribes to a feed of transfer updates.
          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |stream
          `s` |string|True|The websocket channel to which the response is sent| + |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` |TransferHistory|True|The transfer history matching the requested filters| + |prev_sequence_number
          `ps` |string|True|The previous sequence number that determines global message order within the specific stream| + ??? info "[TransferHistory](/../../schemas/transfer_history)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |tx_id
          `ti` |string|True|The transaction ID of the transfer| + |from_account_id
          `fa` |string|True|The account to transfer from| + |from_sub_account_id
          `fs` |string|True|The subaccount to transfer from (0 if transferring from main account)| + |to_account_id
          `ta` |string|True|The account to deposit into| + |to_sub_account_id
          `ts` |string|True|The subaccount to transfer to (0 if transferring to main account)| + |currency
          `c` |Currency|True|The token currency to transfer| + |num_tokens
          `nt` |string|True|The number of tokens to transfer| + |signature
          `s` |Signature|True|The signature of the transfer| + |event_time
          `et` |string|True|The timestamp of the transfer in unix nanoseconds| + |transfer_type
          `tt` |TransferType|True|The type of transfer| + |transfer_metadata
          `tm` |string|True|The metadata of the transfer| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
          + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| + ??? 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 "[TransferType](/../../schemas/transfer_type)" + |Value| Description | + |-|-| + |`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| diff --git a/artifacts/apidocs/schemas/ws_transfer_feed_selector_v1.md b/artifacts/apidocs/schemas/ws_transfer_feed_selector_v1.md index e69de29..5900b5e 100644 --- a/artifacts/apidocs/schemas/ws_transfer_feed_selector_v1.md +++ b/artifacts/apidocs/schemas/ws_transfer_feed_selector_v1.md @@ -0,0 +1,7 @@ +!!! info "[WSTransferFeedSelectorV1](/../../schemas/ws_transfer_feed_selector_v1)" + Subscribes to a feed of transfers. This will execute when there is any transfer to or from the selected account.
          To subscribe to a main account, specify the account ID (eg. `0x9fe3758b67ce7a2875ee4b452f01a5282d84ed8a`).
          To subscribe to a sub account, specify the main account and the sub account dash separated (eg. `0x9fe3758b67ce7a2875ee4b452f01a5282d84ed8a-1920109784202388`).
          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |main_account_id
          `ma` |string|True|The main account ID to request for| + |sub_account_id
          `sa` |string|False
          `'0'`|The sub account ID to request for| diff --git a/artifacts/apidocs/schemas/ws_unsubscribe_all_params.md b/artifacts/apidocs/schemas/ws_unsubscribe_all_params.md index e69de29..1e1636d 100644 --- a/artifacts/apidocs/schemas/ws_unsubscribe_all_params.md +++ b/artifacts/apidocs/schemas/ws_unsubscribe_all_params.md @@ -0,0 +1,5 @@ +!!! info "[WSUnsubscribeAllParams](/../../schemas/ws_unsubscribe_all_params)" + All V1 Websocket Unsubscription Request to unsubscribe from all active websocket streams.
          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| diff --git a/artifacts/apidocs/schemas/ws_unsubscribe_all_result.md b/artifacts/apidocs/schemas/ws_unsubscribe_all_result.md index e69de29..aae2c8e 100644 --- a/artifacts/apidocs/schemas/ws_unsubscribe_all_result.md +++ b/artifacts/apidocs/schemas/ws_unsubscribe_all_result.md @@ -0,0 +1,11 @@ +!!! info "[WSUnsubscribeAllResult](/../../schemas/ws_unsubscribe_all_result)" + Returns a list of all rooms the client has unsubscribed from.
          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |stream_reference
          `sr` |[StreamReference]|True|The list of stream references unsubscribed from| + ??? info "[StreamReference](/../../schemas/stream_reference)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |stream
          `s` |string|True|The channel to subscribe to (eg: ticker.s / ticker.d)| + |selectors
          `s1` |[string]|True|The list of selectors for the stream| diff --git a/artifacts/apidocs/schemas/ws_unsubscribe_params.md b/artifacts/apidocs/schemas/ws_unsubscribe_params.md index e69de29..071d96c 100644 --- a/artifacts/apidocs/schemas/ws_unsubscribe_params.md +++ b/artifacts/apidocs/schemas/ws_unsubscribe_params.md @@ -0,0 +1,8 @@ +!!! info "[WSUnsubscribeParams](/../../schemas/ws_unsubscribe_params)" + All V1 Websocket Unsubscription Requests are housed in this wrapper. You may specify a stream, and a list of feeds to unsubscribe from.
          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |stream
          `s` |string|True|The channel to unsubscribe from (eg: ticker.s / ticker.d)| + |selectors
          `s1` |[string]|True|The list of feeds to unsubscribe from| + |use_global_sequence_number
          `ug` |boolean|False
          `false`|Whether to use the global sequence number for the stream| diff --git a/artifacts/apidocs/schemas/ws_unsubscribe_result.md b/artifacts/apidocs/schemas/ws_unsubscribe_result.md index e69de29..09bd37b 100644 --- a/artifacts/apidocs/schemas/ws_unsubscribe_result.md +++ b/artifacts/apidocs/schemas/ws_unsubscribe_result.md @@ -0,0 +1,7 @@ +!!! info "[WSUnsubscribeResult](/../../schemas/ws_unsubscribe_result)" + Returns a confirmation of all unsubscribes
          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |stream
          `s` |string|True|The channel to subscribe to (eg: ticker.s / ticker.d)| + |unsubs
          `u` |[string]|True|The list of feeds unsubscribed from| diff --git a/artifacts/apidocs/schemas/ws_withdrawal_feed_data_v1.md b/artifacts/apidocs/schemas/ws_withdrawal_feed_data_v1.md index e69de29..2a55bca 100644 --- a/artifacts/apidocs/schemas/ws_withdrawal_feed_data_v1.md +++ b/artifacts/apidocs/schemas/ws_withdrawal_feed_data_v1.md @@ -0,0 +1,51 @@ +!!! info "[WSWithdrawalFeedDataV1](/../../schemas/ws_withdrawal_feed_data_v1)" + Subscribes to a feed of withdrawal updates.
          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |stream
          `s` |string|True|The websocket channel to which the response is sent| + |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` |Withdrawal|True|The Withdrawal object| + |prev_sequence_number
          `ps` |string|True|The previous sequence number that determines global message order within the specific stream| + ??? info "[Withdrawal](/../../schemas/withdrawal)" + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |from_account_id
          `fa` |string|True|The subaccount to withdraw from| + |to_eth_address
          `te` |string|True|The ethereum address to withdraw to| + |currency
          `c` |Currency|True|The token currency to withdraw| + |num_tokens
          `nt` |string|True|The number of tokens to withdraw| + |signature
          `s` |Signature|True|The signature of the withdrawal| + ??? info "[Currency](/../../schemas/currency)" + The list of Currencies that are supported on the GRVT exchange
          + + |Value| Description | + |-|-| + |`USD` = 1|the USD fiat currency| + |`USDC` = 2|the USDC token| + |`USDT` = 3|the USDT token| + |`ETH` = 4|the ETH token| + |`BTC` = 5|the BTC token| + |`SOL` = 6|the SOL token| + |`ARB` = 7|the ARB token| + |`BNB` = 8|the BNB token| + |`ZK` = 9|the ZK token| + |`POL` = 10|the POL token| + |`OP` = 11|the OP token| + |`ATOM` = 12|the ATOM token| + |`KPEPE` = 13|the 1000PEPE token| + |`TON` = 14|the TON token| + |`XRP` = 15|the XRP token| + |`TRUMP` = 20|the TRUMP token| + |`SUI` = 21|the SUI token| + |`FARTCOIN` = 28|the FARTCOIN token| + |`BERA` = 35|the BERA token| + ??? 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.| diff --git a/artifacts/apidocs/schemas/ws_withdrawal_feed_selector_v1.md b/artifacts/apidocs/schemas/ws_withdrawal_feed_selector_v1.md index e69de29..86e6511 100644 --- a/artifacts/apidocs/schemas/ws_withdrawal_feed_selector_v1.md +++ b/artifacts/apidocs/schemas/ws_withdrawal_feed_selector_v1.md @@ -0,0 +1,6 @@ +!!! info "[WSWithdrawalFeedSelectorV1](/../../schemas/ws_withdrawal_feed_selector_v1)" + Subscribes to a feed of withdrawals. This will execute when there is any withdrawal from the selected account.
          To subscribe to a main account, specify the account ID (eg. `0x9fe3758b67ce7a2875ee4b452f01a5282d84ed8a`).
          + + |Name
          `Lite`|Type|Required
          `Default`| Description | + |-|-|-|-| + |main_account_id
          `ma` |string|True|The main account ID to request for|