View Source Hyperliquid.Api.Exchange.TwapCancel (hyperliquid v0.2.2)

Cancel a TWAP order.

See: https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint

Summary

Functions

Link to this function

request(asset, twap_id, opts \\ [])

View Source

Cancel a TWAP order.

Parameters

  • private_key: Private key for signing (hex string)
  • asset: Asset index
  • twap_id: TWAP order ID to cancel
  • opts: Optional parameters

Options

  • :vault_address - Cancel for a vault

Returns

  • {:ok, response} - Cancel result
  • {:error, term()} - Error details

Examples

{:ok, result} = TwapCancel.request(private_key, 0, 12345)