Coin Historical Price
Retrieve historical price data for a specific coin within a given time range and bucket interval.
Endpoint
GET /api/v1/partner/coin-historical-price
Request
Query Parameters
coin_id
string
Yes
The unique identifier of the coin (e.g., 0x...::module::COIN
).
bucket
int
Yes
The interval (in minutes) for each price data point.
from
int
Yes
Start of the time range (Unix timestamp in seconds).
to
int
Yes
End of the time range (Unix timestamp in seconds).
Headers
x-api-key
Yes
API key for authorization.
x-chain
Yes
Blockchain identifier (e.g., sui
).
Accept-Encoding
Yes
Should be set to application/json
.
Example Request
curl -X GET "https://api.noodles.fi/api/v1/partner/coin-historical-price?coin_id=0xe1b45a0e641b9955a20aa0ad1c1f4ad86aad8afb07296d4085e349a50e90bdca::blue::BLUE&bucket=5&from=1748420400&to=1748423100" \
-H "x-api-key: YOUR_API_KEY" \
-H "x-chain: sui" \
-H "Accept-Encoding: application/json"
Response
Fields
code
number
No
HTTP status code (200 for success).
message
string
No
Status message.
data.timestamp
number[]
No
Array of Unix timestamps (seconds).
data.price
number[]
No
Array of prices corresponding to each timestamp.
Success Response
{
"code": 200,
"message": "OK",
"data": {
"timestamp": [
1748420400,
1748420700,
1748421000,
1748421300,
1748421600,
1748421900,
1748422200,
1748422500,
1748422800,
1748423100
],
"price": [
0.1336538764891597,
0.13381098347999498,
0.1340244545812692,
0.13382666114356717,
0.1345310779845118,
0.13440790429372404,
0.13428888030654038,
0.13455521082990599,
0.134711571860626,
0.13450061655428858
]
}
}
Response when no data is available
{
"code": 200,
"message": "OK",
"data": {
"timestamp": [],
"price": []
}
}
Notes
The
bucket
parameter determines the granularity of the returned price data.The
coin_id
must follow the format:address::symbol::SYMBOL
.The number of elements in
timestamp
andprice
arrays will match.
See also: Environment Setup
Last updated