@0xmonaco/types 1.0.97 → 1.0.99
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/dist/fees/index.d.ts +23 -3
- package/dist/fees/index.js +1 -1
- package/dist/fees/responses.d.ts +28 -0
- package/dist/fees/responses.js +16 -0
- package/dist/market/index.d.ts +5 -2
- package/dist/trading/orders.d.ts +27 -0
- package/dist/validation/market.d.ts +2 -0
- package/dist/validation/market.js +1 -1
- package/dist/websocket/events/ohlcv-events.d.ts +9 -6
- package/dist/websocket/events/orders-events.d.ts +22 -0
- package/dist/websocket/snapshots.d.ts +18 -2
- package/dist/wire/operations.d.ts +1 -1
- package/dist/wire/operations.js +1 -0
- package/dist/wire/schema.d.ts +86 -2
- package/package.json +2 -2
package/dist/fees/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Types for fees operations including fee simulation.
|
|
5
5
|
*/
|
|
6
6
|
import type { BaseAPI } from "../api/index";
|
|
7
|
-
import type { GetMyFeeTierParams, GetMyFeeTierResponse, SimulateFeeParams, SimulateFeeResponse } from "./responses";
|
|
7
|
+
import type { GetFeeScheduleResponse, GetMyFeeTierParams, GetMyFeeTierResponse, SimulateFeeParams, SimulateFeeResponse } from "./responses";
|
|
8
8
|
/**
|
|
9
9
|
* Fees API interface.
|
|
10
10
|
* Provides methods for simulating and calculating trading fees.
|
|
@@ -59,6 +59,26 @@ export interface FeesAPI extends BaseAPI {
|
|
|
59
59
|
* ```
|
|
60
60
|
*/
|
|
61
61
|
getMyFeeTier(params: GetMyFeeTierParams): Promise<GetMyFeeTierResponse>;
|
|
62
|
+
/**
|
|
63
|
+
* Get a trading pair's fee tier schedule. Public: needs no authentication.
|
|
64
|
+
*
|
|
65
|
+
* Returns the pair's Monaco fee schedule ordered by tier level: each row's
|
|
66
|
+
* weighted 14-day volume threshold and its maker/taker fee in basis points
|
|
67
|
+
* (a negative maker fee is a rebate). Your own tier and rate come from
|
|
68
|
+
* {@link FeesAPI.getMyFeeTier}.
|
|
69
|
+
*
|
|
70
|
+
* @param tradingPairId - Trading pair whose fee schedule to return
|
|
71
|
+
* @returns Promise resolving to the pair's fee tier schedule
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* ```typescript
|
|
75
|
+
* const { feeSchedule } = await feesAPI.getFeeSchedule("123e4567-e89b-12d3-a456-426614174000");
|
|
76
|
+
* for (const row of feeSchedule) {
|
|
77
|
+
* console.log(`Tier ${row.tierLevel}: maker ${row.makerFeeBps} bps, taker ${row.takerFeeBps} bps`);
|
|
78
|
+
* }
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
getFeeSchedule(tradingPairId: string): Promise<GetFeeScheduleResponse>;
|
|
62
82
|
}
|
|
63
|
-
export type { FeeTierScheduleRow, GetMyFeeTierParams, GetMyFeeTierResponse, SimulateFeeParams, SimulateFeeResponse, } from "./responses";
|
|
64
|
-
export { FeeTierScheduleRowSchema, GetMyFeeTierParamsSchema, GetMyFeeTierResponseSchema, SimulateFeeParamsSchema, SimulateFeeResponseSchema, } from "./responses";
|
|
83
|
+
export type { FeeTierScheduleRow, GetFeeScheduleParams, GetFeeScheduleResponse, GetMyFeeTierParams, GetMyFeeTierResponse, SimulateFeeParams, SimulateFeeResponse, } from "./responses";
|
|
84
|
+
export { FeeTierScheduleRowSchema, GetFeeScheduleParamsSchema, GetFeeScheduleResponseSchema, GetMyFeeTierParamsSchema, GetMyFeeTierResponseSchema, SimulateFeeParamsSchema, SimulateFeeResponseSchema, } from "./responses";
|
package/dist/fees/index.js
CHANGED
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Types for fees operations including fee simulation.
|
|
5
5
|
*/
|
|
6
|
-
export { FeeTierScheduleRowSchema, GetMyFeeTierParamsSchema, GetMyFeeTierResponseSchema, SimulateFeeParamsSchema, SimulateFeeResponseSchema, } from "./responses";
|
|
6
|
+
export { FeeTierScheduleRowSchema, GetFeeScheduleParamsSchema, GetFeeScheduleResponseSchema, GetMyFeeTierParamsSchema, GetMyFeeTierResponseSchema, SimulateFeeParamsSchema, SimulateFeeResponseSchema, } from "./responses";
|
package/dist/fees/responses.d.ts
CHANGED
|
@@ -86,6 +86,24 @@ export declare const GetMyFeeTierResponseSchema: z.ZodObject<{
|
|
|
86
86
|
takerFeeBps: z.ZodString;
|
|
87
87
|
}, z.core.$strip>>;
|
|
88
88
|
}, z.core.$strip>;
|
|
89
|
+
/**
|
|
90
|
+
* Zod schema for the parameters of a public fee schedule lookup
|
|
91
|
+
*/
|
|
92
|
+
export declare const GetFeeScheduleParamsSchema: z.ZodObject<{
|
|
93
|
+
tradingPairId: z.ZodString;
|
|
94
|
+
}, z.core.$strip>;
|
|
95
|
+
/**
|
|
96
|
+
* Zod schema for the public fee schedule response
|
|
97
|
+
*/
|
|
98
|
+
export declare const GetFeeScheduleResponseSchema: z.ZodObject<{
|
|
99
|
+
tradingPairId: z.ZodString;
|
|
100
|
+
feeSchedule: z.ZodArray<z.ZodObject<{
|
|
101
|
+
tierLevel: z.ZodNumber;
|
|
102
|
+
minVolumeThreshold: z.ZodString;
|
|
103
|
+
makerFeeBps: z.ZodString;
|
|
104
|
+
takerFeeBps: z.ZodString;
|
|
105
|
+
}, z.core.$strip>>;
|
|
106
|
+
}, z.core.$strip>;
|
|
89
107
|
/**
|
|
90
108
|
* Parameters for a "my fee tier" lookup
|
|
91
109
|
* @remarks Type is inferred from GetMyFeeTierParamsSchema
|
|
@@ -101,3 +119,13 @@ export type FeeTierScheduleRow = z.infer<typeof FeeTierScheduleRowSchema>;
|
|
|
101
119
|
* @remarks Type is inferred from GetMyFeeTierResponseSchema
|
|
102
120
|
*/
|
|
103
121
|
export type GetMyFeeTierResponse = z.infer<typeof GetMyFeeTierResponseSchema>;
|
|
122
|
+
/**
|
|
123
|
+
* Parameters for a public fee schedule lookup
|
|
124
|
+
* @remarks Type is inferred from GetFeeScheduleParamsSchema
|
|
125
|
+
*/
|
|
126
|
+
export type GetFeeScheduleParams = z.infer<typeof GetFeeScheduleParamsSchema>;
|
|
127
|
+
/**
|
|
128
|
+
* A trading pair's public fee tier schedule
|
|
129
|
+
* @remarks Type is inferred from GetFeeScheduleResponseSchema
|
|
130
|
+
*/
|
|
131
|
+
export type GetFeeScheduleResponse = z.infer<typeof GetFeeScheduleResponseSchema>;
|
package/dist/fees/responses.js
CHANGED
|
@@ -133,3 +133,19 @@ export const GetMyFeeTierResponseSchema = z.object({
|
|
|
133
133
|
/** Six-row fee schedule for the requested pair, ascending by tier */
|
|
134
134
|
feeSchedule: z.array(FeeTierScheduleRowSchema),
|
|
135
135
|
});
|
|
136
|
+
/**
|
|
137
|
+
* Zod schema for the parameters of a public fee schedule lookup
|
|
138
|
+
*/
|
|
139
|
+
export const GetFeeScheduleParamsSchema = z.object({
|
|
140
|
+
/** Trading pair ID whose fee tier schedule to return */
|
|
141
|
+
tradingPairId: z.string().trim().min(1, "Trading pair ID is required and cannot be empty"),
|
|
142
|
+
});
|
|
143
|
+
/**
|
|
144
|
+
* Zod schema for the public fee schedule response
|
|
145
|
+
*/
|
|
146
|
+
export const GetFeeScheduleResponseSchema = z.object({
|
|
147
|
+
/** Trading pair the schedule belongs to (UUID) */
|
|
148
|
+
tradingPairId: z.string(),
|
|
149
|
+
/** The pair's fee tier schedule, ascending by tier level */
|
|
150
|
+
feeSchedule: z.array(FeeTierScheduleRowSchema),
|
|
151
|
+
});
|
package/dist/market/index.d.ts
CHANGED
|
@@ -137,9 +137,12 @@ export interface GetCandlesticksParams {
|
|
|
137
137
|
* Price series to chart. `"trade"` (default) returns the trade-derived OHLCV
|
|
138
138
|
* series; `"mark"` returns the mark-price series (margin pairs only), where
|
|
139
139
|
* each candle's open/high/low/close are the bucket's closing mark and volume
|
|
140
|
-
* is 0
|
|
140
|
+
* is 0; `"reference"` returns full OHLC of the mark price over each bucket
|
|
141
|
+
* (margin pairs only), with volume, quote volume and trade count always 0,
|
|
142
|
+
* for charting markets with little trading. A margin pair with no reference
|
|
143
|
+
* history returns no candles. Omit for the trade series.
|
|
141
144
|
*/
|
|
142
|
-
priceType?: "trade" | "mark";
|
|
145
|
+
priceType?: "trade" | "mark" | "reference";
|
|
143
146
|
}
|
|
144
147
|
/**
|
|
145
148
|
* Query parameters for fetching trading pairs
|
package/dist/trading/orders.d.ts
CHANGED
|
@@ -137,6 +137,33 @@ export interface Order {
|
|
|
137
137
|
* SDK version does not know still reaches you. Wire: `origin`.
|
|
138
138
|
*/
|
|
139
139
|
origin?: OrderOrigin | (string & {});
|
|
140
|
+
/**
|
|
141
|
+
* Monaco taker fee rate fixed when this order was placed (re-fixed on
|
|
142
|
+
* replace), in basis points, as a decimal string such as `"4.5"`. A rate,
|
|
143
|
+
* not an amount: the amounts charged are `monacoTakerFee` and
|
|
144
|
+
* `monacoMakerRebate`.
|
|
145
|
+
*
|
|
146
|
+
* The fee actually charged on a fill can be lower for a maker rebate: a
|
|
147
|
+
* rebate never exceeds the taker fee of the same fill.
|
|
148
|
+
*
|
|
149
|
+
* Absent (never `"0"`) for orders placed before rates were stored. The same
|
|
150
|
+
* value the order WebSocket events and `orders` snapshot rows carry.
|
|
151
|
+
* Wire: `placementTakerFeeBps`.
|
|
152
|
+
*/
|
|
153
|
+
placementTakerFeeBps?: string;
|
|
154
|
+
/**
|
|
155
|
+
* Monaco maker fee rate fixed when this order was placed (re-fixed on
|
|
156
|
+
* replace), in basis points, as a decimal string such as `"-0.1"`. Negative
|
|
157
|
+
* means rebate. A rate, not an amount: the amount is `monacoMakerRebate`.
|
|
158
|
+
*
|
|
159
|
+
* The rebate actually paid on a fill can be smaller: a rebate never exceeds
|
|
160
|
+
* the taker fee of the same fill.
|
|
161
|
+
*
|
|
162
|
+
* Absent (never `"0"`) for orders placed before rates were stored. The same
|
|
163
|
+
* value the order WebSocket events and `orders` snapshot rows carry.
|
|
164
|
+
* Wire: `placementMakerFeeBps`.
|
|
165
|
+
*/
|
|
166
|
+
placementMakerFeeBps?: string;
|
|
140
167
|
/**
|
|
141
168
|
* Opaque, compare-only revision counter for this order's state: a strictly
|
|
142
169
|
* higher value is strictly newer state for that order, and equal values
|
|
@@ -173,6 +173,7 @@ export declare const GetCandlesticksByPairIdSchema: z.ZodObject<{
|
|
|
173
173
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
174
174
|
priceType: z.ZodOptional<z.ZodEnum<{
|
|
175
175
|
mark: "mark";
|
|
176
|
+
reference: "reference";
|
|
176
177
|
trade: "trade";
|
|
177
178
|
}>>;
|
|
178
179
|
}, z.core.$strip>;
|
|
@@ -197,6 +198,7 @@ export declare const GetCandlesticksBySymbolSchema: z.ZodObject<{
|
|
|
197
198
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
198
199
|
priceType: z.ZodOptional<z.ZodEnum<{
|
|
199
200
|
mark: "mark";
|
|
201
|
+
reference: "reference";
|
|
200
202
|
trade: "trade";
|
|
201
203
|
}>>;
|
|
202
204
|
}, z.core.$strip>;
|
|
@@ -188,7 +188,7 @@ export const GetCandlesticksByPairIdSchema = z
|
|
|
188
188
|
startTime: TimestampSchema.optional(),
|
|
189
189
|
endTime: TimestampSchema.optional(),
|
|
190
190
|
limit: CandlestickLimitSchema,
|
|
191
|
-
priceType: z.enum(["trade", "mark"]).optional(),
|
|
191
|
+
priceType: z.enum(["trade", "mark", "reference"]).optional(),
|
|
192
192
|
})
|
|
193
193
|
.refine((data) => {
|
|
194
194
|
// Only validate startTime < endTime if both are provided
|
|
@@ -11,9 +11,12 @@ import type { TradingMode } from "../../trading";
|
|
|
11
11
|
* - `trade` — the trade-derived candles (the default when the token is omitted).
|
|
12
12
|
* - `mark` — the close-only mark-price series (open = high = low = close = mark,
|
|
13
13
|
* zero volume), published on `1m` for margin pairs.
|
|
14
|
-
* -
|
|
14
|
+
* - `reference` — full OHLC of the mark price over each bucket (unlike the
|
|
15
|
+
* close-only `mark`), zero volume and trades, on every interval for margin
|
|
16
|
+
* pairs. Meant for charting markets with little trading.
|
|
17
|
+
* - `*` — every series.
|
|
15
18
|
*/
|
|
16
|
-
export type OHLCVPriceType = "trade" | "mark" | "*";
|
|
19
|
+
export type OHLCVPriceType = "trade" | "mark" | "reference" | "*";
|
|
17
20
|
/**
|
|
18
21
|
* OHLCV update event
|
|
19
22
|
*/
|
|
@@ -26,15 +29,15 @@ export interface OHLCVEvent {
|
|
|
26
29
|
tradingMode: TradingMode | (string & {});
|
|
27
30
|
/**
|
|
28
31
|
* Price series this candle belongs to. Always a concrete series on the wire
|
|
29
|
-
* (`trade` or `
|
|
30
|
-
* tell the
|
|
32
|
+
* (`trade`, `mark` or `reference`, never the `*` selector); lets a wildcard
|
|
33
|
+
* subscriber tell the streams apart. Absent only on legacy frames that omit it.
|
|
31
34
|
*
|
|
32
|
-
* Widened past the
|
|
35
|
+
* Widened past the known values on purpose: a wildcard subscription
|
|
33
36
|
* matches any suffix, so a series added server-side after this version still
|
|
34
37
|
* arrives here, and telling the streams apart is the entire point of the
|
|
35
38
|
* field. Match it with a `default` branch.
|
|
36
39
|
*/
|
|
37
|
-
priceType?: "trade" | "mark" | (string & {});
|
|
40
|
+
priceType?: "trade" | "mark" | "reference" | (string & {});
|
|
38
41
|
/** OHLCV candlestick data */
|
|
39
42
|
candlestick: Candlestick;
|
|
40
43
|
}
|
|
@@ -201,6 +201,28 @@ export interface CommonOrderEventData {
|
|
|
201
201
|
* servers predating the field. Wire: `position_id`.
|
|
202
202
|
*/
|
|
203
203
|
positionId?: string;
|
|
204
|
+
/**
|
|
205
|
+
* Monaco taker fee rate fixed when this order was placed (re-fixed on
|
|
206
|
+
* replace), in basis points, as a decimal string such as `"4.5"`. The same
|
|
207
|
+
* value REST `getOrder` returns as `placementTakerFeeBps`. The fee actually
|
|
208
|
+
* charged on a fill can be lower for a maker rebate: a rebate never exceeds
|
|
209
|
+
* the taker fee of the same fill. Carried on every order event; a maker fill
|
|
210
|
+
* reports the MAKER order's own rate. Omitted, never `"0"`, for an order
|
|
211
|
+
* placed before rates were stored and by servers predating the field.
|
|
212
|
+
* Wire: `placement_taker_fee_bps`.
|
|
213
|
+
*/
|
|
214
|
+
placementTakerFeeBps?: string;
|
|
215
|
+
/**
|
|
216
|
+
* Monaco maker fee rate fixed when this order was placed (re-fixed on
|
|
217
|
+
* replace), in basis points, as a decimal string such as `"-0.1"`. Negative
|
|
218
|
+
* means rebate. The same value REST `getOrder` returns as
|
|
219
|
+
* `placementMakerFeeBps`. The rebate actually paid on a fill can be smaller:
|
|
220
|
+
* a rebate never exceeds the taker fee of the same fill. Carried on every
|
|
221
|
+
* order event; a maker fill reports the MAKER order's own rate. Omitted,
|
|
222
|
+
* never `"0"`, for an order placed before rates were stored and by servers
|
|
223
|
+
* predating the field. Wire: `placement_maker_fee_bps`.
|
|
224
|
+
*/
|
|
225
|
+
placementMakerFeeBps?: string;
|
|
204
226
|
}
|
|
205
227
|
/**
|
|
206
228
|
* What placed an order, as carried on order events' `origin` (0XM-2848).
|
|
@@ -86,8 +86,9 @@ export type OHLCVSnapshotCandle = Omit<Candlestick, "s">;
|
|
|
86
86
|
* `Option` serialized WITHOUT `skip_serializing_if`, so the key is always
|
|
87
87
|
* present and carries `null` when unset — hence `| null` rather than `?`.
|
|
88
88
|
* `clientOrderId`, `selfTradePreventionMode`, `parentOrderId`, `postOnly`,
|
|
89
|
-
* `expirationDate`, `triggerPrice`, `positionSide`, `version
|
|
90
|
-
*
|
|
89
|
+
* `expirationDate`, `triggerPrice`, `positionSide`, `version`, `origin`,
|
|
90
|
+
* `placementTakerFeeBps` and `placementMakerFeeBps` are the fields the server
|
|
91
|
+
* omits outright, so they are the `?`s.
|
|
91
92
|
*
|
|
92
93
|
* The value unions are widened (`Union | (string & {})`) for the same reason
|
|
93
94
|
* the order event's are: the parser hands an unrecognized value through rather
|
|
@@ -207,4 +208,19 @@ export interface OrderSnapshotItem {
|
|
|
207
208
|
* Wire: `origin`.
|
|
208
209
|
*/
|
|
209
210
|
origin?: OrderOrigin | (string & {});
|
|
211
|
+
/**
|
|
212
|
+
* Monaco taker fee rate fixed when this order was placed (re-fixed on
|
|
213
|
+
* replace), in basis points (decimal string), as REST `getOrder` and the
|
|
214
|
+
* live order events report it. Omitted — not `null`, never `"0"` — for an
|
|
215
|
+
* order placed before rates were stored. Wire: `placement_taker_fee_bps`.
|
|
216
|
+
*/
|
|
217
|
+
placementTakerFeeBps?: string;
|
|
218
|
+
/**
|
|
219
|
+
* Monaco maker fee rate fixed when this order was placed (re-fixed on
|
|
220
|
+
* replace), in basis points (decimal string); negative means rebate. As
|
|
221
|
+
* REST `getOrder` and the live order events report it. Omitted — not
|
|
222
|
+
* `null`, never `"0"` — for an order placed before rates were stored.
|
|
223
|
+
* Wire: `placement_maker_fee_bps`.
|
|
224
|
+
*/
|
|
225
|
+
placementMakerFeeBps?: string;
|
|
210
226
|
}
|
|
@@ -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 ["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_conditional_order", "cancel_order", "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_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_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_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_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_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_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", "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", "verify_signature"];
|
|
13
|
+
export declare const OPERATION_IDS: readonly ["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_conditional_order", "cancel_order", "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_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_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_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_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_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", "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", "verify_signature"];
|
|
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
package/dist/wire/schema.d.ts
CHANGED
|
@@ -1562,6 +1562,26 @@ export interface paths {
|
|
|
1562
1562
|
patch?: never;
|
|
1563
1563
|
trace?: never;
|
|
1564
1564
|
};
|
|
1565
|
+
"/api/v1/fees/schedule": {
|
|
1566
|
+
parameters: {
|
|
1567
|
+
query?: never;
|
|
1568
|
+
header?: never;
|
|
1569
|
+
path?: never;
|
|
1570
|
+
cookie?: never;
|
|
1571
|
+
};
|
|
1572
|
+
/**
|
|
1573
|
+
* Get a trading pair's fee tier schedule
|
|
1574
|
+
* @description Public. The tier schedule a pair charges, ordered by tier level. Your own tier and rate: GET /api/v1/fees/tier.
|
|
1575
|
+
*/
|
|
1576
|
+
get: operations["get_fee_schedule"];
|
|
1577
|
+
put?: never;
|
|
1578
|
+
post?: never;
|
|
1579
|
+
delete?: never;
|
|
1580
|
+
options?: never;
|
|
1581
|
+
head?: never;
|
|
1582
|
+
patch?: never;
|
|
1583
|
+
trace?: never;
|
|
1584
|
+
};
|
|
1565
1585
|
"/api/v1/fees/simulate": {
|
|
1566
1586
|
parameters: {
|
|
1567
1587
|
query?: never;
|
|
@@ -5947,6 +5967,16 @@ export interface components {
|
|
|
5947
5967
|
*/
|
|
5948
5968
|
recentRequests?: components["schemas"]["FaucetRequestRecord"][] | null;
|
|
5949
5969
|
};
|
|
5970
|
+
GetFeeScheduleResponse: {
|
|
5971
|
+
/**
|
|
5972
|
+
* Format: uuid
|
|
5973
|
+
* @description Trading pair UUID the schedule belongs to
|
|
5974
|
+
* @example 123e4567-e89b-12d3-a456-426614174000
|
|
5975
|
+
*/
|
|
5976
|
+
tradingPairId?: string | null;
|
|
5977
|
+
/** @description The pair's fee tier schedule, ascending by tier level */
|
|
5978
|
+
feeSchedule?: components["schemas"]["FeeTierScheduleRow"][] | null;
|
|
5979
|
+
};
|
|
5950
5980
|
GetFollowResponse: {
|
|
5951
5981
|
/** @description The follow. */
|
|
5952
5982
|
follow?: components["schemas"]["Follow"] | null;
|
|
@@ -6650,6 +6680,16 @@ export interface components {
|
|
|
6650
6680
|
* @example LIQUIDATION
|
|
6651
6681
|
*/
|
|
6652
6682
|
origin?: string | null;
|
|
6683
|
+
/**
|
|
6684
|
+
* @description Monaco taker fee rate fixed when this order was placed (re-fixed on replace), in basis points. The fee actually charged on a fill can be lower for a maker rebate: a rebate never exceeds the taker fee of the same fill. Absent for orders placed before rates were stored.
|
|
6685
|
+
* @example 4.5
|
|
6686
|
+
*/
|
|
6687
|
+
placementTakerFeeBps?: string | null;
|
|
6688
|
+
/**
|
|
6689
|
+
* @description Monaco maker fee rate fixed when this order was placed (re-fixed on replace), in basis points. Negative means rebate. The rebate actually paid on a fill can be smaller: a rebate never exceeds the taker fee of the same fill. Absent for orders placed before rates were stored.
|
|
6690
|
+
* @example -0.1
|
|
6691
|
+
*/
|
|
6692
|
+
placementMakerFeeBps?: string | null;
|
|
6653
6693
|
};
|
|
6654
6694
|
/** @description Orderbook snapshot with token metadata and sequence number. */
|
|
6655
6695
|
GetOrderbookResponse: {
|
|
@@ -15678,6 +15718,50 @@ export interface operations {
|
|
|
15678
15718
|
};
|
|
15679
15719
|
};
|
|
15680
15720
|
};
|
|
15721
|
+
get_fee_schedule: {
|
|
15722
|
+
parameters: {
|
|
15723
|
+
query?: {
|
|
15724
|
+
/** @description Trading pair identifier (UUID) */
|
|
15725
|
+
tradingPairId?: string;
|
|
15726
|
+
};
|
|
15727
|
+
header?: never;
|
|
15728
|
+
path?: never;
|
|
15729
|
+
cookie?: never;
|
|
15730
|
+
};
|
|
15731
|
+
requestBody?: never;
|
|
15732
|
+
responses: {
|
|
15733
|
+
/** @description OK */
|
|
15734
|
+
200: {
|
|
15735
|
+
headers: {
|
|
15736
|
+
[name: string]: unknown;
|
|
15737
|
+
};
|
|
15738
|
+
content: {
|
|
15739
|
+
"application/json": components["schemas"]["GetFeeScheduleResponse"];
|
|
15740
|
+
};
|
|
15741
|
+
};
|
|
15742
|
+
/** @description Invalid trading pair ID format */
|
|
15743
|
+
400: {
|
|
15744
|
+
headers: {
|
|
15745
|
+
[name: string]: unknown;
|
|
15746
|
+
};
|
|
15747
|
+
content?: never;
|
|
15748
|
+
};
|
|
15749
|
+
/** @description Trading pair or fee tier schedule not found */
|
|
15750
|
+
404: {
|
|
15751
|
+
headers: {
|
|
15752
|
+
[name: string]: unknown;
|
|
15753
|
+
};
|
|
15754
|
+
content?: never;
|
|
15755
|
+
};
|
|
15756
|
+
/** @description Internal server error */
|
|
15757
|
+
500: {
|
|
15758
|
+
headers: {
|
|
15759
|
+
[name: string]: unknown;
|
|
15760
|
+
};
|
|
15761
|
+
content?: never;
|
|
15762
|
+
};
|
|
15763
|
+
};
|
|
15764
|
+
};
|
|
15681
15765
|
simulate_fees: {
|
|
15682
15766
|
parameters: {
|
|
15683
15767
|
query: {
|
|
@@ -16847,8 +16931,8 @@ export interface operations {
|
|
|
16847
16931
|
endTime?: number;
|
|
16848
16932
|
/** @description Max candles to return (max 1000) */
|
|
16849
16933
|
limit?: number;
|
|
16850
|
-
/** @description Price series to chart: trade (default, trade-derived OHLCV)
|
|
16851
|
-
priceType?: "trade" | "mark";
|
|
16934
|
+
/** @description Price series to chart: trade (default, trade-derived OHLCV), mark (mark-price series, margin pairs only; each candle's open/high/low/close are the bucket's closing mark and volume is 0) or reference (full OHLC of the mark price over each bucket, margin pairs only; volume and trade count are always 0; for charting thin markets) */
|
|
16935
|
+
priceType?: "trade" | "mark" | "reference";
|
|
16852
16936
|
};
|
|
16853
16937
|
header?: never;
|
|
16854
16938
|
path: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@0xmonaco/types",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.99",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"homepage": "https://docs.0xmonaco.com/sdk/typescript",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"lint": "biome lint ."
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@0xmonaco/contracts": "1.0.
|
|
19
|
+
"@0xmonaco/contracts": "1.0.99",
|
|
20
20
|
"zod": "^4.6.7"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|