For AI agents: the documentation index is at /llms.txt, and this page is available as Markdown at /api/gateway/prepare-modify-triggers.md.
Prepare moving resting DeFi TP/SL orders to new trigger prices
Prepares one Hyperliquid batch modify, under the client-chosen batch id,
moving each listed order to its new trigger price, and returns the single
unsigned payload the client signs and posts to
POST /orders/modify/{id}/execute with the same id. Reusing an id
that is already prepared returns 409. Every order must be the caller's active DeFi TP/SL trigger
order on the same account; each keeps the slippage bound it was placed
with, scaled to its new trigger. A trigger price on the wrong side of the
current price returns 400; an order that is no longer open returns 422
with code order_not_open.
Rate limit: counts against the Orders limit, 10 a second and 120 a minute (user token, per user); 100 a second and 1,200 a minute (organization api key, per organization). See Rate limits.
bearerAuthAuthorizationBearer <JWT>An access token from POST /v1/auth/api-key/token. An organization token lasts one hour and has no refresh token; a personal token can be refreshed.
id*stringClient-chosen batch id, reused for POST /orders/modify/{id}/execute
uuidTM-On-Behalf-Of?stringAct as one of your organization's users. The value is the user_id returned when the user was created; the request then reads and writes that user's account. Requires an organization token and a user your organization created: 400 for a personal token, a repeated header or a non-UUID, 403 for a user outside your organization. Not accepted on organization-scoped routes.
uuidapplication/json- body
orders*array<>1 <= itemsUnsigned batch payload to sign and execute
application/json- response
payloads?array<>The single payload to sign for the whole batch.
curl -X POST 'https://api.truemarkets.co/v1/gateway/orders/modify/497f6eca-6276-4993-bfeb-53cbbbba6f08/prepare' \ -H 'TM-On-Behalf-Of: 3f6d2c0e-8a41-4c2b-9f1e-2b7d5c0a9e11' \ -H 'Content-Type: application/json' \ -d '{ "orders": [ { "order_id": "93101167-9065-4b9c-b98b-5d789a3ed9fe", "trigger_price": "2300" } ]}'{ "payloads": [ { "digest": "string", "payload": "string" } ]}Execute a resting DeFi order cancellation POST
Submits the client's signatures over the payloads returned by POST /orders/{id}/cancel to cancel a resting DeFi limit or TP/SL order. The order moves to canceled once the venue confirms, keeping any quantity that filled before the cancel in executed_qty/executed_vwap. An order that filled before the cancel landed moves to complete. An order that is no longer open, including one the venue reports closed before it can say how, returns 422 with code order_not_open.
Execute a prepared TP/SL modify POST
Submits the client's signature over the payload POST /orders/modify/{id}/prepare returned. Each order reports the trigger price it now rests at, or the venue's error when it refused that order, for example a trigger that already fired; refused orders keep their previous trigger. A prepared modify is single-use: an unknown or spent id returns 404.