View as Markdown

Historical uploads

Historical-holdings endpoints exist for the cases where a live custodian feed can't supply a period — onboarding pre-platform history, accounting for off-platform vehicles, replacing a damaged feed window. They take the same shape Aleta normally derives from the ledger and write it directly. Two flavours: account holdings (cash) and fee holdings (running fee balances). Instrument-level historical holdings live on v3 under /api/v3/historical-instrument-holdings.


POST/api/v2/historical-account-holdings

Upload account holdings

Books a historical cash-account balance on a given date. The body carries the account relationship plus date and marketValue attributes. Re-uploading the same (account, date) pair overwrites the existing record.

Request

POST/api/v2/historical-account-holdings
curl -X POST https://platform.aleta.io/api/v2/historical-account-holdings \
  -H "Authorization: Bearer {access_token}" \
  -H "Content-Type: application/vnd.api+json" \
  -d '{
    "data": {
      "type": "historical-account-holding",
      "attributes": {
        "date": "2024-12-31",
        "marketValue": 125000.00
      },
      "relationships": {
        "account": { "data": { "type": "account", "id": "{account_id}" } }
      }
    }
  }'

DELETE/api/v2/historical-account-holdings

Delete account holdings

Deletes account-holding rows for an account over a date range. Body-less — pass the targeting via query parameters.

Query parameters

  • Name
    accountId
    Type
    string
    Description

    Account whose holdings to delete. Required.

  • Name
    fromDate
    Type
    ISO 8601 date
    Description

    Inclusive lower bound. Required.

  • Name
    toDate
    Type
    ISO 8601 date
    Description

    Inclusive upper bound. Required.

Request

DELETE/api/v2/historical-account-holdings
curl -X DELETE -G https://platform.aleta.io/api/v2/historical-account-holdings \
  -H "Authorization: Bearer {access_token}" \
  -d accountId={account_id} \
  -d fromDate=2024-01-01 \
  -d toDate=2024-12-31

POST/api/v2/historical-fee-holdings

Upload fee holdings

Books a historical fee-running-balance for an account. Same shape as an account holding but represents accrued fees rather than cash.

Request

POST/api/v2/historical-fee-holdings
curl -X POST https://platform.aleta.io/api/v2/historical-fee-holdings \
  -H "Authorization: Bearer {access_token}" \
  -H "Content-Type: application/vnd.api+json" \
  -d '{
    "data": {
      "type": "historical-fee-holding",
      "attributes": {
        "date": "2024-12-31",
        "marketValue": 1250.00
      },
      "relationships": {
        "account": { "data": { "type": "account", "id": "{account_id}" } }
      }
    }
  }'

DELETE/api/v2/historical-fee-holdings

Delete fee holdings

Deletes fee-holding rows for an account over a date range.

Query parameters

  • Name
    accountId
    Type
    string
    Description

    Account whose fee holdings to delete. Required.

  • Name
    fromDate
    Type
    ISO 8601 date
    Description

    Inclusive lower bound. Required.

  • Name
    toDate
    Type
    ISO 8601 date
    Description

    Inclusive upper bound. Required.

Request

DELETE/api/v2/historical-fee-holdings
curl -X DELETE -G https://platform.aleta.io/api/v2/historical-fee-holdings \
  -H "Authorization: Bearer {access_token}" \
  -d accountId={account_id} \
  -d fromDate=2024-01-01 \
  -d toDate=2024-12-31