Skip to main content
POST
/
session
/
editOrder
Edit an order
curl --request POST \
  --url https://api.4casters.io/session/editOrder \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "sessionID": "6549b6df6634097d2704716f",
  "orderOdds": 185,
  "orderVolume": 100
}
'
{
  "data": {
    "cancelled": {},
    "matched": [
      {
        "amount": 123,
        "odds": 123,
        "number": 123,
        "side": "<string>",
        "market": "<string>",
        "orderID": "<string>",
        "txID": "<string>",
        "wagerRequestID": "<string>",
        "userReference": "<string>",
        "risk": 123,
        "win": 123,
        "winWithoutCommission": 123
      }
    ],
    "unmatched": {
      "orderID": "<string>",
      "wagerRequestID": "<string>",
      "offered": 123,
      "odds": 123,
      "side": "<string>",
      "market": "<string>",
      "number": 123,
      "userReference": "<string>"
    }
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.4casters.io/llms.txt

Use this file to discover all available pages before exploring further.

Change the price (orderOdds) and/or volume (orderVolume) of an existing limit order. For partially-filled orders, 4casters cancels the existing order and submits a new one with the supplied values. The new orderVolume does not account for previously filled volume — if you originally placed bet: 10, 5wasfilled,andyouedittoorderVolume:10,thepreviousorderiscancelled(refunding5 was filled, and you edit to `orderVolume: 10`, the previous order is cancelled (refunding 5) and a new order is created for 10(debiting10 (debiting 10), leaving you net $5 down.
A newer gRPC variant lives at POST /session/v4/editOrder. It accepts the same request body and additionally returns errorType on validation failures. Prefer it for new integrations once you’ve confirmed the shape works for you.

Request

POST /session/editOrder
sessionID
string
required
Order id to edit. Get it from data.unmatched.orderID of /session/v3/place or id from /user/getUnmatched.
orderOdds
integer
New American odds. Pass null to leave odds unchanged.
orderVolume
number
New bet amount. Pass null to leave volume unchanged.
orderType
string
Defaults to limit. See order types.
userReference
string
Optional. Replaces the existing userReference on the order.
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.
curl -X POST https://api.4casters.io/session/editOrder \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "sessionID": "6549b6df6634097d2704716f",
    "orderOdds": 185,
    "orderVolume": 100
  }'

Response

The result mirrors the place order response shape — a cancelled summary plus the new matched / unmatched outcome:
data.cancelled
object
Summary of the cancelled-and-replaced original order.
data.matched
array
Fills produced by re-submitting at the new price/volume. Same shape as a MatchedFill in place order.
data.unmatched
object
Resting offer for the unfilled remainder of the new order.

Errors

StatusMeaning
400Validation error (v4/editOrder returns errorType for these).
503Orders service unreachable.

Authorizations

Authorization
string
header
required

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.

Body

application/json
sessionID
string
required

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 immediately or reject.
Available options:
limit,
post,
postArb,
fillAndKill
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.

Response

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

data
object