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