@0xmonaco/types 1.1.5 → 1.1.6
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.
- package/README.md +1 -3
- package/dist/analytics/builders.d.ts +135 -0
- package/dist/analytics/builders.js +11 -0
- package/dist/analytics/index.d.ts +153 -0
- package/dist/analytics/index.js +27 -0
- package/dist/analytics/wallets.d.ts +197 -0
- package/dist/analytics/wallets.js +16 -0
- package/dist/applications/requests.d.ts +5 -5
- package/dist/buildercodes/index.d.ts +13 -11
- package/dist/buildercodes/responses.d.ts +1 -0
- package/dist/buildercodes/responses.js +10 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/margin-accounts/index.d.ts +7 -2
- package/dist/market/index.d.ts +0 -20
- package/dist/profile/index.d.ts +10 -17
- package/dist/rfq/responses.d.ts +36 -0
- package/dist/rfq/responses.js +29 -0
- package/dist/sdk/index.d.ts +4 -1
- package/dist/trading/index.d.ts +7 -3
- package/dist/trading/orders.d.ts +11 -0
- package/dist/trading/responses.d.ts +9 -3
- package/dist/validation/margin-accounts.d.ts +2 -2
- package/dist/validation/margin-accounts.js +5 -5
- package/dist/validation/trading.d.ts +15 -0
- package/dist/validation/trading.js +34 -42
- package/dist/websocket/base.d.ts +40 -10
- package/dist/websocket/client.d.ts +32 -4
- package/dist/websocket/depth.d.ts +142 -0
- package/dist/websocket/depth.js +13 -0
- package/dist/websocket/events/orderbook-events.d.ts +41 -1
- package/dist/websocket/events/rfq-events.d.ts +30 -1
- package/dist/websocket/events/trade-events.d.ts +37 -0
- package/dist/websocket/index.d.ts +1 -0
- package/dist/websocket/index.js +1 -0
- package/dist/websocket/snapshots.d.ts +23 -1
- package/dist/wire/operations.d.ts +1 -1
- package/dist/wire/operations.js +16 -0
- package/dist/wire/schema.d.ts +2344 -276
- package/package.json +2 -2
package/dist/websocket/index.js
CHANGED
|
@@ -51,7 +51,29 @@ import type { OrderOrigin } from "./events/orders-events";
|
|
|
51
51
|
* already holds a second subscriber's callback waits for the next reconnect;
|
|
52
52
|
* see `MonacoWebSocket` for the full rule.
|
|
53
53
|
*/
|
|
54
|
-
export type SnapshotHandler<T> = (items: T[]) => void;
|
|
54
|
+
export type SnapshotHandler<T> = (items: T[], meta?: SnapshotMeta) => void;
|
|
55
|
+
/**
|
|
56
|
+
* The trade a `trades:<pair>` snapshot is current as of: trades at or below
|
|
57
|
+
* this key, compared as `(seq, matchIndex)`, are already reflected, and the
|
|
58
|
+
* next live trade links to it exactly.
|
|
59
|
+
*/
|
|
60
|
+
export interface TradeSnapshotCursor {
|
|
61
|
+
seq: number;
|
|
62
|
+
matchIndex: number;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* What a `Snapshot` frame carries beside its rows. Today only the
|
|
66
|
+
* `trades:<pair>` snapshot uses it, and only when the server sources trades
|
|
67
|
+
* from market-data.
|
|
68
|
+
*/
|
|
69
|
+
export interface SnapshotMeta {
|
|
70
|
+
/**
|
|
71
|
+
* `trades:<pair>` only: the trade the live frames continue from, or `null`
|
|
72
|
+
* when nothing was applied since the server seeded the pair (the first live
|
|
73
|
+
* trade is then the base). Absent under the default engine source.
|
|
74
|
+
*/
|
|
75
|
+
cursor?: TradeSnapshotCursor | null;
|
|
76
|
+
}
|
|
55
77
|
/**
|
|
56
78
|
* One candle in an `ohlcv` channel snapshot: the live frame's candlestick
|
|
57
79
|
* without `s`.
|
|
@@ -10,6 +10,6 @@
|
|
|
10
10
|
* hand-written SDK surface. CI regenerates it and fails on a diff, identical to
|
|
11
11
|
* the `schema.ts` wire-types tripwire (MON-1476), so it can never go stale.
|
|
12
12
|
*/
|
|
13
|
-
export declare const OPERATION_IDS: readonly ["accept_rfq", "add_follow_position_margin", "attach_position_tp_sl", "batch_cancel_all", "batch_cancel_all_by_pair", "batch_cancel_orders", "batch_close_all_positions", "batch_create_orders", "batch_replace_orders", "cancel_all_after", "cancel_conditional_order", "cancel_order", "cancel_rfq", "cancel_twap_order", "check_trader_code_availability", "claim_buildercode_rewards", "claim_managed_market_lease", "clear_trader_code", "close_all_copy_positions", "close_follow_positions", "close_position", "close_sub_account", "create_challenge", "create_delegated_session", "create_order", "create_rfq", "create_sub_account", "create_sub_account_limit", "create_twap_order", "delete_sub_account_limit", "get_application_config", "get_application_stats", "get_available_collateral", "get_buildercode_payout_summary", "get_buildercode_rewards_balance", "get_buildercodes_config", "get_candles", "get_conditional_order", "get_faucet_info", "get_fee_schedule", "get_follow", "get_funding_state", "get_index_price", "get_lead_trader", "get_liquidation_metrics", "get_margin_account_movements", "get_margin_account_pnl", "get_margin_account_summary", "get_mark_price", "get_market_metadata", "get_market_stats", "get_my_fee_tier", "get_my_lead_trader", "get_my_referral_downline", "get_my_referral_position", "get_my_referral_tree", "get_my_trader_code", "get_open_interest", "get_order_by_id", "get_orderbook_snapshot", "get_orders", "get_parent_margin_account_movements", "get_parent_margin_account_summary", "get_perp_market_config", "get_perp_market_summary", "get_portfolio_assets", "get_portfolio_chart", "get_portfolio_margin", "get_portfolio_performance", "get_portfolio_realized_pnl", "get_portfolio_stats", "get_portfolio_summary", "get_position", "get_position_pnl_history", "get_position_risk", "get_pulse", "get_region_status", "get_rewards_balance", "get_rfq", "get_rfq_capabilities", "get_screener", "get_self_trade_prevention_default", "get_sub_account_limits", "get_sweeper_chains", "get_sweeper_deposit_status", "get_trade_by_id", "get_trade_flow", "get_trader_code_info", "get_trader_metrics", "get_trades", "get_trading_pair_by_id", "get_twap_order", "get_twap_order_tca", "get_user_balance_by_asset", "get_user_balances", "get_user_movements", "get_user_profile", "get_user_trades", "get_withdrawal", "health_check", "initiate_withdrawal", "list_all_funding_history", "list_all_liquidation_events", "list_application_balances", "list_application_movements", "list_application_orders", "list_application_users", "list_builder_fee_changes", "list_buildercode_payouts", "list_conditional_orders", "list_delegated_agent_owners", "list_delegated_agents", "list_follow_leader_positions", "list_funding_history", "list_funding_payments", "list_insurance_funds", "list_invite_codes", "list_lead_trader_closed_trades", "list_lead_trader_open_positions", "list_lead_traders", "list_liquidation_events", "list_managed_market_assignments", "list_margin_accounts", "list_my_followers", "list_my_follows", "list_pending_withdrawals", "list_position_history", "list_positions", "list_sub_accounts_with_balances", "list_sweeper_deposits", "list_trades", "list_trading_pairs", "list_twap_order_slices", "list_twap_orders", "mint_tokens", "preview_follow", "refresh_managed_market_quotes", "refresh_session", "register_deposit_address", "replace_order", "request_invite_codes", "respond_rfq_last_look", "revoke_delegated_agent", "revoke_session", "set_builder_fee", "set_self_trade_prevention_default", "set_trader_code", "simulate_fees", "simulate_order_risk", "simulate_parent_margin_order_risk", "simulate_risk_bucket_order_risk", "stop_follow", "transfer_collateral", "transfer_collateral_from_margin_account", "transfer_collateral_from_parent_margin_account", "transfer_collateral_from_sub_account", "transfer_collateral_to_margin_account", "transfer_collateral_to_parent_margin_account", "transfer_collateral_to_risk_bucket", "transfer_collateral_to_sub_account", "transfer_rewards", "update_sub_account_limit", "upsert_delegated_agent", "upsert_follow", "upsert_lead_trader", "upsert_rfq_quote", "verify_signature", "withdraw_rfq_quote"];
|
|
13
|
+
export declare const OPERATION_IDS: readonly ["accept_rfq", "add_follow_position_margin", "attach_position_tp_sl", "batch_cancel_all", "batch_cancel_all_by_pair", "batch_cancel_orders", "batch_close_all_positions", "batch_create_orders", "batch_replace_orders", "cancel_all_after", "cancel_conditional_order", "cancel_order", "cancel_rfq", "cancel_twap_order", "check_trader_code_availability", "claim_buildercode_rewards", "claim_managed_market_lease", "clear_trader_code", "close_all_copy_positions", "close_follow_positions", "close_position", "close_sub_account", "create_challenge", "create_delegated_session", "create_order", "create_rfq", "create_sub_account", "create_sub_account_limit", "create_twap_order", "delete_sub_account_limit", "get_application_config", "get_application_stats", "get_available_collateral", "get_builder", "get_builder_series", "get_builder_totals", "get_buildercode_payout_summary", "get_buildercode_rewards_balance", "get_buildercodes_config", "get_candles", "get_conditional_order", "get_faucet_info", "get_fee_schedule", "get_follow", "get_funding_state", "get_index_price", "get_lead_trader", "get_liquidation_metrics", "get_margin_account_movements", "get_margin_account_pnl", "get_margin_account_summary", "get_mark_price", "get_market_metadata", "get_market_stats", "get_my_fee_tier", "get_my_lead_trader", "get_my_referral_downline", "get_my_referral_position", "get_my_referral_tree", "get_my_trader_code", "get_open_interest", "get_order_by_id", "get_orderbook_snapshot", "get_orders", "get_parent_margin_account_movements", "get_parent_margin_account_summary", "get_perp_market_config", "get_perp_market_summary", "get_portfolio_assets", "get_portfolio_chart", "get_portfolio_margin", "get_portfolio_performance", "get_portfolio_realized_pnl", "get_portfolio_stats", "get_portfolio_summary", "get_position", "get_position_pnl_history", "get_position_risk", "get_protocol_series", "get_protocol_totals", "get_pulse", "get_region_status", "get_rewards_balance", "get_rfq", "get_rfq_capabilities", "get_screener", "get_self_trade_prevention_default", "get_sub_account_limits", "get_sweeper_chains", "get_sweeper_deposit_status", "get_token_custody", "get_trade_by_id", "get_trade_flow", "get_trader_code_info", "get_trader_metrics", "get_trades", "get_trading_pair_by_id", "get_treasury_net_fees", "get_twap_order", "get_twap_order_tca", "get_user_balance_by_asset", "get_user_balances", "get_user_movements", "get_user_profile", "get_user_trades", "get_wallet_summary", "get_withdrawal", "health_check", "initiate_withdrawal", "list_all_funding_history", "list_all_liquidation_events", "list_application_balances", "list_application_movements", "list_application_orders", "list_application_users", "list_builder_fee_changes", "list_builder_leaderboard", "list_buildercode_payouts", "list_builders", "list_conditional_orders", "list_delegated_agent_owners", "list_delegated_agents", "list_follow_leader_positions", "list_funding_history", "list_funding_payments", "list_insurance_funds", "list_invite_codes", "list_lead_trader_closed_trades", "list_lead_trader_open_positions", "list_lead_traders", "list_liquidation_events", "list_managed_market_assignments", "list_margin_accounts", "list_market_volumes", "list_my_followers", "list_my_follows", "list_pending_withdrawals", "list_position_history", "list_positions", "list_sub_accounts_with_balances", "list_sweeper_deposits", "list_token_custody", "list_trades", "list_trading_pairs", "list_twap_order_slices", "list_twap_orders", "list_vault_deposits", "list_vault_withdrawals", "list_wallet_leaderboard", "list_wallet_liquidations", "mint_tokens", "preview_follow", "refresh_managed_market_quotes", "refresh_session", "register_deposit_address", "replace_order", "request_invite_codes", "respond_rfq_last_look", "revoke_delegated_agent", "revoke_session", "set_builder_fee", "set_self_trade_prevention_default", "set_trader_code", "simulate_fees", "simulate_order_risk", "simulate_parent_margin_order_risk", "simulate_risk_bucket_order_risk", "stop_follow", "transfer_collateral", "transfer_collateral_from_margin_account", "transfer_collateral_from_parent_margin_account", "transfer_collateral_from_sub_account", "transfer_collateral_to_margin_account", "transfer_collateral_to_parent_margin_account", "transfer_collateral_to_risk_bucket", "transfer_collateral_to_sub_account", "transfer_rewards", "update_sub_account_limit", "upsert_delegated_agent", "upsert_follow", "upsert_lead_trader", "upsert_rfq_quote", "verify_signature", "withdraw_rfq_quote"];
|
|
14
14
|
/** Union of every OpenAPI operationId in the spec. */
|
|
15
15
|
export type OperationId = (typeof OPERATION_IDS)[number];
|
package/dist/wire/operations.js
CHANGED
|
@@ -44,6 +44,9 @@ export const OPERATION_IDS = [
|
|
|
44
44
|
"get_application_config",
|
|
45
45
|
"get_application_stats",
|
|
46
46
|
"get_available_collateral",
|
|
47
|
+
"get_builder",
|
|
48
|
+
"get_builder_series",
|
|
49
|
+
"get_builder_totals",
|
|
47
50
|
"get_buildercode_payout_summary",
|
|
48
51
|
"get_buildercode_rewards_balance",
|
|
49
52
|
"get_buildercodes_config",
|
|
@@ -86,6 +89,8 @@ export const OPERATION_IDS = [
|
|
|
86
89
|
"get_position",
|
|
87
90
|
"get_position_pnl_history",
|
|
88
91
|
"get_position_risk",
|
|
92
|
+
"get_protocol_series",
|
|
93
|
+
"get_protocol_totals",
|
|
89
94
|
"get_pulse",
|
|
90
95
|
"get_region_status",
|
|
91
96
|
"get_rewards_balance",
|
|
@@ -96,12 +101,14 @@ export const OPERATION_IDS = [
|
|
|
96
101
|
"get_sub_account_limits",
|
|
97
102
|
"get_sweeper_chains",
|
|
98
103
|
"get_sweeper_deposit_status",
|
|
104
|
+
"get_token_custody",
|
|
99
105
|
"get_trade_by_id",
|
|
100
106
|
"get_trade_flow",
|
|
101
107
|
"get_trader_code_info",
|
|
102
108
|
"get_trader_metrics",
|
|
103
109
|
"get_trades",
|
|
104
110
|
"get_trading_pair_by_id",
|
|
111
|
+
"get_treasury_net_fees",
|
|
105
112
|
"get_twap_order",
|
|
106
113
|
"get_twap_order_tca",
|
|
107
114
|
"get_user_balance_by_asset",
|
|
@@ -109,6 +116,7 @@ export const OPERATION_IDS = [
|
|
|
109
116
|
"get_user_movements",
|
|
110
117
|
"get_user_profile",
|
|
111
118
|
"get_user_trades",
|
|
119
|
+
"get_wallet_summary",
|
|
112
120
|
"get_withdrawal",
|
|
113
121
|
"health_check",
|
|
114
122
|
"initiate_withdrawal",
|
|
@@ -119,7 +127,9 @@ export const OPERATION_IDS = [
|
|
|
119
127
|
"list_application_orders",
|
|
120
128
|
"list_application_users",
|
|
121
129
|
"list_builder_fee_changes",
|
|
130
|
+
"list_builder_leaderboard",
|
|
122
131
|
"list_buildercode_payouts",
|
|
132
|
+
"list_builders",
|
|
123
133
|
"list_conditional_orders",
|
|
124
134
|
"list_delegated_agent_owners",
|
|
125
135
|
"list_delegated_agents",
|
|
@@ -134,6 +144,7 @@ export const OPERATION_IDS = [
|
|
|
134
144
|
"list_liquidation_events",
|
|
135
145
|
"list_managed_market_assignments",
|
|
136
146
|
"list_margin_accounts",
|
|
147
|
+
"list_market_volumes",
|
|
137
148
|
"list_my_followers",
|
|
138
149
|
"list_my_follows",
|
|
139
150
|
"list_pending_withdrawals",
|
|
@@ -141,10 +152,15 @@ export const OPERATION_IDS = [
|
|
|
141
152
|
"list_positions",
|
|
142
153
|
"list_sub_accounts_with_balances",
|
|
143
154
|
"list_sweeper_deposits",
|
|
155
|
+
"list_token_custody",
|
|
144
156
|
"list_trades",
|
|
145
157
|
"list_trading_pairs",
|
|
146
158
|
"list_twap_order_slices",
|
|
147
159
|
"list_twap_orders",
|
|
160
|
+
"list_vault_deposits",
|
|
161
|
+
"list_vault_withdrawals",
|
|
162
|
+
"list_wallet_leaderboard",
|
|
163
|
+
"list_wallet_liquidations",
|
|
148
164
|
"mint_tokens",
|
|
149
165
|
"preview_follow",
|
|
150
166
|
"refresh_managed_market_quotes",
|