DCA
dca
Chart: DCA
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
start_date | string | Start date in YYYY-MM-DD format | No |
end_date | string | End date in YYYY-MM-DD format | No |
latest | bool | If true, returns the current value | No |
Output
| Index | Name | Type | Description |
|---|---|---|---|
| 0 | date | string | Date (ISO) |
| 1 | closing_price | string | Closing price |
| 2 | daily_cumulative_sats | string | Daily cumulative sats (BTC) |
| 3 | total_invested | string | Total invested (USD) |
| 4 | current_portfolio_value | string | Current portfolio value (USD) |
| 5 | current_return | string | Current return (decimal) |
| 6 | color | string | Color |
Example Request
https://charts.bitbo.io/api/v1/dca/?start_date=2025-05-07&end_date=2025-05-09
Example Request with Latest
https://charts.bitbo.io/api/v1/dca/?latest=true
Code Samples
- cURL
- Python
- JavaScript
- Go
curl "https://charts.bitbo.io/api/v1/dca/?start_date=2025-05-07&end_date=2025-05-09&api_key=YOUR_API_KEY"
import requests
url = "https://charts.bitbo.io/api/v1/dca/"
params = {
"start_date": "2025-05-07",
"end_date": "2025-05-09",
"api_key": "YOUR_API_KEY"
}
response = requests.get(url, params=params)
data = response.json()
print(data)
const url = "https://charts.bitbo.io/api/v1/dca/";
const params = new URLSearchParams({
start_date: "2025-05-07",
end_date: "2025-05-09",
api_key: "YOUR_API_KEY"
});
const response = await fetch(`${url}?${params}`);
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://charts.bitbo.io/api/v1/dca/?start_date=2025-05-07&end_date=2025-05-09&api_key=YOUR_API_KEY", nil)
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
Example Output
{
"data": [
[
"2025-05-07",
"12.34",
"12.34",
"12.34",
"12.34",
"12.34",
"#ff0000"
],
[
"2025-05-08",
"23.45",
"23.45",
"23.45",
"23.45",
"23.45",
"#ff0000"
],
[
"2025-05-09",
"34.56",
"34.56",
"34.56",
"34.56",
"34.56",
"#ff0000"
]
]
}