Skip to content

Instantly share code, notes, and snippets.

View anthonyng2's full-sized avatar

Anthony Ng anthonyng2

  • Singapore
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
'''
Wrapper - Organised by groups. E.g., Accont and Portfolio group, Orders group etc
2016-01-31
'''
from ib.ext.EWrapper import EWrapper
from ib.ext.Contract import Contract
from ib.ext.ExecutionFilter import ExecutionFilter
from ib.ext.Order import Order
import time
from datetime import datetime
from IBWrapper import IBWrapper, contract
from ib.ext.EClientSocket import EClientSocket
from ib.ext.ScannerSubscription import ScannerSubscription
if __name__=="__main__":
callback = IBWrapper() # Instantiate IBWrapper
tws = EClientSocket(callback) # Instantiate EClientSocket