Sinopac's T4 DLL wrapper for Java and Python
You need to install Maven (https://maven.apache.org/) for building the source codes. This wrapper is actually implemented in Java. For Java users, you can directly create a T4 object for buying and selling futures.
With py4j, the wrapper is again encapsulated as a socket server. Python users can leverage py4j to transparently call the Java methods as if calling a normal method in Python. For more details, you can refer to https://www.py4j.org/, but believe me, you don't have to.
There is an example named Gateway.py for showing how to use it. For Python users, remember to start Java side for being called from Python.
- Put a file named account.ini in the working directory. There are 4 lines required by the wrapper:
id password branch account
-
CA file
Launch your e-leader and download the CA (Sinopac.pfx). Put it in the working directory. -
The last thing you need to set up is configs/Configuration.json. For example:
{ "configuration": { "COMMODITY": "MXFL5", } }
where MXFL5 stands for:
L = December. It is the 12th of the alphabets. 5 = 2015.