@binance/alpha 1.0.14 → 1.0.15

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/index.js CHANGED
@@ -14,7 +14,7 @@ let __binance_common = require("@binance/common");
14
14
 
15
15
  //#region package.json
16
16
  var name = "@binance/alpha";
17
- var version = "1.0.14";
17
+ var version = "1.0.15";
18
18
 
19
19
  //#endregion
20
20
  //#region src/rest-api/modules/market-data-api.ts
@@ -39,6 +39,7 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
39
39
  (0, __binance_common.assertParamExists)("aggregatedTrades", "symbol", symbol);
40
40
  const localVarQueryParameter = {};
41
41
  const localVarBodyParameter = {};
42
+ const localVarHeaderParameter = {};
42
43
  if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
43
44
  if (fromId !== void 0 && fromId !== null) localVarQueryParameter["fromId"] = fromId;
44
45
  if (startTime !== void 0 && startTime !== null) localVarQueryParameter["startTime"] = startTime;
@@ -51,12 +52,14 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
51
52
  method: "GET",
52
53
  queryParams: localVarQueryParameter,
53
54
  bodyParams: localVarBodyParameter,
55
+ headerParams: localVarHeaderParameter,
54
56
  timeUnit: _timeUnit
55
57
  };
56
58
  },
57
59
  getExchangeInfo: async () => {
58
60
  const localVarQueryParameter = {};
59
61
  const localVarBodyParameter = {};
62
+ const localVarHeaderParameter = {};
60
63
  let _timeUnit;
61
64
  if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
62
65
  return {
@@ -64,6 +67,7 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
64
67
  method: "GET",
65
68
  queryParams: localVarQueryParameter,
66
69
  bodyParams: localVarBodyParameter,
70
+ headerParams: localVarHeaderParameter,
67
71
  timeUnit: _timeUnit
68
72
  };
69
73
  },
@@ -72,6 +76,7 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
72
76
  (0, __binance_common.assertParamExists)("klines", "interval", interval);
73
77
  const localVarQueryParameter = {};
74
78
  const localVarBodyParameter = {};
79
+ const localVarHeaderParameter = {};
75
80
  if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
76
81
  if (interval !== void 0 && interval !== null) localVarQueryParameter["interval"] = interval;
77
82
  if (limit !== void 0 && limit !== null) localVarQueryParameter["limit"] = limit;
@@ -84,6 +89,7 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
84
89
  method: "GET",
85
90
  queryParams: localVarQueryParameter,
86
91
  bodyParams: localVarBodyParameter,
92
+ headerParams: localVarHeaderParameter,
87
93
  timeUnit: _timeUnit
88
94
  };
89
95
  },
@@ -91,6 +97,7 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
91
97
  (0, __binance_common.assertParamExists)("ticker", "symbol", symbol);
92
98
  const localVarQueryParameter = {};
93
99
  const localVarBodyParameter = {};
100
+ const localVarHeaderParameter = {};
94
101
  if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
95
102
  let _timeUnit;
96
103
  if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
@@ -99,12 +106,14 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
99
106
  method: "GET",
100
107
  queryParams: localVarQueryParameter,
101
108
  bodyParams: localVarBodyParameter,
109
+ headerParams: localVarHeaderParameter,
102
110
  timeUnit: _timeUnit
103
111
  };
104
112
  },
105
113
  tokenList: async () => {
106
114
  const localVarQueryParameter = {};
107
115
  const localVarBodyParameter = {};
116
+ const localVarHeaderParameter = {};
108
117
  let _timeUnit;
109
118
  if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
110
119
  return {
@@ -112,6 +121,7 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
112
121
  method: "GET",
113
122
  queryParams: localVarQueryParameter,
114
123
  bodyParams: localVarBodyParameter,
124
+ headerParams: localVarHeaderParameter,
115
125
  timeUnit: _timeUnit
116
126
  };
117
127
  }
@@ -140,7 +150,7 @@ var MarketDataApi = class {
140
150
  */
141
151
  async aggregatedTrades(requestParameters) {
142
152
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.aggregatedTrades(requestParameters?.symbol, requestParameters?.fromId, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.limit);
143
- return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
153
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
144
154
  }
145
155
  /**
146
156
  * Fetches general exchange information, such as supported symbols, rate limits, and server time.
@@ -155,7 +165,7 @@ var MarketDataApi = class {
155
165
  */
156
166
  async getExchangeInfo() {
157
167
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.getExchangeInfo();
158
- return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
168
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
159
169
  }
160
170
  /**
161
171
  * Fetches Kline/candlestick bars for a symbol, which include open/high/low/close prices and volume over intervals. Useful for charting and analysis.
@@ -171,7 +181,7 @@ var MarketDataApi = class {
171
181
  */
172
182
  async klines(requestParameters) {
173
183
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.klines(requestParameters?.symbol, requestParameters?.interval, requestParameters?.limit, requestParameters?.startTime, requestParameters?.endTime);
174
- return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
184
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
175
185
  }
176
186
  /**
177
187
  * Gets the 24-hour rolling window price change statistics for a symbol, including volume and price changes.
@@ -187,7 +197,7 @@ var MarketDataApi = class {
187
197
  */
188
198
  async ticker(requestParameters) {
189
199
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.ticker(requestParameters?.symbol);
190
- return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
200
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
191
201
  }
192
202
  /**
193
203
  * Retrieves a list of all available ALPHA tokens, including their IDs and symbols. Use this to find the token ID for constructing symbols in other endpoints.
@@ -202,7 +212,7 @@ var MarketDataApi = class {
202
212
  */
203
213
  async tokenList() {
204
214
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.tokenList();
205
- return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
215
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
206
216
  }
207
217
  };
208
218
 
