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 }}
This repository was archived by the owner on Oct 11, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: mdx/guides/integrate-instant.mdx
+24-7Lines changed: 24 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Introduction
2
2
3
-
0x Instant is a product from the 0x core team that offers a convenient way for people to get access to a wide variety of tokens and other crypto-assets in just a few clicks. Developers can integrate the free, open source library into their applications or websites in order to both offer seamless access to crypto-assets, as well as gain a new source of revenue, with just a few lines of code.
3
+
0x Instant is a product built by 0x community that offers a convenient way for people to get access to a wide variety of tokens and other crypto-assets in just a few clicks. Developers can integrate the free, open source library into their applications or websites in order to both offer seamless access to crypto-assets, as well as gain a new source of revenue, with just a few lines of code.
@@ -15,7 +15,7 @@ Check out a live example on [mainnet](https://dexkit-storage.nyc3.digitaloceansp
15
15
16
16
## Libraries
17
17
18
-
0x Instant has the library `0x Instant UI component` that users will see and is powered by 0x API. Check out the `0x API` documentation [here](https://0x.org/docs/api).
18
+
0x Instant has the library `0x Instant UI component` that users will see and is powered by 0x API. Check out the `0x API` documentation [here](https://0x.org/docs/api). Check out the Instant Github repo [here](https://github.com/0xProject/0x-instant)
19
19
20
20
21
21
## Affiliate Fees
@@ -24,7 +24,7 @@ As an end host of 0x Instant, you can charge users a fee on all trades made thro
24
24
25
25
# UI Integration
26
26
27
-
The 0x Instant UI powered by 0x API are bundled together in a convenient JS package for you. You can either download and serve the package yourself, or use the CDN-hosted version from 0x.
27
+
The 0x Instant UI powered by 0x API are bundled together in a convenient JS package for you. You can either download and serve the package yourself, or use the CDN-hosted version from 0x community.
28
28
29
29
<CodeTabstabs={['html']}>
30
30
@@ -66,7 +66,7 @@ The 0x Instant UI powered by 0x API are bundled together in a convenient JS pack
66
66
|`defaultAmountTokenOut`| Pre-fill the amount of out tokens Defaults to 0. |
67
67
|`tokenList`| Token list url where to fetch the list of supported tokens |
68
68
|`chainId`| Chain Id of Ethereum network to connect to. Defaults to 1 (mainnet). |
69
-
|`affiliateInfo`| An object specifying what % ETH fee should be added to orders and where the fee should be sent. Max feePercentage is .05 (See examples below) |
69
+
|`affiliateInfo`| An object specifying what % Token fee on bought tokens should be added to orders and where the fee should be sent. Max feePercentage is .05 (See examples below) |
70
70
|`shouldDisableAnalyticsTracking`| An option to turn on / off analytics used to make Instant a better experience. Defaults to false. |
71
71
|`onSuccess`| a function handler that is called when the token purchase through 0x Instant is complete. The function handler requests one argument: the transaction hash. |
72
72
|`onClose`| a function handler that is called when the Instant overlay is closed. The function handler does not request any argument |
@@ -140,7 +140,7 @@ zeroExInstant.render(
140
140
141
141
# Learn about affiliate fees
142
142
143
-
As an end host of 0x Instant, you can charge users a fee on all trades made through Instant with the `affiliateFee` option. Simply specify an ethereum address and feePercentage (up to 5%), and a percentage of each transaction will be deposited into the specified address (denominated in bought tokens).
143
+
As an end host of 0x Instant, you can charge users a fee on all trades made through Instant with the `affiliateFee` option. Simply specify an ethereum address and feePercentage (up to 5%), and a percentage of each transaction will be deposited into the specified address (denominated in bought tokens). If no affiliate address is specified it defaults to zero address.
144
144
145
145
Example: 3% of transaction volume (in ETH) will be deposited into 0x50ff5828a216170cf224389f1c5b0301a5d0a230
146
146
@@ -180,6 +180,14 @@ Check out this [article](/docs/guides/web3-provider-explained) in the guides sec
0 commit comments