/v1/schedule
Per-period DCA breakdown
Provalo dal vivo
10 chiamate gratuite al giorno — senza registrazione, senza chiave API. Passa dal gateway oanor.
Funziona. Prendi una chiave API e usala nel tuo progetto.
Ottieni una chiave APIFrammenti di codice
curl "https://api.oanor.com/dca-api/v1/schedule" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/dca-api/v1/schedule", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/dca-api/v1/schedule");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
"https://api.oanor.com/dca-api/v1/schedule",
headers={"x-oanor-key": "oanor_test_..."}
)
Risposta di esempio
Una risposta reale di questo endpoint, acquisita dall'ultimo health check.
{
"data": {
"source": "DCA",
"fee_pct": 0,
"periods": 12,
"schedule": [
{
"price": 100,
"value": 100,
"period": 1,
"avg_cost": 100,
"units_bought": 1,
"cumulative_units": 1,
"cumulative_invested": 100
},
{
"price": 95,
"value": 195,
"period": 2,
"avg_cost": 97.43589744,
"units_bought": 1.05263158,
"cumulative_units": 2.05263158,
"cumulative_invested": 200
},
{
"price": 110,
"value": 325.79,
"period": 3,
"avg_cost": 101.29240711,
"units_bought": 0.90909091,
"cumulative_units": 2.96172249,
"cumulative_invested": 300
},
{
"price": 90,
"value": 366.56,
"period": 4,
"avg_cost": 98.21172171,
"units_bought": 1.11111111,
"cumulative_units": 4.0728336,
"cumulative_invested": 400
},
{
"price": 105,
"value": 527.65,
"period": 5,
"avg_cost": 99.4982393,
"units_bought": 0.95238095,
"cumulative_units": 5.02521455,
"cumulative_invested": 500
},
{
"price": 120,
"value": 703.03,
"period": 6,
"avg_cost": 102.41445693,
"units_bought": 0.83333333,
"cumulative_units": 5.85854788,
"cumulative_invested": 600
},
{
"price": 115,
"value": 773.73,
"period": 7,
"avg_cost": 104.04105718,
"units_bought": 0.86956522,
"cumulative_units": 6.7281131,
"cumulative_invested": 700
},
{
"price": 100,
"value": 772.81,
"period": 8,
"avg_cost": 103.51815371,
"units_bought": 1,
"cumulative_units": 7.7281131,
"cumulative_invested": 800
},
{
"price": 130,
"value": 1104.65,
"period": 9,
"avg_cost": 105.91545001,
"units_bought": 0.76923077,
"cumulative_units": 8.49734387,
"cumulative_invested": 900
},
{
"price": 125,
"value": 1162.17,
"period": 10,
"avg_cost": 107.55760073,
"units_bought": 0.8,
"cumulative_units": 9.29734387,
"cumulati
…