@lunch-money/developer-docs 2.11.0-preview.16 → 2.11.0-preview.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lunch-money/developer-docs",
3
- "version": "2.11.0-preview.16",
3
+ "version": "2.11.0-preview.17",
4
4
  "description": "Developer documentation content for Lunch Money APIs",
5
5
  "exports": {
6
6
  ".": "./package.json",
@@ -2,10 +2,10 @@ openapi: 3.0.2
2
2
  info:
3
3
  title: Lunch Money API - v2
4
4
  description: |-
5
- Welcome to the Lunch Money v2 API reference. This is the **v2.11.0** spec.
6
-
7
5
  ### Introduction
8
6
 
7
+ Welcome to the Lunch Money v2 API reference. This is the **v2.11.0** spec.
8
+
9
9
  The API is available at `https://api.lunchmoney.dev/v2`. Get your access token from the [Lunch Money developers page](https://my.lunchmoney.app/developers).
10
10
 
11
11
 
@@ -79,7 +79,11 @@ tags:
79
79
  description: Learn more about crypto assets
80
80
  url: https://support.lunchmoney.app/setup/crypto
81
81
  - name: balance_history
82
- description: View and update historical account balances. Balance history is what drives the [Net Worth](https://my.lunchmoney.app/net-worth) views in the Lunch Money app. Balance history is generated for each account's balance on the first day of each month and can be edited in the Lunch Money app or via the API.
82
+ description: >-
83
+ View and update monthly account balances used by the
84
+ [Net Worth](https://my.lunchmoney.app/net-worth) views in the Lunch Money app.
85
+ History is monthly. The current month may be calculated on demand when
86
+ requested.
83
87
  - name: recurring_items
84
88
  description: Work with recurring items
85
89
  externalDocs:
@@ -1643,7 +1647,7 @@ components:
1643
1647
  type:
1644
1648
  type: string
1645
1649
  enum: [manual]
1646
- description: Identifies this entry as belonging to a manually-managed account.
1650
+ description: Identifies this entry as belonging to a manual account.
1647
1651
  manual_account_id:
1648
1652
  type: integer
1649
1653
  format: int32
@@ -1672,14 +1676,14 @@ components:
1672
1676
 
1673
1677
  balanceHistorySourceCryptoManual:
1674
1678
  type: object
1675
- description: Source information for a manually-tracked cryptocurrency balance history entry.
1679
+ description: Source information for a manual cryptocurrency balance history entry.
1676
1680
  additionalProperties: false
1677
1681
  x-internal: true
1678
1682
  properties:
1679
1683
  type:
1680
1684
  type: string
1681
1685
  enum: [crypto_manual]
1682
- description: Identifies this entry as belonging to a manually-tracked crypto account.
1686
+ description: Identifies this entry as belonging to a manual crypto account.
1683
1687
  crypto_manual_id:
1684
1688
  type: integer
1685
1689
  format: int32
@@ -1722,10 +1726,11 @@ components:
1722
1726
  type: object
1723
1727
  x-internal: true
1724
1728
  description: >
1725
- Source information for a balance history entry whose account has since been deleted.
1729
+ Source information for balance history whose account has since been deleted.
1726
1730
  Historical balances are preserved when a user chooses to keep history on account deletion.
1727
1731
  This object contains details that can be used to display the deleted account in the UI.
1728
- The `deleted_account_id` can be passed to `PUT /v2/balance_history/deleted/{account_id}/details`
1732
+ The `deleted_account_id` can be passed to
1733
+ [PUT /balance_history/deleted/{account_id}/details](#tag/balance-history/PUT/balance_history/deleted/{account_id}/details)
1729
1734
  to update the archived source metadata.
1730
1735
  additionalProperties: false
1731
1736
  properties:
@@ -1756,11 +1761,11 @@ components:
1756
1761
  subtype:
1757
1762
  type: string
1758
1763
  nullable: true
1759
- description: Archived `subtype`` of the deleted account source
1764
+ description: Archived `subtype` of the deleted account source
1760
1765
  mask:
1761
1766
  type: string
1762
1767
  nullable: true
1763
- description: Archived account `mask` for a deleted plaid account source
1768
+ description: Archived account `mask` for a deleted Plaid account source
1764
1769
  symbol:
1765
1770
  type: string
1766
1771
  nullable: true
@@ -1782,12 +1787,14 @@ components:
1782
1787
  type: object
1783
1788
  title: balance history for an account object
1784
1789
  additionalProperties: false
1785
- description: Historical balance entries grouped under a single account source.
1790
+ description: Monthly balance entries grouped under a single account source.
1786
1791
  properties:
1787
1792
  source:
1788
1793
  description: >
1789
- Identifies the account this balance entry belongs to. The shape varies by
1790
- `source.type`. Use `source.type` to determine which account id field is present.
1794
+ Identifies the account these balance entries belong to. The shape varies by
1795
+ `source.type`. Each source type exposes a type-specific account id field
1796
+ (`manual_account_id`, `plaid_account_id`, `crypto_manual_id`,
1797
+ `crypto_synced_id`, or `deleted_account_id`).
1791
1798
  oneOf:
1792
1799
  - $ref: "#/components/schemas/balanceHistorySourceManual"
1793
1800
  - $ref: "#/components/schemas/balanceHistorySourcePlaid"
@@ -1805,38 +1812,48 @@ components:
1805
1812
  balances:
1806
1813
  type: array
1807
1814
  description: >
1808
- Monthly balance history entries for the source account. On GET responses,
1809
- this includes all entries in the requested range. On PUT upsert responses,
1810
- this includes only the entries modified by that request.
1815
+ Monthly balance entries for this account source. A `historical` entry is
1816
+ a stored snapshot of a past month and includes an `id`. A `current` entry
1817
+ is an ephemeral snapshot based on the account's current balances and has
1818
+ no balance-entry `id`. On PUT upsert responses, this array includes only
1819
+ the `type: historical` entries modified by that request.
1811
1820
  items:
1812
- $ref: "#/components/schemas/balanceHistoryObject"
1821
+ $ref: "#/components/schemas/balanceHistoryEntry"
1813
1822
  required:
1814
1823
  - source
1815
1824
  - balances
1816
1825
 
1817
- balanceHistoryObject:
1826
+ historicalBalanceHistoryEntry:
1818
1827
  type: object
1819
- title: balance history entry object
1828
+ title: historical balance history entry
1820
1829
  additionalProperties: false
1821
1830
  x-internal: true
1822
- description: A historical balance entry for a single account on a single date.
1831
+ description: >
1832
+ A stored monthly balance for a past month. The `id` may be used with
1833
+ balance history entry endpoints. The balance represents the account
1834
+ balance at or around the end of `month`.
1823
1835
  properties:
1836
+ type:
1837
+ type: string
1838
+ enum: [historical]
1839
+ description: Identifies this entry as a stored snapshot of a past month.
1824
1840
  id:
1825
1841
  type: integer
1826
1842
  format: int32
1827
- description: Unique identifier of this historical balance entry.
1828
- date:
1843
+ description: Unique identifier for this historical balance entry.
1844
+ month:
1829
1845
  type: string
1830
- format: date
1831
- description: Date of this historical balance entry in YYYY-MM-DD format. This is always the first day of a month.
1846
+ pattern: '^\d{4}-(0[1-9]|1[0-2])$'
1847
+ description: Calendar month for this entry in YYYY-MM format.
1848
+ example: "2026-06"
1832
1849
  balance:
1833
1850
  type: string
1834
1851
  pattern: ^-?\d+(\.\d{1,4})?$
1835
- description: Historical balance stored for this entry, as a numeric string with up to four decimal places. Trailing zeros and decimal places are not guaranteed in responses. For manual and Plaid accounts this is in the account currency. For crypto accounts this is in the user's primary currency.
1852
+ description: Historical balance for this entry, as a numeric string with up to four decimal places. Trailing zeros and decimal places are not guaranteed in responses. For manual and Plaid accounts this is in the account currency. For crypto accounts this is in the user's primary currency.
1836
1853
  currency:
1837
1854
  allOf:
1838
1855
  - $ref: "#/components/schemas/currencyEnum"
1839
- description: Currency of the stored `balance`. For crypto entries this is the user's primary currency.
1856
+ description: Currency of `balance`. For crypto entries this is the user's primary currency.
1840
1857
  to_base:
1841
1858
  type: number
1842
1859
  format: double
@@ -1845,19 +1862,82 @@ components:
1845
1862
  type: string
1846
1863
  nullable: true
1847
1864
  pattern: ^-?\d+(\.\d{1,18})?$
1848
- description: Crypto quantity stored for this balance entry, when available. This may be present for crypto or deleted-account entries and is `null` otherwise.
1865
+ description: Crypto quantity for this balance entry, when available. This may be present for crypto or deleted-account entries and is `null` otherwise.
1849
1866
  required:
1867
+ - type
1850
1868
  - id
1851
- - date
1869
+ - month
1870
+ - balance
1871
+ - currency
1872
+ - to_base
1873
+ - crypto_balance
1874
+
1875
+ currentBalanceHistoryEntry:
1876
+ type: object
1877
+ title: current balance history entry
1878
+ additionalProperties: false
1879
+ x-internal: true
1880
+ description: >
1881
+ An ephemeral snapshot based on the account's current balances. It may
1882
+ change between requests.
1883
+ properties:
1884
+ type:
1885
+ type: string
1886
+ enum: [current]
1887
+ description: Identifies this entry as an ephemeral current-month snapshot.
1888
+ month:
1889
+ type: string
1890
+ pattern: '^\d{4}-(0[1-9]|1[0-2])$'
1891
+ description: Calendar month for this entry in YYYY-MM format. For current entries this is the current month.
1892
+ example: "2026-07"
1893
+ balance:
1894
+ type: string
1895
+ pattern: ^-?\d+(\.\d{1,4})?$
1896
+ description: Calculated balance for the current month, as a numeric string with up to four decimal places. Trailing zeros and decimal places are not guaranteed in responses. For manual and Plaid accounts this is in the account currency. For crypto accounts this is in the user's primary currency.
1897
+ currency:
1898
+ allOf:
1899
+ - $ref: "#/components/schemas/currencyEnum"
1900
+ description: Currency of the calculated `balance`. For crypto entries this is the user's primary currency.
1901
+ to_base:
1902
+ type: number
1903
+ format: double
1904
+ description: Calculated balance converted to the user's primary currency. When the entry currency is the user's primary currency, this is the numeric value of `balance`.
1905
+ crypto_balance:
1906
+ type: string
1907
+ nullable: true
1908
+ pattern: ^-?\d+(\.\d{1,18})?$
1909
+ description: Crypto quantity for this calculated entry, when available. This may be present for crypto entries and is `null` otherwise.
1910
+ required:
1911
+ - type
1912
+ - month
1852
1913
  - balance
1853
1914
  - currency
1854
1915
  - to_base
1855
1916
  - crypto_balance
1856
1917
 
1918
+ balanceHistoryEntry:
1919
+ title: balance history entry
1920
+ x-internal: true
1921
+ description: >
1922
+ A monthly balance history entry. Discriminated by `type`. `historical`
1923
+ entries are stored snapshots of past months with an `id`. `current`
1924
+ entries are ephemeral snapshots with no balance-entry `id`.
1925
+ oneOf:
1926
+ - $ref: "#/components/schemas/historicalBalanceHistoryEntry"
1927
+ - $ref: "#/components/schemas/currentBalanceHistoryEntry"
1928
+ discriminator:
1929
+ propertyName: type
1930
+ mapping:
1931
+ historical: "#/components/schemas/historicalBalanceHistoryEntry"
1932
+ current: "#/components/schemas/currentBalanceHistoryEntry"
1933
+
1857
1934
  balanceHistoryListResponseObject:
1858
1935
  type: object
1859
1936
  additionalProperties: false
1860
1937
  x-internal: true
1938
+ description: >
1939
+ List response for balance history GET endpoints. Entries are grouped by
1940
+ account source under `balance_history`.
1861
1941
  properties:
1862
1942
  balance_history:
1863
1943
  type: array
@@ -1870,31 +1950,39 @@ components:
1870
1950
  type: object
1871
1951
  x-internal: true
1872
1952
  additionalProperties: false
1953
+ description: >
1954
+ A single monthly balance entry to upsert. Request bodies use this shape.
1955
+ Responses return `type: historical` entries instead.
1873
1956
  properties:
1874
1957
  id:
1875
1958
  type: integer
1876
1959
  format: int32
1877
1960
  description: System-defined balance history entry id. Ignored if set.
1878
1961
  x-updatable: false
1879
- date:
1962
+ month:
1880
1963
  type: string
1881
- format: date
1882
- description: Month to update, in YYYY-MM-DD format. This must be the first day of a month and must be in a past month.
1964
+ pattern: '^\d{4}-(0[1-9]|1[0-2])$'
1965
+ description: >
1966
+ Calendar month to upsert, in YYYY-MM format. Must be a past month.
1967
+ The current month cannot be written through PUT endpoints.
1968
+ example: "2026-06"
1883
1969
  balance:
1884
1970
  oneOf:
1885
1971
  - type: number
1886
1972
  format: double
1887
1973
  - type: string
1888
1974
  pattern: ^-?\d+(\.\d{1,4})?$
1889
- description: Numeric value of the historical balance, up to four decimal places, as a number or string. For manual and Plaid accounts this is typically in the account currency. For crypto and deleted accounts this is typically in the user's primary currency. Do not include any special characters aside from a decimal point.
1975
+ description: Numeric value of the historical balance, up to four decimal places, as a number or string. For manual and Plaid accounts this is in the account currency. For crypto and deleted accounts this is in the user's primary currency. Do not include any special characters aside from a decimal point.
1890
1976
  symbol:
1891
1977
  type: string
1892
1978
  nullable: true
1893
1979
  minLength: 1
1894
1980
  maxLength: 25
1895
- description: Optional for crypto balances, but if set it must match the account's symbol.
1896
- Tolerated for deleted-account balances. Do not provide this for manual or Plaid balances.
1897
- If provided when using the synced crypto path-based endpoint, this must match the symbol in the path.
1981
+ description: >
1982
+ Optional for crypto balances. If set, it must match the account's
1983
+ symbol. Tolerated for deleted-account balances. Do not provide this
1984
+ for manual or Plaid balances. On the synced crypto path endpoint, if
1985
+ provided it must match the `symbol` path parameter.
1898
1986
  x-updatable: true
1899
1987
  crypto_balance:
1900
1988
  type: string
@@ -1910,10 +1998,10 @@ components:
1910
1998
  to_base:
1911
1999
  type: number
1912
2000
  format: double
1913
- description: System-defined historical balance converted to the user's primary currency. Ignored if set. Use `balance` to update the stored historical balance.
2001
+ description: System-defined historical balance converted to the user's primary currency. Ignored if set. Use `balance` to update the historical balance.
1914
2002
  x-updatable: false
1915
2003
  required:
1916
- - date
2004
+ - month
1917
2005
  - balance
1918
2006
 
1919
2007
  upsertBalanceHistoryRequestObject:
@@ -1924,7 +2012,11 @@ components:
1924
2012
  balances:
1925
2013
  type: array
1926
2014
  minItems: 1
1927
- description: One or more monthly balance history entries to upsert
2015
+ description: >
2016
+ One or more monthly balance history entries to upsert. Each entry uses
2017
+ `month` (YYYY-MM) and `balance`. Do not include response-only fields such
2018
+ as `type`. PUT responses return only the `type: historical` entries
2019
+ modified by the request.
1928
2020
  items:
1929
2021
  $ref: "#/components/schemas/balanceHistoryUpdateItemObject"
1930
2022
  required:
@@ -1939,51 +2031,58 @@ components:
1939
2031
  name:
1940
2032
  type: string
1941
2033
  nullable: true
1942
- description: New archived account name for the deleted account source.
2034
+ description: New archived account name for the deleted account source
1943
2035
  institution_name:
1944
2036
  type: string
1945
2037
  nullable: true
1946
- description: New archived institution name for the deleted account source.
2038
+ description: New archived institution name for the deleted account source
1947
2039
  display_name:
1948
2040
  type: string
1949
2041
  nullable: true
1950
- description: New display name for the deleted account source.
2042
+ description: New display name for the deleted account source
1951
2043
  account_type:
1952
2044
  type: string
1953
2045
  nullable: true
1954
- description: New archived account type for the deleted account source.
2046
+ description: New archived account type for the deleted account source
1955
2047
  subtype:
1956
2048
  type: string
1957
2049
  nullable: true
1958
- description: New archived subtype for the deleted account source.
2050
+ description: New archived subtype for the deleted account source
1959
2051
  mask:
1960
2052
  type: string
1961
2053
  nullable: true
1962
- description: New archived account mask for the deleted account source.
2054
+ description: New archived account mask for the deleted account source
1963
2055
 
1964
2056
  updateBalanceHistoryDetailsResponseObject:
1965
2057
  type: object
1966
2058
  x-internal: true
1967
2059
  additionalProperties: false
2060
+ description: Updated archived metadata for a deleted balance history source
1968
2061
  properties:
1969
2062
  name:
1970
2063
  type: string
1971
2064
  nullable: true
2065
+ description: Archived account name for the deleted account source
1972
2066
  institution_name:
1973
2067
  type: string
1974
2068
  nullable: true
2069
+ description: Archived institution name for the deleted account source
1975
2070
  display_name:
1976
2071
  type: string
1977
2072
  nullable: true
2073
+ description: Archived display name for the deleted account source
1978
2074
  account_type:
1979
2075
  type: string
1980
2076
  nullable: true
2077
+ description: Archived account type for the deleted account source
1981
2078
  subtype:
1982
2079
  type: string
1983
2080
  nullable: true
2081
+ description: Archived subtype for the deleted account source
1984
2082
  mask:
1985
2083
  type: string
1986
2084
  nullable: true
2085
+ description: Archived account mask for the deleted account source
1987
2086
  required:
1988
2087
  - name
1989
2088
  - institution_name
@@ -6505,37 +6604,54 @@ paths:
6505
6604
  - balance_history
6506
6605
  summary: Get balance history
6507
6606
  description: |-
6508
- Retrieve historical balance entries.<br><br>
6509
- Balance history is monthly. When `start_date` and `end_date` are both provided, they must be first-of-month dates. `start_date` must not be in the future, while `end_date` may be in the future. If one of `start_date` or `end_date` is provided, the other is required. If neither is provided, all available balance history is returned.<br><br>
6510
- The response groups entries by source account. Each item in `balance_history` contains a `source` object plus a `balances` array containing one balance entry per month in the requested range, or all stored entries when no range is provided.<br><br>
6511
- Historical entries for accounts that have been deleted may still be returned. These entries use `source.type: deleted` and include `deleted_account_id`, archived display fields, and account metadata on the `source` object.
6607
+ Retrieve monthly balance history for all account sources.<br><br>
6608
+ Balance history is monthly. Each entry represents the account balance at or around the end of the specified month. System-generated entries are generally captured near the boundary between months.<br><br>
6609
+ Query with optional `start_month` and `end_month` in YYYY-MM format. The range is inclusive. If either parameter is provided, both are required. `start_month` must not be in the future. `end_month` may not be earlier than `start_month` and must not be in the future. Values must be valid calendar months in exact YYYY-MM format. A full date such as `2026-06-01` is invalid. If neither is provided, all available balance history is returned, including an ephemeral `current` entry for the current month when applicable.<br><br>
6610
+ The response groups entries by source account. Each item in `balance_history` contains a `source` object plus a `balances` array. Within a requested range (or across all history when no range is provided), the array includes only months that have data — months with no data are omitted. A `current` entry is also included when the requested range includes the current month.<br><br>
6611
+ Each balance entry has a `type`:<br>
6612
+ - `historical`: stored snapshot of a past month for an active or deleted account. Includes an `id` that can be used with balance history entry endpoints<br>
6613
+ - `current`: snapshot based on the account's current balances. It is ephemeral and may change between requests. To inspect the underlying account, use the type-specific source id for the `source.type` values:<br>
6614
+ &nbsp;&nbsp;&nbsp;&nbsp;- `manual`: `source.manual_account_id` with [GET /manual_accounts/{id}](#tag/manual-accounts/GET/manual_accounts/{id})<br>
6615
+ &nbsp;&nbsp;&nbsp;&nbsp;- `plaid`: `source.plaid_account_id` with [GET /plaid_accounts/{id}](#tag/plaid-accounts/GET/plaid_accounts/{id})<br>
6616
+ &nbsp;&nbsp;&nbsp;&nbsp;- `crypto_manual`: `source.crypto_manual_id` with [GET /crypto/manual/{id}](#tag/crypto-manual/GET/crypto/manual/{id})<br>
6617
+ &nbsp;&nbsp;&nbsp;&nbsp;- `crypto_synced`: `source.crypto_synced_id` and `source.symbol` with [GET /crypto/synced/{id}/{symbol}](#tag/crypto-synced/GET/crypto/synced/{id}/{symbol})
6512
6618
  operationId: getBalanceHistory
6513
6619
  parameters:
6514
- - name: start_date
6620
+ - name: start_month
6515
6621
  in: query
6516
- description: Optional start date for the requested history range in YYYY-MM-DD format. If set, `end_date` is also required. This must be the first day of a month and must not be in the future.
6622
+ description: >-
6623
+ Optional start of the requested history range as a calendar month in
6624
+ YYYY-MM format (for example `2026-06`). If set, `end_month` is also
6625
+ required. The range is inclusive. `start_month` must not be in the
6626
+ future. A full date such as `2026-06-01` is invalid.
6517
6627
  required: false
6518
6628
  schema:
6519
6629
  type: string
6520
- format: date
6630
+ pattern: '^\d{4}-(0[1-9]|1[0-2])$'
6521
6631
  examples:
6522
6632
  range start:
6523
- summary: Start date
6524
- value: "2026-01-01"
6525
- - name: end_date
6633
+ summary: Start month
6634
+ value: "2026-01"
6635
+ - name: end_month
6526
6636
  in: query
6527
- description: Optional end date for the requested history range in YYYY-MM-DD format. If set, `start_date` is also required. This must be the first day of a month. For a single month, set this to the same first-of-month date as `start_date`.
6637
+ description: >-
6638
+ Optional end of the requested history range as a calendar month in
6639
+ YYYY-MM format (for example `2026-06`). If set, `start_month` is also
6640
+ required. The range is inclusive. `end_month` may not be earlier than
6641
+ `start_month` and must not be in the future. A full date such as
6642
+ `2026-06-01` is invalid. For a single month, set this to the same
6643
+ value as `start_month`.
6528
6644
  required: false
6529
6645
  schema:
6530
6646
  type: string
6531
- format: date
6647
+ pattern: '^\d{4}-(0[1-9]|1[0-2])$'
6532
6648
  examples:
6533
6649
  range end:
6534
- summary: End date
6535
- value: "2026-03-01"
6650
+ summary: End month
6651
+ value: "2026-03"
6536
6652
  responses:
6537
6653
  "200":
6538
- description: Historical balance entries for the requested date range
6654
+ description: Monthly balance history for the requested month range
6539
6655
  content:
6540
6656
  application/json:
6541
6657
  schema:
@@ -6548,14 +6664,16 @@ paths:
6548
6664
  type: manual
6549
6665
  manual_account_id: 119807
6550
6666
  balances:
6551
- - id: 101
6552
- date: "2026-01-01"
6667
+ - type: historical
6668
+ id: 101
6669
+ month: "2026-01"
6553
6670
  balance: "41000.0000"
6554
6671
  currency: usd
6555
6672
  to_base: 41000
6556
6673
  crypto_balance: null
6557
- - id: 102
6558
- date: "2026-02-01"
6674
+ - type: historical
6675
+ id: 102
6676
+ month: "2026-02"
6559
6677
  balance: "41211.8000"
6560
6678
  currency: usd
6561
6679
  to_base: 41211.8
@@ -6564,8 +6682,9 @@ paths:
6564
6682
  type: plaid
6565
6683
  plaid_account_id: 119808
6566
6684
  balances:
6567
- - id: 103
6568
- date: "2026-01-01"
6685
+ - type: historical
6686
+ id: 103
6687
+ month: "2026-01"
6569
6688
  balance: "5498.2800"
6570
6689
  currency: usd
6571
6690
  to_base: 5498.28
@@ -6575,8 +6694,9 @@ paths:
6575
6694
  crypto_manual_id: 22001
6576
6695
  symbol: btc
6577
6696
  balances:
6578
- - id: 104
6579
- date: "2026-01-01"
6697
+ - type: historical
6698
+ id: 104
6699
+ month: "2026-01"
6580
6700
  balance: "53124.7200"
6581
6701
  currency: usd
6582
6702
  to_base: 53124.72
@@ -6586,8 +6706,9 @@ paths:
6586
6706
  crypto_synced_id: 33004
6587
6707
  symbol: btc
6588
6708
  balances:
6589
- - id: 105
6590
- date: "2026-01-01"
6709
+ - type: historical
6710
+ id: 105
6711
+ month: "2026-01"
6591
6712
  balance: "6231.2800"
6592
6713
  currency: usd
6593
6714
  to_base: 6231.28
@@ -6603,12 +6724,34 @@ paths:
6603
6724
  mask: "1234"
6604
6725
  symbol: null
6605
6726
  balances:
6606
- - id: 106
6607
- date: "2026-01-01"
6727
+ - type: historical
6728
+ id: 106
6729
+ month: "2026-01"
6608
6730
  balance: "1250.0000"
6609
6731
  currency: usd
6610
6732
  to_base: 1250
6611
6733
  crypto_balance: null
6734
+ historical and current:
6735
+ summary: Historical month plus ephemeral current month
6736
+ value:
6737
+ balance_history:
6738
+ - source:
6739
+ type: manual
6740
+ manual_account_id: 162003
6741
+ balances:
6742
+ - type: historical
6743
+ id: 7437356
6744
+ month: "2026-06"
6745
+ balance: "62.8"
6746
+ currency: usd
6747
+ to_base: 62.8
6748
+ crypto_balance: null
6749
+ - type: current
6750
+ month: "2026-07"
6751
+ balance: "71.2"
6752
+ currency: usd
6753
+ to_base: 71.2
6754
+ crypto_balance: null
6612
6755
  manual account history:
6613
6756
  value:
6614
6757
  balance_history:
@@ -6616,14 +6759,16 @@ paths:
6616
6759
  type: manual
6617
6760
  manual_account_id: 119807
6618
6761
  balances:
6619
- - id: 201
6620
- date: "2026-01-01"
6762
+ - type: historical
6763
+ id: 201
6764
+ month: "2026-01"
6621
6765
  balance: "41000.0000"
6622
6766
  currency: usd
6623
6767
  to_base: 41000
6624
6768
  crypto_balance: null
6625
- - id: 202
6626
- date: "2026-02-01"
6769
+ - type: historical
6770
+ id: 202
6771
+ month: "2026-02"
6627
6772
  balance: "41211.8000"
6628
6773
  currency: usd
6629
6774
  to_base: 41211.8
@@ -6635,8 +6780,9 @@ paths:
6635
6780
  type: plaid
6636
6781
  plaid_account_id: 119808
6637
6782
  balances:
6638
- - id: 301
6639
- date: "2026-02-01"
6783
+ - type: historical
6784
+ id: 301
6785
+ month: "2026-02"
6640
6786
  balance: "5498.2800"
6641
6787
  currency: usd
6642
6788
  to_base: 5498.28
@@ -6649,8 +6795,9 @@ paths:
6649
6795
  crypto_synced_id: 33004
6650
6796
  symbol: btc
6651
6797
  balances:
6652
- - id: 401
6653
- date: "2026-02-01"
6798
+ - type: historical
6799
+ id: 401
6800
+ month: "2026-02"
6654
6801
  balance: "6231.2800"
6655
6802
  currency: usd
6656
6803
  to_base: 6231.28
@@ -6669,8 +6816,9 @@ paths:
6669
6816
  mask: "1234"
6670
6817
  symbol: null
6671
6818
  balances:
6672
- - id: 501
6673
- date: "2026-01-01"
6819
+ - type: historical
6820
+ id: 501
6821
+ month: "2026-01"
6674
6822
  balance: "1250.0000"
6675
6823
  currency: usd
6676
6824
  to_base: 1250
@@ -6682,26 +6830,31 @@ paths:
6682
6830
  schema:
6683
6831
  $ref: "#/components/schemas/errorResponseObject"
6684
6832
  examples:
6685
- missing paired date:
6833
+ missing paired month:
6686
6834
  value:
6687
6835
  message: Request Validation Failure
6688
6836
  errors:
6689
- - errMsg: "`start_date` and `end_date` must either both be provided or both be omitted."
6837
+ - errMsg: "`start_month` and `end_month` must either both be provided or both be omitted."
6690
6838
  invalid range:
6691
6839
  value:
6692
6840
  message: Request Validation Failure
6693
6841
  errors:
6694
- - errMsg: "`start_date` must be before or equal to `end_date`."
6695
- not first of month:
6842
+ - errMsg: "`end_month` may not be earlier than `start_month`."
6843
+ invalid month format:
6844
+ value:
6845
+ message: Invalid Request Parameters
6846
+ errors:
6847
+ - errMsg: "Invalid value for parameter: 'start_month'. '2026-06-01' is not a valid month in YYYY-MM format."
6848
+ future start month:
6696
6849
  value:
6697
6850
  message: Request Validation Failure
6698
6851
  errors:
6699
- - errMsg: "`start_date` and `end_date` must both be the first day of a month."
6700
- future start date:
6852
+ - errMsg: "`start_month` must not be in the future."
6853
+ future end month:
6701
6854
  value:
6702
6855
  message: Request Validation Failure
6703
6856
  errors:
6704
- - errMsg: "`start_date` must not be in the future."
6857
+ - errMsg: "`end_month` must not be in the future."
6705
6858
  "401":
6706
6859
  $ref: "#/components/responses/unauthorizedToken"
6707
6860
  "429":
@@ -6714,15 +6867,15 @@ paths:
6714
6867
  - balance_history
6715
6868
  summary: Get balance history for an account
6716
6869
  description: |-
6717
- Retrieve historical balance entries for one manual, Plaid, manual crypto, or deleted account. Crypto synced accounts require an additional `symbol` path parameter.<br><br>
6718
- The `account_type` path parameter identifies the type of account and the `account_id` path parameter identifies the specific id for that account type.<br><br>
6719
- When `start_date` and `end_date` are both provided, they must be first-of-month dates. `start_date` must not be in the future, while `end_date` may be in the future. If one of `start_date` or `end_date` is provided, the other is required. If neither is provided, all available history for the source is returned.
6870
+ Retrieve monthly balance history for one manual, Plaid, manual crypto, or deleted account. For synced crypto symbol streams, use [GET /balance_history/crypto_synced/{account_id}/{symbol}](#tag/balance-history/GET/balance_history/crypto_synced/{account_id}/{symbol}).<br><br>
6871
+ The `account_type` path parameter identifies the account family (`manual`, `plaid`, `crypto_manual`, or `deleted`) and `account_id` identifies the account within that family.<br><br>
6872
+ `start_month`, `end_month`, and current-month entries behave as described in [GET /balance_history](#tag/balance-history/GET/balance_history).
6720
6873
  operationId: getBalanceHistoryForAccount
6721
6874
  parameters:
6722
6875
  - name: account_type
6723
6876
  in: path
6724
6877
  required: true
6725
- description: Source family to retrieve. Use `manual`, `plaid`, `crypto_manual`, or `deleted`.
6878
+ description: Account family to retrieve. Use `manual`, `plaid`, `crypto_manual`, or `deleted`.
6726
6879
  schema:
6727
6880
  type: string
6728
6881
  enum: [manual, plaid, crypto_manual, deleted]
@@ -6733,23 +6886,27 @@ paths:
6733
6886
  schema:
6734
6887
  type: integer
6735
6888
  format: int32
6736
- - name: start_date
6889
+ - name: start_month
6737
6890
  in: query
6738
- description: Optional start date for the requested history range in YYYY-MM-DD format. If set, `end_date` is also required. This must be the first day of a month and must not be in the future.
6891
+ description: >-
6892
+ Optional. Same format and constraints as `start_month` on
6893
+ [GET /balance_history](#tag/balance-history/GET/balance_history).
6739
6894
  required: false
6740
6895
  schema:
6741
6896
  type: string
6742
- format: date
6743
- - name: end_date
6897
+ pattern: '^\d{4}-(0[1-9]|1[0-2])$'
6898
+ - name: end_month
6744
6899
  in: query
6745
- description: Optional end date for the requested history range in YYYY-MM-DD format. If set, `start_date` is also required. This must be the first day of a month.
6900
+ description: >-
6901
+ Optional. Same format and constraints as `end_month` on
6902
+ [GET /balance_history](#tag/balance-history/GET/balance_history).
6746
6903
  required: false
6747
6904
  schema:
6748
6905
  type: string
6749
- format: date
6906
+ pattern: '^\d{4}-(0[1-9]|1[0-2])$'
6750
6907
  responses:
6751
6908
  "200":
6752
- description: Historical balance entries for the requested source
6909
+ description: Monthly balance history for the requested source
6753
6910
  content:
6754
6911
  application/json:
6755
6912
  schema:
@@ -6762,14 +6919,16 @@ paths:
6762
6919
  type: manual
6763
6920
  manual_account_id: 119807
6764
6921
  balances:
6765
- - id: 201
6766
- date: "2026-01-01"
6922
+ - type: historical
6923
+ id: 201
6924
+ month: "2026-01"
6767
6925
  balance: "41000.0000"
6768
6926
  currency: usd
6769
6927
  to_base: 41000
6770
6928
  crypto_balance: null
6771
- - id: 202
6772
- date: "2026-02-01"
6929
+ - type: historical
6930
+ id: 202
6931
+ month: "2026-02"
6773
6932
  balance: "41211.8000"
6774
6933
  currency: usd
6775
6934
  to_base: 41211.8
@@ -6788,8 +6947,9 @@ paths:
6788
6947
  mask: "1234"
6789
6948
  symbol: null
6790
6949
  balances:
6791
- - id: 501
6792
- date: "2026-01-01"
6950
+ - type: historical
6951
+ id: 501
6952
+ month: "2026-01"
6793
6953
  balance: "1250.0000"
6794
6954
  currency: usd
6795
6955
  to_base: 1250
@@ -6801,16 +6961,16 @@ paths:
6801
6961
  schema:
6802
6962
  $ref: "#/components/schemas/errorResponseObject"
6803
6963
  examples:
6804
- missing paired date:
6964
+ missing paired month:
6805
6965
  value:
6806
6966
  message: Request Validation Failure
6807
6967
  errors:
6808
- - errMsg: "`start_date` and `end_date` must either both be provided or both be omitted."
6809
- invalid range:
6968
+ - errMsg: "`start_month` and `end_month` must either both be provided or both be omitted."
6969
+ invalid month format:
6810
6970
  value:
6811
- message: Request Validation Failure
6971
+ message: Invalid Request Parameters
6812
6972
  errors:
6813
- - errMsg: "`start_date` must be before or equal to `end_date`."
6973
+ - errMsg: "Invalid value for parameter: 'start_month'. '2026-06-01' is not a valid month in YYYY-MM format."
6814
6974
  "401":
6815
6975
  $ref: "#/components/responses/unauthorizedToken"
6816
6976
  "404":
@@ -6839,20 +6999,19 @@ paths:
6839
6999
  - balance_history
6840
7000
  summary: Upsert balance history for an account
6841
7001
  description: |-
6842
- Upsert one or more historical balance entries for a single manual, Plaid, manual crypto, or deleted account. Crypto synced accounts require an additional `symbol` path parameter.<br><br>
6843
- The `account_type` path parameter identifies the type of account and the `account_id` path parameter identifies the specific id for that account type.<br><br>
6844
- Submit one or more entries in the `balances` array. Each entry must specify a `date` and `balance` value.<br><br>
6845
- Balance history is monthly. Each entry's `date` must be the first day of a month and must be in a past month.<br><br>
7002
+ Upsert one or more historical balance entries for a single manual, Plaid, manual crypto, or deleted account. For synced crypto symbol streams, use [PUT /balance_history/crypto_synced/{account_id}/{symbol}](#tag/balance-history/PUT/balance_history/crypto_synced/{account_id}/{symbol}).<br><br>
7003
+ The `account_type` path parameter identifies the account family (`manual`, `plaid`, `crypto_manual`, or `deleted`) and `account_id` identifies the account within that family.<br><br>
7004
+ Submit one or more entries in the `balances` array. Each entry must specify a `month` (YYYY-MM) and `balance` value. `month` must be a past calendar month. The current month cannot be written through this endpoint.<br><br>
6846
7005
  `currency` may be provided for any balance entry. If omitted, it defaults to the account currency for manual/Plaid accounts, or the user's primary currency for crypto/deleted accounts.<br><br>
6847
- `symbol` may only be set when `account_type` is `crypto_manual` or `crypto_synced`. It is optional for `crypto_manual` accounts and tolerated for `deleted` accounts.<br><br>
6848
- `crypto_balance` may be provided for `crypto_manual`, `crypto_synced`, and `deleted` accounts, and is invalid for `manual` or `plaid` accounts.<br><br>
6849
- The response contains only the balance entries that were submitted in this request.
7006
+ `symbol` may be set for `crypto_manual` (optional) and `deleted` (tolerated) accounts. Do not provide it for `manual` or `plaid` accounts.<br><br>
7007
+ `crypto_balance` may be provided for `crypto_manual` and `deleted` accounts. It is invalid for `manual` or `plaid` accounts.<br><br>
7008
+ The response contains only the `type: historical` balance entries that were submitted in this request.
6850
7009
  operationId: upsertBalanceHistoryForAccount
6851
7010
  parameters:
6852
7011
  - name: account_type
6853
7012
  in: path
6854
7013
  required: true
6855
- description: Source family to update. Use `manual`, `plaid`, `crypto_manual`, or `deleted`.
7014
+ description: Account family to update. Use `manual`, `plaid`, `crypto_manual`, or `deleted`.
6856
7015
  schema:
6857
7016
  type: string
6858
7017
  enum: [manual, plaid, crypto_manual, deleted]
@@ -6873,21 +7032,21 @@ paths:
6873
7032
  manual account bulk upsert:
6874
7033
  value:
6875
7034
  balances:
6876
- - date: "2026-03-01"
7035
+ - month: "2026-03"
6877
7036
  balance: "41500.0000"
6878
- - date: "2026-04-01"
7037
+ - month: "2026-04"
6879
7038
  balance: "41625.5000"
6880
7039
  crypto manual balance with symbol:
6881
7040
  value:
6882
7041
  balances:
6883
- - date: "2026-03-01"
7042
+ - month: "2026-03"
6884
7043
  balance: "56011.1200"
6885
7044
  symbol: btc
6886
7045
  crypto_balance: "0.852341920145782301"
6887
7046
  deleted account bulk upsert:
6888
7047
  value:
6889
7048
  balances:
6890
- - date: "2026-03-01"
7049
+ - month: "2026-03"
6891
7050
  symbol: btc
6892
7051
  crypto_balance: "0.020000000000000000"
6893
7052
  currency: usd
@@ -6896,55 +7055,59 @@ paths:
6896
7055
  value:
6897
7056
  balances:
6898
7057
  - id: 601
6899
- date: "2026-03-01"
7058
+ month: "2026-03"
6900
7059
  balance: "41500.0000"
6901
7060
  currency: usd
6902
7061
  to_base: 41500
6903
7062
  crypto_balance: null
6904
7063
  responses:
6905
7064
  "200":
6906
- description: Returns the modified balance entries only. Other historical
6907
- entries for the account are omitted from `balances`.
7065
+ description: >-
7066
+ Returns only the `type: historical` entries modified by this request.
7067
+ Other historical entries for the account are omitted from `balances`.
6908
7068
  content:
6909
7069
  application/json:
6910
7070
  schema:
6911
7071
  $ref: "#/components/schemas/balanceHistoryAccountObject"
6912
7072
  examples:
6913
7073
  manual account bulk upsert:
6914
- summary: Two upserted rows returned (not full account history)
7074
+ summary: Two upserted entries returned (not full account history)
6915
7075
  value:
6916
7076
  source:
6917
7077
  type: manual
6918
7078
  manual_account_id: 119807
6919
7079
  balances:
6920
- - id: 601
6921
- date: "2026-03-01"
7080
+ - type: historical
7081
+ id: 601
7082
+ month: "2026-03"
6922
7083
  balance: "41500.0000"
6923
7084
  currency: usd
6924
7085
  to_base: 41500
6925
7086
  crypto_balance: null
6926
- - id: 602
6927
- date: "2026-04-01"
7087
+ - type: historical
7088
+ id: 602
7089
+ month: "2026-04"
6928
7090
  balance: "41625.5000"
6929
7091
  currency: usd
6930
7092
  to_base: 41625.5
6931
7093
  crypto_balance: null
6932
7094
  crypto manual balance with symbol:
6933
- summary: Single upserted row returned
7095
+ summary: Single upserted entry returned
6934
7096
  value:
6935
7097
  source:
6936
7098
  type: crypto_manual
6937
7099
  crypto_manual_id: 22001
6938
7100
  symbol: btc
6939
7101
  balances:
6940
- - id: 603
6941
- date: "2026-03-01"
7102
+ - type: historical
7103
+ id: 603
7104
+ month: "2026-03"
6942
7105
  balance: "56011.1200"
6943
7106
  currency: usd
6944
7107
  to_base: 56011.12
6945
7108
  crypto_balance: "0.852341920145782301"
6946
7109
  deleted account bulk upsert:
6947
- summary: Single upserted row returned
7110
+ summary: Single upserted entry returned
6948
7111
  value:
6949
7112
  source:
6950
7113
  type: deleted
@@ -6957,15 +7120,17 @@ paths:
6957
7120
  mask: "1234"
6958
7121
  symbol: btc
6959
7122
  balances:
6960
- - id: 504
6961
- date: "2026-03-01"
7123
+ - type: historical
7124
+ id: 504
7125
+ month: "2026-03"
6962
7126
  balance: "1255"
6963
7127
  currency: usd
6964
7128
  to_base: 1255
6965
7129
  crypto_balance: "0.020000000000000000"
6966
7130
  "400":
6967
- description: Bad Request. The entire request is rejected if any row in
6968
- `balances` fails validation; no rows are updated.
7131
+ description: >-
7132
+ Bad Request. If any entry in `balances` fails validation, the entire
7133
+ request is rejected and no entries are updated.
6969
7134
  content:
6970
7135
  application/json:
6971
7136
  schema:
@@ -6986,30 +7151,34 @@ paths:
6986
7151
  message: Invalid Request Body
6987
7152
  errors:
6988
7153
  - errMsg: "Invalid property 'foo' in request body."
6989
- invalid date:
7154
+ invalid month format:
7155
+ value:
7156
+ message: Invalid Request Body
7157
+ errors:
7158
+ - errMsg: "Invalid value for property 'balances.0.month'. '2026-06-01' is not a valid month in YYYY-MM format."
7159
+ current month:
6990
7160
  value:
6991
7161
  message: Request Validation Failure
6992
7162
  errors:
6993
- - errMsg: "`date` must be the first day of a month."
7163
+ - errMsg: "`month` must not be the current month."
6994
7164
  request_balances_index: 0
6995
- code: VALIDATION_ERROR
6996
- future date:
7165
+ future month:
6997
7166
  value:
6998
7167
  message: Request Validation Failure
6999
7168
  errors:
7000
- - errMsg: "`date` must be in a past month."
7169
+ - errMsg: "`month` must not be in the future."
7001
7170
  request_balances_index: 1
7002
7171
  crypto balance not allowed:
7003
7172
  value:
7004
7173
  message: Request Validation Failure
7005
7174
  errors:
7006
- - errMsg: "`crypto_balance` may only be set when `account_type` is `crypto_manual`, `crypto_synced`, or `deleted`."
7175
+ - errMsg: "`crypto_balance` may only be set when `account_type` is `crypto_manual` or `deleted`."
7007
7176
  request_balances_index: 0
7008
- invalid row in bulk request:
7177
+ invalid entry in bulk request:
7009
7178
  value:
7010
7179
  message: Request Validation Failure
7011
7180
  errors:
7012
- - errMsg: "`symbol` may only be set when `account_type` is `crypto_manual` or `crypto_synced`."
7181
+ - errMsg: "`symbol` may only be set when `account_type` is `crypto_manual` or `deleted`."
7013
7182
  request_balances_index: 1
7014
7183
  "401":
7015
7184
  $ref: "#/components/responses/unauthorizedToken"
@@ -7032,13 +7201,13 @@ paths:
7032
7201
  - balance_history
7033
7202
  summary: Delete all balance history for an account
7034
7203
  description: |-
7035
- Delete all historical balance entries for a single manual, Plaid, manual crypto, or deleted account. Crypto synced accounts require an additional `symbol` path parameter.
7204
+ Delete all historical balance entries for a single manual, Plaid, manual crypto, or deleted account. For synced crypto symbol streams, use [DELETE /balance_history/crypto_synced/{account_id}/{symbol}](#tag/balance-history/DELETE/balance_history/crypto_synced/{account_id}/{symbol}).
7036
7205
  operationId: deleteBalanceHistoryForAccount
7037
7206
  parameters:
7038
7207
  - name: account_type
7039
7208
  in: path
7040
7209
  required: true
7041
- description: Source family to delete. Use `manual`, `plaid`, `crypto_manual`, or `deleted`.
7210
+ description: Account family to delete. Use `manual`, `plaid`, `crypto_manual`, or `deleted`.
7042
7211
  schema:
7043
7212
  type: string
7044
7213
  enum: [manual, plaid, crypto_manual, deleted]
@@ -7076,9 +7245,9 @@ paths:
7076
7245
  - balance_history
7077
7246
  summary: Get balance history for a synced crypto symbol
7078
7247
  description: |-
7079
- Retrieve historical balance entries for a single synced crypto symbol stream.<br><br>
7080
- Use the `crypto_synced` account id together with a `symbol` path parameter to select one balance stream within that synced crypto account.<br><br>
7081
- When `start_date` and `end_date` are both provided, they must be first-of-month dates. `start_date` must not be in the future, while `end_date` may be in the future. If one of `start_date` or `end_date` is provided, the other is required. If neither is provided, all available history for the symbol stream is returned.
7248
+ Retrieve monthly balance history for a single synced crypto symbol stream.<br><br>
7249
+ The path selects one balance stream with a synced crypto account id and `symbol`.<br><br>
7250
+ `start_month`, `end_month`, and current-month entries behave as described in [GET /balance_history](#tag/balance-history/GET/balance_history).
7082
7251
  operationId: getBalanceHistoryForCryptoSynced
7083
7252
  parameters:
7084
7253
  - name: account_id
@@ -7096,23 +7265,27 @@ paths:
7096
7265
  type: string
7097
7266
  minLength: 1
7098
7267
  maxLength: 25
7099
- - name: start_date
7268
+ - name: start_month
7100
7269
  in: query
7101
- description: Optional start date for the requested history range in YYYY-MM-DD format. If set, `end_date` is also required. This must be the first day of a month and must not be in the future.
7270
+ description: >-
7271
+ Optional. Same format and constraints as `start_month` on
7272
+ [GET /balance_history](#tag/balance-history/GET/balance_history).
7102
7273
  required: false
7103
7274
  schema:
7104
7275
  type: string
7105
- format: date
7106
- - name: end_date
7276
+ pattern: '^\d{4}-(0[1-9]|1[0-2])$'
7277
+ - name: end_month
7107
7278
  in: query
7108
- description: Optional end date for the requested history range in YYYY-MM-DD format. If set, `start_date` is also required. This must be the first day of a month.
7279
+ description: >-
7280
+ Optional. Same format and constraints as `end_month` on
7281
+ [GET /balance_history](#tag/balance-history/GET/balance_history).
7109
7282
  required: false
7110
7283
  schema:
7111
7284
  type: string
7112
- format: date
7285
+ pattern: '^\d{4}-(0[1-9]|1[0-2])$'
7113
7286
  responses:
7114
7287
  "200":
7115
- description: Historical balance entries for the synced crypto symbol stream
7288
+ description: Monthly balance history for the synced crypto symbol stream
7116
7289
  content:
7117
7290
  application/json:
7118
7291
  schema:
@@ -7124,8 +7297,9 @@ paths:
7124
7297
  crypto_synced_id: 33004
7125
7298
  symbol: btc
7126
7299
  balances:
7127
- - id: 401
7128
- date: "2026-02-01"
7300
+ - type: historical
7301
+ id: 401
7302
+ month: "2026-02"
7129
7303
  balance: "6231.2800"
7130
7304
  currency: usd
7131
7305
  to_base: 6231.28
@@ -7137,16 +7311,16 @@ paths:
7137
7311
  schema:
7138
7312
  $ref: "#/components/schemas/errorResponseObject"
7139
7313
  examples:
7140
- missing paired date:
7314
+ missing paired month:
7141
7315
  value:
7142
7316
  message: Request Validation Failure
7143
7317
  errors:
7144
- - errMsg: "`start_date` and `end_date` must either both be provided or both be omitted."
7145
- invalid range:
7318
+ - errMsg: "`start_month` and `end_month` must either both be provided or both be omitted."
7319
+ invalid month format:
7146
7320
  value:
7147
- message: Request Validation Failure
7321
+ message: Invalid Request Parameters
7148
7322
  errors:
7149
- - errMsg: "`start_date` must be before or equal to `end_date`."
7323
+ - errMsg: "Invalid value for parameter: 'start_month'. '2026-06-01' is not a valid month in YYYY-MM format."
7150
7324
  "401":
7151
7325
  $ref: "#/components/responses/unauthorizedToken"
7152
7326
  "404":
@@ -7177,12 +7351,11 @@ paths:
7177
7351
  description: |-
7178
7352
  Upsert one or more historical balance entries for a single synced crypto symbol stream.<br><br>
7179
7353
  The path identifies both the synced crypto account and the symbol being updated.<br><br>
7180
- Submit one or more entries in the `balances` array. Each entry must specify a `date` and `balance` value.<br><br>
7181
- Balance history is monthly. Each entry's `date` must be the first day of a month and must be in a past month.<br><br>
7354
+ Submit one or more entries in the `balances` array. Each entry must specify a `month` (YYYY-MM) and `balance` value. `month` must be a past calendar month. The current month cannot be written through this endpoint.<br><br>
7182
7355
  The request body may include an optional `symbol` on each balance entry. If provided, it must match the `symbol` path parameter. Omit `symbol` to use the path value.<br><br>
7183
7356
  `currency` may be provided for any balance entry. If omitted, it defaults to the user's primary currency for synced crypto balances.<br><br>
7184
7357
  `crypto_balance` may be provided for synced crypto balances.<br><br>
7185
- The response contains only the balance entries that were submitted in this request.
7358
+ The response contains only the `type: historical` balance entries that were submitted in this request.
7186
7359
  operationId: upsertBalanceHistoryForCryptoSynced
7187
7360
  parameters:
7188
7361
  - name: account_id
@@ -7210,44 +7383,49 @@ paths:
7210
7383
  synced crypto bulk upsert:
7211
7384
  value:
7212
7385
  balances:
7213
- - date: "2026-03-01"
7386
+ - month: "2026-03"
7214
7387
  balance: "6400.0000"
7215
7388
  crypto_balance: "0.100020003000400050"
7216
- - date: "2026-04-01"
7389
+ - month: "2026-04"
7217
7390
  balance: "6500.0000"
7218
7391
  crypto_balance: "0.100020003000400050"
7219
7392
  responses:
7220
7393
  "200":
7221
- description: Returns the modified balance entries only. Other historical
7222
- entries for the symbol stream are omitted from `balances`.
7394
+ description: >-
7395
+ Returns only the `type: historical` entries modified by this request.
7396
+ Other historical entries for the symbol stream are omitted from
7397
+ `balances`.
7223
7398
  content:
7224
7399
  application/json:
7225
7400
  schema:
7226
7401
  $ref: "#/components/schemas/balanceHistoryAccountObject"
7227
7402
  examples:
7228
7403
  synced crypto bulk upsert:
7229
- summary: Two upserted rows returned (not full symbol history)
7404
+ summary: Two upserted entries returned (not full symbol history)
7230
7405
  value:
7231
7406
  source:
7232
7407
  type: crypto_synced
7233
7408
  crypto_synced_id: 33004
7234
7409
  symbol: btc
7235
7410
  balances:
7236
- - id: 604
7237
- date: "2026-03-01"
7411
+ - type: historical
7412
+ id: 604
7413
+ month: "2026-03"
7238
7414
  balance: "6400.0000"
7239
7415
  currency: usd
7240
7416
  to_base: 6400
7241
7417
  crypto_balance: "0.100020003000400050"
7242
- - id: 605
7243
- date: "2026-04-01"
7418
+ - type: historical
7419
+ id: 605
7420
+ month: "2026-04"
7244
7421
  balance: "6500.0000"
7245
7422
  currency: usd
7246
7423
  to_base: 6500
7247
7424
  crypto_balance: "0.100020003000400050"
7248
7425
  "400":
7249
- description: Bad Request. The entire request is rejected if any row in
7250
- `balances` fails validation; no rows are updated.
7426
+ description: >-
7427
+ Bad Request. If any entry in `balances` fails validation, the entire
7428
+ request is rejected and no entries are updated.
7251
7429
  content:
7252
7430
  application/json:
7253
7431
  schema:
@@ -7263,17 +7441,22 @@ paths:
7263
7441
  message: Invalid Request Body
7264
7442
  errors:
7265
7443
  - errMsg: "Invalid value for property 'balances'. Array must contain at least 1 element(s)"
7266
- invalid date:
7444
+ invalid month format:
7445
+ value:
7446
+ message: Invalid Request Body
7447
+ errors:
7448
+ - errMsg: "Invalid value for property 'balances.0.month'. '2026-06-01' is not a valid month in YYYY-MM format."
7449
+ current month:
7267
7450
  value:
7268
7451
  message: Request Validation Failure
7269
7452
  errors:
7270
- - errMsg: "`date` must be the first day of a month."
7453
+ - errMsg: "`month` must not be the current month."
7271
7454
  request_balances_index: 0
7272
- future date:
7455
+ future month:
7273
7456
  value:
7274
7457
  message: Request Validation Failure
7275
7458
  errors:
7276
- - errMsg: "`date` must be in a past month."
7459
+ - errMsg: "`month` must not be in the future."
7277
7460
  request_balances_index: 1
7278
7461
  symbol mismatch:
7279
7462
  value:
@@ -7281,9 +7464,9 @@ paths:
7281
7464
  errors:
7282
7465
  - errMsg: "`symbol` in request body (doge) does not match the path symbol (eth)."
7283
7466
  request_balances_index: 0
7284
- invalid row in bulk request:
7467
+ invalid entry in bulk request:
7285
7468
  value:
7286
- message: Request Validation Failure
7469
+ message: Invalid Request Body
7287
7470
  errors:
7288
7471
  - errMsg: "`balance` must be a valid numeric string or number."
7289
7472
  request_balances_index: 1
@@ -7359,13 +7542,13 @@ paths:
7359
7542
  - balance_history
7360
7543
  summary: Delete a balance history entry
7361
7544
  description: |-
7362
- Delete a single monthly balance history entry by its id.
7545
+ Delete a single stored (`type: historical`) monthly balance history entry by its id. Ephemeral `current` entries cannot be deleted this way.
7363
7546
  operationId: deleteBalanceHistoryEntry
7364
7547
  parameters:
7365
7548
  - name: id
7366
7549
  in: path
7367
7550
  required: true
7368
- description: Balance history row identifier to delete.
7551
+ description: Historical balance entry identifier to delete.
7369
7552
  schema:
7370
7553
  type: integer
7371
7554
  format: int32
@@ -7379,7 +7562,7 @@ paths:
7379
7562
  schema:
7380
7563
  $ref: "#/components/schemas/errorResponseObject"
7381
7564
  example:
7382
- message: Request Validation Failure
7565
+ message: Invalid Path Parameters
7383
7566
  errors:
7384
7567
  - errMsg: "Invalid value type for path parameter: 'id'. Expected 'number', received 'string'."
7385
7568
  "401":
@@ -7405,7 +7588,7 @@ paths:
7405
7588
  summary: Update details for a deleted account
7406
7589
  description: |-
7407
7590
  Update archived metadata for a deleted balance history source.<br><br>
7408
- Pass the `deleted` source id returned on `source.deleted_account_id`. This endpoint updates the stored deleted-source metadata used for all historical entries associated with that deleted source.
7591
+ Pass the `deleted_account_id` from a `source.type: deleted` entry. The update applies to all historical entries associated with that deleted source.
7409
7592
  operationId: updateBalanceHistoryDetails
7410
7593
  parameters:
7411
7594
  - name: account_id