接口文档研读 · 永续合约

独立教程与工具 · 非 Gate 官方网站

API REFERENCE / 永续合约

Gate 单个永续订单的状态核对:参数、响应与查询工具

按永续订单编号读取详情,对照 status、finish_as、left 与 fill_price 识别执行结果。

需要官方 API 鉴权固定规格 v4.106.132资料核对:2026-09-10
GET /futures/{settle}/orders/{order_id}

这条查询解决什么问题

open 与 finished 只区分订单是否仍待处理,finished 中包含取消等结束原因,不能等同全部成交。

这是账户数据查询文档。真实调用需要在你自己的可信环境完成官方鉴权;此页没有登录、密钥输入或账户连接功能。

查看官方英文说明

Query single order details

- Zero-fill order cannot be retrieved for 10 minutes after cancellation - Historical orders, by default, only data within the past 6 months is supported.

请求参数逐项核对

字段名和数据类型保留官方拼写。必填标记来自规格;描述中的条件约束还需要一起检查。

参数与位置类型与范围官方字段说明
settlepath · 必填string枚举:btc / usdt / usd1
Perpetual futures settlement currency
order_idpath · 必填string
The order ID returned when the order is created successfully, or the custom ID specified by the user when creating the order (i.e. the `text` field). When using the custom `text` field: 1. If the order was not filled and has been cancelled, after 60 seconds you cannot query the order by `text`; continuing to use `text` returns error ORDER_NOT_FOUND. 2. If the order was fully or partially filled, you can query the order by `text` indefinitely.

在本页组装查询 URL

填写参数后生成一个 GET 地址,只在浏览器本地处理。留空的可选项不会发送。请勿填写密码、API Key 或 Secret。

path · string枚举:btc / usdt / usd1
path · string
尚未生成 URL。

不会向 Gate 或本站发送表单内容。

工具检查必填、枚举与简单数值范围,不代替服务端校验。复合参数、时间窗口、条件必填等请对照上方原文。

响应字段怎样阅读

以下展示的是规格中的类型定义,不是现场 API 响应,也不是行情样本。嵌套结构展开至三层;数组的 [] 表示其中一个元素。

HTTP 200 · Order details

字段路径数据类型字段说明
$object
Futures order details
$.idinteger格式:"int64"
Futures order ID
$.userinteger
User ID
$.create_timenumber格式:"double"
Creation time of order
$.update_timenumber格式:"double"
OrderUpdateTime
$.finish_timenumber格式:"double"
Order finished time. Not returned if order is open
$.finish_asstring枚举:filled / cancelled / liquidated / ioc / auto_deleveraged / reduce_only / position_closed / reduce_out / stp
How the order was finished: - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - reduce_only: cancelled because of increasing position while `reduce-only` set - position_closed: cancelled because the position was closed - reduce_out: only reduce positions by excluding hard-to-fill orders - stp: cancelled because self trade prevention
$.statusstring枚举:open / finished
Order status - `open`: Pending - `finished`: Completed
$.contractstring
Futures contract
$.sizestring
Required. Trading quantity. Positive for buy, negative for sell. Set to 0 for close position orders.
$.icebergstring
Display size for iceberg orders. 0 for non-iceberg orders. Note that hidden portions are charged taker fees.
$.pricestring
Required. Order Price; a price of 0 with `tif` as `ioc` represents a market order.
$.closeboolean默认:false
Set as `true` to close the position, with `size` set to 0
$.is_closeboolean
Is the order to close position
$.reduce_onlyboolean默认:false
Set as `true` to be reduce-only order
$.is_reduce_onlyboolean
Is the order reduce-only
$.is_liqboolean
Is the order for liquidation
$.tifstring默认:"gtc";枚举:gtc / ioc / poc / fok
Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none
$.leftstring
Unfilled quantity
$.fill_pricestring
Fill price
$.textstring
Custom order information. If not empty, must follow the rules below: 1. Prefixed with `t-` 2. No longer than 28 bytes without `t-` prefix 3. Can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) In addition to user-defined information, the following are internal reserved fields that identify the order source: - web: Web - api: API call - app: Mobile app - auto_deleveraging: Automatic deleveraging - liquidation: Forced liquidation of positions under the old classic mode - liq-xxx: a. Forced liquidation of positions under the new classic mode, including isolated margin, one-way cross margin, and non-hedged positions under two-way cross margin. b. Forced liquidation of isolated positions under the unified account single-currency margin mode - hedge-liq-xxx: Forced liquidation of hedged positions under the new classic mode two-way cross margin, i.e., simultaneously closing long and short positions - pm_liquidate: Forced liquidation under unified account multi-currency margin mode - comb_margin_liquidate: Forced liquidation under unified account portfolio margin mode - scm_liquidate: Forced liquidation of positions under unified account single-currency margin mode - insurance: Insurance - clear: Contract delisting withdrawal
$.tkfrstring
Taker fee
$.mkfrstring
Maker fee
$.refuinteger
Referrer user ID
$.auto_sizestring枚举:close_long / close_short
Set side to close dual-mode position. `close_long` closes the long side; while `close_short` the short one. Note `size` also needs to be set to 0
$.stp_idinteger
Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group`
$.stp_actstring枚举:co / cn / cb / -
Self-Trading Prevention Action. Users can use this field to set self-trade prevention strategies 1. After users join the `STP Group`, they can pass `stp_act` to limit the user's self-trade prevention strategy. If `stp_act` is not passed, the default is `cn` strategy. 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter. 3. If the user did not use `stp_act` when placing the order, `stp_act` will return '-' - cn: Cancel newest, cancel new orders and keep old ones - co: Cancel oldest, cancel old orders and keep new ones - cb: Cancel both, both old and new orders will be cancelled
$.amend_textstring
The custom data that the user remarked when amending the order
$.pidinteger格式:"int64"
Position ID
$.market_order_slip_ratiostring
Custom maximum slippage rate for market orders. If not provided, the default contract settings will be used
$.pos_margin_modestring
Position Margin Mode isolated - Isolated Margin, cross - Cross Margin, only passed in simple split position mode
$.action_modestring
Processing Mode When placing an order, different fields are returned based on the action_mode - `ACK`: Asynchronous mode, returns only key order fields - `RESULT`: No clearing information - `FULL`: Full mode (default)
$.tpsl_tp_trigger_pricestring
Take profit price
$.tpsl_sl_trigger_pricestring
Stop loss price
$.tpsl_tp_bbo_typestring
Take profit BBO type
$.tpsl_sl_bbo_typestring
Stop loss BBO type

来源、版本与使用说明

本站独立整理 Gate 技术资料,不代表 Gate,不提供账户、交易、充值或软件下载服务。

参数和字段改编自 Gate 官方 SDK 的 Apache 2.0 开放规格,固定版本为 v4.106.132。核对时官网文档已为 v4.106.136,后续变更须以官网为准;本页并未声称对该接口做过在线实测。

中文用途解释、字段阅读界面和本地 URL 组装器由本站整理。访问日志用于站点运维;页面没有第三方统计脚本,表单参数仅在当前页面内存中处理。