almanak ax¶
read-only protocol observations at a pinned block
usage: almanak ax [-h]
{pool-price,lending-reserve,lending-position,perp-position,perp-markets,pool,balance,resolve,dex-pools,lending-markets,hypercore-markets,hypercore-account}
...
almanak ax pool-price¶
Uniswap V4 pool spot price
usage: almanak ax pool-price [-h] --connector {uniswap_v4}
(--config CONFIG | --chain CHAIN)
[--currency0 CURRENCY0] [--currency1 CURRENCY1]
[--fee FEE] [--tick-spacing TICK_SPACING]
[--hooks HOOKS] [--base BASE] [--block BLOCK]
[--env-file ENV_FILE | --gateway-url GATEWAY_URL]
[--gateway-auth-file GATEWAY_AUTH_FILE]
| Option | Details | Description |
|---|---|---|
--connector |
one of uniswap_v4; required |
canonical connector ID |
--config |
Path | JSON request file with the full pool source |
--chain |
strict CAIP-2 chain, given with the pool key flags | |
--currency0 |
CAIP-19 currency0 of the pool key | |
--currency1 |
CAIP-19 currency1 of the pool key | |
--fee |
int | pool fee in hundredths of a basis point |
--tick-spacing |
int | pool tick spacing |
--hooks |
reviewed hook address of the pool key; omit for a hookless pool (a dynamic-fee hook takes --fee 8388608) | |
--base |
CAIP-19 currency to price; defaults to currency0 | |
--block |
block; default finalized |
block to pin: a decimal block number, 'finalized' or 'latest'; the output names the resolved number and hash |
--env-file |
Path | private provider credentials read by this process |
--gateway-url |
read-only observation gateway on loopback (service read-gateway) | |
--gateway-auth-file |
Path | authentication token file for --gateway-url |
Exactly one of --config, --chain.
At most one of --env-file, --gateway-url.
almanak ax lending-reserve¶
lending reserve state, its supply and borrow APR and APY, its collateral risk parameters, its price sources and a config-ready market entry
usage: almanak ax lending-reserve [-h] --connector
{aave_v3,sparklend,aave_v4,compound_v3,morpho_blue}
(--config CONFIG | --chain CHAIN)
[--asset ASSET] [--pool POOL]
[--spoke SPOKE] [--reserve-id RESERVE_ID]
[--comet COMET] [--market-id MARKET_ID]
[--leg {loan,collateral}] [--core CORE]
[--block BLOCK]
[--env-file ENV_FILE | --gateway-url GATEWAY_URL]
[--gateway-auth-file GATEWAY_AUTH_FILE]
[--borrow-fraction BORROW_FRACTION]
[--health-floor HEALTH_FLOOR]
| Option | Details | Description |
|---|---|---|
--connector |
one of aave_v3, sparklend, aave_v4, compound_v3, morpho_blue; required |
canonical connector ID |
--config |
Path | JSON market selection, as written under markets: |
--chain |
strict CAIP-2 chain, given with the selector flags | |
--asset |
CAIP-19 reserve asset (aave_v3, sparklend, compound_v3) | |
--pool |
Aave V3 or SparkLend Pool; omit for the reviewed Pool | |
--spoke |
Aave V4 Spoke address | |
--reserve-id |
int | Aave V4 reserve ID on the Spoke |
--comet |
Compound V3 Comet address | |
--market-id |
Morpho Blue market ID | |
--leg |
one of loan, collateral |
Morpho Blue market side |
--core |
Morpho Blue core; omit for the reviewed deployment | |
--block |
block; default finalized |
block to pin: a decimal block number, 'finalized' or 'latest'; the output names the resolved number and hash |
--env-file |
Path | private provider credentials read by this process |
--gateway-url |
read-only observation gateway on loopback (service read-gateway) | |
--gateway-auth-file |
Path | authentication token file for --gateway-url |
--borrow-fraction |
borrow_fraction | project the health factor after borrowing this fraction (0 to 1] of one collateral's value: liquidation_threshold / f; repeatable |
--health-floor |
health_floor | report the largest borrow fraction keeping the health factor at or above this floor (above 1): min(ltv, liquidation_threshold / floor) |
Exactly one of --config, --chain.
At most one of --env-file, --gateway-url.
almanak ax lending-position¶
account position in one lending reserve
usage: almanak ax lending-position [-h] --connector
{aave_v3,sparklend,aave_v4,compound_v3,morpho_blue}
(--config CONFIG | --chain CHAIN)
[--asset ASSET] [--pool POOL]
[--spoke SPOKE] [--reserve-id RESERVE_ID]
[--comet COMET] [--market-id MARKET_ID]
[--leg {loan,collateral}] [--core CORE]
[--block BLOCK]
[--env-file ENV_FILE | --gateway-url GATEWAY_URL]
[--gateway-auth-file GATEWAY_AUTH_FILE]
--account ACCOUNT
| Option | Details | Description |
|---|---|---|
--connector |
one of aave_v3, sparklend, aave_v4, compound_v3, morpho_blue; required |
canonical connector ID |
--config |
Path | JSON market selection, as written under markets: |
--chain |
strict CAIP-2 chain, given with the selector flags | |
--asset |
CAIP-19 reserve asset (aave_v3, sparklend, compound_v3) | |
--pool |
Aave V3 or SparkLend Pool; omit for the reviewed Pool | |
--spoke |
Aave V4 Spoke address | |
--reserve-id |
int | Aave V4 reserve ID on the Spoke |
--comet |
Compound V3 Comet address | |
--market-id |
Morpho Blue market ID | |
--leg |
one of loan, collateral |
Morpho Blue market side |
--core |
Morpho Blue core; omit for the reviewed deployment | |
--block |
block; default finalized |
block to pin: a decimal block number, 'finalized' or 'latest'; the output names the resolved number and hash |
--env-file |
Path | private provider credentials read by this process |
--gateway-url |
read-only observation gateway on loopback (service read-gateway) | |
--gateway-auth-file |
Path | authentication token file for --gateway-url |
--account |
required | EVM account address |
Exactly one of --config, --chain.
At most one of --env-file, --gateway-url.
almanak ax perp-position¶
GMX V2 account position
usage: almanak ax perp-position [-h] --connector {gmx_v2} --config CONFIG
[--block BLOCK]
[--env-file ENV_FILE | --gateway-url GATEWAY_URL]
[--gateway-auth-file GATEWAY_AUTH_FILE]
--account ACCOUNT
| Option | Details | Description |
|---|---|---|
--connector |
one of gmx_v2; required |
canonical connector ID |
--config |
Path; required | JSON request file for the connector |
--block |
block; default finalized |
block to pin: a decimal block number, 'finalized' or 'latest'; the output names the resolved number and hash |
--env-file |
Path | private provider credentials read by this process |
--gateway-url |
read-only observation gateway on loopback (service read-gateway) | |
--gateway-auth-file |
Path | authentication token file for --gateway-url |
--account |
required | EVM account address |
At most one of --env-file, --gateway-url.
almanak ax perp-markets¶
GMX V2 market lookup
usage: almanak ax perp-markets [-h] --connector {gmx_v2}
(--config CONFIG | --chain CHAIN)
[--query QUERY] [--block BLOCK]
[--env-file ENV_FILE | --gateway-url GATEWAY_URL]
[--gateway-auth-file GATEWAY_AUTH_FILE]
| Option | Details | Description |
|---|---|---|
--connector |
one of gmx_v2; required |
canonical connector ID |
--config |
Path | JSON request file: |
--chain |
strict CAIP-2 chain, given with --query | |
--query |
GM share address or a label such as "BTC/USD" | |
--block |
block; default finalized |
block to pin: a decimal block number, 'finalized' or 'latest'; the output names the resolved number and hash |
--env-file |
Path | private provider credentials read by this process |
--gateway-url |
read-only observation gateway on loopback (service read-gateway) | |
--gateway-auth-file |
Path | authentication token file for --gateway-url |
Exactly one of --config, --chain.
At most one of --env-file, --gateway-url.
almanak ax pool¶
V3-style pool state and optional liquidity depth, or an Aerodrome or Curve pool's resolution
usage: almanak ax pool [-h] --connector
{uniswap_v3,pancakeswap_v3,aerodrome_slipstream,aerodrome,curve}
(--config CONFIG | --chain CHAIN) [--pool POOL]
[--block BLOCK]
[--env-file ENV_FILE | --gateway-url GATEWAY_URL]
[--gateway-auth-file GATEWAY_AUTH_FILE]
[--depth-bps DEPTH_BPS]
| Option | Details | Description |
|---|---|---|
--connector |
one of uniswap_v3, pancakeswap_v3, aerodrome_slipstream, aerodrome, curve; required |
canonical connector ID |
--config |
Path | JSON request file: |
--chain |
strict CAIP-2 chain of the pool, given with --pool | |
--pool |
pool contract address, given with --chain | |
--block |
block; default finalized |
block to pin: a decimal block number, 'finalized' or 'latest'; the output names the resolved number and hash |
--env-file |
Path | private provider credentials read by this process |
--gateway-url |
read-only observation gateway on loopback (service read-gateway) | |
--gateway-auth-file |
Path | authentication token file for --gateway-url |
--depth-bps |
depth_bps | also report pool output within this price move, 1 to 5000 basis points |
Exactly one of --config, --chain.
At most one of --env-file, --gateway-url.
almanak ax balance¶
native or ERC-20 balance
usage: almanak ax balance [-h] --asset ASSET --account ACCOUNT [--block BLOCK]
[--env-file ENV_FILE | --gateway-url GATEWAY_URL]
[--gateway-auth-file GATEWAY_AUTH_FILE]
| Option | Details | Description |
|---|---|---|
--asset |
required | CAIP-19 asset type |
--account |
required | EVM account address; repeat to read several accounts at the same block |
--block |
block; default finalized |
block to pin: a decimal block number, 'finalized' or 'latest'; the output names the resolved number and hash |
--env-file |
Path | private provider credentials read by this process |
--gateway-url |
read-only observation gateway on loopback (service read-gateway) | |
--gateway-auth-file |
Path | authentication token file for --gateway-url |
At most one of --env-file, --gateway-url.
almanak ax resolve¶
ERC-20 token candidates for a symbol or address, verified at a pinned block
usage: almanak ax resolve [-h] --chain CHAIN --query QUERY [--limit LIMIT]
[--block BLOCK]
[--env-file ENV_FILE | --gateway-url GATEWAY_URL]
[--gateway-auth-file GATEWAY_AUTH_FILE]
| Option | Details | Description |
|---|---|---|
--chain |
required | strict CAIP-2 chain |
--query |
required | token symbol or contract address |
--limit |
parse; default 10 |
candidates to report (1 to 30) |
--block |
block; default finalized |
block to pin: a decimal block number, 'finalized' or 'latest'; the output names the resolved number and hash |
--env-file |
Path | private provider credentials read by this process |
--gateway-url |
read-only observation gateway on loopback (service read-gateway) | |
--gateway-auth-file |
Path | authentication token file for --gateway-url |
At most one of --env-file, --gateway-url.
almanak ax dex-pools¶
pools that trade a token, verified through each connector's resolver
usage: almanak ax dex-pools [-h] --chain CHAIN --token TOKEN [--quote QUOTE]
[--connector {uniswap_v4,uniswap_v3,pancakeswap_v3,aerodrome_slipstream,aerodrome,curve}]
[--limit LIMIT] [--offset OFFSET]
[--depth-bps DEPTH_BPS] [--block BLOCK]
[--env-file ENV_FILE | --gateway-url GATEWAY_URL]
[--gateway-auth-file GATEWAY_AUTH_FILE]
| Option | Details | Description |
|---|---|---|
--chain |
required | strict CAIP-2 chain |
--token |
required | CAIP-19 ERC-20 asset or native coin the pools trade |
--quote |
CAIP-19 ERC-20 asset or native coin; only pools pairing --token with it | |
--connector |
one of uniswap_v4, uniswap_v3, pancakeswap_v3, aerodrome_slipstream, aerodrome, curve |
only pools of this connector |
--limit |
parse; default 10 |
pools to report (1 to 20) |
--offset |
parse | matching pools to skip, for paging |
--depth-bps |
depth_bps | also report each verified V3-style pool's depth within this price move |
--block |
block; default finalized |
block to pin: a decimal block number, 'finalized' or 'latest'; the output names the resolved number and hash |
--env-file |
Path | private provider credentials read by this process |
--gateway-url |
read-only observation gateway on loopback (service read-gateway) | |
--gateway-auth-file |
Path | authentication token file for --gateway-url |
At most one of --env-file, --gateway-url.
almanak ax lending-markets¶
a lending protocol's markets on a chain, verified through its connector's resolver
usage: almanak ax lending-markets [-h] --connector
{aave_v4,aave_v3,sparklend,compound_v3,morpho_blue}
--chain CHAIN [--asset ASSET]
[--collateral COLLATERAL] [--limit LIMIT]
[--include-unlisted] [--offset OFFSET]
[--block BLOCK]
[--env-file ENV_FILE | --gateway-url GATEWAY_URL]
[--gateway-auth-file GATEWAY_AUTH_FILE]
| Option | Details | Description |
|---|---|---|
--connector |
one of aave_v4, aave_v3, sparklend, compound_v3, morpho_blue; required |
|
--chain |
required | strict CAIP-2 chain |
--asset |
CAIP-19 ERC-20 asset: an Aave or SparkLend reserve asset, a Compound base or collateral asset, the Morpho loan asset (required for morpho_blue) | |
--collateral |
CAIP-19 ERC-20 asset; only Compound or Morpho markets accepting it | |
--limit |
parse; default 10 |
markets to report (1 to 20) |
--include-unlisted |
morpho_blue: also list markets Morpho's API does not mark listed; they keep its warnings | |
--offset |
parse | matching markets to skip, for paging |
--block |
block; default finalized |
block to pin: a decimal block number, 'finalized' or 'latest'; the output names the resolved number and hash |
--env-file |
Path | private provider credentials read by this process |
--gateway-url |
read-only observation gateway on loopback (service read-gateway) | |
--gateway-auth-file |
Path | authentication token file for --gateway-url |
At most one of --env-file, --gateway-url.
almanak ax hypercore-markets¶
HyperCore perpetual markets from Hyperliquid's meta, with their asset index
usage: almanak ax hypercore-markets [-h] [--query QUERY] [--limit LIMIT]
[--offset OFFSET] [--include-delisted]
[--env-file ENV_FILE | --gateway-url GATEWAY_URL]
[--gateway-auth-file GATEWAY_AUTH_FILE]
| Option | Details | Description |
|---|---|---|
--query |
report one market: its coin as meta names it, e.g. BTC | |
--limit |
parse; default 20 |
markets to report (1 to 50) |
--offset |
parse | listed markets to skip, for paging |
--include-delisted |
also list delisted markets | |
--env-file |
Path | private provider credentials read by this process |
--gateway-url |
read-only observation gateway on loopback (service read-gateway) | |
--gateway-auth-file |
Path | authentication token file for --gateway-url |
At most one of --env-file, --gateway-url.
almanak ax hypercore-account¶
a HyperCore account: its role, abstraction mode, perp margin and spot balances
usage: almanak ax hypercore-account [-h] --account ACCOUNT
[--env-file ENV_FILE | --gateway-url GATEWAY_URL]
[--gateway-auth-file GATEWAY_AUTH_FILE]
| Option | Details | Description |
|---|---|---|
--account |
required | EVM address of the account; repeat to read several |
--env-file |
Path | private provider credentials read by this process |
--gateway-url |
read-only observation gateway on loopback (service read-gateway) | |
--gateway-auth-file |
Path | authentication token file for --gateway-url |
At most one of --env-file, --gateway-url.