Coder Social home page Coder Social logo

t4's Introduction

T4

Sinopac's T4 DLL wrapper for Java and Python

Usage

Java users

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.

Python users

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.

Configuration files

  1. Put a file named account.ini in the working directory. There are 4 lines required by the wrapper:
id
password
branch
account
  1. CA file
    Launch your e-leader and download the CA (Sinopac.pfx). Put it in the working directory.

  2. 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. 

t4's People

Contributors

yoshijava avatar

Stargazers

pi-cheng chen avatar

Watchers

Po Chien Yang avatar James Cloos avatar pi-cheng chen avatar  avatar

Forkers

phil-chen

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.