Skip to main content

batchModify

Modify multiple existing orders atomically in a single transaction. All modifications either succeed together or fail together, preventing partial updates that could expose unwanted risk.

Sample Data#

{
"signature": {
"r": "0x34b4fe28e091111949d4925ae53c10c552e859523debcafa41048767ca88bace",
"s": "0x48ecd1cd140ecb3d91bfac13410794e5cdbf3221fcf4371a293a737ffab4b3d0",
"v": 28
},
"action": {
"type": "batchModify",
"modifies": [
{
"oid": 291708433915,
"order": {
"a": 168,
"b": false,
"p": "0.03302",
"s": "8000",
"r": false,
"t": {
"limit": {
"tif": "Alo"
}
}
}
}
]
},
"nonce": 1768146913007
}

View this transaction on Hypurrscan →

Field Reference#

Action Fields#

FieldTypeDescription
typestringAlways "batchModify"
modifiesarrayArray of modification objects

Modify Object Fields#

FieldTypeDescription
oidnumberOrder ID of the order to modify
orderobjectNew order parameters (same structure as order action)

Order Fields#

FieldTypeDescription
anumberAsset index
bbooleanSide: true for buy, false for sell
pstringNew limit price
sstringNew size
rbooleanReduce-only flag
tobjectOrder type configuration

Atomicity Guarantee#

All modifications in a batch are executed atomically:

  • All succeed: Every order is updated
  • All fail: No orders are changed

This prevents scenarios where partial updates could leave a market maker with imbalanced quotes.

Use Cases#

Market Making Quote Updates#

Update bid and ask quotes together to maintain spread:

def process_batchModify_action(action):
modifies = action.get('modifies', [])

for mod in modifies:
oid = mod['oid']
new_price = mod['order']['p']
new_size = mod['order']['s']
side = 'BUY' if mod['order']['b'] else 'SELL'

print(f"Modified {oid}: {side} {new_size} @ {new_price}")

Spread Analysis#

Track how market makers adjust their quotes in response to price movements.

Quote Refresh Rate Monitoring#

Measure how frequently market makers update their orders.