All Projects → fhqvst → Avanza

fhqvst / Avanza

Licence: mit
A JavaScript client for the unofficial Avanza API

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Avanza

Langxdblog
一名项目兼产品管理老鸟的心得体会
Stars: ✭ 153 (-13.56%)
Mutual labels:  finance
Simfin
Simple financial data for Python
Stars: ✭ 162 (-8.47%)
Mutual labels:  finance
Alpha Mind
quantitative security portfolio analysis. The analysis pipeline including data storage abstraction, alpha calculation, ML based alpha combining and portfolio calculation.
Stars: ✭ 171 (-3.39%)
Mutual labels:  finance
Datagene
DataGene - Identify How Similar TS Datasets Are to One Another (by @firmai)
Stars: ✭ 156 (-11.86%)
Mutual labels:  finance
Algorithmictrading
This repository contains three ways to obtain arbitrage which are Dual Listing, Options and Statistical Arbitrage. These are projects in collaboration with Optiver and have been peer-reviewed by staff members of Optiver.
Stars: ✭ 157 (-11.3%)
Mutual labels:  finance
Learnpythonforresearch
This repository provides everything you need to get started with Python for (social science) research.
Stars: ✭ 163 (-7.91%)
Mutual labels:  finance
Tiingo Python
Python REST Client for interacting with the Tiingo Financial Data API
Stars: ✭ 152 (-14.12%)
Mutual labels:  finance
Machine Learning And Reinforcement Learning In Finance
Machine Learning and Reinforcement Learning in Finance New York University Tandon School of Engineering
Stars: ✭ 173 (-2.26%)
Mutual labels:  finance
Bdgt
Big finance tools in a small package
Stars: ✭ 159 (-10.17%)
Mutual labels:  finance
Ynab Sdk Js
YNAB API JavaScript Library
Stars: ✭ 167 (-5.65%)
Mutual labels:  finance
Piggyvault
Family finance management app.
Stars: ✭ 152 (-14.12%)
Mutual labels:  finance
Bot18
Bot18 is a high-frequency cryptocurrency trading bot developed by Zenbot creator @carlos8f
Stars: ✭ 157 (-11.3%)
Mutual labels:  finance
Pandas Datareader
Extract data from a wide range of Internet sources into a pandas DataFrame.
Stars: ✭ 2,183 (+1133.33%)
Mutual labels:  finance
Pyportfolioopt
Financial portfolio optimisation in python, including classical efficient frontier, Black-Litterman, Hierarchical Risk Parity
Stars: ✭ 2,502 (+1313.56%)
Mutual labels:  finance
Piecash
Pythonic interface to GnuCash SQL documents
Stars: ✭ 172 (-2.82%)
Mutual labels:  finance
Pipeline Live
Pipeline Extension for Live Trading
Stars: ✭ 154 (-12.99%)
Mutual labels:  finance
Presentations
Slide show presentations regarding data driven investing.
Stars: ✭ 162 (-8.47%)
Mutual labels:  finance
Dart Fss
한국 금융감독원에서 운영하는 다트(Dart) 시스템 크롤링을 위한 라이브러리
Stars: ✭ 177 (+0%)
Mutual labels:  finance
Fireflymobile
Mobile Application for Firefly III written in Kotlin
Stars: ✭ 172 (-2.82%)
Mutual labels:  finance
Mixture model trading public
Stars: ✭ 166 (-6.21%)
Mutual labels:  finance

Avanza Build Status

A Node.js wrapper for the unofficial Avanza API. Please note that this is only a proof of concept, hence not meant to be used by anyone.

It might also be valuable to note that I am not affiliated with Avanza Bank AB in any way. The underlying API can be taken down or changed without warning at any point in time.

Interested in finance?

Talos is hiring senior engineers! Send an email to filip+hiring at talos.com.

Installation

Install via npm

$ npm install avanza

Documentation

Refer to API.md.

Getting a TOTP Secret

NOTE: Since May 2018 two-factor authentication is used to log in.

Here are the steps to get your TOTP Secret:

  1. Go to Mina Sidor > Profil > Sajtinställningar > Tvåfaktorsinloggning and click "Återaktivera". (Only do this step if you have already set up two-factor auth.)
  2. Click "Aktivera" on the next screen.
  3. Select "Annan app för tvåfaktorsinloggning".
  4. Click "Kan du inte scanna QR-koden?" to reveal your TOTP Secret.
  5. Finally, run node -e "console.log(require('avanza/dist/totp')('PASTE_YOUR_TOTP_SECRET_HERE'))" to generate an initial code.
  6. Done! From now on all you have to do is supply your secret in the authenticate() function as in the example below.

Example

Authenticate and fetch currently held positions:

import Avanza from 'avanza'
const avanza = new Avanza()

avanza.authenticate({
  username: 'MY_USERNAME',
  password: 'MY_PASSWORD',
  totpSecret: 'MY_TOTP_SECRET'
}).then(async () => {
  const positions = await avanza.getPositions()
  console.log(positions)
})

Authenticate and subscribe to real-time data:

import Avanza from 'avanza'
const avanza = new Avanza()

avanza.authenticate({
  username: 'USERNAME',
  password: 'PASSWORD',
  totpSecret: 'MY_TOTP_SECRET'
}).then(() => {
  avanza.subscribe(Avanza.QUOTES, '5479', (quote) => {
    console.log('Received quote:', quote)
  })
})

Documentation

Refer to API.md.

Tests

Tests will not run without an .env file. Use the .env-example as reference.

$ npm test

LICENSE

MIT license. See the LICENSE file for details.

RESPONSIBILITIES

The author of this software is not responsible for any indirect damages (foreseeable or unforeseeable), such as, if necessary, loss or alteration of or fraudulent access to data, accidental transmission of viruses or of any other harmful element, loss of profits or opportunities, the cost of replacement goods and services or the attitude and behavior of a third party.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].