Skip to content

Examples for connecting to the Nordnet API running on Python 3.5 and using the Crypto package with PKCS1_v1_5 and PublicKey

Notifications You must be signed in to change notification settings

larssonandreas/nordnet-api-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

Example client for connecting to the Nordnet API using Python 3.5 with the Crypto package using PKCS1_v1_5 and PublicKey encryption modules. The client is intended for demo and educational purposes but could be altered to be used for other purposes if needed.

Comments has been added in order to give brief guidance on what each section of the code does, however it is not intended to be a "learn-to-program"-tutorial and prior coding experience is advised.

The example code has (on purpose) been kept simple and scaled down in order to keep it to the bare essentials and therefor it DOES NOT include any exception/error handling or logging.

Up and running

The following steps needs to be completed in order to get the integration up and running.

  • Step 1: Getting a developer account
  • Step 2: Install code dependencies and run the provided code

Setting up the required accounts

Register an account with the Nordnet API developer program to setup a username and password to be used with the code. https://api.test.nordnet.se/

Installation

1. Download the example code
2. Add your credentials to the credentials.json file
3. run main.py

Usage

In order to run the example and se the resulting output simply run.

python main.py

Troubleshooting

The Crypto package has known troubles when running on python 3.5 when it comes to finding the right internal modules. If the pycrypto is installed using pip the package Crypto can on some occasions yield an error like "missing package" or similar.

ImportError: No module named Crypto.Cipher'

In order to solve this problem simply re-install the package with easy_install

pip uninstall pycrypto
easy_install pycrypto

Warranty and Liability

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY.

Keywords

  • Python 3.5
  • Nordnet
  • Nordnet-API
  • Crypto.Cipher import PKCS1_v1_5
  • Crypto.PublicKey

About

Examples for connecting to the Nordnet API running on Python 3.5 and using the Crypto package with PKCS1_v1_5 and PublicKey

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages