Skip to main content

Preparation

Key points
ItemDetails
ProductFubon Neo API
RequirementsFubon Securities account, digital certificate, API agreement, and connection test
Primary platformWindows (certificate tool and connection test helper)
LoginCertificate login
Next stepInstallation and Version Compatibility / Quick Start
caution

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

  1. Have your Fubon Securities account ready. If you do not have one, open an account online.
  2. Apply for a certificate.
  3. Sign the API risk disclosure and agreement: Online signing guide, then complete the API connection test with the Connection Test Helper (Windows).

Prepare Your Fubon Securities Account

If you already have a Fubon Securities account, please skip this step. If you don’t have a Fubon Securities account, please open an account now.

Your Fubon Securities account

Apply for a Certificate

Go to Certificate Application and Renewal, select Run now, and download Fubon Securities Certificate Manager (TCEM.exe) to apply for a certificate.

Certificate apply

After you log in and complete authentication, enter your mobile number or email address to receive the OTP verification code.

OTP

After the application is complete, the certificate is stored in C:\CAFubon\\(your ID number) and uses your ID number as its filename.

CertLocation

Sign the API Risk Disclosure and Agreement, Then Test the Connection

Sign Online

Use the following guide to sign the API agreement and test the API connection. Online Signing Guide

Sign the agreements online

Connection Test

Download and use the connection test helper (Windows), or log in directly with the Fubon Neo API.

Connection Test Helper

Installation and Version Compatibility

Read Installation and Version Compatibility to confirm the minimum version and installation method for each language, then download the installer from SDK Download.

Start Your Program Trading Journey

Use the following console command to install the SDK (please be advised that modify the .whl filename to the corresponding version downloaded).

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

Support Python version 3.7 (~v1.3.2) and 3.8–3.13 (v2.0.1~, 3.14 not supported)

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, OrderType, PriceType, MarketType, 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 = Order(
buy_sell = BSAction.Buy,
symbol = "2881",
price = "66",
quamtity = 2000,
market_type = MarketType.Common,
price_type = PriceType.Limit,
time_in_force= TimeInForce.ROD,
order_type = OrderType.Stock,
user_def = "From_Py"
)

# Place an order
order_res = sdk.stock.place_order(acc, order)
print(order_res[0])

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

Result { is_success: True, message: None, data : { date: "2023/10/13", seq_no: "00000000015", branch_no: "6460", account: "26", order_no: "bA626", asset_type: 0, market: "TAIEX", market_type: Common, stock_no: "2881", buy_sell: Buy, price_type: Limit, price: 66.0, quantity: 2000, time_in_force: ROD, order_type: Stock, is_pre_order: false, status: 10, after_price_type: Limit, after_price: 66.0, unit: 1000, after_qty: 2000, filled_qty: 0, filled_money: 0, before_qty: 0, before_price: 66.0, user_def: "From_Py", last_time: "16:48:09.247", error_message: None} }