Bitcoin API allows checking certain Bitcoin information.
The service uses Java 11.
mvn spring-boot:run
By default, the service is running at http://localhost:8080
.
Found at /bitcoin/api/v1/api-doc
.
The following requests can be sent to the service.
Counts the longest downward trend in Bitcoin price during the range.
GET /bitcoin/api/v1/downward?from=2020-01-01&to=2021-10-10
Expected response
{
"description": "Longest downward trend (days)",
"longestTrend": 8
}
Counts the highest trading volume during the range.
GET /bitcoin/api/v1/highest?from=2021-09-20&to=2021-12-21
Expected response
{
"description": "Highest volume",
"date": "2021-11-08",
"volume": 90990605009.20009,
"currency": "EUR"
}
Counts retrospectively the best date for buying Bitcoin and then selling it.
GET /bitcoin/api/v1/timemachine?from=2021-09-16&to=2021-12-20
Expected response
{
"description": "Maximise profit by going back to these dates",
"optimalBuyDate": "2021-09-22",
"optimalSellDate": "2021-11-09"
}
or
{
"description": "No profit can be made during this time range"
}