curl --request POST \
--url https://api.hyperliquid.xyz/exchange \
--header 'Content-Type: application/json' \
--data '
{
"action": {
"type": "modify",
"oid": 123456789,
"order": {
"a": 0,
"b": true,
"p": "27.5",
"s": "1.0",
"r": false,
"t": {
"limit": {
"tif": "Gtc"
}
},
"c": "0x1234567890abcdef1234567890abcdef"
}
},
"nonce": 1705234567890,
"signature": {
"r": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"s": "0xfedcba0987654321fedcba0987654321fedcba0987654321fedcba0987654321",
"v": 27
},
"vaultAddress": null
}
'{
"status": "ok",
"response": {
"type": "modify",
"data": {
"statuses": [
{
"resting": {
"oid": 77738309
}
}
]
}
}
}curl --request POST \
--url https://api.hyperliquid.xyz/exchange \
--header 'Content-Type: application/json' \
--data '
{
"action": {
"type": "modify",
"oid": 123456789,
"order": {
"a": 0,
"b": true,
"p": "27.5",
"s": "1.0",
"r": false,
"t": {
"limit": {
"tif": "Gtc"
}
},
"c": "0x1234567890abcdef1234567890abcdef"
}
},
"nonce": 1705234567890,
"signature": {
"r": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"s": "0xfedcba0987654321fedcba0987654321fedcba0987654321fedcba0987654321",
"v": 27
},
"vaultAddress": null
}
'{
"status": "ok",
"response": {
"type": "modify",
"data": {
"statuses": [
{
"resting": {
"oid": 77738309
}
}
]
}
}
}action (object, required) — The modify action object containing:
type (string) — Must be "modify"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 — "modify"data — Modification result informationcurl -X POST https://api.hyperliquid.xyz/exchange \
-H "Content-Type: application/json" \
-d '{
"action": {
"type": "modify",
"oid": 77738308,
"order": {
"a": 0,
"b": true,
"p": "51000",
"s": "0.02",
"r": false,
"t": {"limit": {"tif": "Gtc"}}
}
},
"nonce": 1234567890123,
"signature": {...}
}'
Show child attributes
Current timestamp in milliseconds
EIP-712 signature of the action with r, s, v components
Show child attributes
Address when trading on behalf of a vault or subaccount (optional)
Timestamp in milliseconds after which the request is rejected (optional)
Was this page helpful?