Settlement Query
query_settlement
Input Parameters
| Parameter | Type | Meaning |
|---|---|---|
| account | Account | Account |
| range | string | Query range, currently valid values are "0d" (today) and "3d". |
Result
| Parameter | Type | Meaning |
|---|---|---|
| is_success | bool | Whether successful |
| data | SettlementData | Settlement is returned |
| message | string | Error message returned when is_success = false |
SettlementData Parameter
Return type : Object
| Parameter | Type | Meaning |
|---|---|---|
| > account | Object | Object |
| >> branch_no | string | Branch Number |
| >> account | string | Account |
| > details | list | Object |
| >> date | string | Query Date |
| >> settlement_date | string (Optional) | Settlement Date (If no data will return None ) |
| >> buy_value | int (Optional) | Buying Value (If no data will return None ) |
| >> buy_fee | int (Optional) | Buying Fee (If no data will return None ) |
| >> buy_settlement | int (Optional) | Buying Payable / Receivable Amount (If no data will return None ) |
| >> buy_tax | int (Optional) | Buying Tax (If no data will return None ) |
| >> sell_value | int (Optional) | Selling Value (If no data will return None ) |
| >> sell_fee | int (Optional) | Selling Fee (If no data will return None ) |
| >> sell_settlement | int (Optional) | Selling Payable / Receivable Amount (If no data will return None ) |
| >> sell_tax | int (Optional) | Selling Tax (If no data will return None ) |
| >> total_bs_value | int (Optional) | Total Buying & Selling Value (If no data will return None ) |
| >> total_fee | int (Optional) | Total Fee (If no data will return None ) |
| >> total_tax | int (Optional) | Total Tax (If no data will return None ) |
| >> total_settlement_amount | int (Optional) | Total Payable & Receivable Amount (If no data will return None ) |
| >> currency | string (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)
}
]
}
}