exchange.GetOrder
The exchange.GetOrder() function is used to get order information.
exchange.GetOrder(orderId)Examples
javascript
function main(){
var id = exchange.Sell(1000, 1)
// The parameter id is the order number, you need to fill in the order number you want to query
var order = exchange.GetOrder(id)
Log("Id:", order.Id, "Price:", order.Price, "Amount:", order.Amount, "DealAmount:",
order.DealAmount, "Status:", order.Status, "Type:", order.Type)
}
python
def main():
id = exchange.Sell(1000, 1)
order = exchange.GetOrder(id)
Log("Id:", order["Id"], "Price:", order["Price"], "Amount:", order["Amount"], "DealAmount:",
order["DealAmount"], "Status:", order["Status"], "Type:", order["Type"])
c++
void main() {
auto id = exchange.Sell(1000, 1);
auto order = exchange.GetOrder(id);
Log("Id:", order.Id, "Price:", order.Price, "Amount:", order.Amount, "DealAmount:",
order.DealAmount, "Status:", order.Status, "Type:", order.Type);
}Returns
| Type | Description |
| Query order details by order ID. Returns the |
Arguments
| Name | Type | Required | Description |
orderId | string | Yes | The When calling the |
See Also
Remarks
Some exchanges do not support the exchange.GetOrder() function. The AvgPrice attribute in the returned Order structure is the average execution price. Some exchanges do not support this field, and it is set to 0 when not supported.
If using an older version of the docker, the orderId parameter of the exchange.GetOrder() function may differ from the orderId described in the current documentation.
Exchanges that do not support the exchange.GetOrder() function:
| Function Name | Unsupported Spot Exchanges | Unsupported Futures Exchanges |
|---|---|---|
| GetOrder | Zaif / Coincheck / Bitstamp | -- |