Stock Transfer Application
TransferStock
Version
Available in v2.2.9 and later.
Usage limits
- Applications are accepted on trading days from 08:00 to 14:30. Requests outside this window are rejected by the backend.
- An application cannot be cancelled through the API after it is submitted.
- Use the
Statusreturned by this method as the result (10success;90failure). The transfer-record query does not reflect a newly submitted application immediately. - For the complete workflow, see Reservations and Transfers.
Finding
targetBranchNoEnter the TDCC code for the receiving securities branch. Do not use a bank branch code or an internally assigned branch ID.
- Start with the TWSE securities firm directory to confirm the broker.
- For a Fubon Securities branch, use the Fubon branch-code details to confirm the specific branch code.
- Enter the code exactly as listed, including letters and digits (for example,
"960C").
Parameters
| Field | Type | Description |
|---|---|---|
| account | Account | Source account |
| targetBranchNo | string | TDCC code for the receiving securities branch |
| targetAccount | string | Receiving account |
| stockNo | string | Stock symbol |
| quantity | int64 | Number of shares to transfer. Unit: shares; must be greater than 0 |
| market | *Market | Market: MarketTaiex TWSE, MarketTaisdaq TPEx, MarketTaiemg Emerging. When nil is provided, the SDK resolves the market automatically |
Result
| Field | Type | Description |
|---|---|---|
| IsSuccess | bool | Whether the request succeeded |
| Data | *TransferRecord | Stock transfer application details |
| Message | *string | Error message when IsSuccess is false |
Transfer record: TransferRecord fields
Return type : Object
| Field | Type | Description |
|---|---|---|
| SeqNo | string | Sequence number |
| Date | string | Application date |
| Time | string | Application time |
| StockNo | string | Stock symbol |
| Market | Market | Market: MarketTaiex TWSE, MarketTaisdaq TPEx, MarketTaiemg Emerging |
| Quantity | int64 | Transferred shares |
| TargetBranchNo | string | TDCC code for the receiving securities branch |
| TargetAccount | string | Receiving account |
| Status | int32 | Status: 10 success; 90 failure |
Request example
package main
import (
"fmt"
"fubon"
)
func main() {
// Initialize the SDK and log in
sdk := fubon.NewFubonSDK()
// ... Login and connection initialization steps ...
// Apply to transfer 1,000 shares; when market is nil, the SDK resolves it automatically
transferResult, err := sdk.Stock.TransferStock(account, "960C", "7654321", "006205", 1000, nil)
// Handle transport or SDK errors
if err != nil {
fmt.Printf("❌ Transfer Stock Error: %v (Type: %T)\n", err, err)
return
}
// Check the API result
if !transferResult.IsSuccess {
message := "No message"
if transferResult.Message != nil {
message = *transferResult.Message
}
fmt.Printf("Transfer stock failed. Message: %s\n", message)
return
}
// Print the stock transfer result
if transferResult.Data != nil {
record := *transferResult.Data
fmt.Printf("✅ Transfer stock accepted\n")
fmt.Printf("SeqNo: %s\n", record.SeqNo)
fmt.Printf("StockNo: %s\n", record.StockNo)
fmt.Printf("Quantity: %d\n", record.Quantity)
fmt.Printf("TargetAccount: %s\n", record.TargetAccount)
fmt.Printf("Status: %d\n", record.Status)
} else {
fmt.Println("Transfer stock success but no data returned.")
}
}
Response example
// TransferStock response structure
Result{
IsSuccess: true,
Message: nil,
Data: &TransferRecord{
SeqNo: "418181", // Sequence number
Date: "2026/07/28", // Application date
Time: "10:53:48.340", // Application time
StockNo: "006205", // Stock symbol
Market: MarketTaiex, // Market
Quantity: 1000, // transferred shares
TargetBranchNo: "960C", // Receiving securities branch TDCC code
TargetAccount: "7654321", // Receiving account
Status: 10, // status
},
}