Skip to main content

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 Status returned by this method as the result (10 success; 90 failure). The transfer-record query does not reflect a newly submitted application immediately.
  • For the complete workflow, see Reservations and Transfers.
Finding targetBranchNo

Enter the TDCC code for the receiving securities branch. Do not use a bank branch code or an internally assigned branch ID.

  1. Start with the TWSE securities firm directory to confirm the broker.
  2. For a Fubon Securities branch, use the Fubon branch-code details to confirm the specific branch code.
  3. Enter the code exactly as listed, including letters and digits (for example, "960C").

Parameters​

FieldTypeDescription
accountAccountSource account
targetBranchNostringTDCC code for the receiving securities branch
targetAccountstringReceiving account
stockNostringStock symbol
quantityint64Number of shares to transfer. Unit: shares; must be greater than 0
market*MarketMarket: MarketTaiex TWSE, MarketTaisdaq TPEx, MarketTaiemg Emerging. When nil is provided, the SDK resolves the market automatically

Result​

FieldTypeDescription
IsSuccessboolWhether the request succeeded
Data*TransferRecordStock transfer application details
Message*stringError message when IsSuccess is false

Transfer record: TransferRecord fields​

Return type : Object

FieldTypeDescription
SeqNostringSequence number
DatestringApplication date
TimestringApplication time
StockNostringStock symbol
MarketMarketMarket: MarketTaiex TWSE, MarketTaisdaq TPEx, MarketTaiemg Emerging
Quantityint64Transferred shares
TargetBranchNostringTDCC code for the receiving securities branch
TargetAccountstringReceiving account
Statusint32Status: 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
},
}