@binance/fiat 3.0.1 → 5.0.1
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/chunk.mjs +13 -0
- package/dist/index.d.mts +402 -470
- package/dist/index.d.ts +404 -471
- package/dist/index.js +295 -323
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +212 -311
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,343 +1,315 @@
|
|
|
1
|
-
|
|
1
|
+
//#region rolldown:runtime
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
var __export = (all) => {
|
|
4
|
+
let target = {};
|
|
5
|
+
for (var name$1 in all) __defProp(target, name$1, {
|
|
6
|
+
get: all[name$1],
|
|
7
|
+
enumerable: true
|
|
8
|
+
});
|
|
9
|
+
return target;
|
|
9
10
|
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
11
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
__export(index_exports, {
|
|
23
|
-
BadRequestError: () => import_common4.BadRequestError,
|
|
24
|
-
ConnectorClientError: () => import_common4.ConnectorClientError,
|
|
25
|
-
FIAT_REST_API_PROD_URL: () => import_common4.FIAT_REST_API_PROD_URL,
|
|
26
|
-
Fiat: () => Fiat,
|
|
27
|
-
FiatRestAPI: () => rest_api_exports,
|
|
28
|
-
ForbiddenError: () => import_common4.ForbiddenError,
|
|
29
|
-
NetworkError: () => import_common4.NetworkError,
|
|
30
|
-
NotFoundError: () => import_common4.NotFoundError,
|
|
31
|
-
RateLimitBanError: () => import_common4.RateLimitBanError,
|
|
32
|
-
RequiredError: () => import_common4.RequiredError,
|
|
33
|
-
ServerError: () => import_common4.ServerError,
|
|
34
|
-
TooManyRequestsError: () => import_common4.TooManyRequestsError,
|
|
35
|
-
UnauthorizedError: () => import_common4.UnauthorizedError
|
|
36
|
-
});
|
|
37
|
-
module.exports = __toCommonJS(index_exports);
|
|
12
|
+
//#endregion
|
|
13
|
+
let __binance_common = require("@binance/common");
|
|
38
14
|
|
|
39
|
-
|
|
40
|
-
var import_common3 = require("@binance/common");
|
|
41
|
-
|
|
42
|
-
// package.json
|
|
15
|
+
//#region package.json
|
|
43
16
|
var name = "@binance/fiat";
|
|
44
|
-
var version = "
|
|
17
|
+
var version = "5.0.1";
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region src/rest-api/modules/fiat-api.ts
|
|
21
|
+
/**
|
|
22
|
+
* Binance Fiat REST API
|
|
23
|
+
*
|
|
24
|
+
* OpenAPI Specification for the Binance Fiat REST API
|
|
25
|
+
*
|
|
26
|
+
* The version of the OpenAPI document: 1.0.0
|
|
27
|
+
*
|
|
28
|
+
*
|
|
29
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
30
|
+
* https://openapi-generator.tech
|
|
31
|
+
* Do not edit the class manually.
|
|
32
|
+
*/
|
|
33
|
+
/**
|
|
34
|
+
* FiatApi - axios parameter creator
|
|
35
|
+
*/
|
|
36
|
+
const FiatApiAxiosParamCreator = function(configuration) {
|
|
37
|
+
return {
|
|
38
|
+
getFiatDepositWithdrawHistory: async (transactionType, beginTime, endTime, page, rows, recvWindow) => {
|
|
39
|
+
(0, __binance_common.assertParamExists)("getFiatDepositWithdrawHistory", "transactionType", transactionType);
|
|
40
|
+
const localVarQueryParameter = {};
|
|
41
|
+
if (transactionType !== void 0 && transactionType !== null) localVarQueryParameter["transactionType"] = transactionType;
|
|
42
|
+
if (beginTime !== void 0 && beginTime !== null) localVarQueryParameter["beginTime"] = beginTime;
|
|
43
|
+
if (endTime !== void 0 && endTime !== null) localVarQueryParameter["endTime"] = endTime;
|
|
44
|
+
if (page !== void 0 && page !== null) localVarQueryParameter["page"] = page;
|
|
45
|
+
if (rows !== void 0 && rows !== null) localVarQueryParameter["rows"] = rows;
|
|
46
|
+
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
47
|
+
let _timeUnit;
|
|
48
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
49
|
+
return {
|
|
50
|
+
endpoint: "/sapi/v1/fiat/orders",
|
|
51
|
+
method: "GET",
|
|
52
|
+
params: localVarQueryParameter,
|
|
53
|
+
timeUnit: _timeUnit
|
|
54
|
+
};
|
|
55
|
+
},
|
|
56
|
+
getFiatPaymentsHistory: async (transactionType, beginTime, endTime, page, rows, recvWindow) => {
|
|
57
|
+
(0, __binance_common.assertParamExists)("getFiatPaymentsHistory", "transactionType", transactionType);
|
|
58
|
+
const localVarQueryParameter = {};
|
|
59
|
+
if (transactionType !== void 0 && transactionType !== null) localVarQueryParameter["transactionType"] = transactionType;
|
|
60
|
+
if (beginTime !== void 0 && beginTime !== null) localVarQueryParameter["beginTime"] = beginTime;
|
|
61
|
+
if (endTime !== void 0 && endTime !== null) localVarQueryParameter["endTime"] = endTime;
|
|
62
|
+
if (page !== void 0 && page !== null) localVarQueryParameter["page"] = page;
|
|
63
|
+
if (rows !== void 0 && rows !== null) localVarQueryParameter["rows"] = rows;
|
|
64
|
+
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
65
|
+
let _timeUnit;
|
|
66
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
67
|
+
return {
|
|
68
|
+
endpoint: "/sapi/v1/fiat/payments",
|
|
69
|
+
method: "GET",
|
|
70
|
+
params: localVarQueryParameter,
|
|
71
|
+
timeUnit: _timeUnit
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* FiatApi - object-oriented interface
|
|
78
|
+
* @class FiatApi
|
|
79
|
+
*/
|
|
80
|
+
var FiatApi = class {
|
|
81
|
+
constructor(configuration) {
|
|
82
|
+
this.configuration = configuration;
|
|
83
|
+
this.localVarAxiosParamCreator = FiatApiAxiosParamCreator(configuration);
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Get Fiat Deposit/Withdraw History
|
|
87
|
+
*
|
|
88
|
+
* If beginTime and endTime are not sent, the recent 30-day data will be returned.
|
|
89
|
+
*
|
|
90
|
+
* Weight: 45000
|
|
91
|
+
*
|
|
92
|
+
* @summary Get Fiat Deposit/Withdraw History (USER_DATA)
|
|
93
|
+
* @param {GetFiatDepositWithdrawHistoryRequest} requestParameters Request parameters.
|
|
94
|
+
* @returns {Promise<RestApiResponse<GetFiatDepositWithdrawHistoryResponse>>}
|
|
95
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
96
|
+
* @memberof FiatApi
|
|
97
|
+
* @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Deposit-Withdraw-History Binance API Documentation}
|
|
98
|
+
*/
|
|
99
|
+
async getFiatDepositWithdrawHistory(requestParameters) {
|
|
100
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFiatDepositWithdrawHistory(requestParameters?.transactionType, requestParameters?.beginTime, requestParameters?.endTime, requestParameters?.page, requestParameters?.rows, requestParameters?.recvWindow);
|
|
101
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.params, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Get Fiat Deposit/Withdraw History
|
|
105
|
+
*
|
|
106
|
+
* If beginTime and endTime are not sent, the recent 30-day data will be returned.
|
|
107
|
+
* paymentMethod: Only when requesting payments history for buy (transactionType=0), response contains paymentMethod representing the way of purchase. Now we have:
|
|
108
|
+
* Cash Balance
|
|
109
|
+
* Credit Card
|
|
110
|
+
* Online Banking
|
|
111
|
+
* Bank Transfer
|
|
112
|
+
*
|
|
113
|
+
* Weight: 1
|
|
114
|
+
*
|
|
115
|
+
* @summary Get Fiat Payments History (USER_DATA)
|
|
116
|
+
* @param {GetFiatPaymentsHistoryRequest} requestParameters Request parameters.
|
|
117
|
+
* @returns {Promise<RestApiResponse<GetFiatPaymentsHistoryResponse>>}
|
|
118
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
119
|
+
* @memberof FiatApi
|
|
120
|
+
* @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Payments-History Binance API Documentation}
|
|
121
|
+
*/
|
|
122
|
+
async getFiatPaymentsHistory(requestParameters) {
|
|
123
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFiatPaymentsHistory(requestParameters?.transactionType, requestParameters?.beginTime, requestParameters?.endTime, requestParameters?.page, requestParameters?.rows, requestParameters?.recvWindow);
|
|
124
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.params, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
125
|
+
}
|
|
126
|
+
};
|
|
45
127
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
128
|
+
//#endregion
|
|
129
|
+
//#region src/rest-api/rest-api.ts
|
|
130
|
+
/**
|
|
131
|
+
* Binance Fiat REST API
|
|
132
|
+
*
|
|
133
|
+
* OpenAPI Specification for the Binance Fiat REST API
|
|
134
|
+
*
|
|
135
|
+
* The version of the OpenAPI document: 1.0.0
|
|
136
|
+
*
|
|
137
|
+
*
|
|
138
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
139
|
+
* https://openapi-generator.tech
|
|
140
|
+
* Do not edit the class manually.
|
|
141
|
+
*/
|
|
142
|
+
var RestAPI = class {
|
|
143
|
+
constructor(configuration) {
|
|
144
|
+
this.configuration = configuration;
|
|
145
|
+
this.fiatApi = new FiatApi(configuration);
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Generic function to send a request.
|
|
149
|
+
* @param endpoint - The API endpoint to call.
|
|
150
|
+
* @param method - HTTP method to use (GET, POST, DELETE, etc.).
|
|
151
|
+
* @param params - Query parameters for the request.
|
|
152
|
+
*
|
|
153
|
+
* @returns A promise resolving to the response data object.
|
|
154
|
+
*/
|
|
155
|
+
sendRequest(endpoint, method, params = {}) {
|
|
156
|
+
return (0, __binance_common.sendRequest)(this.configuration, endpoint, method, params, void 0);
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Generic function to send a signed request.
|
|
160
|
+
* @param endpoint - The API endpoint to call.
|
|
161
|
+
* @param method - HTTP method to use (GET, POST, DELETE, etc.).
|
|
162
|
+
* @param params - Query parameters for the request.
|
|
163
|
+
*
|
|
164
|
+
* @returns A promise resolving to the response data object.
|
|
165
|
+
*/
|
|
166
|
+
sendSignedRequest(endpoint, method, params = {}) {
|
|
167
|
+
return (0, __binance_common.sendRequest)(this.configuration, endpoint, method, params, void 0, { isSigned: true });
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Get Fiat Deposit/Withdraw History
|
|
171
|
+
*
|
|
172
|
+
* If beginTime and endTime are not sent, the recent 30-day data will be returned.
|
|
173
|
+
*
|
|
174
|
+
* Weight: 45000
|
|
175
|
+
*
|
|
176
|
+
* @summary Get Fiat Deposit/Withdraw History (USER_DATA)
|
|
177
|
+
* @param {GetFiatDepositWithdrawHistoryRequest} requestParameters Request parameters.
|
|
178
|
+
*
|
|
179
|
+
* @returns {Promise<RestApiResponse<GetFiatDepositWithdrawHistoryResponse>>}
|
|
180
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
181
|
+
* @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Deposit-Withdraw-History Binance API Documentation}
|
|
182
|
+
*/
|
|
183
|
+
getFiatDepositWithdrawHistory(requestParameters) {
|
|
184
|
+
return this.fiatApi.getFiatDepositWithdrawHistory(requestParameters);
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Get Fiat Deposit/Withdraw History
|
|
188
|
+
*
|
|
189
|
+
* If beginTime and endTime are not sent, the recent 30-day data will be returned.
|
|
190
|
+
* paymentMethod: Only when requesting payments history for buy (transactionType=0), response contains paymentMethod representing the way of purchase. Now we have:
|
|
191
|
+
* Cash Balance
|
|
192
|
+
* Credit Card
|
|
193
|
+
* Online Banking
|
|
194
|
+
* Bank Transfer
|
|
195
|
+
*
|
|
196
|
+
* Weight: 1
|
|
197
|
+
*
|
|
198
|
+
* @summary Get Fiat Payments History (USER_DATA)
|
|
199
|
+
* @param {GetFiatPaymentsHistoryRequest} requestParameters Request parameters.
|
|
200
|
+
*
|
|
201
|
+
* @returns {Promise<RestApiResponse<GetFiatPaymentsHistoryResponse>>}
|
|
202
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
203
|
+
* @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Payments-History Binance API Documentation}
|
|
204
|
+
*/
|
|
205
|
+
getFiatPaymentsHistory(requestParameters) {
|
|
206
|
+
return this.fiatApi.getFiatPaymentsHistory(requestParameters);
|
|
207
|
+
}
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
//#endregion
|
|
211
|
+
//#region src/rest-api/index.ts
|
|
212
|
+
var rest_api_exports = /* @__PURE__ */ __export({
|
|
213
|
+
FiatApi: () => FiatApi,
|
|
214
|
+
RestAPI: () => RestAPI
|
|
51
215
|
});
|
|
52
216
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
var
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
* @param {number | bigint} [rows] default 100, max 500
|
|
70
|
-
* @param {number | bigint} [recvWindow]
|
|
71
|
-
*
|
|
72
|
-
* @throws {RequiredError}
|
|
73
|
-
*/
|
|
74
|
-
getFiatDepositWithdrawHistory: async (transactionType, beginTime, endTime, page, rows, recvWindow) => {
|
|
75
|
-
(0, import_common.assertParamExists)("getFiatDepositWithdrawHistory", "transactionType", transactionType);
|
|
76
|
-
const localVarQueryParameter = {};
|
|
77
|
-
if (transactionType !== void 0 && transactionType !== null) {
|
|
78
|
-
localVarQueryParameter["transactionType"] = transactionType;
|
|
79
|
-
}
|
|
80
|
-
if (beginTime !== void 0 && beginTime !== null) {
|
|
81
|
-
localVarQueryParameter["beginTime"] = beginTime;
|
|
82
|
-
}
|
|
83
|
-
if (endTime !== void 0 && endTime !== null) {
|
|
84
|
-
localVarQueryParameter["endTime"] = endTime;
|
|
85
|
-
}
|
|
86
|
-
if (page !== void 0 && page !== null) {
|
|
87
|
-
localVarQueryParameter["page"] = page;
|
|
88
|
-
}
|
|
89
|
-
if (rows !== void 0 && rows !== null) {
|
|
90
|
-
localVarQueryParameter["rows"] = rows;
|
|
91
|
-
}
|
|
92
|
-
if (recvWindow !== void 0 && recvWindow !== null) {
|
|
93
|
-
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
94
|
-
}
|
|
95
|
-
let _timeUnit;
|
|
96
|
-
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
97
|
-
return {
|
|
98
|
-
endpoint: "/sapi/v1/fiat/orders",
|
|
99
|
-
method: "GET",
|
|
100
|
-
params: localVarQueryParameter,
|
|
101
|
-
timeUnit: _timeUnit
|
|
102
|
-
};
|
|
103
|
-
},
|
|
104
|
-
/**
|
|
105
|
-
* Get Fiat Deposit/Withdraw History
|
|
106
|
-
*
|
|
107
|
-
* If beginTime and endTime are not sent, the recent 30-day data will be returned.
|
|
108
|
-
* paymentMethod: Only when requesting payments history for buy (transactionType=0), response contains paymentMethod representing the way of purchase. Now we have:
|
|
109
|
-
* Cash Balance
|
|
110
|
-
* Credit Card
|
|
111
|
-
* Online Banking
|
|
112
|
-
* Bank Transfer
|
|
113
|
-
*
|
|
114
|
-
* Weight: 1
|
|
115
|
-
*
|
|
116
|
-
* @summary Get Fiat Payments History (USER_DATA)
|
|
117
|
-
* @param {string} transactionType 0-buy,1-sell
|
|
118
|
-
* @param {number | bigint} [beginTime]
|
|
119
|
-
* @param {number | bigint} [endTime]
|
|
120
|
-
* @param {number | bigint} [page] default 1
|
|
121
|
-
* @param {number | bigint} [rows] default 100, max 500
|
|
122
|
-
* @param {number | bigint} [recvWindow]
|
|
123
|
-
*
|
|
124
|
-
* @throws {RequiredError}
|
|
125
|
-
*/
|
|
126
|
-
getFiatPaymentsHistory: async (transactionType, beginTime, endTime, page, rows, recvWindow) => {
|
|
127
|
-
(0, import_common.assertParamExists)("getFiatPaymentsHistory", "transactionType", transactionType);
|
|
128
|
-
const localVarQueryParameter = {};
|
|
129
|
-
if (transactionType !== void 0 && transactionType !== null) {
|
|
130
|
-
localVarQueryParameter["transactionType"] = transactionType;
|
|
131
|
-
}
|
|
132
|
-
if (beginTime !== void 0 && beginTime !== null) {
|
|
133
|
-
localVarQueryParameter["beginTime"] = beginTime;
|
|
134
|
-
}
|
|
135
|
-
if (endTime !== void 0 && endTime !== null) {
|
|
136
|
-
localVarQueryParameter["endTime"] = endTime;
|
|
137
|
-
}
|
|
138
|
-
if (page !== void 0 && page !== null) {
|
|
139
|
-
localVarQueryParameter["page"] = page;
|
|
140
|
-
}
|
|
141
|
-
if (rows !== void 0 && rows !== null) {
|
|
142
|
-
localVarQueryParameter["rows"] = rows;
|
|
143
|
-
}
|
|
144
|
-
if (recvWindow !== void 0 && recvWindow !== null) {
|
|
145
|
-
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
146
|
-
}
|
|
147
|
-
let _timeUnit;
|
|
148
|
-
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
149
|
-
return {
|
|
150
|
-
endpoint: "/sapi/v1/fiat/payments",
|
|
151
|
-
method: "GET",
|
|
152
|
-
params: localVarQueryParameter,
|
|
153
|
-
timeUnit: _timeUnit
|
|
154
|
-
};
|
|
155
|
-
}
|
|
156
|
-
};
|
|
217
|
+
//#endregion
|
|
218
|
+
//#region src/fiat.ts
|
|
219
|
+
var Fiat = class {
|
|
220
|
+
constructor(config) {
|
|
221
|
+
const userAgent = (0, __binance_common.buildUserAgent)(name, version);
|
|
222
|
+
if (config?.configurationRestAPI) {
|
|
223
|
+
const configRestAPI = new __binance_common.ConfigurationRestAPI(config.configurationRestAPI);
|
|
224
|
+
configRestAPI.basePath = configRestAPI.basePath || __binance_common.FIAT_REST_API_PROD_URL;
|
|
225
|
+
configRestAPI.baseOptions = configRestAPI.baseOptions || {};
|
|
226
|
+
configRestAPI.baseOptions.headers = {
|
|
227
|
+
...configRestAPI.baseOptions.headers || {},
|
|
228
|
+
"User-Agent": userAgent
|
|
229
|
+
};
|
|
230
|
+
this.restAPI = new RestAPI(configRestAPI);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
157
233
|
};
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
234
|
+
|
|
235
|
+
//#endregion
|
|
236
|
+
Object.defineProperty(exports, 'BadRequestError', {
|
|
237
|
+
enumerable: true,
|
|
238
|
+
get: function () {
|
|
239
|
+
return __binance_common.BadRequestError;
|
|
162
240
|
}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
* Weight: 45000
|
|
169
|
-
*
|
|
170
|
-
* @summary Get Fiat Deposit/Withdraw History (USER_DATA)
|
|
171
|
-
* @param {GetFiatDepositWithdrawHistoryRequest} requestParameters Request parameters.
|
|
172
|
-
* @returns {Promise<RestApiResponse<GetFiatDepositWithdrawHistoryResponse>>}
|
|
173
|
-
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
174
|
-
* @memberof FiatApi
|
|
175
|
-
* @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Deposit-Withdraw-History Binance API Documentation}
|
|
176
|
-
*/
|
|
177
|
-
async getFiatDepositWithdrawHistory(requestParameters) {
|
|
178
|
-
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFiatDepositWithdrawHistory(
|
|
179
|
-
requestParameters?.transactionType,
|
|
180
|
-
requestParameters?.beginTime,
|
|
181
|
-
requestParameters?.endTime,
|
|
182
|
-
requestParameters?.page,
|
|
183
|
-
requestParameters?.rows,
|
|
184
|
-
requestParameters?.recvWindow
|
|
185
|
-
);
|
|
186
|
-
return (0, import_common.sendRequest)(
|
|
187
|
-
this.configuration,
|
|
188
|
-
localVarAxiosArgs.endpoint,
|
|
189
|
-
localVarAxiosArgs.method,
|
|
190
|
-
localVarAxiosArgs.params,
|
|
191
|
-
localVarAxiosArgs?.timeUnit,
|
|
192
|
-
{ isSigned: true }
|
|
193
|
-
);
|
|
241
|
+
});
|
|
242
|
+
Object.defineProperty(exports, 'ConfigurationFiat', {
|
|
243
|
+
enumerable: true,
|
|
244
|
+
get: function () {
|
|
245
|
+
return ConfigurationFiat;
|
|
194
246
|
}
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
* Cash Balance
|
|
201
|
-
* Credit Card
|
|
202
|
-
* Online Banking
|
|
203
|
-
* Bank Transfer
|
|
204
|
-
*
|
|
205
|
-
* Weight: 1
|
|
206
|
-
*
|
|
207
|
-
* @summary Get Fiat Payments History (USER_DATA)
|
|
208
|
-
* @param {GetFiatPaymentsHistoryRequest} requestParameters Request parameters.
|
|
209
|
-
* @returns {Promise<RestApiResponse<GetFiatPaymentsHistoryResponse>>}
|
|
210
|
-
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
211
|
-
* @memberof FiatApi
|
|
212
|
-
* @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Payments-History Binance API Documentation}
|
|
213
|
-
*/
|
|
214
|
-
async getFiatPaymentsHistory(requestParameters) {
|
|
215
|
-
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFiatPaymentsHistory(
|
|
216
|
-
requestParameters?.transactionType,
|
|
217
|
-
requestParameters?.beginTime,
|
|
218
|
-
requestParameters?.endTime,
|
|
219
|
-
requestParameters?.page,
|
|
220
|
-
requestParameters?.rows,
|
|
221
|
-
requestParameters?.recvWindow
|
|
222
|
-
);
|
|
223
|
-
return (0, import_common.sendRequest)(
|
|
224
|
-
this.configuration,
|
|
225
|
-
localVarAxiosArgs.endpoint,
|
|
226
|
-
localVarAxiosArgs.method,
|
|
227
|
-
localVarAxiosArgs.params,
|
|
228
|
-
localVarAxiosArgs?.timeUnit,
|
|
229
|
-
{ isSigned: true }
|
|
230
|
-
);
|
|
247
|
+
});
|
|
248
|
+
Object.defineProperty(exports, 'ConnectorClientError', {
|
|
249
|
+
enumerable: true,
|
|
250
|
+
get: function () {
|
|
251
|
+
return __binance_common.ConnectorClientError;
|
|
231
252
|
}
|
|
232
|
-
};
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
constructor(configuration) {
|
|
238
|
-
this.configuration = configuration;
|
|
239
|
-
this.fiatApi = new FiatApi(configuration);
|
|
253
|
+
});
|
|
254
|
+
Object.defineProperty(exports, 'FIAT_REST_API_PROD_URL', {
|
|
255
|
+
enumerable: true,
|
|
256
|
+
get: function () {
|
|
257
|
+
return __binance_common.FIAT_REST_API_PROD_URL;
|
|
240
258
|
}
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
* @returns A promise resolving to the response data object.
|
|
248
|
-
*/
|
|
249
|
-
sendRequest(endpoint, method, params = {}) {
|
|
250
|
-
return (0, import_common2.sendRequest)(this.configuration, endpoint, method, params, void 0);
|
|
259
|
+
});
|
|
260
|
+
exports.Fiat = Fiat;
|
|
261
|
+
Object.defineProperty(exports, 'FiatRestAPI', {
|
|
262
|
+
enumerable: true,
|
|
263
|
+
get: function () {
|
|
264
|
+
return rest_api_exports;
|
|
251
265
|
}
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
*
|
|
258
|
-
* @returns A promise resolving to the response data object.
|
|
259
|
-
*/
|
|
260
|
-
sendSignedRequest(endpoint, method, params = {}) {
|
|
261
|
-
return (0, import_common2.sendRequest)(this.configuration, endpoint, method, params, void 0, {
|
|
262
|
-
isSigned: true
|
|
263
|
-
});
|
|
266
|
+
});
|
|
267
|
+
Object.defineProperty(exports, 'ForbiddenError', {
|
|
268
|
+
enumerable: true,
|
|
269
|
+
get: function () {
|
|
270
|
+
return __binance_common.ForbiddenError;
|
|
264
271
|
}
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
* Weight: 45000
|
|
271
|
-
*
|
|
272
|
-
* @summary Get Fiat Deposit/Withdraw History (USER_DATA)
|
|
273
|
-
* @param {GetFiatDepositWithdrawHistoryRequest} requestParameters Request parameters.
|
|
274
|
-
*
|
|
275
|
-
* @returns {Promise<RestApiResponse<GetFiatDepositWithdrawHistoryResponse>>}
|
|
276
|
-
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
277
|
-
* @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Deposit-Withdraw-History Binance API Documentation}
|
|
278
|
-
*/
|
|
279
|
-
getFiatDepositWithdrawHistory(requestParameters) {
|
|
280
|
-
return this.fiatApi.getFiatDepositWithdrawHistory(requestParameters);
|
|
272
|
+
});
|
|
273
|
+
Object.defineProperty(exports, 'NetworkError', {
|
|
274
|
+
enumerable: true,
|
|
275
|
+
get: function () {
|
|
276
|
+
return __binance_common.NetworkError;
|
|
281
277
|
}
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
* Cash Balance
|
|
288
|
-
* Credit Card
|
|
289
|
-
* Online Banking
|
|
290
|
-
* Bank Transfer
|
|
291
|
-
*
|
|
292
|
-
* Weight: 1
|
|
293
|
-
*
|
|
294
|
-
* @summary Get Fiat Payments History (USER_DATA)
|
|
295
|
-
* @param {GetFiatPaymentsHistoryRequest} requestParameters Request parameters.
|
|
296
|
-
*
|
|
297
|
-
* @returns {Promise<RestApiResponse<GetFiatPaymentsHistoryResponse>>}
|
|
298
|
-
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
299
|
-
* @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Payments-History Binance API Documentation}
|
|
300
|
-
*/
|
|
301
|
-
getFiatPaymentsHistory(requestParameters) {
|
|
302
|
-
return this.fiatApi.getFiatPaymentsHistory(requestParameters);
|
|
278
|
+
});
|
|
279
|
+
Object.defineProperty(exports, 'NotFoundError', {
|
|
280
|
+
enumerable: true,
|
|
281
|
+
get: function () {
|
|
282
|
+
return __binance_common.NotFoundError;
|
|
303
283
|
}
|
|
304
|
-
};
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
284
|
+
});
|
|
285
|
+
Object.defineProperty(exports, 'RateLimitBanError', {
|
|
286
|
+
enumerable: true,
|
|
287
|
+
get: function () {
|
|
288
|
+
return __binance_common.RateLimitBanError;
|
|
289
|
+
}
|
|
290
|
+
});
|
|
291
|
+
Object.defineProperty(exports, 'RequiredError', {
|
|
292
|
+
enumerable: true,
|
|
293
|
+
get: function () {
|
|
294
|
+
return __binance_common.RequiredError;
|
|
295
|
+
}
|
|
296
|
+
});
|
|
297
|
+
Object.defineProperty(exports, 'ServerError', {
|
|
298
|
+
enumerable: true,
|
|
299
|
+
get: function () {
|
|
300
|
+
return __binance_common.ServerError;
|
|
301
|
+
}
|
|
302
|
+
});
|
|
303
|
+
Object.defineProperty(exports, 'TooManyRequestsError', {
|
|
304
|
+
enumerable: true,
|
|
305
|
+
get: function () {
|
|
306
|
+
return __binance_common.TooManyRequestsError;
|
|
307
|
+
}
|
|
308
|
+
});
|
|
309
|
+
Object.defineProperty(exports, 'UnauthorizedError', {
|
|
310
|
+
enumerable: true,
|
|
311
|
+
get: function () {
|
|
312
|
+
return __binance_common.UnauthorizedError;
|
|
322
313
|
}
|
|
323
|
-
};
|
|
324
|
-
|
|
325
|
-
// src/index.ts
|
|
326
|
-
var import_common4 = require("@binance/common");
|
|
327
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
328
|
-
0 && (module.exports = {
|
|
329
|
-
BadRequestError,
|
|
330
|
-
ConnectorClientError,
|
|
331
|
-
FIAT_REST_API_PROD_URL,
|
|
332
|
-
Fiat,
|
|
333
|
-
FiatRestAPI,
|
|
334
|
-
ForbiddenError,
|
|
335
|
-
NetworkError,
|
|
336
|
-
NotFoundError,
|
|
337
|
-
RateLimitBanError,
|
|
338
|
-
RequiredError,
|
|
339
|
-
ServerError,
|
|
340
|
-
TooManyRequestsError,
|
|
341
|
-
UnauthorizedError
|
|
342
314
|
});
|
|
343
315
|
//# sourceMappingURL=index.js.map
|