@n8n-dev/n8n-nodes-0x 1.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/README.md +98 -0
- package/dist/credentials/N0xApi.credentials.d.ts +10 -0
- package/dist/credentials/N0xApi.credentials.js +56 -0
- package/dist/credentials/N0xApi.credentials.js.map +1 -0
- package/dist/icons/0x.dark.svg +4 -0
- package/dist/icons/0x.svg +4 -0
- package/dist/nodes/N0x/0x.dark.svg +4 -0
- package/dist/nodes/N0x/0x.svg +4 -0
- package/dist/nodes/N0x/N0x.node.d.ts +4 -0
- package/dist/nodes/N0x/N0x.node.js +75 -0
- package/dist/nodes/N0x/N0x.node.js.map +1 -0
- package/dist/nodes/N0x/N0x.node.json +20 -0
- package/dist/nodes/N0x/resources/gasless/index.d.ts +2 -0
- package/dist/nodes/N0x/resources/gasless/index.js +1364 -0
- package/dist/nodes/N0x/resources/gasless/index.js.map +1 -0
- package/dist/nodes/N0x/resources/index.d.ts +4 -0
- package/dist/nodes/N0x/resources/index.js +12 -0
- package/dist/nodes/N0x/resources/index.js.map +1 -0
- package/dist/nodes/N0x/resources/sources/index.d.ts +2 -0
- package/dist/nodes/N0x/resources/sources/index.js +129 -0
- package/dist/nodes/N0x/resources/sources/index.js.map +1 -0
- package/dist/nodes/N0x/resources/swap/index.d.ts +2 -0
- package/dist/nodes/N0x/resources/swap/index.js +2381 -0
- package/dist/nodes/N0x/resources/swap/index.js.map +1 -0
- package/dist/nodes/N0x/resources/trade-analytics/index.d.ts +2 -0
- package/dist/nodes/N0x/resources/trade-analytics/index.js +334 -0
- package/dist/nodes/N0x/resources/trade-analytics/index.js.map +1 -0
- package/dist/package.json +62 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +62 -0
|
@@ -0,0 +1,2381 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.swapDescription = void 0;
|
|
4
|
+
exports.swapDescription = [
|
|
5
|
+
{
|
|
6
|
+
"displayName": "Operation",
|
|
7
|
+
"name": "operation",
|
|
8
|
+
"type": "options",
|
|
9
|
+
"noDataExpression": true,
|
|
10
|
+
"displayOptions": {
|
|
11
|
+
"show": {
|
|
12
|
+
"resource": [
|
|
13
|
+
"Swap"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"options": [
|
|
18
|
+
{
|
|
19
|
+
"name": "Swap Allowance Holder Get Price",
|
|
20
|
+
"value": "Swap Allowance Holder Get Price",
|
|
21
|
+
"action": "getPrice (Allowance Holder)",
|
|
22
|
+
"description": "Get the indicative price for a swap using Allowance Holder to set allowances",
|
|
23
|
+
"routing": {
|
|
24
|
+
"request": {
|
|
25
|
+
"method": "GET",
|
|
26
|
+
"url": "=/swap/allowance-holder/price"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"name": "Swap Allowance Holder Get Quote",
|
|
32
|
+
"value": "Swap Allowance Holder Get Quote",
|
|
33
|
+
"action": "getQuote (Allowance Holder)",
|
|
34
|
+
"description": "Get the firm quote for a swap using Allowance Holder to set allowances",
|
|
35
|
+
"routing": {
|
|
36
|
+
"request": {
|
|
37
|
+
"method": "GET",
|
|
38
|
+
"url": "=/swap/allowance-holder/quote"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "Swap Permit 2 Get Price",
|
|
44
|
+
"value": "Swap Permit 2 Get Price",
|
|
45
|
+
"action": "getPrice (Permit2)",
|
|
46
|
+
"description": "Get the indicative price for a swap using Permit2 to set allowances",
|
|
47
|
+
"routing": {
|
|
48
|
+
"request": {
|
|
49
|
+
"method": "GET",
|
|
50
|
+
"url": "=/swap/permit2/price"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"name": "Swap Permit 2 Get Quote",
|
|
56
|
+
"value": "Swap Permit 2 Get Quote",
|
|
57
|
+
"action": "getQuote (Permit2)",
|
|
58
|
+
"description": "Get the firm quote for a swap using Permit2 to set allowances",
|
|
59
|
+
"routing": {
|
|
60
|
+
"request": {
|
|
61
|
+
"method": "GET",
|
|
62
|
+
"url": "=/swap/permit2/quote"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"name": "Swap Chains",
|
|
68
|
+
"value": "Swap Chains",
|
|
69
|
+
"action": "getChains",
|
|
70
|
+
"description": "Get list of supported chains for swap",
|
|
71
|
+
"routing": {
|
|
72
|
+
"request": {
|
|
73
|
+
"method": "GET",
|
|
74
|
+
"url": "=/swap/chains"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
"default": ""
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"displayName": "GET /swap/allowance-holder/price",
|
|
83
|
+
"name": "operation",
|
|
84
|
+
"type": "notice",
|
|
85
|
+
"typeOptions": {
|
|
86
|
+
"theme": "info"
|
|
87
|
+
},
|
|
88
|
+
"default": "",
|
|
89
|
+
"displayOptions": {
|
|
90
|
+
"show": {
|
|
91
|
+
"resource": [
|
|
92
|
+
"Swap"
|
|
93
|
+
],
|
|
94
|
+
"operation": [
|
|
95
|
+
"Swap Allowance Holder Get Price"
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"displayName": "0 X Api Key",
|
|
102
|
+
"name": "0x-api-key",
|
|
103
|
+
"required": true,
|
|
104
|
+
"description": "Visit dashboard.0x.org to get your API Key",
|
|
105
|
+
"default": "",
|
|
106
|
+
"type": "string",
|
|
107
|
+
"routing": {
|
|
108
|
+
"request": {
|
|
109
|
+
"headers": {
|
|
110
|
+
"0x-api-key": "={{ $value }}"
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"displayOptions": {
|
|
115
|
+
"show": {
|
|
116
|
+
"resource": [
|
|
117
|
+
"Swap"
|
|
118
|
+
],
|
|
119
|
+
"operation": [
|
|
120
|
+
"Swap Allowance Holder Get Price"
|
|
121
|
+
]
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"displayName": "0 X Version",
|
|
127
|
+
"name": "0x-version",
|
|
128
|
+
"required": true,
|
|
129
|
+
"description": "API version",
|
|
130
|
+
"default": "v2",
|
|
131
|
+
"type": "string",
|
|
132
|
+
"routing": {
|
|
133
|
+
"request": {
|
|
134
|
+
"headers": {
|
|
135
|
+
"0x-version": "={{ $value }}"
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"displayOptions": {
|
|
140
|
+
"show": {
|
|
141
|
+
"resource": [
|
|
142
|
+
"Swap"
|
|
143
|
+
],
|
|
144
|
+
"operation": [
|
|
145
|
+
"Swap Allowance Holder Get Price"
|
|
146
|
+
]
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"displayName": "Chain Id",
|
|
152
|
+
"name": "chainId",
|
|
153
|
+
"required": true,
|
|
154
|
+
"description": "Chain ID. See [here](https://docs.0x.org/docs/introduction/supported-chains) for the list of supported chains",
|
|
155
|
+
"default": 1,
|
|
156
|
+
"type": "number",
|
|
157
|
+
"routing": {
|
|
158
|
+
"send": {
|
|
159
|
+
"type": "query",
|
|
160
|
+
"property": "chainId",
|
|
161
|
+
"value": "={{ $value }}",
|
|
162
|
+
"propertyInDotNotation": false
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
"displayOptions": {
|
|
166
|
+
"show": {
|
|
167
|
+
"resource": [
|
|
168
|
+
"Swap"
|
|
169
|
+
],
|
|
170
|
+
"operation": [
|
|
171
|
+
"Swap Allowance Holder Get Price"
|
|
172
|
+
]
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"displayName": "Buy Token",
|
|
178
|
+
"name": "buyToken",
|
|
179
|
+
"required": true,
|
|
180
|
+
"description": "The contract address of the token to buy",
|
|
181
|
+
"default": "0xdac17f958d2ee523a2206206994597c13d831ec7",
|
|
182
|
+
"type": "string",
|
|
183
|
+
"routing": {
|
|
184
|
+
"send": {
|
|
185
|
+
"type": "query",
|
|
186
|
+
"property": "buyToken",
|
|
187
|
+
"value": "={{ $value }}",
|
|
188
|
+
"propertyInDotNotation": false
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
"displayOptions": {
|
|
192
|
+
"show": {
|
|
193
|
+
"resource": [
|
|
194
|
+
"Swap"
|
|
195
|
+
],
|
|
196
|
+
"operation": [
|
|
197
|
+
"Swap Allowance Holder Get Price"
|
|
198
|
+
]
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"displayName": "Sell Token",
|
|
204
|
+
"name": "sellToken",
|
|
205
|
+
"required": true,
|
|
206
|
+
"description": "The contract address of the token to sell",
|
|
207
|
+
"default": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
|
|
208
|
+
"type": "string",
|
|
209
|
+
"routing": {
|
|
210
|
+
"send": {
|
|
211
|
+
"type": "query",
|
|
212
|
+
"property": "sellToken",
|
|
213
|
+
"value": "={{ $value }}",
|
|
214
|
+
"propertyInDotNotation": false
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
"displayOptions": {
|
|
218
|
+
"show": {
|
|
219
|
+
"resource": [
|
|
220
|
+
"Swap"
|
|
221
|
+
],
|
|
222
|
+
"operation": [
|
|
223
|
+
"Swap Allowance Holder Get Price"
|
|
224
|
+
]
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"displayName": "Sell Amount",
|
|
230
|
+
"name": "sellAmount",
|
|
231
|
+
"description": "The amount of `sellToken` in `sellToken` base units to sell",
|
|
232
|
+
"default": "100000000",
|
|
233
|
+
"type": "string",
|
|
234
|
+
"routing": {
|
|
235
|
+
"send": {
|
|
236
|
+
"type": "query",
|
|
237
|
+
"property": "sellAmount",
|
|
238
|
+
"value": "={{ $value }}",
|
|
239
|
+
"propertyInDotNotation": false
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
"displayOptions": {
|
|
243
|
+
"show": {
|
|
244
|
+
"resource": [
|
|
245
|
+
"Swap"
|
|
246
|
+
],
|
|
247
|
+
"operation": [
|
|
248
|
+
"Swap Allowance Holder Get Price"
|
|
249
|
+
]
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"displayName": "Buy Amount",
|
|
255
|
+
"name": "buyAmount",
|
|
256
|
+
"description": "The exact amount of `buyToken` in `buyToken` base units to buy",
|
|
257
|
+
"default": "",
|
|
258
|
+
"type": "string",
|
|
259
|
+
"routing": {
|
|
260
|
+
"send": {
|
|
261
|
+
"type": "query",
|
|
262
|
+
"property": "buyAmount",
|
|
263
|
+
"value": "={{ $value }}",
|
|
264
|
+
"propertyInDotNotation": false
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
"displayOptions": {
|
|
268
|
+
"show": {
|
|
269
|
+
"resource": [
|
|
270
|
+
"Swap"
|
|
271
|
+
],
|
|
272
|
+
"operation": [
|
|
273
|
+
"Swap Allowance Holder Get Price"
|
|
274
|
+
]
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
"displayName": "Taker",
|
|
280
|
+
"name": "taker",
|
|
281
|
+
"description": "The address which holds the `sellToken` balance and has the allowance set for the swap",
|
|
282
|
+
"default": "0x70a9f34f9b34c64957b9c401a97bfed35b95049e",
|
|
283
|
+
"type": "string",
|
|
284
|
+
"routing": {
|
|
285
|
+
"send": {
|
|
286
|
+
"type": "query",
|
|
287
|
+
"property": "taker",
|
|
288
|
+
"value": "={{ $value }}",
|
|
289
|
+
"propertyInDotNotation": false
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
"displayOptions": {
|
|
293
|
+
"show": {
|
|
294
|
+
"resource": [
|
|
295
|
+
"Swap"
|
|
296
|
+
],
|
|
297
|
+
"operation": [
|
|
298
|
+
"Swap Allowance Holder Get Price"
|
|
299
|
+
]
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"displayName": "Tx Origin",
|
|
305
|
+
"name": "txOrigin",
|
|
306
|
+
"description": "The address of the external account that started the transaction. This is only needed if `taker` is a smart contract.",
|
|
307
|
+
"default": "",
|
|
308
|
+
"type": "string",
|
|
309
|
+
"routing": {
|
|
310
|
+
"send": {
|
|
311
|
+
"type": "query",
|
|
312
|
+
"property": "txOrigin",
|
|
313
|
+
"value": "={{ $value }}",
|
|
314
|
+
"propertyInDotNotation": false
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
"displayOptions": {
|
|
318
|
+
"show": {
|
|
319
|
+
"resource": [
|
|
320
|
+
"Swap"
|
|
321
|
+
],
|
|
322
|
+
"operation": [
|
|
323
|
+
"Swap Allowance Holder Get Price"
|
|
324
|
+
]
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
"displayName": "Recipient",
|
|
330
|
+
"name": "recipient",
|
|
331
|
+
"description": "The address to receive the `buyToken`. If not provided, defaults to the taker address. Not supported for wrap/unwrap operations.",
|
|
332
|
+
"default": "",
|
|
333
|
+
"type": "string",
|
|
334
|
+
"routing": {
|
|
335
|
+
"send": {
|
|
336
|
+
"type": "query",
|
|
337
|
+
"property": "recipient",
|
|
338
|
+
"value": "={{ $value }}",
|
|
339
|
+
"propertyInDotNotation": false
|
|
340
|
+
}
|
|
341
|
+
},
|
|
342
|
+
"displayOptions": {
|
|
343
|
+
"show": {
|
|
344
|
+
"resource": [
|
|
345
|
+
"Swap"
|
|
346
|
+
],
|
|
347
|
+
"operation": [
|
|
348
|
+
"Swap Allowance Holder Get Price"
|
|
349
|
+
]
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
"displayName": "Swap Fee Recipient",
|
|
355
|
+
"name": "swapFeeRecipient",
|
|
356
|
+
"description": "The wallet address to receive the specified trading fees (supports single or multiple comma-separated values). You must also specify the `swapFeeBps` in the request to use this feature. When multiple values are provided, must match length of `swapFeeBps`.",
|
|
357
|
+
"default": "",
|
|
358
|
+
"type": "string",
|
|
359
|
+
"routing": {
|
|
360
|
+
"send": {
|
|
361
|
+
"type": "query",
|
|
362
|
+
"property": "swapFeeRecipient",
|
|
363
|
+
"value": "={{ $value }}",
|
|
364
|
+
"propertyInDotNotation": false
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
"displayOptions": {
|
|
368
|
+
"show": {
|
|
369
|
+
"resource": [
|
|
370
|
+
"Swap"
|
|
371
|
+
],
|
|
372
|
+
"operation": [
|
|
373
|
+
"Swap Allowance Holder Get Price"
|
|
374
|
+
]
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
"displayName": "Swap Fee Bps",
|
|
380
|
+
"name": "swapFeeBps",
|
|
381
|
+
"description": "The amount in Bps of the `swapFeeToken` to charge and deliver to the `swapFeeRecipient` (supports single or multiple comma-separated values). You must also specify the `swapFeeRecipient` in the request to use this feature. For security, this field has a default limit of 1000 Bps. If your application requires a higher value, please reach out to us.",
|
|
382
|
+
"default": "",
|
|
383
|
+
"type": "string",
|
|
384
|
+
"routing": {
|
|
385
|
+
"send": {
|
|
386
|
+
"type": "query",
|
|
387
|
+
"property": "swapFeeBps",
|
|
388
|
+
"value": "={{ $value }}",
|
|
389
|
+
"propertyInDotNotation": false
|
|
390
|
+
}
|
|
391
|
+
},
|
|
392
|
+
"displayOptions": {
|
|
393
|
+
"show": {
|
|
394
|
+
"resource": [
|
|
395
|
+
"Swap"
|
|
396
|
+
],
|
|
397
|
+
"operation": [
|
|
398
|
+
"Swap Allowance Holder Get Price"
|
|
399
|
+
]
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
"displayName": "Swap Fee Token",
|
|
405
|
+
"name": "swapFeeToken",
|
|
406
|
+
"description": "The contract address of the token to receive trading fees in (supports single or multiple comma-separated values). Each token must be set to the value of either the `buyToken` or the `sellToken`. If omitted, the fee token will be determined by 0x with preference to stablecoins and highly liquid assets. You must also specify the `swapFeeRecipient` and `swapFeeBps` to charge integrator fees. When multiple values are provided, must match length of `swapFeeBps`.",
|
|
407
|
+
"default": "",
|
|
408
|
+
"type": "string",
|
|
409
|
+
"routing": {
|
|
410
|
+
"send": {
|
|
411
|
+
"type": "query",
|
|
412
|
+
"property": "swapFeeToken",
|
|
413
|
+
"value": "={{ $value }}",
|
|
414
|
+
"propertyInDotNotation": false
|
|
415
|
+
}
|
|
416
|
+
},
|
|
417
|
+
"displayOptions": {
|
|
418
|
+
"show": {
|
|
419
|
+
"resource": [
|
|
420
|
+
"Swap"
|
|
421
|
+
],
|
|
422
|
+
"operation": [
|
|
423
|
+
"Swap Allowance Holder Get Price"
|
|
424
|
+
]
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
"displayName": "Trade Surplus Recipient",
|
|
430
|
+
"name": "tradeSurplusRecipient",
|
|
431
|
+
"description": "The address to receive any trade surplus. If specified, this address will receive trade surplus when applicable. Otherwise, the taker will receive the surplus. This feature is only available to selected integrators on a custom pricing plan. In other cases, the surplus will be collected by 0x. For assistance with a custom plan, please contact support.",
|
|
432
|
+
"default": "",
|
|
433
|
+
"type": "string",
|
|
434
|
+
"routing": {
|
|
435
|
+
"send": {
|
|
436
|
+
"type": "query",
|
|
437
|
+
"property": "tradeSurplusRecipient",
|
|
438
|
+
"value": "={{ $value }}",
|
|
439
|
+
"propertyInDotNotation": false
|
|
440
|
+
}
|
|
441
|
+
},
|
|
442
|
+
"displayOptions": {
|
|
443
|
+
"show": {
|
|
444
|
+
"resource": [
|
|
445
|
+
"Swap"
|
|
446
|
+
],
|
|
447
|
+
"operation": [
|
|
448
|
+
"Swap Allowance Holder Get Price"
|
|
449
|
+
]
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
},
|
|
453
|
+
{
|
|
454
|
+
"displayName": "Trade Surplus Max Bps",
|
|
455
|
+
"name": "tradeSurplusMaxBps",
|
|
456
|
+
"description": "The maximum trade surplus (positive slippage) that can be collected in Bps of the buy amount. If not provided, defaults to 10000 (100%). Must be used together with `tradeSurplusRecipient`.",
|
|
457
|
+
"default": 0,
|
|
458
|
+
"type": "number",
|
|
459
|
+
"routing": {
|
|
460
|
+
"send": {
|
|
461
|
+
"type": "query",
|
|
462
|
+
"property": "tradeSurplusMaxBps",
|
|
463
|
+
"value": "={{ $value }}",
|
|
464
|
+
"propertyInDotNotation": false
|
|
465
|
+
}
|
|
466
|
+
},
|
|
467
|
+
"displayOptions": {
|
|
468
|
+
"show": {
|
|
469
|
+
"resource": [
|
|
470
|
+
"Swap"
|
|
471
|
+
],
|
|
472
|
+
"operation": [
|
|
473
|
+
"Swap Allowance Holder Get Price"
|
|
474
|
+
]
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
"displayName": "Gas Price",
|
|
480
|
+
"name": "gasPrice",
|
|
481
|
+
"description": "The target gas price (in wei) for the swap transaction. If not provided, the default value is based on the 0x gas price oracle",
|
|
482
|
+
"default": "",
|
|
483
|
+
"type": "string",
|
|
484
|
+
"routing": {
|
|
485
|
+
"send": {
|
|
486
|
+
"type": "query",
|
|
487
|
+
"property": "gasPrice",
|
|
488
|
+
"value": "={{ $value }}",
|
|
489
|
+
"propertyInDotNotation": false
|
|
490
|
+
}
|
|
491
|
+
},
|
|
492
|
+
"displayOptions": {
|
|
493
|
+
"show": {
|
|
494
|
+
"resource": [
|
|
495
|
+
"Swap"
|
|
496
|
+
],
|
|
497
|
+
"operation": [
|
|
498
|
+
"Swap Allowance Holder Get Price"
|
|
499
|
+
]
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
"displayName": "Slippage Bps",
|
|
505
|
+
"name": "slippageBps",
|
|
506
|
+
"description": "The maximum acceptable slippage of the `buyToken` in Bps. If this parameter is set to 0, no slippage will be tolerated. If not provided, the default slippage tolerance is 100Bps",
|
|
507
|
+
"default": 0,
|
|
508
|
+
"type": "number",
|
|
509
|
+
"routing": {
|
|
510
|
+
"send": {
|
|
511
|
+
"type": "query",
|
|
512
|
+
"property": "slippageBps",
|
|
513
|
+
"value": "={{ $value }}",
|
|
514
|
+
"propertyInDotNotation": false
|
|
515
|
+
}
|
|
516
|
+
},
|
|
517
|
+
"displayOptions": {
|
|
518
|
+
"show": {
|
|
519
|
+
"resource": [
|
|
520
|
+
"Swap"
|
|
521
|
+
],
|
|
522
|
+
"operation": [
|
|
523
|
+
"Swap Allowance Holder Get Price"
|
|
524
|
+
]
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
"displayName": "Slippage Ppm",
|
|
530
|
+
"name": "slippagePpm",
|
|
531
|
+
"description": "The maximum acceptable slippage of the `buyToken` in parts-per-million (PPM). Mutually exclusive with `slippageBps`. e.g. 3000 PPM = 30 BPS = 0.30%.",
|
|
532
|
+
"default": 0,
|
|
533
|
+
"type": "number",
|
|
534
|
+
"routing": {
|
|
535
|
+
"send": {
|
|
536
|
+
"type": "query",
|
|
537
|
+
"property": "slippagePpm",
|
|
538
|
+
"value": "={{ $value }}",
|
|
539
|
+
"propertyInDotNotation": false
|
|
540
|
+
}
|
|
541
|
+
},
|
|
542
|
+
"displayOptions": {
|
|
543
|
+
"show": {
|
|
544
|
+
"resource": [
|
|
545
|
+
"Swap"
|
|
546
|
+
],
|
|
547
|
+
"operation": [
|
|
548
|
+
"Swap Allowance Holder Get Price"
|
|
549
|
+
]
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
},
|
|
553
|
+
{
|
|
554
|
+
"displayName": "Excluded Sources",
|
|
555
|
+
"name": "excludedSources",
|
|
556
|
+
"description": "Liquidity sources e.g. Uniswap_V3, SushiSwap, 0x_RFQ to exclude from the provided quote. See https://api.0x.org/sources?chainId=<chain_id> with the desired chain's ID for a full list of sources. Separate multiple sources with a comma",
|
|
557
|
+
"default": "",
|
|
558
|
+
"type": "string",
|
|
559
|
+
"routing": {
|
|
560
|
+
"send": {
|
|
561
|
+
"type": "query",
|
|
562
|
+
"property": "excludedSources",
|
|
563
|
+
"value": "={{ $value }}",
|
|
564
|
+
"propertyInDotNotation": false
|
|
565
|
+
}
|
|
566
|
+
},
|
|
567
|
+
"displayOptions": {
|
|
568
|
+
"show": {
|
|
569
|
+
"resource": [
|
|
570
|
+
"Swap"
|
|
571
|
+
],
|
|
572
|
+
"operation": [
|
|
573
|
+
"Swap Allowance Holder Get Price"
|
|
574
|
+
]
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
},
|
|
578
|
+
{
|
|
579
|
+
"displayName": "Sell Entire Balance",
|
|
580
|
+
"name": "sellEntireBalance",
|
|
581
|
+
"description": "If set to `true`, the taker's entire `sellToken` balance will be sold during trade execution. The `sellAmount` should be the maximum estimated value, as close as possible to the actual taker's balance to ensure the best routing. Selling more than the `sellAmount` may cause the trade to revert. This feature is designed for cases where the precise sell amount is determined during execution. Learn more [here](https://docs.0x.org/docs/0x-swap-api/additional-topics/sell-entire-balance).",
|
|
582
|
+
"default": "false",
|
|
583
|
+
"type": "options",
|
|
584
|
+
"options": [
|
|
585
|
+
{
|
|
586
|
+
"name": "True",
|
|
587
|
+
"value": "true"
|
|
588
|
+
},
|
|
589
|
+
{
|
|
590
|
+
"name": "False",
|
|
591
|
+
"value": "false"
|
|
592
|
+
}
|
|
593
|
+
],
|
|
594
|
+
"routing": {
|
|
595
|
+
"send": {
|
|
596
|
+
"type": "query",
|
|
597
|
+
"property": "sellEntireBalance",
|
|
598
|
+
"value": "={{ $value }}",
|
|
599
|
+
"propertyInDotNotation": false
|
|
600
|
+
}
|
|
601
|
+
},
|
|
602
|
+
"displayOptions": {
|
|
603
|
+
"show": {
|
|
604
|
+
"resource": [
|
|
605
|
+
"Swap"
|
|
606
|
+
],
|
|
607
|
+
"operation": [
|
|
608
|
+
"Swap Allowance Holder Get Price"
|
|
609
|
+
]
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
},
|
|
613
|
+
{
|
|
614
|
+
"displayName": "Wrap Unwrap Mode",
|
|
615
|
+
"name": "wrapUnwrapMode",
|
|
616
|
+
"description": "Controls how native wrap/unwrap trades are executed. `direct` calls the wrapped-native token contract directly. `settler` routes wrap/unwrap through Settler or Allowance Holder for compatibility. Ignored for non-wrap/unwrap swaps. If omitted, `direct` mode is used.",
|
|
617
|
+
"default": "",
|
|
618
|
+
"type": "string",
|
|
619
|
+
"routing": {
|
|
620
|
+
"send": {
|
|
621
|
+
"type": "query",
|
|
622
|
+
"property": "wrapUnwrapMode",
|
|
623
|
+
"value": "={{ $value }}",
|
|
624
|
+
"propertyInDotNotation": false
|
|
625
|
+
}
|
|
626
|
+
},
|
|
627
|
+
"displayOptions": {
|
|
628
|
+
"show": {
|
|
629
|
+
"resource": [
|
|
630
|
+
"Swap"
|
|
631
|
+
],
|
|
632
|
+
"operation": [
|
|
633
|
+
"Swap Allowance Holder Get Price"
|
|
634
|
+
]
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
},
|
|
638
|
+
{
|
|
639
|
+
"displayName": "GET /swap/allowance-holder/quote",
|
|
640
|
+
"name": "operation",
|
|
641
|
+
"type": "notice",
|
|
642
|
+
"typeOptions": {
|
|
643
|
+
"theme": "info"
|
|
644
|
+
},
|
|
645
|
+
"default": "",
|
|
646
|
+
"displayOptions": {
|
|
647
|
+
"show": {
|
|
648
|
+
"resource": [
|
|
649
|
+
"Swap"
|
|
650
|
+
],
|
|
651
|
+
"operation": [
|
|
652
|
+
"Swap Allowance Holder Get Quote"
|
|
653
|
+
]
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
},
|
|
657
|
+
{
|
|
658
|
+
"displayName": "0 X Api Key",
|
|
659
|
+
"name": "0x-api-key",
|
|
660
|
+
"required": true,
|
|
661
|
+
"description": "Visit dashboard.0x.org to get your API Key",
|
|
662
|
+
"default": "",
|
|
663
|
+
"type": "string",
|
|
664
|
+
"routing": {
|
|
665
|
+
"request": {
|
|
666
|
+
"headers": {
|
|
667
|
+
"0x-api-key": "={{ $value }}"
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
},
|
|
671
|
+
"displayOptions": {
|
|
672
|
+
"show": {
|
|
673
|
+
"resource": [
|
|
674
|
+
"Swap"
|
|
675
|
+
],
|
|
676
|
+
"operation": [
|
|
677
|
+
"Swap Allowance Holder Get Quote"
|
|
678
|
+
]
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
},
|
|
682
|
+
{
|
|
683
|
+
"displayName": "0 X Version",
|
|
684
|
+
"name": "0x-version",
|
|
685
|
+
"required": true,
|
|
686
|
+
"description": "API version",
|
|
687
|
+
"default": "v2",
|
|
688
|
+
"type": "string",
|
|
689
|
+
"routing": {
|
|
690
|
+
"request": {
|
|
691
|
+
"headers": {
|
|
692
|
+
"0x-version": "={{ $value }}"
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
},
|
|
696
|
+
"displayOptions": {
|
|
697
|
+
"show": {
|
|
698
|
+
"resource": [
|
|
699
|
+
"Swap"
|
|
700
|
+
],
|
|
701
|
+
"operation": [
|
|
702
|
+
"Swap Allowance Holder Get Quote"
|
|
703
|
+
]
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
},
|
|
707
|
+
{
|
|
708
|
+
"displayName": "Chain Id",
|
|
709
|
+
"name": "chainId",
|
|
710
|
+
"required": true,
|
|
711
|
+
"description": "Chain ID. See [here](https://docs.0x.org/docs/introduction/supported-chains) for the list of supported chains",
|
|
712
|
+
"default": 1,
|
|
713
|
+
"type": "number",
|
|
714
|
+
"routing": {
|
|
715
|
+
"send": {
|
|
716
|
+
"type": "query",
|
|
717
|
+
"property": "chainId",
|
|
718
|
+
"value": "={{ $value }}",
|
|
719
|
+
"propertyInDotNotation": false
|
|
720
|
+
}
|
|
721
|
+
},
|
|
722
|
+
"displayOptions": {
|
|
723
|
+
"show": {
|
|
724
|
+
"resource": [
|
|
725
|
+
"Swap"
|
|
726
|
+
],
|
|
727
|
+
"operation": [
|
|
728
|
+
"Swap Allowance Holder Get Quote"
|
|
729
|
+
]
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
},
|
|
733
|
+
{
|
|
734
|
+
"displayName": "Buy Token",
|
|
735
|
+
"name": "buyToken",
|
|
736
|
+
"required": true,
|
|
737
|
+
"description": "The contract address of the token to buy",
|
|
738
|
+
"default": "0xdac17f958d2ee523a2206206994597c13d831ec7",
|
|
739
|
+
"type": "string",
|
|
740
|
+
"routing": {
|
|
741
|
+
"send": {
|
|
742
|
+
"type": "query",
|
|
743
|
+
"property": "buyToken",
|
|
744
|
+
"value": "={{ $value }}",
|
|
745
|
+
"propertyInDotNotation": false
|
|
746
|
+
}
|
|
747
|
+
},
|
|
748
|
+
"displayOptions": {
|
|
749
|
+
"show": {
|
|
750
|
+
"resource": [
|
|
751
|
+
"Swap"
|
|
752
|
+
],
|
|
753
|
+
"operation": [
|
|
754
|
+
"Swap Allowance Holder Get Quote"
|
|
755
|
+
]
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
},
|
|
759
|
+
{
|
|
760
|
+
"displayName": "Sell Token",
|
|
761
|
+
"name": "sellToken",
|
|
762
|
+
"required": true,
|
|
763
|
+
"description": "The contract address of the token to sell",
|
|
764
|
+
"default": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
|
|
765
|
+
"type": "string",
|
|
766
|
+
"routing": {
|
|
767
|
+
"send": {
|
|
768
|
+
"type": "query",
|
|
769
|
+
"property": "sellToken",
|
|
770
|
+
"value": "={{ $value }}",
|
|
771
|
+
"propertyInDotNotation": false
|
|
772
|
+
}
|
|
773
|
+
},
|
|
774
|
+
"displayOptions": {
|
|
775
|
+
"show": {
|
|
776
|
+
"resource": [
|
|
777
|
+
"Swap"
|
|
778
|
+
],
|
|
779
|
+
"operation": [
|
|
780
|
+
"Swap Allowance Holder Get Quote"
|
|
781
|
+
]
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
},
|
|
785
|
+
{
|
|
786
|
+
"displayName": "Sell Amount",
|
|
787
|
+
"name": "sellAmount",
|
|
788
|
+
"description": "The amount of `sellToken` in `sellToken` base units to sell",
|
|
789
|
+
"default": "100000000",
|
|
790
|
+
"type": "string",
|
|
791
|
+
"routing": {
|
|
792
|
+
"send": {
|
|
793
|
+
"type": "query",
|
|
794
|
+
"property": "sellAmount",
|
|
795
|
+
"value": "={{ $value }}",
|
|
796
|
+
"propertyInDotNotation": false
|
|
797
|
+
}
|
|
798
|
+
},
|
|
799
|
+
"displayOptions": {
|
|
800
|
+
"show": {
|
|
801
|
+
"resource": [
|
|
802
|
+
"Swap"
|
|
803
|
+
],
|
|
804
|
+
"operation": [
|
|
805
|
+
"Swap Allowance Holder Get Quote"
|
|
806
|
+
]
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
},
|
|
810
|
+
{
|
|
811
|
+
"displayName": "Buy Amount",
|
|
812
|
+
"name": "buyAmount",
|
|
813
|
+
"description": "The exact amount of `buyToken` in `buyToken` base units to buy",
|
|
814
|
+
"default": "",
|
|
815
|
+
"type": "string",
|
|
816
|
+
"routing": {
|
|
817
|
+
"send": {
|
|
818
|
+
"type": "query",
|
|
819
|
+
"property": "buyAmount",
|
|
820
|
+
"value": "={{ $value }}",
|
|
821
|
+
"propertyInDotNotation": false
|
|
822
|
+
}
|
|
823
|
+
},
|
|
824
|
+
"displayOptions": {
|
|
825
|
+
"show": {
|
|
826
|
+
"resource": [
|
|
827
|
+
"Swap"
|
|
828
|
+
],
|
|
829
|
+
"operation": [
|
|
830
|
+
"Swap Allowance Holder Get Quote"
|
|
831
|
+
]
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
},
|
|
835
|
+
{
|
|
836
|
+
"displayName": "Taker",
|
|
837
|
+
"name": "taker",
|
|
838
|
+
"required": true,
|
|
839
|
+
"description": "The address which holds the `sellToken` balance and has the allowance set for the swap",
|
|
840
|
+
"default": "0x70a9f34f9b34c64957b9c401a97bfed35b95049e",
|
|
841
|
+
"type": "string",
|
|
842
|
+
"routing": {
|
|
843
|
+
"send": {
|
|
844
|
+
"type": "query",
|
|
845
|
+
"property": "taker",
|
|
846
|
+
"value": "={{ $value }}",
|
|
847
|
+
"propertyInDotNotation": false
|
|
848
|
+
}
|
|
849
|
+
},
|
|
850
|
+
"displayOptions": {
|
|
851
|
+
"show": {
|
|
852
|
+
"resource": [
|
|
853
|
+
"Swap"
|
|
854
|
+
],
|
|
855
|
+
"operation": [
|
|
856
|
+
"Swap Allowance Holder Get Quote"
|
|
857
|
+
]
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
},
|
|
861
|
+
{
|
|
862
|
+
"displayName": "Tx Origin",
|
|
863
|
+
"name": "txOrigin",
|
|
864
|
+
"description": "The address of the external account that started the transaction. This is only needed if `taker` is a smart contract.",
|
|
865
|
+
"default": "",
|
|
866
|
+
"type": "string",
|
|
867
|
+
"routing": {
|
|
868
|
+
"send": {
|
|
869
|
+
"type": "query",
|
|
870
|
+
"property": "txOrigin",
|
|
871
|
+
"value": "={{ $value }}",
|
|
872
|
+
"propertyInDotNotation": false
|
|
873
|
+
}
|
|
874
|
+
},
|
|
875
|
+
"displayOptions": {
|
|
876
|
+
"show": {
|
|
877
|
+
"resource": [
|
|
878
|
+
"Swap"
|
|
879
|
+
],
|
|
880
|
+
"operation": [
|
|
881
|
+
"Swap Allowance Holder Get Quote"
|
|
882
|
+
]
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
},
|
|
886
|
+
{
|
|
887
|
+
"displayName": "Recipient",
|
|
888
|
+
"name": "recipient",
|
|
889
|
+
"description": "The address to receive the `buyToken`. If not provided, defaults to the taker address. Not supported for wrap/unwrap operations.",
|
|
890
|
+
"default": "",
|
|
891
|
+
"type": "string",
|
|
892
|
+
"routing": {
|
|
893
|
+
"send": {
|
|
894
|
+
"type": "query",
|
|
895
|
+
"property": "recipient",
|
|
896
|
+
"value": "={{ $value }}",
|
|
897
|
+
"propertyInDotNotation": false
|
|
898
|
+
}
|
|
899
|
+
},
|
|
900
|
+
"displayOptions": {
|
|
901
|
+
"show": {
|
|
902
|
+
"resource": [
|
|
903
|
+
"Swap"
|
|
904
|
+
],
|
|
905
|
+
"operation": [
|
|
906
|
+
"Swap Allowance Holder Get Quote"
|
|
907
|
+
]
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
},
|
|
911
|
+
{
|
|
912
|
+
"displayName": "Swap Fee Recipient",
|
|
913
|
+
"name": "swapFeeRecipient",
|
|
914
|
+
"description": "The wallet address to receive the specified trading fees (supports single or multiple comma-separated values). You must also specify the `swapFeeBps` in the request to use this feature. When multiple values are provided, must match length of `swapFeeBps`.",
|
|
915
|
+
"default": "",
|
|
916
|
+
"type": "string",
|
|
917
|
+
"routing": {
|
|
918
|
+
"send": {
|
|
919
|
+
"type": "query",
|
|
920
|
+
"property": "swapFeeRecipient",
|
|
921
|
+
"value": "={{ $value }}",
|
|
922
|
+
"propertyInDotNotation": false
|
|
923
|
+
}
|
|
924
|
+
},
|
|
925
|
+
"displayOptions": {
|
|
926
|
+
"show": {
|
|
927
|
+
"resource": [
|
|
928
|
+
"Swap"
|
|
929
|
+
],
|
|
930
|
+
"operation": [
|
|
931
|
+
"Swap Allowance Holder Get Quote"
|
|
932
|
+
]
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
},
|
|
936
|
+
{
|
|
937
|
+
"displayName": "Swap Fee Bps",
|
|
938
|
+
"name": "swapFeeBps",
|
|
939
|
+
"description": "The amount in Bps of the `swapFeeToken` to charge and deliver to the `swapFeeRecipient` (supports single or multiple comma-separated values). You must also specify the `swapFeeRecipient` in the request to use this feature. For security, this field has a default limit of 1000 Bps. If your application requires a higher value, please reach out to us.",
|
|
940
|
+
"default": "",
|
|
941
|
+
"type": "string",
|
|
942
|
+
"routing": {
|
|
943
|
+
"send": {
|
|
944
|
+
"type": "query",
|
|
945
|
+
"property": "swapFeeBps",
|
|
946
|
+
"value": "={{ $value }}",
|
|
947
|
+
"propertyInDotNotation": false
|
|
948
|
+
}
|
|
949
|
+
},
|
|
950
|
+
"displayOptions": {
|
|
951
|
+
"show": {
|
|
952
|
+
"resource": [
|
|
953
|
+
"Swap"
|
|
954
|
+
],
|
|
955
|
+
"operation": [
|
|
956
|
+
"Swap Allowance Holder Get Quote"
|
|
957
|
+
]
|
|
958
|
+
}
|
|
959
|
+
}
|
|
960
|
+
},
|
|
961
|
+
{
|
|
962
|
+
"displayName": "Swap Fee Token",
|
|
963
|
+
"name": "swapFeeToken",
|
|
964
|
+
"description": "The contract address of the token to receive trading fees in (supports single or multiple comma-separated values). Each token must be set to the value of either the `buyToken` or the `sellToken`. If omitted, the fee token will be determined by 0x with preference to stablecoins and highly liquid assets. You must also specify the `swapFeeRecipient` and `swapFeeBps` to charge integrator fees. When multiple values are provided, must match length of `swapFeeBps`.",
|
|
965
|
+
"default": "",
|
|
966
|
+
"type": "string",
|
|
967
|
+
"routing": {
|
|
968
|
+
"send": {
|
|
969
|
+
"type": "query",
|
|
970
|
+
"property": "swapFeeToken",
|
|
971
|
+
"value": "={{ $value }}",
|
|
972
|
+
"propertyInDotNotation": false
|
|
973
|
+
}
|
|
974
|
+
},
|
|
975
|
+
"displayOptions": {
|
|
976
|
+
"show": {
|
|
977
|
+
"resource": [
|
|
978
|
+
"Swap"
|
|
979
|
+
],
|
|
980
|
+
"operation": [
|
|
981
|
+
"Swap Allowance Holder Get Quote"
|
|
982
|
+
]
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
},
|
|
986
|
+
{
|
|
987
|
+
"displayName": "Trade Surplus Recipient",
|
|
988
|
+
"name": "tradeSurplusRecipient",
|
|
989
|
+
"description": "The address to receive any trade surplus. If specified, this address will receive trade surplus when applicable. Otherwise, the taker will receive the surplus. This feature is only available to selected integrators on a custom pricing plan. In other cases, the surplus will be collected by 0x. For assistance with a custom plan, please contact support.",
|
|
990
|
+
"default": "",
|
|
991
|
+
"type": "string",
|
|
992
|
+
"routing": {
|
|
993
|
+
"send": {
|
|
994
|
+
"type": "query",
|
|
995
|
+
"property": "tradeSurplusRecipient",
|
|
996
|
+
"value": "={{ $value }}",
|
|
997
|
+
"propertyInDotNotation": false
|
|
998
|
+
}
|
|
999
|
+
},
|
|
1000
|
+
"displayOptions": {
|
|
1001
|
+
"show": {
|
|
1002
|
+
"resource": [
|
|
1003
|
+
"Swap"
|
|
1004
|
+
],
|
|
1005
|
+
"operation": [
|
|
1006
|
+
"Swap Allowance Holder Get Quote"
|
|
1007
|
+
]
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
},
|
|
1011
|
+
{
|
|
1012
|
+
"displayName": "Trade Surplus Max Bps",
|
|
1013
|
+
"name": "tradeSurplusMaxBps",
|
|
1014
|
+
"description": "The maximum trade surplus (positive slippage) that can be collected in Bps of the buy amount. If not provided, defaults to 10000 (100%). Must be used together with `tradeSurplusRecipient`.",
|
|
1015
|
+
"default": 0,
|
|
1016
|
+
"type": "number",
|
|
1017
|
+
"routing": {
|
|
1018
|
+
"send": {
|
|
1019
|
+
"type": "query",
|
|
1020
|
+
"property": "tradeSurplusMaxBps",
|
|
1021
|
+
"value": "={{ $value }}",
|
|
1022
|
+
"propertyInDotNotation": false
|
|
1023
|
+
}
|
|
1024
|
+
},
|
|
1025
|
+
"displayOptions": {
|
|
1026
|
+
"show": {
|
|
1027
|
+
"resource": [
|
|
1028
|
+
"Swap"
|
|
1029
|
+
],
|
|
1030
|
+
"operation": [
|
|
1031
|
+
"Swap Allowance Holder Get Quote"
|
|
1032
|
+
]
|
|
1033
|
+
}
|
|
1034
|
+
}
|
|
1035
|
+
},
|
|
1036
|
+
{
|
|
1037
|
+
"displayName": "Gas Price",
|
|
1038
|
+
"name": "gasPrice",
|
|
1039
|
+
"description": "The target gas price (in wei) for the swap transaction. If not provided, the default value is based on the 0x gas price oracle",
|
|
1040
|
+
"default": "",
|
|
1041
|
+
"type": "string",
|
|
1042
|
+
"routing": {
|
|
1043
|
+
"send": {
|
|
1044
|
+
"type": "query",
|
|
1045
|
+
"property": "gasPrice",
|
|
1046
|
+
"value": "={{ $value }}",
|
|
1047
|
+
"propertyInDotNotation": false
|
|
1048
|
+
}
|
|
1049
|
+
},
|
|
1050
|
+
"displayOptions": {
|
|
1051
|
+
"show": {
|
|
1052
|
+
"resource": [
|
|
1053
|
+
"Swap"
|
|
1054
|
+
],
|
|
1055
|
+
"operation": [
|
|
1056
|
+
"Swap Allowance Holder Get Quote"
|
|
1057
|
+
]
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1060
|
+
},
|
|
1061
|
+
{
|
|
1062
|
+
"displayName": "Slippage Bps",
|
|
1063
|
+
"name": "slippageBps",
|
|
1064
|
+
"description": "The maximum acceptable slippage of the `buyToken` in Bps. If this parameter is set to 0, no slippage will be tolerated. If not provided, the default slippage tolerance is 100Bps",
|
|
1065
|
+
"default": 0,
|
|
1066
|
+
"type": "number",
|
|
1067
|
+
"routing": {
|
|
1068
|
+
"send": {
|
|
1069
|
+
"type": "query",
|
|
1070
|
+
"property": "slippageBps",
|
|
1071
|
+
"value": "={{ $value }}",
|
|
1072
|
+
"propertyInDotNotation": false
|
|
1073
|
+
}
|
|
1074
|
+
},
|
|
1075
|
+
"displayOptions": {
|
|
1076
|
+
"show": {
|
|
1077
|
+
"resource": [
|
|
1078
|
+
"Swap"
|
|
1079
|
+
],
|
|
1080
|
+
"operation": [
|
|
1081
|
+
"Swap Allowance Holder Get Quote"
|
|
1082
|
+
]
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
},
|
|
1086
|
+
{
|
|
1087
|
+
"displayName": "Slippage Ppm",
|
|
1088
|
+
"name": "slippagePpm",
|
|
1089
|
+
"description": "The maximum acceptable slippage of the `buyToken` in parts-per-million (PPM). Mutually exclusive with `slippageBps`. e.g. 3000 PPM = 30 BPS = 0.30%.",
|
|
1090
|
+
"default": 0,
|
|
1091
|
+
"type": "number",
|
|
1092
|
+
"routing": {
|
|
1093
|
+
"send": {
|
|
1094
|
+
"type": "query",
|
|
1095
|
+
"property": "slippagePpm",
|
|
1096
|
+
"value": "={{ $value }}",
|
|
1097
|
+
"propertyInDotNotation": false
|
|
1098
|
+
}
|
|
1099
|
+
},
|
|
1100
|
+
"displayOptions": {
|
|
1101
|
+
"show": {
|
|
1102
|
+
"resource": [
|
|
1103
|
+
"Swap"
|
|
1104
|
+
],
|
|
1105
|
+
"operation": [
|
|
1106
|
+
"Swap Allowance Holder Get Quote"
|
|
1107
|
+
]
|
|
1108
|
+
}
|
|
1109
|
+
}
|
|
1110
|
+
},
|
|
1111
|
+
{
|
|
1112
|
+
"displayName": "Excluded Sources",
|
|
1113
|
+
"name": "excludedSources",
|
|
1114
|
+
"description": "Liquidity sources e.g. Uniswap_V3, SushiSwap, 0x_RFQ to exclude from the provided quote. `See https://api.0x.org/sources?chainId=<chain_id>` with the desired chain's ID for a full list of sources. Separate multiple sources with a comma",
|
|
1115
|
+
"default": "",
|
|
1116
|
+
"type": "string",
|
|
1117
|
+
"routing": {
|
|
1118
|
+
"send": {
|
|
1119
|
+
"type": "query",
|
|
1120
|
+
"property": "excludedSources",
|
|
1121
|
+
"value": "={{ $value }}",
|
|
1122
|
+
"propertyInDotNotation": false
|
|
1123
|
+
}
|
|
1124
|
+
},
|
|
1125
|
+
"displayOptions": {
|
|
1126
|
+
"show": {
|
|
1127
|
+
"resource": [
|
|
1128
|
+
"Swap"
|
|
1129
|
+
],
|
|
1130
|
+
"operation": [
|
|
1131
|
+
"Swap Allowance Holder Get Quote"
|
|
1132
|
+
]
|
|
1133
|
+
}
|
|
1134
|
+
}
|
|
1135
|
+
},
|
|
1136
|
+
{
|
|
1137
|
+
"displayName": "Sell Entire Balance",
|
|
1138
|
+
"name": "sellEntireBalance",
|
|
1139
|
+
"description": "If set to `true`, the taker's entire `sellToken` balance will be sold during trade execution. The `sellAmount` should be the maximum estimated value, as close as possible to the actual taker's balance to ensure the best routing. Selling more than the `sellAmount` may cause the trade to revert. This feature is designed for cases where the precise sell amount is determined during execution. Learn more [here](https://docs.0x.org/docs/0x-swap-api/additional-topics/sell-entire-balance).",
|
|
1140
|
+
"default": "false",
|
|
1141
|
+
"type": "options",
|
|
1142
|
+
"options": [
|
|
1143
|
+
{
|
|
1144
|
+
"name": "True",
|
|
1145
|
+
"value": "true"
|
|
1146
|
+
},
|
|
1147
|
+
{
|
|
1148
|
+
"name": "False",
|
|
1149
|
+
"value": "false"
|
|
1150
|
+
}
|
|
1151
|
+
],
|
|
1152
|
+
"routing": {
|
|
1153
|
+
"send": {
|
|
1154
|
+
"type": "query",
|
|
1155
|
+
"property": "sellEntireBalance",
|
|
1156
|
+
"value": "={{ $value }}",
|
|
1157
|
+
"propertyInDotNotation": false
|
|
1158
|
+
}
|
|
1159
|
+
},
|
|
1160
|
+
"displayOptions": {
|
|
1161
|
+
"show": {
|
|
1162
|
+
"resource": [
|
|
1163
|
+
"Swap"
|
|
1164
|
+
],
|
|
1165
|
+
"operation": [
|
|
1166
|
+
"Swap Allowance Holder Get Quote"
|
|
1167
|
+
]
|
|
1168
|
+
}
|
|
1169
|
+
}
|
|
1170
|
+
},
|
|
1171
|
+
{
|
|
1172
|
+
"displayName": "Wrap Unwrap Mode",
|
|
1173
|
+
"name": "wrapUnwrapMode",
|
|
1174
|
+
"description": "Controls how native wrap/unwrap trades are executed. `direct` calls the wrapped-native token contract directly. `settler` routes wrap/unwrap through Settler or Allowance Holder for compatibility. Ignored for non-wrap/unwrap swaps. If omitted, `direct` mode is used.",
|
|
1175
|
+
"default": "",
|
|
1176
|
+
"type": "string",
|
|
1177
|
+
"routing": {
|
|
1178
|
+
"send": {
|
|
1179
|
+
"type": "query",
|
|
1180
|
+
"property": "wrapUnwrapMode",
|
|
1181
|
+
"value": "={{ $value }}",
|
|
1182
|
+
"propertyInDotNotation": false
|
|
1183
|
+
}
|
|
1184
|
+
},
|
|
1185
|
+
"displayOptions": {
|
|
1186
|
+
"show": {
|
|
1187
|
+
"resource": [
|
|
1188
|
+
"Swap"
|
|
1189
|
+
],
|
|
1190
|
+
"operation": [
|
|
1191
|
+
"Swap Allowance Holder Get Quote"
|
|
1192
|
+
]
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1195
|
+
},
|
|
1196
|
+
{
|
|
1197
|
+
"displayName": "GET /swap/permit2/price",
|
|
1198
|
+
"name": "operation",
|
|
1199
|
+
"type": "notice",
|
|
1200
|
+
"typeOptions": {
|
|
1201
|
+
"theme": "info"
|
|
1202
|
+
},
|
|
1203
|
+
"default": "",
|
|
1204
|
+
"displayOptions": {
|
|
1205
|
+
"show": {
|
|
1206
|
+
"resource": [
|
|
1207
|
+
"Swap"
|
|
1208
|
+
],
|
|
1209
|
+
"operation": [
|
|
1210
|
+
"Swap Permit 2 Get Price"
|
|
1211
|
+
]
|
|
1212
|
+
}
|
|
1213
|
+
}
|
|
1214
|
+
},
|
|
1215
|
+
{
|
|
1216
|
+
"displayName": "0 X Api Key",
|
|
1217
|
+
"name": "0x-api-key",
|
|
1218
|
+
"required": true,
|
|
1219
|
+
"description": "Visit dashboard.0x.org to get your API Key",
|
|
1220
|
+
"default": "",
|
|
1221
|
+
"type": "string",
|
|
1222
|
+
"routing": {
|
|
1223
|
+
"request": {
|
|
1224
|
+
"headers": {
|
|
1225
|
+
"0x-api-key": "={{ $value }}"
|
|
1226
|
+
}
|
|
1227
|
+
}
|
|
1228
|
+
},
|
|
1229
|
+
"displayOptions": {
|
|
1230
|
+
"show": {
|
|
1231
|
+
"resource": [
|
|
1232
|
+
"Swap"
|
|
1233
|
+
],
|
|
1234
|
+
"operation": [
|
|
1235
|
+
"Swap Permit 2 Get Price"
|
|
1236
|
+
]
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
1239
|
+
},
|
|
1240
|
+
{
|
|
1241
|
+
"displayName": "0 X Version",
|
|
1242
|
+
"name": "0x-version",
|
|
1243
|
+
"required": true,
|
|
1244
|
+
"description": "API version",
|
|
1245
|
+
"default": "v2",
|
|
1246
|
+
"type": "string",
|
|
1247
|
+
"routing": {
|
|
1248
|
+
"request": {
|
|
1249
|
+
"headers": {
|
|
1250
|
+
"0x-version": "={{ $value }}"
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
},
|
|
1254
|
+
"displayOptions": {
|
|
1255
|
+
"show": {
|
|
1256
|
+
"resource": [
|
|
1257
|
+
"Swap"
|
|
1258
|
+
],
|
|
1259
|
+
"operation": [
|
|
1260
|
+
"Swap Permit 2 Get Price"
|
|
1261
|
+
]
|
|
1262
|
+
}
|
|
1263
|
+
}
|
|
1264
|
+
},
|
|
1265
|
+
{
|
|
1266
|
+
"displayName": "Chain Id",
|
|
1267
|
+
"name": "chainId",
|
|
1268
|
+
"required": true,
|
|
1269
|
+
"description": "Chain ID. See [here](https://docs.0x.org/docs/introduction/supported-chains) for the list of supported chains",
|
|
1270
|
+
"default": 1,
|
|
1271
|
+
"type": "number",
|
|
1272
|
+
"routing": {
|
|
1273
|
+
"send": {
|
|
1274
|
+
"type": "query",
|
|
1275
|
+
"property": "chainId",
|
|
1276
|
+
"value": "={{ $value }}",
|
|
1277
|
+
"propertyInDotNotation": false
|
|
1278
|
+
}
|
|
1279
|
+
},
|
|
1280
|
+
"displayOptions": {
|
|
1281
|
+
"show": {
|
|
1282
|
+
"resource": [
|
|
1283
|
+
"Swap"
|
|
1284
|
+
],
|
|
1285
|
+
"operation": [
|
|
1286
|
+
"Swap Permit 2 Get Price"
|
|
1287
|
+
]
|
|
1288
|
+
}
|
|
1289
|
+
}
|
|
1290
|
+
},
|
|
1291
|
+
{
|
|
1292
|
+
"displayName": "Buy Token",
|
|
1293
|
+
"name": "buyToken",
|
|
1294
|
+
"required": true,
|
|
1295
|
+
"description": "The contract address of the token to buy",
|
|
1296
|
+
"default": "0xdac17f958d2ee523a2206206994597c13d831ec7",
|
|
1297
|
+
"type": "string",
|
|
1298
|
+
"routing": {
|
|
1299
|
+
"send": {
|
|
1300
|
+
"type": "query",
|
|
1301
|
+
"property": "buyToken",
|
|
1302
|
+
"value": "={{ $value }}",
|
|
1303
|
+
"propertyInDotNotation": false
|
|
1304
|
+
}
|
|
1305
|
+
},
|
|
1306
|
+
"displayOptions": {
|
|
1307
|
+
"show": {
|
|
1308
|
+
"resource": [
|
|
1309
|
+
"Swap"
|
|
1310
|
+
],
|
|
1311
|
+
"operation": [
|
|
1312
|
+
"Swap Permit 2 Get Price"
|
|
1313
|
+
]
|
|
1314
|
+
}
|
|
1315
|
+
}
|
|
1316
|
+
},
|
|
1317
|
+
{
|
|
1318
|
+
"displayName": "Sell Token",
|
|
1319
|
+
"name": "sellToken",
|
|
1320
|
+
"required": true,
|
|
1321
|
+
"description": "The contract address of the token to sell",
|
|
1322
|
+
"default": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
|
|
1323
|
+
"type": "string",
|
|
1324
|
+
"routing": {
|
|
1325
|
+
"send": {
|
|
1326
|
+
"type": "query",
|
|
1327
|
+
"property": "sellToken",
|
|
1328
|
+
"value": "={{ $value }}",
|
|
1329
|
+
"propertyInDotNotation": false
|
|
1330
|
+
}
|
|
1331
|
+
},
|
|
1332
|
+
"displayOptions": {
|
|
1333
|
+
"show": {
|
|
1334
|
+
"resource": [
|
|
1335
|
+
"Swap"
|
|
1336
|
+
],
|
|
1337
|
+
"operation": [
|
|
1338
|
+
"Swap Permit 2 Get Price"
|
|
1339
|
+
]
|
|
1340
|
+
}
|
|
1341
|
+
}
|
|
1342
|
+
},
|
|
1343
|
+
{
|
|
1344
|
+
"displayName": "Sell Amount",
|
|
1345
|
+
"name": "sellAmount",
|
|
1346
|
+
"description": "The amount of `sellToken` in `sellToken` base units to sell",
|
|
1347
|
+
"default": "100000000",
|
|
1348
|
+
"type": "string",
|
|
1349
|
+
"routing": {
|
|
1350
|
+
"send": {
|
|
1351
|
+
"type": "query",
|
|
1352
|
+
"property": "sellAmount",
|
|
1353
|
+
"value": "={{ $value }}",
|
|
1354
|
+
"propertyInDotNotation": false
|
|
1355
|
+
}
|
|
1356
|
+
},
|
|
1357
|
+
"displayOptions": {
|
|
1358
|
+
"show": {
|
|
1359
|
+
"resource": [
|
|
1360
|
+
"Swap"
|
|
1361
|
+
],
|
|
1362
|
+
"operation": [
|
|
1363
|
+
"Swap Permit 2 Get Price"
|
|
1364
|
+
]
|
|
1365
|
+
}
|
|
1366
|
+
}
|
|
1367
|
+
},
|
|
1368
|
+
{
|
|
1369
|
+
"displayName": "Buy Amount",
|
|
1370
|
+
"name": "buyAmount",
|
|
1371
|
+
"description": "The exact amount of `buyToken` in `buyToken` base units to buy",
|
|
1372
|
+
"default": "",
|
|
1373
|
+
"type": "string",
|
|
1374
|
+
"routing": {
|
|
1375
|
+
"send": {
|
|
1376
|
+
"type": "query",
|
|
1377
|
+
"property": "buyAmount",
|
|
1378
|
+
"value": "={{ $value }}",
|
|
1379
|
+
"propertyInDotNotation": false
|
|
1380
|
+
}
|
|
1381
|
+
},
|
|
1382
|
+
"displayOptions": {
|
|
1383
|
+
"show": {
|
|
1384
|
+
"resource": [
|
|
1385
|
+
"Swap"
|
|
1386
|
+
],
|
|
1387
|
+
"operation": [
|
|
1388
|
+
"Swap Permit 2 Get Price"
|
|
1389
|
+
]
|
|
1390
|
+
}
|
|
1391
|
+
}
|
|
1392
|
+
},
|
|
1393
|
+
{
|
|
1394
|
+
"displayName": "Taker",
|
|
1395
|
+
"name": "taker",
|
|
1396
|
+
"description": "The address which holds the `sellToken` balance and has the allowance set for the swap",
|
|
1397
|
+
"default": "0x70a9f34f9b34c64957b9c401a97bfed35b95049e",
|
|
1398
|
+
"type": "string",
|
|
1399
|
+
"routing": {
|
|
1400
|
+
"send": {
|
|
1401
|
+
"type": "query",
|
|
1402
|
+
"property": "taker",
|
|
1403
|
+
"value": "={{ $value }}",
|
|
1404
|
+
"propertyInDotNotation": false
|
|
1405
|
+
}
|
|
1406
|
+
},
|
|
1407
|
+
"displayOptions": {
|
|
1408
|
+
"show": {
|
|
1409
|
+
"resource": [
|
|
1410
|
+
"Swap"
|
|
1411
|
+
],
|
|
1412
|
+
"operation": [
|
|
1413
|
+
"Swap Permit 2 Get Price"
|
|
1414
|
+
]
|
|
1415
|
+
}
|
|
1416
|
+
}
|
|
1417
|
+
},
|
|
1418
|
+
{
|
|
1419
|
+
"displayName": "Tx Origin",
|
|
1420
|
+
"name": "txOrigin",
|
|
1421
|
+
"description": "The address of the external account that started the transaction. This is only needed if `taker` is a smart contract.",
|
|
1422
|
+
"default": "",
|
|
1423
|
+
"type": "string",
|
|
1424
|
+
"routing": {
|
|
1425
|
+
"send": {
|
|
1426
|
+
"type": "query",
|
|
1427
|
+
"property": "txOrigin",
|
|
1428
|
+
"value": "={{ $value }}",
|
|
1429
|
+
"propertyInDotNotation": false
|
|
1430
|
+
}
|
|
1431
|
+
},
|
|
1432
|
+
"displayOptions": {
|
|
1433
|
+
"show": {
|
|
1434
|
+
"resource": [
|
|
1435
|
+
"Swap"
|
|
1436
|
+
],
|
|
1437
|
+
"operation": [
|
|
1438
|
+
"Swap Permit 2 Get Price"
|
|
1439
|
+
]
|
|
1440
|
+
}
|
|
1441
|
+
}
|
|
1442
|
+
},
|
|
1443
|
+
{
|
|
1444
|
+
"displayName": "Recipient",
|
|
1445
|
+
"name": "recipient",
|
|
1446
|
+
"description": "The address to receive the `buyToken`. If not provided, defaults to the taker address. Not supported for wrap/unwrap operations.",
|
|
1447
|
+
"default": "",
|
|
1448
|
+
"type": "string",
|
|
1449
|
+
"routing": {
|
|
1450
|
+
"send": {
|
|
1451
|
+
"type": "query",
|
|
1452
|
+
"property": "recipient",
|
|
1453
|
+
"value": "={{ $value }}",
|
|
1454
|
+
"propertyInDotNotation": false
|
|
1455
|
+
}
|
|
1456
|
+
},
|
|
1457
|
+
"displayOptions": {
|
|
1458
|
+
"show": {
|
|
1459
|
+
"resource": [
|
|
1460
|
+
"Swap"
|
|
1461
|
+
],
|
|
1462
|
+
"operation": [
|
|
1463
|
+
"Swap Permit 2 Get Price"
|
|
1464
|
+
]
|
|
1465
|
+
}
|
|
1466
|
+
}
|
|
1467
|
+
},
|
|
1468
|
+
{
|
|
1469
|
+
"displayName": "Swap Fee Recipient",
|
|
1470
|
+
"name": "swapFeeRecipient",
|
|
1471
|
+
"description": "The wallet address to receive the specified trading fees (supports single or multiple comma-separated values). You must also specify the `swapFeeBps` in the request to use this feature. When multiple values are provided, must match length of `swapFeeBps`.",
|
|
1472
|
+
"default": "",
|
|
1473
|
+
"type": "string",
|
|
1474
|
+
"routing": {
|
|
1475
|
+
"send": {
|
|
1476
|
+
"type": "query",
|
|
1477
|
+
"property": "swapFeeRecipient",
|
|
1478
|
+
"value": "={{ $value }}",
|
|
1479
|
+
"propertyInDotNotation": false
|
|
1480
|
+
}
|
|
1481
|
+
},
|
|
1482
|
+
"displayOptions": {
|
|
1483
|
+
"show": {
|
|
1484
|
+
"resource": [
|
|
1485
|
+
"Swap"
|
|
1486
|
+
],
|
|
1487
|
+
"operation": [
|
|
1488
|
+
"Swap Permit 2 Get Price"
|
|
1489
|
+
]
|
|
1490
|
+
}
|
|
1491
|
+
}
|
|
1492
|
+
},
|
|
1493
|
+
{
|
|
1494
|
+
"displayName": "Swap Fee Bps",
|
|
1495
|
+
"name": "swapFeeBps",
|
|
1496
|
+
"description": "The amount in Bps of the `swapFeeToken` to charge and deliver to the `swapFeeRecipient` (supports single or multiple comma-separated values). You must also specify the `swapFeeRecipient` in the request to use this feature. For security, this field has a default limit of 1000 Bps. If your application requires a higher value, please reach out to us.",
|
|
1497
|
+
"default": "",
|
|
1498
|
+
"type": "string",
|
|
1499
|
+
"routing": {
|
|
1500
|
+
"send": {
|
|
1501
|
+
"type": "query",
|
|
1502
|
+
"property": "swapFeeBps",
|
|
1503
|
+
"value": "={{ $value }}",
|
|
1504
|
+
"propertyInDotNotation": false
|
|
1505
|
+
}
|
|
1506
|
+
},
|
|
1507
|
+
"displayOptions": {
|
|
1508
|
+
"show": {
|
|
1509
|
+
"resource": [
|
|
1510
|
+
"Swap"
|
|
1511
|
+
],
|
|
1512
|
+
"operation": [
|
|
1513
|
+
"Swap Permit 2 Get Price"
|
|
1514
|
+
]
|
|
1515
|
+
}
|
|
1516
|
+
}
|
|
1517
|
+
},
|
|
1518
|
+
{
|
|
1519
|
+
"displayName": "Swap Fee Token",
|
|
1520
|
+
"name": "swapFeeToken",
|
|
1521
|
+
"description": "The contract address of the token to receive trading fees in (supports single or multiple comma-separated values). Each token must be set to the value of either the `buyToken` or the `sellToken`. If omitted, the fee token will be determined by 0x with preference to stablecoins and highly liquid assets. You must also specify the `swapFeeRecipient` and `swapFeeBps` to charge integrator fees. When multiple values are provided, must match length of `swapFeeBps`.",
|
|
1522
|
+
"default": "",
|
|
1523
|
+
"type": "string",
|
|
1524
|
+
"routing": {
|
|
1525
|
+
"send": {
|
|
1526
|
+
"type": "query",
|
|
1527
|
+
"property": "swapFeeToken",
|
|
1528
|
+
"value": "={{ $value }}",
|
|
1529
|
+
"propertyInDotNotation": false
|
|
1530
|
+
}
|
|
1531
|
+
},
|
|
1532
|
+
"displayOptions": {
|
|
1533
|
+
"show": {
|
|
1534
|
+
"resource": [
|
|
1535
|
+
"Swap"
|
|
1536
|
+
],
|
|
1537
|
+
"operation": [
|
|
1538
|
+
"Swap Permit 2 Get Price"
|
|
1539
|
+
]
|
|
1540
|
+
}
|
|
1541
|
+
}
|
|
1542
|
+
},
|
|
1543
|
+
{
|
|
1544
|
+
"displayName": "Trade Surplus Recipient",
|
|
1545
|
+
"name": "tradeSurplusRecipient",
|
|
1546
|
+
"description": "The address to receive any trade surplus. If specified, this address will receive trade surplus when applicable. Otherwise, the taker will receive the surplus. This feature is only available to selected integrators on a custom pricing plan. In other cases, the surplus will be collected by 0x. For assistance with a custom plan, please contact support.",
|
|
1547
|
+
"default": "",
|
|
1548
|
+
"type": "string",
|
|
1549
|
+
"routing": {
|
|
1550
|
+
"send": {
|
|
1551
|
+
"type": "query",
|
|
1552
|
+
"property": "tradeSurplusRecipient",
|
|
1553
|
+
"value": "={{ $value }}",
|
|
1554
|
+
"propertyInDotNotation": false
|
|
1555
|
+
}
|
|
1556
|
+
},
|
|
1557
|
+
"displayOptions": {
|
|
1558
|
+
"show": {
|
|
1559
|
+
"resource": [
|
|
1560
|
+
"Swap"
|
|
1561
|
+
],
|
|
1562
|
+
"operation": [
|
|
1563
|
+
"Swap Permit 2 Get Price"
|
|
1564
|
+
]
|
|
1565
|
+
}
|
|
1566
|
+
}
|
|
1567
|
+
},
|
|
1568
|
+
{
|
|
1569
|
+
"displayName": "Trade Surplus Max Bps",
|
|
1570
|
+
"name": "tradeSurplusMaxBps",
|
|
1571
|
+
"description": "The maximum trade surplus (positive slippage) that can be collected in Bps of the buy amount. If not provided, defaults to 10000 (100%). Must be used together with `tradeSurplusRecipient`.",
|
|
1572
|
+
"default": 0,
|
|
1573
|
+
"type": "number",
|
|
1574
|
+
"routing": {
|
|
1575
|
+
"send": {
|
|
1576
|
+
"type": "query",
|
|
1577
|
+
"property": "tradeSurplusMaxBps",
|
|
1578
|
+
"value": "={{ $value }}",
|
|
1579
|
+
"propertyInDotNotation": false
|
|
1580
|
+
}
|
|
1581
|
+
},
|
|
1582
|
+
"displayOptions": {
|
|
1583
|
+
"show": {
|
|
1584
|
+
"resource": [
|
|
1585
|
+
"Swap"
|
|
1586
|
+
],
|
|
1587
|
+
"operation": [
|
|
1588
|
+
"Swap Permit 2 Get Price"
|
|
1589
|
+
]
|
|
1590
|
+
}
|
|
1591
|
+
}
|
|
1592
|
+
},
|
|
1593
|
+
{
|
|
1594
|
+
"displayName": "Gas Price",
|
|
1595
|
+
"name": "gasPrice",
|
|
1596
|
+
"description": "The target gas price (in wei) for the swap transaction. If not provided, the default value is based on the 0x gas price oracle",
|
|
1597
|
+
"default": "",
|
|
1598
|
+
"type": "string",
|
|
1599
|
+
"routing": {
|
|
1600
|
+
"send": {
|
|
1601
|
+
"type": "query",
|
|
1602
|
+
"property": "gasPrice",
|
|
1603
|
+
"value": "={{ $value }}",
|
|
1604
|
+
"propertyInDotNotation": false
|
|
1605
|
+
}
|
|
1606
|
+
},
|
|
1607
|
+
"displayOptions": {
|
|
1608
|
+
"show": {
|
|
1609
|
+
"resource": [
|
|
1610
|
+
"Swap"
|
|
1611
|
+
],
|
|
1612
|
+
"operation": [
|
|
1613
|
+
"Swap Permit 2 Get Price"
|
|
1614
|
+
]
|
|
1615
|
+
}
|
|
1616
|
+
}
|
|
1617
|
+
},
|
|
1618
|
+
{
|
|
1619
|
+
"displayName": "Slippage Bps",
|
|
1620
|
+
"name": "slippageBps",
|
|
1621
|
+
"description": "The maximum acceptable slippage of the `buyToken` in Bps. If this parameter is set to 0, no slippage will be tolerated. If not provided, the default slippage tolerance is 100Bps",
|
|
1622
|
+
"default": 0,
|
|
1623
|
+
"type": "number",
|
|
1624
|
+
"routing": {
|
|
1625
|
+
"send": {
|
|
1626
|
+
"type": "query",
|
|
1627
|
+
"property": "slippageBps",
|
|
1628
|
+
"value": "={{ $value }}",
|
|
1629
|
+
"propertyInDotNotation": false
|
|
1630
|
+
}
|
|
1631
|
+
},
|
|
1632
|
+
"displayOptions": {
|
|
1633
|
+
"show": {
|
|
1634
|
+
"resource": [
|
|
1635
|
+
"Swap"
|
|
1636
|
+
],
|
|
1637
|
+
"operation": [
|
|
1638
|
+
"Swap Permit 2 Get Price"
|
|
1639
|
+
]
|
|
1640
|
+
}
|
|
1641
|
+
}
|
|
1642
|
+
},
|
|
1643
|
+
{
|
|
1644
|
+
"displayName": "Slippage Ppm",
|
|
1645
|
+
"name": "slippagePpm",
|
|
1646
|
+
"description": "The maximum acceptable slippage of the `buyToken` in parts-per-million (PPM). Mutually exclusive with `slippageBps`. e.g. 3000 PPM = 30 BPS = 0.30%.",
|
|
1647
|
+
"default": 0,
|
|
1648
|
+
"type": "number",
|
|
1649
|
+
"routing": {
|
|
1650
|
+
"send": {
|
|
1651
|
+
"type": "query",
|
|
1652
|
+
"property": "slippagePpm",
|
|
1653
|
+
"value": "={{ $value }}",
|
|
1654
|
+
"propertyInDotNotation": false
|
|
1655
|
+
}
|
|
1656
|
+
},
|
|
1657
|
+
"displayOptions": {
|
|
1658
|
+
"show": {
|
|
1659
|
+
"resource": [
|
|
1660
|
+
"Swap"
|
|
1661
|
+
],
|
|
1662
|
+
"operation": [
|
|
1663
|
+
"Swap Permit 2 Get Price"
|
|
1664
|
+
]
|
|
1665
|
+
}
|
|
1666
|
+
}
|
|
1667
|
+
},
|
|
1668
|
+
{
|
|
1669
|
+
"displayName": "Excluded Sources",
|
|
1670
|
+
"name": "excludedSources",
|
|
1671
|
+
"description": "Liquidity sources e.g. Uniswap_V3, SushiSwap, 0x_RFQ to exclude from the provided quote. See https://api.0x.org/sources?chainId=<chain_id> with the desired chain's ID for a full list of sources. Separate multiple sources with a comma",
|
|
1672
|
+
"default": "",
|
|
1673
|
+
"type": "string",
|
|
1674
|
+
"routing": {
|
|
1675
|
+
"send": {
|
|
1676
|
+
"type": "query",
|
|
1677
|
+
"property": "excludedSources",
|
|
1678
|
+
"value": "={{ $value }}",
|
|
1679
|
+
"propertyInDotNotation": false
|
|
1680
|
+
}
|
|
1681
|
+
},
|
|
1682
|
+
"displayOptions": {
|
|
1683
|
+
"show": {
|
|
1684
|
+
"resource": [
|
|
1685
|
+
"Swap"
|
|
1686
|
+
],
|
|
1687
|
+
"operation": [
|
|
1688
|
+
"Swap Permit 2 Get Price"
|
|
1689
|
+
]
|
|
1690
|
+
}
|
|
1691
|
+
}
|
|
1692
|
+
},
|
|
1693
|
+
{
|
|
1694
|
+
"displayName": "Sell Entire Balance",
|
|
1695
|
+
"name": "sellEntireBalance",
|
|
1696
|
+
"description": "If set to `true`, the taker's entire `sellToken` balance will be sold during trade execution. The `sellAmount` should be the maximum estimated value, as close as possible to the actual taker's balance to ensure the best routing. Selling more than the `sellAmount` may cause the trade to revert. This feature is designed for cases where the precise sell amount is determined during execution. Learn more [here](https://docs.0x.org/docs/0x-swap-api/additional-topics/sell-entire-balance).",
|
|
1697
|
+
"default": "false",
|
|
1698
|
+
"type": "options",
|
|
1699
|
+
"options": [
|
|
1700
|
+
{
|
|
1701
|
+
"name": "True",
|
|
1702
|
+
"value": "true"
|
|
1703
|
+
},
|
|
1704
|
+
{
|
|
1705
|
+
"name": "False",
|
|
1706
|
+
"value": "false"
|
|
1707
|
+
}
|
|
1708
|
+
],
|
|
1709
|
+
"routing": {
|
|
1710
|
+
"send": {
|
|
1711
|
+
"type": "query",
|
|
1712
|
+
"property": "sellEntireBalance",
|
|
1713
|
+
"value": "={{ $value }}",
|
|
1714
|
+
"propertyInDotNotation": false
|
|
1715
|
+
}
|
|
1716
|
+
},
|
|
1717
|
+
"displayOptions": {
|
|
1718
|
+
"show": {
|
|
1719
|
+
"resource": [
|
|
1720
|
+
"Swap"
|
|
1721
|
+
],
|
|
1722
|
+
"operation": [
|
|
1723
|
+
"Swap Permit 2 Get Price"
|
|
1724
|
+
]
|
|
1725
|
+
}
|
|
1726
|
+
}
|
|
1727
|
+
},
|
|
1728
|
+
{
|
|
1729
|
+
"displayName": "Wrap Unwrap Mode",
|
|
1730
|
+
"name": "wrapUnwrapMode",
|
|
1731
|
+
"description": "Controls how native wrap/unwrap trades are executed. `direct` calls the wrapped-native token contract directly. `settler` routes wrap/unwrap through Settler or Allowance Holder for compatibility. Ignored for non-wrap/unwrap swaps. If omitted, `direct` mode is used.",
|
|
1732
|
+
"default": "",
|
|
1733
|
+
"type": "string",
|
|
1734
|
+
"routing": {
|
|
1735
|
+
"send": {
|
|
1736
|
+
"type": "query",
|
|
1737
|
+
"property": "wrapUnwrapMode",
|
|
1738
|
+
"value": "={{ $value }}",
|
|
1739
|
+
"propertyInDotNotation": false
|
|
1740
|
+
}
|
|
1741
|
+
},
|
|
1742
|
+
"displayOptions": {
|
|
1743
|
+
"show": {
|
|
1744
|
+
"resource": [
|
|
1745
|
+
"Swap"
|
|
1746
|
+
],
|
|
1747
|
+
"operation": [
|
|
1748
|
+
"Swap Permit 2 Get Price"
|
|
1749
|
+
]
|
|
1750
|
+
}
|
|
1751
|
+
}
|
|
1752
|
+
},
|
|
1753
|
+
{
|
|
1754
|
+
"displayName": "GET /swap/permit2/quote",
|
|
1755
|
+
"name": "operation",
|
|
1756
|
+
"type": "notice",
|
|
1757
|
+
"typeOptions": {
|
|
1758
|
+
"theme": "info"
|
|
1759
|
+
},
|
|
1760
|
+
"default": "",
|
|
1761
|
+
"displayOptions": {
|
|
1762
|
+
"show": {
|
|
1763
|
+
"resource": [
|
|
1764
|
+
"Swap"
|
|
1765
|
+
],
|
|
1766
|
+
"operation": [
|
|
1767
|
+
"Swap Permit 2 Get Quote"
|
|
1768
|
+
]
|
|
1769
|
+
}
|
|
1770
|
+
}
|
|
1771
|
+
},
|
|
1772
|
+
{
|
|
1773
|
+
"displayName": "0 X Api Key",
|
|
1774
|
+
"name": "0x-api-key",
|
|
1775
|
+
"required": true,
|
|
1776
|
+
"description": "Visit dashboard.0x.org to get your API Key",
|
|
1777
|
+
"default": "",
|
|
1778
|
+
"type": "string",
|
|
1779
|
+
"routing": {
|
|
1780
|
+
"request": {
|
|
1781
|
+
"headers": {
|
|
1782
|
+
"0x-api-key": "={{ $value }}"
|
|
1783
|
+
}
|
|
1784
|
+
}
|
|
1785
|
+
},
|
|
1786
|
+
"displayOptions": {
|
|
1787
|
+
"show": {
|
|
1788
|
+
"resource": [
|
|
1789
|
+
"Swap"
|
|
1790
|
+
],
|
|
1791
|
+
"operation": [
|
|
1792
|
+
"Swap Permit 2 Get Quote"
|
|
1793
|
+
]
|
|
1794
|
+
}
|
|
1795
|
+
}
|
|
1796
|
+
},
|
|
1797
|
+
{
|
|
1798
|
+
"displayName": "0 X Version",
|
|
1799
|
+
"name": "0x-version",
|
|
1800
|
+
"required": true,
|
|
1801
|
+
"description": "API version",
|
|
1802
|
+
"default": "v2",
|
|
1803
|
+
"type": "string",
|
|
1804
|
+
"routing": {
|
|
1805
|
+
"request": {
|
|
1806
|
+
"headers": {
|
|
1807
|
+
"0x-version": "={{ $value }}"
|
|
1808
|
+
}
|
|
1809
|
+
}
|
|
1810
|
+
},
|
|
1811
|
+
"displayOptions": {
|
|
1812
|
+
"show": {
|
|
1813
|
+
"resource": [
|
|
1814
|
+
"Swap"
|
|
1815
|
+
],
|
|
1816
|
+
"operation": [
|
|
1817
|
+
"Swap Permit 2 Get Quote"
|
|
1818
|
+
]
|
|
1819
|
+
}
|
|
1820
|
+
}
|
|
1821
|
+
},
|
|
1822
|
+
{
|
|
1823
|
+
"displayName": "Chain Id",
|
|
1824
|
+
"name": "chainId",
|
|
1825
|
+
"required": true,
|
|
1826
|
+
"description": "Chain ID. See [here](https://docs.0x.org/docs/introduction/supported-chains) for the list of supported chains",
|
|
1827
|
+
"default": 1,
|
|
1828
|
+
"type": "number",
|
|
1829
|
+
"routing": {
|
|
1830
|
+
"send": {
|
|
1831
|
+
"type": "query",
|
|
1832
|
+
"property": "chainId",
|
|
1833
|
+
"value": "={{ $value }}",
|
|
1834
|
+
"propertyInDotNotation": false
|
|
1835
|
+
}
|
|
1836
|
+
},
|
|
1837
|
+
"displayOptions": {
|
|
1838
|
+
"show": {
|
|
1839
|
+
"resource": [
|
|
1840
|
+
"Swap"
|
|
1841
|
+
],
|
|
1842
|
+
"operation": [
|
|
1843
|
+
"Swap Permit 2 Get Quote"
|
|
1844
|
+
]
|
|
1845
|
+
}
|
|
1846
|
+
}
|
|
1847
|
+
},
|
|
1848
|
+
{
|
|
1849
|
+
"displayName": "Buy Token",
|
|
1850
|
+
"name": "buyToken",
|
|
1851
|
+
"required": true,
|
|
1852
|
+
"description": "The contract address of the token to buy",
|
|
1853
|
+
"default": "0xdac17f958d2ee523a2206206994597c13d831ec7",
|
|
1854
|
+
"type": "string",
|
|
1855
|
+
"routing": {
|
|
1856
|
+
"send": {
|
|
1857
|
+
"type": "query",
|
|
1858
|
+
"property": "buyToken",
|
|
1859
|
+
"value": "={{ $value }}",
|
|
1860
|
+
"propertyInDotNotation": false
|
|
1861
|
+
}
|
|
1862
|
+
},
|
|
1863
|
+
"displayOptions": {
|
|
1864
|
+
"show": {
|
|
1865
|
+
"resource": [
|
|
1866
|
+
"Swap"
|
|
1867
|
+
],
|
|
1868
|
+
"operation": [
|
|
1869
|
+
"Swap Permit 2 Get Quote"
|
|
1870
|
+
]
|
|
1871
|
+
}
|
|
1872
|
+
}
|
|
1873
|
+
},
|
|
1874
|
+
{
|
|
1875
|
+
"displayName": "Sell Token",
|
|
1876
|
+
"name": "sellToken",
|
|
1877
|
+
"required": true,
|
|
1878
|
+
"description": "The contract address of the token to sell",
|
|
1879
|
+
"default": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
|
|
1880
|
+
"type": "string",
|
|
1881
|
+
"routing": {
|
|
1882
|
+
"send": {
|
|
1883
|
+
"type": "query",
|
|
1884
|
+
"property": "sellToken",
|
|
1885
|
+
"value": "={{ $value }}",
|
|
1886
|
+
"propertyInDotNotation": false
|
|
1887
|
+
}
|
|
1888
|
+
},
|
|
1889
|
+
"displayOptions": {
|
|
1890
|
+
"show": {
|
|
1891
|
+
"resource": [
|
|
1892
|
+
"Swap"
|
|
1893
|
+
],
|
|
1894
|
+
"operation": [
|
|
1895
|
+
"Swap Permit 2 Get Quote"
|
|
1896
|
+
]
|
|
1897
|
+
}
|
|
1898
|
+
}
|
|
1899
|
+
},
|
|
1900
|
+
{
|
|
1901
|
+
"displayName": "Sell Amount",
|
|
1902
|
+
"name": "sellAmount",
|
|
1903
|
+
"description": "The amount of `sellToken` in `sellToken` base units to sell",
|
|
1904
|
+
"default": "100000000",
|
|
1905
|
+
"type": "string",
|
|
1906
|
+
"routing": {
|
|
1907
|
+
"send": {
|
|
1908
|
+
"type": "query",
|
|
1909
|
+
"property": "sellAmount",
|
|
1910
|
+
"value": "={{ $value }}",
|
|
1911
|
+
"propertyInDotNotation": false
|
|
1912
|
+
}
|
|
1913
|
+
},
|
|
1914
|
+
"displayOptions": {
|
|
1915
|
+
"show": {
|
|
1916
|
+
"resource": [
|
|
1917
|
+
"Swap"
|
|
1918
|
+
],
|
|
1919
|
+
"operation": [
|
|
1920
|
+
"Swap Permit 2 Get Quote"
|
|
1921
|
+
]
|
|
1922
|
+
}
|
|
1923
|
+
}
|
|
1924
|
+
},
|
|
1925
|
+
{
|
|
1926
|
+
"displayName": "Buy Amount",
|
|
1927
|
+
"name": "buyAmount",
|
|
1928
|
+
"description": "The exact amount of `buyToken` in `buyToken` base units to buy",
|
|
1929
|
+
"default": "",
|
|
1930
|
+
"type": "string",
|
|
1931
|
+
"routing": {
|
|
1932
|
+
"send": {
|
|
1933
|
+
"type": "query",
|
|
1934
|
+
"property": "buyAmount",
|
|
1935
|
+
"value": "={{ $value }}",
|
|
1936
|
+
"propertyInDotNotation": false
|
|
1937
|
+
}
|
|
1938
|
+
},
|
|
1939
|
+
"displayOptions": {
|
|
1940
|
+
"show": {
|
|
1941
|
+
"resource": [
|
|
1942
|
+
"Swap"
|
|
1943
|
+
],
|
|
1944
|
+
"operation": [
|
|
1945
|
+
"Swap Permit 2 Get Quote"
|
|
1946
|
+
]
|
|
1947
|
+
}
|
|
1948
|
+
}
|
|
1949
|
+
},
|
|
1950
|
+
{
|
|
1951
|
+
"displayName": "Taker",
|
|
1952
|
+
"name": "taker",
|
|
1953
|
+
"required": true,
|
|
1954
|
+
"description": "The address which holds the `sellToken` balance and has the allowance set for the swap",
|
|
1955
|
+
"default": "0x70a9f34f9b34c64957b9c401a97bfed35b95049e",
|
|
1956
|
+
"type": "string",
|
|
1957
|
+
"routing": {
|
|
1958
|
+
"send": {
|
|
1959
|
+
"type": "query",
|
|
1960
|
+
"property": "taker",
|
|
1961
|
+
"value": "={{ $value }}",
|
|
1962
|
+
"propertyInDotNotation": false
|
|
1963
|
+
}
|
|
1964
|
+
},
|
|
1965
|
+
"displayOptions": {
|
|
1966
|
+
"show": {
|
|
1967
|
+
"resource": [
|
|
1968
|
+
"Swap"
|
|
1969
|
+
],
|
|
1970
|
+
"operation": [
|
|
1971
|
+
"Swap Permit 2 Get Quote"
|
|
1972
|
+
]
|
|
1973
|
+
}
|
|
1974
|
+
}
|
|
1975
|
+
},
|
|
1976
|
+
{
|
|
1977
|
+
"displayName": "Tx Origin",
|
|
1978
|
+
"name": "txOrigin",
|
|
1979
|
+
"description": "The address of the external account that started the transaction. This is only needed if `taker` is a smart contract.",
|
|
1980
|
+
"default": "",
|
|
1981
|
+
"type": "string",
|
|
1982
|
+
"routing": {
|
|
1983
|
+
"send": {
|
|
1984
|
+
"type": "query",
|
|
1985
|
+
"property": "txOrigin",
|
|
1986
|
+
"value": "={{ $value }}",
|
|
1987
|
+
"propertyInDotNotation": false
|
|
1988
|
+
}
|
|
1989
|
+
},
|
|
1990
|
+
"displayOptions": {
|
|
1991
|
+
"show": {
|
|
1992
|
+
"resource": [
|
|
1993
|
+
"Swap"
|
|
1994
|
+
],
|
|
1995
|
+
"operation": [
|
|
1996
|
+
"Swap Permit 2 Get Quote"
|
|
1997
|
+
]
|
|
1998
|
+
}
|
|
1999
|
+
}
|
|
2000
|
+
},
|
|
2001
|
+
{
|
|
2002
|
+
"displayName": "Recipient",
|
|
2003
|
+
"name": "recipient",
|
|
2004
|
+
"description": "The address to receive the `buyToken`. If not provided, defaults to the taker address. Not supported for wrap/unwrap operations.",
|
|
2005
|
+
"default": "",
|
|
2006
|
+
"type": "string",
|
|
2007
|
+
"routing": {
|
|
2008
|
+
"send": {
|
|
2009
|
+
"type": "query",
|
|
2010
|
+
"property": "recipient",
|
|
2011
|
+
"value": "={{ $value }}",
|
|
2012
|
+
"propertyInDotNotation": false
|
|
2013
|
+
}
|
|
2014
|
+
},
|
|
2015
|
+
"displayOptions": {
|
|
2016
|
+
"show": {
|
|
2017
|
+
"resource": [
|
|
2018
|
+
"Swap"
|
|
2019
|
+
],
|
|
2020
|
+
"operation": [
|
|
2021
|
+
"Swap Permit 2 Get Quote"
|
|
2022
|
+
]
|
|
2023
|
+
}
|
|
2024
|
+
}
|
|
2025
|
+
},
|
|
2026
|
+
{
|
|
2027
|
+
"displayName": "Swap Fee Recipient",
|
|
2028
|
+
"name": "swapFeeRecipient",
|
|
2029
|
+
"description": "The wallet address to receive the specified trading fees (supports single or multiple comma-separated values). You must also specify the `swapFeeBps` in the request to use this feature. When multiple values are provided, must match length of `swapFeeBps`.",
|
|
2030
|
+
"default": "",
|
|
2031
|
+
"type": "string",
|
|
2032
|
+
"routing": {
|
|
2033
|
+
"send": {
|
|
2034
|
+
"type": "query",
|
|
2035
|
+
"property": "swapFeeRecipient",
|
|
2036
|
+
"value": "={{ $value }}",
|
|
2037
|
+
"propertyInDotNotation": false
|
|
2038
|
+
}
|
|
2039
|
+
},
|
|
2040
|
+
"displayOptions": {
|
|
2041
|
+
"show": {
|
|
2042
|
+
"resource": [
|
|
2043
|
+
"Swap"
|
|
2044
|
+
],
|
|
2045
|
+
"operation": [
|
|
2046
|
+
"Swap Permit 2 Get Quote"
|
|
2047
|
+
]
|
|
2048
|
+
}
|
|
2049
|
+
}
|
|
2050
|
+
},
|
|
2051
|
+
{
|
|
2052
|
+
"displayName": "Swap Fee Bps",
|
|
2053
|
+
"name": "swapFeeBps",
|
|
2054
|
+
"description": "The amount in Bps of the `swapFeeToken` to charge and deliver to the `swapFeeRecipient` (supports single or multiple comma-separated values). You must also specify the `swapFeeRecipient` in the request to use this feature. For security, this field has a default limit of 1000 Bps. If your application requires a higher value, please reach out to us.",
|
|
2055
|
+
"default": "",
|
|
2056
|
+
"type": "string",
|
|
2057
|
+
"routing": {
|
|
2058
|
+
"send": {
|
|
2059
|
+
"type": "query",
|
|
2060
|
+
"property": "swapFeeBps",
|
|
2061
|
+
"value": "={{ $value }}",
|
|
2062
|
+
"propertyInDotNotation": false
|
|
2063
|
+
}
|
|
2064
|
+
},
|
|
2065
|
+
"displayOptions": {
|
|
2066
|
+
"show": {
|
|
2067
|
+
"resource": [
|
|
2068
|
+
"Swap"
|
|
2069
|
+
],
|
|
2070
|
+
"operation": [
|
|
2071
|
+
"Swap Permit 2 Get Quote"
|
|
2072
|
+
]
|
|
2073
|
+
}
|
|
2074
|
+
}
|
|
2075
|
+
},
|
|
2076
|
+
{
|
|
2077
|
+
"displayName": "Swap Fee Token",
|
|
2078
|
+
"name": "swapFeeToken",
|
|
2079
|
+
"description": "The contract address of the token to receive trading fees in (supports single or multiple comma-separated values). Each token must be set to the value of either the `buyToken` or the `sellToken`. If omitted, the fee token will be determined by 0x with preference to stablecoins and highly liquid assets. You must also specify the `swapFeeRecipient` and `swapFeeBps` to charge integrator fees. When multiple values are provided, must match length of `swapFeeBps`.",
|
|
2080
|
+
"default": "",
|
|
2081
|
+
"type": "string",
|
|
2082
|
+
"routing": {
|
|
2083
|
+
"send": {
|
|
2084
|
+
"type": "query",
|
|
2085
|
+
"property": "swapFeeToken",
|
|
2086
|
+
"value": "={{ $value }}",
|
|
2087
|
+
"propertyInDotNotation": false
|
|
2088
|
+
}
|
|
2089
|
+
},
|
|
2090
|
+
"displayOptions": {
|
|
2091
|
+
"show": {
|
|
2092
|
+
"resource": [
|
|
2093
|
+
"Swap"
|
|
2094
|
+
],
|
|
2095
|
+
"operation": [
|
|
2096
|
+
"Swap Permit 2 Get Quote"
|
|
2097
|
+
]
|
|
2098
|
+
}
|
|
2099
|
+
}
|
|
2100
|
+
},
|
|
2101
|
+
{
|
|
2102
|
+
"displayName": "Trade Surplus Recipient",
|
|
2103
|
+
"name": "tradeSurplusRecipient",
|
|
2104
|
+
"description": "The address to receive any trade surplus. If specified, this address will receive trade surplus when applicable. Otherwise, the taker will receive the surplus. This feature is only available to selected integrators on a custom pricing plan. In other cases, the surplus will be collected by 0x. For assistance with a custom plan, please contact support.",
|
|
2105
|
+
"default": "",
|
|
2106
|
+
"type": "string",
|
|
2107
|
+
"routing": {
|
|
2108
|
+
"send": {
|
|
2109
|
+
"type": "query",
|
|
2110
|
+
"property": "tradeSurplusRecipient",
|
|
2111
|
+
"value": "={{ $value }}",
|
|
2112
|
+
"propertyInDotNotation": false
|
|
2113
|
+
}
|
|
2114
|
+
},
|
|
2115
|
+
"displayOptions": {
|
|
2116
|
+
"show": {
|
|
2117
|
+
"resource": [
|
|
2118
|
+
"Swap"
|
|
2119
|
+
],
|
|
2120
|
+
"operation": [
|
|
2121
|
+
"Swap Permit 2 Get Quote"
|
|
2122
|
+
]
|
|
2123
|
+
}
|
|
2124
|
+
}
|
|
2125
|
+
},
|
|
2126
|
+
{
|
|
2127
|
+
"displayName": "Trade Surplus Max Bps",
|
|
2128
|
+
"name": "tradeSurplusMaxBps",
|
|
2129
|
+
"description": "The maximum trade surplus (positive slippage) that can be collected in Bps of the buy amount. If not provided, defaults to 10000 (100%). Must be used together with `tradeSurplusRecipient`.",
|
|
2130
|
+
"default": 0,
|
|
2131
|
+
"type": "number",
|
|
2132
|
+
"routing": {
|
|
2133
|
+
"send": {
|
|
2134
|
+
"type": "query",
|
|
2135
|
+
"property": "tradeSurplusMaxBps",
|
|
2136
|
+
"value": "={{ $value }}",
|
|
2137
|
+
"propertyInDotNotation": false
|
|
2138
|
+
}
|
|
2139
|
+
},
|
|
2140
|
+
"displayOptions": {
|
|
2141
|
+
"show": {
|
|
2142
|
+
"resource": [
|
|
2143
|
+
"Swap"
|
|
2144
|
+
],
|
|
2145
|
+
"operation": [
|
|
2146
|
+
"Swap Permit 2 Get Quote"
|
|
2147
|
+
]
|
|
2148
|
+
}
|
|
2149
|
+
}
|
|
2150
|
+
},
|
|
2151
|
+
{
|
|
2152
|
+
"displayName": "Gas Price",
|
|
2153
|
+
"name": "gasPrice",
|
|
2154
|
+
"description": "The target gas price (in wei) for the swap transaction. If not provided, the default value is based on the 0x gas price oracle",
|
|
2155
|
+
"default": "",
|
|
2156
|
+
"type": "string",
|
|
2157
|
+
"routing": {
|
|
2158
|
+
"send": {
|
|
2159
|
+
"type": "query",
|
|
2160
|
+
"property": "gasPrice",
|
|
2161
|
+
"value": "={{ $value }}",
|
|
2162
|
+
"propertyInDotNotation": false
|
|
2163
|
+
}
|
|
2164
|
+
},
|
|
2165
|
+
"displayOptions": {
|
|
2166
|
+
"show": {
|
|
2167
|
+
"resource": [
|
|
2168
|
+
"Swap"
|
|
2169
|
+
],
|
|
2170
|
+
"operation": [
|
|
2171
|
+
"Swap Permit 2 Get Quote"
|
|
2172
|
+
]
|
|
2173
|
+
}
|
|
2174
|
+
}
|
|
2175
|
+
},
|
|
2176
|
+
{
|
|
2177
|
+
"displayName": "Slippage Bps",
|
|
2178
|
+
"name": "slippageBps",
|
|
2179
|
+
"description": "The maximum acceptable slippage of the `buyToken` in Bps. If this parameter is set to 0, no slippage will be tolerated. If not provided, the default slippage tolerance is 100Bps",
|
|
2180
|
+
"default": 0,
|
|
2181
|
+
"type": "number",
|
|
2182
|
+
"routing": {
|
|
2183
|
+
"send": {
|
|
2184
|
+
"type": "query",
|
|
2185
|
+
"property": "slippageBps",
|
|
2186
|
+
"value": "={{ $value }}",
|
|
2187
|
+
"propertyInDotNotation": false
|
|
2188
|
+
}
|
|
2189
|
+
},
|
|
2190
|
+
"displayOptions": {
|
|
2191
|
+
"show": {
|
|
2192
|
+
"resource": [
|
|
2193
|
+
"Swap"
|
|
2194
|
+
],
|
|
2195
|
+
"operation": [
|
|
2196
|
+
"Swap Permit 2 Get Quote"
|
|
2197
|
+
]
|
|
2198
|
+
}
|
|
2199
|
+
}
|
|
2200
|
+
},
|
|
2201
|
+
{
|
|
2202
|
+
"displayName": "Slippage Ppm",
|
|
2203
|
+
"name": "slippagePpm",
|
|
2204
|
+
"description": "The maximum acceptable slippage of the `buyToken` in parts-per-million (PPM). Mutually exclusive with `slippageBps`. e.g. 3000 PPM = 30 BPS = 0.30%.",
|
|
2205
|
+
"default": 0,
|
|
2206
|
+
"type": "number",
|
|
2207
|
+
"routing": {
|
|
2208
|
+
"send": {
|
|
2209
|
+
"type": "query",
|
|
2210
|
+
"property": "slippagePpm",
|
|
2211
|
+
"value": "={{ $value }}",
|
|
2212
|
+
"propertyInDotNotation": false
|
|
2213
|
+
}
|
|
2214
|
+
},
|
|
2215
|
+
"displayOptions": {
|
|
2216
|
+
"show": {
|
|
2217
|
+
"resource": [
|
|
2218
|
+
"Swap"
|
|
2219
|
+
],
|
|
2220
|
+
"operation": [
|
|
2221
|
+
"Swap Permit 2 Get Quote"
|
|
2222
|
+
]
|
|
2223
|
+
}
|
|
2224
|
+
}
|
|
2225
|
+
},
|
|
2226
|
+
{
|
|
2227
|
+
"displayName": "Excluded Sources",
|
|
2228
|
+
"name": "excludedSources",
|
|
2229
|
+
"description": "Liquidity sources e.g. Uniswap_V3, SushiSwap, 0x_RFQ to exclude from the provided quote. `See https://api.0x.org/sources?chainId=<chain_id>` with the desired chain's ID for a full list of sources. Separate multiple sources with a comma",
|
|
2230
|
+
"default": "",
|
|
2231
|
+
"type": "string",
|
|
2232
|
+
"routing": {
|
|
2233
|
+
"send": {
|
|
2234
|
+
"type": "query",
|
|
2235
|
+
"property": "excludedSources",
|
|
2236
|
+
"value": "={{ $value }}",
|
|
2237
|
+
"propertyInDotNotation": false
|
|
2238
|
+
}
|
|
2239
|
+
},
|
|
2240
|
+
"displayOptions": {
|
|
2241
|
+
"show": {
|
|
2242
|
+
"resource": [
|
|
2243
|
+
"Swap"
|
|
2244
|
+
],
|
|
2245
|
+
"operation": [
|
|
2246
|
+
"Swap Permit 2 Get Quote"
|
|
2247
|
+
]
|
|
2248
|
+
}
|
|
2249
|
+
}
|
|
2250
|
+
},
|
|
2251
|
+
{
|
|
2252
|
+
"displayName": "Sell Entire Balance",
|
|
2253
|
+
"name": "sellEntireBalance",
|
|
2254
|
+
"description": "If set to `true`, the taker's entire `sellToken` balance will be sold during trade execution. The `sellAmount` should be the maximum estimated value, as close as possible to the actual taker's balance to ensure the best routing. Selling more than the `sellAmount` may cause the trade to revert. This feature is designed for cases where the precise sell amount is determined during execution. Learn more [here](https://docs.0x.org/docs/0x-swap-api/additional-topics/sell-entire-balance).",
|
|
2255
|
+
"default": "false",
|
|
2256
|
+
"type": "options",
|
|
2257
|
+
"options": [
|
|
2258
|
+
{
|
|
2259
|
+
"name": "True",
|
|
2260
|
+
"value": "true"
|
|
2261
|
+
},
|
|
2262
|
+
{
|
|
2263
|
+
"name": "False",
|
|
2264
|
+
"value": "false"
|
|
2265
|
+
}
|
|
2266
|
+
],
|
|
2267
|
+
"routing": {
|
|
2268
|
+
"send": {
|
|
2269
|
+
"type": "query",
|
|
2270
|
+
"property": "sellEntireBalance",
|
|
2271
|
+
"value": "={{ $value }}",
|
|
2272
|
+
"propertyInDotNotation": false
|
|
2273
|
+
}
|
|
2274
|
+
},
|
|
2275
|
+
"displayOptions": {
|
|
2276
|
+
"show": {
|
|
2277
|
+
"resource": [
|
|
2278
|
+
"Swap"
|
|
2279
|
+
],
|
|
2280
|
+
"operation": [
|
|
2281
|
+
"Swap Permit 2 Get Quote"
|
|
2282
|
+
]
|
|
2283
|
+
}
|
|
2284
|
+
}
|
|
2285
|
+
},
|
|
2286
|
+
{
|
|
2287
|
+
"displayName": "Wrap Unwrap Mode",
|
|
2288
|
+
"name": "wrapUnwrapMode",
|
|
2289
|
+
"description": "Controls how native wrap/unwrap trades are executed. `direct` calls the wrapped-native token contract directly. `settler` routes wrap/unwrap through Settler or Allowance Holder for compatibility. Ignored for non-wrap/unwrap swaps. If omitted, `direct` mode is used.",
|
|
2290
|
+
"default": "",
|
|
2291
|
+
"type": "string",
|
|
2292
|
+
"routing": {
|
|
2293
|
+
"send": {
|
|
2294
|
+
"type": "query",
|
|
2295
|
+
"property": "wrapUnwrapMode",
|
|
2296
|
+
"value": "={{ $value }}",
|
|
2297
|
+
"propertyInDotNotation": false
|
|
2298
|
+
}
|
|
2299
|
+
},
|
|
2300
|
+
"displayOptions": {
|
|
2301
|
+
"show": {
|
|
2302
|
+
"resource": [
|
|
2303
|
+
"Swap"
|
|
2304
|
+
],
|
|
2305
|
+
"operation": [
|
|
2306
|
+
"Swap Permit 2 Get Quote"
|
|
2307
|
+
]
|
|
2308
|
+
}
|
|
2309
|
+
}
|
|
2310
|
+
},
|
|
2311
|
+
{
|
|
2312
|
+
"displayName": "GET /swap/chains",
|
|
2313
|
+
"name": "operation",
|
|
2314
|
+
"type": "notice",
|
|
2315
|
+
"typeOptions": {
|
|
2316
|
+
"theme": "info"
|
|
2317
|
+
},
|
|
2318
|
+
"default": "",
|
|
2319
|
+
"displayOptions": {
|
|
2320
|
+
"show": {
|
|
2321
|
+
"resource": [
|
|
2322
|
+
"Swap"
|
|
2323
|
+
],
|
|
2324
|
+
"operation": [
|
|
2325
|
+
"Swap Chains"
|
|
2326
|
+
]
|
|
2327
|
+
}
|
|
2328
|
+
}
|
|
2329
|
+
},
|
|
2330
|
+
{
|
|
2331
|
+
"displayName": "0 X Api Key",
|
|
2332
|
+
"name": "0x-api-key",
|
|
2333
|
+
"required": true,
|
|
2334
|
+
"description": "Visit dashboard.0x.org to get your API Key",
|
|
2335
|
+
"default": "",
|
|
2336
|
+
"type": "string",
|
|
2337
|
+
"routing": {
|
|
2338
|
+
"request": {
|
|
2339
|
+
"headers": {
|
|
2340
|
+
"0x-api-key": "={{ $value }}"
|
|
2341
|
+
}
|
|
2342
|
+
}
|
|
2343
|
+
},
|
|
2344
|
+
"displayOptions": {
|
|
2345
|
+
"show": {
|
|
2346
|
+
"resource": [
|
|
2347
|
+
"Swap"
|
|
2348
|
+
],
|
|
2349
|
+
"operation": [
|
|
2350
|
+
"Swap Chains"
|
|
2351
|
+
]
|
|
2352
|
+
}
|
|
2353
|
+
}
|
|
2354
|
+
},
|
|
2355
|
+
{
|
|
2356
|
+
"displayName": "0 X Version",
|
|
2357
|
+
"name": "0x-version",
|
|
2358
|
+
"required": true,
|
|
2359
|
+
"description": "API version",
|
|
2360
|
+
"default": "v2",
|
|
2361
|
+
"type": "string",
|
|
2362
|
+
"routing": {
|
|
2363
|
+
"request": {
|
|
2364
|
+
"headers": {
|
|
2365
|
+
"0x-version": "={{ $value }}"
|
|
2366
|
+
}
|
|
2367
|
+
}
|
|
2368
|
+
},
|
|
2369
|
+
"displayOptions": {
|
|
2370
|
+
"show": {
|
|
2371
|
+
"resource": [
|
|
2372
|
+
"Swap"
|
|
2373
|
+
],
|
|
2374
|
+
"operation": [
|
|
2375
|
+
"Swap Chains"
|
|
2376
|
+
]
|
|
2377
|
+
}
|
|
2378
|
+
}
|
|
2379
|
+
},
|
|
2380
|
+
];
|
|
2381
|
+
//# sourceMappingURL=index.js.map
|