### Configure MacOS launchd agent Source: https://github.com/azerpas/bourso-api/blob/main/README.md Create a plist file in ~/Library/LaunchAgents/ to schedule script execution on MacOS. Replace YOUR_USER with your actual system username. ```xml Label com.azerpas.bourso-cli ProgramArguments /Users/YOUR_USER/bourso-launchd.sh StartCalendarInterval Weekday 1 Hour 20 Minute 00 RunAtLoad StandardOutPath /Users/YOUR_USER/bourso-launchd-cli-stdout.log StandardErrorPath /Users/YOUR_USER/bourso-launchd-cli-stderr.log ``` -------------------------------- ### Retrieve Account Information Source: https://github.com/azerpas/bourso-api/blob/main/README.md List all available bank and trading accounts. ```bash ./bourso-cli accounts ``` ```text [ Account { id: "1a2953bd1a28a37bd3fe89d32986e613", name: "BoursoBank", balance: 100, bank_name: "BoursoBank", kind: Banking, }, Account { id: "a583f3c5842c34fb00b408486ef493e0", name: "PEA DOE", balance: 1000000, bank_name: "BoursoBank", kind: Trading, }, ] ``` -------------------------------- ### Build Bourso CLI from Source Source: https://github.com/azerpas/bourso-api/blob/main/README.md Clone the repository and build the binary using Cargo. Requires Rust 1.77.2 or higher. ```sh git clone git@github.com:azerpas/bourso-api.git cd bourso-api cargo build --release # You can run any command from the built application, e.g: ./target/release/bourso-cli config ``` -------------------------------- ### Place a Trading Order Source: https://github.com/azerpas/bourso-api/blob/main/README.md Execute a buy order for a specific asset using its symbol and account ID. ```bash ./bourso-cli trade order new --side buy --symbol 1rTCW8 --account a583f3c5842c34fb00b408486ef493e0 --quantity 4 ``` -------------------------------- ### Configure Bourso CLI Source: https://github.com/azerpas/bourso-api/blob/main/README.md Save your client ID for future sessions. The password is requested at runtime. ```bash ./bourso-cli config ``` -------------------------------- ### Load MacOS launchd agent Source: https://github.com/azerpas/bourso-api/blob/main/README.md Register the plist file with launchctl to activate the scheduled task. ```sh launchctl load ~/Library/LaunchAgents/com.bourso-cli.plist ``` -------------------------------- ### Set script permissions on MacOS Source: https://github.com/azerpas/bourso-api/blob/main/README.md Make the shell script executable and set appropriate permissions before loading the agent. ```sh chmod +x bourso-launchd.sh chown 777 bourso-launchd.sh ``` -------------------------------- ### Verify Binary Integrity with SLSA Source: https://github.com/azerpas/bourso-api/blob/main/README.md Use slsa-verifier to ensure the binary has not been tampered with. ```sh slsa-verifier-darwin-arm64 verify-artifact --provenance-path provenance-id-macos-latest.intoto.jsonl --source-uri "github.com/azerpas/bourso-api" bourso-cli ``` ```text Verifying artifact ~/bourso-cli: PASSED ``` -------------------------------- ### Configure Windows Scheduled Task Source: https://github.com/azerpas/bourso-api/blob/main/README.md Use PowerShell to register a new scheduled task for executing trades. Ensure the path to bourso-cli.exe is updated correctly. ```ps1 # Create a new task trigger that will run weekly on Sunday at 1:00pm $trigger = New-ScheduledTaskTrigger -Weekly -DaysOfWeek Sunday -At 1:00PM # Create a new task action that will execute the trade based on the trigger defined above $action = New-ScheduledTaskAction -Execute "PowerShell.exe" -Argument "-NoExit -Command `"& { `$exePath = 'C:\Path\To\bourso-cli.exe'; `$arguments = 'trade order new --side buy --symbol 1rTCW8 --account a583f3c5842c34fb00b408486ef493e0 --quantity 4'; Start-Process -FilePath `$exePath -ArgumentList `$arguments -NoNewWindow -Wait }`"" # Create a task named "Weekly Bourso CLI Task" Register-ScheduledTask -TaskName "Weekly Bourso CLI Task" -Trigger $trigger -Action $action ``` -------------------------------- ### Approve Bourso CLI on MacOS Source: https://github.com/azerpas/bourso-api/blob/main/README.md Run this command to remove the quarantine attribute from the binary after moving it to the Applications folder. ```bash xattr -r -d com.apple.quarantine /path/to/bourso-cli ``` -------------------------------- ### Transfer Funds Between Accounts Source: https://github.com/azerpas/bourso-api/blob/main/README.md Transfer a specified amount between two accounts. The minimum amount is 10.0â‚Ŧ. ```bash ./bourso-cli transfer --account a583f3c5842c34fb00b408486ef493e0 --to b419f2d28010bafb331badef11bba51e --amount 10 ``` -------------------------------- ### Retrieve Asset Quotes Source: https://github.com/azerpas/bourso-api/blob/main/README.md Fetch historical quote data for a specific asset symbol. ```bash ➜ ~ ./bourso-cli quote --symbol 1rTCW8 average INFO bourso_cli > Welcome to BoursoBank CLI 👋 INFO bourso_cli > â„šī¸ - Version 0.1.6. Make sure you're running the latest version: https://github.com/azerpas/bourso-api INFO bourso_cli > Fetching quotes... INFO bourso_cli > Average quote: 494.5348136363637 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.