| Attribute Name | Type | Nullable | Description |
|---|---|---|---|
| id | number | false | Unique identifier for asset |
| type_name | string | false | Primary type of the asset. Must be one of:
|
| subtype_name | string | true | Optional asset subtype. Examples include:
|
| name | string | false | Name of the asset |
| display_name | string | true | Display name of the asset (as set by user) |
| balance | string | false | Current balance of the asset in numeric format to 4 decimal places |
| to_base | number | true | The balance converted to the user's primary currency |
| balance_as_of | string | false | Date/time the balance was last updated in ISO 8601 extended format |
| closed_on | string | true | The date this asset was closed (optional) |
| currency | string | false | Three-letter lowercase currency code of the balance in ISO 4217 format |
| institution_name | string | true | Name of institution holding the asset |
| exclude_transactions | boolean | false | If true, this asset will not show up as an option for assignment when creating transactions manually. |
| created_at | string | false | Date/time the asset was created in ISO 8601 extended format |
Use this endpoint to get a list of all manually-managed assets associated with the user's account.
GET https://api.lunchmoney.dev/v1/assets
Example 200 Response
{
"assets": [
{
"id": 72,
"type_name": "cash",
"subtype_name": "physical cash",
"name": "Test Asset 1",
"balance": "1201.0100",
"to_base": 1020.85,
"balance_as_of": "2020-01-26T12:27:22.000Z",
"currency": "cad",
"institution_name": "Bank of Me",
"exclude_transactions": false,
"created_at": "2020-01-26T12:27:22.726Z"
},
{
"id": 73,
"type_name": "credit",
"subtype_name": "credit card",
"name": "Test Asset 2",
"balance": "0.0000",
"to_base": 0,
"balance_as_of": "2020-01-26T12:27:22.000Z",
"currency": "usd",
"institution_name": "Bank of You",
"exclude_transactions": false,
"created_at": "2020-01-26T12:27:22.744Z"
},
{
"id": 74,
"type_name": "vehicle",
"subtype_name": "automobile",
"name": "Test Asset 3",
"balance": "99999999999.0000",
"to_base": 657179189.99,
"balance_as_of": "2020-01-26T12:27:22.000Z",
"currency": "jpy",
"institution_name": "Bank of Mom",
"exclude_transactions": false,
"created_at": "2020-01-26T12:27:22.755Z"
},
{
"id": 75,
"type_name": "loan",
"subtype_name": null,
"name": "Test Asset 4",
"balance": "10101010101.0000",
"to_base": 307687460.61,
"balance_as_of": "2020-01-26T12:27:22.000Z",
"currency": "twd",
"institution_name": null,
"exclude_transactions": true,
"created_at": "2020-01-26T12:27:22.765Z"
}
]
}
Use this endpoint to create a single (manually-managed) asset.
POST https://api.lunchmoney.dev/v1/assets
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| type_name | string | true | - | Must be one of: cash, credit, investment, other, real estate, loan, vehicle, cryptocurrency, employee compensation |
| subtype_name | string | false | - | Max 25 characters |
| name | string | true | - | Max 45 characters |
| display_name | string | false | - | Display name of the asset (as set by user) |
| balance | string | true | - | Numeric value of the current balance of the account. Do not include any special characters aside from a decimal point! |
| balance_as_of | string | false | Current timestamp | Has no effect if balance is not defined. If balance is defined, but balance_as_of is not supplied or is invalid, current timestamp will be used. |
| currency | string | false | User's primary currency | Three-letter lowercase currency in ISO 4217 format. The code sent must exist in our database. Defaults to user's primary currency. |
| institution_name | string | false | - | Max 50 characters |
| closed_on | string | false | - | The date this asset was closed |
| exclude_transactions | boolean | false | false | If true, this asset will not show up as an option for assignment when creating transactions manually |
Example 200 Response
{
"id": 34061,
"type_name": "depository",
"subtype_name": null,
"name": "My Test Asset",
"display_name": null,
"balance": "67.2100",
"to_base": 47.05,
"balance_as_of": "2022-05-29T21:35:36.557Z",
"closed_on": null,
"created_at": "2022-05-29T21:35:36.564Z",
"currency": "cad",
"institution_name": null,
"exclude_transactions": false
}
Use this endpoint to update a single asset.
PUT https://api.lunchmoney.dev/v1/assets/:id
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| type_name | string | false | - | Must be one of: cash, credit, investment, other, real estate, loan, vehicle, cryptocurrency, employee compensation |
| subtype_name | string | false | - | Max 25 characters |
| name | string | false | - | Max 45 characters |
| display_name | string | false | - | Display name of the asset (as set by user) |
| balance | string | false | - | Numeric value of the current balance of the account. Do not include any special characters aside from a decimal point! |
| balance_as_of | string | false | Current timestamp | Has no effect if balance is not defined. If balance is defined, but balance_as_of is not supplied or is invalid, current timestamp will be used. |
| currency | string | false | User's primary currency | Three-letter lowercase currency in ISO 4217 format. The code sent must exist in our database. Defaults to user's primary currency. |
| institution_name | string | false | - | Max 50 characters |
| closed_on | string | false | - | The date this asset was closed |
| exclude_transactions | boolean | false | false | If true, this asset will not show up as an option for assignment when creating transactions manually |
Example 200 Response
{
"id": 12,
"type_name": "cash",
"subtype_name": "savings",
"name": "TD Savings Account",
"balance": "28658.5300",
"to_base": 20061.34,
"balance_as_of": "2020-03-10T05:17:23.856Z",
"currency": "cad",
"institution_name": "TD Bank",
"exclude_transactions": false,
"created_at": "2019-08-10T22:46:19.486Z"
}
Example Error Response (sends as 200)
{
"errors": [
"type_name must be one of: cash, credit, investment, other, real estate, loan, vehicle, cryptocurrency, employee compensation"
]
}