erc_4626.vault_protocol.upshift.offchain_metadata
Documentation for eth_defi.erc_4626.vault_protocol.upshift.offchain_metadata Python module.
Upshift vault offchain metadata.
Upshift’s public vault API provides display metadata that is not available from
the vault contracts. In particular, it exposes a vault description,
hardcoded_strategists and named operator wallets. The API does not
publish a field named curator. We therefore keep strategist and operator
identities separate and only expose strategists through the generic vault
manager field.
Reference:
Module Attributes
Canonical Upshift public API root. |
|
Refresh vault metadata every two days. |
|
Timeout for one Upshift public API request. |
Functions
|
Fetch cached public metadata for one Upshift vault. |
Classes
Optional APY-display overrides for an Upshift vault. |
|
External protocol integration for an Upshift receipt token. |
|
Named EOA operator wallet linked to an Upshift vault. |
|
One historical NAV snapshot from the Upshift API. |
|
Instant-redemption configuration returned for a vault. |
|
One asset accepted by an instant-redemption configuration. |
|
One token NAV pricing override keyed by a |
|
Unlabelled operator address and implementation type. |
|
Platform-fee override configured for an Upshift vault. |
|
Token integration metadata for an Upshift receipt token. |
|
Current APY breakdown reported by Upshift. |
|
Reward programme associated with an Upshift vault. |
|
Solana-specific metadata returned for an Upshift vault. |
|
Stellar-specific metadata returned for an Upshift vault. |
|
Strategy brand configured in Upshift's |
|
Custody subaccount assigned to a vault. |
|
Complete raw response from Upshift's tokenized-vault endpoint. |
|
Normalised public metadata for one Upshift vault. |
- DEFAULT_CACHE_PATH = PosixPath('/home/runner/.tradingstrategy/cache/upshift')
Directory for cached Upshift vault API responses.
- DEFAULT_API_BASE_URL = 'https://api.upshift.finance'
Canonical Upshift public API root.
- DEFAULT_CACHE_DURATION = datetime.timedelta(days=2)
Refresh vault metadata every two days.
- DEFAULT_TIMEOUT = 30.0
Timeout for one Upshift public API request.
- class UpshiftAPYOverride
Bases:
TypedDictOptional APY-display overrides for an Upshift vault.
Example response:
{"hardcoded_apy": 0.12, "is_show_hardcoded_apy": True}.- __init__(*args, **kwargs)
- __new__(**kwargs)
- clear()
Remove all items from the dict.
- copy()
Return a shallow copy of the dict.
- fromkeys(value=None, /)
Create a new dictionary with keys from iterable and values set to value.
- get(key, default=None, /)
Return the value for key if key is in the dictionary, else default.
- items()
Return a set-like object providing a view on the dict’s items.
- keys()
Return a set-like object providing a view on the dict’s keys.
- pop(k[, d]) v, remove specified key and return the corresponding value.
If the key is not found, return the default if given; otherwise, raise a KeyError.
- popitem()
Remove and return a (key, value) pair as a 2-tuple.
Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.
- setdefault(key, default=None, /)
Insert key with a value of default if key is not in the dictionary.
Return the value for key if key is in the dictionary, else default.
- update([E, ]**F) None. Update D from mapping/iterable E and F.
If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
- values()
Return an object providing a view on the dict’s values.
- class UpshiftPlatformFeeOverride
Bases:
TypedDictPlatform-fee override configured for an Upshift vault.
Example response:
{"management_fee": 0, "is_fee_waived": False}.- __init__(*args, **kwargs)
- __new__(**kwargs)
- clear()
Remove all items from the dict.
- copy()
Return a shallow copy of the dict.
- fromkeys(value=None, /)
Create a new dictionary with keys from iterable and values set to value.
- get(key, default=None, /)
Return the value for key if key is in the dictionary, else default.
- items()
Return a set-like object providing a view on the dict’s items.
- keys()
Return a set-like object providing a view on the dict’s keys.
- pop(k[, d]) v, remove specified key and return the corresponding value.
If the key is not found, return the default if given; otherwise, raise a KeyError.
- popitem()
Remove and return a (key, value) pair as a 2-tuple.
Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.
- setdefault(key, default=None, /)
Insert key with a value of default if key is not in the dictionary.
Return the value for key if key is in the dictionary, else default.
- update([E, ]**F) None. Update D from mapping/iterable E and F.
If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
- values()
Return an object providing a view on the dict’s values.
- class UpshiftInstantRedeemableAsset
Bases:
TypedDictOne asset accepted by an instant-redemption configuration.
Example response:
{"symbol": "USCC", "decimals": 6, "spread_bps": 5}.- __init__(*args, **kwargs)
- __new__(**kwargs)
- clear()
Remove all items from the dict.
- copy()
Return a shallow copy of the dict.
- fromkeys(value=None, /)
Create a new dictionary with keys from iterable and values set to value.
- get(key, default=None, /)
Return the value for key if key is in the dictionary, else default.
- items()
Return a set-like object providing a view on the dict’s items.
- keys()
Return a set-like object providing a view on the dict’s keys.
- pop(k[, d]) v, remove specified key and return the corresponding value.
If the key is not found, return the default if given; otherwise, raise a KeyError.
- popitem()
Remove and return a (key, value) pair as a 2-tuple.
Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.
- setdefault(key, default=None, /)
Insert key with a value of default if key is not in the dictionary.
Return the value for key if key is in the dictionary, else default.
- update([E, ]**F) None. Update D from mapping/iterable E and F.
If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
- values()
Return an object providing a view on the dict’s values.
- class UpshiftInstantRedeemConfig
Bases:
TypedDictInstant-redemption configuration returned for a vault.
Example response:
{"output_asset_symbol": "USDC", "is_paused": False, "available_liquidity": 1000000000000}.- available_liquidity: Union[int, float]
Raw available output-asset liquidity. Example:
1000000000000.
- redeemable_assets: list[eth_defi.erc_4626.vault_protocol.upshift.offchain_metadata.UpshiftInstantRedeemableAsset]
Assets that can be redeemed immediately. Example: one
USCCrecord.
- id: str
Upshift instant-redemption configuration UUID. Example:
"373efcf4-29de-4c2d-a04c-36607a8a9b90".
- __init__(*args, **kwargs)
- __new__(**kwargs)
- clear()
Remove all items from the dict.
- copy()
Return a shallow copy of the dict.
- fromkeys(value=None, /)
Create a new dictionary with keys from iterable and values set to value.
- get(key, default=None, /)
Return the value for key if key is in the dictionary, else default.
- items()
Return a set-like object providing a view on the dict’s items.
- keys()
Return a set-like object providing a view on the dict’s keys.
- pop(k[, d]) v, remove specified key and return the corresponding value.
If the key is not found, return the default if given; otherwise, raise a KeyError.
- popitem()
Remove and return a (key, value) pair as a 2-tuple.
Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.
- setdefault(key, default=None, /)
Insert key with a value of default if key is not in the dictionary.
Return the value for key if key is in the dictionary, else default.
- update([E, ]**F) None. Update D from mapping/iterable E and F.
If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
- values()
Return an object providing a view on the dict’s values.
- class UpshiftNAVPricingOverride
Bases:
TypedDictOne token NAV pricing override keyed by a
TokenSpec-*identifier.Example response:
{"mode": "hardpeg", "value": 1}.- __init__(*args, **kwargs)
- __new__(**kwargs)
- clear()
Remove all items from the dict.
- copy()
Return a shallow copy of the dict.
- fromkeys(value=None, /)
Create a new dictionary with keys from iterable and values set to value.
- get(key, default=None, /)
Return the value for key if key is in the dictionary, else default.
- items()
Return a set-like object providing a view on the dict’s items.
- keys()
Return a set-like object providing a view on the dict’s keys.
- pop(k[, d]) v, remove specified key and return the corresponding value.
If the key is not found, return the default if given; otherwise, raise a KeyError.
- popitem()
Remove and return a (key, value) pair as a 2-tuple.
Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.
- setdefault(key, default=None, /)
Insert key with a value of default if key is not in the dictionary.
Return the value for key if key is in the dictionary, else default.
- update([E, ]**F) None. Update D from mapping/iterable E and F.
If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
- values()
Return an object providing a view on the dict’s values.
- class UpshiftHistoricalSnapshot
Bases:
TypedDictOne historical NAV snapshot from the Upshift API.
Example response:
{"block_id": 25396895, "asset_share_ratio": 1.0, "tvl": 0.0}.Vault asset/share ratio. Example:
1.0.
Raw vault share supply. Example:
0.0.
- __init__(*args, **kwargs)
- __new__(**kwargs)
- clear()
Remove all items from the dict.
- copy()
Return a shallow copy of the dict.
- fromkeys(value=None, /)
Create a new dictionary with keys from iterable and values set to value.
- get(key, default=None, /)
Return the value for key if key is in the dictionary, else default.
- items()
Return a set-like object providing a view on the dict’s items.
- keys()
Return a set-like object providing a view on the dict’s keys.
- pop(k[, d]) v, remove specified key and return the corresponding value.
If the key is not found, return the default if given; otherwise, raise a KeyError.
- popitem()
Remove and return a (key, value) pair as a 2-tuple.
Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.
- setdefault(key, default=None, /)
Insert key with a value of default if key is not in the dictionary.
Return the value for key if key is in the dictionary, else default.
- update([E, ]**F) None. Update D from mapping/iterable E and F.
If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
- values()
Return an object providing a view on the dict’s values.
- class UpshiftEOAOperator
Bases:
TypedDictNamed EOA operator wallet linked to an Upshift vault.
Example response:
{"name": "NEMO USDC Yield Sub 1", "wallet_role": None}.- __init__(*args, **kwargs)
- __new__(**kwargs)
- clear()
Remove all items from the dict.
- copy()
Return a shallow copy of the dict.
- fromkeys(value=None, /)
Create a new dictionary with keys from iterable and values set to value.
- get(key, default=None, /)
Return the value for key if key is in the dictionary, else default.
- items()
Return a set-like object providing a view on the dict’s items.
- keys()
Return a set-like object providing a view on the dict’s keys.
- pop(k[, d]) v, remove specified key and return the corresponding value.
If the key is not found, return the default if given; otherwise, raise a KeyError.
- popitem()
Remove and return a (key, value) pair as a 2-tuple.
Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.
- setdefault(key, default=None, /)
Insert key with a value of default if key is not in the dictionary.
Return the value for key if key is in the dictionary, else default.
- update([E, ]**F) None. Update D from mapping/iterable E and F.
If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
- values()
Return an object providing a view on the dict’s values.
- class UpshiftStrategist
Bases:
TypedDictStrategy brand configured in Upshift’s
hardcoded_strategistslist.Example response:
{"strategist_name": "NEMO", "website_url": None}.- strategist_logo: Optional[str]
Strategist logo URL. Example:
"https://imagedelivery.net/.../public".
- __init__(*args, **kwargs)
- __new__(**kwargs)
- clear()
Remove all items from the dict.
- copy()
Return a shallow copy of the dict.
- fromkeys(value=None, /)
Create a new dictionary with keys from iterable and values set to value.
- get(key, default=None, /)
Return the value for key if key is in the dictionary, else default.
- items()
Return a set-like object providing a view on the dict’s items.
- keys()
Return a set-like object providing a view on the dict’s keys.
- pop(k[, d]) v, remove specified key and return the corresponding value.
If the key is not found, return the default if given; otherwise, raise a KeyError.
- popitem()
Remove and return a (key, value) pair as a 2-tuple.
Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.
- setdefault(key, default=None, /)
Insert key with a value of default if key is not in the dictionary.
Return the value for key if key is in the dictionary, else default.
- update([E, ]**F) None. Update D from mapping/iterable E and F.
If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
- values()
Return an object providing a view on the dict’s values.
- class UpshiftOperator
Bases:
TypedDictUnlabelled operator address and implementation type.
Example response:
{"address": "0x1F6d81a390d74a57C314Ef57Ac0cb6749176Cf3E", "operator_type": "eoa"}.- __init__(*args, **kwargs)
- __new__(**kwargs)
- clear()
Remove all items from the dict.
- copy()
Return a shallow copy of the dict.
- fromkeys(value=None, /)
Create a new dictionary with keys from iterable and values set to value.
- get(key, default=None, /)
Return the value for key if key is in the dictionary, else default.
- items()
Return a set-like object providing a view on the dict’s items.
- keys()
Return a set-like object providing a view on the dict’s keys.
- pop(k[, d]) v, remove specified key and return the corresponding value.
If the key is not found, return the default if given; otherwise, raise a KeyError.
- popitem()
Remove and return a (key, value) pair as a 2-tuple.
Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.
- setdefault(key, default=None, /)
Insert key with a value of default if key is not in the dictionary.
Return the value for key if key is in the dictionary, else default.
- update([E, ]**F) None. Update D from mapping/iterable E and F.
If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
- values()
Return an object providing a view on the dict’s values.
- class UpshiftSubaccount
Bases:
TypedDictCustody subaccount assigned to a vault.
Example response:
{"address": "0xC8c0Ffb8Ff3BDA26321224e800B3B38AEaB48799", "wallet_role": None, "strategist": None}.- __init__(*args, **kwargs)
- __new__(**kwargs)
- clear()
Remove all items from the dict.
- copy()
Return a shallow copy of the dict.
- fromkeys(value=None, /)
Create a new dictionary with keys from iterable and values set to value.
- get(key, default=None, /)
Return the value for key if key is in the dictionary, else default.
- items()
Return a set-like object providing a view on the dict’s items.
- keys()
Return a set-like object providing a view on the dict’s keys.
- pop(k[, d]) v, remove specified key and return the corresponding value.
If the key is not found, return the default if given; otherwise, raise a KeyError.
- popitem()
Remove and return a (key, value) pair as a 2-tuple.
Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.
- setdefault(key, default=None, /)
Insert key with a value of default if key is not in the dictionary.
Return the value for key if key is in the dictionary, else default.
- update([E, ]**F) None. Update D from mapping/iterable E and F.
If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
- values()
Return an object providing a view on the dict’s values.
- class UpshiftReward
Bases:
TypedDictReward programme associated with an Upshift vault.
Example response:
{"text": "Upshift Points", "multiplier": 5.0, "end_datetime": None}.- __init__(*args, **kwargs)
- __new__(**kwargs)
- clear()
Remove all items from the dict.
- copy()
Return a shallow copy of the dict.
- fromkeys(value=None, /)
Create a new dictionary with keys from iterable and values set to value.
- get(key, default=None, /)
Return the value for key if key is in the dictionary, else default.
- items()
Return a set-like object providing a view on the dict’s items.
- keys()
Return a set-like object providing a view on the dict’s keys.
- pop(k[, d]) v, remove specified key and return the corresponding value.
If the key is not found, return the default if given; otherwise, raise a KeyError.
- popitem()
Remove and return a (key, value) pair as a 2-tuple.
Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.
- setdefault(key, default=None, /)
Insert key with a value of default if key is not in the dictionary.
Return the value for key if key is in the dictionary, else default.
- update([E, ]**F) None. Update D from mapping/iterable E and F.
If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
- values()
Return an object providing a view on the dict’s values.
- class UpshiftComposabilityIntegration
Bases:
TypedDictExternal protocol integration for an Upshift receipt token.
Example response:
{"name": "Uniswap", "earning_multiplier": 0.0, "description": "Provide liquidity to UniswapV4 AUSD-earnAUSD 0.01%"}.- description: Optional[str]
Human-readable integration description. Example:
"Provide liquidity to UniswapV4 AUSD-earnAUSD 0.01%".
- protocol_url: Optional[str]
External protocol URL. Example:
"https://app.merkl.xyz/opportunities/...".
- logo_url: Optional[str]
External protocol logo URL. Example:
"https://upload.wikimedia.org/.../Uniswap_Logo.svg.png".
- __init__(*args, **kwargs)
- __new__(**kwargs)
- clear()
Remove all items from the dict.
- copy()
Return a shallow copy of the dict.
- fromkeys(value=None, /)
Create a new dictionary with keys from iterable and values set to value.
- get(key, default=None, /)
Return the value for key if key is in the dictionary, else default.
- items()
Return a set-like object providing a view on the dict’s items.
- keys()
Return a set-like object providing a view on the dict’s keys.
- pop(k[, d]) v, remove specified key and return the corresponding value.
If the key is not found, return the default if given; otherwise, raise a KeyError.
- popitem()
Remove and return a (key, value) pair as a 2-tuple.
Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.
- setdefault(key, default=None, /)
Insert key with a value of default if key is not in the dictionary.
Return the value for key if key is in the dictionary, else default.
- update([E, ]**F) None. Update D from mapping/iterable E and F.
If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
- values()
Return an object providing a view on the dict’s values.
- class UpshiftReceiptTokenIntegration
Bases:
TypedDictToken integration metadata for an Upshift receipt token.
Example response:
{"symbol": "USDT", "chain": 1, "is_transferable": True}.- img_url: Optional[str]
Token image URL. Example:
"https://coin-images.coingecko.com/.../Tether.png".
- stable_token_pair_id: Optional[str]
Optional stable-token pair UUID. Example:
"b90ac83f-5a4a-475e-8cca-ec81847ef842".
- __init__(*args, **kwargs)
- __new__(**kwargs)
- clear()
Remove all items from the dict.
- copy()
Return a shallow copy of the dict.
- fromkeys(value=None, /)
Create a new dictionary with keys from iterable and values set to value.
- get(key, default=None, /)
Return the value for key if key is in the dictionary, else default.
- items()
Return a set-like object providing a view on the dict’s items.
- keys()
Return a set-like object providing a view on the dict’s keys.
- pop(k[, d]) v, remove specified key and return the corresponding value.
If the key is not found, return the default if given; otherwise, raise a KeyError.
- popitem()
Remove and return a (key, value) pair as a 2-tuple.
Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.
- setdefault(key, default=None, /)
Insert key with a value of default if key is not in the dictionary.
Return the value for key if key is in the dictionary, else default.
- update([E, ]**F) None. Update D from mapping/iterable E and F.
If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
- values()
Return an object providing a view on the dict’s values.
- class UpshiftReportedAPY
Bases:
TypedDictCurrent APY breakdown reported by Upshift.
Example response:
{"apy": 0.1, "underlying_apy": 0.0, "rewards_compounded": 0.0}.- __init__(*args, **kwargs)
- __new__(**kwargs)
- clear()
Remove all items from the dict.
- copy()
Return a shallow copy of the dict.
- fromkeys(value=None, /)
Create a new dictionary with keys from iterable and values set to value.
- get(key, default=None, /)
Return the value for key if key is in the dictionary, else default.
- items()
Return a set-like object providing a view on the dict’s items.
- keys()
Return a set-like object providing a view on the dict’s keys.
- pop(k[, d]) v, remove specified key and return the corresponding value.
If the key is not found, return the default if given; otherwise, raise a KeyError.
- popitem()
Remove and return a (key, value) pair as a 2-tuple.
Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.
- setdefault(key, default=None, /)
Insert key with a value of default if key is not in the dictionary.
Return the value for key if key is in the dictionary, else default.
- update([E, ]**F) None. Update D from mapping/iterable E and F.
If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
- values()
Return an object providing a view on the dict’s values.
- class UpshiftSolanaVaultMetadata
Bases:
TypedDictSolana-specific metadata returned for an Upshift vault.
Example response:
{"deposit_token_symbol": "USDC", "deposit_token_decimals": 6}.- vault_state_pda: str
Solana vault state PDA. Example:
"HegTiqVxUvnh3fD9ZA2v7PF3XnoqHgz4ytJRZKdLJ5ra".
Solana receipt-token mint. Example:
"CnhPtD2gHHrUvfuA6HrDdLQBKjGgVL8HZMJNCZdXuWEs".
- deposit_mint: str
Solana denomination-token mint. Example:
"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v".
- program_id: str
Upshift Solana programme ID. Example:
"up12bytoZBmwofqsySf2uqKQ7zpfeKiAWwfvqzJjtRt".
- __init__(*args, **kwargs)
- __new__(**kwargs)
- clear()
Remove all items from the dict.
- copy()
Return a shallow copy of the dict.
- fromkeys(value=None, /)
Create a new dictionary with keys from iterable and values set to value.
- get(key, default=None, /)
Return the value for key if key is in the dictionary, else default.
- items()
Return a set-like object providing a view on the dict’s items.
- keys()
Return a set-like object providing a view on the dict’s keys.
- pop(k[, d]) v, remove specified key and return the corresponding value.
If the key is not found, return the default if given; otherwise, raise a KeyError.
- popitem()
Remove and return a (key, value) pair as a 2-tuple.
Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.
- setdefault(key, default=None, /)
Insert key with a value of default if key is not in the dictionary.
Return the value for key if key is in the dictionary, else default.
- update([E, ]**F) None. Update D from mapping/iterable E and F.
If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
- values()
Return an object providing a view on the dict’s values.
- class UpshiftStellarVaultMetadata
Bases:
TypedDictStellar-specific metadata returned for an Upshift vault.
Example response:
{"deposit_token_symbol": "USDC", "network_name": "mainnet"}.- deposit_token_address: str
Stellar denomination-token address. Example:
"CCW67TSZV3SSS2HXMBQ5JFGCKJNXKZM7UQUWUZPUTHXSTZLEO7SJMI75".
- __init__(*args, **kwargs)
- __new__(**kwargs)
- clear()
Remove all items from the dict.
- copy()
Return a shallow copy of the dict.
- fromkeys(value=None, /)
Create a new dictionary with keys from iterable and values set to value.
- get(key, default=None, /)
Return the value for key if key is in the dictionary, else default.
- items()
Return a set-like object providing a view on the dict’s items.
- keys()
Return a set-like object providing a view on the dict’s keys.
- pop(k[, d]) v, remove specified key and return the corresponding value.
If the key is not found, return the default if given; otherwise, raise a KeyError.
- popitem()
Remove and return a (key, value) pair as a 2-tuple.
Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.
- setdefault(key, default=None, /)
Insert key with a value of default if key is not in the dictionary.
Return the value for key if key is in the dictionary, else default.
- update([E, ]**F) None. Update D from mapping/iterable E and F.
If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
- values()
Return an object providing a view on the dict’s values.
- class UpshiftVaultAPIResponse
Bases:
TypedDictComplete raw response from Upshift’s tokenized-vault endpoint.
All 61 documented top-level fields were observed in the live response for NEMO USDC Prime on 2026-07-23. Nested structures are modelled by the associated
Upshift*TypedDicts above.Reference:
- description: Optional[str]
Vault strategy description. Example:
"NEMO USDC Prime is an automated, multi-strategy...".
- platform_fee_override: Optional[eth_defi.erc_4626.vault_protocol.upshift.offchain_metadata.UpshiftPlatformFeeOverride]
Optional platform-fee override. Example:
{"management_fee": 0, "is_fee_waived": False}.
- vault_logo_url: Optional[str]
Vault logo URL. Example:
"https://imagedelivery.net/.../nemoicon-light.svg/public".
- historical_apy: dict[str, float]
Historical simple APY keyed by horizon days. Example:
{"7": 0.31189842638050264}.
- management_fee_waived_until_date: Optional[str]
Management-fee waiver expiry timestamp. Example:
None.
- management_fee_waived_until_tvl: Optional[float]
Management-fee waiver TVL threshold. Example:
None.
- performance_fee_waived_until_date: Optional[str]
Performance-fee waiver expiry timestamp. Example:
None.
- performance_fee_waived_until_tvl: Optional[float]
Performance-fee waiver TVL threshold. Example:
None.
NAV base-token metadata identifier. Example:
None.
Token pricing overrides keyed by
TokenSpec-*. Example:{"TokenSpec-1-0xA0b8...": {"mode": "hardpeg", "value": 1}}.
- apy_override: Optional[eth_defi.erc_4626.vault_protocol.upshift.offchain_metadata.UpshiftAPYOverride]
Optional APY display overrides. Example:
{"hardcoded_apy": 0.12, "is_show_hardcoded_apy": True}.
- max_drawdown: Optional[float]
Largest historical drawdown fraction. Example:
0.0002156861650454448.
- metrics_last_updated: Optional[str]
Metrics calculation timestamp. Example:
"2026-07-23T17:01:41.120995".
- solana_vault_metadata: Optional[eth_defi.erc_4626.vault_protocol.upshift.offchain_metadata.UpshiftSolanaVaultMetadata]
Solana-specific metadata. Example:
Nonefor an EVM vault.
- stellar_vault_metadata: Optional[eth_defi.erc_4626.vault_protocol.upshift.offchain_metadata.UpshiftStellarVaultMetadata]
Stellar-specific metadata. Example:
Nonefor an EVM vault.
- instant_redeem_config: Optional[eth_defi.erc_4626.vault_protocol.upshift.offchain_metadata.UpshiftInstantRedeemConfig]
Optional instant-redemption configuration. Example:
None.
- rewards: list[eth_defi.erc_4626.vault_protocol.upshift.offchain_metadata.UpshiftReward]
Reward programmes. Example: one
{"text": "Upshift Points", "multiplier": 5.0}record.
- reported_apy: Optional[eth_defi.erc_4626.vault_protocol.upshift.offchain_metadata.UpshiftReportedAPY]
Current APY breakdown. Example:
None.
- receipt_token_integrations: list[eth_defi.erc_4626.vault_protocol.upshift.offchain_metadata.UpshiftReceiptTokenIntegration]
Receipt-token integration metadata. Example:
[].
- hardcoded_strategists: list[eth_defi.erc_4626.vault_protocol.upshift.offchain_metadata.UpshiftStrategist]
Strategy brands. Example: one
{"strategist_name": "NEMO"}record.
- composability_integrations: list[eth_defi.erc_4626.vault_protocol.upshift.offchain_metadata.UpshiftComposabilityIntegration]
External composability integrations. Example:
[].
- historical_snapshots: list[eth_defi.erc_4626.vault_protocol.upshift.offchain_metadata.UpshiftHistoricalSnapshot]
Historical NAV snapshots. Example: one
{"block_id": 25396895, "tvl": 0.0}record.
- subaccounts: list[eth_defi.erc_4626.vault_protocol.upshift.offchain_metadata.UpshiftSubaccount]
Vault custody subaccounts. Example:
[].
- eoa_operators: list[eth_defi.erc_4626.vault_protocol.upshift.offchain_metadata.UpshiftEOAOperator]
Named EOA operator wallets. Example: one
{"name": "NEMO USDC Yield Sub 1"}record.
- historical_compound_apy: dict[str, float]
Historical compounded APY keyed by horizon days. Example:
{"7": 0.3647473251285198}.
Return per share keyed by horizon days. Example:
{"7": 0.005170042919987905}.
Daily return per share keyed by timestamp. Example:
{"2026-07-23T00:00:00": 0.0008179999999999854}.
- operators: list[eth_defi.erc_4626.vault_protocol.upshift.offchain_metadata.UpshiftOperator]
Contract operators. Example: one
{"operator_type": "eoa"}record.
- __init__(*args, **kwargs)
- __new__(**kwargs)
- clear()
Remove all items from the dict.
- copy()
Return a shallow copy of the dict.
- fromkeys(value=None, /)
Create a new dictionary with keys from iterable and values set to value.
- get(key, default=None, /)
Return the value for key if key is in the dictionary, else default.
- items()
Return a set-like object providing a view on the dict’s items.
- keys()
Return a set-like object providing a view on the dict’s keys.
- pop(k[, d]) v, remove specified key and return the corresponding value.
If the key is not found, return the default if given; otherwise, raise a KeyError.
- popitem()
Remove and return a (key, value) pair as a 2-tuple.
Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.
- setdefault(key, default=None, /)
Insert key with a value of default if key is not in the dictionary.
Return the value for key if key is in the dictionary, else default.
- update([E, ]**F) None. Update D from mapping/iterable E and F.
If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
- values()
Return an object providing a view on the dict’s values.
- class UpshiftVaultMetadata
Bases:
TypedDictNormalised public metadata for one Upshift vault.
The data is sourced from
GET /v1/tokenized_vaults/{address}. Upshift’shardcoded_strategistsidentifies a strategy brand, not a curator role, so it is represented asstrategist_namesrather than mislabelled as curator data.Reference:
- vault_address: eth_typing.evm.HexAddress
Checksummed vault contract address.
- __init__(*args, **kwargs)
- __new__(**kwargs)
- clear()
Remove all items from the dict.
- copy()
Return a shallow copy of the dict.
- fromkeys(value=None, /)
Create a new dictionary with keys from iterable and values set to value.
- get(key, default=None, /)
Return the value for key if key is in the dictionary, else default.
- items()
Return a set-like object providing a view on the dict’s items.
- keys()
Return a set-like object providing a view on the dict’s keys.
- pop(k[, d]) v, remove specified key and return the corresponding value.
If the key is not found, return the default if given; otherwise, raise a KeyError.
- popitem()
Remove and return a (key, value) pair as a 2-tuple.
Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.
- setdefault(key, default=None, /)
Insert key with a value of default if key is not in the dictionary.
Return the value for key if key is in the dictionary, else default.
- update([E, ]**F) None. Update D from mapping/iterable E and F.
If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
- values()
Return an object providing a view on the dict’s values.
- fetch_upshift_vault_metadata(web3, vault_address, *, cache_path=PosixPath('/home/runner/.tradingstrategy/cache/upshift'), api_base_url='https://api.upshift.finance', now_=None, max_cache_duration=datetime.timedelta(days=2), timeout=30.0)
Fetch cached public metadata for one Upshift vault.
Reads
GET /v1/tokenized_vaults/{address}from Upshift’s public API and caches its raw response by EVM chain and vault address. A failed refresh returns a valid stale cache when one exists, so a temporary API outage does not remove already-discovered vault descriptions or strategist identities.The API exposes named strategists and EOA operators, but no explicit curator field. Callers must not interpret either as a verified curator record without separate registry evidence.
- Parameters
web3 (web3.main.Web3) – Web3 connection used only to obtain the EVM chain ID.
vault_address (Union[eth_typing.evm.HexAddress, str]) – Upshift vault deployment address.
cache_path (pathlib.Path) – Directory for cached raw JSON responses.
api_base_url (str) – Upshift API root. Override this with a test server URL in tests.
now – Optional current naive UTC timestamp for cache-expiry tests.
max_cache_duration (datetime.timedelta) – Maximum age of a cache response before refreshing it.
timeout (float) – HTTP timeout in seconds.
now_ (Optional[datetime.datetime]) –
- Returns
Parsed vault metadata, or
Nonewhen Upshift has no accessible matching record.- Return type
Optional[eth_defi.erc_4626.vault_protocol.upshift.offchain_metadata.UpshiftVaultMetadata]