---
agentTools:
  projectIndex: https://hashkeyglobal-apidoc.readme.io/llms.txt
---

# Query Futures history orders

**Weight: 1**

**Request Parameters**

***

| **PARAMETER** | **TYPE** | **Req'd** | **Example values** | **DESCRIPTION**                             |
| :------------ | :------- | :-------- | :----------------- | :------------------------------------------ |
| symbol        | STRING   | Y         |                    | Name of the contract                        |
| fromOrderId   | INTEGER  |           |                    | Order ID                                    |
| type          | STRING   | Y         |                    | The order type, possible types: LIMIT, STOP |
| startTime     | LONG     |           |                    | Start Timestamp                             |
| endTime       | LONG     |           |                    | End Timestamp                               |
| limit         | INTEGER  |           | 20                 | Number of entries to return, max 500        |
| recvWindow    | LONG     |           |                    | recv Window                                 |
| timestamp     | LONG     | Y         | 1714311403031      | Timestamp                                   |

**Response Content**

***

type = LIMIT

| **TYPE**      | **PARAMETER** | **Example values**  | **DESCRIPTION**                                                                                                             |
| :------------ | :------------ | :------------------ | :-------------------------------------------------------------------------------------------------------------------------- |
| time          | LONG          | 1714403283482       | Timestamp when order is created                                                                                             |
| updateTime    | LONG          | 1714403283501       | Last time this order was updated                                                                                            |
| orderId       | INTEGER       | 1674930571497840128 | Last time this order was updated                                                                                            |
| clientOrderId | STRING        | 99999999980001      | A unique ID of the order.                                                                                                   |
| symbol        | STRING        | ETHUSDT-PERPETUAL   | Name of the contract.                                                                                                       |
| price         | FLOAT         | 3000                | Price of the order.                                                                                                         |
| leverage      | FLOAT         | 5                   | Leverage of the order.                                                                                                      |
| origQty       | FLOAT         | 10000               | Quantity ordered                                                                                                            |
| executedQty   | FLOAT         | 0                   | Quantity of orders that has been executed                                                                                   |
| avgPrice      | FLOAT         | 0                   | Average price of filled orders.                                                                                             |
| marginLocked  | FLOAT         | 6000                | Amount of margin locked for this order. This includes the actually margin needed plus fees to open and close the position.  |
| type          | STRING        | LIMIT               | The order type, possible types: LIMIT, LIMIT\_MAKER, MARKET\_OF\_BASE                                                       |
| side          | STRING        | BUY\_OPEN           | The price type. Possible values include INPUT and MARKET.                                                                   |
| timeInForce   | STRING        | GTC                 | Direction of the order. Possible values include BUY\_OPEN, SELL\_OPEN, BUY\_CLOSE, and SELL\_CLOSE.                         |
| status        | STRING        | NEW                 | The state of the order.Possible values include NEW, PARTIALLY\_FILLED, FILLED, CANCELED, PARTIALLY\_CANCELED, and REJECTED. |
| priceType     | STRING        | INPUT               | Time in force. Possible values include GTC,FOK,IOC, and LIMIT\_MAKER                                                        |
| ordCxlReason  | STRING        |                     | Order cancel reason                                                                                                         |

type = STOP

| **TYPE**      | **PARAMETER** | **Example values**  | **DESCRIPTION**                                                                                                             |
| :------------ | :------------ | :------------------ | :-------------------------------------------------------------------------------------------------------------------------- |
| time          | LONG          | 1714403283482       | Timestamp when order is created                                                                                             |
| updateTime    | LONG          | 1714403283501       | Last time this order was updated                                                                                            |
| orderId       | INTEGER       | 1674930571497840128 | Last time this order was updated                                                                                            |
| clientOrderId | STRING        | 99999999980001      | A unique ID of the order.                                                                                                   |
| symbol        | STRING        | ETHUSDT-PERPETUAL   | Name of the contract.                                                                                                       |
| price         | FLOAT         | 3000                | Price of the order.                                                                                                         |
| leverage      | FLOAT         | 5                   | Leverage of the order.                                                                                                      |
| origQty       | FLOAT         | 10000               | Quantity ordered                                                                                                            |
| type          | STRING        | STOP                | The order type, possible types: STOP                                                                                        |
| side          | STRING        | BUY                 | Direction of the order. Possible values include BUY\_OPEN, SELL\_OPEN, BUY\_CLOSE, and SELL\_CLOSE.                         |
| status        | STRING        | NEW                 | The state of the order.Possible values include NEW, PARTIALLY\_FILLED, FILLED, CANCELED, PARTIALLY\_CANCELED, and REJECTED. |
| stopPrice     | STRING        | 3000                | Average price of filled orders                                                                                              |

