> For the complete documentation index, see [llms.txt](https://docs.hyperlink.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hyperlink.xyz/api/exchange-methods/batchmodify.md).

# batchModify

## POST /exchange

> batchModify

```json
{"openapi":"3.1.0","info":{"title":"Hyperlink Exchange - batchModify","version":"1.0.0"},"tags":[{"name":"batchModify"}],"servers":[{"url":"https://api.hyperlink.xyz","description":"Mainnet"}],"paths":{"/exchange":{"post":{"tags":["batchModify"],"summary":"batchModify","operationId":"exchange_batchModify","requestBody":{"description":"Signed `batchModify` exchange request.","required":true,"content":{"application/json":{"schema":{"type":"object","description":"Request envelope for the `/exchange` endpoint.\n\nAll exchange requests must include:\n- `action`: The action to perform\n- `signature`: EIP-712 signature authorizing the action\n- `nonce`: Unix timestamp in milliseconds (must be within validity window)","required":["action","signature","nonce"],"properties":{"action":{"allOf":[{"$ref":"#/components/schemas/BatchModifyRequest","description":"Replace one or more existing orders"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["batchModify"]}}}],"description":"Replace one or more existing orders"},"expiresAfter":{"type":["integer","null"],"format":"int64","description":"Optional expiry for L1-signed actions.","minimum":0},"nonce":{"type":"integer","format":"int64","description":"Request nonce (Unix timestamp in milliseconds)","minimum":0},"signature":{"$ref":"#/components/schemas/Signature","description":"EIP-712 signature authorizing this action"},"vaultAddress":{"type":["string","null"],"description":"Optional vault address for vault operations"}}}}}},"responses":{"200":{"description":"Request successful. Response format depends on the requested action.","content":{"application/json":{"schema":{}}}},"400":{"description":"Request body was not valid JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"JSON body did not match a supported exchange schema","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeResponse"}}}}}}}},"components":{"schemas":{"BatchModifyRequest":{"type":"object","description":"Multi-order modify request.","required":["modifies"],"properties":{"a":{"type":["boolean","null"],"description":"Present only when true. Hyperlink rejects this mode."},"modifies":{"type":"array","items":{"$ref":"#/components/schemas/ModifyOrderRequest"},"description":"Order replacements submitted in one Hyperliquid action."}}},"ModifyOrderRequest":{"type":"object","description":"One order replacement within a modify action.","required":["oid","order"],"properties":{"oid":{"$ref":"#/components/schemas/OidOrCloid","description":"Existing Hyperliquid order ID or client order ID."},"order":{"$ref":"#/components/schemas/ModifyOrderWire","description":"Replacement order."}}},"OidOrCloid":{"oneOf":[{"type":"integer","format":"int64","minimum":0},{"type":"string"}],"description":"Hyperliquid order identifier used by modify actions."},"ModifyOrderWire":{"type":"object","description":"Replacement order encoded with Hyperliquid's canonical short keys.","required":["a","b","p","s","r","t"],"properties":{"a":{"type":"integer","format":"int32","description":"Asset index.","minimum":0},"b":{"type":"boolean","description":"True for buy, false for sell."},"c":{"type":["string","null"],"description":"Optional replacement client order ID."},"p":{"type":"string","description":"Limit price."},"r":{"type":"boolean","description":"Whether the replacement is reduce-only."},"s":{"type":"string","description":"Order size."},"t":{"$ref":"#/components/schemas/Order","description":"Replacement order type."}}},"Order":{"oneOf":[{"type":"object","description":"Standard limit order","required":["limit"],"properties":{"limit":{"$ref":"#/components/schemas/Limit","description":"Standard limit order"}}},{"type":"object","description":"Trigger/stop order","required":["trigger"],"properties":{"trigger":{"$ref":"#/components/schemas/Trigger","description":"Trigger/stop order"}}}],"description":"Order type: either a limit order or a trigger (stop) order."},"Limit":{"type":"object","description":"Limit order parameters.","required":["tif"],"properties":{"tif":{"type":"string","description":"Time in force: \"Ioc\" (immediate-or-cancel), \"Gtc\" (good-til-cancel), \"Alo\"\n(add-liquidity-only)"}}},"Trigger":{"type":"object","description":"Trigger order parameters (stop-loss / take-profit).","required":["isMarket","triggerPx","tpsl"],"properties":{"isMarket":{"type":"boolean","description":"If true, execute as market order when triggered"},"tpsl":{"type":"string","description":"Type: \"tp\" (take-profit) or \"sl\" (stop-loss)"},"triggerPx":{"type":"string","description":"Price at which to trigger the order"}}},"Signature":{"type":"object","description":"EIP-712 signature components.","required":["r","s","v"],"properties":{"r":{"type":"string","description":"r component (hex string with 0x prefix)"},"s":{"type":"string","description":"s component (hex string with 0x prefix)"},"v":{"type":"integer","format":"int32","description":"v component (27 or 28)","minimum":0}}},"ExchangeResponse":{"type":"object","description":"Exchange response envelope matching Hyperliquid's format exactly.\nUsed for order placement, cancellation, and other exchange actions.","required":["status","response"],"properties":{"response":{"$ref":"#/components/schemas/ExchangeResponseData","description":"Response payload"},"status":{"type":"string","description":"Status: \"ok\" or \"error\""}}},"ExchangeResponseData":{"type":"object","description":"Inner response object for exchange operations.","required":["type"],"properties":{"data":{"description":"Response data payload (omitted when null, e.g. for \"default\" responses)"},"type":{"type":"string","description":"Response type (e.g., \"order\", \"cancel\", \"default\", \"error\")"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.hyperlink.xyz/api/exchange-methods/batchmodify.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
