simulate_manipulation

GET http://api.fibonacci.fi/simulate_manipulation/{chain}/{poolid}/{slippage_target}/{a_to_b}

This endpoint returns how much you need to sell / buy to move the price of the pool by given percentage, precised by the user. This endpoint only makes sense for stable pools (pools where token A and token B are stables)

Path Parameters

NameTypeDescription

chain*

String

indicates the blockchain network to use ("ETH", "SOL")

poolid*

String

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

slippage_target*

Integer

Indicates the target impact to achieve, in %. (17 means 17%)

a_to_b*

String

Indicates if the amount to sell refers to tokenA or tokenB. Can be "true" or "false"

Example

Request

http://api.fibonacci.fi/simulate_manipulation/SOL/YAkoNb6HKmSxQN9L8hiBE5tPJRsniSSMzND1boHmZxe/60/true

Response

{{"status": 200, "msg": "Success", "elapsed_time": 10, "last_data_ts": 1696871178.2102835, 
"data": {"amount_needed_to_dump": 163842.4097531964, "isbroken": true, "last_composition": {"A_amt": 1696871098.0, "B_amt": 821677.080006, "ts": 1696871100},
 "meta": {"TokenAID": "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB", "TokenAName": "USDT", "TokenASymbol": "USDT", "TokenBID": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "TokenBName": "USD Coin", "TokenBSymbol": "USDC"}}}

Last updated