You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5d70235
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: references/api/api_core_concepts/trade-types.mdx
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ We recommend using `EXPECTED_OUTPUT` for when an exact output amount is not nece
20
20
21
21
## Exact Output
22
22
23
-
The third supported type is `EXACT_OUTPUT`. In this order type, the user specifies exactly how much of the output currency they want to receive from the swapor bridge.
24
-
The user is told how much of the origin token this will require to receive exactly the output amount. If the exact requested amount out cannot be filled, the request is failed and the user is refunded on origin.
23
+
The third supported type is `EXACT_OUTPUT`. In this order type, the user specifies exactly how much of the output currency they want to receive from the swap, bridge, or cross-chain call.
24
+
The user is told how much of the origin token this will require to receive exactly the output amount. If the exact requested amount out cannot be filled, the request is failed and the user is refunded on origin.
25
25
This trade type automatically accounts for any associated fees including relay fees, app fees, and gas fees.
26
-
We recommend using `EXACT_OUTPUT` for destination calls that require a precise output amount, like minting with an exact ERC20 amount. Destination calls also support `EXACT_INPUT` when you want to cap spend and accept a variable output.
26
+
We recommend using `EXACT_OUTPUT`when a precise output amount is required — for example, bridging an exact amount to a destination address, guaranteeing a merchant receives a specific payment amount, or executing a destination call that requires a fixed input such as minting with an exact ERC20 amount. Destination calls also support `EXACT_INPUT` when you want to cap spend and accept a variable output.
Copy file name to clipboardExpand all lines: references/api/api_guides/bridging-integration-guide.mdx
+20-1Lines changed: 20 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,8 +23,14 @@ While not mandatory for integration, doing the following will improve the UX for
23
23
## Get a Quote
24
24
Every action in Relay starts with a Quote, this includes bridging. The quote provides all necessary information including fees, transaction data, and execution steps. Use the [quote endpoint](/references/api/get-quote-v2) to request a bridge quote.
25
25
26
+
Relay supports three [trade types](/references/api/api_core_concepts/trade-types) for bridging:
27
+
28
+
-**`EXACT_INPUT`** — specify the amount you want to send; the output amount may vary based on fees and slippage.
29
+
-**`EXPECTED_OUTPUT`** — specify the approximate amount you want to receive; the input amount is calculated accordingly and the output may vary slightly due to slippage.
30
+
-**`EXACT_OUTPUT`** — specify the exact amount you want to receive; the input amount is calculated accordingly. If the exact output cannot be filled, the request fails and the user is refunded on the origin chain.
31
+
26
32
<CodeGroup>
27
-
```bashRequest
33
+
```bashEXACT_INPUT
28
34
curl -X POST "https://api.relay.link/quote/v2" \
29
35
-H "Content-Type: application/json" \
30
36
-d '{
@@ -37,6 +43,19 @@ While not mandatory for integration, doing the following will improve the UX for
0 commit comments