Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Add UNISWAP_V2 and UNISWAP_V2_ETH to sources #305

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 33 additions & 1 deletion mdx/api/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ When both are provided, `sellAmount` takes precedence over `buyAmount`.
| `slippagePercentage` | (Optional) The maximum acceptable slippage in % of the `buyToken` amount if `sellAmount` is provided, the maximum acceptable slippage in % of the `sellAmount` amount if `buyAmount` is provided. This parameter will change over time with market conditions. |
| `gasPrice` | (Optional, defaults to ethgasstation "fast") The target gas price (in wei) for the swap transaction. If the price is too low to achieve the quote, an error will be returned. |
| `takerAddress` | (Optional) The address which will fill the quote. When provided the gas will be estimated and returned. An eth_call will also be performed. If this fails a Revert Error will be returned in the response. |
| `excludedSources` | (Optional) Liquidity sources (`Eth2Dai`, `Uniswap`, `Kyber`, `0x`, `LiquidityProvider` etc) that will not be included in the provided quote. Ex: `excludedSources=Uniswap,Kyber,Eth2Dai`. See [here](https://github.com/0xProject/0x-monorepo/blob/development/packages/asset-swapper/src/utils/market_operation_utils/types.ts#L27) for a full list of sources |
| `excludedSources` | (Optional) Liquidity sources (`Eth2Dai`, `Uniswap`, `Kyber`, `0x`, `LiquidityProvider` etc) that will not be included in the provided quote. Ex: `excludedSources=Uniswap,Kyber,Eth2Dai`. See [here](https://github.com/0xProject/0x-monorepo/blob/development/packages/asset-swapper/src/utils/market_operation_utils/types.ts#L28) for a full list of sources |

### Response

Expand Down Expand Up @@ -231,6 +231,14 @@ Specify a `buyToken`, `sellToken` and either a `sellAmount` to get a simple quot
"name": "Uniswap",
"proportion": "0"
},
{
"name": "Uniswap_V2",
"proportion": "0"
},
{
"name": "Uniswap_V2_ETH",
"proportion": "0"
},
{
"name": "Eth2Dai",
"proportion": "0"
Expand Down Expand Up @@ -341,6 +349,14 @@ Supply a comma delimited list of liquidty source names to exclude them from the
"name": "Uniswap",
"proportion": "0"
},
{
"name": "Uniswap_V2",
"proportion": "0"
},
{
"name": "Uniswap_V2_ETH",
"proportion": "0"
},
{
"name": "Eth2Dai",
"proportion": "0"
Expand Down Expand Up @@ -434,6 +450,14 @@ Supply a `takerAddress` to use an [`eth_call`](https://github.com/ethereum/wiki/
"name": "Uniswap",
"proportion": "0"
},
{
"name": "Uniswap_V2",
"proportion": "0"
},
{
"name": "Uniswap_V2_ETH",
"proportion": "0"
},
{
"name": "Eth2Dai",
"proportion": "0"
Expand Down Expand Up @@ -562,6 +586,14 @@ Use "ETH" as the `sellToken` to receive a [Forwarder](/docs/guides/v3-forwarder-
"name": "Uniswap",
"proportion": "0"
},
{
"name": "Uniswap_V2",
"proportion": "0"
},
{
"name": "Uniswap_V2_ETH",
"proportion": "0"
},
{
"name": "Eth2Dai",
"proportion": "0"
Expand Down