@grvt/client 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (539) hide show
  1. package/LICENSE +0 -0
  2. package/MDG/index.d.ts +53 -0
  3. package/MDG/index.js +106 -0
  4. package/README.md +62 -0
  5. package/TDG/index.d.ts +118 -0
  6. package/TDG/index.js +253 -0
  7. package/index.d.ts +10 -0
  8. package/index.js +25 -0
  9. package/interfaces/codegen/data.interface.d.ts +1581 -0
  10. package/interfaces/codegen/data.interface.js +403 -0
  11. package/interfaces/codegen/enum-int.d.ts +23 -0
  12. package/interfaces/codegen/enum-int.js +207 -0
  13. package/interfaces/codegen/hex-string-map.d.ts +1 -0
  14. package/interfaces/codegen/hex-string-map.js +28 -0
  15. package/interfaces/codegen/index.d.ts +5 -0
  16. package/interfaces/codegen/index.js +21 -0
  17. package/interfaces/codegen/schema-maps/ack.d.ts +2 -0
  18. package/interfaces/codegen/schema-maps/ack.js +12 -0
  19. package/interfaces/codegen/schema-maps/ack_response.d.ts +2 -0
  20. package/interfaces/codegen/schema-maps/ack_response.js +13 -0
  21. package/interfaces/codegen/schema-maps/aggregated_account_summary.d.ts +2 -0
  22. package/interfaces/codegen/schema-maps/aggregated_account_summary.js +17 -0
  23. package/interfaces/codegen/schema-maps/api_aggregated_account_summary_response.d.ts +2 -0
  24. package/interfaces/codegen/schema-maps/api_aggregated_account_summary_response.js +13 -0
  25. package/interfaces/codegen/schema-maps/api_cancel_all_orders_request.d.ts +2 -0
  26. package/interfaces/codegen/schema-maps/api_cancel_all_orders_request.js +18 -0
  27. package/interfaces/codegen/schema-maps/api_cancel_all_orders_response.d.ts +2 -0
  28. package/interfaces/codegen/schema-maps/api_cancel_all_orders_response.js +12 -0
  29. package/interfaces/codegen/schema-maps/api_cancel_on_disconnect_request.d.ts +2 -0
  30. package/interfaces/codegen/schema-maps/api_cancel_on_disconnect_request.js +14 -0
  31. package/interfaces/codegen/schema-maps/api_cancel_order_request.d.ts +2 -0
  32. package/interfaces/codegen/schema-maps/api_cancel_order_request.js +18 -0
  33. package/interfaces/codegen/schema-maps/api_cancel_order_response.d.ts +2 -0
  34. package/interfaces/codegen/schema-maps/api_cancel_order_response.js +13 -0
  35. package/interfaces/codegen/schema-maps/api_candlestick_request.d.ts +2 -0
  36. package/interfaces/codegen/schema-maps/api_candlestick_request.js +24 -0
  37. package/interfaces/codegen/schema-maps/api_candlestick_response.d.ts +2 -0
  38. package/interfaces/codegen/schema-maps/api_candlestick_response.js +15 -0
  39. package/interfaces/codegen/schema-maps/api_category_affinity_score_request.d.ts +2 -0
  40. package/interfaces/codegen/schema-maps/api_category_affinity_score_request.js +14 -0
  41. package/interfaces/codegen/schema-maps/api_category_affinity_score_response.d.ts +2 -0
  42. package/interfaces/codegen/schema-maps/api_category_affinity_score_response.js +13 -0
  43. package/interfaces/codegen/schema-maps/api_create_bulk_orders_request.d.ts +2 -0
  44. package/interfaces/codegen/schema-maps/api_create_bulk_orders_request.js +13 -0
  45. package/interfaces/codegen/schema-maps/api_create_bulk_orders_response.d.ts +2 -0
  46. package/interfaces/codegen/schema-maps/api_create_bulk_orders_response.js +13 -0
  47. package/interfaces/codegen/schema-maps/api_create_order_request.d.ts +2 -0
  48. package/interfaces/codegen/schema-maps/api_create_order_request.js +13 -0
  49. package/interfaces/codegen/schema-maps/api_create_order_response.d.ts +2 -0
  50. package/interfaces/codegen/schema-maps/api_create_order_response.js +13 -0
  51. package/interfaces/codegen/schema-maps/api_dedust_position_request.d.ts +2 -0
  52. package/interfaces/codegen/schema-maps/api_dedust_position_request.js +13 -0
  53. package/interfaces/codegen/schema-maps/api_dedust_position_response.d.ts +2 -0
  54. package/interfaces/codegen/schema-maps/api_dedust_position_response.js +13 -0
  55. package/interfaces/codegen/schema-maps/api_deposit_history_request.d.ts +2 -0
  56. package/interfaces/codegen/schema-maps/api_deposit_history_request.js +22 -0
  57. package/interfaces/codegen/schema-maps/api_deposit_history_response.d.ts +2 -0
  58. package/interfaces/codegen/schema-maps/api_deposit_history_response.js +15 -0
  59. package/interfaces/codegen/schema-maps/api_drop_client_ws_request.d.ts +2 -0
  60. package/interfaces/codegen/schema-maps/api_drop_client_ws_request.js +12 -0
  61. package/interfaces/codegen/schema-maps/api_drop_client_ws_response.d.ts +2 -0
  62. package/interfaces/codegen/schema-maps/api_drop_client_ws_response.js +12 -0
  63. package/interfaces/codegen/schema-maps/api_fill_history_request.d.ts +2 -0
  64. package/interfaces/codegen/schema-maps/api_fill_history_request.js +26 -0
  65. package/interfaces/codegen/schema-maps/api_fill_history_response.d.ts +2 -0
  66. package/interfaces/codegen/schema-maps/api_fill_history_response.js +15 -0
  67. package/interfaces/codegen/schema-maps/api_find_ecosystem_epoch_metric_response.d.ts +2 -0
  68. package/interfaces/codegen/schema-maps/api_find_ecosystem_epoch_metric_response.js +23 -0
  69. package/interfaces/codegen/schema-maps/api_find_ecosystem_leaderboard_response.d.ts +2 -0
  70. package/interfaces/codegen/schema-maps/api_find_ecosystem_leaderboard_response.js +13 -0
  71. package/interfaces/codegen/schema-maps/api_find_first_epoch_metric_response.d.ts +2 -0
  72. package/interfaces/codegen/schema-maps/api_find_first_epoch_metric_response.js +23 -0
  73. package/interfaces/codegen/schema-maps/api_find_trader_epoch_metric_response.d.ts +2 -0
  74. package/interfaces/codegen/schema-maps/api_find_trader_epoch_metric_response.js +19 -0
  75. package/interfaces/codegen/schema-maps/api_find_trader_leaderboard_response.d.ts +2 -0
  76. package/interfaces/codegen/schema-maps/api_find_trader_leaderboard_response.js +13 -0
  77. package/interfaces/codegen/schema-maps/api_funding_account_summary_response.d.ts +2 -0
  78. package/interfaces/codegen/schema-maps/api_funding_account_summary_response.js +13 -0
  79. package/interfaces/codegen/schema-maps/api_funding_payment_history_request.d.ts +2 -0
  80. package/interfaces/codegen/schema-maps/api_funding_payment_history_request.js +22 -0
  81. package/interfaces/codegen/schema-maps/api_funding_payment_history_response.d.ts +2 -0
  82. package/interfaces/codegen/schema-maps/api_funding_payment_history_response.js +15 -0
  83. package/interfaces/codegen/schema-maps/api_funding_rate_request.d.ts +2 -0
  84. package/interfaces/codegen/schema-maps/api_funding_rate_request.js +20 -0
  85. package/interfaces/codegen/schema-maps/api_funding_rate_response.d.ts +2 -0
  86. package/interfaces/codegen/schema-maps/api_funding_rate_response.js +15 -0
  87. package/interfaces/codegen/schema-maps/api_get_all_initial_leverage_request.d.ts +2 -0
  88. package/interfaces/codegen/schema-maps/api_get_all_initial_leverage_request.js +12 -0
  89. package/interfaces/codegen/schema-maps/api_get_all_initial_leverage_response.d.ts +2 -0
  90. package/interfaces/codegen/schema-maps/api_get_all_initial_leverage_response.js +13 -0
  91. package/interfaces/codegen/schema-maps/api_get_all_instruments_request.d.ts +2 -0
  92. package/interfaces/codegen/schema-maps/api_get_all_instruments_request.js +12 -0
  93. package/interfaces/codegen/schema-maps/api_get_all_instruments_response.d.ts +2 -0
  94. package/interfaces/codegen/schema-maps/api_get_all_instruments_response.js +13 -0
  95. package/interfaces/codegen/schema-maps/api_get_ecosystem_leaderboard_request.d.ts +2 -0
  96. package/interfaces/codegen/schema-maps/api_get_ecosystem_leaderboard_request.js +14 -0
  97. package/interfaces/codegen/schema-maps/api_get_ecosystem_leaderboard_response.d.ts +2 -0
  98. package/interfaces/codegen/schema-maps/api_get_ecosystem_leaderboard_response.js +13 -0
  99. package/interfaces/codegen/schema-maps/api_get_ecosystem_referral_stat_response.d.ts +2 -0
  100. package/interfaces/codegen/schema-maps/api_get_ecosystem_referral_stat_response.js +18 -0
  101. package/interfaces/codegen/schema-maps/api_get_filtered_instruments_request.d.ts +2 -0
  102. package/interfaces/codegen/schema-maps/api_get_filtered_instruments_request.js +20 -0
  103. package/interfaces/codegen/schema-maps/api_get_filtered_instruments_response.d.ts +2 -0
  104. package/interfaces/codegen/schema-maps/api_get_filtered_instruments_response.js +13 -0
  105. package/interfaces/codegen/schema-maps/api_get_instrument_request.d.ts +2 -0
  106. package/interfaces/codegen/schema-maps/api_get_instrument_request.js +12 -0
  107. package/interfaces/codegen/schema-maps/api_get_instrument_response.d.ts +2 -0
  108. package/interfaces/codegen/schema-maps/api_get_instrument_response.js +13 -0
  109. package/interfaces/codegen/schema-maps/api_get_latest_lp_snapshot_request.d.ts +2 -0
  110. package/interfaces/codegen/schema-maps/api_get_latest_lp_snapshot_request.js +14 -0
  111. package/interfaces/codegen/schema-maps/api_get_latest_lp_snapshot_response.d.ts +2 -0
  112. package/interfaces/codegen/schema-maps/api_get_latest_lp_snapshot_response.js +13 -0
  113. package/interfaces/codegen/schema-maps/api_get_list_epoch_badge_response.d.ts +2 -0
  114. package/interfaces/codegen/schema-maps/api_get_list_epoch_badge_response.js +13 -0
  115. package/interfaces/codegen/schema-maps/api_get_list_flat_referral_request.d.ts +2 -0
  116. package/interfaces/codegen/schema-maps/api_get_list_flat_referral_request.js +18 -0
  117. package/interfaces/codegen/schema-maps/api_get_list_flat_referral_response.d.ts +2 -0
  118. package/interfaces/codegen/schema-maps/api_get_list_flat_referral_response.js +13 -0
  119. package/interfaces/codegen/schema-maps/api_get_list_reward_epoch_response.d.ts +2 -0
  120. package/interfaces/codegen/schema-maps/api_get_list_reward_epoch_response.js +15 -0
  121. package/interfaces/codegen/schema-maps/api_get_lp_info_request.d.ts +2 -0
  122. package/interfaces/codegen/schema-maps/api_get_lp_info_request.js +14 -0
  123. package/interfaces/codegen/schema-maps/api_get_lp_info_response.d.ts +2 -0
  124. package/interfaces/codegen/schema-maps/api_get_lp_info_response.js +26 -0
  125. package/interfaces/codegen/schema-maps/api_get_lp_leaderboard_request.d.ts +2 -0
  126. package/interfaces/codegen/schema-maps/api_get_lp_leaderboard_request.js +18 -0
  127. package/interfaces/codegen/schema-maps/api_get_lp_leaderboard_response.d.ts +2 -0
  128. package/interfaces/codegen/schema-maps/api_get_lp_leaderboard_response.js +13 -0
  129. package/interfaces/codegen/schema-maps/api_get_lp_point_request.d.ts +2 -0
  130. package/interfaces/codegen/schema-maps/api_get_lp_point_request.js +16 -0
  131. package/interfaces/codegen/schema-maps/api_get_lp_point_response.d.ts +2 -0
  132. package/interfaces/codegen/schema-maps/api_get_lp_point_response.js +15 -0
  133. package/interfaces/codegen/schema-maps/api_get_margin_tiers_response.d.ts +2 -0
  134. package/interfaces/codegen/schema-maps/api_get_margin_tiers_response.js +13 -0
  135. package/interfaces/codegen/schema-maps/api_get_order_group_request.d.ts +2 -0
  136. package/interfaces/codegen/schema-maps/api_get_order_group_request.js +12 -0
  137. package/interfaces/codegen/schema-maps/api_get_order_group_response.d.ts +2 -0
  138. package/interfaces/codegen/schema-maps/api_get_order_group_response.js +13 -0
  139. package/interfaces/codegen/schema-maps/api_get_order_request.d.ts +2 -0
  140. package/interfaces/codegen/schema-maps/api_get_order_request.js +16 -0
  141. package/interfaces/codegen/schema-maps/api_get_order_response.d.ts +2 -0
  142. package/interfaces/codegen/schema-maps/api_get_order_response.js +13 -0
  143. package/interfaces/codegen/schema-maps/api_get_trader_stat_response.d.ts +2 -0
  144. package/interfaces/codegen/schema-maps/api_get_trader_stat_response.js +12 -0
  145. package/interfaces/codegen/schema-maps/api_get_user_ecosystem_point_request.d.ts +2 -0
  146. package/interfaces/codegen/schema-maps/api_get_user_ecosystem_point_request.js +16 -0
  147. package/interfaces/codegen/schema-maps/api_get_user_ecosystem_point_response.d.ts +2 -0
  148. package/interfaces/codegen/schema-maps/api_get_user_ecosystem_point_response.js +13 -0
  149. package/interfaces/codegen/schema-maps/api_get_verified_ecosystem_leaderboard_request.d.ts +2 -0
  150. package/interfaces/codegen/schema-maps/api_get_verified_ecosystem_leaderboard_request.js +14 -0
  151. package/interfaces/codegen/schema-maps/api_latest_snap_sub_accounts_request.d.ts +2 -0
  152. package/interfaces/codegen/schema-maps/api_latest_snap_sub_accounts_request.js +12 -0
  153. package/interfaces/codegen/schema-maps/api_latest_snap_sub_accounts_response.d.ts +2 -0
  154. package/interfaces/codegen/schema-maps/api_latest_snap_sub_accounts_response.js +13 -0
  155. package/interfaces/codegen/schema-maps/api_list_aggregated_account_summary_request.d.ts +2 -0
  156. package/interfaces/codegen/schema-maps/api_list_aggregated_account_summary_request.js +12 -0
  157. package/interfaces/codegen/schema-maps/api_list_aggregated_account_summary_response.d.ts +2 -0
  158. package/interfaces/codegen/schema-maps/api_list_aggregated_account_summary_response.js +13 -0
  159. package/interfaces/codegen/schema-maps/api_mini_ticker_request.d.ts +2 -0
  160. package/interfaces/codegen/schema-maps/api_mini_ticker_request.js +12 -0
  161. package/interfaces/codegen/schema-maps/api_mini_ticker_response.d.ts +2 -0
  162. package/interfaces/codegen/schema-maps/api_mini_ticker_response.js +13 -0
  163. package/interfaces/codegen/schema-maps/api_open_orders_request.d.ts +2 -0
  164. package/interfaces/codegen/schema-maps/api_open_orders_request.js +18 -0
  165. package/interfaces/codegen/schema-maps/api_open_orders_response.d.ts +2 -0
  166. package/interfaces/codegen/schema-maps/api_open_orders_response.js +13 -0
  167. package/interfaces/codegen/schema-maps/api_order_history_request.d.ts +2 -0
  168. package/interfaces/codegen/schema-maps/api_order_history_request.js +26 -0
  169. package/interfaces/codegen/schema-maps/api_order_history_response.d.ts +2 -0
  170. package/interfaces/codegen/schema-maps/api_order_history_response.js +15 -0
  171. package/interfaces/codegen/schema-maps/api_order_state_request.d.ts +2 -0
  172. package/interfaces/codegen/schema-maps/api_order_state_request.js +16 -0
  173. package/interfaces/codegen/schema-maps/api_order_state_response.d.ts +2 -0
  174. package/interfaces/codegen/schema-maps/api_order_state_response.js +13 -0
  175. package/interfaces/codegen/schema-maps/api_orderbook_levels_request.d.ts +2 -0
  176. package/interfaces/codegen/schema-maps/api_orderbook_levels_request.js +14 -0
  177. package/interfaces/codegen/schema-maps/api_orderbook_levels_response.d.ts +2 -0
  178. package/interfaces/codegen/schema-maps/api_orderbook_levels_response.js +13 -0
  179. package/interfaces/codegen/schema-maps/api_position.d.ts +2 -0
  180. package/interfaces/codegen/schema-maps/api_position.js +40 -0
  181. package/interfaces/codegen/schema-maps/api_positions_request.d.ts +2 -0
  182. package/interfaces/codegen/schema-maps/api_positions_request.js +18 -0
  183. package/interfaces/codegen/schema-maps/api_positions_response.d.ts +2 -0
  184. package/interfaces/codegen/schema-maps/api_positions_response.js +13 -0
  185. package/interfaces/codegen/schema-maps/api_pre_deposit_check_request.d.ts +2 -0
  186. package/interfaces/codegen/schema-maps/api_pre_deposit_check_request.js +14 -0
  187. package/interfaces/codegen/schema-maps/api_pre_deposit_check_response.d.ts +2 -0
  188. package/interfaces/codegen/schema-maps/api_pre_deposit_check_response.js +14 -0
  189. package/interfaces/codegen/schema-maps/api_pre_order_check_request.d.ts +2 -0
  190. package/interfaces/codegen/schema-maps/api_pre_order_check_request.js +15 -0
  191. package/interfaces/codegen/schema-maps/api_pre_order_check_response.d.ts +2 -0
  192. package/interfaces/codegen/schema-maps/api_pre_order_check_response.js +13 -0
  193. package/interfaces/codegen/schema-maps/api_query_account_summary_request.d.ts +2 -0
  194. package/interfaces/codegen/schema-maps/api_query_account_summary_request.js +12 -0
  195. package/interfaces/codegen/schema-maps/api_query_account_summary_response.d.ts +2 -0
  196. package/interfaces/codegen/schema-maps/api_query_account_summary_response.js +15 -0
  197. package/interfaces/codegen/schema-maps/api_query_flat_referral_stat_request.d.ts +2 -0
  198. package/interfaces/codegen/schema-maps/api_query_flat_referral_stat_request.js +12 -0
  199. package/interfaces/codegen/schema-maps/api_query_flat_referral_stat_response.d.ts +2 -0
  200. package/interfaces/codegen/schema-maps/api_query_flat_referral_stat_response.js +14 -0
  201. package/interfaces/codegen/schema-maps/api_query_list_funding_account_summary_request.d.ts +2 -0
  202. package/interfaces/codegen/schema-maps/api_query_list_funding_account_summary_request.js +12 -0
  203. package/interfaces/codegen/schema-maps/api_query_list_funding_account_summary_response.d.ts +2 -0
  204. package/interfaces/codegen/schema-maps/api_query_list_funding_account_summary_response.js +15 -0
  205. package/interfaces/codegen/schema-maps/api_query_list_sub_account_summary_request.d.ts +2 -0
  206. package/interfaces/codegen/schema-maps/api_query_list_sub_account_summary_request.js +14 -0
  207. package/interfaces/codegen/schema-maps/api_query_list_sub_account_summary_response.d.ts +2 -0
  208. package/interfaces/codegen/schema-maps/api_query_list_sub_account_summary_response.js +15 -0
  209. package/interfaces/codegen/schema-maps/api_query_trading_performance_request.d.ts +2 -0
  210. package/interfaces/codegen/schema-maps/api_query_trading_performance_request.js +14 -0
  211. package/interfaces/codegen/schema-maps/api_query_trading_performance_response.d.ts +2 -0
  212. package/interfaces/codegen/schema-maps/api_query_trading_performance_response.js +14 -0
  213. package/interfaces/codegen/schema-maps/api_query_trading_performance_trend_request.d.ts +2 -0
  214. package/interfaces/codegen/schema-maps/api_query_trading_performance_trend_request.js +14 -0
  215. package/interfaces/codegen/schema-maps/api_query_trading_performance_trend_response.d.ts +2 -0
  216. package/interfaces/codegen/schema-maps/api_query_trading_performance_trend_response.js +15 -0
  217. package/interfaces/codegen/schema-maps/api_resolve_epoch_ecosystem_metric_response.d.ts +2 -0
  218. package/interfaces/codegen/schema-maps/api_resolve_epoch_ecosystem_metric_response.js +16 -0
  219. package/interfaces/codegen/schema-maps/api_set_initial_leverage_request.d.ts +2 -0
  220. package/interfaces/codegen/schema-maps/api_set_initial_leverage_request.js +16 -0
  221. package/interfaces/codegen/schema-maps/api_set_initial_leverage_response.d.ts +2 -0
  222. package/interfaces/codegen/schema-maps/api_set_initial_leverage_response.js +12 -0
  223. package/interfaces/codegen/schema-maps/api_settlement_price.d.ts +2 -0
  224. package/interfaces/codegen/schema-maps/api_settlement_price.js +18 -0
  225. package/interfaces/codegen/schema-maps/api_settlement_price_request.d.ts +2 -0
  226. package/interfaces/codegen/schema-maps/api_settlement_price_request.js +22 -0
  227. package/interfaces/codegen/schema-maps/api_settlement_price_response.d.ts +2 -0
  228. package/interfaces/codegen/schema-maps/api_settlement_price_response.js +15 -0
  229. package/interfaces/codegen/schema-maps/api_socialized_loss_status_response.d.ts +2 -0
  230. package/interfaces/codegen/schema-maps/api_socialized_loss_status_response.js +14 -0
  231. package/interfaces/codegen/schema-maps/api_spot_balance.d.ts +2 -0
  232. package/interfaces/codegen/schema-maps/api_spot_balance.js +16 -0
  233. package/interfaces/codegen/schema-maps/api_sub_account_history_request.d.ts +2 -0
  234. package/interfaces/codegen/schema-maps/api_sub_account_history_request.js +20 -0
  235. package/interfaces/codegen/schema-maps/api_sub_account_history_response.d.ts +2 -0
  236. package/interfaces/codegen/schema-maps/api_sub_account_history_response.js +15 -0
  237. package/interfaces/codegen/schema-maps/api_sub_account_summary_request.d.ts +2 -0
  238. package/interfaces/codegen/schema-maps/api_sub_account_summary_request.js +12 -0
  239. package/interfaces/codegen/schema-maps/api_sub_account_summary_response.d.ts +2 -0
  240. package/interfaces/codegen/schema-maps/api_sub_account_summary_response.js +13 -0
  241. package/interfaces/codegen/schema-maps/api_sub_account_trade_aggregation_request.d.ts +2 -0
  242. package/interfaces/codegen/schema-maps/api_sub_account_trade_aggregation_request.js +30 -0
  243. package/interfaces/codegen/schema-maps/api_sub_account_trade_aggregation_response.d.ts +2 -0
  244. package/interfaces/codegen/schema-maps/api_sub_account_trade_aggregation_response.js +15 -0
  245. package/interfaces/codegen/schema-maps/api_ticker_feed_data_v_1.d.ts +2 -0
  246. package/interfaces/codegen/schema-maps/api_ticker_feed_data_v_1.js +13 -0
  247. package/interfaces/codegen/schema-maps/api_ticker_request.d.ts +2 -0
  248. package/interfaces/codegen/schema-maps/api_ticker_request.js +12 -0
  249. package/interfaces/codegen/schema-maps/api_ticker_response.d.ts +2 -0
  250. package/interfaces/codegen/schema-maps/api_ticker_response.js +13 -0
  251. package/interfaces/codegen/schema-maps/api_timed_asset_exposure_request.d.ts +2 -0
  252. package/interfaces/codegen/schema-maps/api_timed_asset_exposure_request.js +16 -0
  253. package/interfaces/codegen/schema-maps/api_timed_asset_exposure_response.d.ts +2 -0
  254. package/interfaces/codegen/schema-maps/api_timed_asset_exposure_response.js +15 -0
  255. package/interfaces/codegen/schema-maps/api_trade_history_request.d.ts +2 -0
  256. package/interfaces/codegen/schema-maps/api_trade_history_request.js +20 -0
  257. package/interfaces/codegen/schema-maps/api_trade_history_response.d.ts +2 -0
  258. package/interfaces/codegen/schema-maps/api_trade_history_response.js +15 -0
  259. package/interfaces/codegen/schema-maps/api_trade_request.d.ts +2 -0
  260. package/interfaces/codegen/schema-maps/api_trade_request.js +14 -0
  261. package/interfaces/codegen/schema-maps/api_trade_response.d.ts +2 -0
  262. package/interfaces/codegen/schema-maps/api_trade_response.js +13 -0
  263. package/interfaces/codegen/schema-maps/api_trading_performance_trend.d.ts +2 -0
  264. package/interfaces/codegen/schema-maps/api_trading_performance_trend.js +16 -0
  265. package/interfaces/codegen/schema-maps/api_transfer_history_request.d.ts +2 -0
  266. package/interfaces/codegen/schema-maps/api_transfer_history_request.js +24 -0
  267. package/interfaces/codegen/schema-maps/api_transfer_history_response.d.ts +2 -0
  268. package/interfaces/codegen/schema-maps/api_transfer_history_response.js +15 -0
  269. package/interfaces/codegen/schema-maps/api_transfer_request.d.ts +2 -0
  270. package/interfaces/codegen/schema-maps/api_transfer_request.js +29 -0
  271. package/interfaces/codegen/schema-maps/api_user_category_affinity_score_request.d.ts +2 -0
  272. package/interfaces/codegen/schema-maps/api_user_category_affinity_score_request.js +16 -0
  273. package/interfaces/codegen/schema-maps/api_user_category_affinity_score_response.d.ts +2 -0
  274. package/interfaces/codegen/schema-maps/api_user_category_affinity_score_response.js +13 -0
  275. package/interfaces/codegen/schema-maps/api_withdrawal_history_request.d.ts +2 -0
  276. package/interfaces/codegen/schema-maps/api_withdrawal_history_request.js +22 -0
  277. package/interfaces/codegen/schema-maps/api_withdrawal_history_response.d.ts +2 -0
  278. package/interfaces/codegen/schema-maps/api_withdrawal_history_response.js +15 -0
  279. package/interfaces/codegen/schema-maps/api_withdrawal_request.d.ts +2 -0
  280. package/interfaces/codegen/schema-maps/api_withdrawal_request.js +21 -0
  281. package/interfaces/codegen/schema-maps/approximate_lp_point.d.ts +2 -0
  282. package/interfaces/codegen/schema-maps/approximate_lp_point.js +16 -0
  283. package/interfaces/codegen/schema-maps/approximate_lp_snapshot.d.ts +2 -0
  284. package/interfaces/codegen/schema-maps/approximate_lp_snapshot.js +24 -0
  285. package/interfaces/codegen/schema-maps/asset_exposure_summary.d.ts +2 -0
  286. package/interfaces/codegen/schema-maps/asset_exposure_summary.js +14 -0
  287. package/interfaces/codegen/schema-maps/asset_margin_tier_response.d.ts +2 -0
  288. package/interfaces/codegen/schema-maps/asset_margin_tier_response.js +15 -0
  289. package/interfaces/codegen/schema-maps/asset_max_qty.d.ts +2 -0
  290. package/interfaces/codegen/schema-maps/asset_max_qty.js +16 -0
  291. package/interfaces/codegen/schema-maps/cancel_status_feed.d.ts +2 -0
  292. package/interfaces/codegen/schema-maps/cancel_status_feed.js +22 -0
  293. package/interfaces/codegen/schema-maps/candlestick.d.ts +2 -0
  294. package/interfaces/codegen/schema-maps/candlestick.js +30 -0
  295. package/interfaces/codegen/schema-maps/claim_ecosystem_badge_response.d.ts +2 -0
  296. package/interfaces/codegen/schema-maps/claim_ecosystem_badge_response.js +13 -0
  297. package/interfaces/codegen/schema-maps/client_order_i_ds_by_group.d.ts +2 -0
  298. package/interfaces/codegen/schema-maps/client_order_i_ds_by_group.js +16 -0
  299. package/interfaces/codegen/schema-maps/deposit.d.ts +2 -0
  300. package/interfaces/codegen/schema-maps/deposit.js +18 -0
  301. package/interfaces/codegen/schema-maps/deposit_history.d.ts +2 -0
  302. package/interfaces/codegen/schema-maps/deposit_history.js +26 -0
  303. package/interfaces/codegen/schema-maps/ecosystem_leaderboard_user.d.ts +2 -0
  304. package/interfaces/codegen/schema-maps/ecosystem_leaderboard_user.js +18 -0
  305. package/interfaces/codegen/schema-maps/ecosystem_metric.d.ts +2 -0
  306. package/interfaces/codegen/schema-maps/ecosystem_metric.js +20 -0
  307. package/interfaces/codegen/schema-maps/ecosystem_point.d.ts +2 -0
  308. package/interfaces/codegen/schema-maps/ecosystem_point.js +42 -0
  309. package/interfaces/codegen/schema-maps/empty_request.d.ts +2 -0
  310. package/interfaces/codegen/schema-maps/empty_request.js +8 -0
  311. package/interfaces/codegen/schema-maps/epoch.d.ts +2 -0
  312. package/interfaces/codegen/schema-maps/epoch.js +16 -0
  313. package/interfaces/codegen/schema-maps/epoch_badge.d.ts +2 -0
  314. package/interfaces/codegen/schema-maps/epoch_badge.js +32 -0
  315. package/interfaces/codegen/schema-maps/epoch_badge_point_distribution.d.ts +2 -0
  316. package/interfaces/codegen/schema-maps/epoch_badge_point_distribution.js +28 -0
  317. package/interfaces/codegen/schema-maps/error.d.ts +2 -0
  318. package/interfaces/codegen/schema-maps/error.js +14 -0
  319. package/interfaces/codegen/schema-maps/flat_private_trade.d.ts +2 -0
  320. package/interfaces/codegen/schema-maps/flat_private_trade.js +54 -0
  321. package/interfaces/codegen/schema-maps/flat_public_trade.d.ts +2 -0
  322. package/interfaces/codegen/schema-maps/flat_public_trade.js +36 -0
  323. package/interfaces/codegen/schema-maps/flat_referral.d.ts +2 -0
  324. package/interfaces/codegen/schema-maps/flat_referral.js +32 -0
  325. package/interfaces/codegen/schema-maps/funding_account_summary.d.ts +2 -0
  326. package/interfaces/codegen/schema-maps/funding_account_summary.js +17 -0
  327. package/interfaces/codegen/schema-maps/funding_rate.d.ts +2 -0
  328. package/interfaces/codegen/schema-maps/funding_rate.js +20 -0
  329. package/interfaces/codegen/schema-maps/get_claimable_ecosystem_badge_response.d.ts +2 -0
  330. package/interfaces/codegen/schema-maps/get_claimable_ecosystem_badge_response.js +17 -0
  331. package/interfaces/codegen/schema-maps/index.d.ts +249 -0
  332. package/interfaces/codegen/schema-maps/index.js +265 -0
  333. package/interfaces/codegen/schema-maps/initial_leverage_result.d.ts +2 -0
  334. package/interfaces/codegen/schema-maps/initial_leverage_result.js +18 -0
  335. package/interfaces/codegen/schema-maps/instrument.d.ts +2 -0
  336. package/interfaces/codegen/schema-maps/instrument.js +42 -0
  337. package/interfaces/codegen/schema-maps/jsonrpc_request.d.ts +2 -0
  338. package/interfaces/codegen/schema-maps/jsonrpc_request.js +18 -0
  339. package/interfaces/codegen/schema-maps/jsonrpc_response.d.ts +2 -0
  340. package/interfaces/codegen/schema-maps/jsonrpc_response.js +21 -0
  341. package/interfaces/codegen/schema-maps/lp_point.d.ts +2 -0
  342. package/interfaces/codegen/schema-maps/lp_point.js +16 -0
  343. package/interfaces/codegen/schema-maps/lp_snapshot.d.ts +2 -0
  344. package/interfaces/codegen/schema-maps/lp_snapshot.js +26 -0
  345. package/interfaces/codegen/schema-maps/main_acc_id_request.d.ts +2 -0
  346. package/interfaces/codegen/schema-maps/main_acc_id_request.js +12 -0
  347. package/interfaces/codegen/schema-maps/margin_tier_response.d.ts +2 -0
  348. package/interfaces/codegen/schema-maps/margin_tier_response.js +14 -0
  349. package/interfaces/codegen/schema-maps/mini_ticker.d.ts +2 -0
  350. package/interfaces/codegen/schema-maps/mini_ticker.js +32 -0
  351. package/interfaces/codegen/schema-maps/msg_funding_payment.d.ts +2 -0
  352. package/interfaces/codegen/schema-maps/msg_funding_payment.js +22 -0
  353. package/interfaces/codegen/schema-maps/order.d.ts +2 -0
  354. package/interfaces/codegen/schema-maps/order.js +36 -0
  355. package/interfaces/codegen/schema-maps/order_leg.d.ts +2 -0
  356. package/interfaces/codegen/schema-maps/order_leg.js +18 -0
  357. package/interfaces/codegen/schema-maps/order_metadata.d.ts +2 -0
  358. package/interfaces/codegen/schema-maps/order_metadata.js +19 -0
  359. package/interfaces/codegen/schema-maps/order_state.d.ts +2 -0
  360. package/interfaces/codegen/schema-maps/order_state.js +22 -0
  361. package/interfaces/codegen/schema-maps/order_state_feed.d.ts +2 -0
  362. package/interfaces/codegen/schema-maps/order_state_feed.js +17 -0
  363. package/interfaces/codegen/schema-maps/orderbook_level.d.ts +2 -0
  364. package/interfaces/codegen/schema-maps/orderbook_level.js +16 -0
  365. package/interfaces/codegen/schema-maps/position_summary.d.ts +2 -0
  366. package/interfaces/codegen/schema-maps/position_summary.js +28 -0
  367. package/interfaces/codegen/schema-maps/pre_order_check_result.d.ts +2 -0
  368. package/interfaces/codegen/schema-maps/pre_order_check_result.js +21 -0
  369. package/interfaces/codegen/schema-maps/query_account_summary_request.d.ts +2 -0
  370. package/interfaces/codegen/schema-maps/query_account_summary_request.js +16 -0
  371. package/interfaces/codegen/schema-maps/query_epoch_badge_point_distribution_request.d.ts +2 -0
  372. package/interfaces/codegen/schema-maps/query_epoch_badge_point_distribution_request.js +14 -0
  373. package/interfaces/codegen/schema-maps/query_epoch_badge_point_distribution_response.d.ts +2 -0
  374. package/interfaces/codegen/schema-maps/query_epoch_badge_point_distribution_response.js +13 -0
  375. package/interfaces/codegen/schema-maps/query_epoch_badge_request.d.ts +2 -0
  376. package/interfaces/codegen/schema-maps/query_epoch_badge_request.js +20 -0
  377. package/interfaces/codegen/schema-maps/query_epoch_badge_response.d.ts +2 -0
  378. package/interfaces/codegen/schema-maps/query_epoch_badge_response.js +15 -0
  379. package/interfaces/codegen/schema-maps/query_find_epoch_request.d.ts +2 -0
  380. package/interfaces/codegen/schema-maps/query_find_epoch_request.js +14 -0
  381. package/interfaces/codegen/schema-maps/query_find_epoch_response.d.ts +2 -0
  382. package/interfaces/codegen/schema-maps/query_find_epoch_response.js +13 -0
  383. package/interfaces/codegen/schema-maps/query_get_latest_lp_snapshot_response.d.ts +2 -0
  384. package/interfaces/codegen/schema-maps/query_get_latest_lp_snapshot_response.js +13 -0
  385. package/interfaces/codegen/schema-maps/query_get_list_epoch_request.d.ts +2 -0
  386. package/interfaces/codegen/schema-maps/query_get_list_epoch_request.js +12 -0
  387. package/interfaces/codegen/schema-maps/query_get_list_epoch_response.d.ts +2 -0
  388. package/interfaces/codegen/schema-maps/query_get_list_epoch_response.js +13 -0
  389. package/interfaces/codegen/schema-maps/query_trading_performance_trend_request.d.ts +2 -0
  390. package/interfaces/codegen/schema-maps/query_trading_performance_trend_request.js +14 -0
  391. package/interfaces/codegen/schema-maps/query_trading_performance_trend_response.d.ts +2 -0
  392. package/interfaces/codegen/schema-maps/query_trading_performance_trend_response.js +15 -0
  393. package/interfaces/codegen/schema-maps/reward_epoch_info.d.ts +2 -0
  394. package/interfaces/codegen/schema-maps/reward_epoch_info.js +18 -0
  395. package/interfaces/codegen/schema-maps/session_information.d.ts +2 -0
  396. package/interfaces/codegen/schema-maps/session_information.js +20 -0
  397. package/interfaces/codegen/schema-maps/signature.d.ts +2 -0
  398. package/interfaces/codegen/schema-maps/signature.js +22 -0
  399. package/interfaces/codegen/schema-maps/snap_account_summary.d.ts +2 -0
  400. package/interfaces/codegen/schema-maps/snap_account_summary.js +14 -0
  401. package/interfaces/codegen/schema-maps/snap_funding_account_summary.d.ts +2 -0
  402. package/interfaces/codegen/schema-maps/snap_funding_account_summary.js +21 -0
  403. package/interfaces/codegen/schema-maps/snap_orderbook_levels.d.ts +2 -0
  404. package/interfaces/codegen/schema-maps/snap_orderbook_levels.js +19 -0
  405. package/interfaces/codegen/schema-maps/snap_sub_account.d.ts +2 -0
  406. package/interfaces/codegen/schema-maps/snap_sub_account.js +36 -0
  407. package/interfaces/codegen/schema-maps/snap_sub_account_summary.d.ts +2 -0
  408. package/interfaces/codegen/schema-maps/snap_sub_account_summary.js +23 -0
  409. package/interfaces/codegen/schema-maps/snap_ticker.d.ts +2 -0
  410. package/interfaces/codegen/schema-maps/snap_ticker.js +58 -0
  411. package/interfaces/codegen/schema-maps/stream_reference.d.ts +2 -0
  412. package/interfaces/codegen/schema-maps/stream_reference.js +14 -0
  413. package/interfaces/codegen/schema-maps/sub_account_trade_aggregation.d.ts +2 -0
  414. package/interfaces/codegen/schema-maps/sub_account_trade_aggregation.js +24 -0
  415. package/interfaces/codegen/schema-maps/timed_asset_exposure_summary.d.ts +2 -0
  416. package/interfaces/codegen/schema-maps/timed_asset_exposure_summary.js +15 -0
  417. package/interfaces/codegen/schema-maps/tpsl_order_metadata.d.ts +2 -0
  418. package/interfaces/codegen/schema-maps/tpsl_order_metadata.js +14 -0
  419. package/interfaces/codegen/schema-maps/trader_leaderboard_user.d.ts +2 -0
  420. package/interfaces/codegen/schema-maps/trader_leaderboard_user.js +18 -0
  421. package/interfaces/codegen/schema-maps/trader_metric.d.ts +2 -0
  422. package/interfaces/codegen/schema-maps/trader_metric.js +14 -0
  423. package/interfaces/codegen/schema-maps/trading_performance_point.d.ts +2 -0
  424. package/interfaces/codegen/schema-maps/trading_performance_point.js +16 -0
  425. package/interfaces/codegen/schema-maps/transfer_history.d.ts +2 -0
  426. package/interfaces/codegen/schema-maps/transfer_history.js +33 -0
  427. package/interfaces/codegen/schema-maps/trigger_order_metadata.d.ts +2 -0
  428. package/interfaces/codegen/schema-maps/trigger_order_metadata.js +15 -0
  429. package/interfaces/codegen/schema-maps/types.d.ts +7 -0
  430. package/interfaces/codegen/schema-maps/types.js +2 -0
  431. package/interfaces/codegen/schema-maps/user_category_affinity_score.d.ts +2 -0
  432. package/interfaces/codegen/schema-maps/user_category_affinity_score.js +16 -0
  433. package/interfaces/codegen/schema-maps/user_tracking_event.d.ts +2 -0
  434. package/interfaces/codegen/schema-maps/user_tracking_event.js +42 -0
  435. package/interfaces/codegen/schema-maps/user_vault_category_event_pay_load.d.ts +2 -0
  436. package/interfaces/codegen/schema-maps/user_vault_category_event_pay_load.js +18 -0
  437. package/interfaces/codegen/schema-maps/vault_params.d.ts +2 -0
  438. package/interfaces/codegen/schema-maps/vault_params.js +28 -0
  439. package/interfaces/codegen/schema-maps/withdrawal.d.ts +2 -0
  440. package/interfaces/codegen/schema-maps/withdrawal.js +21 -0
  441. package/interfaces/codegen/schema-maps/withdrawal_history.d.ts +2 -0
  442. package/interfaces/codegen/schema-maps/withdrawal_history.js +25 -0
  443. package/interfaces/codegen/schema-maps/ws_cancel_feed_data_v_1.d.ts +2 -0
  444. package/interfaces/codegen/schema-maps/ws_cancel_feed_data_v_1.js +21 -0
  445. package/interfaces/codegen/schema-maps/ws_cancel_feed_selector_v_1.d.ts +2 -0
  446. package/interfaces/codegen/schema-maps/ws_cancel_feed_selector_v_1.js +12 -0
  447. package/interfaces/codegen/schema-maps/ws_candlestick_feed_data_v_1.d.ts +2 -0
  448. package/interfaces/codegen/schema-maps/ws_candlestick_feed_data_v_1.js +21 -0
  449. package/interfaces/codegen/schema-maps/ws_candlestick_feed_selector_v_1.d.ts +2 -0
  450. package/interfaces/codegen/schema-maps/ws_candlestick_feed_selector_v_1.js +16 -0
  451. package/interfaces/codegen/schema-maps/ws_deposit_feed_data_v_1.d.ts +2 -0
  452. package/interfaces/codegen/schema-maps/ws_deposit_feed_data_v_1.js +21 -0
  453. package/interfaces/codegen/schema-maps/ws_deposit_feed_selector_v_1.d.ts +2 -0
  454. package/interfaces/codegen/schema-maps/ws_deposit_feed_selector_v_1.js +12 -0
  455. package/interfaces/codegen/schema-maps/ws_fill_feed_data_v_1.d.ts +2 -0
  456. package/interfaces/codegen/schema-maps/ws_fill_feed_data_v_1.js +21 -0
  457. package/interfaces/codegen/schema-maps/ws_fill_feed_selector_v_1.d.ts +2 -0
  458. package/interfaces/codegen/schema-maps/ws_fill_feed_selector_v_1.js +14 -0
  459. package/interfaces/codegen/schema-maps/ws_list_streams_params.d.ts +2 -0
  460. package/interfaces/codegen/schema-maps/ws_list_streams_params.js +8 -0
  461. package/interfaces/codegen/schema-maps/ws_list_streams_result.d.ts +2 -0
  462. package/interfaces/codegen/schema-maps/ws_list_streams_result.js +13 -0
  463. package/interfaces/codegen/schema-maps/ws_mini_ticker_feed_data_v_1.d.ts +2 -0
  464. package/interfaces/codegen/schema-maps/ws_mini_ticker_feed_data_v_1.js +21 -0
  465. package/interfaces/codegen/schema-maps/ws_mini_ticker_feed_selector_v_1.d.ts +2 -0
  466. package/interfaces/codegen/schema-maps/ws_mini_ticker_feed_selector_v_1.js +14 -0
  467. package/interfaces/codegen/schema-maps/ws_order_feed_data_v_1.d.ts +2 -0
  468. package/interfaces/codegen/schema-maps/ws_order_feed_data_v_1.js +21 -0
  469. package/interfaces/codegen/schema-maps/ws_order_feed_selector_v_1.d.ts +2 -0
  470. package/interfaces/codegen/schema-maps/ws_order_feed_selector_v_1.js +14 -0
  471. package/interfaces/codegen/schema-maps/ws_order_group_feed_data_v_1.d.ts +2 -0
  472. package/interfaces/codegen/schema-maps/ws_order_group_feed_data_v_1.js +21 -0
  473. package/interfaces/codegen/schema-maps/ws_order_group_feed_selector_v_1.d.ts +2 -0
  474. package/interfaces/codegen/schema-maps/ws_order_group_feed_selector_v_1.js +12 -0
  475. package/interfaces/codegen/schema-maps/ws_order_state_feed_data_v_1.d.ts +2 -0
  476. package/interfaces/codegen/schema-maps/ws_order_state_feed_data_v_1.js +21 -0
  477. package/interfaces/codegen/schema-maps/ws_order_state_feed_selector_v_1.d.ts +2 -0
  478. package/interfaces/codegen/schema-maps/ws_order_state_feed_selector_v_1.js +14 -0
  479. package/interfaces/codegen/schema-maps/ws_orderbook_levels_feed_data_v_1.d.ts +2 -0
  480. package/interfaces/codegen/schema-maps/ws_orderbook_levels_feed_data_v_1.js +21 -0
  481. package/interfaces/codegen/schema-maps/ws_orderbook_levels_feed_selector_v_1.d.ts +2 -0
  482. package/interfaces/codegen/schema-maps/ws_orderbook_levels_feed_selector_v_1.js +16 -0
  483. package/interfaces/codegen/schema-maps/ws_positions_feed_data_v_1.d.ts +2 -0
  484. package/interfaces/codegen/schema-maps/ws_positions_feed_data_v_1.js +21 -0
  485. package/interfaces/codegen/schema-maps/ws_positions_feed_selector_v_1.d.ts +2 -0
  486. package/interfaces/codegen/schema-maps/ws_positions_feed_selector_v_1.js +14 -0
  487. package/interfaces/codegen/schema-maps/ws_subscribe_params.d.ts +2 -0
  488. package/interfaces/codegen/schema-maps/ws_subscribe_params.js +16 -0
  489. package/interfaces/codegen/schema-maps/ws_subscribe_request_v_1_legacy.d.ts +2 -0
  490. package/interfaces/codegen/schema-maps/ws_subscribe_request_v_1_legacy.js +20 -0
  491. package/interfaces/codegen/schema-maps/ws_subscribe_response_v_1_legacy.d.ts +2 -0
  492. package/interfaces/codegen/schema-maps/ws_subscribe_response_v_1_legacy.js +24 -0
  493. package/interfaces/codegen/schema-maps/ws_subscribe_result.d.ts +2 -0
  494. package/interfaces/codegen/schema-maps/ws_subscribe_result.js +22 -0
  495. package/interfaces/codegen/schema-maps/ws_ticker_feed_data_v_1.d.ts +2 -0
  496. package/interfaces/codegen/schema-maps/ws_ticker_feed_data_v_1.js +21 -0
  497. package/interfaces/codegen/schema-maps/ws_ticker_feed_selector_v_1.d.ts +2 -0
  498. package/interfaces/codegen/schema-maps/ws_ticker_feed_selector_v_1.js +14 -0
  499. package/interfaces/codegen/schema-maps/ws_trade_feed_data_v_1.d.ts +2 -0
  500. package/interfaces/codegen/schema-maps/ws_trade_feed_data_v_1.js +21 -0
  501. package/interfaces/codegen/schema-maps/ws_trade_feed_selector_v_1.d.ts +2 -0
  502. package/interfaces/codegen/schema-maps/ws_trade_feed_selector_v_1.js +14 -0
  503. package/interfaces/codegen/schema-maps/ws_transfer_feed_data_v_1.d.ts +2 -0
  504. package/interfaces/codegen/schema-maps/ws_transfer_feed_data_v_1.js +21 -0
  505. package/interfaces/codegen/schema-maps/ws_transfer_feed_selector_v_1.d.ts +2 -0
  506. package/interfaces/codegen/schema-maps/ws_transfer_feed_selector_v_1.js +14 -0
  507. package/interfaces/codegen/schema-maps/ws_unsubscribe_all_params.d.ts +2 -0
  508. package/interfaces/codegen/schema-maps/ws_unsubscribe_all_params.js +8 -0
  509. package/interfaces/codegen/schema-maps/ws_unsubscribe_all_result.d.ts +2 -0
  510. package/interfaces/codegen/schema-maps/ws_unsubscribe_all_result.js +13 -0
  511. package/interfaces/codegen/schema-maps/ws_unsubscribe_params.d.ts +2 -0
  512. package/interfaces/codegen/schema-maps/ws_unsubscribe_params.js +16 -0
  513. package/interfaces/codegen/schema-maps/ws_unsubscribe_result.d.ts +2 -0
  514. package/interfaces/codegen/schema-maps/ws_unsubscribe_result.js +14 -0
  515. package/interfaces/codegen/schema-maps/ws_withdrawal_feed_data_v_1.d.ts +2 -0
  516. package/interfaces/codegen/schema-maps/ws_withdrawal_feed_data_v_1.js +21 -0
  517. package/interfaces/codegen/schema-maps/ws_withdrawal_feed_selector_v_1.d.ts +2 -0
  518. package/interfaces/codegen/schema-maps/ws_withdrawal_feed_selector_v_1.js +12 -0
  519. package/interfaces/config.interface.d.ts +7 -0
  520. package/interfaces/config.interface.js +13 -0
  521. package/interfaces/index.d.ts +2 -0
  522. package/interfaces/index.js +18 -0
  523. package/package.json +50 -0
  524. package/services/index.d.ts +1 -0
  525. package/services/index.js +17 -0
  526. package/services/restful.service.d.ts +1 -0
  527. package/services/restful.service.js +22 -0
  528. package/utils/index.d.ts +15 -0
  529. package/utils/index.js +87 -0
  530. package/utils/json.utils.d.ts +3 -0
  531. package/utils/json.utils.js +17 -0
  532. package/utils/string.utils.d.ts +7 -0
  533. package/utils/string.utils.js +23 -0
  534. package/ws/index.d.ts +2 -0
  535. package/ws/index.js +18 -0
  536. package/ws/interfaces.d.ts +119 -0
  537. package/ws/interfaces.js +22 -0
  538. package/ws/ws.d.ts +61 -0
  539. package/ws/ws.js +714 -0
