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

User's trade fills filtered by time range.

See: https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#retrieve-a-users-fills-by-time

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 with optional end_time parameter.

Returns true if cache storage is enabled.

Returns the cache TTL if configured.

Fetch data and persist to configured storage backends.

Fetch data and persist. Raises on error.

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.

Fetches user fills with optional end_time parameter.

Returns true if any storage backend is enabled.

Types

@type t() :: %Hyperliquid.Api.Info.UserFillsByTime{fills: [Fill.t()]}

Functions

Returns metadata about this endpoint.

Example

iex> Hyperliquid.Api.Info.UserFillsByTime.__endpoint_info__()
%{
  endpoint: "userFillsByTime",
  type: :info,
  rate_limit_cost: 1,
  params: [:user, :startTime],
  optional_params: [:endTime, :aggregateByTime],
  doc: "Retrieve user's trade fills filtered by time range",
  returns: "List of user fills within specified time range"
}

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, startTime, opts \\ [])

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

Build the request payload.

Link to this function

build_request_with_end_time(user, start_time, end_time)

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

Build the request payload with optional end_time parameter.

Parameters

  • user: User address (0x...)
  • start_time: Start timestamp in ms
  • end_time: Optional end timestamp in ms

Returns

  • Map with request parameters

Returns true if cache storage is enabled.

Returns the cache TTL if configured.

Link to this function

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

View Source
@spec changeset(t(), map()) :: Ecto.Changeset.t()
Link to this function

fetch(user, startTime, opts \\ [])

View Source

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.

Link to this function

fetch!(user, startTime, opts \\ [])

View Source

Fetch data and persist. Raises on error.

@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.

Link to this function

request(user, startTime, opts \\ [])

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

Make the API request and parse the response.

Link to this function

request!(user, startTime, opts \\ [])

View Source
@spec request!(term(), term(), keyword()) :: t()

Make the API request, raising on error.

Link to this function

request_raw(user, startTime, opts \\ [])

View Source
@spec request_raw(term(), term(), keyword()) :: {:ok, map()} | {:error, term()}

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

Link to this function

request_raw!(user, startTime, opts \\ [])

View Source
@spec request_raw!(term(), term(), keyword()) :: map()

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

Link to this function

request_with_end_time(user, start_time, end_time)

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

Fetches user fills with optional end_time parameter.

Parameters

  • user: User address (0x...)
  • start_time: Start timestamp in ms
  • end_time: Optional end timestamp in ms

Returns

  • {:ok, %UserFillsByTime{}} - Parsed and validated data
  • {:error, term()} - Error from HTTP or validation

Returns true if any storage backend is enabled.