Skip to main content

Settlement Query

query_settlement

Input Parameters

ParameterTypeMeaning
accountAccountAccount
rangestringQuery range, currently valid values are "0d" (today) and "3d".

Result

ParameterTypeMeaning
is_successboolWhether successful
dataSettlementDataSettlement is returned
messagestringError message returned when is_success = false

SettlementData Parameter

Return type : Object

ParameterTypeMeaning
> accountObjectObject
>> branch_nostringBranch Number
>> accountstringAccount
> detailslistObject
>> datestringQuery Date
>> settlement_datestring (Optional)Settlement Date (If no data will return None )
>> buy_valueint (Optional)Buying Value (If no data will return None )
>> buy_feeint (Optional)Buying Fee (If no data will return None )
>> buy_settlementint (Optional)Buying Payable / Receivable Amount (If no data will return None )
>> buy_taxint (Optional)Buying Tax (If no data will return None )
>> sell_valueint (Optional)Selling Value (If no data will return None )
>> sell_feeint (Optional)Selling Fee (If no data will return None )
>> sell_settlementint (Optional)Selling Payable / Receivable Amount (If no data will return None )
>> sell_taxint (Optional)Selling Tax (If no data will return None )
>> total_bs_valueint (Optional)Total Buying & Selling Value (If no data will return None )
>> total_feeint (Optional)Total Fee (If no data will return None )
>> total_taxint (Optional)Total Tax (If no data will return None )
>> total_settlement_amountint (Optional)Total Payable & Receivable Amount (If no data will return None )
>> currencystring (Optional)Currency (If no data will return None )

Request Example

sdk.accounting.query_settlement(account,"3d")

Response Example

Result {
is_success: True,
message: None,
data : SettlementData{
account: {
branch_no: "6460", # Branch code (string)
account: "26" # Account (string)
},
details: [
Settlement{
date: "2023/10/16", # Query date (string)
settlement_date: "2023/10/18", # Settlement date (string)
buy_value: 12, # Buy amount (int)
buy_fee: 12, # Buy-side handling fee (int)
buy_settlement: 0, # Buy-side receivable/payable amount (int)
buy_tax: 0, # Buy-side transaction tax (int)
sell_value: 4, # Sell amount (int)
sell_fee: 4, # Sell-side handling fee (int)
sell_settlement: 0, # Sell-side receivable/payable amount (int)
sell_tax: 4, # Sell-side transaction tax (int)
total_bs_value: 16, # Total transaction amount (int)
total_fee: 16, # Total handling fee (int)
total_tax: 4, # Total transaction tax (int)
total_settlement_amount: 0, # Total settlement amount (int)
currency: TWD, # Currency (string)
},
Settlement{
date: "2023/10/17", # Query date (string)
settlement_date: "2023/10/19", # Settlement date (string)
buy_value: 735500, # Buy amount (int)
buy_fee: 313, # Buy-side handling fee (int)
buy_settlement: -1429513, # Buy-side receivable/payable amount (int)
buy_tax: 0, # Buy-side transaction tax (int)
sell_value: 770500, # Sell amount (int)
sell_fee: 320, # Sell-side handling fee (int)
sell_settlement: 0, # Sell-side receivable/payable amount (int)
sell_tax: 2309, # Sell-side transaction tax (int)
total_bs_value: 1506000, # Total transaction amount (int)
total_fee: 633, # Total handling fee (int)
total_tax: 2309, # Total transaction tax (int)
total_settlement_amount: -1429513, # Total settlement amount (int)
currency: "TWD", # Currency (string)
},
Settlement{
date: "2023/10/18", # Query date (string)
settlement_date: None, # Settlement date (string)
buy_value: None, # Buy amount (int)
buy_fee: None, # Buy-side handling fee (int)
buy_settlement: None, # Buy-side receivable/payable amount (int)
buy_tax: None, # Buy-side transaction tax (int)
sell_value: None, # Sell amount (int)
sell_fee: None, # Sell-side handling fee (int)
sell_settlement: None, # Sell-side receivable/payable amount (int)
sell_tax: None, # Sell-side transaction tax (int)
total_bs_value: None, # Total transaction amount (int)
total_fee: None, # Total handling fee (int)
total_tax: None, # Total transaction tax (int)
total_settlement_amount: None, # Total settlement amount (int)
currency: None, # Currency (string)
}
]
}
}