API Release Notes April 26

1. Architectural Changes

The API was rebuilt from the ground up to improve performance (5-10x faster) and provide a more consistent integration experience.

  • REST Convention Migration: All read-only endpoints have moved from POST to GET.
    • Request body parameters from v0 must now be passed as query strings in v2.
    • POST is now strictly reserved for mutating operations, such as bulk requests and portfolio analytics.
  • Base Path Update: The base URL has migrated from /v0/ to /v2/.
  • Response Wrapping: All API responses are now wrapped in a consistent {"data": ...} envelope.

2. Namespace & Endpoint Refactoring

The previous "grab-bag" structure has been refactored into focused, RESTful resources with clear responsibilities.

Old Namespace (v0)New Namespace (v2)Description
/stock//equities/, /estimates/, /corporate-actions/Split into specialized categories.
/portfolio//quant-os/Rebranded with enhanced analytics.
/etf//etfs/Pluralized for consistency.
/fund//funds/Pluralized for consistency.
/status, /quota/account/status, /account/quotaMoved to a dedicated account namespace.

3. Data Schema Refactoring

  • Naming Convention: All response fields have migrated from snake_case to camelCase.
  • Structured Responses: Large, flat field dumps (such as the previous 108-field metrics) have been refactored into typed arrays.
  • Typed Schemas: 72 named response schemas were introduced to replace the inline definitions used in v0, improving SDK generation and type safety.

4. Specific Resource Migrations

Financial Statements

In the Equities namespace, the generic "financials" endpoint has been split into three distinct resources:

  • /v2/equities/income-statement
  • /v2/equities/balance-sheets
  • /v2/equities/cash-flow

Account Quota Fields

Several fields were renamed or removed to improve clarity:

  • Renamed: quota_leftremaining
  • Renamed: quota_totallimit
  • Added: apiKey, period
  • Removed: series (usage history chart data)

5. Implementation Examples

Status Request Refactoring

  • v0 (Before): GET https://api.bavest.co/v0/status
  • v2 (After): GET https://api.bavest.co/v2/account/status?symbol=AAPL

Bulk Request Update

  • v0 (Before): POST https://api.bavest.co/v0/bulk -d '{"symbol":"AAPL"}'
  • v2 (After): POST https://api.bavest.co/v2/bulk -d '{"symbol":"AAPL"}'
    • Note: While the path changed to /v2/, the bulk endpoint remains a POST operation with 5 new added fields: error, isin, message, symbol, and valid.