Skip to main content

商品保證金查詢

query_estimate_margin

輸入參數

參數類別說明
accountAccount帳號
order_objectOrderObject委託物件

Result 回傳

參數類別說明
is_successbool是否成功
dataEstimateMargin回傳保證金資訊
messagestring當is_success = false 回傳錯誤訊息

EstimateMargin 欄位

Return type : Object

參數類別說明
datestring查詢日期
currencystring幣別
estimate_marginfloat預估保證金

請求範例

order = FutOptOrder(
buy_sell = BSAction.Buy,
symbol = "TXFE4",
price = "20890",
lot = 1,
market_type = FutOptMarketType.Future,
price_type = FutOptPriceType.Limit,
time_in_force = TimeInForce.ROD,
order_type = FutOptOrderType.New,
user_def = "From_Py" # optional field
);

sdk.futopt.query_estimate_margin(accounts.data[0], order)

回傳範例

Result {
is_success: True,
message: None,
data: EstimateMargin {
date: "2024/04/10", # 查詢日期 (string)
currency: "TWD", # 幣別 (string)
estimate_margin: 179000 # 預估保證金 (float)
}
}