wget http://interactivebrokers.github.io/downloads/twsapi_macunix.973.02.zip
unzip twsapi_macunix.973.02.zip
cd IBJts/source/pythonclient
python setup.py install
cd ../../samples/Python/Testbed/
python Program.py -p 4002
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from keras.layers import Convolution2D, MaxPooling2D, Dense, Dropout, Activation, Flatten, Input | |
from keras.models import Model | |
from keras.optimizers import RMSprop | |
batchsize = 64 | |
conv_num_filters_1 = 16 | |
conv_num_filters_2 = 32 | |
conv_num_filters_3 = 32 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
execTime = new Date(2018, 10, 18, 15, 0, 0) | |
btn = document.querySelector(".winlink.detailSwitch") | |
setTimeout(() => { | |
btn.click() | |
console.log(new Date().getMilliseconds(), Date()) | |
}, execTime.getTime() - new Date().getTime()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import shioaji as sj | |
api = sj.Shioaji(simulation=False) | |
person_id, passwd = 'your person id', 'your password' | |
api.login(person_id, passwd) | |
@sj.on_quote | |
def on_quote(topic, quote_dict): | |
print(topic, quote_dict) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import shioaji as sj | |
import pandas as pd | |
import sys | |
import os | |
import datetime | |
from datetime import datetime as datetime2 | |
from threading import Timer | |
'''user_information & barminute''' | |
min_k=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import msgpack | |
import zlib | |
with open(f'/data/dataset/qc/msgpack/TXF20190703.msgpack', 'rb') as f: | |
rawdata = msgpack.loads(zlib.decompress(f.read()), raw=False) | |
df_bidask = pd.DataFrame(rawdata['Q/TFE/TXFI9']) | |
df_bidask[df_bidask['Simtrade'] != 1][['Date', 'Time', 'AskPrice', 'AskVolume', 'BidPrice', 'BidVolume']] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
int main(){ | |
std::cout << "simple executable program.\n"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
simple: | |
g++ main.cpp -o simple | |
clean: | |
- rm simple |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
void expose_api_func(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "shioaji.h" | |
void expose_api_func(){ | |
std::cout << "user our library expose function\n"; | |
} |
OlderNewer