Lux.Prisms.HyperliquidCancelOrderPrism (Lux v0.5.0)

View Source

A prism that cancels a specific order on the Hyperliquid exchange.

Example

iex> Lux.Prisms.HyperliquidCancelOrderPrism.run(%{
...>   coin: "ETH",
...>   order_id: 123456,
...>   vault_address: "0x0403369c02199a0cb827f4d6492927e9fa5668d5" # Optional
...> })
{:ok,
 %{
   status: "success",
   cancelled_order: %{
     "coin" => "ETH",
     "order_id" => 123456,
     "result" => %{
        # ... cancellation response from Hyperliquid
     }
   }
}}

The prism reads authentication details from configuration:

  • :hyperliquid_private_key - Ethereum account private key for authentication
  • :hyperliquid_address - (Optional) Ethereum account address

Summary

Functions

Callback implementation for Lux.Prism.handler/2.

Returns the Prism struct for this module.

Functions

handler(input, ctx)

Callback implementation for Lux.Prism.handler/2.

run(input, context \\ nil)

view()

Returns the Prism struct for this module.