https://github.com/codler/avanza-api
Avanza API
https://github.com/codler/avanza-api
Last synced: 7 months ago
JSON representation
Avanza API
- Host: GitHub
- URL: https://github.com/codler/avanza-api
- Owner: codler
- Created: 2019-09-26T08:53:50.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-07-07T12:53:47.000Z (over 3 years ago)
- Last Synced: 2025-05-25T20:59:51.252Z (8 months ago)
- Language: TypeScript
- Size: 30.3 KB
- Stars: 5
- Watchers: 3
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# Avanza API
## Install
```
npm i avanza-api
```
## Usage
```js
import Avanza from "avanza-api";
const avanza = new Avanza();
await avanza.authenticate({
username: "",
password: "",
totpSecret: ""
});
if (avanza.isAuthenticated) {
const accounts = await avanza.getAccounts();
console.log(accounts);
}
```
### Login with BankId
```js
avanza.authenticate({
personnummer: "123456789012"
});
```
If multiple username are connected to your BankId, you will need to choose which to login by adding username key.
```js
avanza.authenticate({
username: "",
personnummer: "123456789012"
});
```