View Source Hyperliquid.Api.Info.HistoricalOrders (hyperliquid v0.2.2)
Historical orders for a user.
Returns all historical orders including filled, canceled, and rejected orders.
Usage
{:ok, orders} = HistoricalOrders.request("0x1234...")
filled = HistoricalOrders.filled(orders)
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.
Filter orders by coin.
Filter orders by status.
Returns true if cache storage is enabled.
Returns the cache TTL if configured.
Get canceled orders only.
Creates a changeset for historical orders data.
Fetch data and persist to configured storage backends.
Fetch data and persist. Raises on error.
Get filled orders only.
Find order 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.
Returns true if any storage backend is enabled.
Get valid order statuses.
Types
@type t() :: %Hyperliquid.Api.Info.HistoricalOrders{orders: [OrderRecord.t()]}
Functions
Returns metadata about this endpoint.
Example
iex> Hyperliquid.Api.Info.HistoricalOrders.__endpoint_info__()
%{
endpoint: "historicalOrders",
type: :info,
rate_limit_cost: 2,
params: [:user],
optional_params: [],
doc: "Retrieve historical orders for a user",
returns: "All historical orders including filled, canceled, and rejected 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.
Filter orders by coin.
Parameters
historical: The historical orders structcoin: Coin symbol
Returns
- List of order records for the coin
Filter orders by status.
Parameters
historical: The historical orders structstatus: Status to filter by
Returns
- List of order records matching status
Returns true if cache storage is enabled.
Returns the cache TTL if configured.
Get canceled orders only.
Parameters
historical: The historical orders struct
Returns
- List of canceled order records
@spec changeset(t(), map()) :: Ecto.Changeset.t()
Creates a changeset for historical orders data.
Parameters
historical: The historical orders structattrs: Map with orders key
Returns
Ecto.Changeset.t()
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.
Get filled orders only.
Parameters
historical: The historical orders struct
Returns
- List of filled order records
Find order by OID.
Parameters
historical: The historical orders structoid: Order ID
Returns
{:ok, OrderRecord.t()}if found{:error, :not_found}if not found
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.
Returns true if any storage backend is enabled.
@spec valid_statuses() :: [String.t()]
Get valid order statuses.
Returns
- List of valid status strings