Skip to main content

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 Status returned by this method as the result (10 success; 90 failure).
  • For the complete workflow, see Reservations and Transfers.

Parameters

FieldTypeDescription
accountAccountAccount
amountint64Pre-collected amount in TWD; must be greater than 0

Result

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

Cash reservation record: ReserveCashRecord fields

Return type : Object

FieldTypeDescription
SeqNostringSequence number
DatestringApplication date
TimestringApplication time
BranchNostringBranch code
AccountstringAccount
CurrencystringCurrency: TWD
Amountint64Pre-collected amount (TWD)
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 ...

// 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
},
}