Transfer Record Query
QueryTransfers
Version
Available in v2.2.9 and later.
Parameters
| Field | Type | Description |
|---|---|---|
| account | Account | Account |
| startDate | *string | Query start date (YYYYMMDD). When nil is provided, the server default range is used |
| endDate | *string | Query end date (YYYYMMDD) |
| stockNo | *string | Stock symbol. When nil is provided, all symbols are queried |
Result
| Field | Type | Description |
|---|---|---|
| IsSuccess | bool | Whether the request succeeded |
| Data | *[]TransferRecord | List of transfer records; an empty list when no records exist |
| 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 | Receiving branch code |
| 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 ...
// Query transfer records for a date range without a stock-symbol filter
startDate := "20260701"
endDate := "20260722"
transfersResult, err := sdk.Stock.QueryTransfers(account, &startDate, &endDate, nil)
// Handle transport or SDK errors
if err != nil {
fmt.Printf("❌ Query Transfers Error: %v (Type: %T)\n", err, err)
return
}
// Check the API result
if !transfersResult.IsSuccess {
message := "No message"
if transfersResult.Message != nil {
message = *transfersResult.Message
}
fmt.Printf("Query transfers failed. Message: %s\n", message)
return
}
// Print the transfer records
if transfersResult.Data != nil && len(*transfersResult.Data) > 0 {
fmt.Printf("✅ Found %d transfer records\n", len(*transfersResult.Data))
for i, record := range *transfersResult.Data {
fmt.Printf("\n--- Record %d ---\n", i+1)
fmt.Printf("SeqNo: %s\n", record.SeqNo)
fmt.Printf("Date: %s\n", record.Date)
fmt.Printf("StockNo: %s\n", record.StockNo)
fmt.Printf("Quantity: %d\n", record.Quantity)
fmt.Printf("Status: %d\n", record.Status)
}
} else {
fmt.Println("Query transfers success but no data returned.")
}
}
Response example
// QueryTransfers 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 branch code
TargetAccount: "7654321", // Receiving account
Status: 10, // status
},
// ... more records
},
}