onchain_histo_price

GET http://api.fibonacci.fi/onchain_histo_price/{chain}/{coin1}/{coin2}/{timeperiod}/{granularity}

This API retrieves historical price data for a specified token pair on a specified chain using relevant AMM data.

Path Parameters

NameTypeDescription

chain*

String

Indicates the blockchain network to use (ETH or SOL)

coin1*

String

Indicates the token address of the first asset. Example: "So11111111111111111111111111111111111111112"

coin2*

Integer

Indicates the token address of the second asset. Must be the token ID of USDC on the relevant chain. Example for SOL: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"

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/onchain_histo_price/SOL/So11111111111111111111111111111111111111112/EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v/30/15m
http://api.fibonacci.fi/onchain_histo_price/ETH/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48/30/15m

Response

{"status": 200, "msg": "Success onchain price SOL So11111111111111111111111111111111111111112", "elapsed_time": 13, "last_data_ts": 1688123700, "data": [{"close": 17.15458543338144, "ts": 1687563900}, {"close": 17.214356948593164, "ts": 1687608000}, {"close": 16.610400383903716, "ts": 1687652100}, {"close": 17.14168082660392, "ts": 1687696200}, {"close": 16.750656021844872, "ts": 1687740300}, {"close": 16.96571936665549, "ts": 1687784400}, {"close": 16.26069837972982, "ts": 1687828500}, {"close": 16.611612152117402, "ts": 1687872600}, {"close": 16.301142856984487, "ts": 1687916700}, {"close": 16.181711045291625, "ts": 1687960800}, {"close": 16.04403832356586, "ts": 1688004900}, {"close": 17.602107874783997, "ts": 1688049000}, {"close": 18.461046173450317, "ts": 1688093100}]}

Last updated