Skip to main content
hedge.execute(request, signer, options?) runs one manager action to a terminal Outcome. request is an ActionRequest: an object whose action field names a builder and whose other fields are that builder’s body. TypeScript checks the body against the action. execute follows batches and next continuations on its own. See Execute and safety for how. The examples below assume hedge is a client, signer is a TransactionSigner, and vault, position, and similar names are address strings.

Request bodies

payer is never part of a body. The API sets it from the key. Amounts are base-unit strings (BaseUnitString). DecimalString fields, such as a Phoenix size, are decimals like "0.5" and are not base units.

Jupiter

Meteora DLMM

shape is "spot", "curve", or "bidAsk". maxActiveBinSlippage is the number of bins the active price may move between build and landing before the transaction fails. amountX and amountY are in the pool’s token X and token Y base units. To open a position, read the pool first and choose a range around its active bin:
Create an empty position and read its address:
Add, remove, claim, zap out, and close:
Build a dlmm/flip range with flipSide and flipRange so it lies on one side of the active bin. The active bin holds both tokens, so a flip never includes it.
Close an empty strategy:

Phoenix perpetuals

Phoenix must co-sign the onboarding transaction, so onboarding is its own method and does not go through execute:
onboardPhoenix(vault, signer, options?) builds the transaction, inspects it against a separate, narrower policy, signs it as fee payer, and submits it to the onboarding submit endpoint, where Phoenix adds its signature and sends it. It then polls the transaction status like execute and returns the same Outcome. It never resubmits. See Execute and safety. Deposit, trade, and withdraw:
To cancel specific orders, copy priceInTicks and orderSequenceNumber from getPhoenix. openOrders is null when Phoenix’s API is down.

Vault administration

name is at most 32 UTF-8 bytes. Both fee fields are basis points from 0 to 10000. depositCap and minDeposit are in deposit-mint base units. minWithdrawalShares is in share base units. status is "normal", "paused", or "reduceOnly".

Key scopes

Each API key lists the actions it may run. Every write needs the send scope plus the action’s own name. The API rejects a request when the key lacks one of them. So dlmm/open on a range wider than 70 bins needs dlmm/open and dlmm/extend. dlmm/zap-out needs dlmm/zap-out, dlmm/zap-out/swap, and jupiter/sweep. dlmm/add can need dlmm/add-range.
The SDK cannot check scopes before it builds. A missing scope shows up as a failed outcome with the API’s error code. See the API reference for the authentication and error contract.