@binance/wallet
Version:
Official Binance Wallet Connector - A lightweight library that provides a convenient interface to Binance's Wallet REST API.
1 lines • 373 kB
Source Map (JSON)
{"version":3,"file":"index.mjs","names":["localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","name","localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","name","WALLET_REST_API_PROD_URL"],"sources":["../package.json","../src/rest-api/modules/account-api.ts","../src/rest-api/modules/asset-api.ts","../src/rest-api/modules/capital-api.ts","../src/rest-api/modules/others-api.ts","../src/rest-api/modules/travel-rule-api.ts","../src/rest-api/rest-api.ts","../src/rest-api/index.ts","../src/wallet.ts"],"sourcesContent":["{\n \"name\": \"@binance/wallet\",\n \"description\": \"Official Binance Wallet Connector - A lightweight library that provides a convenient interface to Binance's Wallet REST API.\",\n \"version\": \"14.0.0\",\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 \"Wallet\",\n \"Connector\",\n \"REST\",\n \"Trading\"\n ],\n \"author\": \"Binance\",\n \"license\": \"MIT\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/binance/binance-connector-js.git\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/binance/binance-connector-js/issues\"\n },\n \"homepage\": \"https://github.com/binance/binance-connector-js#readme\",\n \"files\": [\n \"dist\"\n ],\n \"devDependencies\": {\n \"@types/jest\": \"^29.5.4\",\n \"@types/node\": \"^20.17.24\",\n \"eslint\": \"8.57.0\",\n \"jest\": \"^29.6.4\",\n \"json-with-bigint\": \"^3.4.4\",\n \"prettier\": \"^3.3.3\",\n \"ts-jest\": \"^29.1.1\",\n \"ts-node\": \"^10.9.1\",\n \"tsdown\": \"^0.16.5\",\n \"typescript\": \"^5.7.2\",\n \"typescript-eslint\": \"^8.24.0\"\n },\n \"dependencies\": {\n \"@binance/common\": \"2.2.0\",\n \"axios\": \"^1.7.4\"\n }\n}\n","/**\n * Binance Wallet REST API\n *\n * OpenAPI Specification for the Binance Wallet REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport {\n ConfigurationRestAPI,\n TimeUnit,\n RestApiResponse,\n assertParamExists,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type {\n AccountApiTradingStatusResponse,\n AccountInfoResponse,\n AccountStatusResponse,\n DailyAccountSnapshotResponse,\n GetApiKeyPermissionResponse,\n} from '../types';\n\n/**\n * AccountApi - axios parameter creator\n */\nconst AccountApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Fetch account api trading status detail.\n *\n * Weight: 1\n *\n * @summary Account API Trading Status (USER_DATA)\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n accountApiTradingStatus: async (recvWindow?: number | bigint): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: 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/account/apiTradingStatus',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Fetch account info detail.\n *\n * Weight: 1\n *\n * @summary Account info (USER_DATA)\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n accountInfo: async (recvWindow?: number | bigint): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: 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/account/info',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Fetch account status detail.\n *\n * Weight: 1\n *\n * @summary Account Status (USER_DATA)\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n accountStatus: async (recvWindow?: number | bigint): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: 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/account/status',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Daily account snapshot\n *\n * The query time period must be less then 30 days\n * Support query within the last one month only\n * If startTimeand endTime not sent, return records of the last 7 days by default\n *\n * Weight: 2400\n *\n * @summary Daily Account Snapshot (USER_DATA)\n * @param {string} type\n * @param {number | bigint} [startTime]\n * @param {number | bigint} [endTime]\n * @param {number | bigint} [limit] min 7, max 30, default 7\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n dailyAccountSnapshot: async (\n type: string,\n startTime?: number | bigint,\n endTime?: number | bigint,\n limit?: number | bigint,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'type' is not null or undefined\n assertParamExists('dailyAccountSnapshot', 'type', type);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (type !== undefined && type !== null) {\n localVarQueryParameter['type'] = type;\n }\n if (startTime !== undefined && startTime !== null) {\n localVarQueryParameter['startTime'] = startTime;\n }\n if (endTime !== undefined && endTime !== null) {\n localVarQueryParameter['endTime'] = endTime;\n }\n if (limit !== undefined && limit !== null) {\n localVarQueryParameter['limit'] = limit;\n }\n 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/accountSnapshot',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n *\n * Weight: 1\n *\n * @summary Disable Fast Withdraw Switch (USER_DATA)\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n disableFastWithdrawSwitch: async (recvWindow?: number | bigint): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: 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/account/disableFastWithdrawSwitch',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Enable Fast Withdraw Switch (USER_DATA)\n *\n * This request will enable fastwithdraw switch under your account. <br></br>\n * When Fast Withdraw Switch is on, transferring funds to a Binance account will be done instantly. There is no on-chain transaction, no transaction ID and no withdrawal fee.\n *\n * Weight: 1\n *\n * @summary Enable Fast Withdraw Switch (USER_DATA)\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n enableFastWithdrawSwitch: async (recvWindow?: number | bigint): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: 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/account/enableFastWithdrawSwitch',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get API Key Permission\n *\n * Weight: 1\n *\n * @summary Get API Key Permission (USER_DATA)\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n getApiKeyPermission: async (recvWindow?: number | bigint): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: 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/account/apiRestrictions',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * AccountApi - interface\n * @interface AccountApi\n */\nexport interface AccountApiInterface {\n /**\n * Fetch account api trading status detail.\n *\n * Weight: 1\n *\n * @summary Account API Trading Status (USER_DATA)\n * @param {AccountApiTradingStatusRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof AccountApiInterface\n */\n accountApiTradingStatus(\n requestParameters?: AccountApiTradingStatusRequest\n ): Promise<RestApiResponse<AccountApiTradingStatusResponse>>;\n /**\n * Fetch account info detail.\n *\n * Weight: 1\n *\n * @summary Account info (USER_DATA)\n * @param {AccountInfoRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof AccountApiInterface\n */\n accountInfo(\n requestParameters?: AccountInfoRequest\n ): Promise<RestApiResponse<AccountInfoResponse>>;\n /**\n * Fetch account status detail.\n *\n * Weight: 1\n *\n * @summary Account Status (USER_DATA)\n * @param {AccountStatusRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof AccountApiInterface\n */\n accountStatus(\n requestParameters?: AccountStatusRequest\n ): Promise<RestApiResponse<AccountStatusResponse>>;\n /**\n * Daily account snapshot\n *\n * The query time period must be less then 30 days\n * Support query within the last one month only\n * If startTimeand endTime not sent, return records of the last 7 days by default\n *\n * Weight: 2400\n *\n * @summary Daily Account Snapshot (USER_DATA)\n * @param {DailyAccountSnapshotRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof AccountApiInterface\n */\n dailyAccountSnapshot(\n requestParameters: DailyAccountSnapshotRequest\n ): Promise<RestApiResponse<DailyAccountSnapshotResponse>>;\n /**\n *\n * Weight: 1\n *\n * @summary Disable Fast Withdraw Switch (USER_DATA)\n * @param {DisableFastWithdrawSwitchRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof AccountApiInterface\n */\n disableFastWithdrawSwitch(\n requestParameters?: DisableFastWithdrawSwitchRequest\n ): Promise<RestApiResponse<void>>;\n /**\n * Enable Fast Withdraw Switch (USER_DATA)\n *\n * This request will enable fastwithdraw switch under your account. <br></br>\n * When Fast Withdraw Switch is on, transferring funds to a Binance account will be done instantly. There is no on-chain transaction, no transaction ID and no withdrawal fee.\n *\n * Weight: 1\n *\n * @summary Enable Fast Withdraw Switch (USER_DATA)\n * @param {EnableFastWithdrawSwitchRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof AccountApiInterface\n */\n enableFastWithdrawSwitch(\n requestParameters?: EnableFastWithdrawSwitchRequest\n ): Promise<RestApiResponse<void>>;\n /**\n * Get API Key Permission\n *\n * Weight: 1\n *\n * @summary Get API Key Permission (USER_DATA)\n * @param {GetApiKeyPermissionRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof AccountApiInterface\n */\n getApiKeyPermission(\n requestParameters?: GetApiKeyPermissionRequest\n ): Promise<RestApiResponse<GetApiKeyPermissionResponse>>;\n}\n\n/**\n * Request parameters for accountApiTradingStatus operation in AccountApi.\n * @interface AccountApiTradingStatusRequest\n */\nexport interface AccountApiTradingStatusRequest {\n /**\n *\n * @type {number | bigint}\n * @memberof AccountApiAccountApiTradingStatus\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for accountInfo operation in AccountApi.\n * @interface AccountInfoRequest\n */\nexport interface AccountInfoRequest {\n /**\n *\n * @type {number | bigint}\n * @memberof AccountApiAccountInfo\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for accountStatus operation in AccountApi.\n * @interface AccountStatusRequest\n */\nexport interface AccountStatusRequest {\n /**\n *\n * @type {number | bigint}\n * @memberof AccountApiAccountStatus\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for dailyAccountSnapshot operation in AccountApi.\n * @interface DailyAccountSnapshotRequest\n */\nexport interface DailyAccountSnapshotRequest {\n /**\n *\n * @type {string}\n * @memberof AccountApiDailyAccountSnapshot\n */\n readonly type: string;\n\n /**\n *\n * @type {number | bigint}\n * @memberof AccountApiDailyAccountSnapshot\n */\n readonly startTime?: number | bigint;\n\n /**\n *\n * @type {number | bigint}\n * @memberof AccountApiDailyAccountSnapshot\n */\n readonly endTime?: number | bigint;\n\n /**\n * min 7, max 30, default 7\n * @type {number | bigint}\n * @memberof AccountApiDailyAccountSnapshot\n */\n readonly limit?: number | bigint;\n\n /**\n *\n * @type {number | bigint}\n * @memberof AccountApiDailyAccountSnapshot\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for disableFastWithdrawSwitch operation in AccountApi.\n * @interface DisableFastWithdrawSwitchRequest\n */\nexport interface DisableFastWithdrawSwitchRequest {\n /**\n *\n * @type {number | bigint}\n * @memberof AccountApiDisableFastWithdrawSwitch\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for enableFastWithdrawSwitch operation in AccountApi.\n * @interface EnableFastWithdrawSwitchRequest\n */\nexport interface EnableFastWithdrawSwitchRequest {\n /**\n *\n * @type {number | bigint}\n * @memberof AccountApiEnableFastWithdrawSwitch\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for getApiKeyPermission operation in AccountApi.\n * @interface GetApiKeyPermissionRequest\n */\nexport interface GetApiKeyPermissionRequest {\n /**\n *\n * @type {number | bigint}\n * @memberof AccountApiGetApiKeyPermission\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * AccountApi - object-oriented interface\n * @class AccountApi\n */\nexport class AccountApi implements AccountApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = AccountApiAxiosParamCreator(configuration);\n }\n\n /**\n * Fetch account api trading status detail.\n *\n * Weight: 1\n *\n * @summary Account API Trading Status (USER_DATA)\n * @param {AccountApiTradingStatusRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<AccountApiTradingStatusResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof AccountApi\n * @see {@link https://developers.binance.com/docs/wallet/account/Account-API-Trading-Status Binance API Documentation}\n */\n public async accountApiTradingStatus(\n requestParameters: AccountApiTradingStatusRequest = {}\n ): Promise<RestApiResponse<AccountApiTradingStatusResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.accountApiTradingStatus(\n requestParameters?.recvWindow\n );\n return sendRequest<AccountApiTradingStatusResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Fetch account info detail.\n *\n * Weight: 1\n *\n * @summary Account info (USER_DATA)\n * @param {AccountInfoRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<AccountInfoResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof AccountApi\n * @see {@link https://developers.binance.com/docs/wallet/account/Account-info Binance API Documentation}\n */\n public async accountInfo(\n requestParameters: AccountInfoRequest = {}\n ): Promise<RestApiResponse<AccountInfoResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.accountInfo(\n requestParameters?.recvWindow\n );\n return sendRequest<AccountInfoResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Fetch account status detail.\n *\n * Weight: 1\n *\n * @summary Account Status (USER_DATA)\n * @param {AccountStatusRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<AccountStatusResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof AccountApi\n * @see {@link https://developers.binance.com/docs/wallet/account/Account-Status Binance API Documentation}\n */\n public async accountStatus(\n requestParameters: AccountStatusRequest = {}\n ): Promise<RestApiResponse<AccountStatusResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.accountStatus(\n requestParameters?.recvWindow\n );\n return sendRequest<AccountStatusResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Daily account snapshot\n *\n * The query time period must be less then 30 days\n * Support query within the last one month only\n * If startTimeand endTime not sent, return records of the last 7 days by default\n *\n * Weight: 2400\n *\n * @summary Daily Account Snapshot (USER_DATA)\n * @param {DailyAccountSnapshotRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<DailyAccountSnapshotResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof AccountApi\n * @see {@link https://developers.binance.com/docs/wallet/account/daily-account-snapshoot Binance API Documentation}\n */\n public async dailyAccountSnapshot(\n requestParameters: DailyAccountSnapshotRequest\n ): Promise<RestApiResponse<DailyAccountSnapshotResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.dailyAccountSnapshot(\n requestParameters?.type,\n requestParameters?.startTime,\n requestParameters?.endTime,\n requestParameters?.limit,\n requestParameters?.recvWindow\n );\n return sendRequest<DailyAccountSnapshotResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n *\n * Weight: 1\n *\n * @summary Disable Fast Withdraw Switch (USER_DATA)\n * @param {DisableFastWithdrawSwitchRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<void>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof AccountApi\n * @see {@link https://developers.binance.com/docs/wallet/account/Disable-Fast-Withdraw-Switch Binance API Documentation}\n */\n public async disableFastWithdrawSwitch(\n requestParameters: DisableFastWithdrawSwitchRequest = {}\n ): Promise<RestApiResponse<void>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.disableFastWithdrawSwitch(\n requestParameters?.recvWindow\n );\n return sendRequest<void>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Enable Fast Withdraw Switch (USER_DATA)\n *\n * This request will enable fastwithdraw switch under your account. <br></br>\n * When Fast Withdraw Switch is on, transferring funds to a Binance account will be done instantly. There is no on-chain transaction, no transaction ID and no withdrawal fee.\n *\n * Weight: 1\n *\n * @summary Enable Fast Withdraw Switch (USER_DATA)\n * @param {EnableFastWithdrawSwitchRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<void>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof AccountApi\n * @see {@link https://developers.binance.com/docs/wallet/account/Enable-Fast-Withdraw-Switch Binance API Documentation}\n */\n public async enableFastWithdrawSwitch(\n requestParameters: EnableFastWithdrawSwitchRequest = {}\n ): Promise<RestApiResponse<void>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.enableFastWithdrawSwitch(\n requestParameters?.recvWindow\n );\n return sendRequest<void>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get API Key Permission\n *\n * Weight: 1\n *\n * @summary Get API Key Permission (USER_DATA)\n * @param {GetApiKeyPermissionRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetApiKeyPermissionResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof AccountApi\n * @see {@link https://developers.binance.com/docs/wallet/account/api-key-permission Binance API Documentation}\n */\n public async getApiKeyPermission(\n requestParameters: GetApiKeyPermissionRequest = {}\n ): Promise<RestApiResponse<GetApiKeyPermissionResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getApiKeyPermission(\n requestParameters?.recvWindow\n );\n return sendRequest<GetApiKeyPermissionResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n}\n","/**\n * Binance Wallet REST API\n *\n * OpenAPI Specification for the Binance Wallet REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport {\n ConfigurationRestAPI,\n TimeUnit,\n RestApiResponse,\n assertParamExists,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type {\n AssetDetailResponse,\n AssetDividendRecordResponse,\n DustConvertResponse,\n DustConvertibleAssetsResponse,\n DustTransferResponse,\n DustlogResponse,\n FundingWalletResponse,\n GetAssetsThatCanBeConvertedIntoBnbResponse,\n GetCloudMiningPaymentAndRefundHistoryResponse,\n GetOpenSymbolListResponse,\n QueryUserDelegationHistoryResponse,\n QueryUserUniversalTransferHistoryResponse,\n QueryUserWalletBalanceResponse,\n ToggleBnbBurnOnSpotTradeAndMarginInterestResponse,\n TradeFeeResponse,\n UserAssetResponse,\n UserUniversalTransferResponse,\n} from '../types';\n\n/**\n * AssetApi - axios parameter creator\n */\nconst AssetApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Fetch details of assets supported on Binance.\n *\n *\n * Please get network and other deposit or withdraw details from ``GET /sapi/v1/capital/config/getall``.\n *\n * Weight: 1\n *\n * @summary Asset Detail (USER_DATA)\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n assetDetail: async (recvWindow?: number | bigint): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: 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/asset/assetDetail',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Query asset dividend record.\n *\n *\n * There cannot be more than 180 days between parameter `startTime` and `endTime`.\n *\n * Weight: 10\n *\n * @summary Asset Dividend Record (USER_DATA)\n * @param {string} [asset] If asset is blank, then query all positive assets user have.\n * @param {number | bigint} [startTime]\n * @param {number | bigint} [endTime]\n * @param {number | bigint} [limit] min 7, max 30, default 7\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n assetDividendRecord: async (\n asset?: string,\n startTime?: number | bigint,\n endTime?: number | bigint,\n limit?: number | bigint,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (asset !== undefined && asset !== null) {\n localVarQueryParameter['asset'] = asset;\n }\n if (startTime !== undefined && startTime !== null) {\n localVarQueryParameter['startTime'] = startTime;\n }\n if (endTime !== undefined && endTime !== null) {\n localVarQueryParameter['endTime'] = endTime;\n }\n if (limit !== undefined && limit !== null) {\n localVarQueryParameter['limit'] = limit;\n }\n 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/asset/assetDividend',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Convert dust assets\n *\n * Weight: 10\n *\n * @summary Dust Convert (USER_DATA)\n * @param {string} asset\n * @param {string} [clientId] A unique id for the request\n * @param {string} [targetAsset]\n * @param {string} [thirdPartyClientId]\n * @param {number} [dustQuotaAssetToTargetAssetPrice]\n *\n * @throws {RequiredError}\n */\n dustConvert: async (\n asset: string,\n clientId?: string,\n targetAsset?: string,\n thirdPartyClientId?: string,\n dustQuotaAssetToTargetAssetPrice?: number\n ): Promise<RequestArgs> => {\n // verify required parameter 'asset' is not null or undefined\n assertParamExists('dustConvert', 'asset', asset);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (asset !== undefined && asset !== null) {\n localVarQueryParameter['asset'] = asset;\n }\n if (clientId !== undefined && clientId !== null) {\n localVarQueryParameter['clientId'] = clientId;\n }\n if (targetAsset !== undefined && targetAsset !== null) {\n localVarQueryParameter['targetAsset'] = targetAsset;\n }\n if (thirdPartyClientId !== undefined && thirdPartyClientId !== null) {\n localVarQueryParameter['thirdPartyClientId'] = thirdPartyClientId;\n }\n if (\n dustQuotaAssetToTargetAssetPrice !== undefined &&\n dustQuotaAssetToTargetAssetPrice !== null\n ) {\n localVarQueryParameter['dustQuotaAssetToTargetAssetPrice'] =\n dustQuotaAssetToTargetAssetPrice;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/asset/dust-convert/convert',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Query dust convertible assets\n *\n * Weight: 1\n *\n * @summary Dust Convertible Assets (USER_DATA)\n * @param {string} targetAsset\n * @param {number} [dustQuotaAssetToTargetAssetPrice]\n *\n * @throws {RequiredError}\n */\n dustConvertibleAssets: async (\n targetAsset: string,\n dustQuotaAssetToTargetAssetPrice?: number\n ): Promise<RequestArgs> => {\n // verify required parameter 'targetAsset' is not null or undefined\n assertParamExists('dustConvertibleAssets', 'targetAsset', targetAsset);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (targetAsset !== undefined && targetAsset !== null) {\n localVarQueryParameter['targetAsset'] = targetAsset;\n }\n if (\n dustQuotaAssetToTargetAssetPrice !== undefined &&\n dustQuotaAssetToTargetAssetPrice !== null\n ) {\n localVarQueryParameter['dustQuotaAssetToTargetAssetPrice'] =\n dustQuotaAssetToTargetAssetPrice;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/asset/dust-convert/query-convertible-assets',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Convert dust assets to BNB.\n *\n * You need to open`Enable Spot & Margin Trading` permission for the API Key which requests this endpoint.\n *\n * Weight: 10\n *\n * @summary Dust Transfer (USER_DATA)\n * @param {string} asset\n * @param {string} [accountType] `SPOT` or `MARGIN`,default `SPOT`\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n dustTransfer: async (\n asset: string,\n accountType?: string,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'asset' is not null or undefined\n assertParamExists('dustTransfer', 'asset', asset);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (asset !== undefined && asset !== null) {\n localVarQueryParameter['asset'] = asset;\n }\n if (accountType !== undefined && accountType !== null) {\n localVarQueryParameter['accountType'] = accountType;\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/asset/dust',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Dustlog\n *\n * Only return last 100 records\n * Only return records after 2020/12/01\n *\n * Weight: 1\n *\n * @summary DustLog(USER_DATA)\n * @param {number | bigint} [startTime]\n * @param {number | bigint} [endTime]\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n dustlog: async (\n startTime?: number | bigint,\n endTime?: number | bigint,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (startTime !== undefined && startTime !== null) {\n localVarQueryParameter['startTime'] = startTime;\n }\n if (endTime !== undefined && endTime !== null) {\n localVarQueryParameter['endTime'] = endTime;\n }\n if (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/asset/dribblet',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Query Funding Wallet\n *\n *\n * Currently supports querying the following business assets:Binance Pay, Binance Card, Binance Gift Card, Stock Token\n *\n * Weight: 1\n *\n * @summary Funding Wallet (USER_DATA)\n * @param {string} [asset] If asset is blank, then query all positive assets user have.\n * @param {string} [needBtcValuation] true or false\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n fundingWallet: async (\n asset?: string,\n needBtcValuation?: string,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (asset !== undefined && asset !== null) {\n localVarQueryParameter['asset'] = asset;\n }\n if (needBtcValuation !== undefined && needBtcValuation !== null) {\n localVarQueryParameter['needBtcValuation'] = needBtcValuation;\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/asset/get-funding-asset',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get Assets That Can Be Converted Into BNB\n *\n * Weight: 1\n *\n * @summary Get Assets That Can Be Converted Into BNB (USER_DATA)\n * @param {string} [accountType] `SPOT` or `MARGIN`,default `SPOT`\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n getAssetsThatCanBeConvertedIntoBnb: async (\n accountType?: string,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (accountType !== undefined && accountType !== null) {\n localVarQueryParameter['accountType'] = accountType;\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/asset/dust-btc',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * The query of Cloud-Mining payment and refund history\n *\n * Just return the SUCCESS records of payment and refund.\n * For response, type = 248 means payment, type = 249 means refund, status =S means SUCCESS.\n *\n * Weight: 600\n *\n * @summary Get Cloud-Mining payment and refund history (USER_DATA)\n * @param {number | bigint} startTime\n * @param {number | bigint} endTime\n * @param {number | bigint} [tranId] The transaction id\n * @param {string} [clientTranId] The unique flag\n * @param {string} [asset] If asset is blank, then query all positive assets user have.\n * @param {number | bigint} [current] current page, default 1, the min value is 1\n * @param {number | bigint} [size] page size, default 10, the max value is 100\n *\n * @throws {RequiredError}\n */\n getCloudMiningPaymentAndRefundHistory: async (\n startTime: number | bigint,\n endTime: number | bigint,\n tranId?: number | bigint,\n clientTranId?: string,\n asset?: string,\n current?: number | bigint,\n size?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'startTime' is not null or undefined\n assertParamExists('getCloudMiningPaymentAndRefundHistory', 'startTime', startTime);\n // verify required parameter 'endTime' is not null or undefined\n assertParamExists('getCloudMiningPaymentAndRefundHistory', 'endTime', endTime);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (tranId !== undefined && tranId !== null) {\n localVarQueryParameter['tranId'] = tranId;\n }\n if (clientTranId !== undefined && clientTranId !== null) {\n localVarQueryParameter['clientTranId'] = clientTranId;\n }\n if (asset !== undefined && asset !== null) {\n localVarQueryParameter['asset'] = asset;\n }\n if (startTime !== undefined && startTime !== null) {\n localVarQueryParameter['startTime'] = startTime;\n }\n if (endTime !== undefined && endTime !== null) {\n localVarQueryParameter['endTime'] = endTime;\n }\n if (current !== undefined && current !== null) {\n localVarQueryParameter['current'] = current;\n }\n if (size !== undefined && size !== null) {\n localVarQueryParameter['size'] = size;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/asset/ledger-transfer/cloud-mining/queryByPage',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get the list of symbols that are scheduled to be opened for trading in the market.\n *\n * Weight: 100\n *\n * @summary Get Open Symbol List (MARKET_DATA)\n *\n * @throws {RequiredError}\n */\n getOpenSymbolList: async (): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParamete