Skip to main content
POST
Edit an order
更改现有 limit 订单的价格(orderOdds)和/或数量(orderVolume)。 对于部分成交的订单,4casters 会取消现有订单并按所提供的值提交一笔新订单。新的 orderVolume 不会计入此前已成交的数量 — 如果你最初下单 bet: 10,其中 5已成交,然后改单为‘orderVolume:10‘,则原订单被取消(退回5 已成交,然后改单为 `orderVolume: 10`,则原订单被取消(退回 5),并创建一笔 10的新订单(扣款10 的新订单(扣款 10),净效果是你少了 $5。
更新的 gRPC 变体位于 POST /session/v4/editOrder。它接受相同的请求体,并在校验失败时额外返回 errorType。确认形态适合你后,新集成请优先使用它。

请求

POST /session/editOrder
string
必填
要修改的订单 ID。可从 /session/v3/place 的 data.unmatched.orderID 或 /user/getUnmatched 的 id 获取。
integer
新的美式赔率。传 null 表示赔率不变。
number
新的 bet 金额。传 null 表示数量不变。
string
默认为 limit。见 订单类型。
string
可选。替换订单上现有的 userReference。
number
可选。你最初打算下单的数量;服务器在对账部分成交时使用。
string
可选。新的过期时间(分钟,字符串)。
boolean
仅 v4。若对面没有挂单流动性,则拒绝此次改单。

响应

结果镜像 下单 的响应形态 — 一个 cancelled 汇总,加上新的 matched / unmatched 结果:
object
被取消并替换的原订单汇总。
array
按新价格/数量重新提交所产生的成交。形态与 下单 中的 MatchedFill 相同。
object
新订单未成交剩余部分的挂单。

错误

授权

Authorization
string
header
必填

Pass your auth token in the Authorization header. The Bearer prefix is optional; the server also accepts a signed auth cookie or a token field in the request body.

请求体

application/json
sessionID
string
必填

Order id to edit.

orderOdds
integer | null

New American odds. Pass null to leave odds unchanged.

orderVolume
number | null

New bet amount. Pass null to leave volume unchanged. Does not account for previously-filled volume.

orderType
enum<string>

Order placement strategy.

  • limit — default. Match against any liquidity at your price or better as a taker, rest the remainder as a maker.
  • post — guarantee maker. Reject if the order would match resting liquidity.
  • postArb — like post, but allowed to match if the matched odds are within 1% of yours, avoiding taker fees.
  • fillAndKill — guarantee taker. Match whatever size is available at your price or better and cancel the remainder; never rests. A partial fill is a success; rejected only when there is no matchable liquidity at all.
  • fillOrKill — all-or-nothing taker. Match the entire bet immediately or the whole order is rejected and any partial fills are rolled back; never rests.
可用选项:
limit,
post,
postArb,
fillAndKill,
fillOrKill
userReference
string
intendedOrderVolume
number

Optional. The volume you originally intended to place; used by the server when reconciling partial fills.

expiryChange
string

Optional. New expiration in minutes (string).

blockIfNoOtherSideOrders
boolean

v4 only. Reject the edit if there is no resting opposite-side liquidity.

响应

Edit result. Mirrors the place-order response shape: a cancelled summary plus the new matched / unmatched outcome.

data
object