@@ -235,7 +245,7 @@ var RestAPI = class {
235
245
  * @returns A promise resolving to the response data object.
236
246
  */
237
247
  sendRequest(endpoint, method, queryParams = {}, bodyParams = {}) {
238
- return (0, __binance_common.sendRequest)(this.configuration, endpoint, method, queryParams, bodyParams, void 0);
248
+ return (0, __binance_common.sendRequest)(this.configuration, endpoint, method, queryParams, bodyParams, void 0, void 0);
239
249
  }
240
250
  /**
241
251
  * Generic function to send a signed request.
@@ -247,7 +257,7 @@ var RestAPI = class {
247
257
  * @returns A promise resolving to the response data object.
248
258
  */
249
259
  sendSignedRequest(endpoint, method, queryParams = {}, bodyParams = {}) {
250
- return (0, __binance_common.sendRequest)(this.configuration, endpoint, method, queryParams, bodyParams, void 0, { isSigned: true });
260
+ return (0, __binance_common.sendRequest)(this.configuration, endpoint, method, queryParams, bodyParams, void 0, void 0, { isSigned: true });
251
261
  }
252
262
  /**
253
263
  * Retrieves compressed, aggregated historical trades for a specific symbol. Useful for recent trade history.
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","ConfigurationRestAPI","ALPHA_REST_API_PROD_URL"],"sources":["../package.json","../src/rest-api/modules/market-data-api.ts","../src/rest-api/rest-api.ts","../src/rest-api/index.ts","../src/alpha.ts"],"sourcesContent":["{\n \"name\": \"@binance/alpha\",\n \"description\": \"Official Binance Alpha Connector - A lightweight library that provides a convenient interface to Binance's Alpha REST API.\",\n \"version\": \"1.0.14\",\n \"main\": \"./dist/index.js\",\n \"module\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"require\": \"./dist/index.js\",\n \"import\": \"./dist/index.mjs\"\n }\n },\n \"scripts\": {\n \"prepublishOnly\": \"npm run build\",\n \"build\": \"npm run clean && tsdown\",\n \"typecheck\": \"tsc --noEmit\",\n \"clean\": \"rm -rf dist\",\n \"test\": \"npx jest --maxWorkers=4 --bail\",\n \"test:watch\": \"npx jest --watch\",\n \"format\": \"npx prettier --ignore-path .prettierignore --write .\",\n \"lint\": \"npx eslint '**/*.ts' --fix\"\n },\n \"keywords\": [\n \"Binance\",\n \"API\",\n \"Alpha\",\n \"Connector\",\n \"REST\",\n \"Trading\"\n ],\n \"author\": \"Binance\",\n \"license\": \"MIT\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/binance/binance-connector-js.git\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/binance/binance-connector-js/issues\"\n },\n \"homepage\": \"https://github.com/binance/binance-connector-js#readme\",\n \"files\": [\n \"dist\"\n ],\n \"devDependencies\": {\n \"@types/jest\": \"^29.5.4\",\n \"@types/node\": \"^20.17.24\",\n \"eslint\": \"8.57.0\",\n \"jest\": \"^29.6.4\",\n \"json-with-bigint\": \"^3.4.4\",\n \"prettier\": \"^3.3.3\",\n \"ts-jest\": \"^29.1.1\",\n \"ts-node\": \"^10.9.1\",\n \"tsdown\": \"^0.16.5\",\n \"typescript\": \"^5.7.2\",\n \"typescript-eslint\": \"^8.24.0\"\n },\n \"dependencies\": {\n \"@binance/common\": \"2.3.14\",\n \"axios\": \"^1.7.4\"\n }\n}\n","/**\n * Binance Alpha REST API\n *\n * OpenAPI Specification for the Binance Alpha REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport {\n ConfigurationRestAPI,\n TimeUnit,\n RestApiResponse,\n assertParamExists,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type {\n AggregatedTradesResponse,\n GetExchangeInfoResponse,\n KlinesResponse,\n TickerResponse,\n TokenListResponse,\n} from '../types';\n\n/**\n * MarketDataApi - axios parameter creator\n */\nconst MarketDataApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Retrieves compressed, aggregated historical trades for a specific symbol. Useful for recent trade history.\n *\n * Weight: 0\n *\n * @summary Aggregated Trades\n * @param {string} symbol e.g., \"ALPHA_175USDT\" – use token ID from Token List\n * @param {number | bigint} [fromId] starting trade ID to fetch from\n * @param {number | bigint} [startTime] start timestamp (milliseconds)\n * @param {number | bigint} [endTime] end timestamp (milliseconds)\n * @param {number | bigint} [limit] number of results to return (default 500, max 1000)\n *\n * @throws {RequiredError}\n */\n aggregatedTrades: async (\n symbol: string,\n fromId?: number | bigint,\n startTime?: number | bigint,\n endTime?: number | bigint,\n limit?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'symbol' is not null or undefined\n assertParamExists('aggregatedTrades', 'symbol', symbol);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (symbol !== undefined && symbol !== null) {\n localVarQueryParameter['symbol'] = symbol;\n }\n if (fromId !== undefined && fromId !== null) {\n localVarQueryParameter['fromId'] = fromId;\n }\n if (startTime !== undefined && startTime !== null) {\n localVarQueryParameter['startTime'] = startTime;\n }\n if (endTime !== undefined && endTime !== null) {\n localVarQueryParameter['endTime'] = endTime;\n }\n if (limit !== undefined && limit !== null) {\n localVarQueryParameter['limit'] = limit;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/bapi/defi/v1/public/alpha-trade/agg-trades',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Fetches general exchange information, such as supported symbols, rate limits, and server time.\n *\n * Weight: 0\n *\n * @summary Get Exchange Info\n *\n * @throws {RequiredError}\n */\n getExchangeInfo: async (): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/bapi/defi/v1/public/alpha-trade/get-exchange-info',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Fetches Kline/candlestick bars for a symbol, which include open/high/low/close prices and volume over intervals. Useful for charting and analysis.\n *\n * Weight: 0\n *\n * @summary Klines (Candlestick Data)\n * @param {string} symbol e.g., \"ALPHA_175USDT\" – use token ID from Token List\n * @param {string} interval e.g., \"1h\" – supported intervals: 1s, 15s, 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M\n * @param {number | bigint} [limit] number of results to return (default 500, max 1000)\n * @param {number | bigint} [startTime] start timestamp (milliseconds)\n * @param {number | bigint} [endTime] end timestamp (milliseconds)\n *\n * @throws {RequiredError}\n */\n klines: async (\n symbol: string,\n interval: string,\n limit?: number | bigint,\n startTime?: number | bigint,\n endTime?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'symbol' is not null or undefined\n assertParamExists('klines', 'symbol', symbol);\n // verify required parameter 'interval' is not null or undefined\n assertParamExists('klines', 'interval', interval);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (symbol !== undefined && symbol !== null) {\n localVarQueryParameter['symbol'] = symbol;\n }\n if (interval !== undefined && interval !== null) {\n localVarQueryParameter['interval'] = interval;\n }\n if (limit !== undefined && limit !== null) {\n localVarQueryParameter['limit'] = limit;\n }\n if (startTime !== undefined && startTime !== null) {\n localVarQueryParameter['startTime'] = startTime;\n }\n if (endTime !== undefined && endTime !== null) {\n localVarQueryParameter['endTime'] = endTime;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/bapi/defi/v1/public/alpha-trade/klines',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Gets the 24-hour rolling window price change statistics for a symbol, including volume and price changes.\n *\n * Weight: 0\n *\n * @summary Ticker (24hr Price Statistics)\n * @param {string} symbol e.g., \"ALPHA_175USDT\" – use token ID from Token List\n *\n * @throws {RequiredError}\n */\n ticker: async (symbol: string): Promise<RequestArgs> => {\n // verify required parameter 'symbol' is not null or undefined\n assertParamExists('ticker', 'symbol', symbol);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (symbol !== undefined && symbol !== null) {\n localVarQueryParameter['symbol'] = symbol;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/bapi/defi/v1/public/alpha-trade/ticker',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Retrieves a list of all available ALPHA tokens, including their IDs and symbols. Use this to find the token ID for constructing symbols in other endpoints.\n *\n * Weight: 0\n *\n * @summary Token List\n *\n * @throws {RequiredError}\n */\n tokenList: async (): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/bapi/defi/v1/public/wallet-direct/buw/wallet/cex/alpha/all/token/list',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * MarketDataApi - interface\n * @interface MarketDataApi\n */\nexport interface MarketDataApiInterface {\n /**\n * Retrieves compressed, aggregated historical trades for a specific symbol. Useful for recent trade history.\n *\n * Weight: 0\n *\n * @summary Aggregated Trades\n * @param {AggregatedTradesRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n aggregatedTrades(\n requestParameters: AggregatedTradesRequest\n ): Promise<RestApiResponse<AggregatedTradesResponse>>;\n /**\n * Fetches general exchange information, such as supported symbols, rate limits, and server time.\n *\n * Weight: 0\n *\n * @summary Get Exchange Info\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n getExchangeInfo(): Promise<RestApiResponse<GetExchangeInfoResponse>>;\n /**\n * Fetches Kline/candlestick bars for a symbol, which include open/high/low/close prices and volume over intervals. Useful for charting and analysis.\n *\n * Weight: 0\n *\n * @summary Klines (Candlestick Data)\n * @param {KlinesRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n klines(requestParameters: KlinesRequest): Promise<RestApiResponse<KlinesResponse>>;\n /**\n * Gets the 24-hour rolling window price change statistics for a symbol, including volume and price changes.\n *\n * Weight: 0\n *\n * @summary Ticker (24hr Price Statistics)\n * @param {TickerRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n ticker(requestParameters: TickerRequest): Promise<RestApiResponse<TickerResponse>>;\n /**\n * Retrieves a list of all available ALPHA tokens, including their IDs and symbols. Use this to find the token ID for constructing symbols in other endpoints.\n *\n * Weight: 0\n *\n * @summary Token List\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n tokenList(): Promise<RestApiResponse<TokenListResponse>>;\n}\n\n/**\n * Request parameters for aggregatedTrades operation in MarketDataApi.\n * @interface AggregatedTradesRequest\n */\nexport interface AggregatedTradesRequest {\n /**\n * e.g., \"ALPHA_175USDT\" – use token ID from Token List\n * @type {string}\n * @memberof MarketDataApiAggregatedTrades\n */\n readonly symbol: string;\n\n /**\n * starting trade ID to fetch from\n * @type {number | bigint}\n * @memberof MarketDataApiAggregatedTrades\n */\n readonly fromId?: number | bigint;\n\n /**\n * start timestamp (milliseconds)\n * @type {number | bigint}\n * @memberof MarketDataApiAggregatedTrades\n */\n readonly startTime?: number | bigint;\n\n /**\n * end timestamp (milliseconds)\n * @type {number | bigint}\n * @memberof MarketDataApiAggregatedTrades\n */\n readonly endTime?: number | bigint;\n\n /**\n * number of results to return (default 500, max 1000)\n * @type {number | bigint}\n * @memberof MarketDataApiAggregatedTrades\n */\n readonly limit?: number | bigint;\n}\n\n/**\n * Request parameters for klines operation in MarketDataApi.\n * @interface KlinesRequest\n */\nexport interface KlinesRequest {\n /**\n * e.g., \"ALPHA_175USDT\" – use token ID from Token List\n * @type {string}\n * @memberof MarketDataApiKlines\n */\n readonly symbol: string;\n\n /**\n * e.g., \"1h\" – supported intervals: 1s, 15s, 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M\n * @type {string}\n * @memberof MarketDataApiKlines\n */\n readonly interval: string;\n\n /**\n * number of results to return (default 500, max 1000)\n * @type {number | bigint}\n * @memberof MarketDataApiKlines\n */\n readonly limit?: number | bigint;\n\n /**\n * start timestamp (milliseconds)\n * @type {number | bigint}\n * @memberof MarketDataApiKlines\n */\n readonly startTime?: number | bigint;\n\n /**\n * end timestamp (milliseconds)\n * @type {number | bigint}\n * @memberof MarketDataApiKlines\n */\n readonly endTime?: number | bigint;\n}\n\n/**\n * Request parameters for ticker operation in MarketDataApi.\n * @interface TickerRequest\n */\nexport interface TickerRequest {\n /**\n * e.g., \"ALPHA_175USDT\" – use token ID from Token List\n * @type {string}\n * @memberof MarketDataApiTicker\n */\n readonly symbol: string;\n}\n\n/**\n * MarketDataApi - object-oriented interface\n * @class MarketDataApi\n */\nexport class MarketDataApi implements MarketDataApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = MarketDataApiAxiosParamCreator(configuration);\n }\n\n /**\n * Retrieves compressed, aggregated historical trades for a specific symbol. Useful for recent trade history.\n *\n * Weight: 0\n *\n * @summary Aggregated Trades\n * @param {AggregatedTradesRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<AggregatedTradesResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/alpha/market-data/rest-api/Aggregated-Trades Binance API Documentation}\n */\n public async aggregatedTrades(\n requestParameters: AggregatedTradesRequest\n ): Promise<RestApiResponse<AggregatedTradesResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.aggregatedTrades(\n requestParameters?.symbol,\n requestParameters?.fromId,\n requestParameters?.startTime,\n requestParameters?.endTime,\n requestParameters?.limit\n );\n return sendRequest<AggregatedTradesResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: false }\n );\n }\n\n /**\n * Fetches general exchange information, such as supported symbols, rate limits, and server time.\n *\n * Weight: 0\n *\n * @summary Get Exchange Info\n * @returns {Promise<RestApiResponse<GetExchangeInfoResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/alpha/market-data/rest-api/Get-Exchange-Info Binance API Documentation}\n */\n public async getExchangeInfo(): Promise<RestApiResponse<GetExchangeInfoResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getExchangeInfo();\n return sendRequest<GetExchangeInfoResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: false }\n );\n }\n\n /**\n * Fetches Kline/candlestick bars for a symbol, which include open/high/low/close prices and volume over intervals. Useful for charting and analysis.\n *\n * Weight: 0\n *\n * @summary Klines (Candlestick Data)\n * @param {KlinesRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<KlinesResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/alpha/market-data/rest-api/Klines Binance API Documentation}\n */\n public async klines(\n requestParameters: KlinesRequest\n ): Promise<RestApiResponse<KlinesResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.klines(\n requestParameters?.symbol,\n requestParameters?.interval,\n requestParameters?.limit,\n requestParameters?.startTime,\n requestParameters?.endTime\n );\n return sendRequest<KlinesResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: false }\n );\n }\n\n /**\n * Gets the 24-hour rolling window price change statistics for a symbol, including volume and price changes.\n *\n * Weight: 0\n *\n * @summary Ticker (24hr Price Statistics)\n * @param {TickerRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<TickerResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/alpha/market-data/rest-api/24hr-ticker-price-change Binance API Documentation}\n */\n public async ticker(\n requestParameters: TickerRequest\n ): Promise<RestApiResponse<TickerResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.ticker(\n requestParameters?.symbol\n );\n return sendRequest<TickerResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: false }\n );\n }\n\n /**\n * Retrieves a list of all available ALPHA tokens, including their IDs and symbols. Use this to find the token ID for constructing symbols in other endpoints.\n *\n * Weight: 0\n *\n * @summary Token List\n * @returns {Promise<RestApiResponse<TokenListResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/alpha/market-data/rest-api/Token-List Binance API Documentation}\n */\n public async tokenList(): Promise<RestApiResponse<TokenListResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.tokenList();\n return sendRequest<TokenListResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: false }\n );\n }\n}\n","/**\n * Binance Alpha REST API\n *\n * OpenAPI Specification for the Binance Alpha REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport { ConfigurationRestAPI, RestApiResponse, sendRequest } from '@binance/common';\nimport { MarketDataApi } from './modules/market-data-api';\n\nimport type {\n AggregatedTradesRequest,\n KlinesRequest,\n TickerRequest,\n} from './modules/market-data-api';\n\nimport type {\n AggregatedTradesResponse,\n GetExchangeInfoResponse,\n KlinesResponse,\n TickerResponse,\n TokenListResponse,\n} from './types';\n\nexport class RestAPI {\n private configuration: ConfigurationRestAPI;\n private marketDataApi: MarketDataApi;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.marketDataApi = new MarketDataApi(configuration);\n }\n\n /**\n * Generic function to send a request.\n * @param endpoint - The API endpoint to call.\n * @param method - HTTP method to use (GET, POST, DELETE, etc.).\n * @param queryParams - Query parameters for the request.\n * @param bodyParams - Body parameters for the request.\n *\n * @returns A promise resolving to the response data object.\n */\n sendRequest<T>(\n endpoint: string,\n method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',\n queryParams: Record<string, unknown> = {},\n bodyParams: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(\n this.configuration,\n endpoint,\n method,\n queryParams,\n bodyParams,\n undefined\n );\n }\n\n /**\n * Generic function to send a signed request.\n * @param endpoint - The API endpoint to call.\n * @param method - HTTP method to use (GET, POST, DELETE, etc.).\n * @param queryParams - Query parameters for the request.\n * @param bodyParams - Body parameters for the request.\n *\n * @returns A promise resolving to the response data object.\n */\n sendSignedRequest<T>(\n endpoint: string,\n method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',\n queryParams: Record<string, unknown> = {},\n bodyParams: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(\n this.configuration,\n endpoint,\n method,\n queryParams,\n bodyParams,\n undefined,\n { isSigned: true }\n );\n }\n\n /**\n * Retrieves compressed, aggregated historical trades for a specific symbol. Useful for recent trade history.\n *\n * Weight: 0\n *\n * @summary Aggregated Trades\n * @param {AggregatedTradesRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<AggregatedTradesResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/alpha/market-data/rest-api/Aggregated-Trades Binance API Documentation}\n */\n aggregatedTrades(\n requestParameters: AggregatedTradesRequest\n ): Promise<RestApiResponse<AggregatedTradesResponse>> {\n return this.marketDataApi.aggregatedTrades(requestParameters);\n }\n\n /**\n * Fetches general exchange information, such as supported symbols, rate limits, and server time.\n *\n * Weight: 0\n *\n * @summary Get Exchange Info\n *\n * @returns {Promise<RestApiResponse<GetExchangeInfoResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/alpha/market-data/rest-api/Get-Exchange-Info Binance API Documentation}\n */\n getExchangeInfo(): Promise<RestApiResponse<GetExchangeInfoResponse>> {\n return this.marketDataApi.getExchangeInfo();\n }\n\n /**\n * Fetches Kline/candlestick bars for a symbol, which include open/high/low/close prices and volume over intervals. Useful for charting and analysis.\n *\n * Weight: 0\n *\n * @summary Klines (Candlestick Data)\n * @param {KlinesRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<KlinesResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/alpha/market-data/rest-api/Klines Binance API Documentation}\n */\n klines(requestParameters: KlinesRequest): Promise<RestApiResponse<KlinesResponse>> {\n return this.marketDataApi.klines(requestParameters);\n }\n\n /**\n * Gets the 24-hour rolling window price change statistics for a symbol, including volume and price changes.\n *\n * Weight: 0\n *\n * @summary Ticker (24hr Price Statistics)\n * @param {TickerRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<TickerResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/alpha/market-data/rest-api/24hr-ticker-price-change Binance API Documentation}\n */\n ticker(requestParameters: TickerRequest): Promise<RestApiResponse<TickerResponse>> {\n return this.marketDataApi.ticker(requestParameters);\n }\n\n /**\n * Retrieves a list of all available ALPHA tokens, including their IDs and symbols. Use this to find the token ID for constructing symbols in other endpoints.\n *\n * Weight: 0\n *\n * @summary Token List\n *\n * @returns {Promise<RestApiResponse<TokenListResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/alpha/market-data/rest-api/Token-List Binance API Documentation}\n */\n tokenList(): Promise<RestApiResponse<TokenListResponse>> {\n return this.marketDataApi.tokenList();\n }\n}\n","/**\n * Binance Alpha REST API\n *\n * OpenAPI Specification for the Binance Alpha REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nexport * from './types';\nexport * from './modules';\nexport * from './rest-api';\n","import { buildUserAgent, ConfigurationRestAPI, ALPHA_REST_API_PROD_URL } from '@binance/common';\nimport { name, version } from '../package.json';\nimport { RestAPI } from './rest-api';\n\nexport interface ConfigurationAlpha {\n configurationRestAPI?: ConfigurationRestAPI;\n}\n\nexport class Alpha {\n public restAPI!: RestAPI;\n\n constructor(config: ConfigurationAlpha) {\n const userAgent = buildUserAgent(name, version);\n\n if (config?.configurationRestAPI) {\n const configRestAPI = new ConfigurationRestAPI(\n config.configurationRestAPI\n ) as ConfigurationRestAPI & {\n baseOptions: Record<string, unknown>;\n };\n configRestAPI.basePath = configRestAPI.basePath || ALPHA_REST_API_PROD_URL;\n configRestAPI.baseOptions = configRestAPI.baseOptions || {};\n configRestAPI.baseOptions.headers = {\n ...(configRestAPI.baseOptions.headers || {}),\n 'User-Agent': userAgent,\n };\n this.restAPI = new RestAPI(configRestAPI);\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;WACY;cAEG;;;;;;;;;;;;;;;;;;;AC6Bf,MAAM,iCAAiC,SAAU,eAAqC;AAClF,QAAO;EAeH,kBAAkB,OACd,QACA,QACA,WACA,SACA,UACuB;AAEvB,2CAAkB,oBAAoB,UAAU,OAAO;GAEvD,MAAMA,yBAAkD,EAAE;GAC1D,MAAMC,wBAAiD,EAAE;AAEzD,OAAI,WAAW,UAAa,WAAW,KACnC,wBAAuB,YAAY;AAEvC,OAAI,WAAW,UAAa,WAAW,KACnC,wBAAuB,YAAY;AAEvC,OAAI,cAAc,UAAa,cAAc,KACzC,wBAAuB,eAAe;AAE1C,OAAI,YAAY,UAAa,YAAY,KACrC,wBAAuB,aAAa;AAExC,OAAI,UAAU,UAAa,UAAU,KACjC,wBAAuB,WAAW;GAGtC,IAAIC;AACJ,OAAI,cAAc,cAAe,aAAY,cAAc;AAE3D,UAAO;IACH,UAAU;IACV,QAAQ;IACR,aAAa;IACb,YAAY;IACZ,UAAU;IACb;;EAWL,iBAAiB,YAAkC;GAC/C,MAAMF,yBAAkD,EAAE;GAC1D,MAAMC,wBAAiD,EAAE;GAEzD,IAAIC;AACJ,OAAI,cAAc,cAAe,aAAY,cAAc;AAE3D,UAAO;IACH,UAAU;IACV,QAAQ;IACR,aAAa;IACb,YAAY;IACZ,UAAU;IACb;;EAgBL,QAAQ,OACJ,QACA,UACA,OACA,WACA,YACuB;AAEvB,2CAAkB,UAAU,UAAU,OAAO;AAE7C,2CAAkB,UAAU,YAAY,SAAS;GAEjD,MAAMF,yBAAkD,EAAE;GAC1D,MAAMC,wBAAiD,EAAE;AAEzD,OAAI,WAAW,UAAa,WAAW,KACnC,wBAAuB,YAAY;AAEvC,OAAI,aAAa,UAAa,aAAa,KACvC,wB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AAU,MAAM,CACrB;;;;;;;;;;;;;;CAeL,iBACI,mBACkD;AAClD,SAAO,KAAK,cAAc,iBAAiB,kBAAkB;;;;;;;;;;;;;CAcjE,kBAAqE;AACjE,SAAO,KAAK,cAAc,iBAAiB;;;;;;;;;;;;;;CAe/C,OAAO,mBAA4E;AAC/E,SAAO,KAAK,cAAc,OAAO,kBAAkB;;;;;;;;;;;;;;CAevD,OAAO,mBAA4E;AAC/E,SAAO,KAAK,cAAc,OAAO,kBAAkB;;;;;;;;;;;;;CAcvD,YAAyD;AACrD,SAAO,KAAK,cAAc,WAAW;;;;;;;;;;;;;AE/J7C,IAAa,QAAb,MAAmB;CAGf,YAAY,QAA4B;EACpC,MAAM,iDAA2B,MAAM,QAAQ;AAE/C,MAAI,QAAQ,sBAAsB;GAC9B,MAAM,gBAAgB,IAAIC,sCACtB,OAAO,qBACV;AAGD,iBAAc,WAAW,cAAc,YAAYC;AACnD,iBAAc,cAAc,cAAc,eAAe,EAAE;AAC3D,iBAAc,YAAY,UAAU;IAChC,GAAI,cAAc,YAAY,WAAW,EAAE;IAC3C,cAAc;IACjB;AACD,QAAK,UAAU,IAAI,QAAQ,cAAc"}
1
+ {"version":3,"file":"index.js","names":["localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","localVarHeaderParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","ConfigurationRestAPI","ALPHA_REST_API_PROD_URL"],"sources":["../package.json","../src/rest-api/modules/market-data-api.ts","../src/rest-api/rest-api.ts","../src/rest-api/index.ts","../src/alpha.ts"],"sourcesContent":["{\n \"name\": \"@binance/alpha\",\n \"description\": \"Official Binance Alpha Connector - A lightweight library that provides a convenient interface to Binance's Alpha REST API.\",\n \"version\": \"1.0.15\",\n \"main\": \"./dist/index.js\",\n \"module\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"require\": \"./dist/index.js\",\n \"import\": \"./dist/index.mjs\"\n }\n },\n \"scripts\": {\n \"prepublishOnly\": \"npm run build\",\n \"build\": \"npm run clean && tsdown\",\n \"typecheck\": \"tsc --noEmit\",\n \"clean\": \"rm -rf dist\",\n \"test\": \"npx jest --maxWorkers=4 --bail\",\n \"test:watch\": \"npx jest --watch\",\n \"format\": \"npx prettier --ignore-path .prettierignore --write .\",\n \"lint\": \"npx eslint '**/*.ts' --fix\"\n },\n \"keywords\": [\n \"Binance\",\n \"API\",\n \"Alpha\",\n \"Connector\",\n \"REST\",\n \"Trading\"\n ],\n \"author\": \"Binance\",\n \"license\": \"MIT\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/binance/binance-connector-js.git\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/binance/binance-connector-js/issues\"\n },\n \"homepage\": \"https://github.com/binance/binance-connector-js#readme\",\n \"files\": [\n \"dist\"\n ],\n \"devDependencies\": {\n \"@types/jest\": \"^29.5.4\",\n \"@types/node\": \"^20.17.24\",\n \"eslint\": \"8.57.0\",\n \"jest\": \"^29.6.4\",\n \"json-with-bigint\": \"^3.4.4\",\n \"prettier\": \"^3.3.3\",\n \"ts-jest\": \"^29.1.1\",\n \"ts-node\": \"^10.9.1\",\n \"tsdown\": \"^0.16.5\",\n \"typescript\": \"^5.7.2\",\n \"typescript-eslint\": \"^8.24.0\"\n },\n \"dependencies\": {\n \"@binance/common\": \"2.4.0\",\n \"axios\": \"^1.7.4\"\n }\n}\n","/**\n * Binance Alpha REST API\n *\n * OpenAPI Specification for the Binance Alpha REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport {\n ConfigurationRestAPI,\n TimeUnit,\n RestApiResponse,\n assertParamExists,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type {\n AggregatedTradesResponse,\n GetExchangeInfoResponse,\n KlinesResponse,\n TickerResponse,\n TokenListResponse,\n} from '../types';\n\n/**\n * MarketDataApi - axios parameter creator\n */\nconst MarketDataApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Retrieves compressed, aggregated historical trades for a specific symbol. Useful for recent trade history.\n *\n * Weight: 0\n *\n * @summary Aggregated Trades\n * @param {string} symbol e.g., \"ALPHA_175USDT\" – use token ID from Token List\n * @param {number | bigint} [fromId] starting trade ID to fetch from\n * @param {number | bigint} [startTime] start timestamp (milliseconds)\n * @param {number | bigint} [endTime] end timestamp (milliseconds)\n * @param {number | bigint} [limit] number of results to return (default 500, max 1000)\n *\n * @throws {RequiredError}\n */\n aggregatedTrades: async (\n symbol: string,\n fromId?: number | bigint,\n startTime?: number | bigint,\n endTime?: number | bigint,\n limit?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'symbol' is not null or undefined\n assertParamExists('aggregatedTrades', 'symbol', symbol);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (symbol !== undefined && symbol !== null) {\n localVarQueryParameter['symbol'] = symbol;\n }\n if (fromId !== undefined && fromId !== null) {\n localVarQueryParameter['fromId'] = fromId;\n }\n if (startTime !== undefined && startTime !== null) {\n localVarQueryParameter['startTime'] = startTime;\n }\n if (endTime !== undefined && endTime !== null) {\n localVarQueryParameter['endTime'] = endTime;\n }\n if (limit !== undefined && limit !== null) {\n localVarQueryParameter['limit'] = limit;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/bapi/defi/v1/public/alpha-trade/agg-trades',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Fetches general exchange information, such as supported symbols, rate limits, and server time.\n *\n * Weight: 0\n *\n * @summary Get Exchange Info\n *\n * @throws {RequiredError}\n */\n getExchangeInfo: async (): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/bapi/defi/v1/public/alpha-trade/get-exchange-info',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Fetches Kline/candlestick bars for a symbol, which include open/high/low/close prices and volume over intervals. Useful for charting and analysis.\n *\n * Weight: 0\n *\n * @summary Klines (Candlestick Data)\n * @param {string} symbol e.g., \"ALPHA_175USDT\" – use token ID from Token List\n * @param {string} interval e.g., \"1h\" – supported intervals: 1s, 15s, 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M\n * @param {number | bigint} [limit] number of results to return (default 500, max 1000)\n * @param {number | bigint} [startTime] start timestamp (milliseconds)\n * @param {number | bigint} [endTime] end timestamp (milliseconds)\n *\n * @throws {RequiredError}\n */\n klines: async (\n symbol: string,\n interval: string,\n limit?: number | bigint,\n startTime?: number | bigint,\n endTime?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'symbol' is not null or undefined\n assertParamExists('klines', 'symbol', symbol);\n // verify required parameter 'interval' is not null or undefined\n assertParamExists('klines', 'interval', interval);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (symbol !== undefined && symbol !== null) {\n localVarQueryParameter['symbol'] = symbol;\n }\n if (interval !== undefined && interval !== null) {\n localVarQueryParameter['interval'] = interval;\n }\n if (limit !== undefined && limit !== null) {\n localVarQueryParameter['limit'] = limit;\n }\n if (startTime !== undefined && startTime !== null) {\n localVarQueryParameter['startTime'] = startTime;\n }\n if (endTime !== undefined && endTime !== null) {\n localVarQueryParameter['endTime'] = endTime;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/bapi/defi/v1/public/alpha-trade/klines',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Gets the 24-hour rolling window price change statistics for a symbol, including volume and price changes.\n *\n * Weight: 0\n *\n * @summary Ticker (24hr Price Statistics)\n * @param {string} symbol e.g., \"ALPHA_175USDT\" – use token ID from Token List\n *\n * @throws {RequiredError}\n */\n ticker: async (symbol: string): Promise<RequestArgs> => {\n // verify required parameter 'symbol' is not null or undefined\n assertParamExists('ticker', 'symbol', symbol);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (symbol !== undefined && symbol !== null) {\n localVarQueryParameter['symbol'] = symbol;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/bapi/defi/v1/public/alpha-trade/ticker',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Retrieves a list of all available ALPHA tokens, including their IDs and symbols. Use this to find the token ID for constructing symbols in other endpoints.\n *\n * Weight: 0\n *\n * @summary Token List\n *\n * @throws {RequiredError}\n */\n tokenList: async (): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/bapi/defi/v1/public/wallet-direct/buw/wallet/cex/alpha/all/token/list',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * MarketDataApi - interface\n * @interface MarketDataApi\n */\nexport interface MarketDataApiInterface {\n /**\n * Retrieves compressed, aggregated historical trades for a specific symbol. Useful for recent trade history.\n *\n * Weight: 0\n *\n * @summary Aggregated Trades\n * @param {AggregatedTradesRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n aggregatedTrades(\n requestParameters: AggregatedTradesRequest\n ): Promise<RestApiResponse<AggregatedTradesResponse>>;\n /**\n * Fetches general exchange information, such as supported symbols, rate limits, and server time.\n *\n * Weight: 0\n *\n * @summary Get Exchange Info\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n getExchangeInfo(): Promise<RestApiResponse<GetExchangeInfoResponse>>;\n /**\n * Fetches Kline/candlestick bars for a symbol, which include open/high/low/close prices and volume over intervals. Useful for charting and analysis.\n *\n * Weight: 0\n *\n * @summary Klines (Candlestick Data)\n * @param {KlinesRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n klines(requestParameters: KlinesRequest): Promise<RestApiResponse<KlinesResponse>>;\n /**\n * Gets the 24-hour rolling window price change statistics for a symbol, including volume and price changes.\n *\n * Weight: 0\n *\n * @summary Ticker (24hr Price Statistics)\n * @param {TickerRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n ticker(requestParameters: TickerRequest): Promise<RestApiResponse<TickerResponse>>;\n /**\n * Retrieves a list of all available ALPHA tokens, including their IDs and symbols. Use this to find the token ID for constructing symbols in other endpoints.\n *\n * Weight: 0\n *\n * @summary Token List\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n tokenList(): Promise<RestApiResponse<TokenListResponse>>;\n}\n\n/**\n * Request parameters for aggregatedTrades operation in MarketDataApi.\n * @interface AggregatedTradesRequest\n */\nexport interface AggregatedTradesRequest {\n /**\n * e.g., \"ALPHA_175USDT\" – use token ID from Token List\n * @type {string}\n * @memberof MarketDataApiAggregatedTrades\n */\n readonly symbol: string;\n\n /**\n * starting trade ID to fetch from\n * @type {number | bigint}\n * @memberof MarketDataApiAggregatedTrades\n */\n readonly fromId?: number | bigint;\n\n /**\n * start timestamp (milliseconds)\n * @type {number | bigint}\n * @memberof MarketDataApiAggregatedTrades\n */\n readonly startTime?: number | bigint;\n\n /**\n * end timestamp (milliseconds)\n * @type {number | bigint}\n * @memberof MarketDataApiAggregatedTrades\n */\n readonly endTime?: number | bigint;\n\n /**\n * number of results to return (default 500, max 1000)\n * @type {number | bigint}\n * @memberof MarketDataApiAggregatedTrades\n */\n readonly limit?: number | bigint;\n}\n\n/**\n * Request parameters for klines operation in MarketDataApi.\n * @interface KlinesRequest\n */\nexport interface KlinesRequest {\n /**\n * e.g., \"ALPHA_175USDT\" – use token ID from Token List\n * @type {string}\n * @memberof MarketDataApiKlines\n */\n readonly symbol: string;\n\n /**\n * e.g., \"1h\" – supported intervals: 1s, 15s, 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M\n * @type {string}\n * @memberof MarketDataApiKlines\n */\n readonly interval: string;\n\n /**\n * number of results to return (default 500, max 1000)\n * @type {number | bigint}\n * @memberof MarketDataApiKlines\n */\n readonly limit?: number | bigint;\n\n /**\n * start timestamp (milliseconds)\n * @type {number | bigint}\n * @memberof MarketDataApiKlines\n */\n readonly startTime?: number | bigint;\n\n /**\n * end timestamp (milliseconds)\n * @type {number | bigint}\n * @memberof MarketDataApiKlines\n */\n readonly endTime?: number | bigint;\n}\n\n/**\n * Request parameters for ticker operation in MarketDataApi.\n * @interface TickerRequest\n */\nexport interface TickerRequest {\n /**\n * e.g., \"ALPHA_175USDT\" – use token ID from Token List\n * @type {string}\n * @memberof MarketDataApiTicker\n */\n readonly symbol: string;\n}\n\n/**\n * MarketDataApi - object-oriented interface\n * @class MarketDataApi\n */\nexport class MarketDataApi implements MarketDataApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = MarketDataApiAxiosParamCreator(configuration);\n }\n\n /**\n * Retrieves compressed, aggregated historical trades for a specific symbol. Useful for recent trade history.\n *\n * Weight: 0\n *\n * @summary Aggregated Trades\n * @param {AggregatedTradesRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<AggregatedTradesResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/alpha/market-data/rest-api/Aggregated-Trades Binance API Documentation}\n */\n public async aggregatedTrades(\n requestParameters: AggregatedTradesRequest\n ): Promise<RestApiResponse<AggregatedTradesResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.aggregatedTrades(\n requestParameters?.symbol,\n requestParameters?.fromId,\n requestParameters?.startTime,\n requestParameters?.endTime,\n requestParameters?.limit\n );\n return sendRequest<AggregatedTradesResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: false }\n );\n }\n\n /**\n * Fetches general exchange information, such as supported symbols, rate limits, and server time.\n *\n * Weight: 0\n *\n * @summary Get Exchange Info\n * @returns {Promise<RestApiResponse<GetExchangeInfoResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/alpha/market-data/rest-api/Get-Exchange-Info Binance API Documentation}\n */\n public async getExchangeInfo(): Promise<RestApiResponse<GetExchangeInfoResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getExchangeInfo();\n return sendRequest<GetExchangeInfoResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: false }\n );\n }\n\n /**\n * Fetches Kline/candlestick bars for a symbol, which include open/high/low/close prices and volume over intervals. Useful for charting and analysis.\n *\n * Weight: 0\n *\n * @summary Klines (Candlestick Data)\n * @param {KlinesRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<KlinesResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/alpha/market-data/rest-api/Klines Binance API Documentation}\n */\n public async klines(\n requestParameters: KlinesRequest\n ): Promise<RestApiResponse<KlinesResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.klines(\n requestParameters?.symbol,\n requestParameters?.interval,\n requestParameters?.limit,\n requestParameters?.startTime,\n requestParameters?.endTime\n );\n return sendRequest<KlinesResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: false }\n );\n }\n\n /**\n * Gets the 24-hour rolling window price change statistics for a symbol, including volume and price changes.\n *\n * Weight: 0\n *\n * @summary Ticker (24hr Price Statistics)\n * @param {TickerRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<TickerResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/alpha/market-data/rest-api/24hr-ticker-price-change Binance API Documentation}\n */\n public async ticker(\n requestParameters: TickerRequest\n ): Promise<RestApiResponse<TickerResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.ticker(\n requestParameters?.symbol\n );\n return sendRequest<TickerResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: false }\n );\n }\n\n /**\n * Retrieves a list of all available ALPHA tokens, including their IDs and symbols. Use this to find the token ID for constructing symbols in other endpoints.\n *\n * Weight: 0\n *\n * @summary Token List\n * @returns {Promise<RestApiResponse<TokenListResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/alpha/market-data/rest-api/Token-List Binance API Documentation}\n */\n public async tokenList(): Promise<RestApiResponse<TokenListResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.tokenList();\n return sendRequest<TokenListResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: false }\n );\n }\n}\n","/**\n * Binance Alpha REST API\n *\n * OpenAPI Specification for the Binance Alpha REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport { ConfigurationRestAPI, RestApiResponse, sendRequest } from '@binance/common';\nimport { MarketDataApi } from './modules/market-data-api';\n\nimport type {\n AggregatedTradesRequest,\n KlinesRequest,\n TickerRequest,\n} from './modules/market-data-api';\n\nimport type {\n AggregatedTradesResponse,\n GetExchangeInfoResponse,\n KlinesResponse,\n TickerResponse,\n TokenListResponse,\n} from './types';\n\nexport class RestAPI {\n private configuration: ConfigurationRestAPI;\n private marketDataApi: MarketDataApi;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.marketDataApi = new MarketDataApi(configuration);\n }\n\n /**\n * Generic function to send a request.\n * @param endpoint - The API endpoint to call.\n * @param method - HTTP method to use (GET, POST, DELETE, etc.).\n * @param queryParams - Query parameters for the request.\n * @param bodyParams - Body parameters for the request.\n *\n * @returns A promise resolving to the response data object.\n */\n sendRequest<T>(\n endpoint: string,\n method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',\n queryParams: Record<string, unknown> = {},\n bodyParams: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(\n this.configuration,\n endpoint,\n method,\n queryParams,\n bodyParams,\n undefined,\n undefined\n );\n }\n\n /**\n * Generic function to send a signed request.\n * @param endpoint - The API endpoint to call.\n * @param method - HTTP method to use (GET, POST, DELETE, etc.).\n * @param queryParams - Query parameters for the request.\n * @param bodyParams - Body parameters for the request.\n *\n * @returns A promise resolving to the response data object.\n */\n sendSignedRequest<T>(\n endpoint: string,\n method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',\n queryParams: Record<string, unknown> = {},\n bodyParams: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(\n this.configuration,\n endpoint,\n method,\n queryParams,\n bodyParams,\n undefined,\n undefined,\n { isSigned: true }\n );\n }\n\n /**\n * Retrieves compressed, aggregated historical trades for a specific symbol. Useful for recent trade history.\n *\n * Weight: 0\n *\n * @summary Aggregated Trades\n * @param {AggregatedTradesRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<AggregatedTradesResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/alpha/market-data/rest-api/Aggregated-Trades Binance API Documentation}\n */\n aggregatedTrades(\n requestParameters: AggregatedTradesRequest\n ): Promise<RestApiResponse<AggregatedTradesResponse>> {\n return this.marketDataApi.aggregatedTrades(requestParameters);\n }\n\n /**\n * Fetches general exchange information, such as supported symbols, rate limits, and server time.\n *\n * Weight: 0\n *\n * @summary Get Exchange Info\n *\n * @returns {Promise<RestApiResponse<GetExchangeInfoResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/alpha/market-data/rest-api/Get-Exchange-Info Binance API Documentation}\n */\n getExchangeInfo(): Promise<RestApiResponse<GetExchangeInfoResponse>> {\n return this.marketDataApi.getExchangeInfo();\n }\n\n /**\n * Fetches Kline/candlestick bars for a symbol, which include open/high/low/close prices and volume over intervals. Useful for charting and analysis.\n *\n * Weight: 0\n *\n * @summary Klines (Candlestick Data)\n * @param {KlinesRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<KlinesResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/alpha/market-data/rest-api/Klines Binance API Documentation}\n */\n klines(requestParameters: KlinesRequest): Promise<RestApiResponse<KlinesResponse>> {\n return this.marketDataApi.klines(requestParameters);\n }\n\n /**\n * Gets the 24-hour rolling window price change statistics for a symbol, including volume and price changes.\n *\n * Weight: 0\n *\n * @summary Ticker (24hr Price Statistics)\n * @param {TickerRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<TickerResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/alpha/market-data/rest-api/24hr-ticker-price-change Binance API Documentation}\n */\n ticker(requestParameters: TickerRequest): Promise<RestApiResponse<TickerResponse>> {\n return this.marketDataApi.ticker(requestParameters);\n }\n\n /**\n * Retrieves a list of all available ALPHA tokens, including their IDs and symbols. Use this to find the token ID for constructing symbols in other endpoints.\n *\n * Weight: 0\n *\n * @summary Token List\n *\n * @returns {Promise<RestApiResponse<TokenListResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/alpha/market-data/rest-api/Token-List Binance API Documentation}\n */\n tokenList(): Promise<RestApiResponse<TokenListResponse>> {\n return this.marketDataApi.tokenList();\n }\n}\n","/**\n * Binance Alpha REST API\n *\n * OpenAPI Specification for the Binance Alpha REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nexport * from './types';\nexport * from './modules';\nexport * from './rest-api';\n","import { buildUserAgent, ConfigurationRestAPI, ALPHA_REST_API_PROD_URL } from '@binance/common';\nimport { name, version } from '../package.json';\nimport { RestAPI } from './rest-api';\n\nexport interface ConfigurationAlpha {\n configurationRestAPI?: ConfigurationRestAPI;\n}\n\nexport class Alpha {\n public restAPI!: RestAPI;\n\n constructor(config: ConfigurationAlpha) {\n const userAgent = buildUserAgent(name, version);\n\n if (config?.configurationRestAPI) {\n const configRestAPI = new ConfigurationRestAPI(\n config.configurationRestAPI\n ) as ConfigurationRestAPI & {\n baseOptions: Record<string, unknown>;\n };\n configRestAPI.basePath = configRestAPI.basePath || ALPHA_REST_API_PROD_URL;\n configRestAPI.baseOptions = configRestAPI.baseOptions || {};\n configRestAPI.baseOptions.headers = {\n ...(configRestAPI.baseOptions.headers || {}),\n 'User-Agent': userAgent,\n };\n this.restAPI = new RestAPI(configRestAPI);\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;WACY;cAEG;;;;;;;;;;;;;;;;;;;AC6Bf,MAAM,iCAAiC,SAAU,eAAqC;AAClF,QAAO;EAeH,kBAAkB,OACd,QACA,QACA,WACA,SACA,UACuB;AAEvB,2CAAkB,oBAAoB,UAAU,OAAO;GAEvD,MAAMA,yBAAkD,EAAE;GAC1D,MAAMC,wBAAiD,EAAE;GACzD,MAAMC,0BAAmD,EAAE;AAE3D,OAAI,WAAW,UAAa,WAAW,KACnC,wBAAuB,YAAY;AAEvC,OAAI,WAAW,UAAa,WAAW,KACnC,wBAAuB,YAAY;AAEvC,OAAI,cAAc,UAAa,cAAc,KACzC,wBAAuB,eAAe;AAE1C,OAAI,YAAY,UAAa,YAAY,KACrC,wBAAuB,aAAa;AAExC,OAAI,UAAU,UAAa,UAAU,KACjC,wBAAuB,WAAW;GAGtC,IAAIC;AACJ,OAAI,cAAc,cAAe,aAAY,cAAc;AAE3D,UAAO;IACH,UAAU;IAC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C,MAAI,QAAQ,sBAAsB;GAC9B,MAAM,gBAAgB,IAAIC,sCACtB,OAAO,qBACV;AAGD,iBAAc,WAAW,cAAc,YAAYC;AACnD,iBAAc,cAAc,cAAc,eAAe,EAAE;AAC3D,iBAAc,YAAY,UAAU;IAChC,GAAI,cAAc,YAAY,WAAW,EAAE;IAC3C,cAAc;IACjB;AACD,QAAK,UAAU,IAAI,QAAQ,cAAc"}
package/dist/index.mjs CHANGED
@@ -3,7 +3,7 @@ import { ALPHA_REST_API_PROD_URL, ALPHA_REST_API_PROD_URL as ALPHA_REST_API_PROD
3
3
 
4
4
  //#region package.json
5
5
  var name = "@binance/alpha";
6
- var version = "1.0.14";
6
+ var version = "1.0.15";
7
7
 
8
8
  //#endregion
9
9
  //#region src/rest-api/modules/market-data-api.ts
@@ -28,6 +28,7 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
28
28
  assertParamExists("aggregatedTrades", "symbol", symbol);
29
29
  const localVarQueryParameter = {};
30
30
  const localVarBodyParameter = {};
31
+ const localVarHeaderParameter = {};
31
32
  if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
32
33
  if (fromId !== void 0 && fromId !== null) localVarQueryParameter["fromId"] = fromId;
33
34
  if (startTime !== void 0 && startTime !== null) localVarQueryParameter["startTime"] = startTime;
@@ -40,12 +41,14 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
40
41
  method: "GET",
41
42
  queryParams: localVarQueryParameter,
42
43
  bodyParams: localVarBodyParameter,
44
+ headerParams: localVarHeaderParameter,
43
45
  timeUnit: _timeUnit
44
46
  };
45
47
  },
