接口文档研读 · 现货

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

API REFERENCE / 现货

Gate 现货订单状态与历史筛选:参数、响应与查询工具

按现货交易对和 status 查询订单列表,并区分未完成订单与历史订单的筛选方式。

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

这条查询解决什么问题

open 状态只支持对应分页条件,side、from 和 to 不能沿用历史订单模式,且 finished 不等于全部成交。

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

查看官方英文说明

List orders

Note that query results default to spot order lists for spot, unified account, and isolated margin accounts. When `status` is set to `open` (i.e., when querying pending order lists), only `page` and `limit` pagination controls are supported. `limit` can only be set to a maximum of 100. The `side` parameter and time range query parameters `from` and `to` are not supported. When `status` is set to `finished` (i.e., when querying historical orders), in addition to pagination queries, `from` and `to` time range queries are also supported. Additionally, the `side` parameter can be set to filter one-sided history. Time range filter parameters are processed according to the order end time.

请求参数逐项核对

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

参数与位置类型与范围官方字段说明
currency_pairquery · 必填string
Query by specified currency pair. Required for open orders, optional for filled orders
statusquery · 必填string
List orders based on status `open` - order is waiting to be filled `finished` - order has been filled or cancelled
pagequery · 可选integer格式:"int32";默认:1;最小:1
Page number
limitquery · 可选integer默认:100;最小:1;最大:1000
Maximum number of records to be returned. If `status` is `open`, maximum of `limit` is 100
accountquery · 可选string
Specify query account
fromquery · 可选integer格式:"int64"
Start timestamp for the query
toquery · 可选integer格式:"int64"
End timestamp for the query, defaults to current time if not specified
sidequery · 可选string
Specify all bids or all asks, both included if not specified

在本页组装查询 URL

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

query · string
query · string
query · integer格式:"int32";默认:1;最小:1
query · integer默认:100;最小:1;最大:1000
query · string
query · integer格式:"int64"
query · integer格式:"int64"
query · string
尚未生成 URL。

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

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

响应字段怎样阅读

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

HTTP 200 · List retrieved successfully

字段路径数据类型字段说明
$array<object>
未提供字段注释
$[]object
Spot order details
$[].idstring
Order ID
$[].textstring
User defined 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(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - 101: from android - 102: from IOS - 103: from IPAD - 104: from webapp - 3: from web - 2: from apiv2 - apiv4: from apiv4 pm_liquidate, comb_margin_liquidate, and scm_liquidate represent cross-margin liquidation orders liquidate represents isolated-margin liquidation orders
$[].amend_textstring
The custom data that the user remarked when amending the order
$[].create_timestring
Creation time of order
$[].update_timestring
Last modification time of order
$[].create_time_msinteger格式:"int64"
Creation time of order (in milliseconds)
$[].update_time_msinteger格式:"int64"
Last modification time of order (in milliseconds)
$[].statusstring枚举:open / closed / cancelled
Order status - `open`: to be filled - `closed`: closed order - `cancelled`: cancelled
$[].currency_pairstring
Currency pair
$[].trade_quotestring
Actual quote currency used for the trade; can be specified only in a unified market
$[].typestring默认:"limit";枚举:limit / market
Order Type - limit : Limit Order - market : Market Order
$[].accountstring默认:"spot"
Account type, spot - spot account, margin - leveraged account, unified - unified account
$[].sidestring枚举:buy / sell
Buy or sell order
$[].amountstring
Trade amount When `type` is `limit`, this is the base currency to trade (the currency being bought or sold), e.g. `BTC` in `BTC_USDT`. When `type` is `market`, the meaning depends on the side: - `side`: `buy` refers to the quote currency, e.g. `USDT` in `BTC_USDT` - `side`: `sell` refers to the base currency, e.g. `BTC` in `BTC_USDT`
$[].pricestring
Trading price, required when `type`=`limit`
$[].time_in_forcestring默认:"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 Only `ioc` and `fok` are supported when `type`=`market`
$[].icebergstring
Amount to display for the iceberg order. Null or 0 for normal orders. Hiding all amount is not supported
$[].auto_borrowboolean
Used in margin or cross margin trading to allow automatic loan of insufficient amount if balance is not enough
$[].auto_repayboolean
Enable or disable automatic repayment for automatic borrow loan generated by cross margin order. Default is disabled. Note that: 1. This field is only effective for cross margin orders. Margin account does not support setting auto repayment for orders. 2. `auto_borrow` and `auto_repay` can be both set to true in one order
$[].leftstring
Amount left to fill
$[].filled_amountstring
Amount filled
$[].fill_pricestring
Total filled in quote currency. Deprecated in favor of `filled_total`
$[].filled_totalstring
Total filled in quote currency
$[].avg_deal_pricestring
Average fill price
$[].feestring
Fee deducted
$[].fee_currencystring
Fee currency unit
$[].point_feestring
Points used to deduct fee
$[].gt_feestring
GT used to deduct fee
$[].gt_maker_feestring
GT amount used to deduct maker fee
$[].gt_taker_feestring
GT amount used to deduct taker fee
$[].gt_discountboolean
Whether GT fee deduction is enabled
$[].rebated_feestring
Rebated fee
$[].rebated_fee_currencystring
Rebated fee currency unit
$[].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枚举:cn / co / 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
$[].finish_asstring枚举:open / filled / cancelled / liquidate_cancelled / depth_not_enough / trader_not_enough / small / ioc / poc / fok / stp / price_protect_cancelled / unknown
How the order finished: - open: Pending processing - filled: Fully filled - cancelled: Cancelled by user - liquidate_cancelled: Cancelled by liquidation - small: Order size too small - depth_not_enough: Cancelled due to insufficient order book depth - trader_not_enough: Cancelled due to insufficient counterparty liquidity - ioc: Not filled immediately because time-in-force is IOC - poc: Post-only requirement not met because time-in-force is set to poc (maker-only); rejected after being detected as taker - fok: Not fully filled immediately because time-in-force is FOK - stp: Cancelled due to self-trade prevention - price_protect_cancelled: Cancelled due to price protection - unknown: Unknown
$[].action_modestring
Processing Mode: When placing an order, different fields are returned based on action_mode. This field is only valid during the request and is not included in the response result ACK: Asynchronous mode, only returns key order fields RESULT: No clearing information FULL: Full mode (default)
$[].slippagestring
Maximum supported slippage ratio for Spot Market Order Placement, calculated based on the latest market price at the time of order placement as the benchmark (Example: 0.03 means 3%)
$[].stop_profitobject
Take profit for limit orders. Pass {} to cancel take profit; pass null to leave take profit unchanged.
$[].stop_profit.trigger_pricestring
Take profit trigger price When `side == "buy"`, `trigger_price` must be greater than `price` When `side == "sell"`, `trigger_price` must be less than `price`
$[].stop_profit.order_pricestring
Take profit order price
$[].stop_lossobject
Stop loss for limit orders. Pass {} to cancel stop loss; pass null to leave stop loss unchanged.
$[].stop_loss.trigger_pricestring
Stop loss trigger price When `side == "buy"`, `trigger_price` must be less than `price` When `side == "sell"`, `trigger_price` must be greater than `price`
$[].stop_loss.order_pricestring
Stop-loss order price

来源、版本与使用说明

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

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

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