@0xmonaco/core 1.0.28 → 1.0.29

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.
@@ -16,6 +16,7 @@ export * from "./pitpass";
16
16
  export * from "./portfolio";
17
17
  export * from "./positions";
18
18
  export * from "./profile";
19
+ export * from "./pulse";
19
20
  export * from "./sub-accounts";
20
21
  export * from "./trades";
21
22
  export * from "./trading";
package/dist/api/index.js CHANGED
@@ -16,6 +16,7 @@ export * from "./pitpass";
16
16
  export * from "./portfolio";
17
17
  export * from "./positions";
18
18
  export * from "./profile";
19
+ export * from "./pulse";
19
20
  export * from "./sub-accounts";
20
21
  export * from "./trades";
21
22
  export * from "./trading";
@@ -1,4 +1,4 @@
1
- import type { Candlestick, FundingState, GetCandlesticksParams, GetScreenerParams, GetScreenerResponse, GetTradingPairsParams, GetTradingPairsResponse, IndexPrice, Interval, ListFundingHistoryParams, ListFundingHistoryResponse, MarketAPI, MarketMetadata, MarketStats, MarkPrice, OpenInterest, PerpMarketConfig, PerpMarketSummary, TradingMode, TradingPair } from "@0xmonaco/types";
1
+ import type { Candlestick, FundingState, GetCandlesticksParams, GetScreenerParams, GetScreenerResponse, GetTradingPairsParams, GetTradingPairsResponse, IndexPrice, Interval, ListAllFundingHistoryParams, ListAllFundingHistoryResponse, ListFundingHistoryParams, ListFundingHistoryResponse, MarketAPI, MarketMetadata, MarketStats, MarkPrice, OpenInterest, PerpMarketConfig, PerpMarketSummary, TradingMode, TradingPair } from "@0xmonaco/types";
2
2
  import { BaseAPI } from "../base";
