View Source Hyperliquid.Api.Info.OrderStatus (hyperliquid v0.2.2)

Status of a specific order.

Returns detailed status information for an order by OID or CLOID.

See: https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#query-order-status-by-oid-or-cloid

Summary

Functions

Returns metadata about this endpoint.

Returns postgres table configurations (multi-table support).

Returns storage configuration for this endpoint.

Build a cache key from response data using the configured pattern. Returns nil if cache is not enabled or no pattern configured.

Build the request payload.

Build the request payload for orderStatus by CLOID.

Returns true if cache storage is enabled.

Returns the cache TTL if configured.

Check if order is canceled.

Creates a changeset for order status data.

Fetch data and persist to configured storage backends.

Fetch data and persist. Raises on error.

Check if order is filled.

Check if order is open.

Parse and validate the API response.

Returns true if postgres storage is enabled.

Returns the postgres table name if configured (primary table for legacy support).

Returns the upsert config for postgres (primary table for legacy support).

Get the rate limit cost for this endpoint.

Make the API request and parse the response.

Make the API request, raising on error.

Fetches order status by CLOID from the API.

Make the API request and return the raw response map (no key transformation).

Make the API request returning raw map, raising on error.

Returns true if any storage backend is enabled.

Types

@type t() :: %Hyperliquid.Api.Info.OrderStatus{
  order: Order.t() | nil,
  status: String.t()
}

Functions

Returns metadata about this endpoint.

Example

iex> Hyperliquid.Api.Info.OrderStatus.__endpoint_info__()
%{
  endpoint: "orderStatus",
  type: :info,
  rate_limit_cost: 1,
  params: [:user, :oid],
  optional_params: [],
  doc: "Query order status by OID or CLOID",
  returns: "Detailed order status information"
}

Returns postgres table configurations (multi-table support).

Returns storage configuration for this endpoint.

Build a cache key from response data using the configured pattern. Returns nil if cache is not enabled or no pattern configured.

Link to this function

build_request(user, oid)

View Source
@spec build_request(term(), term()) :: map()

Build the request payload.

Link to this function

build_request_by_cloid(user, cloid)

View Source
@spec build_request_by_cloid(String.t(), String.t()) :: map()

Build the request payload for orderStatus by CLOID.

Parameters

  • user: User address (0x...)
  • cloid: Client order ID

Returns true if cache storage is enabled.

Returns the cache TTL if configured.

@spec canceled?(t()) :: boolean()

Check if order is canceled.

Link to this function

changeset(order_status \\ %__MODULE__{}, attrs)

View Source
@spec changeset(t(), map()) :: Ecto.Changeset.t()

Creates a changeset for order status data.

Fetch data and persist to configured storage backends.

This calls request/N and then stores the result using Storage.Writer. Request params are merged into stored data for cache key generation.

Fetch data and persist. Raises on error.

@spec filled?(t()) :: boolean()

Check if order is filled.

@spec open?(t()) :: boolean()

Check if order is open.

@spec parse_response(map()) :: {:ok, t()} | {:error, term()}

Parse and validate the API response.

Returns true if postgres storage is enabled.

Returns the postgres table name if configured (primary table for legacy support).

Link to this function

postgres_upsert_config()

View Source

Returns the upsert config for postgres (primary table for legacy support).

@spec rate_limit_cost() :: non_neg_integer()

Get the rate limit cost for this endpoint.

@spec request(term(), term()) :: {:ok, t()} | {:error, term()}

Make the API request and parse the response.

@spec request!(term(), term()) :: t()

Make the API request, raising on error.

Link to this function

request_by_cloid(user, cloid)

View Source
@spec request_by_cloid(String.t(), String.t()) :: {:ok, t()} | {:error, term()}

Fetches order status by CLOID from the API.

Parameters

  • user: User address (0x...)
  • cloid: Client order ID

Returns

  • {:ok, %OrderStatus{}} - Parsed and validated order status
  • {:error, term()} - Error from HTTP or validation
@spec request_raw(term(), term()) :: {:ok, map()} | {:error, term()}

Make the API request and return the raw response map (no key transformation).

@spec request_raw!(term(), term()) :: map()

Make the API request returning raw map, raising on error.

Returns true if any storage backend is enabled.