@0xmonaco/core 0.6.0 → 0.6.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.
- package/dist/api/fees/api.d.ts +2 -0
- package/dist/api/fees/api.js +8 -0
- package/package.json +1 -1
package/dist/api/fees/api.d.ts
CHANGED
|
@@ -35,6 +35,8 @@ export declare class FeesAPIImpl extends BaseAPI implements FeesAPI {
|
|
|
35
35
|
* @param params.side - The order side ("BUY" or "SELL")
|
|
36
36
|
* @param params.price - The price per unit as string
|
|
37
37
|
* @param params.quantity - The quantity to trade as string
|
|
38
|
+
* @param params.order_type - Order type: "LIMIT" (default) or "MARKET"
|
|
39
|
+
* @param params.slippage_tolerance_bps - Slippage tolerance in bps (0–1000, MARKET only, default 500)
|
|
38
40
|
* @returns Promise resolving to SimulateFeeResponse with fee breakdown
|
|
39
41
|
*
|
|
40
42
|
* @example
|
package/dist/api/fees/api.js
CHANGED
|
@@ -35,6 +35,8 @@ export class FeesAPIImpl extends BaseAPI {
|
|
|
35
35
|
* @param params.side - The order side ("BUY" or "SELL")
|
|
36
36
|
* @param params.price - The price per unit as string
|
|
37
37
|
* @param params.quantity - The quantity to trade as string
|
|
38
|
+
* @param params.order_type - Order type: "LIMIT" (default) or "MARKET"
|
|
39
|
+
* @param params.slippage_tolerance_bps - Slippage tolerance in bps (0–1000, MARKET only, default 500)
|
|
38
40
|
* @returns Promise resolving to SimulateFeeResponse with fee breakdown
|
|
39
41
|
*
|
|
40
42
|
* @example
|
|
@@ -74,6 +76,12 @@ export class FeesAPIImpl extends BaseAPI {
|
|
|
74
76
|
searchParams.append("side", validatedParams.side);
|
|
75
77
|
searchParams.append("price", validatedParams.price);
|
|
76
78
|
searchParams.append("quantity", validatedParams.quantity);
|
|
79
|
+
if (validatedParams.order_type !== undefined) {
|
|
80
|
+
searchParams.append("order_type", validatedParams.order_type);
|
|
81
|
+
}
|
|
82
|
+
if (validatedParams.slippage_tolerance_bps !== undefined) {
|
|
83
|
+
searchParams.append("slippage_tolerance_bps", String(validatedParams.slippage_tolerance_bps));
|
|
84
|
+
}
|
|
77
85
|
const endpoint = `/api/v1/fees/simulate?${searchParams.toString()}`;
|
|
78
86
|
return await this.makeAuthenticatedRequest(endpoint, {
|
|
79
87
|
method: "GET",
|