3
3
  /**
4
4
  * Market API Implementation
@@ -17,6 +17,7 @@ export declare class MarketAPIImpl extends BaseAPI implements MarketAPI {
17
17
  getIndexPrice(tradingPairId: string): Promise<IndexPrice>;
18
18
  getFundingState(tradingPairId: string): Promise<FundingState>;
19
19
  listFundingHistory(tradingPairId: string, params?: ListFundingHistoryParams): Promise<ListFundingHistoryResponse>;
20
+ listAllFundingHistory(params?: ListAllFundingHistoryParams): Promise<ListAllFundingHistoryResponse>;
20
21
  getOpenInterest(tradingPairId: string): Promise<OpenInterest>;
21
22
  getScreener(params?: GetScreenerParams): Promise<GetScreenerResponse>;
22
23
  getMarketStats(): Promise<MarketStats>;
@@ -100,6 +100,9 @@ export class MarketAPIImpl extends BaseAPI {
100
100
  validate(GetMarketMetadataSchema, { tradingPairId });
101
101
  return await this.makePublicRequest(perpRoutes.market.listFundingHistory(tradingPairId, params));
102
102
  }
103
+ async listAllFundingHistory(params) {
104
+ return await this.makePublicRequest(perpRoutes.market.listAllFundingHistory(params));
105
+ }
103
106
  async getOpenInterest(tradingPairId) {
104
107
  validate(GetMarketMetadataSchema, { tradingPairId });
105
108
  return await this.makePublicRequest(perpRoutes.market.getOpenInterest(tradingPairId));
@@ -67,6 +67,14 @@ export declare const perpRoutes: {
67
67
  endTime?: string;
68
68
  page?: number;
69
69
  pageSize?: number;
70
+ orderBy?: string;
71
+ }) => string;
72
+ readonly listAllFundingHistory: (params?: {
73
+ startTime?: string;
74
+ endTime?: string;
75
+ page?: number;
76
+ pageSize?: number;
77
+ orderBy?: string;
70
78
  }) => string;
71
79
  readonly getOpenInterest: (tradingPairId: string) => string;
72
80
  readonly getScreener: (params?: {
@@ -52,6 +52,7 @@ export const perpRoutes = {
52
52
  getIndexPrice: (tradingPairId) => `${API_V1}/market/pairs/${encodeSegment(tradingPairId)}/index-price`,
53
53
  getFundingState: (tradingPairId) => `${API_V1}/market/pairs/${encodeSegment(tradingPairId)}/funding`,
54
54
  listFundingHistory: (tradingPairId, params) => withQuery(`${API_V1}/market/pairs/${encodeSegment(tradingPairId)}/funding/history`, params),
55
+ listAllFundingHistory: (params) => withQuery(`${API_V1}/market/funding/history`, params),
55
56
  getOpenInterest: (tradingPairId) => `${API_V1}/market/pairs/${encodeSegment(tradingPairId)}/open-interest`,
56
57
  getScreener: (params) => withQuery(`${API_V1}/market/screener`, params),
57
58
  getMarketStats: () => `${API_V1}/market/stats`,
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Pulse API Implementation
3
+ *
4
+ * Read-only access to the market-pulse news feed: AI-synthesized, per-asset
5
+ * headlines with sentiment tags, served from the backend's hourly-refreshed
6
+ * cache. Public — no authentication required.
7
+ *
8
+ * @example
9
+ * ```typescript
10
+ * const pulse = await sdk.pulse.getPulse();
11
+ * for (const item of pulse.items) {
12
+ * console.log(`[${item.sentiment}] ${item.asset}: ${item.summary}`);
13
+ * }
14
+ * ```
15
+ */
16
+ import type { GetPulseResponse, PulseAPI } from "@0xmonaco/types";
17
+ import { BaseAPI } from "../base";
18
+ export declare class PulseAPIImpl extends BaseAPI implements PulseAPI {
19
+ /**
20
+ * Get the latest market pulse snapshot (public, no auth headers).
21
+ * Returns 503 while the backend cache is cold.
22
+ */
23
+ getPulse(): Promise<GetPulseResponse>;
24
+ }
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Pulse API Implementation
3
+ *
4
+ * Read-only access to the market-pulse news feed: AI-synthesized, per-asset
5
+ * headlines with sentiment tags, served from the backend's hourly-refreshed
6
+ * cache. Public — no authentication required.
7
+ *
8
+ * @example
9
+ * ```typescript
10
+ * const pulse = await sdk.pulse.getPulse();
11
+ * for (const item of pulse.items) {
12
+ * console.log(`[${item.sentiment}] ${item.asset}: ${item.summary}`);
13
+ * }
14
+ * ```
15
+ */
16
+ import { BaseAPI } from "../base";
17
+ export class PulseAPIImpl extends BaseAPI {
18
+ /**
19
+ * Get the latest market pulse snapshot (public, no auth headers).
20
+ * Returns 503 while the backend cache is cold.
21
+ */
22
+ async getPulse() {
23
+ return await this.makePublicRequest("/api/v1/pulse", {
24
+ method: "GET",
25
+ });
26
+ }
27
+ }
@@ -0,0 +1 @@
1
+ export { PulseAPIImpl } from "./api";
@@ -0,0 +1 @@
1
+ export { PulseAPIImpl } from "./api";
@@ -30,6 +30,7 @@ export declare const COVERED: {
30
30
  get_market_metadata: string;
31
31
  get_market_stats: string;
32
32
  get_my_fee_tier: string;
33
+ get_pulse: string;
33
34
  get_my_trader_code: string;
34
35
  get_rewards_balance: string;
35
36
  get_trader_code_info: string;
@@ -64,6 +65,7 @@ export declare const COVERED: {
64
65
  get_withdrawal: string;
65
66
  initiate_withdrawal: string;
66
67
  list_pending_withdrawals: string;
68
+ list_all_funding_history: string;
67
69
  list_application_balances: string;
68
70
  list_application_movements: string;
69
71
  list_application_orders: string;
package/dist/coverage.js CHANGED
@@ -30,6 +30,7 @@ export const COVERED = {
30
30
  get_market_metadata: "getMarketMetadata",
31
31
  get_market_stats: "getMarketStats",
32
32
  get_my_fee_tier: "getMyFeeTier",
33
+ get_pulse: "pulse.getPulse",
33
34
  get_my_trader_code: "pitpass.getMyTraderCode",
34
35
  get_rewards_balance: "pitpass.getRewardsBalance",
35
36
  get_trader_code_info: "pitpass.getTraderCodeInfo",
@@ -64,6 +65,7 @@ export const COVERED = {
64
65
  get_withdrawal: "getWithdrawal",
65
66
  initiate_withdrawal: "initiateWithdrawal",
66
67
  list_pending_withdrawals: "listPendingWithdrawals",
68
+ list_all_funding_history: "listAllFundingHistory",
67
69
  list_application_balances: "listApplicationBalances",
68
70
  list_application_movements: "listApplicationMovements",
69
71
  list_application_orders: "listApplicationOrders",
@@ -23,10 +23,10 @@ const DEFAULT_API_URLS = {
23
23
  const DEFAULT_WS_URLS = {
24
24
  local: "ws://localhost:8085/ws",
25
25
  // Dedicated WebSocket ingress (NLB behind Cloudflare). The previous
26
- // ALB path (wss://develop.apimonaco.xyz/ws) keeps working during the
27
- // migration window.
26
+ // ALB paths (wss://develop.apimonaco.xyz/ws, wss://staging.apimonaco.xyz/ws)
27
+ // keep working during the migration window.
28
28
  development: "wss://ws-develop.apimonaco.xyz/ws",
29
- staging: "wss://staging.apimonaco.xyz/ws",
29
+ staging: "wss://ws-staging.apimonaco.xyz/ws",
30
30
  mainnet: "wss://api.monaco.xyz/ws",
31
31
  };
32
32
  /**
package/dist/sdk.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { ApplicationsAPI, AuthAPI, AuthState, DelegatedAgentsAPI, FaucetAPI, FeesAPI, MarginAccountsAPI, MarketAPI, MonacoSDK, Network, PitpassAPI, PortfolioAPI, PositionsAPI, ProfileAPI, SDKConfig, SubAccountsAPI, TradingAPI, VaultAPI, WhitelistAPI, WithdrawalsAPI } from "@0xmonaco/types";
1
+ import type { ApplicationsAPI, AuthAPI, AuthState, DelegatedAgentsAPI, FaucetAPI, FeesAPI, MarginAccountsAPI, MarketAPI, MonacoSDK, Network, PitpassAPI, PortfolioAPI, PositionsAPI, ProfileAPI, PulseAPI, SDKConfig, SubAccountsAPI, TradingAPI, VaultAPI, WhitelistAPI, WithdrawalsAPI } from "@0xmonaco/types";
2
2
  import { type Address, type PublicClient, type TransactionReceipt, type WalletClient } from "viem";
3
3
  import { type MonacoWebSocket, OrderbookAPIImpl, TradesAPIImpl } from "./api";
4
4
  export declare class MonacoSDKImpl implements MonacoSDK {
@@ -18,6 +18,7 @@ export declare class MonacoSDKImpl implements MonacoSDK {
18
18
  faucet: FaucetAPI;
19
19
  whitelist: WhitelistAPI;
20
20
  profile: ProfileAPI;
21
+ pulse: PulseAPI;
21
22
  orderbook: OrderbookAPIImpl;
22
23
  trades: TradesAPIImpl;
23
24
  ws: MonacoWebSocket;
package/dist/sdk.js CHANGED
@@ -12,6 +12,7 @@ import { PitpassAPIImpl } from "./api/pitpass";
12
12
  import { PortfolioAPIImpl } from "./api/portfolio";
13
13
  import { PositionsAPIImpl } from "./api/positions";
14
14
  import { ProfileAPIImpl } from "./api/profile";
15
+ import { PulseAPIImpl } from "./api/pulse";
15
16
  import { SubAccountsAPIImpl } from "./api/sub-accounts";
16
17
  import { TradingAPIImpl } from "./api/trading";
17
18
  import { VaultAPIImpl } from "./api/vault";
@@ -54,6 +55,7 @@ export class MonacoSDKImpl {
54
55
  faucet;
55
56
  whitelist;
56
57
  profile;
58
+ pulse;
57
59
  orderbook;
58
60
  trades;
59
61
  ws;
@@ -82,6 +84,7 @@ export class MonacoSDKImpl {
82
84
  this.subAccounts.setSessionKeypair(credentials);
83
85
  this.faucet.setSessionKeypair(credentials);
84
86
  this.whitelist.setSessionKeypair(credentials);
87
+ this.pulse.setSessionKeypair(credentials);
85
88
  this.profile.setSessionKeypair(credentials);
86
89
  this.orderbook.setSessionKeypair(credentials);
87
90
  this.trades.setSessionKeypair(credentials);
@@ -120,6 +123,7 @@ export class MonacoSDKImpl {
120
123
  this.subAccounts.setServerKey(serverKey);
121
124
  this.faucet.setServerKey(serverKey);
122
125
  this.whitelist.setServerKey(serverKey);
126
+ this.pulse.setServerKey(serverKey);
123
127
  this.profile.setServerKey(serverKey);
124
128
  this.orderbook.setServerKey(serverKey);
125
129
  this.trades.setServerKey(serverKey);
@@ -181,6 +185,7 @@ export class MonacoSDKImpl {
181
185
  this.subAccounts = new SubAccountsAPIImpl(apiUrl);
182
186
  this.faucet = new FaucetAPIImpl(apiUrl);
183
187
  this.whitelist = new WhitelistAPIImpl(apiUrl);
188
+ this.pulse = new PulseAPIImpl(apiUrl);
184
189
  this.auth = new AuthAPIImpl(this.walletClient, this.chain, apiUrl);
185
190
  this.delegatedAgents = new DelegatedAgentsAPIImpl(apiUrl);
186
191
  this.fees = new FeesAPIImpl(apiUrl);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xmonaco/core",
3
- "version": "1.0.28",
3
+ "version": "1.0.29",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -23,8 +23,8 @@
23
23
  "viem": "^2.45.2"
24
24
  },
25
25
  "dependencies": {
26
- "@0xmonaco/contracts": "1.0.28",
27
- "@0xmonaco/types": "1.0.28",
26
+ "@0xmonaco/contracts": "1.0.29",
27
+ "@0xmonaco/types": "1.0.29",
28
28
  "@noble/curves": "^1.9.1",
29
29
  "@noble/hashes": "^1.8.0",
30
30
  "http-status-codes": "^2.3.0"