Skip to main content
Modify existing orders in-place without cancelling and re-placing them. The SDK-managed agent signs each modification; the user’s wallet is not prompted.
The examples on this page use Hyperliquid (provider: 'hyperliquid'). Replace the provider value with any supported DEX from getProviders().

modifyOrders

const result = await perps.modifyOrders({
  provider: 'hyperliquid',
  address: userAddress,
  modifications: [
    { id: '12345678', price: '94500.00', size: '0.2' },
  ],
});

console.log(result.results);
// [{ action: 'modifyOrder', success: true }]
Pass multiple ModifyOrderInput entries to modify several orders in one call.

ModifyOrderInput fields

FieldTypeRequiredDescription
idstringYesOrder ID to modify
pricestringNoNew limit price
sizestringNoNew order size
triggerPricestringNoNew trigger price (for trigger orders)
limitPricestringNoNew limit price for trigger execution
API Reference: POST /createAction · /executeAction