fugle trade python
1.2.0
You can refer to https://developer.fugle.tw/docs/trading/prerequisites to complete the steps related to applying for a key.
from configparser import ConfigParser
from fugle_trade . sdk import SDK
from fugle_trade . order import OrderObject
from fugle_trade . constant import ( APCode , Trade , PriceFlag , BSFlag , Action )
config = ConfigParser ()
config . read ( './config.ini' )
sdk = SDK ( config )
sdk . login ()
order = OrderObject (
buy_sell = Action . Buy ,
price = 28.00 ,
stock_no = "2884" ,
quantity = 2 ,
ap_code = APCode . Common
)
sdk . place_order ( order )
All functions and responses can be found on the dedicated document page.
https://developer.fugle.tw/docs/trading/reference/python
MIT