For the complete documentation index, see llms.txt. This page is also available as Markdown.

GmxLib

Overview

License: Apache-2.0-or-later

library GmxLib

NAV-only GMX v2 helpers. Keeps the adapter surface out of the NAV code path so ENavView / EApps stay as small as possible.

Structs info

TokenPrice

struct TokenPrice {
	address token;
	Price.Props price;
}

Functions info

getGmxPositionBalances

function getGmxPositionBalances(
    address account
) internal view returns (AppTokenBalance[] memory balances)

getGmxPrice

Returns the best available GMX price for token.

Tries the GMX Chainlink price provider first, falls back to a hardcoded Chainlink aggregator. Returns a zero Price.Props when the token cannot be priced or the fallback is stale/invalid.

Last updated