API ReferenceExecution
Build an unsigned modification for a resting execution
const url = 'https://exec.predictefy.com/v1/exec/hyperliquid/orders/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/modify';const options = { method: 'POST', headers: { 'Idempotency-Key': 'example', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"price":1,"size":1,"trigger":"example","endUserRef":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://exec.predictefy.com/v1/exec/hyperliquid/orders/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/modify \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'Idempotency-Key: example' \ --data '{ "price": 1, "size": 1, "trigger": "example", "endUserRef": "example" }'Requires Authorization: Bearer <api-key> with the trade scope and a unique Idempotency-Key. The target must be submitted or acked, and the body must contain at least one of price, size, or trigger. The response is a new modify execution whose own executionId is submitted after client signing.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Execution venue slug. Discover available execution venues with GET /v1/exec/venues. Settlement-only venues may appear but report order verbs false.
Account-owned execution UUID.
Header Parameters
Section titled “Header Parameters”Caller-generated non-empty key. Build/cancel/modify keys identify newly persisted intents; a submit key identifies that relay attempt and cannot be rebound to another ID. The literal strings undefined and null are rejected with 400 VALIDATION_ERROR, so a client that stringified a missing key cannot bind or replay one. Two prefixes are RESERVED by the execution service for keys it mints itself and are rejected with 400 RESERVED_IDEMPOTENCY_KEY before anything is written: cond: (a hosted conditional order's own fire key) and dry-run: (the preview key handed to a venue integration). The match is case-sensitive.
Request Bodyrequired
Section titled “Request Bodyrequired”At least one supported modification must be present. endUserRef is optional and, when supplied, must equal the target execution's stored reference; the modify always counts against that target end user's daily bucket at its full replacement notional.
object
Optional opaque end-user reference on every order build. This is an id chosen by the calling platform; it must not contain an email address or a person's name. It is stored on the execution, returned as endUserRef on order status and fills, and accepted as the endUserRef filter on the order list. Accounts with a per-end-user daily cap must supply it on every fresh order build. A modify inherits the target execution's reference and counts its full replacement notional against that end user's bucket; a different value in the modify body is refused. Cancel and redeem accept it for attribution only.
At least one supported modification must be present. endUserRef is optional and, when supplied, must equal the target execution's stored reference; the modify always counts against that target end user's daily bucket at its full replacement notional.
object
Optional opaque end-user reference on every order build. This is an id chosen by the calling platform; it must not contain an email address or a person's name. It is stored on the execution, returned as endUserRef on order status and fills, and accepted as the endUserRef filter on the order list. Accounts with a per-end-user daily cap must supply it on every fresh order build. A modify inherits the target execution's reference and counts its full replacement notional against that end user's bucket; a different value in the modify body is refused. Cancel and redeem accept it for attribution only.
At least one supported modification must be present. endUserRef is optional and, when supplied, must equal the target execution's stored reference; the modify always counts against that target end user's daily bucket at its full replacement notional.
object
Optional opaque end-user reference on every order build. This is an id chosen by the calling platform; it must not contain an email address or a person's name. It is stored on the execution, returned as endUserRef on order status and fills, and accepted as the endUserRef filter on the order list. Accounts with a per-end-user daily cap must supply it on every fresh order build. A modify inherits the target execution's reference and counts its full replacement notional against that end user's bucket; a different value in the modify body is refused. Cancel and redeem accept it for attribution only.
Examplegenerated
{ "price": 1, "size": 1, "trigger": "example", "endUserRef": "example"}Responses
Section titled “Responses”New unsigned modify execution. A duplicate key returns the original build.
object
object
acked means the venue accepted/relayed the artifact; it does not by itself prove the order is resting. Use the status/refresh operations for confirmation.
object
Fixed-point whole-contract count, for example 5.00.
Fixed-point whole-cent probability strictly between zero and one.
Present only when the build requested reduceOnly; never false.
object
object
Validated client-signed or authless relayed artifact, or null before submission. Polymarket US submitted artifacts exclude keyId, secretKey, timestamp, and auth headers.
Venue fee estimate or null when no verified model is available. Polymarket estimates carry fee, unit: "usd" and takerOnly; fee is a taker fee estimate in USD. Both sides settle it in pUSD collateral on the V2 exchange, and Polymarket charges makers no fee.
The platform end-user reference supplied on build, or null when the order was not attributed. Present while the platform-accounts feature is enabled; omitted otherwise.
Present on Hyperliquid HIP-4 order builds and their persisted responses.
object
First-party HIP-4 outcome assets have no perp-DEX component.
Present only on a member of a Hyperliquid multi-order action. Every order of that action shares this id and its own groupIndex.
Zero-based position of this order in the group action. It aligns this row with the venue's positional statuses[] ack.
Optional pre-signing advisories. Polymarket and Opinion order builds currently warn that venue regional restrictions reject hosted submission from Predictefy. Rain warns when a pool's official origin cannot be verified. Hyperliquid warns when spendable spot USDC (total minus hold) is below order notional. It names the shortfall and points to POST /v1/funding/hyperliquid/steps. A failed balance read omits this advisory and does not block the build. PRED build currently returns 404, so no advisory is returned. If PRED execution becomes available, its advisory warns that venue key binding rejects platform-key submission for a caller-owned Safe maker. Builds and client signing remain available for supported venues. Callers may use their own submit path or, for PRED, credentials from their own venue arrangement.
Example
{ "success": true, "data": { "intent": "order", "status": "built", "unsigned": { "side": "bid", "time_in_force": "good_till_canceled", "self_trade_prevention_type": "taker_at_cross", "reduce_only": true }, "collateral": { "ledger": "spot" } }}Headers
Section titled “Headers”Present with value true when stored state satisfied an idempotent retry.
A missing or RESERVED Idempotency-Key, or an invalid request/body/lifecycle state.
object
object
Always present on errors; quote this id when reporting a failed request.
Optional machine-readable refusal details. It names a reason code and never echoes request values.
Present only when a venue error is attributed to a specific exchange.
Optional, report-only upstream book error class; never changes retry behavior.
Example
{ "success": false, "error": { "code": "VALIDATION_ERROR" }}Missing, invalid, unknown, or revoked Predictefy API key.
object
object
Always present on errors; quote this id when reporting a failed request.
Optional machine-readable refusal details. It names a reason code and never echoes request values.
Present only when a venue error is attributed to a specific exchange.
Optional, report-only upstream book error class; never changes retry behavior.
Example
{ "success": false, "error": { "code": "VALIDATION_ERROR" }}The request breaches a spend cap or the account lacks endpoint credits.
object
object
Always present on errors; quote this id when reporting a failed request.
Optional machine-readable refusal details. It names a reason code and never echoes request values.
Present only when a venue error is attributed to a specific exchange.
Optional, report-only upstream book error class; never changes retry behavior.
Example
{ "success": false, "error": { "code": "VALIDATION_ERROR" }}The API key lacks trade scope, or the venue does not allow trading from your country. Where the venue allows closing only, GEO_BLOCKED is returned when the stored order is neither a sell nor a redemption. Cancelling an existing order is always allowed.
object
object
Always present on errors; quote this id when reporting a failed request.
Optional machine-readable refusal details. It names a reason code and never echoes request values.
Present only when a venue error is attributed to a specific exchange.
Optional, report-only upstream book error class; never changes retry behavior.
Example
{ "success": false, "error": { "code": "VALIDATION_ERROR" }}The venue integration is absent or the execution is missing/not owned by the caller.
object
object
Always present on errors; quote this id when reporting a failed request.
Optional machine-readable refusal details. It names a reason code and never echoes request values.
Present only when a venue error is attributed to a specific exchange.
Optional, report-only upstream book error class; never changes retry behavior.
Example
{ "success": false, "error": { "code": "VALIDATION_ERROR" }}The authenticated execution token bucket is exhausted.
object
object
Always present on errors; quote this id when reporting a failed request.
Optional machine-readable refusal details. It names a reason code and never echoes request values.
Present only when a venue error is attributed to a specific exchange.
Optional, report-only upstream book error class; never changes retry behavior.
Example
{ "success": false, "error": { "code": "VALIDATION_ERROR" }}Unexpected failure or an unsigned artifact escaped its registered bounds.
object
object
Always present on errors; quote this id when reporting a failed request.
Optional machine-readable refusal details. It names a reason code and never echoes request values.
Present only when a venue error is attributed to a specific exchange.
Optional, report-only upstream book error class; never changes retry behavior.
Example
{ "success": false, "error": { "code": "VALIDATION_ERROR" }}The runtime venue integration does not implement this lifecycle verb.
object
object
Always present on errors; quote this id when reporting a failed request.
Optional machine-readable refusal details. It names a reason code and never echoes request values.
Present only when a venue error is attributed to a specific exchange.
Optional, report-only upstream book error class; never changes retry behavior.
Example
{ "success": false, "error": { "code": "VALIDATION_ERROR" }}Authentication, billing, or execution storage is temporarily unavailable.
object
object
Always present on errors; quote this id when reporting a failed request.
Optional machine-readable refusal details. It names a reason code and never echoes request values.
Present only when a venue error is attributed to a specific exchange.
Optional, report-only upstream book error class; never changes retry behavior.
Example
{ "success": false, "error": { "code": "VALIDATION_ERROR" }}