项目作者: ntftrader

项目描述 :
Uonfficial wrapper for financial data api from the Scandinavian broker Nordnet
高级语言: Python
项目地址: git://github.com/ntftrader/nordnet.git
创建时间: 2020-01-19T17:51:37Z
项目社区:https://github.com/ntftrader/nordnet

开源协议:

下载


Nordnet

A python wrapper around Scandinavian broker Nordnet‘s external REST api.

Install

  1. pip install git+https://github.com/ntftrader/nordnet.git

Or a specific version (tag):

  1. pip install git+https://github.com/ntftrader/nordnet.git@1.0.0

Requirements are requests, pandas, numpy and simplejson.

Simple

  1. from nordnet import Nordnet
  2. nn = Nordnet()
  3. nn.main_search("DNB")
  4. (True, [{'instrument_id': 16105640, 'symbol': 'DNB', 'name': 'DNB', 'exchange_country': 'NO'},
  5. {'instrument_id': 16121046, 'symbol': 'DNB', 'name': 'Dun & Bradstreet Corporation (The)', 'exchange_country': 'US'},
  6. {'instrument_id': 16117764, 'symbol': 'DNBF', 'name': 'DNB Financial Corp', 'exchange_country': 'US'}])

Data structures

Methods calling the REST api will return a tuple (status, results) where status is a boolean and results a list.

The status boolean is True if the GET request returns http 200.

All methods with name ending with *_pd returns a pandas Dataframe.

  1. df = nn.get_trades_pd(instrument_id=16117764, vwap=True, turnover=False)
  2. df.tail()