curl --request POST \
--url https://api.hyperliquid.xyz/exchange \
--header 'Content-Type: application/json' \
--data '{
"action": {
"type": "batchModify",
"modifies": [
{
"oid": 123456789,
"order": {
"a": 0,
"b": true,
"p": "27.5",
"s": "1.0",
"r": false,
"t": {
"limit": {
"tif": "Gtc"
}
},
"c": "0x1234567890abcdef1234567890abcdef"
}
},
{
"oid": 123456790,
"order": {
"a": 0,
"b": false,
"p": "28.0",
"s": "0.5",
"r": false,
"t": {
"limit": {
"tif": "Gtc"
}
}
}
}
]
},
"nonce": 1705234567890,
"signature": {
"r": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"s": "0xfedcba0987654321fedcba0987654321fedcba0987654321fedcba0987654321",
"v": 27
},
"vaultAddress": null
}'
{
"status": "ok",
"response": {
"type": "batchModify",
"data": {
"statuses": [
{
"resting": {
"oid": 77738310
}
},
{
"resting": {
"oid": 77738311
}
}
]
}
}
}
curl --request POST \
--url https://api.hyperliquid.xyz/exchange \
--header 'Content-Type: application/json' \
--data '{
"action": {
"type": "batchModify",
"modifies": [
{
"oid": 123456789,
"order": {
"a": 0,
"b": true,
"p": "27.5",
"s": "1.0",
"r": false,
"t": {
"limit": {
"tif": "Gtc"
}
},
"c": "0x1234567890abcdef1234567890abcdef"
}
},
{
"oid": 123456790,
"order": {
"a": 0,
"b": false,
"p": "28.0",
"s": "0.5",
"r": false,
"t": {
"limit": {
"tif": "Gtc"
}
}
}
}
]
},
"nonce": 1705234567890,
"signature": {
"r": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"s": "0xfedcba0987654321fedcba0987654321fedcba0987654321fedcba0987654321",
"v": 27
},
"vaultAddress": null
}'
{
"status": "ok",
"response": {
"type": "batchModify",
"data": {
"statuses": [
{
"resting": {
"oid": 77738310
}
},
{
"resting": {
"oid": 77738311
}
}
]
}
}
}
action
(object, required) — The batch modify action object containing:
type
(string) — Must be "batchModify"
modifies
(array) — Array of modification objects, each containing:
oid
(number or string) — Order ID to modify, or cloid if using client order IDorder
(object) — New order parameters:
a
(number) — Asset indexb
(boolean) — Is buy order (true for buy/long, false for sell/short)p
(string) — New limit prices
(string) — New size in units of the base assetr
(boolean) — Reduce only ordert
(object) — Order type specification:
{"limit": {"tif": "Alo" | "Ioc" | "Gtc"}}
{"trigger": {"isMarket": boolean, "triggerPx": string, "tpsl": "tp" | "sl"}}
c
(string, optional) — New client order ID (128-bit hex string)nonce
(number, required) — Current timestamp in milliseconds (must be recent)
signature
(object, required) — EIP-712 signature of the action
vaultAddress
(string, optional) — Address when trading on behalf of a vault or subaccountexpiresAfter
(number, optional) — Timestamp in milliseconds after which the request is rejectedstatus
— "ok"
if request processedresponse
— Contains modification details:
type
— "batchModify"
data.statuses
— Array of modification results for each ordercurl -X POST https://api.hyperliquid.xyz/exchange \
-H "Content-Type: application/json" \
-d '{
"action": {
"type": "batchModify",
"modifies": [
{
"oid": 77738308,
"order": {
"a": 0,
"b": true,
"p": "51000",
"s": "0.02",
"r": false,
"t": {"limit": {"tif": "Gtc"}}
}
},
{
"oid": 77738309,
"order": {
"a": 1,
"b": false,
"p": "3200",
"s": "0.5",
"r": false,
"t": {"limit": {"tif": "Gtc"}}
}
}
]
},
"nonce": 1234567890123,
"signature": {...}
}'
Batch modification result
The response is of type object
.