Query Estimate Margin
query_estimate_margin
Request Parameter
Parameter | Type | Meaning |
---|---|---|
account | Account | Account |
symbol | string | Symbol |
Result Response
Parameter | Type | Meaning |
---|---|---|
is_success | bool | Interface result |
data | EstimateMargin | EstimateMargin is returned |
message | string | is_success = False error description is returned |
EstimateMargin Parameter
Return type : Object
Parameter | Type | Meaning |
---|---|---|
date | string | Query Date |
currency | string | Currency |
estimate_margin | float | Estimate Margin |
Request Example
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)
Response Example
Result {
is_success: True,
message: None,
data :
EstimateMargin{
date: "2023/10/16", # Query Date (string)
currency: "TWD", # Currency (string)
estimate_margin: 179000 # Estimate Margin (float)
}
}