46
48
  getExchangeInfo: async () => {
47
49
  const localVarQueryParameter = {};
48
50
  const localVarBodyParameter = {};
51
+ const localVarHeaderParameter = {};
49
52
  let _timeUnit;
50
53
  if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
51
54
  return {
@@ -53,6 +56,7 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
53
56
  method: "GET",
54
57
  queryParams: localVarQueryParameter,
55
58
  bodyParams: localVarBodyParameter,
59
+ headerParams: localVarHeaderParameter,
56
60
  timeUnit: _timeUnit
57
61
  };
58
62
  },
@@ -61,6 +65,7 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
61
65
  assertParamExists("klines", "interval", interval);
62
66
  const localVarQueryParameter = {};
63
67
  const localVarBodyParameter = {};
68
+ const localVarHeaderParameter = {};
64
69
  if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
65
70
  if (interval !== void 0 && interval !== null) localVarQueryParameter["interval"] = interval;
66
71
  if (limit !== void 0 && limit !== null) localVarQueryParameter["limit"] = limit;
@@ -73,6 +78,7 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
73
78
  method: "GET",
74
79
  queryParams: localVarQueryParameter,
75
80
  bodyParams: localVarBodyParameter,
81
+ headerParams: localVarHeaderParameter,
76
82
  timeUnit: _timeUnit
