CEX-DEX API

Introducing the CEX-DEX API on EISEN Finance.

Product feature

Eisen Finance is your go-to source for comprehensive price charts, covering crypto pairs from both CEXs and DEXs. Our user-friendly DeFi trading features simplify decision-making.

In the pipeline, we're gearing up to introduce spot/derivative market trades on CEXs through our platform, ensuring seamless access to CEX liquidity and enabling users to implement a diverse range of trading strategies with speed and efficiency.

CEX-DEX Chart

  1. The Meaning of the Vertical Axis (Price) The chart displays the 'base token' against the 'quote token'. The price on the vertical axis shows how many quote tokens you get for one base token. The horizontal axis represents time. In this example, ETH is the base token and USD is the quote token.

  2. Select Comparison between Chains or Exchanges By clicking the button, you can toggle the view for specific chains or exchanges.

  3. Choose the Base-Quote Token Pair You can switch between different token pairs by choosing from the list displayed.

  4. Choose the Window Size You can also adjust the window size to see market trends better.

Check the Actual Price of the Chart

As the price varies with the swapped amount, you can compare rates on the charts and the given exchange rate. See the pricing methods below. You can also hover over the chart to save a specific price.

Pricing methods(CEX)

In CEX, there can be a spread between the best ask and the best bid. For clarity, we average the CEX limit order prices in our database to display trends to users.

In this case, the price of ETH is 1595.25+1595.242\frac{1595.25+1595.24}{2}

Note: Access to the top 5 ask and top 5 bid order books will be released to the pro version.

Pricing methods(DEX)

In DEX, when conducting larger trades, like market orders, slippage can occur. This means you may end up paying a higher price than the current market rate due to the lack of sufficient liquidity.

Imagine you're swapping for an Eisen token(IZN) in our platform.

  1. If you spend $100 USDC and receive 50 IZN tokens, then the average price is $2.

  2. But, if you only spend $10 and get 10 IZN tokens, then the average price is $1.

The ratio p100p10\frac{p_{100}}{p_{10}} represents the disparity between these effective prices. The higher this ratio, the greater the price impact which means a low liquidity condition.

If the ratio is less than 5, we consider p100p_{100} as the representative price. However, if the ratio is 5 or greater, it suggests that the liquidity might be insufficient. In such cases, we determine the price by swapping an amount of the token equal to 0.010.01IZNIZN(=0.01p10)(=\frac{0.01}{p_{10}}) for USDC and recording the exchange rate as the effective price.

In short, if the price ratio is under 5, we use the bulk price(p100p_{100}) as our benchmark. If not, it indicates a token shortage, so we'll swap a small amount of tokens for USDC to determine its value.

Last updated