sharpe_ratio

GET http://api.fibonacci.fi/sharpe_ratio/{chain}/{type}/{poolid/coin1}/{timeperiod}/{granularity}

This module calculates the Sharpe ratio for a given LP token / regular token using historical data from the Fibonacci API and risk-free rate data from the FRED (Federal Reserve Economic Data).

Path Parameters

NameTypeDescription

chain*

String

Indicates the blockchain network to use (ETH or SOL)

type*

String

Indicates whether the asset is a "pool" or "token". Select "pool" or "token"

poolid/coin1*

Integer

Indicates the pool address token address of the asset. Example: "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640" or

"So11111111111111111111111111111111111111112"

timeperiod*

String

Indicates the number of days to perform the operation over

granularity*

String

Indicates with what frequency the data is gathered. Available parameters: "1h", "3h", "6h", "12h", "1D"

Example

Request

http://api.fibonacci.fi/sharpe_ratio/SOL/token/So11111111111111111111111111111111111111112/7/12h

Response

{"status": 200, "msg": "Success sharpe token So11111111111111111111111111111111111111112", "elapsed_time": 0, "last_data_ts": 1686129711.3503387, "data": {"sharpe": -1.7683040610193868, "average_daily_ptf_perf": -0.003536131205076979}}

Last updated