Skip to content

sb745/actual-http

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Actual Budget HTTP Wrapper

python Maintenance

A simple FastAPI-based wrapper that allows you to interact with Actual Budget via a minimal HTTP API, forked from actual-api-rest. Uses the actualpy module under the hood.

Fork changes

  • Can now get budget and accounts info
  • Requests instance password and filename instead of storing them in environment variables
  • Removed useless API key verification
  • More under the hood changes

Setup

Create a .env file with the following variable:

ACTUAL_HOST="https://your-actual-budget-host.com"

Usage

Using Docker

docker compose up --build --detach

Local install

Note

Untested by me but it should probably work.

pip install -r requirements.txt
uvicorn main:app --reload

API Reference

Headers:

Content-Type: application/json
x-actual-password: your_actual_password
x-actual-encryption-password: encryption_password_if_present
x-actual-file: file_name_or_id

POST /transaction/add

Adds a new transaction.

Body:

{
  "amount": 12.99,
  "payee": "Spotify",
  "account": "Bank",
  "category": "Subscriptions",
  "notes": "Monthly plan",
  "payment": true,
  "cleared": true
}

GET /budget/{year}/{month}

Gets the specified month's budget in JSON format.

GET /budget/current

Gets the current month's budget in JSON format.

GET /accounts/balances

Gets the current account balances in JSON format.

GET /health

Check API health.

License

This project is licensed under the MIT License.

About

Actual Budget API Wrapper

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 96.6%
  • Dockerfile 3.4%