Ladder

POST a date, amount, and weighted buys. Same growth math as regret, but you pick the mix. Weights must add to 1. Cash left alone is always in the result. GET /api/v1/ladder lists the assets.

View Docs

Parameters

date string Required

YYYY-MM-DD in the JSON body. A weekend walks forward.

Example: 2020-03-23

amount number Required

Cash you pretend you had.

Example: 100000

currency string

INR or USD. Defaults to INR.

Example: INR

buys array Required

JSON array of { id, weight }. 1 to 6. Weights sum to 1. ids: gold, btc, oil, nifty, reliance, sp500.

Example: [{"id":"btc","weight":0.4},{"id":"gold","weight":0.3},{"id":"nifty","weight":0.3}]

Responses

200 OK Success
{
  "ok": true,
  "date": "2020-03-23",
  "amount": 100000,
  "currency": "INR",
  "winner": {
    "id": "btc",
    "multiple": 16.61
  },
  "verdict": "Bitcoin did 16.61x. The rupees under the mattress are still 100000."
}
400 BAD_REQUEST weights have to add up to 1
502 BAD_GATEWAY could not load the rupee rate