Pular para o conteúdo principal
POST
Edit an order
Muda o preço (orderOdds) e/ou o volume (orderVolume) de uma ordem limit existente. Em ordens parcialmente casadas, a 4casters cancela a ordem existente e envia uma nova com os valores indicados. O novo orderVolume não desconta o volume já casado: se você originalmente colocou bet: 10, $5 casaram e você edita para `orderVolume: 10`, a ordem anterior é cancelada (reembolsando $5) e uma nova é criada por $10 (debitando $10), deixando você com $5 líquidos a menos.
Existe uma variante gRPC mais recente em POST /session/v4/editOrder. Ela aceita o mesmo corpo de requisição e também retorna errorType em falhas de validação. Prefira-a em integrações novas quando você tiver confirmado que a forma funciona para você.

Requisição

POST /session/editOrder
string
obrigatório
Id da ordem a editar. Obtenha-o de data.unmatched.orderID de /session/v3/place ou de id de /user/getUnmatched.
integer
Novas odds americanas. Passe null para deixar as odds sem alteração.
number
Novo valor de bet. Passe null para deixar o volume sem alteração.
string
O valor padrão é limit. Consulte tipos de ordem.
string
Opcional. Substitui o userReference existente da ordem.
number
Opcional. O volume que você originalmente pretendia colocar; o servidor o usa ao conciliar casamentos parciais.
string
Opcional. Nova expiração em minutos (string).
boolean
Somente v4. Rejeita a edição se não houver liquidez em aberto do lado contrário.

Resposta

O resultado reflete a forma de resposta de enviar ordens: um resumo cancelled mais o resultado novo matched / unmatched:
object
Resumo da ordem original cancelada e substituída.
array
Casamentos produzidos ao reenviar ao novo preço/volume. Mesma forma que um MatchedFill em enviar ordens.
object
Oferta em aberto do restante não casado da nova ordem.

Erros

Autorizações

Authorization
string
header
obrigatório

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.

Corpo

application/json
sessionID
string
obrigatório

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.
Opções disponíveis:
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.

Resposta

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

data
object