Cash Reservation Application
ReserveCash
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). - For the complete workflow, see Reservations and Transfers.
Parameters
| Field | Type | Description |
|---|---|---|
| account | Account | Account |
| amount | int64 | Pre-collected amount in TWD; must be greater than 0 |
Result
| Field | Type | Description |
|---|---|---|
| IsSuccess | bool | Whether the request succeeded |
| Data | *ReserveCashRecord | Cash reservation application details |
| Message | *string | Error message when IsSuccess is false |
Cash reservation record: ReserveCashRecord fields
Return type : Object
| Field | Type | Description |
|---|---|---|
| SeqNo | string | Sequence number |
| Date | string | Application date |
| Time | string | Application time |
| BranchNo | string | Branch code |
| Account | string | Account |
| Currency | string | Currency: TWD |
| Amount | int64 | Pre-collected amount (TWD) |
| 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 ...
// Cash Reservation Application
reserveResult, err := sdk.Stock.ReserveCash(account, 10000)
// Handle transport or SDK errors
if err != nil {
fmt.Printf("❌ Reserve Cash Error: %v (Type: %T)\n", err, err)
return
}
// Check the API result
if !reserveResult.IsSuccess {
message := "No message"
if reserveResult.Message != nil {
message = *reserveResult.Message
}
fmt.Printf("Reserve cash failed. Message: %s\n", message)
return
}
// Print the cash reservation result
if reserveResult.Data != nil {
record := *reserveResult.Data
fmt.Printf("✅ Reserve cash accepted\n")
fmt.Printf("SeqNo: %s\n", record.SeqNo)
fmt.Printf("Date: %s\n", record.Date)
fmt.Printf("Amount: %d\n", record.Amount)
fmt.Printf("Status: %d\n", record.Status)
} else {
fmt.Println("Reserve cash success but no data returned.")
}
}
Response example
// ReserveCash response structure
Result{
IsSuccess: true,
Message: nil,
Data: &ReserveCashRecord{
SeqNo: "118036", // Sequence number
Date: "2026/07/28", // Application date
Time: "10:53:23.000", // Application time
BranchNo: "20207", // Branch code
Account: "9801163", // Account
Currency: "TWD", // currency
Amount: 10000, // Pre-collected amount
Status: 10, // status
},
}