77
83
  };
78
84
  },
@@ -80,6 +86,7 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
80
86
  assertParamExists("ticker", "symbol", symbol);
81
87
  const localVarQueryParameter = {};
82
88
  const localVarBodyParameter = {};
89
+ const localVarHeaderParameter = {};
83
90
  if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
84
91
  let _timeUnit;
85
92
  if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
@@ -88,12 +95,14 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
88
95
  method: "GET",
89
96
  queryParams: localVarQueryParameter,
90
97
  bodyParams: localVarBodyParameter,
98
+ headerParams: localVarHeaderParameter,
91
99
  timeUnit: _timeUnit
92
100
  };
93
101
  },
94
102
  tokenList: async () => {
95
103
  const localVarQueryParameter = {};
96
104
  const localVarBodyParameter = {};
105
+ const localVarHeaderParameter = {};
97
106
  let _timeUnit;
98
107
  if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
99
108
  return {
@@ -101,6 +110,7 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
101
110
  method: "GET",
102
111
  queryParams: localVarQueryParameter,
103
112
  bodyParams: localVarBodyParameter,
113
+ headerParams: localVarHeaderParameter,
104
114
  timeUnit: _timeUnit
105
115
  };
106
116
  }
@@ -129,7 +139,7 @@ var MarketDataApi = class {
129
139
  */
130
140
  async aggregatedTrades(requestParameters) {
131
141
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.aggregatedTrades(requestParameters?.symbol, requestParameters?.fromId, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.limit);
132
- return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
142
+ return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
133
143
  }
134
144
  /**
135
145
  * Fetches general exchange information, such as supported symbols, rate limits, and server time.
@@ -144,7 +154,7 @@ var MarketDataApi = class {
144
154
  */
145
155
  async getExchangeInfo() {
146
156
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.getExchangeInfo();
147
- return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
157
+ return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
148
158
  }
149
159
  /**
150
160
  * Fetches Kline/candlestick bars for a symbol, which include open/high/low/close prices and volume over intervals. Useful for charting and analysis.
@@ -160,7 +170,7 @@ var MarketDataApi = class {
160
170
  */
161
171
  async klines(requestParameters) {
162
172
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.klines(requestParameters?.symbol, requestParameters?.interval, requestParameters?.limit, requestParameters?.startTime, requestParameters?.endTime);
163
- return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
173
+ return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
164
174
  }
165
175
  /**
166
176
  * Gets the 24-hour rolling window price change statistics for a symbol, including volume and price changes.
@@ -176,7 +186,7 @@ var MarketDataApi = class {
176
186
  */
177
187
  async ticker(requestParameters) {
178
188
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.ticker(requestParameters?.symbol);
179
- return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
189
+ return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
180
190
  }
181
191
  /**
182
192
  * Retrieves a list of all available ALPHA tokens, including their IDs and symbols. Use this to find the token ID for constructing symbols in other endpoints.
@@ -191,7 +201,7 @@ var MarketDataApi = class {
191
201
  */
192
202
  async tokenList() {
193
203
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.tokenList();
194
- return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
204
+ return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
195
205
  }
196
206
  };