Liquidation Response (To be released soon)

| **PARAMETER**      | **TYPE** | **Example values** | **DESCRIPTION**                                                                                                  |
| :----------------- | :------- | :----------------- | :--------------------------------------------------------------------------------------------------------------- |
| isLiquidationOrder | BOOLEAN  | true               | Whether the order is a liquidation order                                                                         |
| liquidationType    | STRING   |                    | "LIQUIDATION\_MAKER\_ADL", "LIQUIDATION\_MAKER", "LIQUIDATION\_TAKER". Available when isLiquidationOrder is true |
| indexPrice         | STRING   |                    | Index price. Available when isLiquidationOrder is true                                                           |

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Default",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api-glb.sim.hashkeydev.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "x-default": "XAzx6DLW2HNsvDc6CccEaBWXsFoR3EAXjxvq0PjfGtSxHikQysiIkDIP12AMWpDs",
        "name": "X-HK-APIKEY"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/api/v1/futures/historyOrders": {
      "get": {
        "summary": "Query Futures history orders",
        "description": "",
        "operationId": "query-futures-history-orders",
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "description": "Name of the contract",
            "required": true,
            "schema": {
              "type": "string",
              "default": "ETHUSDT-PERPETUAL"
            }
          },
          {
            "name": "fromOrderId",
            "in": "query",
            "description": "OrderId",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "type",
            "in": "query",
            "description": "The order type, possible types: LIMIT, STOP",
            "required": true,
            "schema": {
              "type": "string",
              "default": "LIMIT"
            }
          },
          {
            "name": "startTime",
            "in": "query",
            "description": "Start Timestamp",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "endTime",
            "in": "query",
            "description": "End Timestamp",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Number of entries to return. Default 20, Max 500",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "recvWindow",
            "in": "query",
            "description": "recv Window",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "timestamp",
            "in": "query",
            "description": "Timestamp",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": 1714538530742
            }
          },
          {
            "name": "signature",
            "in": "query",
            "description": "Signature",
            "required": true,
            "schema": {
              "type": "string",
              "default": "031fe9333bcbef389ff749f7fd76f7423c426a163f86878c44b395f4ed8e8c40"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "[\n    {\n        \"time\": \"1714405077970\",\n        \"updateTime\": \"1714405774259\",\n        \"orderId\": \"1674945624754144000\",\n        \"clientOrderId\": \"99999999980002\",\n        \"symbol\": \"ETHUSDT-PERPETUAL\",\n        \"price\": \"3000\",\n        \"leverage\": \"5\",\n        \"origQty\": \"10000\",\n        \"executedQty\": \"0\",\n        \"avgPrice\": \"0\",\n        \"marginLocked\": \"0\",\n        \"type\": \"LIMIT\",\n        \"side\": \"BUY_OPEN\",\n        \"timeInForce\": \"GTC\",\n        \"status\": \"CANCELED\",\n        \"priceType\": \"INPUT\"\n    },\n    {\n        \"time\": \"1714404830449\",\n        \"updateTime\": \"1714406315665\",\n        \"orderId\": \"1674943548414369280\",\n        \"clientOrderId\": \"122433\",\n        \"symbol\": \"ETHUSDT-PERPETUAL\",\n        \"price\": \"3100\",\n        \"leverage\": \"5\",\n        \"origQty\": \"10000\",\n        \"executedQty\": \"0\",\n        \"avgPrice\": \"0\",\n        \"marginLocked\": \"0\",\n        \"type\": \"LIMIT\",\n        \"side\": \"BUY_OPEN\",\n        \"timeInForce\": \"GTC\",\n        \"status\": \"CANCELED\",\n        \"priceType\": \"INPUT\"\n    },\n    {\n        \"time\": \"1714404830421\",\n        \"updateTime\": \"1714406315566\",\n        \"orderId\": \"1674943548154322432\",\n        \"clientOrderId\": \"122455\",\n        \"symbol\": \"ETHUSDT-PERPETUAL\",\n        \"price\": \"3000\",\n        \"leverage\": \"5\",\n        \"origQty\": \"10000\",\n        \"executedQty\": \"0\",\n        \"avgPrice\": \"0\",\n        \"marginLocked\": \"0\",\n        \"type\": \"LIMIT\",\n        \"side\": \"BUY_OPEN\",\n        \"timeInForce\": \"GTC\",\n        \"status\": \"CANCELED\",\n        \"priceType\": \"INPUT\"\n    },\n    {\n        \"time\": \"1714403283482\",\n        \"updateTime\": \"1714406315549\",\n        \"orderId\": \"1674930571497840128\",\n        \"clientOrderId\": \"99999999980001\",\n        \"symbol\": \"ETHUSDT-PERPETUAL\",\n        \"price\": \"3000\",\n        \"leverage\": \"5\",\n        \"origQty\": \"10000\",\n        \"executedQty\": \"0\",\n        \"avgPrice\": \"0\",\n        \"marginLocked\": \"0\",\n        \"type\": \"LIMIT\",\n        \"side\": \"BUY_OPEN\",\n        \"timeInForce\": \"GTC\",\n        \"status\": \"CANCELED\",\n        \"priceType\": \"INPUT\"\n    },\n    {\n        \"time\": \"1714312047368\",\n        \"updateTime\": \"1714406315648\",\n        \"orderId\": \"1674165227502050816\",\n        \"clientOrderId\": \"99999999980000\",\n        \"symbol\": \"ETHUSDT-PERPETUAL\",\n        \"price\": \"3000\",\n        \"leverage\": \"5\",\n        \"origQty\": \"10000\",\n        \"executedQty\": \"0\",\n        \"avgPrice\": \"0\",\n        \"marginLocked\": \"0\",\n        \"type\": \"LIMIT\",\n        \"side\": \"BUY_OPEN\",\n        \"timeInForce\": \"GTC\",\n        \"status\": \"CANCELED\",\n        \"priceType\": \"INPUT\"\n    },\n    {\n        \"time\": \"1714292966538\",\n        \"updateTime\": \"1714406315599\",\n        \"orderId\": \"1674005165915643392\",\n        \"clientOrderId\": \"99999999980096\",\n        \"symbol\": \"ETHUSDT-PERPETUAL\",\n        \"price\": \"3000\",\n        \"leverage\": \"5\",\n        \"origQty\": \"10000\",\n        \"executedQty\": \"0\",\n        \"avgPrice\": \"0\",\n        \"marginLocked\": \"0\",\n        \"type\": \"LIMIT\",\n        \"side\": \"BUY_OPEN\",\n        \"timeInForce\": \"GTC\",\n        \"status\": \"CANCELED\",\n        \"priceType\": \"INPUT\"\n    },\n    {\n        \"time\": \"1714292537479\",\n        \"updateTime\": \"1714406315615\",\n        \"orderId\": \"1674001566691106304\",\n        \"clientOrderId\": \"99999999980095\",\n        \"symbol\": \"ETHUSDT-PERPETUAL\",\n        \"price\": \"3000\",\n        \"leverage\": \"5\",\n        \"origQty\": \"1000\",\n        \"executedQty\": \"0\",\n        \"avgPrice\": \"0\",\n        \"marginLocked\": \"0\",\n        \"type\": \"LIMIT\",\n        \"side\": \"BUY_OPEN\",\n        \"timeInForce\": \"GTC\",\n        \"status\": \"CANCELED\",\n        \"priceType\": \"INPUT\"\n    },\n    {\n        \"time\": \"1714291962146\",\n        \"updateTime\": \"1714406315725\",\n        \"orderId\": \"1673996740439622400\",\n        \"clientOrderId\": \"99999999980094\",\n        \"symbol\": \"ETHUSDT-PERPETUAL\",\n        \"price\": \"3000\",\n        \"leverage\": \"5\",\n        \"origQty\": \"10\",\n        \"executedQty\": \"0\",\n        \"avgPrice\": \"0\",\n        \"marginLocked\": \"0\",\n        \"type\": \"LIMIT\",\n        \"side\": \"BUY_OPEN\",\n        \"timeInForce\": \"GTC\",\n        \"status\": \"CANCELED\",\n        \"priceType\": \"INPUT\"\n    },\n    {\n        \"time\": \"1714291915255\",\n        \"updateTime\": \"1714406315699\",\n        \"orderId\": \"1673996347114659328\",\n        \"clientOrderId\": \"1714291913849\",\n        \"symbol\": \"ETHUSDT-PERPETUAL\",\n        \"price\": \"3250\",\n        \"leverage\": \"5\",\n        \"origQty\": \"10000\",\n        \"executedQty\": \"0\",\n        \"avgPrice\": \"0\",\n        \"marginLocked\": \"0\",\n        \"type\": \"LIMIT\",\n        \"side\": \"BUY_OPEN\",\n        \"timeInForce\": \"GTC\",\n        \"status\": \"CANCELED\",\n        \"priceType\": \"INPUT\"\n    },\n    {\n        \"time\": \"1714291785440\",\n        \"updateTime\": \"1714406315682\",\n        \"orderId\": \"1673995258139034368\",\n        \"clientOrderId\": \"99999999980093\",\n        \"symbol\": \"ETHUSDT-PERPETUAL\",\n        \"price\": \"3000\",\n        \"leverage\": \"5\",\n        \"origQty\": \"10\",\n        \"executedQty\": \"0\",\n        \"avgPrice\": \"0\",\n        \"marginLocked\": \"0\",\n        \"type\": \"LIMIT\",\n        \"side\": \"BUY_OPEN\",\n        \"timeInForce\": \"GTC\",\n        \"status\": \"CANCELED\",\n        \"priceType\": \"INPUT\"\n    },\n    {\n        \"time\": \"1714291755420\",\n        \"updateTime\": \"1714406315744\",\n        \"orderId\": \"1673995006321499648\",\n        \"clientOrderId\": \"99999999980092\",\n        \"symbol\": \"ETHUSDT-PERPETUAL\",\n        \"price\": \"3000\",\n        \"leverage\": \"5\",\n        \"origQty\": \"10\",\n        \"executedQty\": \"0\",\n        \"avgPrice\": \"0\",\n        \"marginLocked\": \"0\",\n        \"type\": \"LIMIT\",\n        \"side\": \"BUY_OPEN\",\n        \"timeInForce\": \"GTC\",\n        \"status\": \"CANCELED\",\n        \"priceType\": \"INPUT\"\n    },\n    {\n        \"time\": \"1714291701917\",\n        \"updateTime\": \"1714406315582\",\n        \"orderId\": \"1673994557497417216\",\n        \"clientOrderId\": \"1714291700721\",\n        \"symbol\": \"ETHUSDT-PERPETUAL\",\n        \"price\": \"3250\",\n        \"leverage\": \"5\",\n        \"origQty\": \"10000\",\n        \"executedQty\": \"0\",\n        \"avgPrice\": \"0\",\n        \"marginLocked\": \"0\",\n        \"type\": \"LIMIT\",\n        \"side\": \"BUY_OPEN\",\n        \"timeInForce\": \"GTC\",\n        \"status\": \"CANCELED\",\n        \"priceType\": \"INPUT\"\n    },\n    {\n        \"time\": \"1714291689065\",\n        \"updateTime\": \"1714406315764\",\n        \"orderId\": \"1673994449678549760\",\n        \"clientOrderId\": \"1714291685849\",\n        \"symbol\": \"ETHUSDT-PERPETUAL\",\n        \"price\": \"3250\",\n        \"leverage\": \"5\",\n        \"origQty\": \"10000\",\n        \"executedQty\": \"1596\",\n        \"avgPrice\": \"3250\",\n        \"marginLocked\": \"0\",\n        \"type\": \"LIMIT\",\n        \"side\": \"BUY_OPEN\",\n        \"timeInForce\": \"GTC\",\n        \"status\": \"PARTIALLY_CANCELED\",\n        \"priceType\": \"INPUT\"\n    },\n    {\n        \"time\": \"1714291665685\",\n        \"updateTime\": \"1714291665769\",\n        \"orderId\": \"1673994253569671936\",\n        \"clientOrderId\": \"1714291662893\",\n        \"symbol\": \"ETHUSDT-PERPETUAL\",\n        \"price\": \"3250\",\n        \"leverage\": \"5\",\n        \"origQty\": \"3\",\n        \"executedQty\": \"3\",\n        \"avgPrice\": \"3250\",\n        \"marginLocked\": \"0\",\n        \"type\": \"LIMIT\",\n        \"side\": \"BUY_OPEN\",\n        \"timeInForce\": \"GTC\",\n        \"status\": \"FILLED\",\n        \"priceType\": \"INPUT\"\n    },\n    {\n        \"time\": \"1714291441790\",\n        \"updateTime\": \"1714406315631\",\n        \"orderId\": \"1673992375377206784\",\n        \"clientOrderId\": \"99999999980091\",\n        \"symbol\": \"ETHUSDT-PERPETUAL\",\n        \"price\": \"3000\",\n        \"leverage\": \"5\",\n        \"origQty\": \"10\",\n        \"executedQty\": \"0\",\n        \"avgPrice\": \"0\",\n        \"marginLocked\": \"0\",\n        \"type\": \"LIMIT\",\n        \"side\": \"BUY_OPEN\",\n        \"timeInForce\": \"GTC\",\n        \"status\": \"CANCELED\",\n        \"priceType\": \"INPUT\"\n    },\n    {\n        \"time\": \"1714291300113\",\n        \"updateTime\": \"1714406315781\",\n        \"orderId\": \"1673991186904302336\",\n        \"clientOrderId\": \"99999999980090\",\n        \"symbol\": \"ETHUSDT-PERPETUAL\",\n        \"price\": \"3000\",\n        \"leverage\": \"5\",\n        \"origQty\": \"1\",\n        \"executedQty\": \"0\",\n        \"avgPrice\": \"0\",\n        \"marginLocked\": \"0\",\n        \"type\": \"LIMIT\",\n        \"side\": \"BUY_OPEN\",\n        \"timeInForce\": \"GTC\",\n        \"status\": \"CANCELED\",\n        \"priceType\": \"INPUT\"\n    }\n]"
                  }
                },
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "time": {
                        "type": "string",
                        "example": "1714405077970"
                      },
                      "updateTime": {
                        "type": "string",
                        "example": "1714405774259"
                      },
                      "orderId": {
                        "type": "string",
                        "example": "1674945624754144000"
                      },
                      "clientOrderId": {
                        "type": "string",
                        "example": "99999999980002"
                      },
                      "symbol": {
                        "type": "string",
                        "example": "ETHUSDT-PERPETUAL"
                      },
                      "price": {
                        "type": "string",
                        "example": "3000"
                      },
                      "leverage": {
                        "type": "string",
                        "example": "5"
                      },
                      "origQty": {
                        "type": "string",
                        "example": "10000"
                      },
                      "executedQty": {
                        "type": "string",
                        "example": "0"
                      },
                      "avgPrice": {
                        "type": "string",
                        "example": "0"
                      },
                      "marginLocked": {
                        "type": "string",
                        "example": "0"
                      },
                      "type": {
                        "type": "string",
                        "example": "LIMIT"
                      },
                      "side": {
                        "type": "string",
                        "example": "BUY_OPEN"
                      },
                      "timeInForce": {
                        "type": "string",
                        "example": "GTC"
                      },
                      "status": {
                        "type": "string",
                        "example": "CANCELED"
                      },
                      "priceType": {
                        "type": "string",
                        "example": "INPUT"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "65e1e3ba49cd3a004d3ed159:662e00750bc21f0052e0d7a3"
}
```