package/LICENSE ADDED
File without changes
package/MDG/index.d.ts ADDED
@@ -0,0 +1,53 @@
1
+ import { type AxiosRequestConfig } from 'axios';
2
+ import { type IApiCandlestickRequest, type IApiCandlestickResponse, type IApiFundingRateRequest, type IApiFundingRateResponse, type IApiGetAllInstrumentsRequest, type IApiGetAllInstrumentsResponse, type IApiGetFilteredInstrumentsRequest, type IApiGetFilteredInstrumentsResponse, type IApiGetInstrumentRequest, type IApiGetInstrumentResponse, type IApiMiniTickerRequest, type IApiMiniTickerResponse, type IApiOrderbookLevelsRequest, type IApiOrderbookLevelsResponse, type IApiSettlementPriceRequest, type IApiSettlementPriceResponse, type IApiTickerRequest, type IApiTickerResponse, type IApiTradeHistoryRequest, type IApiTradeHistoryResponse, type IApiTradeRequest, type IApiTradeResponse, type IConfig } from '../interfaces';
3
+ export declare class MDG {
4
+ private readonly _axios;
5
+ private readonly _fullUrl;
6
+ private readonly _liteUrl;
7
+ constructor(config: IConfig);
8
+ get axios(): import("axios").AxiosInstance;
9
+ /**
10
+ * @see https://api-docs.grvt.io/market_data_api/#get-instrument
11
+ */
12
+ instrument(payload: IApiGetInstrumentRequest, config?: AxiosRequestConfig): Promise<IApiGetInstrumentResponse>;
13
+ /**
14
+ * @see https://api-docs.grvt.io/market_data_api/#get-instruments
15
+ */
16
+ instruments(payload: IApiGetFilteredInstrumentsRequest, config?: AxiosRequestConfig): Promise<IApiGetFilteredInstrumentsResponse>;
17
+ /**
18
+ * @see https://api-docs.grvt.io/market_data_api/#get-all-instruments
19
+ */
20
+ allInstruments(payload: IApiGetAllInstrumentsRequest, config?: AxiosRequestConfig): Promise<IApiGetAllInstrumentsResponse>;
21
+ /**
22
+ * @see https://api-docs.grvt.io/market_data_api/#mini-ticker
23
+ */
24
+ miniTicker(payload: IApiMiniTickerRequest, config?: AxiosRequestConfig): Promise<IApiMiniTickerResponse>;
25
+ /**
26
+ * @see https://api-docs.grvt.io/market_data_api/#ticker
27
+ */
28
+ ticker(payload: IApiTickerRequest, config?: AxiosRequestConfig): Promise<IApiTickerResponse>;
29
+ /**
30
+ * @see https://api-docs.grvt.io/market_data_api/#orderbook
31
+ */
32
+ orderBook(payload: IApiOrderbookLevelsRequest, config?: AxiosRequestConfig): Promise<IApiOrderbookLevelsResponse>;
33
+ /**
34
+ * @see https://api-docs.grvt.io/market_data_api/#trade_1
35
+ */
36
+ trade(payload: IApiTradeRequest, config?: AxiosRequestConfig): Promise<IApiTradeResponse>;
37
+ /**
38
+ * @see https://api-docs.grvt.io/market_data_api/#trade-history
39
+ */
40
+ tradesHistory(payload: IApiTradeHistoryRequest, config?: AxiosRequestConfig): Promise<IApiTradeHistoryResponse>;
41
+ /**
42
+ * @see https://api-docs.grvt.io/market_data_api/#settlement-price
43
+ */
44
+ settlement(payload: IApiSettlementPriceRequest, config?: AxiosRequestConfig): Promise<IApiSettlementPriceResponse>;
45
+ /**
46
+ * @see https://api-docs.grvt.io/market_data_api/#funding-rate
47
+ */
48
+ funding(payload: IApiFundingRateRequest, config?: AxiosRequestConfig): Promise<IApiFundingRateResponse>;
49
+ /**
50
+ * @see https://api-docs.grvt.io/market_data_api/#candlestick
51
+ */
52
+ candlestick(payload: IApiCandlestickRequest, config?: AxiosRequestConfig): Promise<IApiCandlestickResponse>;
53
+ }
package/MDG/index.js ADDED
@@ -0,0 +1,106 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MDG = void 0;
4
+ const interfaces_1 = require("../interfaces");
5
+ const services_1 = require("../services");
6
+ const utils_1 = require("../utils");
7
+ class MDG {
8
+ constructor(config) {
9
+ this._axios = (0, services_1.createAxiosInstance)();
10
+ const parseConfig = (0, interfaces_1.validConfig)(config);
11
+ this._fullUrl = `${parseConfig.host}/full/${parseConfig.version}`;
12
+ this._liteUrl = `${parseConfig.host}/lite/${parseConfig.version}`;
13
+ }
14
+ get axios() {
15
+ return this._axios;
16
+ }
17
+ /**
18
+ * @see https://api-docs.grvt.io/market_data_api/#get-instrument
19
+ */
20
+ instrument(payload, config) {
21
+ return this._axios.post(this._liteUrl + '/instrument', utils_1.Utils.schemaMap(payload, interfaces_1.API_GET_INSTRUMENT_REQUEST_MAP.FULL_TO_LITE, true), Object.assign(Object.assign({}, config), { withCredentials: false })).then((response) => {
22
+ return utils_1.Utils.schemaMap(response.data, interfaces_1.API_GET_INSTRUMENT_RESPONSE_MAP.LITE_TO_FULL);
23
+ }).catch(utils_1.Utils.coverApiError);
24
+ }
25
+ /**
26
+ * @see https://api-docs.grvt.io/market_data_api/#get-instruments
27
+ */
28
+ instruments(payload, config) {
29
+ return this._axios.post(this._liteUrl + '/instruments', utils_1.Utils.schemaMap(payload, interfaces_1.API_GET_FILTERED_INSTRUMENTS_REQUEST_MAP.FULL_TO_LITE, true), Object.assign(Object.assign({}, config), { withCredentials: false })).then((response) => {
30
+ return utils_1.Utils.schemaMap(response.data, interfaces_1.API_GET_FILTERED_INSTRUMENTS_RESPONSE_MAP.LITE_TO_FULL);
31
+ }).catch(utils_1.Utils.coverApiError);
32
+ }
33
+ /**
34
+ * @see https://api-docs.grvt.io/market_data_api/#get-all-instruments
35
+ */
36
+ allInstruments(payload, config) {
37
+ return this._axios.post(this._liteUrl + '/all_instruments', utils_1.Utils.schemaMap(payload, interfaces_1.API_GET_ALL_INSTRUMENTS_REQUEST_MAP.FULL_TO_LITE, true), Object.assign(Object.assign({}, config), { withCredentials: false })).then((response) => {
38
+ return utils_1.Utils.schemaMap(response.data, interfaces_1.API_GET_ALL_INSTRUMENTS_RESPONSE_MAP.LITE_TO_FULL);
39
+ }).catch(utils_1.Utils.coverApiError);
40
+ }
41
+ /**
42
+ * @see https://api-docs.grvt.io/market_data_api/#mini-ticker
43
+ */
44
+ miniTicker(payload, config) {
45
+ return this._axios.post(this._liteUrl + '/mini', utils_1.Utils.schemaMap(payload, interfaces_1.API_MINI_TICKER_REQUEST_MAP.FULL_TO_LITE, true), Object.assign(Object.assign({}, config), { withCredentials: false })).then((response) => {
46
+ return utils_1.Utils.schemaMap(response.data, interfaces_1.API_MINI_TICKER_RESPONSE_MAP.LITE_TO_FULL);
47
+ }).catch(utils_1.Utils.coverApiError);
48
+ }
49
+ /**
50
+ * @see https://api-docs.grvt.io/market_data_api/#ticker
51
+ */
52
+ ticker(payload, config) {
53
+ return this._axios.post(this._liteUrl + '/ticker', utils_1.Utils.schemaMap(payload, interfaces_1.API_TICKER_REQUEST_MAP.FULL_TO_LITE, true), Object.assign(Object.assign({}, config), { withCredentials: false })).then((response) => {
54
+ return utils_1.Utils.schemaMap(response.data, interfaces_1.API_TICKER_RESPONSE_MAP.LITE_TO_FULL);
55
+ }).catch(utils_1.Utils.coverApiError);
56
+ }
57
+ /**
58
+ * @see https://api-docs.grvt.io/market_data_api/#orderbook
59
+ */
60
+ orderBook(payload, config) {
61
+ return this._axios.post(this._liteUrl + '/book', utils_1.Utils.schemaMap(payload, interfaces_1.API_ORDERBOOK_LEVELS_REQUEST_MAP.FULL_TO_LITE, true), Object.assign(Object.assign({}, config), { withCredentials: false })).then((response) => {
62
+ return utils_1.Utils.schemaMap(response.data, interfaces_1.API_ORDERBOOK_LEVELS_RESPONSE_MAP.LITE_TO_FULL);
63
+ }).catch(utils_1.Utils.coverApiError);
64
+ }
65
+ /**
66
+ * @see https://api-docs.grvt.io/market_data_api/#trade_1
67
+ */
68
+ trade(payload, config) {
69
+ return this._axios.post(this._liteUrl + '/trade', utils_1.Utils.schemaMap(payload, interfaces_1.API_TRADE_REQUEST_MAP.FULL_TO_LITE, true), Object.assign(Object.assign({}, config), { withCredentials: false })).then((response) => {
70
+ return utils_1.Utils.schemaMap(response.data, interfaces_1.API_TRADE_RESPONSE_MAP.LITE_TO_FULL);
71
+ }).catch(utils_1.Utils.coverApiError);
72
+ }
73
+ /**
74
+ * @see https://api-docs.grvt.io/market_data_api/#trade-history
75
+ */
76
+ tradesHistory(payload, config) {
77
+ return this._axios.post(this._liteUrl + '/trade_history', utils_1.Utils.schemaMap(payload, interfaces_1.API_TRADE_HISTORY_REQUEST_MAP.FULL_TO_LITE, true), Object.assign(Object.assign({}, config), { withCredentials: false })).then((response) => {
78
+ return utils_1.Utils.schemaMap(response.data, interfaces_1.API_TRADE_HISTORY_RESPONSE_MAP.LITE_TO_FULL);
79
+ }).catch(utils_1.Utils.coverApiError);
80
+ }
81
+ /**
82
+ * @see https://api-docs.grvt.io/market_data_api/#settlement-price
83
+ */
84
+ settlement(payload, config) {
85
+ return this._axios.post(this._liteUrl + '/settlement', utils_1.Utils.schemaMap(payload, interfaces_1.API_SETTLEMENT_PRICE_REQUEST_MAP.FULL_TO_LITE, true), Object.assign(Object.assign({}, config), { withCredentials: false })).then((response) => {
86
+ return utils_1.Utils.schemaMap(response.data, interfaces_1.API_SETTLEMENT_PRICE_RESPONSE_MAP.LITE_TO_FULL);
87
+ }).catch(utils_1.Utils.coverApiError);
88
+ }
89
+ /**
90
+ * @see https://api-docs.grvt.io/market_data_api/#funding-rate
91
+ */
92
+ funding(payload, config) {
93
+ return this._axios.post(this._liteUrl + '/funding', utils_1.Utils.schemaMap(payload, interfaces_1.API_FUNDING_RATE_REQUEST_MAP.FULL_TO_LITE, true), Object.assign(Object.assign({}, config), { withCredentials: false })).then((response) => {
94
+ return utils_1.Utils.schemaMap(response.data, interfaces_1.API_FUNDING_RATE_RESPONSE_MAP.LITE_TO_FULL);
95
+ }).catch(utils_1.Utils.coverApiError);
96
+ }
97
+ /**
98
+ * @see https://api-docs.grvt.io/market_data_api/#candlestick
99
+ */
100
+ candlestick(payload, config) {
101
+ return this._axios.post(this._liteUrl + '/kline', utils_1.Utils.schemaMap(payload, interfaces_1.API_CANDLESTICK_REQUEST_MAP.FULL_TO_LITE, true), Object.assign(Object.assign({}, config), { withCredentials: false })).then((response) => {
102
+ return utils_1.Utils.schemaMap(response.data, interfaces_1.API_CANDLESTICK_RESPONSE_MAP.LITE_TO_FULL);
103
+ }).catch(utils_1.Utils.coverApiError);
104
+ }
105
+ }
106
+ exports.MDG = MDG;
package/README.md ADDED
@@ -0,0 +1,62 @@
1
+ # GRVT
2
+
3
+ Node.js & JavaScript client for GRVT REST APIs & WebSockets
4
+
5
+ ## Installing
6
+
7
+ Using npm:
8
+
9
+ ```bash
10
+ npm install @grvt/client
11
+ ```
12
+
13
+ Using yarn:
14
+
15
+ ```bash
16
+ yarn add @grvt/client
17
+ ```
18
+
19
+ Using pnpm:
20
+
21
+ ```bash
22
+ pnpm add @grvt/client
23
+ ```
24
+
25
+ Once the package is installed, you can import the library using `import` or `require` approach:
26
+
27
+ ```js
28
+ import GRVT from '@grvt/client'
29
+ ```
30
+
31
+ You can also use the default export, since the named export is just a re-export from the GRVT factory:
32
+
33
+ ```js
34
+ import GRVT from '@grvt/client'
35
+ console.log(
36
+ new GRVT.MDG({
37
+ host: 'https://market-data.dev.gravitymarkets.io',
38
+ version: 'v1'
39
+ })
40
+ )
41
+ ```
42
+
43
+ If you use `require` for importing:
44
+
45
+ ```js
46
+ const GRVT = require('@grvt/client')
47
+ console.log(
48
+ new GRVT.MDG({
49
+ host: 'https://market-data.dev.gravitymarkets.io',
50
+ version: 'v1'
51
+ })
52
+ )
53
+ ```
54
+
55
+ ## To use WebSocket (available only in browsers that support WebSocket)
56
+
57
+ [Browsers supported](https://caniuse.com/websockets)
58
+
59
+ ```js
60
+ import { EStreamEndpoints, WS } from '@grvt/client/ws'
61
+ console.log(new WS('wss://market-data.dev.gravitymarkets.io/ws'))
62
+ ```
package/TDG/index.d.ts ADDED
@@ -0,0 +1,118 @@
1
+ import { type AxiosRequestConfig } from 'axios';
2
+ import { type IApiAggregatedAccountSummaryResponse, type IApiCancelAllOrdersRequest, type IApiCancelAllOrdersResponse, type IApiCancelOrderRequest, type IApiCancelOrderResponse, type IApiCreateBulkOrdersRequest, type IApiCreateBulkOrdersResponse, type IApiCreateOrderRequest, type IApiCreateOrderResponse, type IApiDedustPositionRequest, type IApiDedustPositionResponse, type IApiDepositHistoryRequest, type IApiDepositHistoryResponse, type IApiFillHistoryRequest, type IApiFillHistoryResponse, type IApiFundingAccountSummaryResponse, type IApiFundingPaymentHistoryRequest, type IApiFundingPaymentHistoryResponse, type IApiGetAllInitialLeverageRequest, type IApiGetAllInitialLeverageResponse, type IApiGetMarginTiersResponse, type IApiGetOrderGroupRequest, type IApiGetOrderGroupResponse, type IApiGetOrderRequest, type IApiGetOrderResponse, type IApiOpenOrdersRequest, type IApiOpenOrdersResponse, type IApiOrderHistoryRequest, type IApiOrderHistoryResponse, type IApiPositionsRequest, type IApiPositionsResponse, type IApiPreDepositCheckRequest, type IApiPreDepositCheckResponse, type IApiPreOrderCheckRequest, type IApiPreOrderCheckResponse, type IApiQueryListFundingAccountSummaryRequest, type IApiQueryListFundingAccountSummaryResponse, type IApiQueryListSubAccountSummaryRequest, type IApiQueryListSubAccountSummaryResponse, type IApiQueryTradingPerformanceRequest, type IApiQueryTradingPerformanceResponse, type IApiQueryTradingPerformanceTrendRequest, type IApiQueryTradingPerformanceTrendResponse, type IApiSetInitialLeverageRequest, type IApiSetInitialLeverageResponse, type IApiSocializedLossStatusResponse, type IApiSubAccountHistoryRequest, type IApiSubAccountHistoryResponse, type IApiSubAccountSummaryRequest, type IApiSubAccountSummaryResponse, type IApiTimedAssetExposureRequest, type IApiTimedAssetExposureResponse, type IApiTransferHistoryRequest, type IApiTransferHistoryResponse, type IApiTransferRequest, type IApiWithdrawalHistoryRequest, type IApiWithdrawalHistoryResponse, type IApiWithdrawalRequest, type IConfig } from '../interfaces';
3
+ export declare class TDG {
4
+ private readonly _axios;
5
+ private readonly _fullUrl;
6
+ private readonly _liteUrl;
7
+ constructor(config: IConfig);
8
+ get axios(): import("axios").AxiosInstance;
9
+ /** ===== TRANSFER ===== */
10
+ /**
11
+ * @see https://api-docs.grvt.io/trading_api/#predepositcheck
12
+ */
13
+ preDepositCheck(payload: IApiPreDepositCheckRequest, config?: AxiosRequestConfig): Promise<IApiPreDepositCheckResponse>;
14
+ /**
15
+ * @see https://api-docs.grvt.io/trading_api/#deposit-history
16
+ */
17
+ depositHistory(payload: IApiDepositHistoryRequest, config?: AxiosRequestConfig): Promise<IApiDepositHistoryResponse>;
18
+ /**
19
+ * TODO: missing response interface
20
+ * @see https://api-docs.grvt.io/trading_api/#transfer
21
+ */
22
+ transfer(payload: IApiTransferRequest, config?: AxiosRequestConfig): Promise<{
23
+ acknowledgement: boolean;
24
+ }>;
25
+ /**
26
+ * @see https://api-docs.grvt.io/trading_api/#transfer-history
27
+ */
28
+ transferHistory(payload: IApiTransferHistoryRequest, config?: AxiosRequestConfig): Promise<IApiTransferHistoryResponse>;
29
+ /**
30
+ * TODO: missing response interface
31
+ * @see https://api-docs.grvt.io/trading_api/#withdrawal
32
+ */
33
+ withdrawal(payload: IApiWithdrawalRequest, config?: AxiosRequestConfig): Promise<{
34
+ acknowledgement: boolean;
35
+ }>;
36
+ socializedLossStatus(config?: AxiosRequestConfig): Promise<IApiSocializedLossStatusResponse>;
37
+ /**
38
+ * @see https://api-docs.grvt.io/trading_api/#withdrawal-history
39
+ */
40
+ withdrawalHistory(payload: IApiWithdrawalHistoryRequest, config?: AxiosRequestConfig): Promise<IApiWithdrawalHistoryResponse>;
41
+ /** ===== ACCOUNT ===== */
42
+ /**
43
+ * @see https://api-docs.grvt.io/trading_api/#positions
44
+ */
45
+ positions(payload: IApiPositionsRequest, config?: AxiosRequestConfig): Promise<IApiPositionsResponse>;
46
+ /**
47
+ * @see https://api-docs.grvt.io/trading_api/#sub-account-summary
48
+ */
49
+ subAccountSummary(payload: IApiSubAccountSummaryRequest, config?: AxiosRequestConfig): Promise<IApiSubAccountSummaryResponse>;
50
+ subAccountSummaryHistory(payload: IApiQueryListSubAccountSummaryRequest, config?: AxiosRequestConfig): Promise<IApiQueryListSubAccountSummaryResponse>;
51
+ /**
52
+ * @see https://api-docs.grvt.io/trading_api/#sub-account-history
53
+ */
54
+ subAccountHistory(payload: IApiSubAccountHistoryRequest, config?: AxiosRequestConfig): Promise<IApiSubAccountHistoryResponse>;
55
+ /**
56
+ * @see https://api-docs.grvt.io/market_data_api/#trade-history
57
+ */
58
+ fillHistory(payload: IApiFillHistoryRequest, config?: AxiosRequestConfig): Promise<IApiFillHistoryResponse>;
59
+ /** ===== ORDER ===== */
60
+ /**
61
+ * @see https://api-docs.grvt.io/trading_api/#create-order
62
+ */
63
+ createOrder(payload: IApiCreateOrderRequest, config?: AxiosRequestConfig): Promise<IApiCreateOrderResponse>;
64
+ createBulkOrders(payload: IApiCreateBulkOrdersRequest, config?: AxiosRequestConfig): Promise<IApiCreateBulkOrdersResponse>;
65
+ preOrderCheck(payload: IApiPreOrderCheckRequest, config?: AxiosRequestConfig): Promise<IApiPreOrderCheckResponse>;
66
+ dedustPosition(payload: IApiDedustPositionRequest, config?: AxiosRequestConfig): Promise<IApiDedustPositionResponse>;
67
+ /**
68
+ * @see https://api-docs.grvt.io/trading_api/#cancel-order
69
+ */
70
+ cancelOrder(payload: IApiCancelOrderRequest, config?: AxiosRequestConfig): Promise<IApiCancelOrderResponse>;
71
+ /**
72
+ * @see https://api-docs.grvt.io/trading_api/#cancel-all-orders
73
+ */
74
+ cancelAllOrders(payload: IApiCancelAllOrdersRequest, config?: AxiosRequestConfig): Promise<IApiCancelAllOrdersResponse>;
75
+ /**
76
+ * TODO: missing interfaces
77
+ * @see https://api-docs.grvt.io/trading_api/#cancel-all-session-orders
78
+ */
79
+ cancelAllSessionOrders(): void;
80
+ /**
81
+ * @see https://api-docs.grvt.io/trading_api/#get-order
82
+ */
83
+ order(payload: IApiGetOrderRequest, config?: AxiosRequestConfig): Promise<IApiGetOrderResponse>;
84
+ /**
85
+ * @see https://api-docs.grvt.io/trading_api/#open-orders
86
+ */
87
+ openOrders(payload: IApiOpenOrdersRequest, config?: AxiosRequestConfig): Promise<IApiOpenOrdersResponse>;
88
+ orderGroup(payload: IApiGetOrderGroupRequest, config?: AxiosRequestConfig): Promise<IApiGetOrderGroupResponse>;
89
+ /**
90
+ * @see https://api-docs.grvt.io/trading_api/#order-history
91
+ */
92
+ orderHistory(payload: IApiOrderHistoryRequest, config?: AxiosRequestConfig): Promise<IApiOrderHistoryResponse>;
93
+ /**
94
+ * @see https://api-docs.grvt.io/trading_api/#get-all-initial-leverage
95
+ */
96
+ getAllInitialLeverage(payload: IApiGetAllInitialLeverageRequest, config?: AxiosRequestConfig): Promise<IApiGetAllInitialLeverageResponse>;
97
+ /**
98
+ * @see https://api-docs.grvt.io/trading_api/#set-initial-leverage
99
+ */
100
+ setInitialLeverage(payload: IApiSetInitialLeverageRequest, config?: AxiosRequestConfig): Promise<IApiSetInitialLeverageResponse>;
101
+ getMarginTiers(config?: AxiosRequestConfig): Promise<IApiGetMarginTiersResponse>;
102
+ /**
103
+ * @see https://api-docs.grvt.io/trading_api/#funding-payment-history
104
+ */
105
+ fundingPaymentHistory(payload: IApiFundingPaymentHistoryRequest, config?: AxiosRequestConfig): Promise<IApiFundingPaymentHistoryResponse>;
106
+ /**
107
+ * @see https://api-docs.grvt.io/trading_api/#funding-account-summary
108
+ */
109
+ fundingAccountSummary(config?: AxiosRequestConfig): Promise<IApiFundingAccountSummaryResponse>;
110
+ fundingAccountSummaryHistory(payload: IApiQueryListFundingAccountSummaryRequest, config?: AxiosRequestConfig): Promise<IApiQueryListFundingAccountSummaryResponse>;
111
+ /**
112
+ * @see https://api-docs.grvt.io/trading_api/#aggregated-account-summary
113
+ */
114
+ aggregatedAccountSummary(config?: AxiosRequestConfig): Promise<IApiAggregatedAccountSummaryResponse>;
115
+ tradingPerformance(payload: IApiQueryTradingPerformanceRequest, config?: AxiosRequestConfig): Promise<IApiQueryTradingPerformanceResponse>;
116
+ tradingPerformanceTrend(payload: IApiQueryTradingPerformanceTrendRequest, config?: AxiosRequestConfig): Promise<IApiQueryTradingPerformanceTrendResponse>;
117
+ assetExposure(payload: IApiTimedAssetExposureRequest, config?: AxiosRequestConfig): Promise<IApiTimedAssetExposureResponse>;
118
+ }
package/TDG/index.js ADDED
@@ -0,0 +1,253 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TDG = void 0;
4
+ const interfaces_1 = require("../interfaces");
5
+ const services_1 = require("../services");
6
+ const utils_1 = require("../utils");
7
+ class TDG {
8
+ constructor(config) {
9
+ this._axios = (0, services_1.createAxiosInstance)();
10
+ const parseConfig = (0, interfaces_1.validConfig)(config);
11
+ this._fullUrl = `${parseConfig.host}/full/${parseConfig.version}`;
12
+ this._liteUrl = `${parseConfig.host}/lite/${parseConfig.version}`;
13
+ }
14
+ get axios() {
15
+ return this._axios;
16
+ }
17
+ /** ===== TRANSFER ===== */
18
+ /**
19
+ * @see https://api-docs.grvt.io/trading_api/#predepositcheck
20
+ */
21
+ preDepositCheck(payload, config) {
22
+ return this._axios.post(this._liteUrl + '/pre_deposit_check', utils_1.Utils.schemaMap(payload, interfaces_1.API_PRE_DEPOSIT_CHECK_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
23
+ return utils_1.Utils.schemaMap(response.data, interfaces_1.API_PRE_DEPOSIT_CHECK_RESPONSE_MAP.LITE_TO_FULL);
24
+ }).catch(utils_1.Utils.coverApiError);
25
+ }
26
+ /**
27
+ * @see https://api-docs.grvt.io/trading_api/#deposit-history
28
+ */
29
+ depositHistory(payload, config) {
30
+ return this._axios.post(this._liteUrl + '/deposit_history', utils_1.Utils.schemaMap(payload, interfaces_1.API_DEPOSIT_HISTORY_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
31
+ return utils_1.Utils.schemaMap(response.data, interfaces_1.API_DEPOSIT_HISTORY_RESPONSE_MAP.LITE_TO_FULL);
32
+ }).catch(utils_1.Utils.coverApiError);
33
+ }
34
+ /**
35
+ * TODO: missing response interface
36
+ * @see https://api-docs.grvt.io/trading_api/#transfer
37
+ */
38
+ transfer(payload, config) {
39
+ return this._axios.post(this._liteUrl + '/transfer', utils_1.Utils.schemaMap(payload, interfaces_1.API_TRANSFER_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
40
+ return utils_1.Utils.schemaMap(response.data, interfaces_1.ACK_RESPONSE_MAP.LITE_TO_FULL);
41
+ }).catch(utils_1.Utils.coverApiError);
42
+ }
43
+ /**
44
+ * @see https://api-docs.grvt.io/trading_api/#transfer-history
45
+ */
46
+ transferHistory(payload, config) {
47
+ return this._axios.post(this._liteUrl + '/transfer_history', utils_1.Utils.schemaMap(payload, interfaces_1.API_TRANSFER_HISTORY_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
48
+ return utils_1.Utils.schemaMap(response.data, interfaces_1.API_TRANSFER_HISTORY_RESPONSE_MAP.LITE_TO_FULL);
49
+ }).catch(utils_1.Utils.coverApiError);
50
+ }
51
+ /**
52
+ * TODO: missing response interface
53
+ * @see https://api-docs.grvt.io/trading_api/#withdrawal
54
+ */
55
+ withdrawal(payload, config) {
56
+ return this._axios.post(this._liteUrl + '/withdrawal', utils_1.Utils.schemaMap(payload, interfaces_1.API_WITHDRAWAL_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
57
+ return utils_1.Utils.schemaMap(response.data, interfaces_1.ACK_RESPONSE_MAP.LITE_TO_FULL);
58
+ }).catch(utils_1.Utils.coverApiError);
59
+ }
60
+ socializedLossStatus(config) {
61
+ return this._axios.post(this._liteUrl + '/socialized_loss_status', {}, config).then((response) => {
62
+ return utils_1.Utils.schemaMap(response.data, interfaces_1.API_SOCIALIZED_LOSS_STATUS_RESPONSE_MAP.LITE_TO_FULL);
63
+ }).catch(utils_1.Utils.coverApiError);
64
+ }
65
+ /**
66
+ * @see https://api-docs.grvt.io/trading_api/#withdrawal-history
67
+ */
68
+ withdrawalHistory(payload, config) {
69
+ return this._axios.post(this._liteUrl + '/withdrawal_history', utils_1.Utils.schemaMap(payload, interfaces_1.API_WITHDRAWAL_HISTORY_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
70
+ return utils_1.Utils.schemaMap(response.data, interfaces_1.API_WITHDRAWAL_HISTORY_RESPONSE_MAP.LITE_TO_FULL);
71
+ }).catch(utils_1.Utils.coverApiError);
72
+ }
73
+ /** ===== ACCOUNT ===== */
74
+ /**
75
+ * @see https://api-docs.grvt.io/trading_api/#positions
76
+ */
77
+ positions(payload, config) {
78
+ return this._axios.post(this._liteUrl + '/positions', utils_1.Utils.schemaMap(payload, interfaces_1.API_POSITIONS_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
79
+ return utils_1.Utils.schemaMap(response.data, interfaces_1.API_POSITIONS_RESPONSE_MAP.LITE_TO_FULL);
80
+ }).catch(utils_1.Utils.coverApiError);
81
+ }
82
+ /**
83
+ * @see https://api-docs.grvt.io/trading_api/#sub-account-summary
84
+ */
85
+ subAccountSummary(payload, config) {
86
+ return this._axios.post(this._liteUrl + '/account_summary', utils_1.Utils.schemaMap(payload, interfaces_1.API_SUB_ACCOUNT_SUMMARY_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
87
+ return utils_1.Utils.schemaMap(response.data, interfaces_1.API_SUB_ACCOUNT_SUMMARY_RESPONSE_MAP.LITE_TO_FULL);
88
+ }).catch(utils_1.Utils.coverApiError);
89
+ }
90
+ subAccountSummaryHistory(payload, config) {
91
+ return this._axios.post(this._liteUrl + '/sub_account_summary_history', utils_1.Utils.schemaMap(payload, interfaces_1.API_QUERY_LIST_SUB_ACCOUNT_SUMMARY_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
92
+ return utils_1.Utils.schemaMap(response.data, interfaces_1.API_QUERY_LIST_SUB_ACCOUNT_SUMMARY_RESPONSE_MAP.LITE_TO_FULL);
93
+ }).catch(utils_1.Utils.coverApiError);
94
+ }
95
+ /**
96
+ * @see https://api-docs.grvt.io/trading_api/#sub-account-history
97
+ */
98
+ subAccountHistory(payload, config) {
99
+ return this._axios.post(this._liteUrl + '/account_history', utils_1.Utils.schemaMap(payload, interfaces_1.API_SUB_ACCOUNT_HISTORY_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
100
+ return utils_1.Utils.schemaMap(response.data, interfaces_1.API_SUB_ACCOUNT_HISTORY_RESPONSE_MAP.LITE_TO_FULL);
101
+ }).catch(utils_1.Utils.coverApiError);
102
+ }
103
+ /**
104
+ * @see https://api-docs.grvt.io/market_data_api/#trade-history
105
+ */
106
+ fillHistory(payload, config) {
107
+ return this._axios.post(this._liteUrl + '/fill_history', utils_1.Utils.schemaMap(payload, interfaces_1.API_FILL_HISTORY_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
108
+ return utils_1.Utils.schemaMap(response.data, interfaces_1.API_FILL_HISTORY_RESPONSE_MAP.LITE_TO_FULL);
109
+ }).catch(utils_1.Utils.coverApiError);
110
+ }
111
+ /** ===== ORDER ===== */
112
+ /**
113
+ * @see https://api-docs.grvt.io/trading_api/#create-order
114
+ */
115
+ createOrder(payload, config) {
116
+ return this._axios.post(this._liteUrl + '/create_order', utils_1.Utils.schemaMap(payload, interfaces_1.API_CREATE_ORDER_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
117
+ return utils_1.Utils.schemaMap(response.data, interfaces_1.API_CREATE_ORDER_RESPONSE_MAP.LITE_TO_FULL);
118
+ }).catch(utils_1.Utils.coverApiError);
119
+ }
120
+ createBulkOrders(payload, config) {
121
+ return this._axios.post(this._liteUrl + '/create_bulk_orders', utils_1.Utils.schemaMap(payload, interfaces_1.API_CREATE_BULK_ORDERS_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
122
+ return utils_1.Utils.schemaMap(response.data, interfaces_1.API_CREATE_BULK_ORDERS_RESPONSE_MAP.LITE_TO_FULL);
123
+ }).catch(utils_1.Utils.coverApiError);
124
+ }
125
+ preOrderCheck(payload, config) {
126
+ return this._axios.post(this._liteUrl + '/pre_order_check', utils_1.Utils.schemaMap(payload, interfaces_1.API_PRE_ORDER_CHECK_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
127
+ return utils_1.Utils.schemaMap(response.data, interfaces_1.API_PRE_ORDER_CHECK_RESPONSE_MAP.LITE_TO_FULL);
128
+ }).catch(utils_1.Utils.coverApiError);
129
+ }
130
+ dedustPosition(payload, config) {
131
+ return this._axios.post(this._liteUrl + '/dedust_position', utils_1.Utils.schemaMap(payload, interfaces_1.API_DEDUST_POSITION_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
132
+ return utils_1.Utils.schemaMap(response.data, interfaces_1.API_DEDUST_POSITION_RESPONSE_MAP.LITE_TO_FULL);
133
+ }).catch(utils_1.Utils.coverApiError);
134
+ }
135
+ /**
136
+ * @see https://api-docs.grvt.io/trading_api/#cancel-order
137
+ */
138
+ cancelOrder(payload, config) {
139
+ return this._axios.post(this._liteUrl + '/cancel_order', utils_1.Utils.schemaMap(payload, interfaces_1.API_CANCEL_ORDER_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
140
+ return utils_1.Utils.schemaMap(response.data, interfaces_1.API_CANCEL_ORDER_RESPONSE_MAP.LITE_TO_FULL);
141
+ }).catch(utils_1.Utils.coverApiError);
142
+ }
143
+ /**
144
+ * @see https://api-docs.grvt.io/trading_api/#cancel-all-orders
145
+ */
146
+ cancelAllOrders(payload, config) {
147
+ return this._axios.post(this._liteUrl + '/cancel_all_orders', utils_1.Utils.schemaMap(payload, interfaces_1.API_CANCEL_ALL_ORDERS_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
148
+ return utils_1.Utils.schemaMap(response.data, interfaces_1.API_CANCEL_ALL_ORDERS_RESPONSE_MAP.LITE_TO_FULL);
149
+ }).catch(utils_1.Utils.coverApiError);
150
+ }
151
+ /**
152
+ * TODO: missing interfaces
153
+ * @see https://api-docs.grvt.io/trading_api/#cancel-all-session-orders
154
+ */
155
+ cancelAllSessionOrders() {
156
+ throw new Error('This has been marked as a POST-LAUNCH feature, see https://api-docs.grvt.io/trading_api/#cancel-all-session-orders');
157
+ }
158
+ /**
159
+ * @see https://api-docs.grvt.io/trading_api/#get-order
160
+ */
161
+ order(payload, config) {
162
+ return this._axios.post(this._liteUrl + '/order', utils_1.Utils.schemaMap(payload, interfaces_1.API_GET_ORDER_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
163
+ return utils_1.Utils.schemaMap(response.data, interfaces_1.API_GET_ORDER_RESPONSE_MAP.LITE_TO_FULL);
164
+ }).catch(utils_1.Utils.coverApiError);
165
+ }
166
+ /**
167
+ * @see https://api-docs.grvt.io/trading_api/#open-orders
168
+ */
169
+ openOrders(payload, config) {
170
+ return this._axios.post(this._liteUrl + '/open_orders', utils_1.Utils.schemaMap(payload, interfaces_1.API_OPEN_ORDERS_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
171
+ return utils_1.Utils.schemaMap(response.data, interfaces_1.API_OPEN_ORDERS_RESPONSE_MAP.LITE_TO_FULL);
172
+ }).catch(utils_1.Utils.coverApiError);
173
+ }
174
+ orderGroup(payload, config) {
175
+ return this._axios.post(this._liteUrl + '/order_group', utils_1.Utils.schemaMap(payload, interfaces_1.API_GET_ORDER_GROUP_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
176
+ return utils_1.Utils.schemaMap(response.data, interfaces_1.API_GET_ORDER_GROUP_RESPONSE_MAP.LITE_TO_FULL);
177
+ }).catch(utils_1.Utils.coverApiError);
178
+ }
179
+ /**
180
+ * @see https://api-docs.grvt.io/trading_api/#order-history
181
+ */
182
+ orderHistory(payload, config) {
183
+ return this._axios.post(this._liteUrl + '/order_history', utils_1.Utils.schemaMap(payload, interfaces_1.API_ORDER_HISTORY_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
184
+ return utils_1.Utils.schemaMap(response.data, interfaces_1.API_ORDER_HISTORY_RESPONSE_MAP.LITE_TO_FULL);
185
+ }).catch(utils_1.Utils.coverApiError);
186
+ }
187
+ /**
188
+ * @see https://api-docs.grvt.io/trading_api/#get-all-initial-leverage
189
+ */
190
+ getAllInitialLeverage(payload, config) {
191
+ return this._axios.post(this._liteUrl + '/get_all_initial_leverage', utils_1.Utils.schemaMap(payload, interfaces_1.API_GET_ALL_INITIAL_LEVERAGE_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
192
+ return utils_1.Utils.schemaMap(response.data, interfaces_1.API_GET_ALL_INITIAL_LEVERAGE_RESPONSE_MAP.LITE_TO_FULL);
193
+ }).catch(utils_1.Utils.coverApiError);
194
+ }
195
+ /**
196
+ * @see https://api-docs.grvt.io/trading_api/#set-initial-leverage
197
+ */
198
+ setInitialLeverage(payload, config) {
199
+ return this._axios.post(this._liteUrl + '/set_initial_leverage', utils_1.Utils.schemaMap(payload, interfaces_1.API_SET_INITIAL_LEVERAGE_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
200
+ return utils_1.Utils.schemaMap(response.data, interfaces_1.API_SET_INITIAL_LEVERAGE_RESPONSE_MAP.LITE_TO_FULL);
201
+ }).catch(utils_1.Utils.coverApiError);
202
+ }
203
+ getMarginTiers(config) {
204
+ return this._axios.post(this._liteUrl + '/get_margin_tiers', null, config).then((response) => {
205
+ return utils_1.Utils.schemaMap(response.data, interfaces_1.API_GET_MARGIN_TIERS_RESPONSE_MAP.LITE_TO_FULL);
206
+ }).catch(utils_1.Utils.coverApiError);
207
+ }
208
+ /**
209
+ * @see https://api-docs.grvt.io/trading_api/#funding-payment-history
210
+ */
211
+ fundingPaymentHistory(payload, config) {
212
+ return this._axios.post(this._liteUrl + '/funding_payment_history', utils_1.Utils.schemaMap(payload, interfaces_1.API_FUNDING_PAYMENT_HISTORY_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
213
+ return utils_1.Utils.schemaMap(response.data, interfaces_1.API_FUNDING_PAYMENT_HISTORY_RESPONSE_MAP.LITE_TO_FULL);
214
+ }).catch(utils_1.Utils.coverApiError);
215
+ }
216
+ /**
217
+ * @see https://api-docs.grvt.io/trading_api/#funding-account-summary
218
+ */
219
+ fundingAccountSummary(config) {
220
+ return this._axios.post(this._liteUrl + '/funding_account_summary', null, config).then((response) => {
221
+ return utils_1.Utils.schemaMap(response.data, interfaces_1.API_FUNDING_ACCOUNT_SUMMARY_RESPONSE_MAP.LITE_TO_FULL);
222
+ }).catch(utils_1.Utils.coverApiError);
223
+ }
224
+ fundingAccountSummaryHistory(payload, config) {
225
+ return this._axios.post(this._liteUrl + '/funding_account_summary_history', utils_1.Utils.schemaMap(payload, interfaces_1.API_QUERY_LIST_FUNDING_ACCOUNT_SUMMARY_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
226
+ return utils_1.Utils.schemaMap(response.data, interfaces_1.API_QUERY_LIST_FUNDING_ACCOUNT_SUMMARY_RESPONSE_MAP.LITE_TO_FULL);
227
+ }).catch(utils_1.Utils.coverApiError);
228
+ }
229
+ /**
230
+ * @see https://api-docs.grvt.io/trading_api/#aggregated-account-summary
231
+ */
232
+ aggregatedAccountSummary(config) {
233
+ return this._axios.post(this._liteUrl + '/aggregated_account_summary', null, config).then((response) => {
234
+ return utils_1.Utils.schemaMap(response.data, interfaces_1.API_AGGREGATED_ACCOUNT_SUMMARY_RESPONSE_MAP.LITE_TO_FULL);
235
+ }).catch(utils_1.Utils.coverApiError);
236
+ }
237
+ tradingPerformance(payload, config) {
238
+ return this._axios.post(this._liteUrl + '/trading_performance', utils_1.Utils.schemaMap(payload, interfaces_1.API_QUERY_TRADING_PERFORMANCE_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
239
+ return utils_1.Utils.schemaMap(response.data, interfaces_1.API_QUERY_TRADING_PERFORMANCE_RESPONSE_MAP.LITE_TO_FULL);
240
+ }).catch(utils_1.Utils.coverApiError);
241
+ }
242
+ tradingPerformanceTrend(payload, config) {
243
+ return this._axios.post(this._liteUrl + '/trading_performance_trend', utils_1.Utils.schemaMap(payload, interfaces_1.API_QUERY_TRADING_PERFORMANCE_TREND_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
244
+ return utils_1.Utils.schemaMap(response.data, interfaces_1.API_QUERY_TRADING_PERFORMANCE_TREND_RESPONSE_MAP.LITE_TO_FULL);
245
+ }).catch(utils_1.Utils.coverApiError);
246
+ }
247
+ assetExposure(payload, config) {
248
+ return this._axios.post(this._liteUrl + '/asset_exposure', utils_1.Utils.schemaMap(payload, interfaces_1.API_TIMED_ASSET_EXPOSURE_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
249
+ return utils_1.Utils.schemaMap(response.data, interfaces_1.API_TIMED_ASSET_EXPOSURE_RESPONSE_MAP.LITE_TO_FULL);
250
+ }).catch(utils_1.Utils.coverApiError);
251
+ }
252
+ }
253
+ exports.TDG = TDG;
package/index.d.ts ADDED
@@ -0,0 +1,10 @@
1
+ import { MDG } from './MDG';
2
+ import { TDG } from './TDG';
3
+ export * from './MDG';
4
+ export * from './TDG';
5
+ export * from './interfaces';
6
+ declare const _default: {
7
+ MDG: typeof MDG;
8
+ TDG: typeof TDG;
9
+ };
10
+ export default _default;
package/index.js ADDED
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ const MDG_1 = require("./MDG");
18
+ const TDG_1 = require("./TDG");
19
+ __exportStar(require("./MDG"), exports);
20
+ __exportStar(require("./TDG"), exports);
21
+ __exportStar(require("./interfaces"), exports);
22
+ exports.default = {
23
+ MDG: MDG_1.MDG,
24
+ TDG: TDG_1.TDG
25
+ };