197
207
 
@@ -224,7 +234,7 @@ var RestAPI = class {
224
234
  * @returns A promise resolving to the response data object.
225
235
  */
226
236
  sendRequest(endpoint, method, queryParams = {}, bodyParams = {}) {
227
- return sendRequest(this.configuration, endpoint, method, queryParams, bodyParams, void 0);
237
+ return sendRequest(this.configuration, endpoint, method, queryParams, bodyParams, void 0, void 0);
228
238
  }
229
239
  /**
230
240
  * Generic function to send a signed request.
@@ -236,7 +246,7 @@ var RestAPI = class {
236
246
  * @returns A promise resolving to the response data object.
237
247
  */
238
248
  sendSignedRequest(endpoint, method, queryParams = {}, bodyParams = {}) {
239
- return sendRequest(this.configuration, endpoint, method, queryParams, bodyParams, void 0, { isSigned: true });
249
+ return sendRequest(this.configuration, endpoint, method, queryParams, bodyParams, void 0, void 0, { isSigned: true });
240
250
  }
241
251
  /**
242
252
  * Retrieves compressed, aggregated historical trades for a specific symbol. Useful for recent trade history.
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","ALPHA_REST_API_PROD_URL"],"sources":["../package.json","../src/rest-api/modules/market-data-api.ts","../src/rest-api/rest-api.ts","../src/rest-api/index.ts","../src/alpha.ts"],"sourcesContent":["{\n \"name\": \"@binance/alpha\",\n \"description\": \"Official Binance Alpha Connector - A lightweight library that provides a convenient interface to Binance's Alpha REST API.\",\n \"version\": \"1.0.14\",\n \"main\": \"./dist/index.js\",\n \"module\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"require\": \"./dist/index.js\",\n \"import\": \"./dist/index.mjs\"\n }\n },\n \"scripts\": {\n \"prepublishOnly\": \"npm run build\",\n \"build\": \"npm run clean && tsdown\",\n \"typecheck\": \"tsc --noEmit\",\n \"clean\": \"rm -rf dist\",\n \"test\": \"npx jest --maxWorkers=4 --bail\",\n \"test:watch\": \"npx jest --watch\",\n \"format\": \"npx prettier --ignore-path .prettierignore --write .\",\n \"lint\": \"npx eslint '**/*.ts' --fix\"\n },\n \"keywords\": [\n \"Binance\",\n \"API\",\n \"Alpha\",\n \"Connector\",\n \"REST\",\n \"Trading\"\n ],\n \"author\": \"Binance\",\n \"license\": \"MIT\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/binance/binance-connector-js.git\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/binance/binance-connector-js/issues\"\n },\n \"homepage\": \"https://github.com/binance/binance-connector-js#readme\",\n \"files\": [\n \"dist\"\n ],\n \"devDependencies\": {\n \"@types/jest\": \"^29.5.4\",\n \"@types/node\": \"^20.17.24\",\n \"eslint\": \"8.57.0\",\n \"jest\": \"^29.6.4\",\n \"json-with-bigint\": \"^3.4.4\",\n \"prettier\": \"^3.3.3\",\n \"ts-jest\": \"^29.1.1\",\n \"ts-node\": \"^10.9.1\",\n \"tsdown\": \"^0.16.5\",\n \"typescript\": \"^5.7.2\",\n \"typescript-eslint\": \"^8.24.0\"\n },\n \"dependencies\": {\n \"@binance/common\": \"2.3.14\",\n \"axios\": \"^1.7.4\"\n }\n}\n","/**\n * Binance Alpha REST API\n *\n * OpenAPI Specification for the Binance Alpha REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport {\n ConfigurationRestAPI,\n TimeUnit,\n RestApiResponse,\n assertParamExists,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type {\n AggregatedTradesResponse,\n GetExchangeInfoResponse,\n KlinesResponse,\n TickerResponse,\n TokenListResponse,\n} from '../types';\n\n/**\n * MarketDataApi - axios parameter creator\n */\nconst MarketDataApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Retrieves compressed, aggregated historical trades for a specific symbol. Useful for recent trade history.\n *\n * Weight: 0\n *\n * @summary Aggregated Trades\n * @param {string} symbol e.g., \"ALPHA_175USDT\" – use token ID from Token List\n * @param {number | bigint} [fromId] starting trade ID to fetch from\n * @param {number | bigint} [startTime] start timestamp (milliseconds)\n * @param {number | bigint} [endTime] end timestamp (milliseconds)\n * @param {number | bigint} [limit] number of results to return (default 500, max 1000)\n *\n * @throws {RequiredError}\n */\n aggregatedTrades: async (\n symbol: string,\n fromId?: number | bigint,\n startTime?: number | bigint,\n endTime?: number | bigint,\n limit?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'symbol' is not null or undefined\n assertParamExists('aggregatedTrades', 'symbol', symbol);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (symbol !== undefined && symbol !== null) {\n localVarQueryParameter['symbol'] = symbol;\n }\n if (fromId !== undefined && fromId !== null) {\n localVarQueryParameter['fromId'] = fromId;\n }\n if (startTime !== undefined && startTime !== null) {\n localVarQueryParameter['startTime'] = startTime;\n }\n if (endTime !== undefined && endTime !== null) {\n localVarQueryParameter['endTime'] = endTime;\n }\n if (limit !== undefined && limit !== null) {\n localVarQueryParameter['limit'] = limit;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/bapi/defi/v1/public/alpha-trade/agg-trades',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Fetches general exchange information, such as supported symbols, rate limits, and server time.\n *\n * Weight: 0\n *\n * @summary Get Exchange Info\n *\n * @throws {RequiredError}\n */\n getExchangeInfo: async (): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/bapi/defi/v1/public/alpha-trade/get-exchange-info',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Fetches Kline/candlestick bars for a symbol, which include open/high/low/close prices and volume over intervals. Useful for charting and analysis.\n *\n * Weight: 0\n *\n * @summary Klines (Candlestick Data)\n * @param {string} symbol e.g., \"ALPHA_175USDT\" – use token ID from Token List\n * @param {string} interval e.g., \"1h\" – supported intervals: 1s, 15s, 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M\n * @param {number | bigint} [limit] number of results to return (default 500, max 1000)\n * @param {number | bigint} [startTime] start timestamp (milliseconds)\n * @param {number | bigint} [endTime] end timestamp (milliseconds)\n *\n * @throws {RequiredError}\n */\n klines: async (\n symbol: string,\n interval: string,\n limit?: number | bigint,\n startTime?: number | bigint,\n endTime?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'symbol' is not null or undefined\n assertParamExists('klines', 'symbol', symbol);\n // verify required parameter 'interval' is not null or undefined\n assertParamExists('klines', 'interval', interval);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (symbol !== undefined && symbol !== null) {\n localVarQueryParameter['symbol'] = symbol;\n }\n if (interval !== undefined && interval !== null) {\n localVarQueryParameter['interval'] = interval;\n }\n if (limit !== undefined && limit !== null) {\n localVarQueryParameter['limit'] = limit;\n }\n if (startTime !== undefined && startTime !== null) {\n localVarQueryParameter['startTime'] = startTime;\n }\n if (endTime !== undefined && endTime !== null) {\n localVarQueryParameter['endTime'] = endTime;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/bapi/defi/v1/public/alpha-trade/klines',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Gets the 24-hour rolling window price change statistics for a symbol, including volume and price changes.\n *\n * Weight: 0\n *\n * @summary Ticker (24hr Price Statistics)\n * @param {string} symbol e.g., \"ALPHA_175USDT\" – use token ID from Token List\n *\n * @throws {RequiredError}\n */\n ticker: async (symbol: string): Promise<RequestArgs> => {\n // verify required parameter 'symbol' is not null or undefined\n assertParamExists('ticker', 'symbol', symbol);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (symbol !== undefined && symbol !== null) {\n localVarQueryParameter['symbol'] = symbol;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/bapi/defi/v1/public/alpha-trade/ticker',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Retrieves a list of all available ALPHA tokens, including their IDs and symbols. Use this to find the token ID for constructing symbols in other endpoints.\n *\n * Weight: 0\n *\n * @summary Token List\n *\n * @throws {RequiredError}\n */\n tokenList: async (): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/bapi/defi/v1/public/wallet-direct/buw/wallet/cex/alpha/all/token/list',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * MarketDataApi - interface\n * @interface MarketDataApi\n */\nexport interface MarketDataApiInterface {\n /**\n * Retrieves compressed, aggregated historical trades for a specific symbol. Useful for recent trade history.\n *\n * Weight: 0\n *\n * @summary Aggregated Trades\n * @param {AggregatedTradesRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n aggregatedTrades(\n requestParameters: AggregatedTradesRequest\n ): Promise<RestApiResponse<AggregatedTradesResponse>>;\n /**\n * Fetches general exchange information, such as supported symbols, rate limits, and server time.\n *\n * Weight: 0\n *\n * @summary Get Exchange Info\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n getExchangeInfo(): Promise<RestApiResponse<GetExchangeInfoResponse>>;\n /**\n * Fetches Kline/candlestick bars for a symbol, which include open/high/low/close prices and volume over intervals. Useful for charting and analysis.\n *\n * Weight: 0\n *\n * @summary Klines (Candlestick Data)\n * @param {KlinesRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n klines(requestParameters: KlinesRequest): Promise<RestApiResponse<KlinesResponse>>;\n /**\n * Gets the 24-hour rolling window price change statistics for a symbol, including volume and price changes.\n *\n * Weight: 0\n *\n * @summary Ticker (24hr Price Statistics)\n * @param {TickerRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n ticker(requestParameters: TickerRequest): Promise<RestApiResponse<TickerResponse>>;\n /**\n * Retrieves a list of all available ALPHA tokens, including their IDs and symbols. Use this to find the token ID for constructing symbols in other endpoints.\n *\n * Weight: 0\n *\n * @summary Token List\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n tokenList(): Promise<RestApiResponse<TokenListResponse>>;\n}\n\n/**\n * Request parameters for aggregatedTrades operation in MarketDataApi.\n * @interface AggregatedTradesRequest\n */\nexport interface AggregatedTradesRequest {\n /**\n * e.g., \"ALPHA_175USDT\" – use token ID from Token List\n * @type {string}\n * @memberof MarketDataApiAggregatedTrades\n */\n readonly symbol: string;\n\n /**\n * starting trade ID to fetch from\n * @type {number | bigint}\n * @memberof MarketDataApiAggregatedTrades\n */\n readonly fromId?: number | bigint;\n\n /**\n * start timestamp (milliseconds)\n * @type {number | bigint}\n * @memberof MarketDataApiAggregatedTrades\n */\n readonly startTime?: number | bigint;\n\n /**\n * end timestamp (milliseconds)\n * @type {number | bigint}\n * @memberof MarketDataApiAggregatedTrades\n */\n readonly endTime?: number | bigint;\n\n /**\n * number of results to return (default 500, max 1000)\n * @type {number | bigint}\n * @memberof MarketDataApiAggregatedTrades\n */\n readonly limit?: number | bigint;\n}\n\n/**\n * Request parameters for klines operation in MarketDataApi.\n * @interface KlinesRequest\n */\nexport interface KlinesRequest {\n /**\n * e.g., \"ALPHA_175USDT\" – use token ID from Token List\n * @type {string}\n * @memberof MarketDataApiKlines\n */\n readonly symbol: string;\n\n /**\n * e.g., \"1h\" – supported intervals: 1s, 15s, 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M\n * @type {string}\n * @memberof MarketDataApiKlines\n */\n readonly interval: string;\n\n /**\n * number of results to return (default 500, max 1000)\n * @type {number | bigint}\n * @memberof MarketDataApiKlines\n */\n readonly limit?: number | bigint;\n\n /**\n * start timestamp (milliseconds)\n * @type {number | bigint}\n * @memberof MarketDataApiKlines\n */\n readonly startTime?: number | bigint;\n\n /**\n * end timestamp (milliseconds)\n * @type {number | bigint}\n * @memberof MarketDataApiKlines\n */\n readonly endTime?: number | bigint;\n}\n\n/**\n * Request parameters for ticker operation in MarketDataApi.\n * @interface TickerRequest\n */\nexport interface TickerRequest {\n /**\n * e.g., \"ALPHA_175USDT\" – use token ID from Token List\n * @type {string}\n * @memberof MarketDataApiTicker\n */\n readonly symbol: string;\n}\n\n/**\n * MarketDataApi - object-oriented interface\n * @class MarketDataApi\n */\nexport class MarketDataApi implements MarketDataApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = MarketDataApiAxiosParamCreator(configuration);\n }\n\n /**\n * Retrieves compressed, aggregated historical trades for a specific symbol. Useful for recent trade history.\n *\n * Weight: 0\n *\n * @summary Aggregated Trades\n * @param {AggregatedTradesRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<AggregatedTradesResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/alpha/market-data/rest-api/Aggregated-Trades Binance API Documentation}\n */\n public async aggregatedTrades(\n requestParameters: AggregatedTradesRequest\n ): Promise<RestApiResponse<AggregatedTradesResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.aggregatedTrades(\n requestParameters?.symbol,\n requestParameters?.fromId,\n requestParameters?.startTime,\n requestParameters?.endTime,\n requestParameters?.limit\n );\n return sendRequest<AggregatedTradesResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: false }\n );\n }\n\n /**\n * Fetches general exchange information, such as supported symbols, rate limits, and server time.\n *\n * Weight: 0\n *\n * @summary Get Exchange Info\n * @returns {Promise<RestApiResponse<GetExchangeInfoResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/alpha/market-data/rest-api/Get-Exchange-Info Binance API Documentation}\n */\n public async getExchangeInfo(): Promise<RestApiResponse<GetExchangeInfoResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getExchangeInfo();\n return sendRequest<GetExchangeInfoResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: false }\n );\n }\n\n /**\n * Fetches Kline/candlestick bars for a symbol, which include open/high/low/close prices and volume over intervals. Useful for charting and analysis.\n *\n * Weight: 0\n *\n * @summary Klines (Candlestick Data)\n * @param {KlinesRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<KlinesResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/alpha/market-data/rest-api/Klines Binance API Documentation}\n */\n public async klines(\n requestParameters: KlinesRequest\n ): Promise<RestApiResponse<KlinesResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.klines(\n requestParameters?.symbol,\n requestParameters?.interval,\n requestParameters?.limit,\n requestParameters?.startTime,\n requestParameters?.endTime\n );\n return sendRequest<KlinesResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: false }\n );\n }\n\n /**\n * Gets the 24-hour rolling window price change statistics for a symbol, including volume and price changes.\n *\n * Weight: 0\n *\n * @summary Ticker (24hr Price Statistics)\n * @param {TickerRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<TickerResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/alpha/market-data/rest-api/24hr-ticker-price-change Binance API Documentation}\n */\n public async ticker(\n requestParameters: TickerRequest\n ): Promise<RestApiResponse<TickerResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.ticker(\n requestParameters?.symbol\n );\n return sendRequest<TickerResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: false }\n );\n }\n\n /**\n * Retrieves a list of all available ALPHA tokens, including their IDs and symbols. Use this to find the token ID for constructing symbols in other endpoints.\n *\n * Weight: 0\n *\n * @summary Token List\n * @returns {Promise<RestApiResponse<TokenListResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/alpha/market-data/rest-api/Token-List Binance API Documentation}\n */\n public async tokenList(): Promise<RestApiResponse<TokenListResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.tokenList();\n return sendRequest<TokenListResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: false }\n );\n }\n}\n","/**\n * Binance Alpha REST API\n *\n * OpenAPI Specification for the Binance Alpha REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport { ConfigurationRestAPI, RestApiResponse, sendRequest } from '@binance/common';\nimport { MarketDataApi } from './modules/market-data-api';\n\nimport type {\n AggregatedTradesRequest,\n KlinesRequest,\n TickerRequest,\n} from './modules/market-data-api';\n\nimport type {\n AggregatedTradesResponse,\n GetExchangeInfoResponse,\n KlinesResponse,\n TickerResponse,\n TokenListResponse,\n} from './types';\n\nexport class RestAPI {\n private configuration: ConfigurationRestAPI;\n private marketDataApi: MarketDataApi;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.marketDataApi = new MarketDataApi(configuration);\n }\n\n /**\n * Generic function to send a request.\n * @param endpoint - The API endpoint to call.\n * @param method - HTTP method to use (GET, POST, DELETE, etc.).\n * @param queryParams - Query parameters for the request.\n * @param bodyParams - Body parameters for the request.\n *\n * @returns A promise resolving to the response data object.\n */\n sendRequest<T>(\n endpoint: string,\n method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',\n queryParams: Record<string, unknown> = {},\n bodyParams: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(\n this.configuration,\n endpoint,\n method,\n queryParams,\n bodyParams,\n undefined\n );\n }\n\n /**\n * Generic function to send a signed request.\n * @param endpoint - The API endpoint to call.\n * @param method - HTTP method to use (GET, POST, DELETE, etc.).\n * @param queryParams - Query parameters for the request.\n * @param bodyParams - Body parameters for the request.\n *\n * @returns A promise resolving to the response data object.\n */\n sendSignedRequest<T>(\n endpoint: string,\n method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',\n queryParams: Record<string, unknown> = {},\n bodyParams: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(\n this.configuration,\n endpoint,\n method,\n queryParams,\n bodyParams,\n undefined,\n { isSigned: true }\n );\n }\n\n /**\n * Retrieves compressed, aggregated historical trades for a specific symbol. Useful for recent trade history.\n *\n * Weight: 0\n *\n * @summary Aggregated Trades\n * @param {AggregatedTradesRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<AggregatedTradesResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/alpha/market-data/rest-api/Aggregated-Trades Binance API Documentation}\n */\n aggregatedTrades(\n requestParameters: AggregatedTradesRequest\n ): Promise<RestApiResponse<AggregatedTradesResponse>> {\n return this.marketDataApi.aggregatedTrades(requestParameters);\n }\n\n /**\n * Fetches general exchange information, such as supported symbols, rate limits, and server time.\n *\n * Weight: 0\n *\n * @summary Get Exchange Info\n *\n * @returns {Promise<RestApiResponse<GetExchangeInfoResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/alpha/market-data/rest-api/Get-Exchange-Info Binance API Documentation}\n */\n getExchangeInfo(): Promise<RestApiResponse<GetExchangeInfoResponse>> {\n return this.marketDataApi.getExchangeInfo();\n }\n\n /**\n * Fetches Kline/candlestick bars for a symbol, which include open/high/low/close prices and volume over intervals. Useful for charting and analysis.\n *\n * Weight: 0\n *\n * @summary Klines (Candlestick Data)\n * @param {KlinesRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<KlinesResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/alpha/market-data/rest-api/Klines Binance API Documentation}\n */\n klines(requestParameters: KlinesRequest): Promise<RestApiResponse<KlinesResponse>> {\n return this.marketDataApi.klines(requestParameters);\n }\n\n /**\n * Gets the 24-hour rolling window price change statistics for a symbol, including volume and price changes.\n *\n * Weight: 0\n *\n * @summary Ticker (24hr Price Statistics)\n * @param {TickerRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<TickerResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/alpha/market-data/rest-api/24hr-ticker-price-change Binance API Documentation}\n */\n ticker(requestParameters: TickerRequest): Promise<RestApiResponse<TickerResponse>> {\n return this.marketDataApi.ticker(requestParameters);\n }\n\n /**\n * Retrieves a list of all available ALPHA tokens, including their IDs and symbols. Use this to find the token ID for constructing symbols in other endpoints.\n *\n * Weight: 0\n *\n * @summary Token List\n *\n * @returns {Promise<RestApiResponse<TokenListResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/alpha/market-data/rest-api/Token-List Binance API Documentation}\n */\n tokenList(): Promise<RestApiResponse<TokenListResponse>> {\n return this.marketDataApi.tokenList();\n }\n}\n","/**\n * Binance Alpha REST API\n *\n * OpenAPI Specification for the Binance Alpha REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nexport * from './types';\nexport * from './modules';\nexport * from './rest-api';\n","import { buildUserAgent, ConfigurationRestAPI, ALPHA_REST_API_PROD_URL } from '@binance/common';\nimport { name, version } from '../package.json';\nimport { RestAPI } from './rest-api';\n\nexport interface ConfigurationAlpha {\n configurationRestAPI?: ConfigurationRestAPI;\n}\n\nexport class Alpha {\n public restAPI!: RestAPI;\n\n constructor(config: ConfigurationAlpha) {\n const userAgent = buildUserAgent(name, version);\n\n if (config?.configurationRestAPI) {\n const configRestAPI = new ConfigurationRestAPI(\n config.configurationRestAPI\n ) as ConfigurationRestAPI & {\n baseOptions: Record<string, unknown>;\n };\n configRestAPI.basePath = configRestAPI.basePath || ALPHA_REST_API_PROD_URL;\n configRestAPI.baseOptions = configRestAPI.baseOptions || {};\n configRestAPI.baseOptions.headers = {\n ...(configRestAPI.baseOptions.headers || {}),\n 'User-Agent': userAgent,\n };\n this.restAPI = new RestAPI(configRestAPI);\n }\n }\n}\n"],"mappings":";;;;WACY;cAEG;;;;;;;;;;;;;;;;;;;AC6Bf,MAAM,iCAAiC,SAAU,eAAqC;AAClF,QAAO;EAeH,kBAAkB,OACd,QACA,QACA,WACA,SACA,UACuB;AAEvB,qBAAkB,oBAAoB,UAAU,OAAO;GAEvD,MAAMA,yBAAkD,EAAE;GAC1D,MAAMC,wBAAiD,EAAE;AAEzD,OAAI,WAAW,UAAa,WAAW,KACnC,wBAAuB,YAAY;AAEvC,OAAI,WAAW,UAAa,WAAW,KACnC,wBAAuB,YAAY;AAEvC,OAAI,cAAc,UAAa,cAAc,KACzC,wBAAuB,eAAe;AAE1C,OAAI,YAAY,UAAa,YAAY,KACrC,wBAAuB,aAAa;AAExC,OAAI,UAAU,UAAa,UAAU,KACjC,wBAAuB,WAAW;GAGtC,IAAIC;AACJ,OAAI,cAAc,cAAe,aAAY,cAAc;AAE3D,UAAO;IACH,UAAU;IACV,QAAQ;IACR,aAAa;IACb,YAAY;IACZ,UAAU;IACb;;EAWL,iBAAiB,YAAkC;GAC/C,MAAMF,yBAAkD,EAAE;GAC1D,MAAMC,wBAAiD,EAAE;GAEzD,IAAIC;AACJ,OAAI,cAAc,cAAe,aAAY,cAAc;AAE3D,UAAO;IACH,UAAU;IACV,QAAQ;IACR,aAAa;IACb,YAAY;IACZ,UAAU;IACb;;EAgBL,QAAQ,OACJ,QACA,UACA,OACA,WACA,YACuB;AAEvB,qBAAkB,UAAU,UAAU,OAAO;AAE7C,qBAAkB,UAAU,YAAY,SAAS;GAEjD,MAAMF,yBAAkD,EAAE;GAC1D,MAAMC,wBAAiD,EAAE;AAEzD,OAAI,WAAW,UAAa,WAAW,KACnC,wBAAuB,YAAY;AAEvC,OAAI,aAAa,UAAa,aAAa,KACvC,wBAAuB,cAAc;AAEzC,OAAI,UAAU,UAAa,UAAU,KACjC,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;;;;;;;;;;;;;;CAeL,iBACI,mBACkD;AAClD,SAAO,KAAK,cAAc,iBAAiB,kBAAkB;;;;;;;;;;;;;CAcjE,kBAAqE;AACjE,SAAO,KAAK,cAAc,iBAAiB;;;;;;;;;;;;;;CAe/C,OAAO,mBAA4E;AAC/E,SAAO,KAAK,cAAc,OAAO,kBAAkB;;;;;;;;;;;;;;CAevD,OAAO,mBAA4E;AAC/E,SAAO,KAAK,cAAc,OAAO,kBAAkB;;;;;;;;;;;;;CAcvD,YAAyD;AACrD,SAAO,KAAK,cAAc,WAAW;;;;;;;;;;;;;AE/J7C,IAAa,QAAb,MAAmB;CAGf,YAAY,QAA4B;EACpC,MAAM,YAAY,eAAe,MAAM,QAAQ;AAE/C,MAAI,QAAQ,sBAAsB;GAC9B,MAAM,gBAAgB,IAAI,qBACtB,OAAO,qBACV;AAGD,iBAAc,WAAW,cAAc,YAAYC;AACnD,iBAAc,cAAc,cAAc,eAAe,EAAE;AAC3D,iBAAc,YAAY,UAAU;IAChC,GAAI,cAAc,YAAY,WAAW,EAAE;IAC3C,cAAc;IACjB;AACD,QAAK,UAAU,IAAI,QAAQ,cAAc"}
1
+ {"version":3,"file":"index.mjs","names":["localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","localVarHeaderParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","ALPHA_REST_API_PROD_URL"],"sources":["../package.json","../src/rest-api/modules/market-data-api.ts","../src/rest-api/rest-api.ts","../src/rest-api/index.ts","../src/alpha.ts"],"sourcesContent":["{\n \"name\": \"@binance/alpha\",\n \"description\": \"Official Binance Alpha Connector - A lightweight library that provides a convenient interface to Binance's Alpha REST API.\",\n \"version\": \"1.0.15\",\n \"main\": \"./dist/index.js\",\n \"module\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"require\": \"./dist/index.js\",\n \"import\": \"./dist/index.mjs\"\n }\n },\n \"scripts\": {\n \"prepublishOnly\": \"npm run build\",\n \"build\": \"npm run clean && tsdown\",\n \"typecheck\": \"tsc --noEmit\",\n \"clean\": \"rm -rf dist\",\n \"test\": \"npx jest --maxWorkers=4 --bail\",\n \"test:watch\": \"npx jest --watch\",\n \"format\": \"npx prettier --ignore-path .prettierignore --write .\",\n \"lint\": \"npx eslint '**/*.ts' --fix\"\n },\n \"keywords\": [\n \"Binance\",\n \"API\",\n \"Alpha\",\n \"Connector\",\n \"REST\",\n \"Trading\"\n ],\n \"author\": \"Binance\",\n \"license\": \"MIT\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/binance/binance-connector-js.git\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/binance/binance-connector-js/issues\"\n },\n \"homepage\": \"https://github.com/binance/binance-connector-js#readme\",\n \"files\": [\n \"dist\"\n ],\n \"devDependencies\": {\n \"@types/jest\": \"^29.5.4\",\n \"@types/node\": \"^20.17.24\",\n \"eslint\": \"8.57.0\",\n \"jest\": \"^29.6.4\",\n \"json-with-bigint\": \"^3.4.4\",\n \"prettier\": \"^3.3.3\",\n \"ts-jest\": \"^29.1.1\",\n \"ts-node\": \"^10.9.1\",\n \"tsdown\": \"^0.16.5\",\n \"typescript\": \"^5.7.2\",\n \"typescript-eslint\": \"^8.24.0\"\n },\n \"dependencies\": {\n \"@binance/common\": \"2.4.0\",\n \"axios\": \"^1.7.4\"\n }\n}\n","/**\n * Binance Alpha REST API\n *\n * OpenAPI Specification for the Binance Alpha REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport {\n ConfigurationRestAPI,\n TimeUnit,\n RestApiResponse,\n assertParamExists,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type {\n AggregatedTradesResponse,\n GetExchangeInfoResponse,\n KlinesResponse,\n TickerResponse,\n TokenListResponse,\n} from '../types';\n\n/**\n * MarketDataApi - axios parameter creator\n */\nconst MarketDataApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Retrieves compressed, aggregated historical trades for a specific symbol. Useful for recent trade history.\n *\n * Weight: 0\n *\n * @summary Aggregated Trades\n * @param {string} symbol e.g., \"ALPHA_175USDT\" – use token ID from Token List\n * @param {number | bigint} [fromId] starting trade ID to fetch from\n * @param {number | bigint} [startTime] start timestamp (milliseconds)\n * @param {number | bigint} [endTime] end timestamp (milliseconds)\n * @param {number | bigint} [limit] number of results to return (default 500, max 1000)\n *\n * @throws {RequiredError}\n */\n aggregatedTrades: async (\n symbol: string,\n fromId?: number | bigint,\n startTime?: number | bigint,\n endTime?: number | bigint,\n limit?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'symbol' is not null or undefined\n assertParamExists('aggregatedTrades', 'symbol', symbol);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (symbol !== undefined && symbol !== null) {\n localVarQueryParameter['symbol'] = symbol;\n }\n if (fromId !== undefined && fromId !== null) {\n localVarQueryParameter['fromId'] = fromId;\n }\n if (startTime !== undefined && startTime !== null) {\n localVarQueryParameter['startTime'] = startTime;\n }\n if (endTime !== undefined && endTime !== null) {\n localVarQueryParameter['endTime'] = endTime;\n }\n if (limit !== undefined && limit !== null) {\n localVarQueryParameter['limit'] = limit;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/bapi/defi/v1/public/alpha-trade/agg-trades',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Fetches general exchange information, such as supported symbols, rate limits, and server time.\n *\n * Weight: 0\n *\n * @summary Get Exchange Info\n *\n * @throws {RequiredError}\n */\n getExchangeInfo: async (): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/bapi/defi/v1/public/alpha-trade/get-exchange-info',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Fetches Kline/candlestick bars for a symbol, which include open/high/low/close prices and volume over intervals. Useful for charting and analysis.\n *\n * Weight: 0\n *\n * @summary Klines (Candlestick Data)\n * @param {string} symbol e.g., \"ALPHA_175USDT\" – use token ID from Token List\n * @param {string} interval e.g., \"1h\" – supported intervals: 1s, 15s, 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M\n * @param {number | bigint} [limit] number of results to return (default 500, max 1000)\n * @param {number | bigint} [startTime] start timestamp (milliseconds)\n * @param {number | bigint} [endTime] end timestamp (milliseconds)\n *\n * @throws {RequiredError}\n */\n klines: async (\n symbol: string,\n interval: string,\n limit?: number | bigint,\n startTime?: number | bigint,\n endTime?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'symbol' is not null or undefined\n assertParamExists('klines', 'symbol', symbol);\n // verify required parameter 'interval' is not null or undefined\n assertParamExists('klines', 'interval', interval);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (symbol !== undefined && symbol !== null) {\n localVarQueryParameter['symbol'] = symbol;\n }\n if (interval !== undefined && interval !== null) {\n localVarQueryParameter['interval'] = interval;\n }\n if (limit !== undefined && limit !== null) {\n localVarQueryParameter['limit'] = limit;\n }\n if (startTime !== undefined && startTime !== null) {\n localVarQueryParameter['startTime'] = startTime;\n }\n if (endTime !== undefined && endTime !== null) {\n localVarQueryParameter['endTime'] = endTime;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/bapi/defi/v1/public/alpha-trade/klines',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Gets the 24-hour rolling window price change statistics for a symbol, including volume and price changes.\n *\n * Weight: 0\n *\n * @summary Ticker (24hr Price Statistics)\n * @param {string} symbol e.g., \"ALPHA_175USDT\" – use token ID from Token List\n *\n * @throws {RequiredError}\n */\n ticker: async (symbol: string): Promise<RequestArgs> => {\n // verify required parameter 'symbol' is not null or undefined\n assertParamExists('ticker', 'symbol', symbol);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (symbol !== undefined && symbol !== null) {\n localVarQueryParameter['symbol'] = symbol;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/bapi/defi/v1/public/alpha-trade/ticker',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Retrieves a list of all available ALPHA tokens, including their IDs and symbols. Use this to find the token ID for constructing symbols in other endpoints.\n *\n * Weight: 0\n *\n * @summary Token List\n *\n * @throws {RequiredError}\n */\n tokenList: async (): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/bapi/defi/v1/public/wallet-direct/buw/wallet/cex/alpha/all/token/list',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * MarketDataApi - interface\n * @interface MarketDataApi\n */\nexport interface MarketDataApiInterface {\n /**\n * Retrieves compressed, aggregated historical trades for a specific symbol. Useful for recent trade history.\n *\n * Weight: 0\n *\n * @summary Aggregated Trades\n * @param {AggregatedTradesRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n aggregatedTrades(\n requestParameters: AggregatedTradesRequest\n ): Promise<RestApiResponse<AggregatedTradesResponse>>;\n /**\n * Fetches general exchange information, such as supported symbols, rate limits, and server time.\n *\n * Weight: 0\n *\n * @summary Get Exchange Info\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n getExchangeInfo(): Promise<RestApiResponse<GetExchangeInfoResponse>>;\n /**\n * Fetches Kline/candlestick bars for a symbol, which include open/high/low/close prices and volume over intervals. Useful for charting and analysis.\n *\n * Weight: 0\n *\n * @summary Klines (Candlestick Data)\n * @param {KlinesRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n klines(requestParameters: KlinesRequest): Promise<RestApiResponse<KlinesResponse>>;\n /**\n * Gets the 24-hour rolling window price change statistics for a symbol, including volume and price changes.\n *\n * Weight: 0\n *\n * @summary Ticker (24hr Price Statistics)\n * @param {TickerRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n ticker(requestParameters: TickerRequest): Promise<RestApiResponse<TickerResponse>>;\n /**\n * Retrieves a list of all available ALPHA tokens, including their IDs and symbols. Use this to find the token ID for constructing symbols in other endpoints.\n *\n * Weight: 0\n *\n * @summary Token List\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n tokenList(): Promise<RestApiResponse<TokenListResponse>>;\n}\n\n/**\n * Request parameters for aggregatedTrades operation in MarketDataApi.\n * @interface AggregatedTradesRequest\n */\nexport interface AggregatedTradesRequest {\n /**\n * e.g., \"ALPHA_175USDT\" – use token ID from Token List\n * @type {string}\n * @memberof MarketDataApiAggregatedTrades\n */\n readonly symbol: string;\n\n /**\n * starting trade ID to fetch from\n * @type {number | bigint}\n * @memberof MarketDataApiAggregatedTrades\n */\n readonly fromId?: number | bigint;\n\n /**\n * start timestamp (milliseconds)\n * @type {number | bigint}\n * @memberof MarketDataApiAggregatedTrades\n */\n readonly startTime?: number | bigint;\n\n /**\n * end timestamp (milliseconds)\n * @type {number | bigint}\n * @memberof MarketDataApiAggregatedTrades\n */\n readonly endTime?: number | bigint;\n\n /**\n * number of results to return (default 500, max 1000)\n * @type {number | bigint}\n * @memberof MarketDataApiAggregatedTrades\n */\n readonly limit?: number | bigint;\n}\n\n/**\n * Request parameters for klines operation in MarketDataApi.\n * @interface KlinesRequest\n */\nexport interface KlinesRequest {\n /**\n * e.g., \"ALPHA_175USDT\" – use token ID from Token List\n * @type {string}\n * @memberof MarketDataApiKlines\n */\n readonly symbol: string;\n\n /**\n * e.g., \"1h\" – supported intervals: 1s, 15s, 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M\n * @type {string}\n * @memberof MarketDataApiKlines\n */\n readonly interval: string;\n\n /**\n * number of results to return (default 500, max 1000)\n * @type {number | bigint}\n * @memberof MarketDataApiKlines\n */\n readonly limit?: number | bigint;\n\n /**\n * start timestamp (milliseconds)\n * @type {number | bigint}\n * @memberof MarketDataApiKlines\n */\n readonly startTime?: number | bigint;\n\n /**\n * end timestamp (milliseconds)\n * @type {number | bigint}\n * @memberof MarketDataApiKlines\n */\n readonly endTime?: number | bigint;\n}\n\n/**\n * Request parameters for ticker operation in MarketDataApi.\n * @interface TickerRequest\n */\nexport interface TickerRequest {\n /**\n * e.g., \"ALPHA_175USDT\" – use token ID from Token List\n * @type {string}\n * @memberof MarketDataApiTicker\n */\n readonly symbol: string;\n}\n\n/**\n * MarketDataApi - object-oriented interface\n * @class MarketDataApi\n */\nexport class MarketDataApi implements MarketDataApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = MarketDataApiAxiosParamCreator(configuration);\n }\n\n /**\n * Retrieves compressed, aggregated historical trades for a specific symbol. Useful for recent trade history.\n *\n * Weight: 0\n *\n * @summary Aggregated Trades\n * @param {AggregatedTradesRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<AggregatedTradesResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/alpha/market-data/rest-api/Aggregated-Trades Binance API Documentation}\n */\n public async aggregatedTrades(\n requestParameters: AggregatedTradesRequest\n ): Promise<RestApiResponse<AggregatedTradesResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.aggregatedTrades(\n requestParameters?.symbol,\n requestParameters?.fromId,\n requestParameters?.startTime,\n requestParameters?.endTime,\n requestParameters?.limit\n );\n return sendRequest<AggregatedTradesResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: false }\n );\n }\n\n /**\n * Fetches general exchange information, such as supported symbols, rate limits, and server time.\n *\n * Weight: 0\n *\n * @summary Get Exchange Info\n * @returns {Promise<RestApiResponse<GetExchangeInfoResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/alpha/market-data/rest-api/Get-Exchange-Info Binance API Documentation}\n */\n public async getExchangeInfo(): Promise<RestApiResponse<GetExchangeInfoResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getExchangeInfo();\n return sendRequest<GetExchangeInfoResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: false }\n );\n }\n\n /**\n * Fetches Kline/candlestick bars for a symbol, which include open/high/low/close prices and volume over intervals. Useful for charting and analysis.\n *\n * Weight: 0\n *\n * @summary Klines (Candlestick Data)\n * @param {KlinesRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<KlinesResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/alpha/market-data/rest-api/Klines Binance API Documentation}\n */\n public async klines(\n requestParameters: KlinesRequest\n ): Promise<RestApiResponse<KlinesResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.klines(\n requestParameters?.symbol,\n requestParameters?.interval,\n requestParameters?.limit,\n requestParameters?.startTime,\n requestParameters?.endTime\n );\n return sendRequest<KlinesResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: false }\n );\n }\n\n /**\n * Gets the 24-hour rolling window price change statistics for a symbol, including volume and price changes.\n *\n * Weight: 0\n *\n * @summary Ticker (24hr Price Statistics)\n * @param {TickerRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<TickerResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/alpha/market-data/rest-api/24hr-ticker-price-change Binance API Documentation}\n */\n public async ticker(\n requestParameters: TickerRequest\n ): Promise<RestApiResponse<TickerResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.ticker(\n requestParameters?.symbol\n );\n return sendRequest<TickerResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: false }\n );\n }\n\n /**\n * Retrieves a list of all available ALPHA tokens, including their IDs and symbols. Use this to find the token ID for constructing symbols in other endpoints.\n *\n * Weight: 0\n *\n * @summary Token List\n * @returns {Promise<RestApiResponse<TokenListResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/alpha/market-data/rest-api/Token-List Binance API Documentation}\n */\n public async tokenList(): Promise<RestApiResponse<TokenListResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.tokenList();\n return sendRequest<TokenListResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: false }\n );\n }\n}\n","/**\n * Binance Alpha REST API\n *\n * OpenAPI Specification for the Binance Alpha REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport { ConfigurationRestAPI, RestApiResponse, sendRequest } from '@binance/common';\nimport { MarketDataApi } from './modules/market-data-api';\n\nimport type {\n AggregatedTradesRequest,\n KlinesRequest,\n TickerRequest,\n} from './modules/market-data-api';\n\nimport type {\n AggregatedTradesResponse,\n GetExchangeInfoResponse,\n KlinesResponse,\n TickerResponse,\n TokenListResponse,\n} from './types';\n\nexport class RestAPI {\n private configuration: ConfigurationRestAPI;\n private marketDataApi: MarketDataApi;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.marketDataApi = new MarketDataApi(configuration);\n }\n\n /**\n * Generic function to send a request.\n * @param endpoint - The API endpoint to call.\n * @param method - HTTP method to use (GET, POST, DELETE, etc.).\n * @param queryParams - Query parameters for the request.\n * @param bodyParams - Body parameters for the request.\n *\n * @returns A promise resolving to the response data object.\n */\n sendRequest<T>(\n endpoint: string,\n method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',\n queryParams: Record<string, unknown> = {},\n bodyParams: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(\n this.configuration,\n endpoint,\n method,\n queryParams,\n bodyParams,\n undefined,\n undefined\n );\n }\n\n /**\n * Generic function to send a signed request.\n * @param endpoint - The API endpoint to call.\n * @param method - HTTP method to use (GET, POST, DELETE, etc.).\n * @param queryParams - Query parameters for the request.\n * @param bodyParams - Body parameters for the request.\n *\n * @returns A promise resolving to the response data object.\n */\n sendSignedRequest<T>(\n endpoint: string,\n method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',\n queryParams: Record<string, unknown> = {},\n bodyParams: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(\n this.configuration,\n endpoint,\n method,\n queryParams,\n bodyParams,\n undefined,\n undefined,\n { isSigned: true }\n );\n }\n\n /**\n * Retrieves compressed, aggregated historical trades for a specific symbol. Useful for recent trade history.\n *\n * Weight: 0\n *\n * @summary Aggregated Trades\n * @param {AggregatedTradesRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<AggregatedTradesResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/alpha/market-data/rest-api/Aggregated-Trades Binance API Documentation}\n */\n aggregatedTrades(\n requestParameters: AggregatedTradesRequest\n ): Promise<RestApiResponse<AggregatedTradesResponse>> {\n return this.marketDataApi.aggregatedTrades(requestParameters);\n }\n\n /**\n * Fetches general exchange information, such as supported symbols, rate limits, and server time.\n *\n * Weight: 0\n *\n * @summary Get Exchange Info\n *\n * @returns {Promise<RestApiResponse<GetExchangeInfoResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/alpha/market-data/rest-api/Get-Exchange-Info Binance API Documentation}\n */\n getExchangeInfo(): Promise<RestApiResponse<GetExchangeInfoResponse>> {\n return this.marketDataApi.getExchangeInfo();\n }\n\n /**\n * Fetches Kline/candlestick bars for a symbol, which include open/high/low/close prices and volume over intervals. Useful for charting and analysis.\n *\n * Weight: 0\n *\n * @summary Klines (Candlestick Data)\n * @param {KlinesRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<KlinesResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/alpha/market-data/rest-api/Klines Binance API Documentation}\n */\n klines(requestParameters: KlinesRequest): Promise<RestApiResponse<KlinesResponse>> {\n return this.marketDataApi.klines(requestParameters);\n }\n\n /**\n * Gets the 24-hour rolling window price change statistics for a symbol, including volume and price changes.\n *\n * Weight: 0\n *\n * @summary Ticker (24hr Price Statistics)\n * @param {TickerRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<TickerResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/alpha/market-data/rest-api/24hr-ticker-price-change Binance API Documentation}\n */\n ticker(requestParameters: TickerRequest): Promise<RestApiResponse<TickerResponse>> {\n return this.marketDataApi.ticker(requestParameters);\n }\n\n /**\n * Retrieves a list of all available ALPHA tokens, including their IDs and symbols. Use this to find the token ID for constructing symbols in other endpoints.\n *\n * Weight: 0\n *\n * @summary Token List\n *\n * @returns {Promise<RestApiResponse<TokenListResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/alpha/market-data/rest-api/Token-List Binance API Documentation}\n */\n tokenList(): Promise<RestApiResponse<TokenListResponse>> {\n return this.marketDataApi.tokenList();\n }\n}\n","/**\n * Binance Alpha REST API\n *\n * OpenAPI Specification for the Binance Alpha REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nexport * from './types';\nexport * from './modules';\nexport * from './rest-api';\n","import { buildUserAgent, ConfigurationRestAPI, ALPHA_REST_API_PROD_URL } from '@binance/common';\nimport { name, version } from '../package.json';\nimport { RestAPI } from './rest-api';\n\nexport interface ConfigurationAlpha {\n configurationRestAPI?: ConfigurationRestAPI;\n}\n\nexport class Alpha {\n public restAPI!: RestAPI;\n\n constructor(config: ConfigurationAlpha) {\n const userAgent = buildUserAgent(name, version);\n\n if (config?.configurationRestAPI) {\n const configRestAPI = new ConfigurationRestAPI(\n config.configurationRestAPI\n ) as ConfigurationRestAPI & {\n baseOptions: Record<string, unknown>;\n };\n configRestAPI.basePath = configRestAPI.basePath || ALPHA_REST_API_PROD_URL;\n configRestAPI.baseOptions = configRestAPI.baseOptions || {};\n configRestAPI.baseOptions.headers = {\n ...(configRestAPI.baseOptions.headers || {}),\n 'User-Agent': userAgent,\n };\n this.restAPI = new RestAPI(configRestAPI);\n }\n }\n}\n"],"mappings":";;;;WACY;cAEG;;;;;;;;;;;;;;;;;;;AC6Bf,MAAM,iCAAiC,SAAU,eAAqC;AAClF,QAAO;EAeH,kBAAkB,OACd,QACA,QACA,WACA,SACA,UACuB;AAEvB,qBAAkB,oBAAoB,UAAU,OAAO;GAEvD,MAAMA,yBAAkD,EAAE;GAC1D,MAAMC,wBAAiD,EAAE;GACzD,MAAMC,0BAAmD,EAAE;AAE3D,OAAI,WAAW,UAAa,WAAW,KACnC,wBAAuB,YAAY;AAEvC,OAAI,WAAW,UAAa,WAAW,KACnC,wBAAuB,YAAY;AAEvC,OAAI,cAAc,UAAa,cAAc,KACzC,wBAAuB,eAAe;AAE1C,OAAI,YAAY,UAAa,YAAY,KACrC,wBAAuB,aAAa;AAExC,OAAI,UAAU,UAAa,UAAU,KACjC,wBAAuB,WAAW;GAGtC,IAAIC;AACJ,OAAI,cAAc,cAAe,aAAY,cAAc;AAE3D,UAAO;IACH,UAAU;IACV,QAAQ;IACR,aAAa;IACb,YAAY;IACZ,c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,MAAI,QAAQ,sBAAsB;GAC9B,MAAM,gBAAgB,IAAI,qBACtB,OAAO,qBACV;AAGD,iBAAc,WAAW,cAAc,YAAYC;AACnD,iBAAc,cAAc,cAAc,eAAe,EAAE;AAC3D,iBAAc,YAAY,UAAU;IAChC,GAAI,cAAc,YAAY,WAAW,EAAE;IAC3C,cAAc;IACjB;AACD,QAAK,UAAU,IAAI,QAAQ,cAAc"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@binance/alpha",
3
3
  "description": "Official Binance Alpha Connector - A lightweight library that provides a convenient interface to Binance's Alpha REST API.",
4
- "version": "1.0.14",
4
+ "version": "1.0.15",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
7
7
  "types": "./dist/index.d.ts",
@@ -56,7 +56,7 @@
56
56
  "typescript-eslint": "^8.24.0"
57
57
  },
58
58
  "dependencies": {
59
- "@binance/common": "2.3.14",
59
+ "@binance/common": "2.4.0",
60
60
  "axios": "^1.7.4"
61
61
  }
62
62
  }