@reyaxyz/api-sdk 0.141.3 → 0.141.4

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 CHANGED
@@ -6,5 +6,5 @@
6
6
 
7
7
  | Statements | Branches | Functions | Lines |
8
8
  | --------------------------- | ----------------------- | ------------------------- | ----------------- |
9
- | ![Statements](https://img.shields.io/badge/statements-1.3%25-red.svg?style=flat) | ![Branches](https://img.shields.io/badge/branches-6.81%25-red.svg?style=flat) | ![Functions](https://img.shields.io/badge/functions-0.5%25-red.svg?style=flat) | ![Lines](https://img.shields.io/badge/lines-1.31%25-red.svg?style=flat) |
9
+ | ![Statements](https://img.shields.io/badge/statements-1.3%25-red.svg?style=flat) | ![Branches](https://img.shields.io/badge/branches-6.81%25-red.svg?style=flat) | ![Functions](https://img.shields.io/badge/functions-0.5%25-red.svg?style=flat) | ![Lines](https://img.shields.io/badge/lines-1.3%25-red.svg?style=flat) |
10
10
 
@@ -83,6 +83,15 @@ var MarketsClient = /** @class */ (function (_super) {
83
83
  });
84
84
  });
85
85
  };
86
+ MarketsClient.prototype.getSpotMarkets = function () {
87
+ return __awaiter(this, void 0, void 0, function () {
88
+ var uri;
89
+ return __generator(this, function (_a) {
90
+ uri = '/api/spot-markets';
91
+ return [2 /*return*/, this.get(uri)];
92
+ });
93
+ });
94
+ };
86
95
  MarketsClient.prototype.getMarket = function (params) {
87
96
  return __awaiter(this, void 0, void 0, function () {
88
97
  var uri;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"/","sources":["clients/modules/markets/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,0CAIyB;AAEzB;IAA2C,iCAAU;IAArD;;IAgFA,CAAC;IA/EC;;;;;;;;;;;;;;;;OAgBG;IAEG,kCAAU,GAAhB;;;;gBACQ,GAAG,GAAG,cAAc,CAAC;gBAC3B,sBAAO,I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AAW,EAAE,MAAM,CAAC,OAAO,CAAC,WAAW;wBACvC,WAAW,EAAE,MAAM,CAAC,OAAO,CAAC,WAAW;qBACxC,CAAC,EAAC;;;KACJ;IACH,oBAAC;AAAD,CAAC,AAhFD,CAA2C,mBAAU,GAgFpD","sourcesContent":["import {\n GetCandlesParams,\n GetFundingRateChartDataParams,\n GetMarketParams,\n GetMarketResult,\n GetMarketsResult,\n GetMarketTradingHistoryParams,\n GetPoolPriceResult,\n GetTradingHistoryResult,\n MarketCandlesResponse,\n} from './types';\nimport {\n GetFundingRateChartDataResult,\n RestClient,\n GetInstantPoolPriceResult,\n} from '@reyaxyz/common';\n\nexport default class MarketsClient extends RestClient {\n /**\n * Asynchronously retrieves market data from the API.\n *\n * This method makes a request to the API to fetch data for markets. If a specific market is provided as a parameter,\n * it fetches data for that particular market; otherwise, it fetches data for all available markets.\n *\n * @returns {Promise<GetMarketsResult>} A promise that resolves to the response containing market data.\n * @memberof MarketsClient\n *\n * @example\n * // Fetch data for all markets\n * const allMarketsData = await market.getMarkets();\n *\n * @example\n * // Fetch data for a specific market\n * const specificMarketData = await market.getMarkets('ETH-USDC');\n */\n\n async getMarkets(): Promise<GetMarketsResult> {\n const uri = '/api/markets';\n return this.get(uri);\n }\n\n async getMarket(params: GetMarketParams): Promise<GetMarketResult> {\n const uri = `/api/markets/${params.id}`;\n return this.get(uri);\n }\n\n async getPoolPrice(params: GetMarketParams): Promise<GetPoolPriceResult> {\n const uri = `/api/markets/${params.id}/pool-price/`;\n const poolPriceInfo: GetInstantPoolPriceResult = await this.get(uri);\n return { price: poolPriceInfo.poolPrice };\n }\n\n /**\n * Retrieves candlestick data for a specified market.\n *\n * This method fetches historical candlestick (or OHLC - Open, High, Low, Close) data for a given market.\n * The data can be filtered by time range (fromISO and toISO) and resolution.\n *\n * @param {GetCandlesParams} params\n * @returns {Promise<MarketCandlesResponse>} A promise that resolves to the market candlestick data.\n * @memberof MarketsClient\n *\n * @example\n * const marketCandles = await market.getMarketCandles('BTC-USD', '1HR', '2023-01-01T00:00:00Z', '2023-01-02T00:00:00Z');\n */\n\n async getMarketCandles(\n params: GetCandlesParams,\n ): Promise<MarketCandlesResponse> {\n const uri = `/api/markets/candles/${params.marketId}`;\n return this.get(uri, {\n resolution: params.resolution,\n fromISO: params.fromISO,\n toISO: params.toISO,\n limit: params.limit,\n });\n }\n\n async getMarketTradingHistory(\n params: GetMarketTradingHistoryParams,\n ): Promise<GetTradingHistoryResult> {\n const uri = `/api/trades/${params.marketId}`;\n return this.get(uri, {\n limit: params.limit,\n fromTimestampMillisecondsUTC: params.fromTimestampMillisecondsUTC,\n });\n }\n\n async getFundingRateChartData(\n params: GetFundingRateChartDataParams,\n ): Promise<GetFundingRateChartDataResult> {\n const uri = `/api/markets/${params.marketId}/funding-rate-history`;\n return this.get(uri, {\n timeframeMs: params.filters.timeframeMs,\n granularity: params.filters.granularity,\n });\n }\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"/","sources":["clients/modules/markets/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,0CAIyB;AAEzB;IAA2C,iCAAU;IAArD;;IAqFA,CAAC;IApFC;;;;;;;;;;;;;;;;OAgBG;IAEG,kCAAU,GAAhB;;;;gBACQ,GAAG,GAAG,cAAc,CAAC;gBAC3B,sBAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAC;;;KACtB;IAEK,sCAAc,GAApB;;;;gBACQ,GAAG,GAAG,mBAAmB,CAAC;gBAChC,sBAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAC;;;KACtB;IAEK,iCAAS,GAAf,UAAgB,MAAuB;;;;gBAC/B,GAAG,GAAG,uBAAgB,MAAM,CAAC,EAAE,CAAE,CAAC;gBACxC,sBAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAC;;;KACtB;IAEK,oCAAY,GAAlB,UAAmB,MAAuB;;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ketsResult,\n GetMarketTradingHistoryParams,\n GetPoolPriceResult,\n GetSpotMarketsResult,\n GetTradingHistoryResult,\n MarketCandlesResponse,\n} from './types';\nimport {\n GetFundingRateChartDataResult,\n RestClient,\n GetInstantPoolPriceResult,\n} from '@reyaxyz/common';\n\nexport default class MarketsClient extends RestClient {\n /**\n * Asynchronously retrieves market data from the API.\n *\n * This method makes a request to the API to fetch data for markets. If a specific market is provided as a parameter,\n * it fetches data for that particular market; otherwise, it fetches data for all available markets.\n *\n * @returns {Promise<GetMarketsResult>} A promise that resolves to the response containing market data.\n * @memberof MarketsClient\n *\n * @example\n * // Fetch data for all markets\n * const allMarketsData = await market.getMarkets();\n *\n * @example\n * // Fetch data for a specific market\n * const specificMarketData = await market.getMarkets('ETH-USDC');\n */\n\n async getMarkets(): Promise<GetMarketsResult> {\n const uri = '/api/markets';\n return this.get(uri);\n }\n\n async getSpotMarkets(): Promise<GetSpotMarketsResult> {\n const uri = '/api/spot-markets';\n return this.get(uri);\n }\n\n async getMarket(params: GetMarketParams): Promise<GetMarketResult> {\n const uri = `/api/markets/${params.id}`;\n return this.get(uri);\n }\n\n async getPoolPrice(params: GetMarketParams): Promise<GetPoolPriceResult> {\n const uri = `/api/markets/${params.id}/pool-price/`;\n const poolPriceInfo: GetInstantPoolPriceResult = await this.get(uri);\n return { price: poolPriceInfo.poolPrice };\n }\n\n /**\n * Retrieves candlestick data for a specified market.\n *\n * This method fetches historical candlestick (or OHLC - Open, High, Low, Close) data for a given market.\n * The data can be filtered by time range (fromISO and toISO) and resolution.\n *\n * @param {GetCandlesParams} params\n * @returns {Promise<MarketCandlesResponse>} A promise that resolves to the market candlestick data.\n * @memberof MarketsClient\n *\n * @example\n * const marketCandles = await market.getMarketCandles('BTC-USD', '1HR', '2023-01-01T00:00:00Z', '2023-01-02T00:00:00Z');\n */\n\n async getMarketCandles(\n params: GetCandlesParams,\n ): Promise<MarketCandlesResponse> {\n const uri = `/api/markets/candles/${params.marketId}`;\n return this.get(uri, {\n resolution: params.resolution,\n fromISO: params.fromISO,\n toISO: params.toISO,\n limit: params.limit,\n });\n }\n\n async getMarketTradingHistory(\n params: GetMarketTradingHistoryParams,\n ): Promise<GetTradingHistoryResult> {\n const uri = `/api/trades/${params.marketId}`;\n return this.get(uri, {\n limit: params.limit,\n fromTimestampMillisecondsUTC: params.fromTimestampMillisecondsUTC,\n });\n }\n\n async getFundingRateChartData(\n params: GetFundingRateChartDataParams,\n ): Promise<GetFundingRateChartDataResult> {\n const uri = `/api/markets/${params.marketId}/funding-rate-history`;\n return this.get(uri, {\n timeframeMs: params.filters.timeframeMs,\n granularity: params.filters.granularity,\n });\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"/","sources":["clients/modules/markets/types.ts"],"names":[],"mappings":"","sourcesContent":["import {\n CandlesResolution,\n MarketEntity,\n TradingHistoryEntity,\n Candle,\n} from '@reyaxyz/common';\nimport { FundingRateHistoryGranularity } from '@reyaxyz/common';\n\nexport type GetMarketsResult = MarketEntity[];\n\nexport type GetMarketResult = MarketEntity;\n\nexport type GetMarketParams = {\n id: MarketEntity['id'];\n};\n\nexport type GetPoolPriceParams = {\n id: MarketEntity['id'];\n};\n\nexport type GetCandlesParams = {\n marketId: MarketEntity['id'];\n resolution: CandlesResolution;\n fromISO?: string | null;\n toISO?: string | null;\n limit?: number | null;\n};\n\nexport type GetMarketTradingHistoryParams = {\n marketId: number;\n limit?: number;\n fromTimestampMillisecondsUTC?: number;\n};\nexport type GetTradingHistoryResult = TradingHistoryEntity[];\n\nexport interface MarketCandlesResponse {\n candles: Candle[];\n}\n\nexport type GetFundingRateChartDataParams = {\n marketId: MarketEntity['id'];\n filters: {\n timeframeMs: number;\n granularity: FundingRateHistoryGranularity;\n };\n};\n\nexport type GetPoolPriceResult = {\n price: number;\n};\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"/","sources":["clients/modules/markets/types.ts"],"names":[],"mappings":"","sourcesContent":["import {\n CandlesResolution,\n MarketEntity,\n TradingHistoryEntity,\n Candle,\n SpotMarketEntity,\n} from '@reyaxyz/common';\nimport { FundingRateHistoryGranularity } from '@reyaxyz/common';\n\nexport type GetMarketsResult = MarketEntity[];\nexport type GetSpotMarketsResult = SpotMarketEntity[];\n\nexport type GetMarketResult = MarketEntity;\n\nexport type GetMarketParams = {\n id: MarketEntity['id'];\n};\n\nexport type GetPoolPriceParams = {\n id: MarketEntity['id'];\n};\n\nexport type GetCandlesParams = {\n marketId: MarketEntity['id'];\n resolution: CandlesResolution;\n fromISO?: string | null;\n toISO?: string | null;\n limit?: number | null;\n};\n\nexport type GetMarketTradingHistoryParams = {\n marketId: number;\n limit?: number;\n fromTimestampMillisecondsUTC?: number;\n};\nexport type GetTradingHistoryResult = TradingHistoryEntity[];\n\nexport interface MarketCandlesResponse {\n candles: Candle[];\n}\n\nexport type GetFundingRateChartDataParams = {\n marketId: MarketEntity['id'];\n filters: {\n timeframeMs: number;\n granularity: FundingRateHistoryGranularity;\n };\n};\n\nexport type GetPoolPriceResult = {\n price: number;\n};\n"]}
@@ -1,4 +1,4 @@
1
- import { GetCandlesParams, GetFundingRateChartDataParams, GetMarketParams, GetMarketResult, GetMarketsResult, GetMarketTradingHistoryParams, GetPoolPriceResult, GetTradingHistoryResult, MarketCandlesResponse } from './types';
1
+ import { GetCandlesParams, GetFundingRateChartDataParams, GetMarketParams, GetMarketResult, GetMarketsResult, GetMarketTradingHistoryParams, GetPoolPriceResult, GetSpotMarketsResult, GetTradingHistoryResult, MarketCandlesResponse } from './types';
2
2
  import { GetFundingRateChartDataResult, RestClient } from '@reyaxyz/common';
3
3
  export default class MarketsClient extends RestClient {
4
4
  /**
@@ -19,6 +19,7 @@ export default class MarketsClient extends RestClient {
19
19
  * const specificMarketData = await market.getMarkets('ETH-USDC');
20
20
  */
21
21
  getMarkets(): Promise<GetMarketsResult>;
22
+ getSpotMarkets(): Promise<GetSpotMarketsResult>;
22
23
  getMarket(params: GetMarketParams): Promise<GetMarketResult>;
23
24
  getPoolPrice(params: GetMarketParams): Promise<GetPoolPriceResult>;
24
25
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["clients/modules/markets/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,6BAA6B,EAC7B,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,6BAA6B,EAC7B,kBAAkB,EAClB,uBAAuB,EACvB,qBAAqB,EACtB,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,6BAA6B,EAC7B,UAAU,EAEX,MAAM,iBAAiB,CAAC;AAEzB,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,UAAU;IACnD;;;;;;;;;;;;;;;;OAgBG;IAEG,UAAU,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAKvC,SAAS,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC;IAK5D,YAAY,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAMxE;;;;;;;;;;;;OAYG;IAEG,gBAAgB,CACpB,MAAM,EAAE,gBAAgB,GACvB,OAAO,CAAC,qBAAqB,CAAC;IAU3B,uBAAuB,CAC3B,MAAM,EAAE,6BAA6B,GACpC,OAAO,CAAC,uBAAuB,CAAC;IAQ7B,uBAAuB,CAC3B,MAAM,EAAE,6BAA6B,GACpC,OAAO,CAAC,6BAA6B,CAAC;CAO1C"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["clients/modules/markets/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,6BAA6B,EAC7B,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,6BAA6B,EAC7B,kBAAkB,EAClB,oBAAoB,EACpB,uBAAuB,EACvB,qBAAqB,EACtB,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,6BAA6B,EAC7B,UAAU,EAEX,MAAM,iBAAiB,CAAC;AAEzB,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,UAAU;IACnD;;;;;;;;;;;;;;;;OAgBG;IAEG,UAAU,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAKvC,cAAc,IAAI,OAAO,CAAC,oBAAoB,CAAC;IAK/C,SAAS,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC;IAK5D,YAAY,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAMxE;;;;;;;;;;;;OAYG;IAEG,gBAAgB,CACpB,MAAM,EAAE,gBAAgB,GACvB,OAAO,CAAC,qBAAqB,CAAC;IAU3B,uBAAuB,CAC3B,MAAM,EAAE,6BAA6B,GACpC,OAAO,CAAC,uBAAuB,CAAC;IAQ7B,uBAAuB,CAC3B,MAAM,EAAE,6BAA6B,GACpC,OAAO,CAAC,6BAA6B,CAAC;CAO1C"}
@@ -1,6 +1,7 @@
1
- import { CandlesResolution, MarketEntity, TradingHistoryEntity, Candle } from '@reyaxyz/common';
1
+ import { CandlesResolution, MarketEntity, TradingHistoryEntity, Candle, SpotMarketEntity } from '@reyaxyz/common';
2
2
  import { FundingRateHistoryGranularity } from '@reyaxyz/common';
3
3
  export type GetMarketsResult = MarketEntity[];
4
+ export type GetSpotMarketsResult = SpotMarketEntity[];
4
5
  export type GetMarketResult = MarketEntity;
5
6
  export type GetMarketParams = {
6
7
  id: MarketEntity['id'];
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"/","sources":["clients/modules/markets/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,oBAAoB,EACpB,MAAM,EACP,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,6BAA6B,EAAE,MAAM,iBAAiB,CAAC;AAEhE,MAAM,MAAM,gBAAgB,GAAG,YAAY,EAAE,CAAC;AAE9C,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC;AAE3C,MAAM,MAAM,eAAe,GAAG;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5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -33,7 +33,7 @@
33
33
  "generate:coverage-badges": "npx istanbul-badges-readme --silent"
34
34
  },
35
35
  "dependencies": {
36
- "@reyaxyz/common": "0.224.0",
36
+ "@reyaxyz/common": "0.224.1",
37
37
  "@simplewebauthn/types": "^10.0.0",
38
38
  "axios": "^1.6.2",
39
39
  "bignumber.js": "^9.1.2",
@@ -42,7 +42,7 @@
42
42
  "ws": "^8.16.0"
43
43
  },
44
44
  "packageManager": "pnpm@8.3.1",
45
- "gitHead": "63595962ebfb942911e5e684917b2ec37cfc6670",
45
+ "gitHead": "af4b4920ab976f128096743c8066e6301612485e",
46
46
  "devDependencies": {
47
47
  "@types/ws": "8.5.10"
48
48
  }
@@ -6,6 +6,7 @@ import {
6
6
  GetMarketsResult,
7
7
  GetMarketTradingHistoryParams,
8
8
  GetPoolPriceResult,
9
+ GetSpotMarketsResult,
9
10
  GetTradingHistoryResult,
10
11
  MarketCandlesResponse,
11
12
  } from './types';
@@ -39,6 +40,11 @@ export default class MarketsClient extends RestClient {
39
40
  return this.get(uri);
40
41
  }
41
42
 
43
+ async getSpotMarkets(): Promise<GetSpotMarketsResult> {
44
+ const uri = '/api/spot-markets';
45
+ return this.get(uri);
46
+ }
47
+
42
48
  async getMarket(params: GetMarketParams): Promise<GetMarketResult> {
43
49
  const uri = `/api/markets/${params.id}`;
44
50
  return this.get(uri);
@@ -3,10 +3,12 @@ import {
3
3
  MarketEntity,
4
4
  TradingHistoryEntity,
5
5
  Candle,
6
+ SpotMarketEntity,
6
7
  } from '@reyaxyz/common';
7
8
  import { FundingRateHistoryGranularity } from '@reyaxyz/common';
8
9
 
9
10
  export type GetMarketsResult = MarketEntity[];
11
+ export type GetSpotMarketsResult = SpotMarketEntity[];
10
12
 
11
13
  export type GetMarketResult = MarketEntity;
12
14