可用的 GDAX 订单状态和含义

Available GDAX Order Statuses and Meanings

GDAX API docs 在枚举订单可能具有的可用状态方面做得不好。我至少看到 openpendingactivedone,也许 settled[^1]。有没有人确定一个完整的列表,每个状态意味着什么?

我也试过查看一些可用的库,但官方客户端都是弱类型的(Node,Ruby),而在非官方客户端中,Java client uses strings, the Rust client uses strings, and the Haskell client 枚举类型,但它们也没有记录。

[^1]: settled 实际上可能是它自己的字段。

我的解释是

  1. pending - 订单已被匹配引擎接收但尚未在订单簿上生效(我认为这与 'received' websocketfeed 的消息类型 -​​ 但这可能是错误的)

  2. 打开 - 订单在订单簿上生效

  3. 已结算 - 订单已成交,但可能有一些持有(资金)到 release/clear 下跌。

  4. 完成 - 订单上不再有订单,订单上不再有订单已清除。

我带着同样的问题来到这里,但至少在他们的文档中某处描述了一些状态:

已收到、待处理、打开、完成

https://docs.gdax.com/#order-lifecycle

Valid orders sent to the matching engine are confirmed immediately and are in the received state. If an order executes against another order immediately, the order is considered done. An order can execute in part or whole. Any part of the order not filled immediately, will be considered open. Orders will stay in the open state until canceled or subsequently filled by new orders. Orders that are no longer eligible for matching (filled or canceled) are in the done state.

有趣的是,上面引用的文档没有提到状态 pending。然而,在文档的其他地方提到 pending 没有进一步的解释。但其中一个地方是 POST 下新订单请求的示例响应,它非常接近生命周期的 received 状态。他们可能混淆了名称,或者可能存在已接收和未决状态。没有现实世界 API 的回应或来自 Coinbase 的声明,这纯粹是猜测。

活跃

https://docs.gdax.com/#place-a-new-order

Stop orders become active and wait to trigger based on the movement of the last trade price.

我在 11 月有过同样的问题,并给 Coinbase 发了邮件。这是我(最终)收到的回复:

-- 引用 --

我已请求将所有订单类型的列表添加到文档中。 同时,关闭我的头脑类型:

  • 待定 – 交易引擎已收到但尚未处理的订单
  • 打开 – 订单簿上存在限价订单
  • 有效 – 订单簿上存在止损订单
  • 完成 – 订单不再保留在订单簿上(已执行)
  • 已拒绝 – 无法按指定下单(例如 Post 仅是真实的,但价格是可以立即执行的价格)
  • 已取消 – 由于自我交易预防,订单被用户或交易引擎取消

-- 结束语 --

据我所知,他们还没有真正更新文档,而且 "off the top of my head" 也不是太 confidence-inspiring,但至少它是 Coinbase 的回应:)