@0xmonaco/react 0.8.15 → 0.8.18

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.
@@ -18,6 +18,7 @@ export declare const COVERED: {
18
18
  get_index_price: string;
19
19
  get_mark_price: string;
20
20
  get_market_metadata: string;
21
+ get_my_fee_tier: string;
21
22
  get_open_interest: string;
22
23
  get_order_by_id: string;
23
24
  get_orderbook_snapshot: string;
package/dist/coverage.js CHANGED
@@ -18,6 +18,7 @@ export const COVERED = {
18
18
  get_index_price: "useMarket",
19
19
  get_mark_price: "useMarket",
20
20
  get_market_metadata: "useMarket",
21
+ get_my_fee_tier: "useFees",
21
22
  get_open_interest: "useMarket",
22
23
  get_order_by_id: "useTrade",
23
24
  get_orderbook_snapshot: "useOrderbook",
@@ -1,5 +1,7 @@
1
- import type { SimulateFeeParams, SimulateFeeResponse } from "@0xmonaco/types";
1
+ import type { GetMyFeeTierParams, GetMyFeeTierResponse, SimulateFeeParams, SimulateFeeResponse } from "@0xmonaco/types";
2
2
  export interface UseFeesReturn {
3
3
  /** Simulate fees for an order before placing it */
4
4
  simulateFees: (params: SimulateFeeParams) => Promise<SimulateFeeResponse>;
5
+ /** Get the caller's current fee tier, rolling 14-day volumes, and a pair's schedule */
6
+ getMyFeeTier: (params: GetMyFeeTierParams) => Promise<GetMyFeeTierResponse>;
5
7
  }
@@ -8,7 +8,14 @@ export const useFees = () => {
8
8
  // Parameter validation is handled by the SDK core using Zod
9
9
  return await sdk.fees.simulateFees(params);
10
10
  }, [sdk]);
11
+ const getMyFeeTier = useCallback(async (params) => {
12
+ if (!sdk)
13
+ throw new Error("SDK not available");
14
+ // Parameter validation is handled by the SDK core using Zod
15
+ return await sdk.fees.getMyFeeTier(params);
16
+ }, [sdk]);
11
17
  return {
12
18
  simulateFees,
19
+ getMyFeeTier,
13
20
  };
14
21
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xmonaco/react",
3
- "version": "0.8.15",
3
+ "version": "0.8.18",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -20,8 +20,8 @@
20
20
  "lint": "biome lint ."
21
21
  },
22
22
  "dependencies": {
23
- "@0xmonaco/core": "0.8.15",
24
- "@0xmonaco/types": "0.8.15"
23
+ "@0xmonaco/core": "0.8.18",
24
+ "@0xmonaco/types": "0.8.18"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@types/react": "^19.1.12",