Skip to main content

Preparation

caution

Before starting with the Fubon Neo API, you must complete the following steps:"

  1. Have your Fubon Future account ready. (If you don't already have a Fubon Future account, please click the link.Open Account
  2. Sign API agreements
  3. Apply digital certification

Prepare

Use your Fubon Future account

Your Fubon Future account

Sign API agreements

Using Cell Phone 富邦e點通 APP or using desktop E+

Signing Process Completed

Congratulations 🎉 you have successfully signed the agreements.

Apply the Digital Certificate

Go to the apply certificate page and download the CATool.

Certificate apply

After logging in and completing the authentication, enter your mobile number or email to receive OTP code and complete the OTP verification.

OTP

After completing the application, the certificate by default will be stored in the folder C:\CAFubon\(Your ID Number). The certificate filename is (Your ID Number).pfx.

CertLocation

Install SDK package

pip install fubon_neo-<version>-cp37-abi3-win_amd64.whl

Support Python version 3.7 (~v1.3.2)、3.8、3.9、3.10、3.11 and 3.12 (v2.0.1~)

C# develop .NET Standard 2.0 for the base , Suggest using .netcoreapp 3.1 and above; If using .NETFramework,suggest using .NETFramework 4.7.2 and above.

Start Your Program Trading Journey

from fubon_neo.sdk import FubonSDK, Order
from fubon_neo.constant import TimeInForce, FutOptOrderType, FutOptPriceType, FutOptMarketType, CallPut, BSAction

# Connect and login
sdk = FubonSDK()

accounts = sdk.login("Your ID", "Your Password", "Your cert path" , "Your cert password")
## accounts = sdk.login("Your ID", "Your Password", "Your cert path") # If you use the "default" password for your certificate, for SDK v1.3.2 and newer versions

acc = accounts.data[0]

# Create order object
order = FutOptOrder(
buy_sell = BSAction.Sell,
symbol = "TXFD4",
price = "20800",
lot = 3,
market_type = FutOptMarketType.Future,
price_type = FutOptPriceType.Limit,
time_in_force = TimeInForce.ROD,
order_type = FutOptOrderType.Auto,
user_def = "Python" # optional field
)

# Place an order
order_res = sdk.futopt.place_order(acc, order)
print(order_res)

Congratulations 🎊 after placing your order, you will be able to see the system's response.

Result {  is_success: True, message: None, data : { function_type: 0, date :  "2023/10/13", seq_no :  "00000000016", branch_no :  "6460", account :  "26", order_no : "bA627", asset_type : 1, market : "TAIMEX", market_type : Future, symbol : "FITX", unit : 1 , currency : "TWD", expiry_date : "202404",  strike_price : , call_put : , buy_sell : Buy , price_type : Limit, price : 20800, lot : 3, time_in_force : ROD, order_type : Auto, is_pre_order : False, status : 10, after_price_type : Limit, afterPrice : 20800,  after_lot : 2000, filled_lot : 0, filled_money : 0, ... , user_def : "From Pyhton", last_time : "12:19:06.048", error_message :  } }