@binance/pay 6.0.4 → 7.0.0
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.d.mts +113 -202
- package/dist/index.d.ts +113 -201
- package/dist/index.js +52 -98
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +52 -98
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -14,14 +14,14 @@ let __binance_common = require("@binance/common");
|
|
|
14
14
|
|
|
15
15
|
//#region package.json
|
|
16
16
|
var name = "@binance/pay";
|
|
17
|
-
var version = "
|
|
17
|
+
var version = "7.0.0";
|
|
18
18
|
|
|
19
19
|
//#endregion
|
|
20
|
-
//#region src/rest-api/modules/
|
|
20
|
+
//#region src/rest-api/modules/api.ts
|
|
21
21
|
/**
|
|
22
22
|
* Binance Pay REST API
|
|
23
23
|
*
|
|
24
|
-
*
|
|
24
|
+
* Query Binance Pay transaction history.
|
|
25
25
|
*
|
|
26
26
|
* The version of the OpenAPI document: 1.0.0
|
|
27
27
|
*
|
|
@@ -31,9 +31,9 @@ var version = "6.0.4";
|
|
|
31
31
|
* Do not edit the class manually.
|
|
32
32
|
*/
|
|
33
33
|
/**
|
|
34
|
-
*
|
|
34
|
+
* Api - axios parameter creator
|
|
35
35
|
*/
|
|
36
|
-
const
|
|
36
|
+
const ApiAxiosParamCreator = function(configuration) {
|
|
37
37
|
return { getPayTradeHistory: async (startTime, endTime, limit, recvWindow) => {
|
|
38
38
|
const localVarQueryParameter = {};
|
|
39
39
|
const localVarBodyParameter = {};
|
|
@@ -55,66 +55,43 @@ const PayApiAxiosParamCreator = function(configuration) {
|
|
|
55
55
|
} };
|
|
56
56
|
};
|
|
57
57
|
/**
|
|
58
|
-
*
|
|
59
|
-
* @class
|
|
58
|
+
* Api - object-oriented interface
|
|
59
|
+
* @class Api
|
|
60
60
|
*/
|
|
61
|
-
var
|
|
61
|
+
var Api = class {
|
|
62
62
|
constructor(configuration) {
|
|
63
63
|
this.configuration = configuration;
|
|
64
|
-
this.localVarAxiosParamCreator =
|
|
64
|
+
this.localVarAxiosParamCreator = ApiAxiosParamCreator(configuration);
|
|
65
65
|
}
|
|
66
66
|
/**
|
|
67
67
|
* Get Pay Trade History
|
|
68
68
|
*
|
|
69
|
-
*
|
|
70
|
-
* The max interval between startTime and endTime is 90 days.
|
|
71
|
-
* Support for querying orders within the last 18 months.
|
|
72
|
-
* For payerInfo and receiverInfo,there are different return values in different orderTypes.
|
|
73
|
-
* Sender's perspective when orderType is C2C
|
|
74
|
-
* payerInfo : binanceId
|
|
75
|
-
* receiverInfo : name, binanceId/accountId/email/countryCode/phoneNumber/mobileCode (based on user input)
|
|
76
|
-
* Receiver's perspective when orderType is C2C
|
|
77
|
-
* payerInfo : name
|
|
78
|
-
* receiverInfo : binanceId
|
|
79
|
-
* Sender's perspective when orderType is CRYPTO_BOX
|
|
80
|
-
* payerInfo : binanceId
|
|
81
|
-
* receiverInfo : name(the value is always "Crypto Box")
|
|
82
|
-
* Receiver's perspective when orderType is CRYPTO_BOX
|
|
83
|
-
* payerInfo : name
|
|
84
|
-
* receiverInfo : binanceId
|
|
85
|
-
* Sender's perspective when orderType is PAY
|
|
86
|
-
* payerInfo : binanceId
|
|
87
|
-
* receiverInfo : name
|
|
88
|
-
* Receiver's perspective when orderType is PAY
|
|
89
|
-
* payerInfo : name
|
|
90
|
-
* receiverInfo : binanceId, name
|
|
91
|
-
* Sender's perspective when orderType is PAY_REFUND
|
|
92
|
-
* payerInfo : binanceId, name
|
|
93
|
-
* receiverInfo : name, accountId
|
|
94
|
-
* Receiver's perspective when orderType is PAY_REFUND
|
|
95
|
-
* payerInfo : name
|
|
96
|
-
* receiverInfo : binanceId
|
|
97
|
-
* Sender's perspective when orderType is PAYOUT
|
|
98
|
-
* payerInfo : binanceId, name
|
|
99
|
-
* receiverInfo : name, accountId
|
|
100
|
-
* Receiver's perspective when orderType is PAYOUT
|
|
101
|
-
* payerInfo : name
|
|
102
|
-
* receiverInfo : binanceId
|
|
103
|
-
* Receiver's perspective when orderType is CRYPTO_BOX_RF
|
|
104
|
-
* payerInfo : name(the value is always "Crypto Box")
|
|
105
|
-
* receiverInfo : binanceId
|
|
106
|
-
* Sender's perspective when orderType is REMITTANCE
|
|
107
|
-
* payerInfo : binanceId
|
|
108
|
-
* receiverInfo : name, institutionName, cardNumber, digitalWalletId
|
|
69
|
+
* Weight(UID): 3000
|
|
109
70
|
*
|
|
110
|
-
*
|
|
71
|
+
* Notes:
|
|
72
|
+
* - If `startTime` and `endTime` are not sent, the recent 90 days' data will be returned.
|
|
73
|
+
* - The max interval between `startTime` and `endTime` is 90 days.
|
|
74
|
+
* - Support for querying orders within the last 18 months.
|
|
75
|
+
* - `payerInfo` and `receiverInfo` return different fields in different `orderType` values:
|
|
76
|
+
* - C2C sender: `payerInfo=binanceId`; `receiverInfo=name, binanceId/accountId/email/countryCode/phoneNumber/mobileCode` (based on user input).
|
|
77
|
+
* - C2C receiver: `payerInfo=name`; `receiverInfo=binanceId`.
|
|
78
|
+
* - CRYPTO_BOX sender: `payerInfo=binanceId`; `receiverInfo=name` (always `"Crypto Box"`).
|
|
79
|
+
* - CRYPTO_BOX receiver: `payerInfo=name`; `receiverInfo=binanceId`.
|
|
80
|
+
* - PAY sender: `payerInfo=binanceId`; `receiverInfo=name`.
|
|
81
|
+
* - PAY receiver: `payerInfo=name`; `receiverInfo=binanceId, name`.
|
|
82
|
+
* - PAY_REFUND sender: `payerInfo=binanceId, name`; `receiverInfo=name, accountId`.
|
|
83
|
+
* - PAY_REFUND receiver: `payerInfo=name`; `receiverInfo=binanceId`.
|
|
84
|
+
* - PAYOUT sender: `payerInfo=binanceId, name`; `receiverInfo=name, accountId`.
|
|
85
|
+
* - PAYOUT receiver: `payerInfo=name`; `receiverInfo=binanceId`.
|
|
86
|
+
* - CRYPTO_BOX_RF receiver: `payerInfo=name` (always `"Crypto Box"`); `receiverInfo=binanceId`.
|
|
87
|
+
* - REMITTANCE sender: `payerInfo=binanceId`; `receiverInfo=name, institutionName, cardNumber, digitalWalletId`.
|
|
111
88
|
*
|
|
112
89
|
* @summary Get Pay Trade History
|
|
113
90
|
* @param {GetPayTradeHistoryRequest} requestParameters Request parameters.
|
|
114
91
|
* @returns {Promise<RestApiResponse<GetPayTradeHistoryResponse>>}
|
|
115
92
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
116
|
-
* @memberof
|
|
117
|
-
* @see {@link https://developers.binance.com/docs/pay/rest-api
|
|
93
|
+
* @memberof Api
|
|
94
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-pay/api/rest-api/~#get-pay-trade-history Binance API Documentation}
|
|
118
95
|
*/
|
|
119
96
|
async getPayTradeHistory(requestParameters = {}) {
|
|
120
97
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getPayTradeHistory(requestParameters?.startTime, requestParameters?.endTime, requestParameters?.limit, requestParameters?.recvWindow);
|
|
@@ -127,7 +104,7 @@ var PayApi = class {
|
|
|
127
104
|
/**
|
|
128
105
|
* Binance Pay REST API
|
|
129
106
|
*
|
|
130
|
-
*
|
|
107
|
+
* Query Binance Pay transaction history.
|
|
131
108
|
*
|
|
132
109
|
* The version of the OpenAPI document: 1.0.0
|
|
133
110
|
*
|
|
@@ -139,7 +116,7 @@ var PayApi = class {
|
|
|
139
116
|
var RestAPI = class {
|
|
140
117
|
constructor(configuration) {
|
|
141
118
|
this.configuration = configuration;
|
|
142
|
-
this.
|
|
119
|
+
this.api = new Api(configuration);
|
|
143
120
|
}
|
|
144
121
|
/**
|
|
145
122
|
* Generic function to send a request.
|
|
@@ -168,65 +145,42 @@ var RestAPI = class {
|
|
|
168
145
|
/**
|
|
169
146
|
* Get Pay Trade History
|
|
170
147
|
*
|
|
171
|
-
*
|
|
172
|
-
* The max interval between startTime and endTime is 90 days.
|
|
173
|
-
* Support for querying orders within the last 18 months.
|
|
174
|
-
* For payerInfo and receiverInfo,there are different return values in different orderTypes.
|
|
175
|
-
* Sender's perspective when orderType is C2C
|
|
176
|
-
* payerInfo : binanceId
|
|
177
|
-
* receiverInfo : name, binanceId/accountId/email/countryCode/phoneNumber/mobileCode (based on user input)
|
|
178
|
-
* Receiver's perspective when orderType is C2C
|
|
179
|
-
* payerInfo : name
|
|
180
|
-
* receiverInfo : binanceId
|
|
181
|
-
* Sender's perspective when orderType is CRYPTO_BOX
|
|
182
|
-
* payerInfo : binanceId
|
|
183
|
-
* receiverInfo : name(the value is always "Crypto Box")
|
|
184
|
-
* Receiver's perspective when orderType is CRYPTO_BOX
|
|
185
|
-
* payerInfo : name
|
|
186
|
-
* receiverInfo : binanceId
|
|
187
|
-
* Sender's perspective when orderType is PAY
|
|
188
|
-
* payerInfo : binanceId
|
|
189
|
-
* receiverInfo : name
|
|
190
|
-
* Receiver's perspective when orderType is PAY
|
|
191
|
-
* payerInfo : name
|
|
192
|
-
* receiverInfo : binanceId, name
|
|
193
|
-
* Sender's perspective when orderType is PAY_REFUND
|
|
194
|
-
* payerInfo : binanceId, name
|
|
195
|
-
* receiverInfo : name, accountId
|
|
196
|
-
* Receiver's perspective when orderType is PAY_REFUND
|
|
197
|
-
* payerInfo : name
|
|
198
|
-
* receiverInfo : binanceId
|
|
199
|
-
* Sender's perspective when orderType is PAYOUT
|
|
200
|
-
* payerInfo : binanceId, name
|
|
201
|
-
* receiverInfo : name, accountId
|
|
202
|
-
* Receiver's perspective when orderType is PAYOUT
|
|
203
|
-
* payerInfo : name
|
|
204
|
-
* receiverInfo : binanceId
|
|
205
|
-
* Receiver's perspective when orderType is CRYPTO_BOX_RF
|
|
206
|
-
* payerInfo : name(the value is always "Crypto Box")
|
|
207
|
-
* receiverInfo : binanceId
|
|
208
|
-
* Sender's perspective when orderType is REMITTANCE
|
|
209
|
-
* payerInfo : binanceId
|
|
210
|
-
* receiverInfo : name, institutionName, cardNumber, digitalWalletId
|
|
148
|
+
* Weight(UID): 3000
|
|
211
149
|
*
|
|
212
|
-
*
|
|
150
|
+
* Notes:
|
|
151
|
+
* - If `startTime` and `endTime` are not sent, the recent 90 days' data will be returned.
|
|
152
|
+
* - The max interval between `startTime` and `endTime` is 90 days.
|
|
153
|
+
* - Support for querying orders within the last 18 months.
|
|
154
|
+
* - `payerInfo` and `receiverInfo` return different fields in different `orderType` values:
|
|
155
|
+
* - C2C sender: `payerInfo=binanceId`; `receiverInfo=name, binanceId/accountId/email/countryCode/phoneNumber/mobileCode` (based on user input).
|
|
156
|
+
* - C2C receiver: `payerInfo=name`; `receiverInfo=binanceId`.
|
|
157
|
+
* - CRYPTO_BOX sender: `payerInfo=binanceId`; `receiverInfo=name` (always `"Crypto Box"`).
|
|
158
|
+
* - CRYPTO_BOX receiver: `payerInfo=name`; `receiverInfo=binanceId`.
|
|
159
|
+
* - PAY sender: `payerInfo=binanceId`; `receiverInfo=name`.
|
|
160
|
+
* - PAY receiver: `payerInfo=name`; `receiverInfo=binanceId, name`.
|
|
161
|
+
* - PAY_REFUND sender: `payerInfo=binanceId, name`; `receiverInfo=name, accountId`.
|
|
162
|
+
* - PAY_REFUND receiver: `payerInfo=name`; `receiverInfo=binanceId`.
|
|
163
|
+
* - PAYOUT sender: `payerInfo=binanceId, name`; `receiverInfo=name, accountId`.
|
|
164
|
+
* - PAYOUT receiver: `payerInfo=name`; `receiverInfo=binanceId`.
|
|
165
|
+
* - CRYPTO_BOX_RF receiver: `payerInfo=name` (always `"Crypto Box"`); `receiverInfo=binanceId`.
|
|
166
|
+
* - REMITTANCE sender: `payerInfo=binanceId`; `receiverInfo=name, institutionName, cardNumber, digitalWalletId`.
|
|
213
167
|
*
|
|
214
168
|
* @summary Get Pay Trade History
|
|
215
169
|
* @param {GetPayTradeHistoryRequest} requestParameters Request parameters.
|
|
216
170
|
*
|
|
217
171
|
* @returns {Promise<RestApiResponse<GetPayTradeHistoryResponse>>}
|
|
218
172
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
219
|
-
* @see {@link https://developers.binance.com/docs/pay/rest-api
|
|
173
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-pay/api/rest-api/~#get-pay-trade-history Binance API Documentation}
|
|
220
174
|
*/
|
|
221
175
|
getPayTradeHistory(requestParameters = {}) {
|
|
222
|
-
return this.
|
|
176
|
+
return this.api.getPayTradeHistory(requestParameters);
|
|
223
177
|
}
|
|
224
178
|
};
|
|
225
179
|
|
|
226
180
|
//#endregion
|
|
227
181
|
//#region src/rest-api/index.ts
|
|
228
182
|
var rest_api_exports = /* @__PURE__ */ __export({
|
|
229
|
-
|
|
183
|
+
Api: () => Api,
|
|
230
184
|
RestAPI: () => RestAPI
|
|
231
185
|
});
|
|
232
186
|
|
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","ConfigurationRestAPI","PAY_REST_API_PROD_URL"],"sources":["../package.json","../src/rest-api/modules/pay-api.ts","../src/rest-api/rest-api.ts","../src/rest-api/index.ts","../src/pay.ts"],"sourcesContent":["{\n \"name\": \"@binance/pay\",\n \"description\": \"Official Binance Pay Connector - A lightweight library that provides a convenient interface to Binance's Pay REST API.\",\n \"version\": \"6.0.4\",\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 \"Simple Earn\",\n \"Connector\",\n \"REST\",\n \"Trading\"\n ],\n \"author\": \"Binance\",\n \"license\": \"MIT\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/binance/binance-connector-js.git\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/binance/binance-connector-js/issues\"\n },\n \"homepage\": \"https://github.com/binance/binance-connector-js#readme\",\n \"files\": [\n \"dist\"\n ],\n \"devDependencies\": {\n \"@types/jest\": \"^29.5.4\",\n \"@types/node\": \"^20.17.24\",\n \"eslint\": \"8.57.0\",\n \"jest\": \"^29.6.4\",\n \"json-with-bigint\": \"^3.4.4\",\n \"prettier\": \"^3.3.3\",\n \"ts-jest\": \"^29.1.1\",\n \"ts-node\": \"^10.9.1\",\n \"tsdown\": \"^0.16.5\",\n \"typescript\": \"^5.7.2\",\n \"typescript-eslint\": \"^8.24.0\"\n },\n \"dependencies\": {\n \"@binance/common\": \"2.4.1\",\n \"axios\": \"^1.7.4\"\n }\n}\n","/**\n * Binance Pay REST API\n *\n * OpenAPI Specification for the Binance Pay 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 sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type { GetPayTradeHistoryResponse } from '../types';\n\n/**\n * PayApi - axios parameter creator\n */\nconst PayApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Get Pay Trade History\n *\n * If startTime and endTime are not sent, the recent 90 days' data will be returned.\n * The max interval between startTime and endTime is 90 days.\n * Support for querying orders within the last 18 months.\n * For payerInfo and receiverInfo,there are different return values in different orderTypes.\n * Sender's perspective when orderType is C2C\n * payerInfo : binanceId\n * receiverInfo : name, binanceId/accountId/email/countryCode/phoneNumber/mobileCode (based on user input)\n * Receiver's perspective when orderType is C2C\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is CRYPTO_BOX\n * payerInfo : binanceId\n * receiverInfo : name(the value is always \"Crypto Box\")\n * Receiver's perspective when orderType is CRYPTO_BOX\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is PAY\n * payerInfo : binanceId\n * receiverInfo : name\n * Receiver's perspective when orderType is PAY\n * payerInfo : name\n * receiverInfo : binanceId, name\n * Sender's perspective when orderType is PAY_REFUND\n * payerInfo : binanceId, name\n * receiverInfo : name, accountId\n * Receiver's perspective when orderType is PAY_REFUND\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is PAYOUT\n * payerInfo : binanceId, name\n * receiverInfo : name, accountId\n * Receiver's perspective when orderType is PAYOUT\n * payerInfo : name\n * receiverInfo : binanceId\n * Receiver's perspective when orderType is CRYPTO_BOX_RF\n * payerInfo : name(the value is always \"Crypto Box\")\n * receiverInfo : binanceId\n * Sender's perspective when orderType is REMITTANCE\n * payerInfo : binanceId\n * receiverInfo : name, institutionName, cardNumber, digitalWalletId\n *\n * Weight: 3000\n *\n * @summary Get Pay Trade History\n * @param {number | bigint} [startTime]\n * @param {number | bigint} [endTime]\n * @param {number | bigint} [limit] default 100, max 100\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n getPayTradeHistory: async (\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 const localVarHeaderParameter: 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 (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/pay/transactions',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * PayApi - interface\n * @interface PayApi\n */\nexport interface PayApiInterface {\n /**\n * Get Pay Trade History\n *\n * If startTime and endTime are not sent, the recent 90 days' data will be returned.\n * The max interval between startTime and endTime is 90 days.\n * Support for querying orders within the last 18 months.\n * For payerInfo and receiverInfo,there are different return values in different orderTypes.\n * Sender's perspective when orderType is C2C\n * payerInfo : binanceId\n * receiverInfo : name, binanceId/accountId/email/countryCode/phoneNumber/mobileCode (based on user input)\n * Receiver's perspective when orderType is C2C\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is CRYPTO_BOX\n * payerInfo : binanceId\n * receiverInfo : name(the value is always \"Crypto Box\")\n * Receiver's perspective when orderType is CRYPTO_BOX\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is PAY\n * payerInfo : binanceId\n * receiverInfo : name\n * Receiver's perspective when orderType is PAY\n * payerInfo : name\n * receiverInfo : binanceId, name\n * Sender's perspective when orderType is PAY_REFUND\n * payerInfo : binanceId, name\n * receiverInfo : name, accountId\n * Receiver's perspective when orderType is PAY_REFUND\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is PAYOUT\n * payerInfo : binanceId, name\n * receiverInfo : name, accountId\n * Receiver's perspective when orderType is PAYOUT\n * payerInfo : name\n * receiverInfo : binanceId\n * Receiver's perspective when orderType is CRYPTO_BOX_RF\n * payerInfo : name(the value is always \"Crypto Box\")\n * receiverInfo : binanceId\n * Sender's perspective when orderType is REMITTANCE\n * payerInfo : binanceId\n * receiverInfo : name, institutionName, cardNumber, digitalWalletId\n *\n * Weight: 3000\n *\n * @summary Get Pay Trade History\n * @param {GetPayTradeHistoryRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof PayApiInterface\n */\n getPayTradeHistory(\n requestParameters?: GetPayTradeHistoryRequest\n ): Promise<RestApiResponse<GetPayTradeHistoryResponse>>;\n}\n\n/**\n * Request parameters for getPayTradeHistory operation in PayApi.\n * @interface GetPayTradeHistoryRequest\n */\nexport interface GetPayTradeHistoryRequest {\n /**\n *\n * @type {number | bigint}\n * @memberof PayApiGetPayTradeHistory\n */\n readonly startTime?: number | bigint;\n\n /**\n *\n * @type {number | bigint}\n * @memberof PayApiGetPayTradeHistory\n */\n readonly endTime?: number | bigint;\n\n /**\n * default 100, max 100\n * @type {number | bigint}\n * @memberof PayApiGetPayTradeHistory\n */\n readonly limit?: number | bigint;\n\n /**\n *\n * @type {number | bigint}\n * @memberof PayApiGetPayTradeHistory\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * PayApi - object-oriented interface\n * @class PayApi\n */\nexport class PayApi implements PayApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = PayApiAxiosParamCreator(configuration);\n }\n\n /**\n * Get Pay Trade History\n *\n * If startTime and endTime are not sent, the recent 90 days' data will be returned.\n * The max interval between startTime and endTime is 90 days.\n * Support for querying orders within the last 18 months.\n * For payerInfo and receiverInfo,there are different return values in different orderTypes.\n * Sender's perspective when orderType is C2C\n * payerInfo : binanceId\n * receiverInfo : name, binanceId/accountId/email/countryCode/phoneNumber/mobileCode (based on user input)\n * Receiver's perspective when orderType is C2C\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is CRYPTO_BOX\n * payerInfo : binanceId\n * receiverInfo : name(the value is always \"Crypto Box\")\n * Receiver's perspective when orderType is CRYPTO_BOX\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is PAY\n * payerInfo : binanceId\n * receiverInfo : name\n * Receiver's perspective when orderType is PAY\n * payerInfo : name\n * receiverInfo : binanceId, name\n * Sender's perspective when orderType is PAY_REFUND\n * payerInfo : binanceId, name\n * receiverInfo : name, accountId\n * Receiver's perspective when orderType is PAY_REFUND\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is PAYOUT\n * payerInfo : binanceId, name\n * receiverInfo : name, accountId\n * Receiver's perspective when orderType is PAYOUT\n * payerInfo : name\n * receiverInfo : binanceId\n * Receiver's perspective when orderType is CRYPTO_BOX_RF\n * payerInfo : name(the value is always \"Crypto Box\")\n * receiverInfo : binanceId\n * Sender's perspective when orderType is REMITTANCE\n * payerInfo : binanceId\n * receiverInfo : name, institutionName, cardNumber, digitalWalletId\n *\n * Weight: 3000\n *\n * @summary Get Pay Trade History\n * @param {GetPayTradeHistoryRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetPayTradeHistoryResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof PayApi\n * @see {@link https://developers.binance.com/docs/pay/rest-api/Get-Pay-Trade-History Binance API Documentation}\n */\n public async getPayTradeHistory(\n requestParameters: GetPayTradeHistoryRequest = {}\n ): Promise<RestApiResponse<GetPayTradeHistoryResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getPayTradeHistory(\n requestParameters?.startTime,\n requestParameters?.endTime,\n requestParameters?.limit,\n requestParameters?.recvWindow\n );\n return sendRequest<GetPayTradeHistoryResponse>(\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 * Binance Pay REST API\n *\n * OpenAPI Specification for the Binance Pay REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport { ConfigurationRestAPI, RestApiResponse, sendRequest } from '@binance/common';\nimport { PayApi } from './modules/pay-api';\n\nimport type { GetPayTradeHistoryRequest } from './modules/pay-api';\n\nimport type { GetPayTradeHistoryResponse } from './types';\n\nexport class RestAPI {\n private configuration: ConfigurationRestAPI;\n private payApi: PayApi;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.payApi = new PayApi(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 Pay Trade History\n *\n * If startTime and endTime are not sent, the recent 90 days' data will be returned.\n * The max interval between startTime and endTime is 90 days.\n * Support for querying orders within the last 18 months.\n * For payerInfo and receiverInfo,there are different return values in different orderTypes.\n * Sender's perspective when orderType is C2C\n * payerInfo : binanceId\n * receiverInfo : name, binanceId/accountId/email/countryCode/phoneNumber/mobileCode (based on user input)\n * Receiver's perspective when orderType is C2C\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is CRYPTO_BOX\n * payerInfo : binanceId\n * receiverInfo : name(the value is always \"Crypto Box\")\n * Receiver's perspective when orderType is CRYPTO_BOX\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is PAY\n * payerInfo : binanceId\n * receiverInfo : name\n * Receiver's perspective when orderType is PAY\n * payerInfo : name\n * receiverInfo : binanceId, name\n * Sender's perspective when orderType is PAY_REFUND\n * payerInfo : binanceId, name\n * receiverInfo : name, accountId\n * Receiver's perspective when orderType is PAY_REFUND\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is PAYOUT\n * payerInfo : binanceId, name\n * receiverInfo : name, accountId\n * Receiver's perspective when orderType is PAYOUT\n * payerInfo : name\n * receiverInfo : binanceId\n * Receiver's perspective when orderType is CRYPTO_BOX_RF\n * payerInfo : name(the value is always \"Crypto Box\")\n * receiverInfo : binanceId\n * Sender's perspective when orderType is REMITTANCE\n * payerInfo : binanceId\n * receiverInfo : name, institutionName, cardNumber, digitalWalletId\n *\n * Weight: 3000\n *\n * @summary Get Pay Trade History\n * @param {GetPayTradeHistoryRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetPayTradeHistoryResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/pay/rest-api/Get-Pay-Trade-History Binance API Documentation}\n */\n getPayTradeHistory(\n requestParameters: GetPayTradeHistoryRequest = {}\n ): Promise<RestApiResponse<GetPayTradeHistoryResponse>> {\n return this.payApi.getPayTradeHistory(requestParameters);\n }\n}\n","/**\n * Binance Pay REST API\n *\n * OpenAPI Specification for the Binance Pay REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nexport * from './types';\nexport * from './modules';\nexport * from './rest-api';\n","import { buildUserAgent, ConfigurationRestAPI, PAY_REST_API_PROD_URL } from '@binance/common';\nimport { name, version } from '../package.json';\nimport { RestAPI } from './rest-api';\n\nexport interface ConfigurationPay {\n configurationRestAPI?: ConfigurationRestAPI;\n}\n\nexport class Pay {\n public restAPI!: RestAPI;\n\n constructor(config: ConfigurationPay) {\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 || PAY_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,0BAA0B,SAAU,eAAqC;AAC3E,QAAO,EAuDH,oBAAoB,OAChB,WACA,SACA,OACA,eACuB;EACvB,MAAMA,yBAAkD,EAAE;EAC1D,MAAMC,wBAAiD,EAAE;EACzD,MAAMC,0BAAmD,EAAE;AAE3D,MAAI,cAAc,UAAa,cAAc,KACzC,wBAAuB,eAAe;AAE1C,MAAI,YAAY,UAAa,YAAY,KACrC,wBAAuB,aAAa;AAExC,MAAI,UAAU,UAAa,UAAU,KACjC,wBAAuB,WAAW;AAEtC,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;;;;;;AAuGL,IAAa,SAAb,MAA+C;CAI3C,YAAY,eAAqC;AAC7C,OAAK,gBAAgB;AACrB,OAAK,4BAA4B,wBAAwB,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwD3E,MAAa,mBACT,oBAA+C,EAAE,EACG;EACpD,MAAM,oBAAoB,MAAM,KAAK,0BAA0B,mBAC3D,mBAAmB,WACnB,mBAAmB,SACnB,mBAAmB,OACnB,mBAAmB,WACtB;AACD,2CACI,KAAK,eACL,kBAAkB,UAClB,kBAAkB,QAClB,kBAAkB,aAClB,kBAAkB,YAClB,kBAAkB,cAClB,mBAAmB,UACnB,EAAE,UAAU,MAAM,CACrB;;;;;;;;;;;;;;;;;;ACvRT,IAAa,UAAb,MAAqB;CAIjB,YAAY,eAAqC;AAC7C,OAAK,gBAAgB;AACrB,OAAK,SAAS,IAAI,OAAO,cAAc;;;;;;;;;;;CAY3C,YACI,UACA,QACA,cAAuC,EAAE,EACzC,aAAsC,EAAE,EACb;AAC3B,2CACI,KAAK,eACL,UACA,QACA,aACA,YACA,QACA,OACH;;;;;;;;;;;CAYL,kBACI,UACA,QACA,cAAuC,EAAE,EACzC,aAAsC,EAAE,EACb;AAC3B,2CACI,KAAK,eACL,UACA,QACA,aACA,YACA,QACA,QACA,EAAE,UAAU,MAAM,CACrB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwDL,mBACI,oBAA+C,EAAE,EACG;AACpD,SAAO,KAAK,OAAO,mBAAmB,kBAAkB;;;;;;;;;;;;;AElIhE,IAAa,MAAb,MAAiB;CAGb,YAAY,QAA0B;EAClC,MAAM,iDAA2B,MAAM,QAAQ;AAE/C,MAAI,QAAQ,sBAAsB;GAC9B,MAAM,gBAAgB,IAAIC,sCACtB,OAAO,qBACV;AAGD,iBAAc,WAAW,cAAc,YAAYC;AACnD,iBAAc,cAAc,cAAc,eAAe,EAAE;AAC3D,iBAAc,YAAY,UAAU;IAChC,GAAI,cAAc,YAAY,WAAW,EAAE;IAC3C,cAAc;IACjB;AACD,QAAK,UAAU,IAAI,QAAQ,cAAc"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","localVarHeaderParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","ConfigurationRestAPI","PAY_REST_API_PROD_URL"],"sources":["../package.json","../src/rest-api/modules/api.ts","../src/rest-api/rest-api.ts","../src/rest-api/index.ts","../src/pay.ts"],"sourcesContent":["{\n \"name\": \"@binance/pay\",\n \"description\": \"Official Binance Pay Connector - A lightweight library that provides a convenient interface to Binance's Pay REST API.\",\n \"version\": \"7.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 \"Simple Earn\",\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.3\",\n \"axios\": \"^1.7.4\"\n }\n}\n","/**\n * Binance Pay REST API\n *\n * Query Binance Pay transaction history.\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 sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type { GetPayTradeHistoryResponse } from '../types';\n\n/**\n * Api - axios parameter creator\n */\nconst ApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Get Pay Trade History\n *\n * Weight(UID): 3000\n *\n * Notes:\n * - If `startTime` and `endTime` are not sent, the recent 90 days' data will be returned.\n * - The max interval between `startTime` and `endTime` is 90 days.\n * - Support for querying orders within the last 18 months.\n * - `payerInfo` and `receiverInfo` return different fields in different `orderType` values:\n * - C2C sender: `payerInfo=binanceId`; `receiverInfo=name, binanceId/accountId/email/countryCode/phoneNumber/mobileCode` (based on user input).\n * - C2C receiver: `payerInfo=name`; `receiverInfo=binanceId`.\n * - CRYPTO_BOX sender: `payerInfo=binanceId`; `receiverInfo=name` (always `\"Crypto Box\"`).\n * - CRYPTO_BOX receiver: `payerInfo=name`; `receiverInfo=binanceId`.\n * - PAY sender: `payerInfo=binanceId`; `receiverInfo=name`.\n * - PAY receiver: `payerInfo=name`; `receiverInfo=binanceId, name`.\n * - PAY_REFUND sender: `payerInfo=binanceId, name`; `receiverInfo=name, accountId`.\n * - PAY_REFUND receiver: `payerInfo=name`; `receiverInfo=binanceId`.\n * - PAYOUT sender: `payerInfo=binanceId, name`; `receiverInfo=name, accountId`.\n * - PAYOUT receiver: `payerInfo=name`; `receiverInfo=binanceId`.\n * - CRYPTO_BOX_RF receiver: `payerInfo=name` (always `\"Crypto Box\"`); `receiverInfo=binanceId`.\n * - REMITTANCE sender: `payerInfo=binanceId`; `receiverInfo=name, institutionName, cardNumber, digitalWalletId`.\n *\n * @summary Get Pay Trade History\n * @param {number | bigint} [startTime] Start time in milliseconds.\n * @param {number | bigint} [endTime] End time in milliseconds.\n * @param {number | bigint} [limit] Number of records to return.\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds.\n *\n * @throws {RequiredError}\n */\n getPayTradeHistory: async (\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 const localVarHeaderParameter: 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 (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/pay/transactions',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * Api - interface\n * @interface Api\n */\nexport interface ApiInterface {\n /**\n * Get Pay Trade History\n *\n * Weight(UID): 3000\n *\n * Notes:\n * - If `startTime` and `endTime` are not sent, the recent 90 days' data will be returned.\n * - The max interval between `startTime` and `endTime` is 90 days.\n * - Support for querying orders within the last 18 months.\n * - `payerInfo` and `receiverInfo` return different fields in different `orderType` values:\n * - C2C sender: `payerInfo=binanceId`; `receiverInfo=name, binanceId/accountId/email/countryCode/phoneNumber/mobileCode` (based on user input).\n * - C2C receiver: `payerInfo=name`; `receiverInfo=binanceId`.\n * - CRYPTO_BOX sender: `payerInfo=binanceId`; `receiverInfo=name` (always `\"Crypto Box\"`).\n * - CRYPTO_BOX receiver: `payerInfo=name`; `receiverInfo=binanceId`.\n * - PAY sender: `payerInfo=binanceId`; `receiverInfo=name`.\n * - PAY receiver: `payerInfo=name`; `receiverInfo=binanceId, name`.\n * - PAY_REFUND sender: `payerInfo=binanceId, name`; `receiverInfo=name, accountId`.\n * - PAY_REFUND receiver: `payerInfo=name`; `receiverInfo=binanceId`.\n * - PAYOUT sender: `payerInfo=binanceId, name`; `receiverInfo=name, accountId`.\n * - PAYOUT receiver: `payerInfo=name`; `receiverInfo=binanceId`.\n * - CRYPTO_BOX_RF receiver: `payerInfo=name` (always `\"Crypto Box\"`); `receiverInfo=binanceId`.\n * - REMITTANCE sender: `payerInfo=binanceId`; `receiverInfo=name, institutionName, cardNumber, digitalWalletId`.\n *\n * @summary Get Pay Trade History\n * @param {GetPayTradeHistoryRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof ApiInterface\n */\n getPayTradeHistory(\n requestParameters?: GetPayTradeHistoryRequest\n ): Promise<RestApiResponse<GetPayTradeHistoryResponse>>;\n}\n\n/**\n * Request parameters for getPayTradeHistory operation in Api.\n * @interface GetPayTradeHistoryRequest\n */\nexport interface GetPayTradeHistoryRequest {\n /**\n * Start time in milliseconds.\n * @type {number | bigint}\n * @memberof ApiGetPayTradeHistory\n */\n readonly startTime?: number | bigint;\n\n /**\n * End time in milliseconds.\n * @type {number | bigint}\n * @memberof ApiGetPayTradeHistory\n */\n readonly endTime?: number | bigint;\n\n /**\n * Number of records to return.\n * @type {number | bigint}\n * @memberof ApiGetPayTradeHistory\n */\n readonly limit?: number | bigint;\n\n /**\n * Request validity window in milliseconds.\n * @type {number | bigint}\n * @memberof ApiGetPayTradeHistory\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Api - object-oriented interface\n * @class Api\n */\nexport class Api implements ApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = ApiAxiosParamCreator(configuration);\n }\n\n /**\n * Get Pay Trade History\n *\n * Weight(UID): 3000\n *\n * Notes:\n * - If `startTime` and `endTime` are not sent, the recent 90 days' data will be returned.\n * - The max interval between `startTime` and `endTime` is 90 days.\n * - Support for querying orders within the last 18 months.\n * - `payerInfo` and `receiverInfo` return different fields in different `orderType` values:\n * - C2C sender: `payerInfo=binanceId`; `receiverInfo=name, binanceId/accountId/email/countryCode/phoneNumber/mobileCode` (based on user input).\n * - C2C receiver: `payerInfo=name`; `receiverInfo=binanceId`.\n * - CRYPTO_BOX sender: `payerInfo=binanceId`; `receiverInfo=name` (always `\"Crypto Box\"`).\n * - CRYPTO_BOX receiver: `payerInfo=name`; `receiverInfo=binanceId`.\n * - PAY sender: `payerInfo=binanceId`; `receiverInfo=name`.\n * - PAY receiver: `payerInfo=name`; `receiverInfo=binanceId, name`.\n * - PAY_REFUND sender: `payerInfo=binanceId, name`; `receiverInfo=name, accountId`.\n * - PAY_REFUND receiver: `payerInfo=name`; `receiverInfo=binanceId`.\n * - PAYOUT sender: `payerInfo=binanceId, name`; `receiverInfo=name, accountId`.\n * - PAYOUT receiver: `payerInfo=name`; `receiverInfo=binanceId`.\n * - CRYPTO_BOX_RF receiver: `payerInfo=name` (always `\"Crypto Box\"`); `receiverInfo=binanceId`.\n * - REMITTANCE sender: `payerInfo=binanceId`; `receiverInfo=name, institutionName, cardNumber, digitalWalletId`.\n *\n * @summary Get Pay Trade History\n * @param {GetPayTradeHistoryRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetPayTradeHistoryResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof Api\n * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-pay/api/rest-api/~#get-pay-trade-history Binance API Documentation}\n */\n public async getPayTradeHistory(\n requestParameters: GetPayTradeHistoryRequest = {}\n ): Promise<RestApiResponse<GetPayTradeHistoryResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getPayTradeHistory(\n requestParameters?.startTime,\n requestParameters?.endTime,\n requestParameters?.limit,\n requestParameters?.recvWindow\n );\n return sendRequest<GetPayTradeHistoryResponse>(\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 * Binance Pay REST API\n *\n * Query Binance Pay transaction history.\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 { Api } from './modules/api';\n\nimport type { GetPayTradeHistoryRequest } from './modules/api';\n\nimport type { GetPayTradeHistoryResponse } from './types';\n\nexport class RestAPI {\n private configuration: ConfigurationRestAPI;\n private api: Api;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.api = new Api(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 Pay Trade History\n *\n * Weight(UID): 3000\n *\n * Notes:\n * - If `startTime` and `endTime` are not sent, the recent 90 days' data will be returned.\n * - The max interval between `startTime` and `endTime` is 90 days.\n * - Support for querying orders within the last 18 months.\n * - `payerInfo` and `receiverInfo` return different fields in different `orderType` values:\n * - C2C sender: `payerInfo=binanceId`; `receiverInfo=name, binanceId/accountId/email/countryCode/phoneNumber/mobileCode` (based on user input).\n * - C2C receiver: `payerInfo=name`; `receiverInfo=binanceId`.\n * - CRYPTO_BOX sender: `payerInfo=binanceId`; `receiverInfo=name` (always `\"Crypto Box\"`).\n * - CRYPTO_BOX receiver: `payerInfo=name`; `receiverInfo=binanceId`.\n * - PAY sender: `payerInfo=binanceId`; `receiverInfo=name`.\n * - PAY receiver: `payerInfo=name`; `receiverInfo=binanceId, name`.\n * - PAY_REFUND sender: `payerInfo=binanceId, name`; `receiverInfo=name, accountId`.\n * - PAY_REFUND receiver: `payerInfo=name`; `receiverInfo=binanceId`.\n * - PAYOUT sender: `payerInfo=binanceId, name`; `receiverInfo=name, accountId`.\n * - PAYOUT receiver: `payerInfo=name`; `receiverInfo=binanceId`.\n * - CRYPTO_BOX_RF receiver: `payerInfo=name` (always `\"Crypto Box\"`); `receiverInfo=binanceId`.\n * - REMITTANCE sender: `payerInfo=binanceId`; `receiverInfo=name, institutionName, cardNumber, digitalWalletId`.\n *\n * @summary Get Pay Trade History\n * @param {GetPayTradeHistoryRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetPayTradeHistoryResponse>>}\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-pay/api/rest-api/~#get-pay-trade-history Binance API Documentation}\n */\n getPayTradeHistory(\n requestParameters: GetPayTradeHistoryRequest = {}\n ): Promise<RestApiResponse<GetPayTradeHistoryResponse>> {\n return this.api.getPayTradeHistory(requestParameters);\n }\n}\n","/**\n * Binance Pay REST API\n *\n * Query Binance Pay transaction history.\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nexport * from './types';\nexport * from './modules';\nexport * from './rest-api';\n","import { buildUserAgent, ConfigurationRestAPI, PAY_REST_API_PROD_URL } from '@binance/common';\nimport { name, version } from '../package.json';\nimport { RestAPI } from './rest-api';\n\nexport interface ConfigurationPay {\n configurationRestAPI?: ConfigurationRestAPI;\n}\n\nexport class Pay {\n public restAPI!: RestAPI;\n\n constructor(config: ConfigurationPay) {\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 || PAY_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;;;;;;;;;;;;;;;;;;;ACqBf,MAAM,uBAAuB,SAAU,eAAqC;AACxE,QAAO,EAgCH,oBAAoB,OAChB,WACA,SACA,OACA,eACuB;EACvB,MAAMA,yBAAkD,EAAE;EAC1D,MAAMC,wBAAiD,EAAE;EACzD,MAAMC,0BAAmD,EAAE;AAE3D,MAAI,cAAc,UAAa,cAAc,KACzC,wBAAuB,eAAe;AAE1C,MAAI,YAAY,UAAa,YAAY,KACrC,wBAAuB,aAAa;AAExC,MAAI,UAAU,UAAa,UAAU,KACjC,wBAAuB,WAAW;AAEtC,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,MAAb,MAAyC;CAIrC,YAAY,eAAqC;AAC7C,OAAK,gBAAgB;AACrB,OAAK,4BAA4B,qBAAqB,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiCxE,MAAa,mBACT,oBAA+C,EAAE,EACG;EACpD,MAAM,oBAAoB,MAAM,KAAK,0BAA0B,mBAC3D,mBAAmB,WACnB,mBAAmB,SACnB,mBAAmB,OACnB,mBAAmB,WACtB;AACD,2CACI,KAAK,eACL,kBAAkB,UAClB,kBAAkB,QAClB,kBAAkB,aAClB,kBAAkB,YAClB,kBAAkB,cAClB,mBAAmB,UACnB,EAAE,UAAU,MAAM,CACrB;;;;;;;;;;;;;;;;;;ACjNT,IAAa,UAAb,MAAqB;CAIjB,YAAY,eAAqC;AAC7C,OAAK,gBAAgB;AACrB,OAAK,MAAM,IAAI,IAAI,cAAc;;;;;;;;;;;CAYrC,YACI,UACA,QACA,cAAuC,EAAE,EACzC,aAAsC,EAAE,EACb;AAC3B,2CACI,KAAK,eACL,UACA,QACA,aACA,YACA,QACA,OACH;;;;;;;;;;;CAYL,kBACI,UACA,QACA,cAAuC,EAAE,EACzC,aAAsC,EAAE,EACb;AAC3B,2CACI,KAAK,eACL,UACA,QACA,aACA,YACA,QACA,QACA,EAAE,UAAU,MAAM,CACrB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiCL,mBACI,oBAA+C,EAAE,EACG;AACpD,SAAO,KAAK,IAAI,mBAAmB,kBAAkB;;;;;;;;;;;;;AE3G7D,IAAa,MAAb,MAAiB;CAGb,YAAY,QAA0B;EAClC,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,14 +3,14 @@ import { BadRequestError, ConfigurationRestAPI, ConnectorClientError, ForbiddenE
|
|
|
3
3
|
|
|
4
4
|
//#region package.json
|
|
5
5
|
var name = "@binance/pay";
|
|
6
|
-
var version = "
|
|
6
|
+
var version = "7.0.0";
|
|
7
7
|
|
|
8
8
|
//#endregion
|
|
9
|
-
//#region src/rest-api/modules/
|
|
9
|
+
//#region src/rest-api/modules/api.ts
|
|
10
10
|
/**
|
|
11
11
|
* Binance Pay REST API
|
|
12
12
|
*
|
|
13
|
-
*
|
|
13
|
+
* Query Binance Pay transaction history.
|
|
14
14
|
*
|
|
15
15
|
* The version of the OpenAPI document: 1.0.0
|
|
16
16
|
*
|
|
@@ -20,9 +20,9 @@ var version = "6.0.4";
|
|
|
20
20
|
* Do not edit the class manually.
|
|
21
21
|
*/
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* Api - axios parameter creator
|
|
24
24
|
*/
|
|
25
|
-
const
|
|
25
|
+
const ApiAxiosParamCreator = function(configuration) {
|
|
26
26
|
return { getPayTradeHistory: async (startTime, endTime, limit, recvWindow) => {
|
|
27
27
|
const localVarQueryParameter = {};
|
|
28
28
|
const localVarBodyParameter = {};
|
|
@@ -44,66 +44,43 @@ const PayApiAxiosParamCreator = function(configuration) {
|
|
|
44
44
|
} };
|
|
45
45
|
};
|
|
46
46
|
/**
|
|
47
|
-
*
|
|
48
|
-
* @class
|
|
47
|
+
* Api - object-oriented interface
|
|
48
|
+
* @class Api
|
|
49
49
|
*/
|
|
50
|
-
var
|
|
50
|
+
var Api = class {
|
|
51
51
|
constructor(configuration) {
|
|
52
52
|
this.configuration = configuration;
|
|
53
|
-
this.localVarAxiosParamCreator =
|
|
53
|
+
this.localVarAxiosParamCreator = ApiAxiosParamCreator(configuration);
|
|
54
54
|
}
|
|
55
55
|
/**
|
|
56
56
|
* Get Pay Trade History
|
|
57
57
|
*
|
|
58
|
-
*
|
|
59
|
-
* The max interval between startTime and endTime is 90 days.
|
|
60
|
-
* Support for querying orders within the last 18 months.
|
|
61
|
-
* For payerInfo and receiverInfo,there are different return values in different orderTypes.
|
|
62
|
-
* Sender's perspective when orderType is C2C
|
|
63
|
-
* payerInfo : binanceId
|
|
64
|
-
* receiverInfo : name, binanceId/accountId/email/countryCode/phoneNumber/mobileCode (based on user input)
|
|
65
|
-
* Receiver's perspective when orderType is C2C
|
|
66
|
-
* payerInfo : name
|
|
67
|
-
* receiverInfo : binanceId
|
|
68
|
-
* Sender's perspective when orderType is CRYPTO_BOX
|
|
69
|
-
* payerInfo : binanceId
|
|
70
|
-
* receiverInfo : name(the value is always "Crypto Box")
|
|
71
|
-
* Receiver's perspective when orderType is CRYPTO_BOX
|
|
72
|
-
* payerInfo : name
|
|
73
|
-
* receiverInfo : binanceId
|
|
74
|
-
* Sender's perspective when orderType is PAY
|
|
75
|
-
* payerInfo : binanceId
|
|
76
|
-
* receiverInfo : name
|
|
77
|
-
* Receiver's perspective when orderType is PAY
|
|
78
|
-
* payerInfo : name
|
|
79
|
-
* receiverInfo : binanceId, name
|
|
80
|
-
* Sender's perspective when orderType is PAY_REFUND
|
|
81
|
-
* payerInfo : binanceId, name
|
|
82
|
-
* receiverInfo : name, accountId
|
|
83
|
-
* Receiver's perspective when orderType is PAY_REFUND
|
|
84
|
-
* payerInfo : name
|
|
85
|
-
* receiverInfo : binanceId
|
|
86
|
-
* Sender's perspective when orderType is PAYOUT
|
|
87
|
-
* payerInfo : binanceId, name
|
|
88
|
-
* receiverInfo : name, accountId
|
|
89
|
-
* Receiver's perspective when orderType is PAYOUT
|
|
90
|
-
* payerInfo : name
|
|
91
|
-
* receiverInfo : binanceId
|
|
92
|
-
* Receiver's perspective when orderType is CRYPTO_BOX_RF
|
|
93
|
-
* payerInfo : name(the value is always "Crypto Box")
|
|
94
|
-
* receiverInfo : binanceId
|
|
95
|
-
* Sender's perspective when orderType is REMITTANCE
|
|
96
|
-
* payerInfo : binanceId
|
|
97
|
-
* receiverInfo : name, institutionName, cardNumber, digitalWalletId
|
|
58
|
+
* Weight(UID): 3000
|
|
98
59
|
*
|
|
99
|
-
*
|
|
60
|
+
* Notes:
|
|
61
|
+
* - If `startTime` and `endTime` are not sent, the recent 90 days' data will be returned.
|
|
62
|
+
* - The max interval between `startTime` and `endTime` is 90 days.
|
|
63
|
+
* - Support for querying orders within the last 18 months.
|
|
64
|
+
* - `payerInfo` and `receiverInfo` return different fields in different `orderType` values:
|
|
65
|
+
* - C2C sender: `payerInfo=binanceId`; `receiverInfo=name, binanceId/accountId/email/countryCode/phoneNumber/mobileCode` (based on user input).
|
|
66
|
+
* - C2C receiver: `payerInfo=name`; `receiverInfo=binanceId`.
|
|
67
|
+
* - CRYPTO_BOX sender: `payerInfo=binanceId`; `receiverInfo=name` (always `"Crypto Box"`).
|
|
68
|
+
* - CRYPTO_BOX receiver: `payerInfo=name`; `receiverInfo=binanceId`.
|
|
69
|
+
* - PAY sender: `payerInfo=binanceId`; `receiverInfo=name`.
|
|
70
|
+
* - PAY receiver: `payerInfo=name`; `receiverInfo=binanceId, name`.
|
|
71
|
+
* - PAY_REFUND sender: `payerInfo=binanceId, name`; `receiverInfo=name, accountId`.
|
|
72
|
+
* - PAY_REFUND receiver: `payerInfo=name`; `receiverInfo=binanceId`.
|
|
73
|
+
* - PAYOUT sender: `payerInfo=binanceId, name`; `receiverInfo=name, accountId`.
|
|
74
|
+
* - PAYOUT receiver: `payerInfo=name`; `receiverInfo=binanceId`.
|
|
75
|
+
* - CRYPTO_BOX_RF receiver: `payerInfo=name` (always `"Crypto Box"`); `receiverInfo=binanceId`.
|
|
76
|
+
* - REMITTANCE sender: `payerInfo=binanceId`; `receiverInfo=name, institutionName, cardNumber, digitalWalletId`.
|
|
100
77
|
*
|
|
101
78
|
* @summary Get Pay Trade History
|
|
102
79
|
* @param {GetPayTradeHistoryRequest} requestParameters Request parameters.
|
|
103
80
|
* @returns {Promise<RestApiResponse<GetPayTradeHistoryResponse>>}
|
|
104
81
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
105
|
-
* @memberof
|
|
106
|
-
* @see {@link https://developers.binance.com/docs/pay/rest-api
|
|
82
|
+
* @memberof Api
|
|
83
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-pay/api/rest-api/~#get-pay-trade-history Binance API Documentation}
|
|
107
84
|
*/
|
|
108
85
|
async getPayTradeHistory(requestParameters = {}) {
|
|
109
86
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getPayTradeHistory(requestParameters?.startTime, requestParameters?.endTime, requestParameters?.limit, requestParameters?.recvWindow);
|
|
@@ -116,7 +93,7 @@ var PayApi = class {
|
|
|
116
93
|
/**
|
|
117
94
|
* Binance Pay REST API
|
|
118
95
|
*
|
|
119
|
-
*
|
|
96
|
+
* Query Binance Pay transaction history.
|
|
120
97
|
*
|
|
121
98
|
* The version of the OpenAPI document: 1.0.0
|
|
122
99
|
*
|
|
@@ -128,7 +105,7 @@ var PayApi = class {
|
|
|
128
105
|
var RestAPI = class {
|
|
129
106
|
constructor(configuration) {
|
|
130
107
|
this.configuration = configuration;
|
|
131
|
-
this.
|
|
108
|
+
this.api = new Api(configuration);
|
|
132
109
|
}
|
|
133
110
|
/**
|
|
134
111
|
* Generic function to send a request.
|
|
@@ -157,65 +134,42 @@ var RestAPI = class {
|
|
|
157
134
|
/**
|
|
158
135
|
* Get Pay Trade History
|
|
159
136
|
*
|
|
160
|
-
*
|
|
161
|
-
* The max interval between startTime and endTime is 90 days.
|
|
162
|
-
* Support for querying orders within the last 18 months.
|
|
163
|
-
* For payerInfo and receiverInfo,there are different return values in different orderTypes.
|
|
164
|
-
* Sender's perspective when orderType is C2C
|
|
165
|
-
* payerInfo : binanceId
|
|
166
|
-
* receiverInfo : name, binanceId/accountId/email/countryCode/phoneNumber/mobileCode (based on user input)
|
|
167
|
-
* Receiver's perspective when orderType is C2C
|
|
168
|
-
* payerInfo : name
|
|
169
|
-
* receiverInfo : binanceId
|
|
170
|
-
* Sender's perspective when orderType is CRYPTO_BOX
|
|
171
|
-
* payerInfo : binanceId
|
|
172
|
-
* receiverInfo : name(the value is always "Crypto Box")
|
|
173
|
-
* Receiver's perspective when orderType is CRYPTO_BOX
|
|
174
|
-
* payerInfo : name
|
|
175
|
-
* receiverInfo : binanceId
|
|
176
|
-
* Sender's perspective when orderType is PAY
|
|
177
|
-
* payerInfo : binanceId
|
|
178
|
-
* receiverInfo : name
|
|
179
|
-
* Receiver's perspective when orderType is PAY
|
|
180
|
-
* payerInfo : name
|
|
181
|
-
* receiverInfo : binanceId, name
|
|
182
|
-
* Sender's perspective when orderType is PAY_REFUND
|
|
183
|
-
* payerInfo : binanceId, name
|
|
184
|
-
* receiverInfo : name, accountId
|
|
185
|
-
* Receiver's perspective when orderType is PAY_REFUND
|
|
186
|
-
* payerInfo : name
|
|
187
|
-
* receiverInfo : binanceId
|
|
188
|
-
* Sender's perspective when orderType is PAYOUT
|
|
189
|
-
* payerInfo : binanceId, name
|
|
190
|
-
* receiverInfo : name, accountId
|
|
191
|
-
* Receiver's perspective when orderType is PAYOUT
|
|
192
|
-
* payerInfo : name
|
|
193
|
-
* receiverInfo : binanceId
|
|
194
|
-
* Receiver's perspective when orderType is CRYPTO_BOX_RF
|
|
195
|
-
* payerInfo : name(the value is always "Crypto Box")
|
|
196
|
-
* receiverInfo : binanceId
|
|
197
|
-
* Sender's perspective when orderType is REMITTANCE
|
|
198
|
-
* payerInfo : binanceId
|
|
199
|
-
* receiverInfo : name, institutionName, cardNumber, digitalWalletId
|
|
137
|
+
* Weight(UID): 3000
|
|
200
138
|
*
|
|
201
|
-
*
|
|
139
|
+
* Notes:
|
|
140
|
+
* - If `startTime` and `endTime` are not sent, the recent 90 days' data will be returned.
|
|
141
|
+
* - The max interval between `startTime` and `endTime` is 90 days.
|
|
142
|
+
* - Support for querying orders within the last 18 months.
|
|
143
|
+
* - `payerInfo` and `receiverInfo` return different fields in different `orderType` values:
|
|
144
|
+
* - C2C sender: `payerInfo=binanceId`; `receiverInfo=name, binanceId/accountId/email/countryCode/phoneNumber/mobileCode` (based on user input).
|
|
145
|
+
* - C2C receiver: `payerInfo=name`; `receiverInfo=binanceId`.
|
|
146
|
+
* - CRYPTO_BOX sender: `payerInfo=binanceId`; `receiverInfo=name` (always `"Crypto Box"`).
|
|
147
|
+
* - CRYPTO_BOX receiver: `payerInfo=name`; `receiverInfo=binanceId`.
|
|
148
|
+
* - PAY sender: `payerInfo=binanceId`; `receiverInfo=name`.
|
|
149
|
+
* - PAY receiver: `payerInfo=name`; `receiverInfo=binanceId, name`.
|
|
150
|
+
* - PAY_REFUND sender: `payerInfo=binanceId, name`; `receiverInfo=name, accountId`.
|
|
151
|
+
* - PAY_REFUND receiver: `payerInfo=name`; `receiverInfo=binanceId`.
|
|
152
|
+
* - PAYOUT sender: `payerInfo=binanceId, name`; `receiverInfo=name, accountId`.
|
|
153
|
+
* - PAYOUT receiver: `payerInfo=name`; `receiverInfo=binanceId`.
|
|
154
|
+
* - CRYPTO_BOX_RF receiver: `payerInfo=name` (always `"Crypto Box"`); `receiverInfo=binanceId`.
|
|
155
|
+
* - REMITTANCE sender: `payerInfo=binanceId`; `receiverInfo=name, institutionName, cardNumber, digitalWalletId`.
|
|
202
156
|
*
|
|
203
157
|
* @summary Get Pay Trade History
|
|
204
158
|
* @param {GetPayTradeHistoryRequest} requestParameters Request parameters.
|
|
205
159
|
*
|
|
206
160
|
* @returns {Promise<RestApiResponse<GetPayTradeHistoryResponse>>}
|
|
207
161
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
208
|
-
* @see {@link https://developers.binance.com/docs/pay/rest-api
|
|
162
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-pay/api/rest-api/~#get-pay-trade-history Binance API Documentation}
|
|
209
163
|
*/
|
|
210
164
|
getPayTradeHistory(requestParameters = {}) {
|
|
211
|
-
return this.
|
|
165
|
+
return this.api.getPayTradeHistory(requestParameters);
|
|
212
166
|
}
|
|
213
167
|
};
|
|
214
168
|
|
|
215
169
|
//#endregion
|
|
216
170
|
//#region src/rest-api/index.ts
|
|
217
171
|
var rest_api_exports = /* @__PURE__ */ __export({
|
|
218
|
-
|
|
172
|
+
Api: () => Api,
|
|
219
173
|
RestAPI: () => RestAPI
|
|
220
174
|
});
|
|
221
175
|
|