Skip to main content

No project description provided

Project description

Fugle Trade Python SDK

事前準備

可以參考 https://developer.fugle.tw/docs/trading/prerequisites 完成申請金鑰相關步驟

QuickStart

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)

Detail

所有 function 跟 response 可以在專屬文件頁查到相關資訊

https://developer.fugle.tw/docs/trading/reference/python

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fugle-trade-0.4.0.tar.gz (7.1 kB view hashes)

Uploaded Source

Built Distribution

fugle_trade-0.4.0-py3-none-any.whl (8.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page