backtest_lp_strategy

GET http://api.fibonacci.fi/backtest_lp_strategy/{chain}/{poolid}/{overXlastdays}/{lower_bound_price}/{upper_bound_price}

This API can be used to backtest concentrated-liquidity provision strategies for Uniswap V3. Takes into account real executed trades, also provides a P&L attribution by risk factors

Path Parameters

NameTypeDescription

chain*

String

indicates the blockchain network to use (only ETH Uniswap v3 supported so far)

poolid*

String

indicates the uniswap v3 pool id to use for the backtesting (e.g. "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640", corresponds to ethusdc)

timeperiod*

Integer

Indicates the number of days to perform the backtesting over

lower_bound_price*

String

Indicates the lower bound price to market make in (e.g. "1200")

upper_bound_price*

String

Indicates the upper bound price to market make in (e.g. "1900")

Example

Request

http://api.fibonacci.fi/backtest_lp_strategy/ETH/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640/20/1500/2000

Response

{"status": "Success", "msg": "Success", "elapsed_time": 10, "last_data_ts": 1686127743.5725336, "data": [{"Cumulated fees P&L contribution in % (LHS)": 0.009914169671401135, "P&L of the strategy in % (RHS)": 0.0, "IL P&L contribution in % (RHS)": 0.0, "Hodle strategy P&L in % (RHS)": 0.0}, {"Cumulated fees P&L contribution in % (LHS)": 0.012181832467168448, "P&L of the strategy in % (RHS)": -0.1303269356289718, "IL P&L contribution in % (RHS)": 0.2582570537178981, "Hodle strategy P&L in % (RHS)": -0.3908516521426435}, {"Cumulated fees P&L contribution in % (LHS)": 0.01327894319121446, "P&L of the strategy in % (RHS)": -0.5200814770475972, "IL P&L contribution in % (RHS)": -0.1833575549978974, "Hodle strategy P&L in % (RHS)": -0.3400886955695199}...

Last updated