View Source Hyperliquid.Api.Info.OpenOrders (hyperliquid v0.2.2)
User's open orders.
Returns list of currently open orders.
Usage
{:ok, orders} = OpenOrders.request("0x...")
btc_orders = OpenOrders.by_coin(orders, "BTC")
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.
Get buy orders.
Get orders by coin.
Returns true if cache storage is enabled.
Returns the cache TTL if configured.
Creates a changeset for open orders data.
Get count.
Fetch data and persist to configured storage backends.
Fetch data and persist. Raises on error.
Find by OID.
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.
Make the API request and return the raw response map (no key transformation).
Make the API request returning raw map, raising on error.
Get sell orders.
Returns true if any storage backend is enabled.
Types
@type t() :: %Hyperliquid.Api.Info.OpenOrders{orders: [Order.t()]}
Functions
Returns metadata about this endpoint.
Example
iex> Hyperliquid.Api.Info.OpenOrders.__endpoint_info__()
%{
endpoint: "openOrders",
type: :info,
rate_limit_cost: 20,
params: [:user],
optional_params: [],
doc: "Retrieve a user's open orders",
returns: "OpenOrders struct with list of open orders"
}
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.
Get buy orders.
Get orders by coin.
Returns true if cache storage is enabled.
Returns the cache TTL if configured.
@spec changeset(t(), map()) :: Ecto.Changeset.t()
Creates a changeset for open orders data.
@spec count(t()) :: non_neg_integer()
Get count.
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.
Find by OID.
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).
@spec rate_limit_cost() :: non_neg_integer()
Get the rate limit cost for this endpoint.
Make the API request and parse the response.
Make the API request, raising on error.
Make the API request and return the raw response map (no key transformation).
Make the API request returning raw map, raising on error.
Get sell orders.
Returns true if any storage backend is enabled.