@binance/dual-investment 5.0.2 → 5.0.3

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/dual-investment";
17
- var version = "5.0.2";
17
+ var version = "5.0.3";
18
18
 
19
19
  //#endregion
20
20
  //#region src/rest-api/modules/market-data-api.ts
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","localVarHeaderParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","localVarHeaderParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","ConfigurationRestAPI","DUAL_INVESTMENT_REST_API_PROD_URL"],"sources":["../package.json","../src/rest-api/modules/market-data-api.ts","../src/rest-api/modules/trade-api.ts","../src/rest-api/rest-api.ts","../src/rest-api/index.ts","../src/dual-investment.ts"],"sourcesContent":["{\n \"name\": \"@binance/dual-investment\",\n \"description\": \"Official Binance Dual Investment Connector - A lightweight library that provides a convenient interface to Binance's Dual Investment REST API.\",\n \"version\": \"5.0.2\",\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 \"Dual Investment\",\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.5.8\",\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.6\",\n \"axios\": \"^1.7.4\"\n }\n}\n","/**\n * Dual Investment REST API\n *\n * Query products, request quotes, and subscribe to Advanced Earn Dual Investment strategies.\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 */\nimport {\n ConfigurationRestAPI,\n TimeUnit,\n RestApiResponse,\n assertParamExists,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type { GetDualInvestmentProductListResponse } from '../types';\n\n/**\n * MarketDataApi - axios parameter creator\n */\nconst MarketDataApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Get Dual Investment product list\n *\n * Weight(IP): 1\n *\n * @summary Get Dual Investment product list\n * @param {GetDualInvestmentProductListOptionTypeEnum} optionType Input CALL or PUT\n * @param {string} exercisedCoin Target exercised asset, e.g.: if you subscribe to a high sell product (call option), you should input:\n * `optionType: CALL`, `exercisedCoin: USDT`, `investCoin: BNB`; if you subscribe to a low buy product (put\n * option), you should input: `optionType: PUT`, `exercisedCoin: BNB`, `investCoin: USDT`\n * @param {string} investCoin Asset used for subscribing, e.g.: if you subscribe to a high sell product (call option), you should input:\n * `optionType: CALL`, `exercisedCoin: USDT`, `investCoin: BNB`; if you subscribe to a low buy product (put\n * option), you should input: `optionType: PUT`, `exercisedCoin: BNB`, `investCoin: USDT`\n * @param {number | bigint} [pageSize] Number of records per page\n * @param {number | bigint} [pageIndex] Page index\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n getDualInvestmentProductList: async (\n optionType: GetDualInvestmentProductListOptionTypeEnum,\n exercisedCoin: string,\n investCoin: string,\n pageSize?: number | bigint,\n pageIndex?: number | bigint,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'optionType' is not null or undefined\n assertParamExists('getDualInvestmentProductList', 'optionType', optionType);\n // verify required parameter 'exercisedCoin' is not null or undefined\n assertParamExists('getDualInvestmentProductList', 'exercisedCoin', exercisedCoin);\n // verify required parameter 'investCoin' is not null or undefined\n assertParamExists('getDualInvestmentProductList', 'investCoin', investCoin);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (optionType !== undefined && optionType !== null) {\n localVarQueryParameter['optionType'] = optionType;\n }\n if (exercisedCoin !== undefined && exercisedCoin !== null) {\n localVarQueryParameter['exercisedCoin'] = exercisedCoin;\n }\n if (investCoin !== undefined && investCoin !== null) {\n localVarQueryParameter['investCoin'] = investCoin;\n }\n if (pageSize !== undefined && pageSize !== null) {\n localVarQueryParameter['pageSize'] = pageSize;\n }\n if (pageIndex !== undefined && pageIndex !== null) {\n localVarQueryParameter['pageIndex'] = pageIndex;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/dci/product/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 * Get Dual Investment product list\n *\n * Weight(IP): 1\n *\n * @summary Get Dual Investment product list\n * @param {GetDualInvestmentProductListRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n getDualInvestmentProductList(\n requestParameters: GetDualInvestmentProductListRequest\n ): Promise<RestApiResponse<GetDualInvestmentProductListResponse>>;\n}\n\n/**\n * Request parameters for getDualInvestmentProductList operation in MarketDataApi.\n * @interface GetDualInvestmentProductListRequest\n */\nexport interface GetDualInvestmentProductListRequest {\n /**\n * Input CALL or PUT\n * @type {'CALL' | 'PUT'}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly optionType: GetDualInvestmentProductListOptionTypeEnum;\n\n /**\n * Target exercised asset, e.g.: if you subscribe to a high sell product (call option), you should input:\n * `optionType: CALL`, `exercisedCoin: USDT`, `investCoin: BNB`; if you subscribe to a low buy product (put\n * option), you should input: `optionType: PUT`, `exercisedCoin: BNB`, `investCoin: USDT`\n * @type {string}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly exercisedCoin: string;\n\n /**\n * Asset used for subscribing, e.g.: if you subscribe to a high sell product (call option), you should input:\n * `optionType: CALL`, `exercisedCoin: USDT`, `investCoin: BNB`; if you subscribe to a low buy product (put\n * option), you should input: `optionType: PUT`, `exercisedCoin: BNB`, `investCoin: USDT`\n * @type {string}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly investCoin: string;\n\n /**\n * Number of records per page\n * @type {number | bigint}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly pageSize?: number | bigint;\n\n /**\n * Page index\n * @type {number | bigint}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly pageIndex?: number | bigint;\n\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly recvWindow?: number | bigint;\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 * Get Dual Investment product list\n *\n * Weight(IP): 1\n *\n * @summary Get Dual Investment product list\n * @param {GetDualInvestmentProductListRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetDualInvestmentProductListResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/market-data#get-dual-investment-product-list Binance API Documentation}\n */\n public async getDualInvestmentProductList(\n requestParameters: GetDualInvestmentProductListRequest\n ): Promise<RestApiResponse<GetDualInvestmentProductListResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getDualInvestmentProductList(\n requestParameters?.optionType,\n requestParameters?.exercisedCoin,\n requestParameters?.investCoin,\n requestParameters?.pageSize,\n requestParameters?.pageIndex,\n requestParameters?.recvWindow\n );\n return sendRequest<GetDualInvestmentProductListResponse>(\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\nexport enum GetDualInvestmentProductListOptionTypeEnum {\n CALL = 'CALL',\n PUT = 'PUT',\n}\n","/**\n * Dual Investment REST API\n *\n * Query products, request quotes, and subscribe to Advanced Earn Dual Investment strategies.\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 */\nimport {\n ConfigurationRestAPI,\n TimeUnit,\n RestApiResponse,\n assertParamExists,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type {\n ChangeAutoCompoundStatusResponse,\n CheckDualInvestmentAccountsResponse,\n GetDualInvestmentPositionsResponse,\n SubscribeDualInvestmentProductsResponse,\n} from '../types';\n\n/**\n * TradeApi - axios parameter creator\n */\nconst TradeApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Change Auto-Compound status\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * Notes:\n * - 15:31 ~ 16:00 UTC+8: This function is disabled.\n *\n * @summary Change Auto-Compound status (USER_DATA)\n * @param {string} positionId Get positionId from `/sapi/v1/dci/product/positions`\n * @param {ChangeAutoCompoundStatusAutoCompoundPlanEnum} autoCompoundPlan `NONE`: switch off the plan, `STANDARD`: standard plan, `ADVANCED`: advanced plan\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n changeAutoCompoundStatus: async (\n positionId: string,\n autoCompoundPlan: ChangeAutoCompoundStatusAutoCompoundPlanEnum,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'positionId' is not null or undefined\n assertParamExists('changeAutoCompoundStatus', 'positionId', positionId);\n // verify required parameter 'autoCompoundPlan' is not null or undefined\n assertParamExists('changeAutoCompoundStatus', 'autoCompoundPlan', autoCompoundPlan);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (positionId !== undefined && positionId !== null) {\n localVarQueryParameter['positionId'] = positionId;\n }\n if (autoCompoundPlan !== undefined && autoCompoundPlan !== null) {\n localVarQueryParameter['autoCompoundPlan'] = autoCompoundPlan;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/dci/product/auto_compound/edit-status',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Check Dual Investment accounts\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * @summary Check Dual Investment accounts (USER_DATA)\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n checkDualInvestmentAccounts: async (recvWindow?: number | bigint): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/dci/product/accounts',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get Dual Investment positions (batch)\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * @summary Get Dual Investment positions (USER_DATA)\n * @param {GetDualInvestmentPositionsStatusEnum} [status] `PENDING`: Products are purchasing, will give results later; `PURCHASE_SUCCESS`: purchase successfully;\n * `SETTLED`: Products are finish settling; `PURCHASE_FAIL`: fail to purchase; `REFUNDING`: refund ongoing;\n * `REFUND_SUCCESS`: refund to spot account successfully; `SETTLING`: Products are settling. If don't fill this\n * field, will response all the position status.\n * @param {number | bigint} [pageSize] Number of records per page\n * @param {number | bigint} [pageIndex] Page index\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n getDualInvestmentPositions: async (\n status?: GetDualInvestmentPositionsStatusEnum,\n pageSize?: number | bigint,\n pageIndex?: number | bigint,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (status !== undefined && status !== null) {\n localVarQueryParameter['status'] = status;\n }\n if (pageSize !== undefined && pageSize !== null) {\n localVarQueryParameter['pageSize'] = pageSize;\n }\n if (pageIndex !== undefined && pageIndex !== null) {\n localVarQueryParameter['pageIndex'] = pageIndex;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/dci/product/positions',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Subscribe Dual Investment products\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * Notes:\n * - Failed messages:\n * - Products are not available. This means APR changed to a lower value, or the order is unavailable.\n * - Failed. This means system or network errors.\n *\n * @summary Subscribe Dual Investment products (USER_DATA)\n * @param {string} id get id from `/sapi/v1/dci/product/list`\n * @param {string} orderId get orderId from `/sapi/v1/dci/product/list`\n * @param {number} depositAmount the amount for subscribing\n * @param {SubscribeDualInvestmentProductsAutoCompoundPlanEnum} autoCompoundPlan `NONE`: switch off the plan, `STANDARD`: standard plan, `ADVANCED`: advanced plan\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n subscribeDualInvestmentProducts: async (\n id: string,\n orderId: string,\n depositAmount: number,\n autoCompoundPlan: SubscribeDualInvestmentProductsAutoCompoundPlanEnum,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'id' is not null or undefined\n assertParamExists('subscribeDualInvestmentProducts', 'id', id);\n // verify required parameter 'orderId' is not null or undefined\n assertParamExists('subscribeDualInvestmentProducts', 'orderId', orderId);\n // verify required parameter 'depositAmount' is not null or undefined\n assertParamExists('subscribeDualInvestmentProducts', 'depositAmount', depositAmount);\n // verify required parameter 'autoCompoundPlan' is not null or undefined\n assertParamExists(\n 'subscribeDualInvestmentProducts',\n 'autoCompoundPlan',\n autoCompoundPlan\n );\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (id !== undefined && id !== null) {\n localVarQueryParameter['id'] = id;\n }\n if (orderId !== undefined && orderId !== null) {\n localVarQueryParameter['orderId'] = orderId;\n }\n if (depositAmount !== undefined && depositAmount !== null) {\n localVarQueryParameter['depositAmount'] = depositAmount;\n }\n if (autoCompoundPlan !== undefined && autoCompoundPlan !== null) {\n localVarQueryParameter['autoCompoundPlan'] = autoCompoundPlan;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/dci/product/subscribe',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * TradeApi - interface\n * @interface TradeApi\n */\nexport interface TradeApiInterface {\n /**\n * Change Auto-Compound status\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * Notes:\n * - 15:31 ~ 16:00 UTC+8: This function is disabled.\n *\n * @summary Change Auto-Compound status (USER_DATA)\n * @param {ChangeAutoCompoundStatusRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n changeAutoCompoundStatus(\n requestParameters: ChangeAutoCompoundStatusRequest\n ): Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>>;\n /**\n * Check Dual Investment accounts\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * @summary Check Dual Investment accounts (USER_DATA)\n * @param {CheckDualInvestmentAccountsRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n checkDualInvestmentAccounts(\n requestParameters?: CheckDualInvestmentAccountsRequest\n ): Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>>;\n /**\n * Get Dual Investment positions (batch)\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * @summary Get Dual Investment positions (USER_DATA)\n * @param {GetDualInvestmentPositionsRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n getDualInvestmentPositions(\n requestParameters?: GetDualInvestmentPositionsRequest\n ): Promise<RestApiResponse<GetDualInvestmentPositionsResponse>>;\n /**\n * Subscribe Dual Investment products\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * Notes:\n * - Failed messages:\n * - Products are not available. This means APR changed to a lower value, or the order is unavailable.\n * - Failed. This means system or network errors.\n *\n * @summary Subscribe Dual Investment products (USER_DATA)\n * @param {SubscribeDualInvestmentProductsRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n subscribeDualInvestmentProducts(\n requestParameters: SubscribeDualInvestmentProductsRequest\n ): Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>>;\n}\n\n/**\n * Request parameters for changeAutoCompoundStatus operation in TradeApi.\n * @interface ChangeAutoCompoundStatusRequest\n */\nexport interface ChangeAutoCompoundStatusRequest {\n /**\n * Get positionId from `/sapi/v1/dci/product/positions`\n * @type {string}\n * @memberof TradeApiChangeAutoCompoundStatus\n */\n readonly positionId: string;\n\n /**\n * `NONE`: switch off the plan, `STANDARD`: standard plan, `ADVANCED`: advanced plan\n * @type {'NONE' | 'STANDARD' | 'ADVANCED'}\n * @memberof TradeApiChangeAutoCompoundStatus\n */\n readonly autoCompoundPlan: ChangeAutoCompoundStatusAutoCompoundPlanEnum;\n\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof TradeApiChangeAutoCompoundStatus\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for checkDualInvestmentAccounts operation in TradeApi.\n * @interface CheckDualInvestmentAccountsRequest\n */\nexport interface CheckDualInvestmentAccountsRequest {\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof TradeApiCheckDualInvestmentAccounts\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for getDualInvestmentPositions operation in TradeApi.\n * @interface GetDualInvestmentPositionsRequest\n */\nexport interface GetDualInvestmentPositionsRequest {\n /**\n * `PENDING`: Products are purchasing, will give results later; `PURCHASE_SUCCESS`: purchase successfully;\n * `SETTLED`: Products are finish settling; `PURCHASE_FAIL`: fail to purchase; `REFUNDING`: refund ongoing;\n * `REFUND_SUCCESS`: refund to spot account successfully; `SETTLING`: Products are settling. If don't fill this\n * field, will response all the position status.\n * @type {'PENDING' | 'PURCHASE_SUCCESS' | 'SETTLED' | 'PURCHASE_FAIL' | 'REFUNDING' | 'REFUND_SUCCESS' | 'SETTLING'}\n * @memberof TradeApiGetDualInvestmentPositions\n */\n readonly status?: GetDualInvestmentPositionsStatusEnum;\n\n /**\n * Number of records per page\n * @type {number | bigint}\n * @memberof TradeApiGetDualInvestmentPositions\n */\n readonly pageSize?: number | bigint;\n\n /**\n * Page index\n * @type {number | bigint}\n * @memberof TradeApiGetDualInvestmentPositions\n */\n readonly pageIndex?: number | bigint;\n\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof TradeApiGetDualInvestmentPositions\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for subscribeDualInvestmentProducts operation in TradeApi.\n * @interface SubscribeDualInvestmentProductsRequest\n */\nexport interface SubscribeDualInvestmentProductsRequest {\n /**\n * get id from `/sapi/v1/dci/product/list`\n * @type {string}\n * @memberof TradeApiSubscribeDualInvestmentProducts\n */\n readonly id: string;\n\n /**\n * get orderId from `/sapi/v1/dci/product/list`\n * @type {string}\n * @memberof TradeApiSubscribeDualInvestmentProducts\n */\n readonly orderId: string;\n\n /**\n * the amount for subscribing\n * @type {number}\n * @memberof TradeApiSubscribeDualInvestmentProducts\n */\n readonly depositAmount: number;\n\n /**\n * `NONE`: switch off the plan, `STANDARD`: standard plan, `ADVANCED`: advanced plan\n * @type {'NONE' | 'STANDARD' | 'ADVANCED'}\n * @memberof TradeApiSubscribeDualInvestmentProducts\n */\n readonly autoCompoundPlan: SubscribeDualInvestmentProductsAutoCompoundPlanEnum;\n\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof TradeApiSubscribeDualInvestmentProducts\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * TradeApi - object-oriented interface\n * @class TradeApi\n */\nexport class TradeApi implements TradeApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = TradeApiAxiosParamCreator(configuration);\n }\n\n /**\n * Change Auto-Compound status\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * Notes:\n * - 15:31 ~ 16:00 UTC+8: This function is disabled.\n *\n * @summary Change Auto-Compound status (USER_DATA)\n * @param {ChangeAutoCompoundStatusRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/trade#change-auto-compound-status Binance API Documentation}\n */\n public async changeAutoCompoundStatus(\n requestParameters: ChangeAutoCompoundStatusRequest\n ): Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.changeAutoCompoundStatus(\n requestParameters?.positionId,\n requestParameters?.autoCompoundPlan,\n requestParameters?.recvWindow\n );\n return sendRequest<ChangeAutoCompoundStatusResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Check Dual Investment accounts\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * @summary Check Dual Investment accounts (USER_DATA)\n * @param {CheckDualInvestmentAccountsRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/trade#check-dual-investment-accounts Binance API Documentation}\n */\n public async checkDualInvestmentAccounts(\n requestParameters: CheckDualInvestmentAccountsRequest = {}\n ): Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.checkDualInvestmentAccounts(\n requestParameters?.recvWindow\n );\n return sendRequest<CheckDualInvestmentAccountsResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get Dual Investment positions (batch)\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * @summary Get Dual Investment positions (USER_DATA)\n * @param {GetDualInvestmentPositionsRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetDualInvestmentPositionsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/trade#get-dual-investment-positions Binance API Documentation}\n */\n public async getDualInvestmentPositions(\n requestParameters: GetDualInvestmentPositionsRequest = {}\n ): Promise<RestApiResponse<GetDualInvestmentPositionsResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getDualInvestmentPositions(\n requestParameters?.status,\n requestParameters?.pageSize,\n requestParameters?.pageIndex,\n requestParameters?.recvWindow\n );\n return sendRequest<GetDualInvestmentPositionsResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Subscribe Dual Investment products\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * Notes:\n * - Failed messages:\n * - Products are not available. This means APR changed to a lower value, or the order is unavailable.\n * - Failed. This means system or network errors.\n *\n * @summary Subscribe Dual Investment products (USER_DATA)\n * @param {SubscribeDualInvestmentProductsRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/trade#subscribe-dual-investment-products Binance API Documentation}\n */\n public async subscribeDualInvestmentProducts(\n requestParameters: SubscribeDualInvestmentProductsRequest\n ): Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>> {\n const localVarAxiosArgs =\n await this.localVarAxiosParamCreator.subscribeDualInvestmentProducts(\n requestParameters?.id,\n requestParameters?.orderId,\n requestParameters?.depositAmount,\n requestParameters?.autoCompoundPlan,\n requestParameters?.recvWindow\n );\n return sendRequest<SubscribeDualInvestmentProductsResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n}\n\nexport enum ChangeAutoCompoundStatusAutoCompoundPlanEnum {\n NONE = 'NONE',\n STANDARD = 'STANDARD',\n ADVANCED = 'ADVANCED',\n}\n\nexport enum GetDualInvestmentPositionsStatusEnum {\n PENDING = 'PENDING',\n PURCHASE_SUCCESS = 'PURCHASE_SUCCESS',\n SETTLED = 'SETTLED',\n PURCHASE_FAIL = 'PURCHASE_FAIL',\n REFUNDING = 'REFUNDING',\n REFUND_SUCCESS = 'REFUND_SUCCESS',\n SETTLING = 'SETTLING',\n}\n\nexport enum SubscribeDualInvestmentProductsAutoCompoundPlanEnum {\n NONE = 'NONE',\n STANDARD = 'STANDARD',\n ADVANCED = 'ADVANCED',\n}\n","/**\n * Dual Investment REST API\n *\n * Query products, request quotes, and subscribe to Advanced Earn Dual Investment strategies.\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';\nimport { TradeApi } from './modules/trade-api';\n\nimport type { GetDualInvestmentProductListRequest } from './modules/market-data-api';\nimport type {\n ChangeAutoCompoundStatusRequest,\n CheckDualInvestmentAccountsRequest,\n GetDualInvestmentPositionsRequest,\n SubscribeDualInvestmentProductsRequest,\n} from './modules/trade-api';\n\nimport type { GetDualInvestmentProductListResponse } from './types';\nimport type {\n ChangeAutoCompoundStatusResponse,\n CheckDualInvestmentAccountsResponse,\n GetDualInvestmentPositionsResponse,\n SubscribeDualInvestmentProductsResponse,\n} from './types';\n\nexport class RestAPI {\n private configuration: ConfigurationRestAPI;\n private marketDataApi: MarketDataApi;\n private tradeApi: TradeApi;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.marketDataApi = new MarketDataApi(configuration);\n this.tradeApi = new TradeApi(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 * Get Dual Investment product list\n *\n * Weight(IP): 1\n *\n * @summary Get Dual Investment product list\n * @param {GetDualInvestmentProductListRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetDualInvestmentProductListResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/market-data#get-dual-investment-product-list Binance API Documentation}\n */\n getDualInvestmentProductList(\n requestParameters: GetDualInvestmentProductListRequest\n ): Promise<RestApiResponse<GetDualInvestmentProductListResponse>> {\n return this.marketDataApi.getDualInvestmentProductList(requestParameters);\n }\n\n /**\n * Change Auto-Compound status\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * Notes:\n * - 15:31 ~ 16:00 UTC+8: This function is disabled.\n *\n * @summary Change Auto-Compound status (USER_DATA)\n * @param {ChangeAutoCompoundStatusRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/trade#change-auto-compound-status Binance API Documentation}\n */\n changeAutoCompoundStatus(\n requestParameters: ChangeAutoCompoundStatusRequest\n ): Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>> {\n return this.tradeApi.changeAutoCompoundStatus(requestParameters);\n }\n\n /**\n * Check Dual Investment accounts\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * @summary Check Dual Investment accounts (USER_DATA)\n * @param {CheckDualInvestmentAccountsRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/trade#check-dual-investment-accounts Binance API Documentation}\n */\n checkDualInvestmentAccounts(\n requestParameters: CheckDualInvestmentAccountsRequest = {}\n ): Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>> {\n return this.tradeApi.checkDualInvestmentAccounts(requestParameters);\n }\n\n /**\n * Get Dual Investment positions (batch)\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * @summary Get Dual Investment positions (USER_DATA)\n * @param {GetDualInvestmentPositionsRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetDualInvestmentPositionsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/trade#get-dual-investment-positions Binance API Documentation}\n */\n getDualInvestmentPositions(\n requestParameters: GetDualInvestmentPositionsRequest = {}\n ): Promise<RestApiResponse<GetDualInvestmentPositionsResponse>> {\n return this.tradeApi.getDualInvestmentPositions(requestParameters);\n }\n\n /**\n * Subscribe Dual Investment products\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * Notes:\n * - Failed messages:\n * - Products are not available. This means APR changed to a lower value, or the order is unavailable.\n * - Failed. This means system or network errors.\n *\n * @summary Subscribe Dual Investment products (USER_DATA)\n * @param {SubscribeDualInvestmentProductsRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/trade#subscribe-dual-investment-products Binance API Documentation}\n */\n subscribeDualInvestmentProducts(\n requestParameters: SubscribeDualInvestmentProductsRequest\n ): Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>> {\n return this.tradeApi.subscribeDualInvestmentProducts(requestParameters);\n }\n}\n","/**\n * Dual Investment REST API\n *\n * Query products, request quotes, and subscribe to Advanced Earn Dual Investment strategies.\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 {\n buildUserAgent,\n ConfigurationRestAPI,\n DUAL_INVESTMENT_REST_API_PROD_URL,\n} from '@binance/common';\nimport { name, version } from '../package.json';\nimport { RestAPI } from './rest-api';\n\nexport interface ConfigurationDualInvestment {\n configurationRestAPI?: ConfigurationRestAPI;\n}\n\nexport class DualInvestment {\n public restAPI!: RestAPI;\n\n constructor(config: ConfigurationDualInvestment) {\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 || DUAL_INVESTMENT_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;;;;;;;;;;;;;;;;;;;ACsBf,MAAM,iCAAiC,SAAU,eAAqC;AAClF,QAAO,EAoBH,8BAA8B,OAC1B,YACA,eACA,YACA,UACA,WACA,eACuB;AAEvB,0CAAkB,gCAAgC,cAAc,WAAW;AAE3E,0CAAkB,gCAAgC,iBAAiB,cAAc;AAEjF,0CAAkB,gCAAgC,cAAc,WAAW;EAE3E,MAAMA,yBAAkD,EAAE;EAC1D,MAAMC,wBAAiD,EAAE;EACzD,MAAMC,0BAAmD,EAAE;AAE3D,MAAI,eAAe,UAAa,eAAe,KAC3C,wBAAuB,gBAAgB;AAE3C,MAAI,kBAAkB,UAAa,kBAAkB,KACjD,wBAAuB,mBAAmB;AAE9C,MAAI,eAAe,UAAa,eAAe,KAC3C,wBAAuB,gBAAgB;AAE3C,MAAI,aAAa,UAAa,aAAa,KACvC,wBAAuB,cAAc;AAEzC,MAAI,cAAc,UAAa,cAAc,KACzC,wBAAuB,eAAe;AAE1C,MAAI,eAAe,UAAa,eAAe,KAC3C,wBAAuB,gBAAgB;EAG3C,IAAIC;AACJ,MAAI,cAAc,cAAe,aAAY,cAAc;AAE3D,SAAO;GACH,UAAU;GACV,QAAQ;GACR,aAAa;GACb,YAAY;GACZ,cAAc;GACd,UAAU;GACb;IAER;;;;;;AAgFL,IAAa,gBAAb,MAA6D;CAIzD,YAAY,eAAqC;AAC7C,OAAK,gBAAgB;AACrB,OAAK,4BAA4B,+BAA+B,cAAc;;;;;;;;;;;;;;CAelF,MAAa,6BACT,mBAC8D;EAC9D,MAAM,oBAAoB,M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,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","localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","localVarHeaderParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","ConfigurationRestAPI","DUAL_INVESTMENT_REST_API_PROD_URL"],"sources":["../package.json","../src/rest-api/modules/market-data-api.ts","../src/rest-api/modules/trade-api.ts","../src/rest-api/rest-api.ts","../src/rest-api/index.ts","../src/dual-investment.ts"],"sourcesContent":["{\n \"name\": \"@binance/dual-investment\",\n \"description\": \"Official Binance Dual Investment Connector - A lightweight library that provides a convenient interface to Binance's Dual Investment REST API.\",\n \"version\": \"5.0.3\",\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 \"Dual Investment\",\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.5.8\",\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.8\",\n \"axios\": \"^1.7.4\"\n }\n}\n","/**\n * Dual Investment REST API\n *\n * Query products, request quotes, and subscribe to Advanced Earn Dual Investment strategies.\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 */\nimport {\n ConfigurationRestAPI,\n TimeUnit,\n RestApiResponse,\n assertParamExists,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type { GetDualInvestmentProductListResponse } from '../types';\n\n/**\n * MarketDataApi - axios parameter creator\n */\nconst MarketDataApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Get Dual Investment product list\n *\n * Weight(IP): 1\n *\n * @summary Get Dual Investment product list\n * @param {GetDualInvestmentProductListOptionTypeEnum} optionType Input CALL or PUT\n * @param {string} exercisedCoin Target exercised asset, e.g.: if you subscribe to a high sell product (call option), you should input:\n * `optionType: CALL`, `exercisedCoin: USDT`, `investCoin: BNB`; if you subscribe to a low buy product (put\n * option), you should input: `optionType: PUT`, `exercisedCoin: BNB`, `investCoin: USDT`\n * @param {string} investCoin Asset used for subscribing, e.g.: if you subscribe to a high sell product (call option), you should input:\n * `optionType: CALL`, `exercisedCoin: USDT`, `investCoin: BNB`; if you subscribe to a low buy product (put\n * option), you should input: `optionType: PUT`, `exercisedCoin: BNB`, `investCoin: USDT`\n * @param {number | bigint} [pageSize] Number of records per page\n * @param {number | bigint} [pageIndex] Page index\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n getDualInvestmentProductList: async (\n optionType: GetDualInvestmentProductListOptionTypeEnum,\n exercisedCoin: string,\n investCoin: string,\n pageSize?: number | bigint,\n pageIndex?: number | bigint,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'optionType' is not null or undefined\n assertParamExists('getDualInvestmentProductList', 'optionType', optionType);\n // verify required parameter 'exercisedCoin' is not null or undefined\n assertParamExists('getDualInvestmentProductList', 'exercisedCoin', exercisedCoin);\n // verify required parameter 'investCoin' is not null or undefined\n assertParamExists('getDualInvestmentProductList', 'investCoin', investCoin);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (optionType !== undefined && optionType !== null) {\n localVarQueryParameter['optionType'] = optionType;\n }\n if (exercisedCoin !== undefined && exercisedCoin !== null) {\n localVarQueryParameter['exercisedCoin'] = exercisedCoin;\n }\n if (investCoin !== undefined && investCoin !== null) {\n localVarQueryParameter['investCoin'] = investCoin;\n }\n if (pageSize !== undefined && pageSize !== null) {\n localVarQueryParameter['pageSize'] = pageSize;\n }\n if (pageIndex !== undefined && pageIndex !== null) {\n localVarQueryParameter['pageIndex'] = pageIndex;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/dci/product/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 * Get Dual Investment product list\n *\n * Weight(IP): 1\n *\n * @summary Get Dual Investment product list\n * @param {GetDualInvestmentProductListRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n getDualInvestmentProductList(\n requestParameters: GetDualInvestmentProductListRequest\n ): Promise<RestApiResponse<GetDualInvestmentProductListResponse>>;\n}\n\n/**\n * Request parameters for getDualInvestmentProductList operation in MarketDataApi.\n * @interface GetDualInvestmentProductListRequest\n */\nexport interface GetDualInvestmentProductListRequest {\n /**\n * Input CALL or PUT\n * @type {'CALL' | 'PUT'}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly optionType: GetDualInvestmentProductListOptionTypeEnum;\n\n /**\n * Target exercised asset, e.g.: if you subscribe to a high sell product (call option), you should input:\n * `optionType: CALL`, `exercisedCoin: USDT`, `investCoin: BNB`; if you subscribe to a low buy product (put\n * option), you should input: `optionType: PUT`, `exercisedCoin: BNB`, `investCoin: USDT`\n * @type {string}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly exercisedCoin: string;\n\n /**\n * Asset used for subscribing, e.g.: if you subscribe to a high sell product (call option), you should input:\n * `optionType: CALL`, `exercisedCoin: USDT`, `investCoin: BNB`; if you subscribe to a low buy product (put\n * option), you should input: `optionType: PUT`, `exercisedCoin: BNB`, `investCoin: USDT`\n * @type {string}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly investCoin: string;\n\n /**\n * Number of records per page\n * @type {number | bigint}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly pageSize?: number | bigint;\n\n /**\n * Page index\n * @type {number | bigint}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly pageIndex?: number | bigint;\n\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly recvWindow?: number | bigint;\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 * Get Dual Investment product list\n *\n * Weight(IP): 1\n *\n * @summary Get Dual Investment product list\n * @param {GetDualInvestmentProductListRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetDualInvestmentProductListResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/market-data#get-dual-investment-product-list Binance API Documentation}\n */\n public async getDualInvestmentProductList(\n requestParameters: GetDualInvestmentProductListRequest\n ): Promise<RestApiResponse<GetDualInvestmentProductListResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getDualInvestmentProductList(\n requestParameters?.optionType,\n requestParameters?.exercisedCoin,\n requestParameters?.investCoin,\n requestParameters?.pageSize,\n requestParameters?.pageIndex,\n requestParameters?.recvWindow\n );\n return sendRequest<GetDualInvestmentProductListResponse>(\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\nexport enum GetDualInvestmentProductListOptionTypeEnum {\n CALL = 'CALL',\n PUT = 'PUT',\n}\n","/**\n * Dual Investment REST API\n *\n * Query products, request quotes, and subscribe to Advanced Earn Dual Investment strategies.\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 */\nimport {\n ConfigurationRestAPI,\n TimeUnit,\n RestApiResponse,\n assertParamExists,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type {\n ChangeAutoCompoundStatusResponse,\n CheckDualInvestmentAccountsResponse,\n GetDualInvestmentPositionsResponse,\n SubscribeDualInvestmentProductsResponse,\n} from '../types';\n\n/**\n * TradeApi - axios parameter creator\n */\nconst TradeApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Change Auto-Compound status\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * Notes:\n * - 15:31 ~ 16:00 UTC+8: This function is disabled.\n *\n * @summary Change Auto-Compound status (USER_DATA)\n * @param {string} positionId Get positionId from `/sapi/v1/dci/product/positions`\n * @param {ChangeAutoCompoundStatusAutoCompoundPlanEnum} autoCompoundPlan `NONE`: switch off the plan, `STANDARD`: standard plan, `ADVANCED`: advanced plan\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n changeAutoCompoundStatus: async (\n positionId: string,\n autoCompoundPlan: ChangeAutoCompoundStatusAutoCompoundPlanEnum,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'positionId' is not null or undefined\n assertParamExists('changeAutoCompoundStatus', 'positionId', positionId);\n // verify required parameter 'autoCompoundPlan' is not null or undefined\n assertParamExists('changeAutoCompoundStatus', 'autoCompoundPlan', autoCompoundPlan);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (positionId !== undefined && positionId !== null) {\n localVarQueryParameter['positionId'] = positionId;\n }\n if (autoCompoundPlan !== undefined && autoCompoundPlan !== null) {\n localVarQueryParameter['autoCompoundPlan'] = autoCompoundPlan;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/dci/product/auto_compound/edit-status',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Check Dual Investment accounts\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * @summary Check Dual Investment accounts (USER_DATA)\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n checkDualInvestmentAccounts: async (recvWindow?: number | bigint): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/dci/product/accounts',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get Dual Investment positions (batch)\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * @summary Get Dual Investment positions (USER_DATA)\n * @param {GetDualInvestmentPositionsStatusEnum} [status] `PENDING`: Products are purchasing, will give results later; `PURCHASE_SUCCESS`: purchase successfully;\n * `SETTLED`: Products are finish settling; `PURCHASE_FAIL`: fail to purchase; `REFUNDING`: refund ongoing;\n * `REFUND_SUCCESS`: refund to spot account successfully; `SETTLING`: Products are settling. If don't fill this\n * field, will response all the position status.\n * @param {number | bigint} [pageSize] Number of records per page\n * @param {number | bigint} [pageIndex] Page index\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n getDualInvestmentPositions: async (\n status?: GetDualInvestmentPositionsStatusEnum,\n pageSize?: number | bigint,\n pageIndex?: number | bigint,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (status !== undefined && status !== null) {\n localVarQueryParameter['status'] = status;\n }\n if (pageSize !== undefined && pageSize !== null) {\n localVarQueryParameter['pageSize'] = pageSize;\n }\n if (pageIndex !== undefined && pageIndex !== null) {\n localVarQueryParameter['pageIndex'] = pageIndex;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/dci/product/positions',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Subscribe Dual Investment products\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * Notes:\n * - Failed messages:\n * - Products are not available. This means APR changed to a lower value, or the order is unavailable.\n * - Failed. This means system or network errors.\n *\n * @summary Subscribe Dual Investment products (USER_DATA)\n * @param {string} id get id from `/sapi/v1/dci/product/list`\n * @param {string} orderId get orderId from `/sapi/v1/dci/product/list`\n * @param {number} depositAmount the amount for subscribing\n * @param {SubscribeDualInvestmentProductsAutoCompoundPlanEnum} autoCompoundPlan `NONE`: switch off the plan, `STANDARD`: standard plan, `ADVANCED`: advanced plan\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n subscribeDualInvestmentProducts: async (\n id: string,\n orderId: string,\n depositAmount: number,\n autoCompoundPlan: SubscribeDualInvestmentProductsAutoCompoundPlanEnum,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'id' is not null or undefined\n assertParamExists('subscribeDualInvestmentProducts', 'id', id);\n // verify required parameter 'orderId' is not null or undefined\n assertParamExists('subscribeDualInvestmentProducts', 'orderId', orderId);\n // verify required parameter 'depositAmount' is not null or undefined\n assertParamExists('subscribeDualInvestmentProducts', 'depositAmount', depositAmount);\n // verify required parameter 'autoCompoundPlan' is not null or undefined\n assertParamExists(\n 'subscribeDualInvestmentProducts',\n 'autoCompoundPlan',\n autoCompoundPlan\n );\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (id !== undefined && id !== null) {\n localVarQueryParameter['id'] = id;\n }\n if (orderId !== undefined && orderId !== null) {\n localVarQueryParameter['orderId'] = orderId;\n }\n if (depositAmount !== undefined && depositAmount !== null) {\n localVarQueryParameter['depositAmount'] = depositAmount;\n }\n if (autoCompoundPlan !== undefined && autoCompoundPlan !== null) {\n localVarQueryParameter['autoCompoundPlan'] = autoCompoundPlan;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/dci/product/subscribe',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * TradeApi - interface\n * @interface TradeApi\n */\nexport interface TradeApiInterface {\n /**\n * Change Auto-Compound status\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * Notes:\n * - 15:31 ~ 16:00 UTC+8: This function is disabled.\n *\n * @summary Change Auto-Compound status (USER_DATA)\n * @param {ChangeAutoCompoundStatusRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n changeAutoCompoundStatus(\n requestParameters: ChangeAutoCompoundStatusRequest\n ): Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>>;\n /**\n * Check Dual Investment accounts\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * @summary Check Dual Investment accounts (USER_DATA)\n * @param {CheckDualInvestmentAccountsRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n checkDualInvestmentAccounts(\n requestParameters?: CheckDualInvestmentAccountsRequest\n ): Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>>;\n /**\n * Get Dual Investment positions (batch)\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * @summary Get Dual Investment positions (USER_DATA)\n * @param {GetDualInvestmentPositionsRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n getDualInvestmentPositions(\n requestParameters?: GetDualInvestmentPositionsRequest\n ): Promise<RestApiResponse<GetDualInvestmentPositionsResponse>>;\n /**\n * Subscribe Dual Investment products\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * Notes:\n * - Failed messages:\n * - Products are not available. This means APR changed to a lower value, or the order is unavailable.\n * - Failed. This means system or network errors.\n *\n * @summary Subscribe Dual Investment products (USER_DATA)\n * @param {SubscribeDualInvestmentProductsRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n subscribeDualInvestmentProducts(\n requestParameters: SubscribeDualInvestmentProductsRequest\n ): Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>>;\n}\n\n/**\n * Request parameters for changeAutoCompoundStatus operation in TradeApi.\n * @interface ChangeAutoCompoundStatusRequest\n */\nexport interface ChangeAutoCompoundStatusRequest {\n /**\n * Get positionId from `/sapi/v1/dci/product/positions`\n * @type {string}\n * @memberof TradeApiChangeAutoCompoundStatus\n */\n readonly positionId: string;\n\n /**\n * `NONE`: switch off the plan, `STANDARD`: standard plan, `ADVANCED`: advanced plan\n * @type {'NONE' | 'STANDARD' | 'ADVANCED'}\n * @memberof TradeApiChangeAutoCompoundStatus\n */\n readonly autoCompoundPlan: ChangeAutoCompoundStatusAutoCompoundPlanEnum;\n\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof TradeApiChangeAutoCompoundStatus\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for checkDualInvestmentAccounts operation in TradeApi.\n * @interface CheckDualInvestmentAccountsRequest\n */\nexport interface CheckDualInvestmentAccountsRequest {\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof TradeApiCheckDualInvestmentAccounts\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for getDualInvestmentPositions operation in TradeApi.\n * @interface GetDualInvestmentPositionsRequest\n */\nexport interface GetDualInvestmentPositionsRequest {\n /**\n * `PENDING`: Products are purchasing, will give results later; `PURCHASE_SUCCESS`: purchase successfully;\n * `SETTLED`: Products are finish settling; `PURCHASE_FAIL`: fail to purchase; `REFUNDING`: refund ongoing;\n * `REFUND_SUCCESS`: refund to spot account successfully; `SETTLING`: Products are settling. If don't fill this\n * field, will response all the position status.\n * @type {'PENDING' | 'PURCHASE_SUCCESS' | 'SETTLED' | 'PURCHASE_FAIL' | 'REFUNDING' | 'REFUND_SUCCESS' | 'SETTLING'}\n * @memberof TradeApiGetDualInvestmentPositions\n */\n readonly status?: GetDualInvestmentPositionsStatusEnum;\n\n /**\n * Number of records per page\n * @type {number | bigint}\n * @memberof TradeApiGetDualInvestmentPositions\n */\n readonly pageSize?: number | bigint;\n\n /**\n * Page index\n * @type {number | bigint}\n * @memberof TradeApiGetDualInvestmentPositions\n */\n readonly pageIndex?: number | bigint;\n\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof TradeApiGetDualInvestmentPositions\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for subscribeDualInvestmentProducts operation in TradeApi.\n * @interface SubscribeDualInvestmentProductsRequest\n */\nexport interface SubscribeDualInvestmentProductsRequest {\n /**\n * get id from `/sapi/v1/dci/product/list`\n * @type {string}\n * @memberof TradeApiSubscribeDualInvestmentProducts\n */\n readonly id: string;\n\n /**\n * get orderId from `/sapi/v1/dci/product/list`\n * @type {string}\n * @memberof TradeApiSubscribeDualInvestmentProducts\n */\n readonly orderId: string;\n\n /**\n * the amount for subscribing\n * @type {number}\n * @memberof TradeApiSubscribeDualInvestmentProducts\n */\n readonly depositAmount: number;\n\n /**\n * `NONE`: switch off the plan, `STANDARD`: standard plan, `ADVANCED`: advanced plan\n * @type {'NONE' | 'STANDARD' | 'ADVANCED'}\n * @memberof TradeApiSubscribeDualInvestmentProducts\n */\n readonly autoCompoundPlan: SubscribeDualInvestmentProductsAutoCompoundPlanEnum;\n\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof TradeApiSubscribeDualInvestmentProducts\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * TradeApi - object-oriented interface\n * @class TradeApi\n */\nexport class TradeApi implements TradeApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = TradeApiAxiosParamCreator(configuration);\n }\n\n /**\n * Change Auto-Compound status\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * Notes:\n * - 15:31 ~ 16:00 UTC+8: This function is disabled.\n *\n * @summary Change Auto-Compound status (USER_DATA)\n * @param {ChangeAutoCompoundStatusRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/trade#change-auto-compound-status Binance API Documentation}\n */\n public async changeAutoCompoundStatus(\n requestParameters: ChangeAutoCompoundStatusRequest\n ): Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.changeAutoCompoundStatus(\n requestParameters?.positionId,\n requestParameters?.autoCompoundPlan,\n requestParameters?.recvWindow\n );\n return sendRequest<ChangeAutoCompoundStatusResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Check Dual Investment accounts\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * @summary Check Dual Investment accounts (USER_DATA)\n * @param {CheckDualInvestmentAccountsRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/trade#check-dual-investment-accounts Binance API Documentation}\n */\n public async checkDualInvestmentAccounts(\n requestParameters: CheckDualInvestmentAccountsRequest = {}\n ): Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.checkDualInvestmentAccounts(\n requestParameters?.recvWindow\n );\n return sendRequest<CheckDualInvestmentAccountsResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get Dual Investment positions (batch)\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * @summary Get Dual Investment positions (USER_DATA)\n * @param {GetDualInvestmentPositionsRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetDualInvestmentPositionsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/trade#get-dual-investment-positions Binance API Documentation}\n */\n public async getDualInvestmentPositions(\n requestParameters: GetDualInvestmentPositionsRequest = {}\n ): Promise<RestApiResponse<GetDualInvestmentPositionsResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getDualInvestmentPositions(\n requestParameters?.status,\n requestParameters?.pageSize,\n requestParameters?.pageIndex,\n requestParameters?.recvWindow\n );\n return sendRequest<GetDualInvestmentPositionsResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Subscribe Dual Investment products\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * Notes:\n * - Failed messages:\n * - Products are not available. This means APR changed to a lower value, or the order is unavailable.\n * - Failed. This means system or network errors.\n *\n * @summary Subscribe Dual Investment products (USER_DATA)\n * @param {SubscribeDualInvestmentProductsRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/trade#subscribe-dual-investment-products Binance API Documentation}\n */\n public async subscribeDualInvestmentProducts(\n requestParameters: SubscribeDualInvestmentProductsRequest\n ): Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>> {\n const localVarAxiosArgs =\n await this.localVarAxiosParamCreator.subscribeDualInvestmentProducts(\n requestParameters?.id,\n requestParameters?.orderId,\n requestParameters?.depositAmount,\n requestParameters?.autoCompoundPlan,\n requestParameters?.recvWindow\n );\n return sendRequest<SubscribeDualInvestmentProductsResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n}\n\nexport enum ChangeAutoCompoundStatusAutoCompoundPlanEnum {\n NONE = 'NONE',\n STANDARD = 'STANDARD',\n ADVANCED = 'ADVANCED',\n}\n\nexport enum GetDualInvestmentPositionsStatusEnum {\n PENDING = 'PENDING',\n PURCHASE_SUCCESS = 'PURCHASE_SUCCESS',\n SETTLED = 'SETTLED',\n PURCHASE_FAIL = 'PURCHASE_FAIL',\n REFUNDING = 'REFUNDING',\n REFUND_SUCCESS = 'REFUND_SUCCESS',\n SETTLING = 'SETTLING',\n}\n\nexport enum SubscribeDualInvestmentProductsAutoCompoundPlanEnum {\n NONE = 'NONE',\n STANDARD = 'STANDARD',\n ADVANCED = 'ADVANCED',\n}\n","/**\n * Dual Investment REST API\n *\n * Query products, request quotes, and subscribe to Advanced Earn Dual Investment strategies.\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';\nimport { TradeApi } from './modules/trade-api';\n\nimport type { GetDualInvestmentProductListRequest } from './modules/market-data-api';\nimport type {\n ChangeAutoCompoundStatusRequest,\n CheckDualInvestmentAccountsRequest,\n GetDualInvestmentPositionsRequest,\n SubscribeDualInvestmentProductsRequest,\n} from './modules/trade-api';\n\nimport type { GetDualInvestmentProductListResponse } from './types';\nimport type {\n ChangeAutoCompoundStatusResponse,\n CheckDualInvestmentAccountsResponse,\n GetDualInvestmentPositionsResponse,\n SubscribeDualInvestmentProductsResponse,\n} from './types';\n\nexport class RestAPI {\n private configuration: ConfigurationRestAPI;\n private marketDataApi: MarketDataApi;\n private tradeApi: TradeApi;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.marketDataApi = new MarketDataApi(configuration);\n this.tradeApi = new TradeApi(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 * Get Dual Investment product list\n *\n * Weight(IP): 1\n *\n * @summary Get Dual Investment product list\n * @param {GetDualInvestmentProductListRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetDualInvestmentProductListResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/market-data#get-dual-investment-product-list Binance API Documentation}\n */\n getDualInvestmentProductList(\n requestParameters: GetDualInvestmentProductListRequest\n ): Promise<RestApiResponse<GetDualInvestmentProductListResponse>> {\n return this.marketDataApi.getDualInvestmentProductList(requestParameters);\n }\n\n /**\n * Change Auto-Compound status\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * Notes:\n * - 15:31 ~ 16:00 UTC+8: This function is disabled.\n *\n * @summary Change Auto-Compound status (USER_DATA)\n * @param {ChangeAutoCompoundStatusRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/trade#change-auto-compound-status Binance API Documentation}\n */\n changeAutoCompoundStatus(\n requestParameters: ChangeAutoCompoundStatusRequest\n ): Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>> {\n return this.tradeApi.changeAutoCompoundStatus(requestParameters);\n }\n\n /**\n * Check Dual Investment accounts\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * @summary Check Dual Investment accounts (USER_DATA)\n * @param {CheckDualInvestmentAccountsRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/trade#check-dual-investment-accounts Binance API Documentation}\n */\n checkDualInvestmentAccounts(\n requestParameters: CheckDualInvestmentAccountsRequest = {}\n ): Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>> {\n return this.tradeApi.checkDualInvestmentAccounts(requestParameters);\n }\n\n /**\n * Get Dual Investment positions (batch)\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * @summary Get Dual Investment positions (USER_DATA)\n * @param {GetDualInvestmentPositionsRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetDualInvestmentPositionsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/trade#get-dual-investment-positions Binance API Documentation}\n */\n getDualInvestmentPositions(\n requestParameters: GetDualInvestmentPositionsRequest = {}\n ): Promise<RestApiResponse<GetDualInvestmentPositionsResponse>> {\n return this.tradeApi.getDualInvestmentPositions(requestParameters);\n }\n\n /**\n * Subscribe Dual Investment products\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * Notes:\n * - Failed messages:\n * - Products are not available. This means APR changed to a lower value, or the order is unavailable.\n * - Failed. This means system or network errors.\n *\n * @summary Subscribe Dual Investment products (USER_DATA)\n * @param {SubscribeDualInvestmentProductsRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/trade#subscribe-dual-investment-products Binance API Documentation}\n */\n subscribeDualInvestmentProducts(\n requestParameters: SubscribeDualInvestmentProductsRequest\n ): Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>> {\n return this.tradeApi.subscribeDualInvestmentProducts(requestParameters);\n }\n}\n","/**\n * Dual Investment REST API\n *\n * Query products, request quotes, and subscribe to Advanced Earn Dual Investment strategies.\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 {\n buildUserAgent,\n ConfigurationRestAPI,\n DUAL_INVESTMENT_REST_API_PROD_URL,\n} from '@binance/common';\nimport { name, version } from '../package.json';\nimport { RestAPI } from './rest-api';\n\nexport interface ConfigurationDualInvestment {\n configurationRestAPI?: ConfigurationRestAPI;\n}\n\nexport class DualInvestment {\n public restAPI!: RestAPI;\n\n constructor(config: ConfigurationDualInvestment) {\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 || DUAL_INVESTMENT_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;;;;;;;;;;;;;;;;;;;ACsBf,MAAM,iCAAi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YL,kBACI,UACA,QACA,cAAuC,EAAE,EACzC,aAAsC,EAAE,EACb;AAC3B,2CACI,KAAK,eACL,UACA,QACA,aACA,YACA,QACA,QACA,EAAE,UAAU,MAAM,CACrB;;;;;;;;;;;;;;CAeL,6BACI,mBAC8D;AAC9D,SAAO,KAAK,cAAc,6BAA6B,kBAAkB;;;;;;;;;;;;;;;;;;;CAoB7E,yBACI,mBAC0D;AAC1D,SAAO,KAAK,SAAS,yBAAyB,kBAAkB;;;;;;;;;;;;;;;;CAiBpE,4BACI,oBAAwD,EAAE,EACG;AAC7D,SAAO,KAAK,SAAS,4BAA4B,kBAAkB;;;;;;;;;;;;;;;;CAiBvE,2BACI,oBAAuD,EAAE,EACG;AAC5D,SAAO,KAAK,SAAS,2BAA2B,kBAAkB;;;;;;;;;;;;;;;;;;;;;CAsBtE,gCACI,mBACiE;AACjE,SAAO,KAAK,SAAS,gCAAgC,kBAAkB;;;;;;;;;;;;;;;;;;AE5L/E,IAAa,iBAAb,MAA4B;CAGxB,YAAY,QAAqC;EAC7C,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"}
package/dist/index.mjs CHANGED
@@ -3,7 +3,7 @@ import { BadRequestError, ConfigurationRestAPI, ConnectorClientError, DUAL_INVES
3
3
 
4
4
  //#region package.json
5
5
  var name = "@binance/dual-investment";
6
- var version = "5.0.2";
6
+ var version = "5.0.3";
7
7
 
8
8
  //#endregion
9
9
  //#region src/rest-api/modules/market-data-api.ts
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","localVarHeaderParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","localVarHeaderParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","DUAL_INVESTMENT_REST_API_PROD_URL"],"sources":["../package.json","../src/rest-api/modules/market-data-api.ts","../src/rest-api/modules/trade-api.ts","../src/rest-api/rest-api.ts","../src/rest-api/index.ts","../src/dual-investment.ts"],"sourcesContent":["{\n \"name\": \"@binance/dual-investment\",\n \"description\": \"Official Binance Dual Investment Connector - A lightweight library that provides a convenient interface to Binance's Dual Investment REST API.\",\n \"version\": \"5.0.2\",\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 \"Dual Investment\",\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.5.8\",\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.6\",\n \"axios\": \"^1.7.4\"\n }\n}\n","/**\n * Dual Investment REST API\n *\n * Query products, request quotes, and subscribe to Advanced Earn Dual Investment strategies.\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 */\nimport {\n ConfigurationRestAPI,\n TimeUnit,\n RestApiResponse,\n assertParamExists,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type { GetDualInvestmentProductListResponse } from '../types';\n\n/**\n * MarketDataApi - axios parameter creator\n */\nconst MarketDataApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Get Dual Investment product list\n *\n * Weight(IP): 1\n *\n * @summary Get Dual Investment product list\n * @param {GetDualInvestmentProductListOptionTypeEnum} optionType Input CALL or PUT\n * @param {string} exercisedCoin Target exercised asset, e.g.: if you subscribe to a high sell product (call option), you should input:\n * `optionType: CALL`, `exercisedCoin: USDT`, `investCoin: BNB`; if you subscribe to a low buy product (put\n * option), you should input: `optionType: PUT`, `exercisedCoin: BNB`, `investCoin: USDT`\n * @param {string} investCoin Asset used for subscribing, e.g.: if you subscribe to a high sell product (call option), you should input:\n * `optionType: CALL`, `exercisedCoin: USDT`, `investCoin: BNB`; if you subscribe to a low buy product (put\n * option), you should input: `optionType: PUT`, `exercisedCoin: BNB`, `investCoin: USDT`\n * @param {number | bigint} [pageSize] Number of records per page\n * @param {number | bigint} [pageIndex] Page index\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n getDualInvestmentProductList: async (\n optionType: GetDualInvestmentProductListOptionTypeEnum,\n exercisedCoin: string,\n investCoin: string,\n pageSize?: number | bigint,\n pageIndex?: number | bigint,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'optionType' is not null or undefined\n assertParamExists('getDualInvestmentProductList', 'optionType', optionType);\n // verify required parameter 'exercisedCoin' is not null or undefined\n assertParamExists('getDualInvestmentProductList', 'exercisedCoin', exercisedCoin);\n // verify required parameter 'investCoin' is not null or undefined\n assertParamExists('getDualInvestmentProductList', 'investCoin', investCoin);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (optionType !== undefined && optionType !== null) {\n localVarQueryParameter['optionType'] = optionType;\n }\n if (exercisedCoin !== undefined && exercisedCoin !== null) {\n localVarQueryParameter['exercisedCoin'] = exercisedCoin;\n }\n if (investCoin !== undefined && investCoin !== null) {\n localVarQueryParameter['investCoin'] = investCoin;\n }\n if (pageSize !== undefined && pageSize !== null) {\n localVarQueryParameter['pageSize'] = pageSize;\n }\n if (pageIndex !== undefined && pageIndex !== null) {\n localVarQueryParameter['pageIndex'] = pageIndex;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/dci/product/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 * Get Dual Investment product list\n *\n * Weight(IP): 1\n *\n * @summary Get Dual Investment product list\n * @param {GetDualInvestmentProductListRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n getDualInvestmentProductList(\n requestParameters: GetDualInvestmentProductListRequest\n ): Promise<RestApiResponse<GetDualInvestmentProductListResponse>>;\n}\n\n/**\n * Request parameters for getDualInvestmentProductList operation in MarketDataApi.\n * @interface GetDualInvestmentProductListRequest\n */\nexport interface GetDualInvestmentProductListRequest {\n /**\n * Input CALL or PUT\n * @type {'CALL' | 'PUT'}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly optionType: GetDualInvestmentProductListOptionTypeEnum;\n\n /**\n * Target exercised asset, e.g.: if you subscribe to a high sell product (call option), you should input:\n * `optionType: CALL`, `exercisedCoin: USDT`, `investCoin: BNB`; if you subscribe to a low buy product (put\n * option), you should input: `optionType: PUT`, `exercisedCoin: BNB`, `investCoin: USDT`\n * @type {string}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly exercisedCoin: string;\n\n /**\n * Asset used for subscribing, e.g.: if you subscribe to a high sell product (call option), you should input:\n * `optionType: CALL`, `exercisedCoin: USDT`, `investCoin: BNB`; if you subscribe to a low buy product (put\n * option), you should input: `optionType: PUT`, `exercisedCoin: BNB`, `investCoin: USDT`\n * @type {string}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly investCoin: string;\n\n /**\n * Number of records per page\n * @type {number | bigint}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly pageSize?: number | bigint;\n\n /**\n * Page index\n * @type {number | bigint}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly pageIndex?: number | bigint;\n\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly recvWindow?: number | bigint;\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 * Get Dual Investment product list\n *\n * Weight(IP): 1\n *\n * @summary Get Dual Investment product list\n * @param {GetDualInvestmentProductListRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetDualInvestmentProductListResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/market-data#get-dual-investment-product-list Binance API Documentation}\n */\n public async getDualInvestmentProductList(\n requestParameters: GetDualInvestmentProductListRequest\n ): Promise<RestApiResponse<GetDualInvestmentProductListResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getDualInvestmentProductList(\n requestParameters?.optionType,\n requestParameters?.exercisedCoin,\n requestParameters?.investCoin,\n requestParameters?.pageSize,\n requestParameters?.pageIndex,\n requestParameters?.recvWindow\n );\n return sendRequest<GetDualInvestmentProductListResponse>(\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\nexport enum GetDualInvestmentProductListOptionTypeEnum {\n CALL = 'CALL',\n PUT = 'PUT',\n}\n","/**\n * Dual Investment REST API\n *\n * Query products, request quotes, and subscribe to Advanced Earn Dual Investment strategies.\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 */\nimport {\n ConfigurationRestAPI,\n TimeUnit,\n RestApiResponse,\n assertParamExists,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type {\n ChangeAutoCompoundStatusResponse,\n CheckDualInvestmentAccountsResponse,\n GetDualInvestmentPositionsResponse,\n SubscribeDualInvestmentProductsResponse,\n} from '../types';\n\n/**\n * TradeApi - axios parameter creator\n */\nconst TradeApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Change Auto-Compound status\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * Notes:\n * - 15:31 ~ 16:00 UTC+8: This function is disabled.\n *\n * @summary Change Auto-Compound status (USER_DATA)\n * @param {string} positionId Get positionId from `/sapi/v1/dci/product/positions`\n * @param {ChangeAutoCompoundStatusAutoCompoundPlanEnum} autoCompoundPlan `NONE`: switch off the plan, `STANDARD`: standard plan, `ADVANCED`: advanced plan\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n changeAutoCompoundStatus: async (\n positionId: string,\n autoCompoundPlan: ChangeAutoCompoundStatusAutoCompoundPlanEnum,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'positionId' is not null or undefined\n assertParamExists('changeAutoCompoundStatus', 'positionId', positionId);\n // verify required parameter 'autoCompoundPlan' is not null or undefined\n assertParamExists('changeAutoCompoundStatus', 'autoCompoundPlan', autoCompoundPlan);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (positionId !== undefined && positionId !== null) {\n localVarQueryParameter['positionId'] = positionId;\n }\n if (autoCompoundPlan !== undefined && autoCompoundPlan !== null) {\n localVarQueryParameter['autoCompoundPlan'] = autoCompoundPlan;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/dci/product/auto_compound/edit-status',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Check Dual Investment accounts\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * @summary Check Dual Investment accounts (USER_DATA)\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n checkDualInvestmentAccounts: async (recvWindow?: number | bigint): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/dci/product/accounts',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get Dual Investment positions (batch)\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * @summary Get Dual Investment positions (USER_DATA)\n * @param {GetDualInvestmentPositionsStatusEnum} [status] `PENDING`: Products are purchasing, will give results later; `PURCHASE_SUCCESS`: purchase successfully;\n * `SETTLED`: Products are finish settling; `PURCHASE_FAIL`: fail to purchase; `REFUNDING`: refund ongoing;\n * `REFUND_SUCCESS`: refund to spot account successfully; `SETTLING`: Products are settling. If don't fill this\n * field, will response all the position status.\n * @param {number | bigint} [pageSize] Number of records per page\n * @param {number | bigint} [pageIndex] Page index\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n getDualInvestmentPositions: async (\n status?: GetDualInvestmentPositionsStatusEnum,\n pageSize?: number | bigint,\n pageIndex?: number | bigint,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (status !== undefined && status !== null) {\n localVarQueryParameter['status'] = status;\n }\n if (pageSize !== undefined && pageSize !== null) {\n localVarQueryParameter['pageSize'] = pageSize;\n }\n if (pageIndex !== undefined && pageIndex !== null) {\n localVarQueryParameter['pageIndex'] = pageIndex;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/dci/product/positions',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Subscribe Dual Investment products\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * Notes:\n * - Failed messages:\n * - Products are not available. This means APR changed to a lower value, or the order is unavailable.\n * - Failed. This means system or network errors.\n *\n * @summary Subscribe Dual Investment products (USER_DATA)\n * @param {string} id get id from `/sapi/v1/dci/product/list`\n * @param {string} orderId get orderId from `/sapi/v1/dci/product/list`\n * @param {number} depositAmount the amount for subscribing\n * @param {SubscribeDualInvestmentProductsAutoCompoundPlanEnum} autoCompoundPlan `NONE`: switch off the plan, `STANDARD`: standard plan, `ADVANCED`: advanced plan\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n subscribeDualInvestmentProducts: async (\n id: string,\n orderId: string,\n depositAmount: number,\n autoCompoundPlan: SubscribeDualInvestmentProductsAutoCompoundPlanEnum,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'id' is not null or undefined\n assertParamExists('subscribeDualInvestmentProducts', 'id', id);\n // verify required parameter 'orderId' is not null or undefined\n assertParamExists('subscribeDualInvestmentProducts', 'orderId', orderId);\n // verify required parameter 'depositAmount' is not null or undefined\n assertParamExists('subscribeDualInvestmentProducts', 'depositAmount', depositAmount);\n // verify required parameter 'autoCompoundPlan' is not null or undefined\n assertParamExists(\n 'subscribeDualInvestmentProducts',\n 'autoCompoundPlan',\n autoCompoundPlan\n );\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (id !== undefined && id !== null) {\n localVarQueryParameter['id'] = id;\n }\n if (orderId !== undefined && orderId !== null) {\n localVarQueryParameter['orderId'] = orderId;\n }\n if (depositAmount !== undefined && depositAmount !== null) {\n localVarQueryParameter['depositAmount'] = depositAmount;\n }\n if (autoCompoundPlan !== undefined && autoCompoundPlan !== null) {\n localVarQueryParameter['autoCompoundPlan'] = autoCompoundPlan;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/dci/product/subscribe',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * TradeApi - interface\n * @interface TradeApi\n */\nexport interface TradeApiInterface {\n /**\n * Change Auto-Compound status\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * Notes:\n * - 15:31 ~ 16:00 UTC+8: This function is disabled.\n *\n * @summary Change Auto-Compound status (USER_DATA)\n * @param {ChangeAutoCompoundStatusRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n changeAutoCompoundStatus(\n requestParameters: ChangeAutoCompoundStatusRequest\n ): Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>>;\n /**\n * Check Dual Investment accounts\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * @summary Check Dual Investment accounts (USER_DATA)\n * @param {CheckDualInvestmentAccountsRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n checkDualInvestmentAccounts(\n requestParameters?: CheckDualInvestmentAccountsRequest\n ): Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>>;\n /**\n * Get Dual Investment positions (batch)\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * @summary Get Dual Investment positions (USER_DATA)\n * @param {GetDualInvestmentPositionsRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n getDualInvestmentPositions(\n requestParameters?: GetDualInvestmentPositionsRequest\n ): Promise<RestApiResponse<GetDualInvestmentPositionsResponse>>;\n /**\n * Subscribe Dual Investment products\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * Notes:\n * - Failed messages:\n * - Products are not available. This means APR changed to a lower value, or the order is unavailable.\n * - Failed. This means system or network errors.\n *\n * @summary Subscribe Dual Investment products (USER_DATA)\n * @param {SubscribeDualInvestmentProductsRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n subscribeDualInvestmentProducts(\n requestParameters: SubscribeDualInvestmentProductsRequest\n ): Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>>;\n}\n\n/**\n * Request parameters for changeAutoCompoundStatus operation in TradeApi.\n * @interface ChangeAutoCompoundStatusRequest\n */\nexport interface ChangeAutoCompoundStatusRequest {\n /**\n * Get positionId from `/sapi/v1/dci/product/positions`\n * @type {string}\n * @memberof TradeApiChangeAutoCompoundStatus\n */\n readonly positionId: string;\n\n /**\n * `NONE`: switch off the plan, `STANDARD`: standard plan, `ADVANCED`: advanced plan\n * @type {'NONE' | 'STANDARD' | 'ADVANCED'}\n * @memberof TradeApiChangeAutoCompoundStatus\n */\n readonly autoCompoundPlan: ChangeAutoCompoundStatusAutoCompoundPlanEnum;\n\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof TradeApiChangeAutoCompoundStatus\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for checkDualInvestmentAccounts operation in TradeApi.\n * @interface CheckDualInvestmentAccountsRequest\n */\nexport interface CheckDualInvestmentAccountsRequest {\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof TradeApiCheckDualInvestmentAccounts\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for getDualInvestmentPositions operation in TradeApi.\n * @interface GetDualInvestmentPositionsRequest\n */\nexport interface GetDualInvestmentPositionsRequest {\n /**\n * `PENDING`: Products are purchasing, will give results later; `PURCHASE_SUCCESS`: purchase successfully;\n * `SETTLED`: Products are finish settling; `PURCHASE_FAIL`: fail to purchase; `REFUNDING`: refund ongoing;\n * `REFUND_SUCCESS`: refund to spot account successfully; `SETTLING`: Products are settling. If don't fill this\n * field, will response all the position status.\n * @type {'PENDING' | 'PURCHASE_SUCCESS' | 'SETTLED' | 'PURCHASE_FAIL' | 'REFUNDING' | 'REFUND_SUCCESS' | 'SETTLING'}\n * @memberof TradeApiGetDualInvestmentPositions\n */\n readonly status?: GetDualInvestmentPositionsStatusEnum;\n\n /**\n * Number of records per page\n * @type {number | bigint}\n * @memberof TradeApiGetDualInvestmentPositions\n */\n readonly pageSize?: number | bigint;\n\n /**\n * Page index\n * @type {number | bigint}\n * @memberof TradeApiGetDualInvestmentPositions\n */\n readonly pageIndex?: number | bigint;\n\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof TradeApiGetDualInvestmentPositions\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for subscribeDualInvestmentProducts operation in TradeApi.\n * @interface SubscribeDualInvestmentProductsRequest\n */\nexport interface SubscribeDualInvestmentProductsRequest {\n /**\n * get id from `/sapi/v1/dci/product/list`\n * @type {string}\n * @memberof TradeApiSubscribeDualInvestmentProducts\n */\n readonly id: string;\n\n /**\n * get orderId from `/sapi/v1/dci/product/list`\n * @type {string}\n * @memberof TradeApiSubscribeDualInvestmentProducts\n */\n readonly orderId: string;\n\n /**\n * the amount for subscribing\n * @type {number}\n * @memberof TradeApiSubscribeDualInvestmentProducts\n */\n readonly depositAmount: number;\n\n /**\n * `NONE`: switch off the plan, `STANDARD`: standard plan, `ADVANCED`: advanced plan\n * @type {'NONE' | 'STANDARD' | 'ADVANCED'}\n * @memberof TradeApiSubscribeDualInvestmentProducts\n */\n readonly autoCompoundPlan: SubscribeDualInvestmentProductsAutoCompoundPlanEnum;\n\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof TradeApiSubscribeDualInvestmentProducts\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * TradeApi - object-oriented interface\n * @class TradeApi\n */\nexport class TradeApi implements TradeApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = TradeApiAxiosParamCreator(configuration);\n }\n\n /**\n * Change Auto-Compound status\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * Notes:\n * - 15:31 ~ 16:00 UTC+8: This function is disabled.\n *\n * @summary Change Auto-Compound status (USER_DATA)\n * @param {ChangeAutoCompoundStatusRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/trade#change-auto-compound-status Binance API Documentation}\n */\n public async changeAutoCompoundStatus(\n requestParameters: ChangeAutoCompoundStatusRequest\n ): Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.changeAutoCompoundStatus(\n requestParameters?.positionId,\n requestParameters?.autoCompoundPlan,\n requestParameters?.recvWindow\n );\n return sendRequest<ChangeAutoCompoundStatusResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Check Dual Investment accounts\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * @summary Check Dual Investment accounts (USER_DATA)\n * @param {CheckDualInvestmentAccountsRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/trade#check-dual-investment-accounts Binance API Documentation}\n */\n public async checkDualInvestmentAccounts(\n requestParameters: CheckDualInvestmentAccountsRequest = {}\n ): Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.checkDualInvestmentAccounts(\n requestParameters?.recvWindow\n );\n return sendRequest<CheckDualInvestmentAccountsResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get Dual Investment positions (batch)\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * @summary Get Dual Investment positions (USER_DATA)\n * @param {GetDualInvestmentPositionsRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetDualInvestmentPositionsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/trade#get-dual-investment-positions Binance API Documentation}\n */\n public async getDualInvestmentPositions(\n requestParameters: GetDualInvestmentPositionsRequest = {}\n ): Promise<RestApiResponse<GetDualInvestmentPositionsResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getDualInvestmentPositions(\n requestParameters?.status,\n requestParameters?.pageSize,\n requestParameters?.pageIndex,\n requestParameters?.recvWindow\n );\n return sendRequest<GetDualInvestmentPositionsResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Subscribe Dual Investment products\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * Notes:\n * - Failed messages:\n * - Products are not available. This means APR changed to a lower value, or the order is unavailable.\n * - Failed. This means system or network errors.\n *\n * @summary Subscribe Dual Investment products (USER_DATA)\n * @param {SubscribeDualInvestmentProductsRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/trade#subscribe-dual-investment-products Binance API Documentation}\n */\n public async subscribeDualInvestmentProducts(\n requestParameters: SubscribeDualInvestmentProductsRequest\n ): Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>> {\n const localVarAxiosArgs =\n await this.localVarAxiosParamCreator.subscribeDualInvestmentProducts(\n requestParameters?.id,\n requestParameters?.orderId,\n requestParameters?.depositAmount,\n requestParameters?.autoCompoundPlan,\n requestParameters?.recvWindow\n );\n return sendRequest<SubscribeDualInvestmentProductsResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n}\n\nexport enum ChangeAutoCompoundStatusAutoCompoundPlanEnum {\n NONE = 'NONE',\n STANDARD = 'STANDARD',\n ADVANCED = 'ADVANCED',\n}\n\nexport enum GetDualInvestmentPositionsStatusEnum {\n PENDING = 'PENDING',\n PURCHASE_SUCCESS = 'PURCHASE_SUCCESS',\n SETTLED = 'SETTLED',\n PURCHASE_FAIL = 'PURCHASE_FAIL',\n REFUNDING = 'REFUNDING',\n REFUND_SUCCESS = 'REFUND_SUCCESS',\n SETTLING = 'SETTLING',\n}\n\nexport enum SubscribeDualInvestmentProductsAutoCompoundPlanEnum {\n NONE = 'NONE',\n STANDARD = 'STANDARD',\n ADVANCED = 'ADVANCED',\n}\n","/**\n * Dual Investment REST API\n *\n * Query products, request quotes, and subscribe to Advanced Earn Dual Investment strategies.\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';\nimport { TradeApi } from './modules/trade-api';\n\nimport type { GetDualInvestmentProductListRequest } from './modules/market-data-api';\nimport type {\n ChangeAutoCompoundStatusRequest,\n CheckDualInvestmentAccountsRequest,\n GetDualInvestmentPositionsRequest,\n SubscribeDualInvestmentProductsRequest,\n} from './modules/trade-api';\n\nimport type { GetDualInvestmentProductListResponse } from './types';\nimport type {\n ChangeAutoCompoundStatusResponse,\n CheckDualInvestmentAccountsResponse,\n GetDualInvestmentPositionsResponse,\n SubscribeDualInvestmentProductsResponse,\n} from './types';\n\nexport class RestAPI {\n private configuration: ConfigurationRestAPI;\n private marketDataApi: MarketDataApi;\n private tradeApi: TradeApi;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.marketDataApi = new MarketDataApi(configuration);\n this.tradeApi = new TradeApi(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 * Get Dual Investment product list\n *\n * Weight(IP): 1\n *\n * @summary Get Dual Investment product list\n * @param {GetDualInvestmentProductListRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetDualInvestmentProductListResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/market-data#get-dual-investment-product-list Binance API Documentation}\n */\n getDualInvestmentProductList(\n requestParameters: GetDualInvestmentProductListRequest\n ): Promise<RestApiResponse<GetDualInvestmentProductListResponse>> {\n return this.marketDataApi.getDualInvestmentProductList(requestParameters);\n }\n\n /**\n * Change Auto-Compound status\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * Notes:\n * - 15:31 ~ 16:00 UTC+8: This function is disabled.\n *\n * @summary Change Auto-Compound status (USER_DATA)\n * @param {ChangeAutoCompoundStatusRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/trade#change-auto-compound-status Binance API Documentation}\n */\n changeAutoCompoundStatus(\n requestParameters: ChangeAutoCompoundStatusRequest\n ): Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>> {\n return this.tradeApi.changeAutoCompoundStatus(requestParameters);\n }\n\n /**\n * Check Dual Investment accounts\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * @summary Check Dual Investment accounts (USER_DATA)\n * @param {CheckDualInvestmentAccountsRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/trade#check-dual-investment-accounts Binance API Documentation}\n */\n checkDualInvestmentAccounts(\n requestParameters: CheckDualInvestmentAccountsRequest = {}\n ): Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>> {\n return this.tradeApi.checkDualInvestmentAccounts(requestParameters);\n }\n\n /**\n * Get Dual Investment positions (batch)\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * @summary Get Dual Investment positions (USER_DATA)\n * @param {GetDualInvestmentPositionsRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetDualInvestmentPositionsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/trade#get-dual-investment-positions Binance API Documentation}\n */\n getDualInvestmentPositions(\n requestParameters: GetDualInvestmentPositionsRequest = {}\n ): Promise<RestApiResponse<GetDualInvestmentPositionsResponse>> {\n return this.tradeApi.getDualInvestmentPositions(requestParameters);\n }\n\n /**\n * Subscribe Dual Investment products\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * Notes:\n * - Failed messages:\n * - Products are not available. This means APR changed to a lower value, or the order is unavailable.\n * - Failed. This means system or network errors.\n *\n * @summary Subscribe Dual Investment products (USER_DATA)\n * @param {SubscribeDualInvestmentProductsRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/trade#subscribe-dual-investment-products Binance API Documentation}\n */\n subscribeDualInvestmentProducts(\n requestParameters: SubscribeDualInvestmentProductsRequest\n ): Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>> {\n return this.tradeApi.subscribeDualInvestmentProducts(requestParameters);\n }\n}\n","/**\n * Dual Investment REST API\n *\n * Query products, request quotes, and subscribe to Advanced Earn Dual Investment strategies.\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 {\n buildUserAgent,\n ConfigurationRestAPI,\n DUAL_INVESTMENT_REST_API_PROD_URL,\n} from '@binance/common';\nimport { name, version } from '../package.json';\nimport { RestAPI } from './rest-api';\n\nexport interface ConfigurationDualInvestment {\n configurationRestAPI?: ConfigurationRestAPI;\n}\n\nexport class DualInvestment {\n public restAPI!: RestAPI;\n\n constructor(config: ConfigurationDualInvestment) {\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 || DUAL_INVESTMENT_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;;;;;;;;;;;;;;;;;;;ACsBf,MAAM,iCAAiC,SAAU,eAAqC;AAClF,QAAO,EAoBH,8BAA8B,OAC1B,YACA,eACA,YACA,UACA,WACA,eACuB;AAEvB,oBAAkB,gCAAgC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KAAK,eACL,UACA,QACA,aACA,YACA,QACA,QACA,EAAE,UAAU,MAAM,CACrB;;;;;;;;;;;;;;CAeL,6BACI,mBAC8D;AAC9D,SAAO,KAAK,cAAc,6BAA6B,kBAAkB;;;;;;;;;;;;;;;;;;;CAoB7E,yBACI,mBAC0D;AAC1D,SAAO,KAAK,SAAS,yBAAyB,kBAAkB;;;;;;;;;;;;;;;;CAiBpE,4BACI,oBAAwD,EAAE,EACG;AAC7D,SAAO,KAAK,SAAS,4BAA4B,kBAAkB;;;;;;;;;;;;;;;;CAiBvE,2BACI,oBAAuD,EAAE,EACG;AAC5D,SAAO,KAAK,SAAS,2BAA2B,kBAAkB;;;;;;;;;;;;;;;;;;;;;CAsBtE,gCACI,mBACiE;AACjE,SAAO,KAAK,SAAS,gCAAgC,kBAAkB;;;;;;;;;;;;;;;;;;AE5L/E,IAAa,iBAAb,MAA4B;CAGxB,YAAY,QAAqC;EAC7C,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","localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","localVarHeaderParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","DUAL_INVESTMENT_REST_API_PROD_URL"],"sources":["../package.json","../src/rest-api/modules/market-data-api.ts","../src/rest-api/modules/trade-api.ts","../src/rest-api/rest-api.ts","../src/rest-api/index.ts","../src/dual-investment.ts"],"sourcesContent":["{\n \"name\": \"@binance/dual-investment\",\n \"description\": \"Official Binance Dual Investment Connector - A lightweight library that provides a convenient interface to Binance's Dual Investment REST API.\",\n \"version\": \"5.0.3\",\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 \"Dual Investment\",\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.5.8\",\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.8\",\n \"axios\": \"^1.7.4\"\n }\n}\n","/**\n * Dual Investment REST API\n *\n * Query products, request quotes, and subscribe to Advanced Earn Dual Investment strategies.\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 */\nimport {\n ConfigurationRestAPI,\n TimeUnit,\n RestApiResponse,\n assertParamExists,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type { GetDualInvestmentProductListResponse } from '../types';\n\n/**\n * MarketDataApi - axios parameter creator\n */\nconst MarketDataApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Get Dual Investment product list\n *\n * Weight(IP): 1\n *\n * @summary Get Dual Investment product list\n * @param {GetDualInvestmentProductListOptionTypeEnum} optionType Input CALL or PUT\n * @param {string} exercisedCoin Target exercised asset, e.g.: if you subscribe to a high sell product (call option), you should input:\n * `optionType: CALL`, `exercisedCoin: USDT`, `investCoin: BNB`; if you subscribe to a low buy product (put\n * option), you should input: `optionType: PUT`, `exercisedCoin: BNB`, `investCoin: USDT`\n * @param {string} investCoin Asset used for subscribing, e.g.: if you subscribe to a high sell product (call option), you should input:\n * `optionType: CALL`, `exercisedCoin: USDT`, `investCoin: BNB`; if you subscribe to a low buy product (put\n * option), you should input: `optionType: PUT`, `exercisedCoin: BNB`, `investCoin: USDT`\n * @param {number | bigint} [pageSize] Number of records per page\n * @param {number | bigint} [pageIndex] Page index\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n getDualInvestmentProductList: async (\n optionType: GetDualInvestmentProductListOptionTypeEnum,\n exercisedCoin: string,\n investCoin: string,\n pageSize?: number | bigint,\n pageIndex?: number | bigint,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'optionType' is not null or undefined\n assertParamExists('getDualInvestmentProductList', 'optionType', optionType);\n // verify required parameter 'exercisedCoin' is not null or undefined\n assertParamExists('getDualInvestmentProductList', 'exercisedCoin', exercisedCoin);\n // verify required parameter 'investCoin' is not null or undefined\n assertParamExists('getDualInvestmentProductList', 'investCoin', investCoin);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (optionType !== undefined && optionType !== null) {\n localVarQueryParameter['optionType'] = optionType;\n }\n if (exercisedCoin !== undefined && exercisedCoin !== null) {\n localVarQueryParameter['exercisedCoin'] = exercisedCoin;\n }\n if (investCoin !== undefined && investCoin !== null) {\n localVarQueryParameter['investCoin'] = investCoin;\n }\n if (pageSize !== undefined && pageSize !== null) {\n localVarQueryParameter['pageSize'] = pageSize;\n }\n if (pageIndex !== undefined && pageIndex !== null) {\n localVarQueryParameter['pageIndex'] = pageIndex;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/dci/product/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 * Get Dual Investment product list\n *\n * Weight(IP): 1\n *\n * @summary Get Dual Investment product list\n * @param {GetDualInvestmentProductListRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n getDualInvestmentProductList(\n requestParameters: GetDualInvestmentProductListRequest\n ): Promise<RestApiResponse<GetDualInvestmentProductListResponse>>;\n}\n\n/**\n * Request parameters for getDualInvestmentProductList operation in MarketDataApi.\n * @interface GetDualInvestmentProductListRequest\n */\nexport interface GetDualInvestmentProductListRequest {\n /**\n * Input CALL or PUT\n * @type {'CALL' | 'PUT'}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly optionType: GetDualInvestmentProductListOptionTypeEnum;\n\n /**\n * Target exercised asset, e.g.: if you subscribe to a high sell product (call option), you should input:\n * `optionType: CALL`, `exercisedCoin: USDT`, `investCoin: BNB`; if you subscribe to a low buy product (put\n * option), you should input: `optionType: PUT`, `exercisedCoin: BNB`, `investCoin: USDT`\n * @type {string}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly exercisedCoin: string;\n\n /**\n * Asset used for subscribing, e.g.: if you subscribe to a high sell product (call option), you should input:\n * `optionType: CALL`, `exercisedCoin: USDT`, `investCoin: BNB`; if you subscribe to a low buy product (put\n * option), you should input: `optionType: PUT`, `exercisedCoin: BNB`, `investCoin: USDT`\n * @type {string}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly investCoin: string;\n\n /**\n * Number of records per page\n * @type {number | bigint}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly pageSize?: number | bigint;\n\n /**\n * Page index\n * @type {number | bigint}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly pageIndex?: number | bigint;\n\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly recvWindow?: number | bigint;\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 * Get Dual Investment product list\n *\n * Weight(IP): 1\n *\n * @summary Get Dual Investment product list\n * @param {GetDualInvestmentProductListRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetDualInvestmentProductListResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/market-data#get-dual-investment-product-list Binance API Documentation}\n */\n public async getDualInvestmentProductList(\n requestParameters: GetDualInvestmentProductListRequest\n ): Promise<RestApiResponse<GetDualInvestmentProductListResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getDualInvestmentProductList(\n requestParameters?.optionType,\n requestParameters?.exercisedCoin,\n requestParameters?.investCoin,\n requestParameters?.pageSize,\n requestParameters?.pageIndex,\n requestParameters?.recvWindow\n );\n return sendRequest<GetDualInvestmentProductListResponse>(\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\nexport enum GetDualInvestmentProductListOptionTypeEnum {\n CALL = 'CALL',\n PUT = 'PUT',\n}\n","/**\n * Dual Investment REST API\n *\n * Query products, request quotes, and subscribe to Advanced Earn Dual Investment strategies.\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 */\nimport {\n ConfigurationRestAPI,\n TimeUnit,\n RestApiResponse,\n assertParamExists,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type {\n ChangeAutoCompoundStatusResponse,\n CheckDualInvestmentAccountsResponse,\n GetDualInvestmentPositionsResponse,\n SubscribeDualInvestmentProductsResponse,\n} from '../types';\n\n/**\n * TradeApi - axios parameter creator\n */\nconst TradeApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Change Auto-Compound status\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * Notes:\n * - 15:31 ~ 16:00 UTC+8: This function is disabled.\n *\n * @summary Change Auto-Compound status (USER_DATA)\n * @param {string} positionId Get positionId from `/sapi/v1/dci/product/positions`\n * @param {ChangeAutoCompoundStatusAutoCompoundPlanEnum} autoCompoundPlan `NONE`: switch off the plan, `STANDARD`: standard plan, `ADVANCED`: advanced plan\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n changeAutoCompoundStatus: async (\n positionId: string,\n autoCompoundPlan: ChangeAutoCompoundStatusAutoCompoundPlanEnum,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'positionId' is not null or undefined\n assertParamExists('changeAutoCompoundStatus', 'positionId', positionId);\n // verify required parameter 'autoCompoundPlan' is not null or undefined\n assertParamExists('changeAutoCompoundStatus', 'autoCompoundPlan', autoCompoundPlan);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (positionId !== undefined && positionId !== null) {\n localVarQueryParameter['positionId'] = positionId;\n }\n if (autoCompoundPlan !== undefined && autoCompoundPlan !== null) {\n localVarQueryParameter['autoCompoundPlan'] = autoCompoundPlan;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/dci/product/auto_compound/edit-status',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Check Dual Investment accounts\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * @summary Check Dual Investment accounts (USER_DATA)\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n checkDualInvestmentAccounts: async (recvWindow?: number | bigint): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/dci/product/accounts',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get Dual Investment positions (batch)\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * @summary Get Dual Investment positions (USER_DATA)\n * @param {GetDualInvestmentPositionsStatusEnum} [status] `PENDING`: Products are purchasing, will give results later; `PURCHASE_SUCCESS`: purchase successfully;\n * `SETTLED`: Products are finish settling; `PURCHASE_FAIL`: fail to purchase; `REFUNDING`: refund ongoing;\n * `REFUND_SUCCESS`: refund to spot account successfully; `SETTLING`: Products are settling. If don't fill this\n * field, will response all the position status.\n * @param {number | bigint} [pageSize] Number of records per page\n * @param {number | bigint} [pageIndex] Page index\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n getDualInvestmentPositions: async (\n status?: GetDualInvestmentPositionsStatusEnum,\n pageSize?: number | bigint,\n pageIndex?: number | bigint,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (status !== undefined && status !== null) {\n localVarQueryParameter['status'] = status;\n }\n if (pageSize !== undefined && pageSize !== null) {\n localVarQueryParameter['pageSize'] = pageSize;\n }\n if (pageIndex !== undefined && pageIndex !== null) {\n localVarQueryParameter['pageIndex'] = pageIndex;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/dci/product/positions',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Subscribe Dual Investment products\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * Notes:\n * - Failed messages:\n * - Products are not available. This means APR changed to a lower value, or the order is unavailable.\n * - Failed. This means system or network errors.\n *\n * @summary Subscribe Dual Investment products (USER_DATA)\n * @param {string} id get id from `/sapi/v1/dci/product/list`\n * @param {string} orderId get orderId from `/sapi/v1/dci/product/list`\n * @param {number} depositAmount the amount for subscribing\n * @param {SubscribeDualInvestmentProductsAutoCompoundPlanEnum} autoCompoundPlan `NONE`: switch off the plan, `STANDARD`: standard plan, `ADVANCED`: advanced plan\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n subscribeDualInvestmentProducts: async (\n id: string,\n orderId: string,\n depositAmount: number,\n autoCompoundPlan: SubscribeDualInvestmentProductsAutoCompoundPlanEnum,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'id' is not null or undefined\n assertParamExists('subscribeDualInvestmentProducts', 'id', id);\n // verify required parameter 'orderId' is not null or undefined\n assertParamExists('subscribeDualInvestmentProducts', 'orderId', orderId);\n // verify required parameter 'depositAmount' is not null or undefined\n assertParamExists('subscribeDualInvestmentProducts', 'depositAmount', depositAmount);\n // verify required parameter 'autoCompoundPlan' is not null or undefined\n assertParamExists(\n 'subscribeDualInvestmentProducts',\n 'autoCompoundPlan',\n autoCompoundPlan\n );\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (id !== undefined && id !== null) {\n localVarQueryParameter['id'] = id;\n }\n if (orderId !== undefined && orderId !== null) {\n localVarQueryParameter['orderId'] = orderId;\n }\n if (depositAmount !== undefined && depositAmount !== null) {\n localVarQueryParameter['depositAmount'] = depositAmount;\n }\n if (autoCompoundPlan !== undefined && autoCompoundPlan !== null) {\n localVarQueryParameter['autoCompoundPlan'] = autoCompoundPlan;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/dci/product/subscribe',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * TradeApi - interface\n * @interface TradeApi\n */\nexport interface TradeApiInterface {\n /**\n * Change Auto-Compound status\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * Notes:\n * - 15:31 ~ 16:00 UTC+8: This function is disabled.\n *\n * @summary Change Auto-Compound status (USER_DATA)\n * @param {ChangeAutoCompoundStatusRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n changeAutoCompoundStatus(\n requestParameters: ChangeAutoCompoundStatusRequest\n ): Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>>;\n /**\n * Check Dual Investment accounts\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * @summary Check Dual Investment accounts (USER_DATA)\n * @param {CheckDualInvestmentAccountsRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n checkDualInvestmentAccounts(\n requestParameters?: CheckDualInvestmentAccountsRequest\n ): Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>>;\n /**\n * Get Dual Investment positions (batch)\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * @summary Get Dual Investment positions (USER_DATA)\n * @param {GetDualInvestmentPositionsRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n getDualInvestmentPositions(\n requestParameters?: GetDualInvestmentPositionsRequest\n ): Promise<RestApiResponse<GetDualInvestmentPositionsResponse>>;\n /**\n * Subscribe Dual Investment products\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * Notes:\n * - Failed messages:\n * - Products are not available. This means APR changed to a lower value, or the order is unavailable.\n * - Failed. This means system or network errors.\n *\n * @summary Subscribe Dual Investment products (USER_DATA)\n * @param {SubscribeDualInvestmentProductsRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n subscribeDualInvestmentProducts(\n requestParameters: SubscribeDualInvestmentProductsRequest\n ): Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>>;\n}\n\n/**\n * Request parameters for changeAutoCompoundStatus operation in TradeApi.\n * @interface ChangeAutoCompoundStatusRequest\n */\nexport interface ChangeAutoCompoundStatusRequest {\n /**\n * Get positionId from `/sapi/v1/dci/product/positions`\n * @type {string}\n * @memberof TradeApiChangeAutoCompoundStatus\n */\n readonly positionId: string;\n\n /**\n * `NONE`: switch off the plan, `STANDARD`: standard plan, `ADVANCED`: advanced plan\n * @type {'NONE' | 'STANDARD' | 'ADVANCED'}\n * @memberof TradeApiChangeAutoCompoundStatus\n */\n readonly autoCompoundPlan: ChangeAutoCompoundStatusAutoCompoundPlanEnum;\n\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof TradeApiChangeAutoCompoundStatus\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for checkDualInvestmentAccounts operation in TradeApi.\n * @interface CheckDualInvestmentAccountsRequest\n */\nexport interface CheckDualInvestmentAccountsRequest {\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof TradeApiCheckDualInvestmentAccounts\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for getDualInvestmentPositions operation in TradeApi.\n * @interface GetDualInvestmentPositionsRequest\n */\nexport interface GetDualInvestmentPositionsRequest {\n /**\n * `PENDING`: Products are purchasing, will give results later; `PURCHASE_SUCCESS`: purchase successfully;\n * `SETTLED`: Products are finish settling; `PURCHASE_FAIL`: fail to purchase; `REFUNDING`: refund ongoing;\n * `REFUND_SUCCESS`: refund to spot account successfully; `SETTLING`: Products are settling. If don't fill this\n * field, will response all the position status.\n * @type {'PENDING' | 'PURCHASE_SUCCESS' | 'SETTLED' | 'PURCHASE_FAIL' | 'REFUNDING' | 'REFUND_SUCCESS' | 'SETTLING'}\n * @memberof TradeApiGetDualInvestmentPositions\n */\n readonly status?: GetDualInvestmentPositionsStatusEnum;\n\n /**\n * Number of records per page\n * @type {number | bigint}\n * @memberof TradeApiGetDualInvestmentPositions\n */\n readonly pageSize?: number | bigint;\n\n /**\n * Page index\n * @type {number | bigint}\n * @memberof TradeApiGetDualInvestmentPositions\n */\n readonly pageIndex?: number | bigint;\n\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof TradeApiGetDualInvestmentPositions\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for subscribeDualInvestmentProducts operation in TradeApi.\n * @interface SubscribeDualInvestmentProductsRequest\n */\nexport interface SubscribeDualInvestmentProductsRequest {\n /**\n * get id from `/sapi/v1/dci/product/list`\n * @type {string}\n * @memberof TradeApiSubscribeDualInvestmentProducts\n */\n readonly id: string;\n\n /**\n * get orderId from `/sapi/v1/dci/product/list`\n * @type {string}\n * @memberof TradeApiSubscribeDualInvestmentProducts\n */\n readonly orderId: string;\n\n /**\n * the amount for subscribing\n * @type {number}\n * @memberof TradeApiSubscribeDualInvestmentProducts\n */\n readonly depositAmount: number;\n\n /**\n * `NONE`: switch off the plan, `STANDARD`: standard plan, `ADVANCED`: advanced plan\n * @type {'NONE' | 'STANDARD' | 'ADVANCED'}\n * @memberof TradeApiSubscribeDualInvestmentProducts\n */\n readonly autoCompoundPlan: SubscribeDualInvestmentProductsAutoCompoundPlanEnum;\n\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof TradeApiSubscribeDualInvestmentProducts\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * TradeApi - object-oriented interface\n * @class TradeApi\n */\nexport class TradeApi implements TradeApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = TradeApiAxiosParamCreator(configuration);\n }\n\n /**\n * Change Auto-Compound status\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * Notes:\n * - 15:31 ~ 16:00 UTC+8: This function is disabled.\n *\n * @summary Change Auto-Compound status (USER_DATA)\n * @param {ChangeAutoCompoundStatusRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/trade#change-auto-compound-status Binance API Documentation}\n */\n public async changeAutoCompoundStatus(\n requestParameters: ChangeAutoCompoundStatusRequest\n ): Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.changeAutoCompoundStatus(\n requestParameters?.positionId,\n requestParameters?.autoCompoundPlan,\n requestParameters?.recvWindow\n );\n return sendRequest<ChangeAutoCompoundStatusResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Check Dual Investment accounts\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * @summary Check Dual Investment accounts (USER_DATA)\n * @param {CheckDualInvestmentAccountsRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/trade#check-dual-investment-accounts Binance API Documentation}\n */\n public async checkDualInvestmentAccounts(\n requestParameters: CheckDualInvestmentAccountsRequest = {}\n ): Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.checkDualInvestmentAccounts(\n requestParameters?.recvWindow\n );\n return sendRequest<CheckDualInvestmentAccountsResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get Dual Investment positions (batch)\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * @summary Get Dual Investment positions (USER_DATA)\n * @param {GetDualInvestmentPositionsRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetDualInvestmentPositionsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/trade#get-dual-investment-positions Binance API Documentation}\n */\n public async getDualInvestmentPositions(\n requestParameters: GetDualInvestmentPositionsRequest = {}\n ): Promise<RestApiResponse<GetDualInvestmentPositionsResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getDualInvestmentPositions(\n requestParameters?.status,\n requestParameters?.pageSize,\n requestParameters?.pageIndex,\n requestParameters?.recvWindow\n );\n return sendRequest<GetDualInvestmentPositionsResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Subscribe Dual Investment products\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * Notes:\n * - Failed messages:\n * - Products are not available. This means APR changed to a lower value, or the order is unavailable.\n * - Failed. This means system or network errors.\n *\n * @summary Subscribe Dual Investment products (USER_DATA)\n * @param {SubscribeDualInvestmentProductsRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/trade#subscribe-dual-investment-products Binance API Documentation}\n */\n public async subscribeDualInvestmentProducts(\n requestParameters: SubscribeDualInvestmentProductsRequest\n ): Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>> {\n const localVarAxiosArgs =\n await this.localVarAxiosParamCreator.subscribeDualInvestmentProducts(\n requestParameters?.id,\n requestParameters?.orderId,\n requestParameters?.depositAmount,\n requestParameters?.autoCompoundPlan,\n requestParameters?.recvWindow\n );\n return sendRequest<SubscribeDualInvestmentProductsResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n}\n\nexport enum ChangeAutoCompoundStatusAutoCompoundPlanEnum {\n NONE = 'NONE',\n STANDARD = 'STANDARD',\n ADVANCED = 'ADVANCED',\n}\n\nexport enum GetDualInvestmentPositionsStatusEnum {\n PENDING = 'PENDING',\n PURCHASE_SUCCESS = 'PURCHASE_SUCCESS',\n SETTLED = 'SETTLED',\n PURCHASE_FAIL = 'PURCHASE_FAIL',\n REFUNDING = 'REFUNDING',\n REFUND_SUCCESS = 'REFUND_SUCCESS',\n SETTLING = 'SETTLING',\n}\n\nexport enum SubscribeDualInvestmentProductsAutoCompoundPlanEnum {\n NONE = 'NONE',\n STANDARD = 'STANDARD',\n ADVANCED = 'ADVANCED',\n}\n","/**\n * Dual Investment REST API\n *\n * Query products, request quotes, and subscribe to Advanced Earn Dual Investment strategies.\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';\nimport { TradeApi } from './modules/trade-api';\n\nimport type { GetDualInvestmentProductListRequest } from './modules/market-data-api';\nimport type {\n ChangeAutoCompoundStatusRequest,\n CheckDualInvestmentAccountsRequest,\n GetDualInvestmentPositionsRequest,\n SubscribeDualInvestmentProductsRequest,\n} from './modules/trade-api';\n\nimport type { GetDualInvestmentProductListResponse } from './types';\nimport type {\n ChangeAutoCompoundStatusResponse,\n CheckDualInvestmentAccountsResponse,\n GetDualInvestmentPositionsResponse,\n SubscribeDualInvestmentProductsResponse,\n} from './types';\n\nexport class RestAPI {\n private configuration: ConfigurationRestAPI;\n private marketDataApi: MarketDataApi;\n private tradeApi: TradeApi;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.marketDataApi = new MarketDataApi(configuration);\n this.tradeApi = new TradeApi(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 * Get Dual Investment product list\n *\n * Weight(IP): 1\n *\n * @summary Get Dual Investment product list\n * @param {GetDualInvestmentProductListRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetDualInvestmentProductListResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/market-data#get-dual-investment-product-list Binance API Documentation}\n */\n getDualInvestmentProductList(\n requestParameters: GetDualInvestmentProductListRequest\n ): Promise<RestApiResponse<GetDualInvestmentProductListResponse>> {\n return this.marketDataApi.getDualInvestmentProductList(requestParameters);\n }\n\n /**\n * Change Auto-Compound status\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * Notes:\n * - 15:31 ~ 16:00 UTC+8: This function is disabled.\n *\n * @summary Change Auto-Compound status (USER_DATA)\n * @param {ChangeAutoCompoundStatusRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/trade#change-auto-compound-status Binance API Documentation}\n */\n changeAutoCompoundStatus(\n requestParameters: ChangeAutoCompoundStatusRequest\n ): Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>> {\n return this.tradeApi.changeAutoCompoundStatus(requestParameters);\n }\n\n /**\n * Check Dual Investment accounts\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * @summary Check Dual Investment accounts (USER_DATA)\n * @param {CheckDualInvestmentAccountsRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/trade#check-dual-investment-accounts Binance API Documentation}\n */\n checkDualInvestmentAccounts(\n requestParameters: CheckDualInvestmentAccountsRequest = {}\n ): Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>> {\n return this.tradeApi.checkDualInvestmentAccounts(requestParameters);\n }\n\n /**\n * Get Dual Investment positions (batch)\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * @summary Get Dual Investment positions (USER_DATA)\n * @param {GetDualInvestmentPositionsRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetDualInvestmentPositionsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/trade#get-dual-investment-positions Binance API Documentation}\n */\n getDualInvestmentPositions(\n requestParameters: GetDualInvestmentPositionsRequest = {}\n ): Promise<RestApiResponse<GetDualInvestmentPositionsResponse>> {\n return this.tradeApi.getDualInvestmentPositions(requestParameters);\n }\n\n /**\n * Subscribe Dual Investment products\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * Notes:\n * - Failed messages:\n * - Products are not available. This means APR changed to a lower value, or the order is unavailable.\n * - Failed. This means system or network errors.\n *\n * @summary Subscribe Dual Investment products (USER_DATA)\n * @param {SubscribeDualInvestmentProductsRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-dual-investment/api/rest-api/trade#subscribe-dual-investment-products Binance API Documentation}\n */\n subscribeDualInvestmentProducts(\n requestParameters: SubscribeDualInvestmentProductsRequest\n ): Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>> {\n return this.tradeApi.subscribeDualInvestmentProducts(requestParameters);\n }\n}\n","/**\n * Dual Investment REST API\n *\n * Query products, request quotes, and subscribe to Advanced Earn Dual Investment strategies.\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 {\n buildUserAgent,\n ConfigurationRestAPI,\n DUAL_INVESTMENT_REST_API_PROD_URL,\n} from '@binance/common';\nimport { name, version } from '../package.json';\nimport { RestAPI } from './rest-api';\n\nexport interface ConfigurationDualInvestment {\n configurationRestAPI?: ConfigurationRestAPI;\n}\n\nexport class DualInvestment {\n public restAPI!: RestAPI;\n\n constructor(config: ConfigurationDualInvestment) {\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 || DUAL_INVESTMENT_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;;;;;;;;;;;;;;;;;;;ACsBf,MAAM,iCAAiC,SAAU,eAAqC;AAClF,QAAO,EAoBH,8BAA8B,OAC1B,YACA,eACA,YACA,UACA,WACA,eACuB;AAEvB,oBAAkB,gCAAgC,cAAc,WAAW;AAE3E,oBAAkB,gCAAgC,iBAAiB,cAAc;AAEjF,oBAAkB,gCAAgC,cAAc,WAAW;EAE3E,MAAMA,yBAAkD,EAAE;EAC1D,MAAMC,wBAAiD,EAAE;EACzD,MAAMC,0BAAmD,EAAE;AAE3D,MAAI,eAAe,UAAa,eAAe,KAC3C,wBAAuB,gBAAgB;AAE3C,MAAI,kBAAkB,UAAa,kBAAkB,KACjD,wBAAuB,mBAAmB;AAE9C,MAAI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SAAS,4BAA4B,kBAAkB;;;;;;;;;;;;;;;;CAiBvE,2BACI,oBAAuD,EAAE,EACG;AAC5D,SAAO,KAAK,SAAS,2BAA2B,kBAAkB;;;;;;;;;;;;;;;;;;;;;CAsBtE,gCACI,mBACiE;AACjE,SAAO,KAAK,SAAS,gCAAgC,kBAAkB;;;;;;;;;;;;;;;;;;AE5L/E,IAAa,iBAAb,MAA4B;CAGxB,YAAY,QAAqC;EAC7C,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"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@binance/dual-investment",
3
3
  "description": "Official Binance Dual Investment Connector - A lightweight library that provides a convenient interface to Binance's Dual Investment REST API.",
4
- "version": "5.0.2",
4
+ "version": "5.0.3",
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.4.6",
59
+ "@binance/common": "2.4.8",
60
60
  "axios": "^1.7.4"
61
61
  }
62
62
  }