# User ## Get user `user.get_user(straddress, UserGetUserParams**kwargs) -> UserGetUserResponse` **get** `/api/v1/users/{address}/user` Get user ### Parameters - `address: str` The user account address - `with_percent: Optional[bool]` Calculate and include proportional percentages, where applicable - `with_text: Optional[bool]` Include text variation fields - `with_value: Optional[bool]` Calculate and include USD values for amounts, where applicable ### Returns - `class UserGetUserResponse: …` - `data: User` - `markets: UserMarket` User's market contribution overview - `borrow: UserBorrowMarket` Overview of user borrowing portfolio - `accounts: List[UserBorrowMarketAccount]` Market sub-accounts for the user - `collaterals: List[UserCollateralAssetPool]` Account collateral allocations - `amount: str` Amount of this asset which is actively collateralized - `asset_info: AssetInfo` Asset identifiers with associated metadata - `asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `id: str` - `group: Literal["native", "token"]` - `"native"` - `"token"` - `group_key: str` - `classification: AssetClassification` The asset's classification metadata. Assets are classfied to provide context on their usage throughout the Neptune API (e.g. regular assets, neptune receipt tokens, LSTs, etc.) Each asset belongs to only a single classification type. This object contains metadata pertaining to the given classification. While some fields may be common among the distinct classifcations, each classification is distinct and subject to independent change. - `class Regular: …` - `kind: Literal["regular"]` - `"regular"` - `neptune_receipt_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class NeptuneReceiptToken: …` - `kind: Literal["neptune_receipt_token"]` - `"neptune_receipt_token"` - `origin_asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class LiquidStakingToken: …` - `kind: Literal["liquid_staking_token"]` - `"liquid_staking_token"` - `origin_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: int` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: int` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: str` Full name of the asset - `symbol: str` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: str` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `debts: List[UserDebtAssetPool]` Account debt allocations - `asset_info: AssetInfo` Asset identifiers with associated metadata - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `principal: str` - `shares: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: str` Text representation of price - `principal: str` - `shares: str` - `price: str` Price used in value calculations - `principal: str` - `shares: str` - `market_rate: MarketRate` Current market borrowing rate - `apr: str` Market rate in APR standard as a decimal percentage - `apy: str` Market rate in APY standard as a decimal percentage - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `apr: str` - `apy: str` - `principal: str` Initial amount borrowed (of debts which have not yet been repaid) - `shares: str` - `debts_net_rate: MarketRate` Account debt net rate - `health: Optional[UserAccountHealth]` Health data for this account - `base: str` Account health value, before any added health boosts - `boost: str` Account health boost to be applied - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `base: str` - `boost: str` - `result: str` - `result: str` Account health, with boost - `index: int` Account index - `totals: UserBorrowMarketPools` Collateral/debt totals of all sub-accounts by asset - `collaterals: List[UserCollateralAssetPool]` Account collateral allocations - `amount: str` Amount of this asset which is actively collateralized - `asset_info: AssetInfo` Asset identifiers with associated metadata - `extra: Extra` - `debts: List[UserDebtAssetPool]` Account debt allocations - `asset_info: AssetInfo` Asset identifiers with associated metadata - `extra: Extra` - `market_rate: MarketRate` Current market borrowing rate - `principal: str` Initial amount borrowed (of debts which have not yet been repaid) - `shares: str` - `debts_net_rate: MarketRate` Account debt net rate - `lend: UserLendMarket` Overview of user lending portfolio - `asset_pools: List[UserLendAssetPool]` User lending allocations - `asset_info: AssetInfo` Asset identifiers with associated metadata - `market_rate: MarketRate` Current market lending rate - `origin_equivalent: UserLendOriginAmounts` The lending amounts converted into the equivalent for the receipt token's origin/source asset - `collateralized: str` Total equivalent amount of origin token collateralized across this user's borrowing portfolio **NOTE:** This is **not** the amount of the origin asset that the user holds, but the amount held in the receipt token rendered as the equivalent amount in the origin asset. Or, more formally: `origin_equivalent_collateralized = receipt_collateralized / receipt_redemption_ratio` - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `collateralized: str` - `held: str` - `total: str` - `held: str` Total equivalent amount of origin token held in address balance **NOTE:** This is **not** the amount of the origin asset that the user holds, but the amount held in the receipt token rendered as the equivalent amount in the origin asset. Or, more formally: `origin_equivalent_held = receipt_held / receipt_redemption_ratio` - `total: str` Total of held and collateralized equivalent for origin asset Or, more formally: `origin_equivalent_total = receipt_lent_total / receipt_redemption_ratio` - `receipt_amounts: UserLendReceiptAmounts` The lending amounts in the original receipt token amounts - `collateralized: str` Total amount of receipt token collateralized across this user's borrowing portfolio - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `collateralized: str` - `held: str` - `total: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `collateralized: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `collateralized: str` - `held: str` - `price: str` Text representation of price - `total: str` - `held: str` - `price: str` Price used in value calculations - `total: str` - `held: str` Total amount of receipt token held in address balance - `total: str` Sum of receipt amount held and receipt amount collateralized - `net_rate: MarketRate` Account debt net rate - `nept: Nept` User's NEPT associations (e.g. stake, unlocks) - `staking: UserStake` Overview of the user's staking contributions/activity - `asset_info: AssetInfo` Asset identifiers with associated metadata - `bonding_sum: str` Total staked of all entries across all listed pools **NOTE:** this value is affected by active filters, if any (e.g. filtering over account index) - `claimable_rewards: str` NEPT rewarded from staking that is available yet not claimed by the user - `claimable_unbonding: str` Sum of all unbond/unstake amounts that have completed their lockup period and are ready to be claimed. - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `bonding_sum: str` - `claimable_rewards: str` - `claimable_unbonding: str` - `unclaimed: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `bonding_sum: str` - `claimable_rewards: str` - `claimable_unbonding: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `bonding_sum: str` - `claimable_rewards: str` - `claimable_unbonding: str` - `price: str` Text representation of price - `unclaimed: str` - `price: str` Price used in value calculations - `unclaimed: str` - `pools: List[UserStakePool]` User allocations for each staking pool - `amount_sum: str` Total staked of all entries **NOTE:** this value is affected by active filters, if any (e.g. filtering over account index) - `common: StakingPoolFull` Staking pool contents along with associated pool state and pool params - `duration: int` The lockup duration for this pool in seconds - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `duration: str` - `index: str` - `index: int` The ordered index (position) of this pool - `params: StakingPoolParams` Staking pool contract parameters - `flash_loan_weight: str` The pool's weight (multiplier) for flash loans volume - `gov_weight: str` The pool's weight (multiplier) on governance for an associated stake - `health_weight: str` The pool's weight (multiplier) on account health for an associated stake - `reward_weight: str` The pool's weight (multiplier) on rewards for an associated stake - `state: StakingPoolState` Current contract state of staking pool - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `total_bonded: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: str` Text representation of price - `total_bonded: str` - `price: str` Price used in value calculations - `total_bonded: str` - `total_bonded: str` The total amount staked to this pool - `contents: List[UserStakeBondingEntry]` Bonding/stake entries **NOTE:** entries that differ only in amount are merged upon creation - `account_index: int` User account index - `amount: str` Bonding amount - `cascade: bool` - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: str` - `transition_at: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `last_stake_acc: str` - `transition_at: Optional[datetime]` - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount_sum: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount_sum: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount_sum: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `unbonding: UserStakeUnbonding` User unstake/unbonding data - `amount_sum: str` Total amount of all unbond entries **NOTE:** this value is affected by active filters, if any (e.g. filtering over account index) - `contents: List[UserStakeUnbondingEntry]` Unbonding/unstake entries **NOTE:** cascade unbondings from pool >= 2 are contained in the bondings list of the lower adjacent pool from which the unbond occurred. - `amount: str` Unbonding amount - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: str` - `unlock_at: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `unlock_at: datetime` Timestamp for when the unstake can be redeemed - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount_sum: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount_sum: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount_sum: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `unclaimed: str` - `unlocks: UserUnlockOverview` Overview of the user's unlock arrangements and claim statistics - `arrangements: List[Arrangement]` A list of the user's active unlock arrangements - `admin: Optional[ArrangementAdmin]` The admin of the unlock, if any - `address: str` The address of the unlock arrangement's admin - `issued_reclaim: bool` True if the admin his issued a reclaim on the unlock arrangement - `amounts: UserUnlockAmounts` Primary unlock amount and other pre-calculated/derived amounts - `amount: str` The full unlock amount This value is immutable and does not change with regards to expiry/reclamation/lock states. - `claimable: str` The amount currently claimable This takes into account: reclamation, lock state, expiry, and previously claimed. In other words, this is an accurate representation of what the user can currently claim. - `claimed: str` The amount that has already been successfully claimed by the user. - `expired: str` The amount that was claimable but has now expired due to the presence and subsequent passing of `expires_at` - `extra: Extra` - `percent: Optional[ExtraPercent]` Percentages for unlock amounts. These do not factor in the `amount_staked` or `amount_held` values. Will not be null when query param `with_percent` is `true`. - `claimable: str` - `claimed: str` - `expired: str` - `extra: ExtraPercentExtra` - `text: Optional[ExtraPercentExtraText]` Human-readable variants of percentages for unlock amounts. Will not be null when query params `with_text` and `with_percent` are `true`. - `claimable: str` - `claimed: str` - `expired: str` - `locked: str` - `reclaimed: str` - `locked: str` - `reclaimed: str` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: str` - `claimable: str` - `claimed: str` - `expired: str` - `locked: str` - `reclaimed: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount: str` - `claimable: str` - `claimed: str` - `expired: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: str` - `claimable: str` - `claimed: str` - `expired: str` - `locked: str` - `price: str` Text representation of price - `reclaimed: str` - `locked: str` - `price: str` Price used in value calculations - `reclaimed: str` - `locked: str` The total amount of NEPT currently awaiting unlock **NOTE:** any reclaimed unlocks are excluded from the total, regardless of how much the user had claimed prior to reclamation. - `reclaimed: str` The amount that has been reclaimed from the unlock arrangement admin - `begins_at: datetime` The time at which the unlock begins - `expires_at: Optional[datetime]` The time at which the unlock expires, if any - `extra: ArrangementExtra` - `text: Optional[ArrangementExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `begins_at: str` - `expires_at: str` - `last_claimed_at: str` - `last_claimed_at: Optional[datetime]` The time at which the unlock was last claimed, if any - `schedule: UserUnlockSchedule` The schedule of the unlock - `class UserUnlockScheduleLinear: …` - `duration: int` The duration of the unlock in seconds - `ends_at: datetime` The time at which the unlock has/was/would've completed. This is identical to `begins_at + duration`. This timestamp will remain valid even if the unlock has been reclaimed. Therefore, it should not be used as a validity check. - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `duration: str` - `ends_at: str` - `kind: Literal["linear"]` - `"linear"` - `class UserUnlockScheduleLumpSum: …` - `kind: Literal["lump_sum"]` - `"lump_sum"` - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `last_claimed_at: str` - `last_claimed_at: Optional[datetime]` The time at which the most recent unlock claim occurred, if any - `totals: UserUnlockAmounts` Contains pre-calculated total amounts for all unlock agreements - `wallets: UserWalletPortfolio` User's wallets and balances - `balances: List[WalletBalance]` Array of each wallet balance - `asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `values: WalletAsset` Derived values and amounts. - `class WalletAssetKnown: …` - `amount: str` Wallet balance in native denom. - `amount_scaled: str` Amount scaled to the asset's standard unit / decimal places. - `asset_info: AssetInfo` Asset identifiers with associated metadata - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `kind: Literal["known"]` - `"known"` - `class WalletAssetUnknown: …` - `amount: str` Wallet balance in native denom. - `kind: Literal["unknown"]` - `"unknown"` - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `total_value: str` - `total_value: Optional[str]` Sum value in USD. Guaranteed null if value calculation is disabled / guaranteed non-null if calculation is enabled. **NOTE:** this only accounts for assets which are internally known & tracked. See the `/assets` endpoint for a list of supported assets. - `error: None` Error data. Guaranteed `null` for successful response. - `status: int` HTTP status. Successful responses are guaranteed to be < `400`. Conversely, error responses are guaranteed to be >= `400`. - `status_text: str` HTTP status text ### Example ```python from neptune_api_v2 import NeptuneAPIV2 client = NeptuneAPIV2() response = client.user.get_user( address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) print(response.data) ``` #### Response ```json { "data": { "markets": { "borrow": { "accounts": [ { "index": 0, "collaterals": [ { "asset_info": { "asset": { "id": "native;inj", "group": "native", "group_key": "inj" }, "metadata": { "name": "Injective", "symbol": "INJ", "symbol_denom": "inj", "decimals_denom": 18, "decimals_display": 4 }, "classification": { "kind": "regular", "neptune_receipt_asset": { "id": "token;inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f", "group": "token", "group_key": "inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f" } } }, "amount": "784395231757228517290", "extra": { "text": { "amount": "784.3952 INJ" }, "value": { "price": "2.99835", "amount": "2351.891443139286124816", "extra": { "text": { "amount": "$2,351.89", "price": "$2.99" } } } } } ], "debts": [ { "asset_info": { "asset": { "id": "native;inj", "group": "native", "group_key": "inj" }, "metadata": { "name": "Injective", "symbol": "INJ", "symbol_denom": "inj", "decimals_denom": 18, "decimals_display": 4 }, "classification": { "kind": "regular", "neptune_receipt_asset": { "id": "token;inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f", "group": "token", "group_key": "inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f" } } }, "market_rate": { "apr": "0.03537163", "apy": "0.03600465", "extra": { "text": { "apy": "3.60%", "apr": "3.53%" } } }, "principal": "716053849627087671144", "shares": "716053849627087671144", "extra": { "text": { "principal": "716.0538 INJ", "shares": "716.0538 INJ" }, "value": { "shares": "2146.980060029378318774", "price": "2.99835", "principal": "2146.980060029378318774", "extra": { "text": { "shares": "$2,146.98", "price": "$2.99", "principal": "$2,146.98" } } } } } ], "debts_net_rate": { "apr": "0.035371629999999999", "apy": "0.036004649999999999", "extra": { "text": { "apy": "3.60%", "apr": "3.53%" } } }, "health": { "base": "4.24", "boost": "1.01", "result": "4.2824", "extra": { "text": { "base": "4.24", "boost": "1.00%", "result": "4.28" } } } } ], "totals": { "collaterals": [ { "asset_info": { "asset": { "id": "native;inj", "group": "native", "group_key": "inj" }, "metadata": { "name": "Injective", "symbol": "INJ", "symbol_denom": "inj", "decimals_denom": 18, "decimals_display": 4 }, "classification": { "kind": "regular", "neptune_receipt_asset": { "id": "token;inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f", "group": "token", "group_key": "inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f" } } }, "amount": "784395231757228517290", "extra": { "text": { "amount": "784.3952 INJ" }, "value": { "price": "2.99835", "amount": "2351.891443139286124816", "extra": { "text": { "amount": "$2,351.89", "price": "$2.99" } } } } } ], "debts": [ { "asset_info": { "asset": { "id": "native;inj", "group": "native", "group_key": "inj" }, "metadata": { "name": "Injective", "symbol": "INJ", "symbol_denom": "inj", "decimals_denom": 18, "decimals_display": 4 }, "classification": { "kind": "regular", "neptune_receipt_asset": { "id": "token;inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f", "group": "token", "group_key": "inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f" } } }, "market_rate": { "apr": "0.03537163", "apy": "0.03600465", "extra": { "text": { "apy": "3.60%", "apr": "3.53%" } } }, "principal": "716053849627087671144", "shares": "716053849627087671144", "extra": { "text": { "principal": "716.0538 INJ", "shares": "716.0538 INJ" }, "value": { "shares": "2146.980060029378318774", "price": "2.99835", "principal": "2146.980060029378318774", "extra": { "text": { "shares": "$2,146.98", "price": "$2.99", "principal": "$2,146.98" } } } } } ], "debts_net_rate": { "apr": "0.035371629999999999", "apy": "0.036004649999999999", "extra": { "text": { "apy": "3.60%", "apr": "3.53%" } } } } }, "lend": { "asset_pools": [ { "asset_info": { "asset": { "id": "native;inj", "group": "native", "group_key": "inj" }, "metadata": { "name": "Injective", "symbol": "INJ", "symbol_denom": "inj", "decimals_denom": 18, "decimals_display": 4 }, "classification": { "kind": "regular", "neptune_receipt_asset": { "id": "token;inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f", "group": "token", "group_key": "inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f" } } }, "market_rate": { "apr": "0.26327306", "apy": "0.30118197", "extra": { "text": { "apy": "30.11%", "apr": "26.32%" } } }, "receipt_amounts": { "held": "164074553899734695304", "collateralized": "522287922081685507240", "total": "686362475981420202544", "extra": { "text": { "total": "686.3624 nINJ", "held": "164.0745 nINJ", "collateralized": "522.2879 nINJ" }, "value": { "held": "529.047635464493814053", "collateralized": "1684.083141727355313851", "price": "3.224434398205298254", "total": "2213.130777191849127905", "extra": { "text": { "price": "$3.22", "collateralized": "$1,684.08", "held": "$529.04", "total": "$2,213.13" } } } } }, "origin_equivalent": { "held": "175973563488277838892", "collateralized": "560165270184231828679", "total": "736138833672509667571", "extra": { "text": { "total": "736.1388 INJ", "collateralized": "560.1652 INJ", "held": "175.9735 INJ" } } } } ], "net_rate": { "apr": "0.263273059999999999", "apy": "0.301181969999999999", "extra": { "text": { "apy": "30.11%", "apr": "26.32%" } } } } }, "wallets": { "balances": [ { "asset": { "id": "native;inj", "group": "native", "group_key": "inj" }, "values": { "kind": "known", "asset_info": { "asset": { "id": "native;inj", "group": "native", "group_key": "inj" }, "metadata": { "name": "Injective", "symbol": "INJ", "symbol_denom": "inj", "decimals_denom": 18, "decimals_display": 4 }, "classification": { "kind": "regular", "neptune_receipt_asset": { "id": "token;inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f", "group": "token", "group_key": "inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f" } } }, "amount": "210001668317261714156", "amount_scaled": "210.001668317261714156", "extra": { "text": { "amount": "210.0016 INJ" }, "value": { "amount": "629.658502199061660639", "price": "2.99835", "extra": { "text": { "price": "$2.99", "amount": "$629.65" } } } } } } ], "total_value": "1222.044745699481568669", "extra": { "text": { "total_value": "$1,222.04" } } }, "nept": { "staking": { "asset_info": { "asset": { "id": "native;factory/inj1v3a4zznudwpukpr8y987pu5gnh4xuf7v36jhva/nept", "group": "native", "group_key": "factory/inj1v3a4zznudwpukpr8y987pu5gnh4xuf7v36jhva/nept" }, "metadata": { "name": "Neptune Token", "symbol": "NEPT", "symbol_denom": "nept", "decimals_denom": 6, "decimals_display": 5 }, "classification": { "kind": "regular", "neptune_receipt_asset": null } }, "bonding_sum": "401534452", "pools": [ { "common": { "index": 0, "duration": 604800, "extra": { "text": { "duration": "7 days", "index": "1" } }, "params": { "reward_weight": "2", "gov_weight": "2", "health_weight": "1", "flash_loan_weight": "0" }, "state": { "total_bonded": "0", "extra": { "text": { "total_bonded": "0.00000 NEPT" }, "value": { "total_bonded": "0", "price": "0.032585758453916404", "extra": { "text": { "price": "$0.03", "total_bonded": "$0.00" } } } } } }, "amount_sum": "164318800", "contents": [ { "account_index": 0, "amount": "164318800", "cascade": false, "transition_at": null, "last_stake_acc": "4.845087", "extra": { "text": { "amount": "164.31880 NEPT", "transition_at": "N/A" }, "value": { "amount": "5.354452726237398805", "price": "0.032585758453916404", "extra": { "text": { "price": "$0.03", "amount": "$5.35" } } } } } ], "extra": { "text": { "amount_sum": "164.31880 NEPT" }, "value": { "price": "0.032585758453916404", "amount_sum": "5.354452726237398805", "extra": { "text": { "price": "$0.03", "amount_sum": "$5.35" } } } } }, { "common": { "index": 1, "duration": 2592000, "extra": { "text": { "duration": "30 days", "index": "2" } }, "params": { "reward_weight": "2", "gov_weight": "2", "health_weight": "1", "flash_loan_weight": "0" }, "state": { "total_bonded": "0", "extra": { "text": { "total_bonded": "0.00000 NEPT" }, "value": { "total_bonded": "0", "price": "0.032585758453916404", "extra": { "text": { "price": "$0.03", "total_bonded": "$0.00" } } } } } }, "amount_sum": "71231615", "contents": [ { "account_index": 0, "amount": "71231615", "cascade": true, "transition_at": "2026-04-20T19:03:05.142002129Z", "last_stake_acc": "6.160662", "extra": { "text": { "amount": "71.23161 NEPT", "transition_at": "2026-04-20 07:03:05 PM +00:00" }, "value": { "amount": "2.321136200672368531", "price": "0.032585758453916404", "extra": { "text": { "price": "$0.03", "amount": "$2.32" } } } } } ], "extra": { "text": { "amount_sum": "71.23161 NEPT" }, "value": { "price": "0.032585758453916404", "amount_sum": "2.321136200672368531", "extra": { "text": { "price": "$0.03", "amount_sum": "$2.32" } } } } }, { "common": { "index": 2, "duration": 7776000, "extra": { "text": { "duration": "90 days", "index": "3" } }, "params": { "reward_weight": "2", "gov_weight": "2", "health_weight": "1", "flash_loan_weight": "0" }, "state": { "total_bonded": "0", "extra": { "text": { "total_bonded": "0.00000 NEPT" }, "value": { "total_bonded": "0", "price": "0.032585758453916404", "extra": { "text": { "price": "$0.03", "total_bonded": "$0.00" } } } } } }, "amount_sum": "165984037", "contents": [ { "account_index": 0, "amount": "165984037", "cascade": true, "transition_at": "2026-04-29T08:19:03.142017062Z", "last_stake_acc": "0.059719", "extra": { "text": { "amount": "165.98403 NEPT", "transition_at": "2026-04-29 08:19:03 AM +00:00" }, "value": { "amount": "5.408715736887923196", "price": "0.032585758453916404", "extra": { "text": { "price": "$0.03", "amount": "$5.40" } } } } } ], "extra": { "text": { "amount_sum": "165.98403 NEPT" }, "value": { "price": "0.032585758453916404", "amount_sum": "5.408715736887923196", "extra": { "text": { "price": "$0.03", "amount_sum": "$5.40" } } } } } ], "unbonding": { "amount_sum": "39306803", "contents": [ { "amount": "39306803", "unlock_at": "2026-04-10T11:06:08.142030308Z", "extra": { "text": { "unlock_at": "2026-04-10 11:06:08 AM +00:00", "amount": "39.30680 NEPT" }, "value": { "price": "0.032585758453916404", "amount": "1.28084198815367667", "extra": { "text": { "amount": "$1.28", "price": "$0.03" } } } } } ], "extra": { "text": { "amount_sum": "39.30680 NEPT" }, "value": { "amount_sum": "1.28084198815367667", "price": "0.032585758453916404", "extra": { "text": { "amount_sum": "$1.28", "price": "$0.03" } } } } }, "unclaimed": "101427805", "claimable_rewards": "56012748", "claimable_unbonding": "134541207", "extra": { "text": { "claimable_rewards": "56.01274 NEPT", "bonding_sum": "401.53445 NEPT", "claimable_unbonding": "134.54120 NEPT", "unclaimed": "101.42780 NEPT" }, "value": { "bonding_sum": "13.084304663797690533", "unclaimed": "3.305101954240934511", "claimable_unbonding": "4.384127273400366871", "claimable_rewards": "1.82521787666808915", "price": "0.032585758453916404", "extra": { "text": { "unclaimed": "$3.30", "price": "$0.03", "bonding_sum": "$13.08", "claimable_rewards": "$1.82", "claimable_unbonding": "$4.38" } } } } }, "unlocks": { "arrangements": [ { "begins_at": "2025-08-21T01:52:45Z", "schedule": { "kind": "linear", "duration": 50879281, "ends_at": "2027-04-01T23:00:46Z", "extra": { "text": { "ends_at": "2027-04-01 11:00:46 PM +00:00", "duration": "1 year" } } }, "last_claimed_at": "2025-09-13T01:10:22Z", "expires_at": "2027-11-17T08:48:26Z", "admin": { "address": "inj1loremipsumdolorsitametconsecteturadipi", "issued_reclaim": false }, "extra": { "text": { "begins_at": "2025-08-21 01:52:45 AM +00:00", "last_claimed_at": "2025-09-13 01:10:22 AM +00:00", "expires_at": "2027-11-17 08:48:26 AM +00:00" } }, "amounts": { "amount": "730243285", "claimed": "28484727", "claimable": "259093450", "locked": "442665108", "expired": "0", "reclaimed": "0", "extra": { "text": { "claimable": "259.0934 NEPT", "amount": "730.2432 NEPT", "reclaimed": "0.0000 NEPT", "locked": "442.6651 NEPT", "claimed": "28.4847 NEPT", "expired": "0.0000 NEPT" }, "percent": { "reclaimed": "0", "claimable": "0.354804289641636348", "claimed": "0.039007174163881561", "expired": "0", "locked": "0.606188536194482089", "extra": { "text": { "locked": "60.61%", "reclaimed": "0.00%", "claimable": "35.48%", "expired": "0.00%", "claimed": "3.90%" } } }, "value": { "reclaimed": "0", "amount": "23.795531297604435972", "claimed": "0.928196433647750848", "expired": "0", "price": "0.032585758453916404", "claimable": "8.442756578691867123", "locked": "14.424578285264817999", "extra": { "text": { "expired": "$0.00", "claimed": "$0.92", "price": "$0.03", "locked": "$14.42", "reclaimed": "$0.00", "amount": "$23.79", "claimable": "$8.44" } } } } } }, { "begins_at": "2025-11-03T11:29:10Z", "schedule": { "kind": "linear", "duration": 38854520, "ends_at": "2027-01-27T04:24:30Z", "extra": { "text": { "ends_at": "2027-01-27 04:24:30 AM +00:00", "duration": "1 year" } } }, "last_claimed_at": "2026-04-08T23:27:14Z", "expires_at": "2027-04-03T12:21:03Z", "admin": { "address": "inj1loremipsumdolorsitametconsecteturadipi", "issued_reclaim": false }, "extra": { "text": { "begins_at": "2025-11-03 11:29:10 AM +00:00", "last_claimed_at": "2026-04-08 11:27:14 PM +00:00", "expires_at": "2027-04-03 12:21:03 PM +00:00" } }, "amounts": { "amount": "611409005", "claimed": "212772081", "claimable": "1371775", "locked": "397265149", "expired": "0", "reclaimed": "0", "extra": { "text": { "claimable": "1.3717 NEPT", "amount": "611.4090 NEPT", "reclaimed": "0.0000 NEPT", "locked": "397.2651 NEPT", "claimed": "212.7720 NEPT", "expired": "0.0000 NEPT" }, "percent": { "reclaimed": "0", "claimable": "0.002243629041741051", "claimed": "0.348002857759675947", "expired": "0", "locked": "0.649753513198583", "extra": { "text": { "locked": "64.97%", "reclaimed": "0.00%", "claimable": "0.22%", "expired": "0.00%", "claimed": "34.80%" } } }, "value": { "reclaimed": "0", "amount": "19.923226153479366922", "claimed": "6.933339637203135879", "expired": "0", "price": "0.032585758453916404", "claimable": "0.044700328803121175", "locked": "12.945186187473109868", "extra": { "text": { "expired": "$0.00", "claimed": "$6.93", "price": "$0.03", "locked": "$12.94", "reclaimed": "$0.00", "amount": "$19.92", "claimable": "$0.04" } } } } } } ], "totals": { "amount": "1341652290", "claimed": "241256808", "claimable": "260465225", "locked": "839930257", "expired": "0", "reclaimed": "0", "extra": { "text": { "claimable": "260.4652 NEPT", "amount": "1,341.6522 NEPT", "reclaimed": "0.0000 NEPT", "locked": "839.9302 NEPT", "claimed": "241.2568 NEPT", "expired": "0.0000 NEPT" }, "percent": { "reclaimed": "0", "claimable": "0.194137651716004599", "claimed": "0.179820665755357522", "expired": "0", "locked": "0.626041682528637878", "extra": { "text": { "locked": "62.60%", "reclaimed": "0.00%", "claimable": "19.41%", "expired": "0.00%", "claimed": "17.98%" } } }, "value": { "reclaimed": "0", "amount": "43.718757451083802895", "claimed": "7.861536070850886727", "expired": "0", "price": "0.032585758453916404", "claimable": "8.487456907494988299", "locked": "27.369764472737927868", "extra": { "text": { "expired": "$0.00", "claimed": "$7.86", "price": "$0.03", "locked": "$27.36", "reclaimed": "$0.00", "amount": "$43.71", "claimable": "$8.48" } } } } }, "last_claimed_at": "2025-03-01T14:29:00Z", "extra": { "text": { "last_claimed_at": "2025-03-01 02:29:00 PM +00:00" } } } } }, "error": null, "status": 200, "status_text": "200 OK" } ``` ## Get user tx history `user.get_tx_history(straddress, UserGetTxHistoryParams**kwargs) -> SyncTxHistoryPage[UserTx]` **get** `/api/v1/users/{address}/tx-history` Get user tx history ### Parameters - `address: str` The user account address - `action: Optional[EventAction]` Optional event/tx action to filter against - `"borrow_flash_loan"` - `"return_flash_loan"` - `"create_token_unlock"` - `"reclaim_token_unlock"` - `"liquidate"` - `"borrow"` - `"return"` - `"lend"` - `"redeem"` - `"deposit_collateral"` - `"withdraw_collateral"` - `"claim_war_chest"` - `"bond"` - `"unbond"` - `"claim_unbonded"` - `"claim_token_unlock"` - `"claim_rewards"` - `"cascade"` - `"send"` - `limit: Optional[int]` Maximum number of transactions to return. Optional and defaults to `20` if missing. - `prev_event_uuid: Optional[str]` Optional UUID skip parameter used for pagination. Providing the last event UUID on a given page will return the next page beginning with the following (unseen) item. - `sort_order: Optional[Literal["asc", "desc"]]` Changes the sort order for the returned txs. Transactions are always sorted by event time, however the direction (e.g. newest to oldest) can be changed using this parameter. Optional and defaults to `desc` if missing. - `"asc"` - `"desc"` - `with_text: Optional[bool]` Include text variation fields - `with_value: Optional[bool]` Calculate and include USD values for amounts, where applicable ### Returns - `class UserTx: …` - `account_address: str` Account address corresponding to the transaction - `account_index: Optional[int]` Neptune market sub-account index. Will be set for the following event types: `borrow`, `return`, `deposit_collateral`, `withdraw_collateral`, `liquidate`, `bond`, `unbond`. Otherwise the value is guaranteed to be null. - `action: EventAction` Neptune event type for the given market/token contract execute call - `"borrow_flash_loan"` - `"return_flash_loan"` - `"create_token_unlock"` - `"reclaim_token_unlock"` - `"liquidate"` - `"borrow"` - `"return"` - `"lend"` - `"redeem"` - `"deposit_collateral"` - `"withdraw_collateral"` - `"claim_war_chest"` - `"bond"` - `"unbond"` - `"claim_unbonded"` - `"claim_token_unlock"` - `"claim_rewards"` - `"cascade"` - `"send"` - `amount: Optional[str]` The relevant amount for the given tx/event. This value will be set for all currently implemented action types. It is set as nullable for forwards compatibility for future action types which may not have an associated amount. - `asset: AssetInfo` Asset identifiers with associated metadata - `asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `id: str` - `group: Literal["native", "token"]` - `"native"` - `"token"` - `group_key: str` - `classification: AssetClassification` The asset's classification metadata. Assets are classfied to provide context on their usage throughout the Neptune API (e.g. regular assets, neptune receipt tokens, LSTs, etc.) Each asset belongs to only a single classification type. This object contains metadata pertaining to the given classification. While some fields may be common among the distinct classifcations, each classification is distinct and subject to independent change. - `class Regular: …` - `kind: Literal["regular"]` - `"regular"` - `neptune_receipt_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class NeptuneReceiptToken: …` - `kind: Literal["neptune_receipt_token"]` - `"neptune_receipt_token"` - `origin_asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class LiquidStakingToken: …` - `kind: Literal["liquid_staking_token"]` - `"liquid_staking_token"` - `origin_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: int` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: int` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: str` Full name of the asset - `symbol: str` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: str` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `contract_address: str` Address for the event's corresponding contract - `destination_address: Optional[str]` Destination account address. Non-null for `send`/`transfer` transactions. This field will be null for all other action types. - `event_time: datetime` Event/transaction block time - `event_uuid: str` Internal UUID created when the transaction was first indexed by Neptune. Primary usage for API clients is tx history pagination offsets. NOTE: event UUIDs should not be used as a guaranteed method of uniquely identifying a transaction event over extended periods of time. Future updates to our indexer may infrequently require a full re-index of transactions, resulting in newly generated UUIDs. - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `action: str` - `amount: str` - `event_time: str` - `historic_price: str` - `historic_value: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount: Optional[str]` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: Optional[str]` - `price: Optional[str]` Text representation of price - `price: str` Price used in value calculations - `historic_price: Union[str, float, null]` The price of the associated asset at the time of the transaction. This value will be set for all currently implemented action types. It is set as nullable for forwards compatibility for future action types which may not have an associated amount. - `str` The price of the associated asset at the time of the transaction. This value will be set for all currently implemented action types. It is set as nullable for forwards compatibility for future action types which may not have an associated amount. - `float` The price of the associated asset at the time of the transaction. This value will be set for all currently implemented action types. It is set as nullable for forwards compatibility for future action types which may not have an associated amount. - `historic_value: Union[str, float, null]` The USD value at the time of the transaction. Derived using the amount and historical price of the associated asset. This value will be set for all currently implemented action types. It is set as nullable for forwards compatibility for future action types which may not have an associated amount. - `str` The USD value at the time of the transaction. Derived using the amount and historical price of the associated asset. This value will be set for all currently implemented action types. It is set as nullable for forwards compatibility for future action types which may not have an associated amount. - `float` The USD value at the time of the transaction. Derived using the amount and historical price of the associated asset. This value will be set for all currently implemented action types. It is set as nullable for forwards compatibility for future action types which may not have an associated amount. - `tx_hash: str` Transaction hash ### Example ```python from neptune_api_v2 import NeptuneAPIV2 client = NeptuneAPIV2() page = client.user.get_tx_history( address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) page = page.data[0] print(page.event_uuid) ``` #### Response ```json { "data": [ { "event_uuid": "1cc81b0e-ba2f-438c-883c-05aa4db53f45", "event_time": "2026-04-09T23:40:09.142869763Z", "tx_hash": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef", "action": "borrow", "contract_address": "inj1nc7gjkf2mhp34a6gquhurg8qahnw5kxs5u3s4u", "account_address": "inj10123456789abcdef0123456789abcdef012345", "destination_address": null, "account_index": 0, "asset": { "asset": { "id": "native;inj", "group": "native", "group_key": "inj" }, "metadata": { "name": "Injective", "symbol": "INJ", "symbol_denom": "inj", "decimals_denom": 18, "decimals_display": 4 }, "classification": { "kind": "regular", "neptune_receipt_asset": { "id": "token;inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f", "group": "token", "group_key": "inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f" } } }, "amount": "1", "historic_price": "1", "historic_value": "1", "extra": { "text": { "event_time": "2026-04-09 11:40:09 PM +00:00", "action": "Borrow", "amount": "0.0000 INJ", "historic_price": "$1.00", "historic_value": "$1.00" }, "value": { "amount": "0.000000000000000002", "price": "2.99835", "extra": { "text": { "price": "$2.99", "amount": "$0.00" } } } } } ], "count": 1, "error": null, "status": 200, "status_text": "200 OK" } ``` ## Domain Types ### Event Action - `Literal["borrow_flash_loan", "return_flash_loan", "create_token_unlock", 16 more]` - `"borrow_flash_loan"` - `"return_flash_loan"` - `"create_token_unlock"` - `"reclaim_token_unlock"` - `"liquidate"` - `"borrow"` - `"return"` - `"lend"` - `"redeem"` - `"deposit_collateral"` - `"withdraw_collateral"` - `"claim_war_chest"` - `"bond"` - `"unbond"` - `"claim_unbonded"` - `"claim_token_unlock"` - `"claim_rewards"` - `"cascade"` - `"send"` ### User - `class User: …` - `markets: UserMarket` User's market contribution overview - `borrow: UserBorrowMarket` Overview of user borrowing portfolio - `accounts: List[UserBorrowMarketAccount]` Market sub-accounts for the user - `collaterals: List[UserCollateralAssetPool]` Account collateral allocations - `amount: str` Amount of this asset which is actively collateralized - `asset_info: AssetInfo` Asset identifiers with associated metadata - `asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `id: str` - `group: Literal["native", "token"]` - `"native"` - `"token"` - `group_key: str` - `classification: AssetClassification` The asset's classification metadata. Assets are classfied to provide context on their usage throughout the Neptune API (e.g. regular assets, neptune receipt tokens, LSTs, etc.) Each asset belongs to only a single classification type. This object contains metadata pertaining to the given classification. While some fields may be common among the distinct classifcations, each classification is distinct and subject to independent change. - `class Regular: …` - `kind: Literal["regular"]` - `"regular"` - `neptune_receipt_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class NeptuneReceiptToken: …` - `kind: Literal["neptune_receipt_token"]` - `"neptune_receipt_token"` - `origin_asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class LiquidStakingToken: …` - `kind: Literal["liquid_staking_token"]` - `"liquid_staking_token"` - `origin_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: int` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: int` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: str` Full name of the asset - `symbol: str` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: str` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `debts: List[UserDebtAssetPool]` Account debt allocations - `asset_info: AssetInfo` Asset identifiers with associated metadata - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `principal: str` - `shares: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: str` Text representation of price - `principal: str` - `shares: str` - `price: str` Price used in value calculations - `principal: str` - `shares: str` - `market_rate: MarketRate` Current market borrowing rate - `apr: str` Market rate in APR standard as a decimal percentage - `apy: str` Market rate in APY standard as a decimal percentage - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `apr: str` - `apy: str` - `principal: str` Initial amount borrowed (of debts which have not yet been repaid) - `shares: str` - `debts_net_rate: MarketRate` Account debt net rate - `health: Optional[UserAccountHealth]` Health data for this account - `base: str` Account health value, before any added health boosts - `boost: str` Account health boost to be applied - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `base: str` - `boost: str` - `result: str` - `result: str` Account health, with boost - `index: int` Account index - `totals: UserBorrowMarketPools` Collateral/debt totals of all sub-accounts by asset - `collaterals: List[UserCollateralAssetPool]` Account collateral allocations - `amount: str` Amount of this asset which is actively collateralized - `asset_info: AssetInfo` Asset identifiers with associated metadata - `extra: Extra` - `debts: List[UserDebtAssetPool]` Account debt allocations - `asset_info: AssetInfo` Asset identifiers with associated metadata - `extra: Extra` - `market_rate: MarketRate` Current market borrowing rate - `principal: str` Initial amount borrowed (of debts which have not yet been repaid) - `shares: str` - `debts_net_rate: MarketRate` Account debt net rate - `lend: UserLendMarket` Overview of user lending portfolio - `asset_pools: List[UserLendAssetPool]` User lending allocations - `asset_info: AssetInfo` Asset identifiers with associated metadata - `market_rate: MarketRate` Current market lending rate - `origin_equivalent: UserLendOriginAmounts` The lending amounts converted into the equivalent for the receipt token's origin/source asset - `collateralized: str` Total equivalent amount of origin token collateralized across this user's borrowing portfolio **NOTE:** This is **not** the amount of the origin asset that the user holds, but the amount held in the receipt token rendered as the equivalent amount in the origin asset. Or, more formally: `origin_equivalent_collateralized = receipt_collateralized / receipt_redemption_ratio` - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `collateralized: str` - `held: str` - `total: str` - `held: str` Total equivalent amount of origin token held in address balance **NOTE:** This is **not** the amount of the origin asset that the user holds, but the amount held in the receipt token rendered as the equivalent amount in the origin asset. Or, more formally: `origin_equivalent_held = receipt_held / receipt_redemption_ratio` - `total: str` Total of held and collateralized equivalent for origin asset Or, more formally: `origin_equivalent_total = receipt_lent_total / receipt_redemption_ratio` - `receipt_amounts: UserLendReceiptAmounts` The lending amounts in the original receipt token amounts - `collateralized: str` Total amount of receipt token collateralized across this user's borrowing portfolio - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `collateralized: str` - `held: str` - `total: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `collateralized: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `collateralized: str` - `held: str` - `price: str` Text representation of price - `total: str` - `held: str` - `price: str` Price used in value calculations - `total: str` - `held: str` Total amount of receipt token held in address balance - `total: str` Sum of receipt amount held and receipt amount collateralized - `net_rate: MarketRate` Account debt net rate - `nept: Nept` User's NEPT associations (e.g. stake, unlocks) - `staking: UserStake` Overview of the user's staking contributions/activity - `asset_info: AssetInfo` Asset identifiers with associated metadata - `bonding_sum: str` Total staked of all entries across all listed pools **NOTE:** this value is affected by active filters, if any (e.g. filtering over account index) - `claimable_rewards: str` NEPT rewarded from staking that is available yet not claimed by the user - `claimable_unbonding: str` Sum of all unbond/unstake amounts that have completed their lockup period and are ready to be claimed. - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `bonding_sum: str` - `claimable_rewards: str` - `claimable_unbonding: str` - `unclaimed: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `bonding_sum: str` - `claimable_rewards: str` - `claimable_unbonding: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `bonding_sum: str` - `claimable_rewards: str` - `claimable_unbonding: str` - `price: str` Text representation of price - `unclaimed: str` - `price: str` Price used in value calculations - `unclaimed: str` - `pools: List[UserStakePool]` User allocations for each staking pool - `amount_sum: str` Total staked of all entries **NOTE:** this value is affected by active filters, if any (e.g. filtering over account index) - `common: StakingPoolFull` Staking pool contents along with associated pool state and pool params - `duration: int` The lockup duration for this pool in seconds - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `duration: str` - `index: str` - `index: int` The ordered index (position) of this pool - `params: StakingPoolParams` Staking pool contract parameters - `flash_loan_weight: str` The pool's weight (multiplier) for flash loans volume - `gov_weight: str` The pool's weight (multiplier) on governance for an associated stake - `health_weight: str` The pool's weight (multiplier) on account health for an associated stake - `reward_weight: str` The pool's weight (multiplier) on rewards for an associated stake - `state: StakingPoolState` Current contract state of staking pool - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `total_bonded: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: str` Text representation of price - `total_bonded: str` - `price: str` Price used in value calculations - `total_bonded: str` - `total_bonded: str` The total amount staked to this pool - `contents: List[UserStakeBondingEntry]` Bonding/stake entries **NOTE:** entries that differ only in amount are merged upon creation - `account_index: int` User account index - `amount: str` Bonding amount - `cascade: bool` - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: str` - `transition_at: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `last_stake_acc: str` - `transition_at: Optional[datetime]` - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount_sum: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount_sum: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount_sum: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `unbonding: UserStakeUnbonding` User unstake/unbonding data - `amount_sum: str` Total amount of all unbond entries **NOTE:** this value is affected by active filters, if any (e.g. filtering over account index) - `contents: List[UserStakeUnbondingEntry]` Unbonding/unstake entries **NOTE:** cascade unbondings from pool >= 2 are contained in the bondings list of the lower adjacent pool from which the unbond occurred. - `amount: str` Unbonding amount - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: str` - `unlock_at: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `unlock_at: datetime` Timestamp for when the unstake can be redeemed - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount_sum: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount_sum: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount_sum: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `unclaimed: str` - `unlocks: UserUnlockOverview` Overview of the user's unlock arrangements and claim statistics - `arrangements: List[Arrangement]` A list of the user's active unlock arrangements - `admin: Optional[ArrangementAdmin]` The admin of the unlock, if any - `address: str` The address of the unlock arrangement's admin - `issued_reclaim: bool` True if the admin his issued a reclaim on the unlock arrangement - `amounts: UserUnlockAmounts` Primary unlock amount and other pre-calculated/derived amounts - `amount: str` The full unlock amount This value is immutable and does not change with regards to expiry/reclamation/lock states. - `claimable: str` The amount currently claimable This takes into account: reclamation, lock state, expiry, and previously claimed. In other words, this is an accurate representation of what the user can currently claim. - `claimed: str` The amount that has already been successfully claimed by the user. - `expired: str` The amount that was claimable but has now expired due to the presence and subsequent passing of `expires_at` - `extra: Extra` - `percent: Optional[ExtraPercent]` Percentages for unlock amounts. These do not factor in the `amount_staked` or `amount_held` values. Will not be null when query param `with_percent` is `true`. - `claimable: str` - `claimed: str` - `expired: str` - `extra: ExtraPercentExtra` - `text: Optional[ExtraPercentExtraText]` Human-readable variants of percentages for unlock amounts. Will not be null when query params `with_text` and `with_percent` are `true`. - `claimable: str` - `claimed: str` - `expired: str` - `locked: str` - `reclaimed: str` - `locked: str` - `reclaimed: str` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: str` - `claimable: str` - `claimed: str` - `expired: str` - `locked: str` - `reclaimed: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount: str` - `claimable: str` - `claimed: str` - `expired: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: str` - `claimable: str` - `claimed: str` - `expired: str` - `locked: str` - `price: str` Text representation of price - `reclaimed: str` - `locked: str` - `price: str` Price used in value calculations - `reclaimed: str` - `locked: str` The total amount of NEPT currently awaiting unlock **NOTE:** any reclaimed unlocks are excluded from the total, regardless of how much the user had claimed prior to reclamation. - `reclaimed: str` The amount that has been reclaimed from the unlock arrangement admin - `begins_at: datetime` The time at which the unlock begins - `expires_at: Optional[datetime]` The time at which the unlock expires, if any - `extra: ArrangementExtra` - `text: Optional[ArrangementExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `begins_at: str` - `expires_at: str` - `last_claimed_at: str` - `last_claimed_at: Optional[datetime]` The time at which the unlock was last claimed, if any - `schedule: UserUnlockSchedule` The schedule of the unlock - `class UserUnlockScheduleLinear: …` - `duration: int` The duration of the unlock in seconds - `ends_at: datetime` The time at which the unlock has/was/would've completed. This is identical to `begins_at + duration`. This timestamp will remain valid even if the unlock has been reclaimed. Therefore, it should not be used as a validity check. - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `duration: str` - `ends_at: str` - `kind: Literal["linear"]` - `"linear"` - `class UserUnlockScheduleLumpSum: …` - `kind: Literal["lump_sum"]` - `"lump_sum"` - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `last_claimed_at: str` - `last_claimed_at: Optional[datetime]` The time at which the most recent unlock claim occurred, if any - `totals: UserUnlockAmounts` Contains pre-calculated total amounts for all unlock agreements - `wallets: UserWalletPortfolio` User's wallets and balances - `balances: List[WalletBalance]` Array of each wallet balance - `asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `values: WalletAsset` Derived values and amounts. - `class WalletAssetKnown: …` - `amount: str` Wallet balance in native denom. - `amount_scaled: str` Amount scaled to the asset's standard unit / decimal places. - `asset_info: AssetInfo` Asset identifiers with associated metadata - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `kind: Literal["known"]` - `"known"` - `class WalletAssetUnknown: …` - `amount: str` Wallet balance in native denom. - `kind: Literal["unknown"]` - `"unknown"` - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `total_value: str` - `total_value: Optional[str]` Sum value in USD. Guaranteed null if value calculation is disabled / guaranteed non-null if calculation is enabled. **NOTE:** this only accounts for assets which are internally known & tracked. See the `/assets` endpoint for a list of supported assets. ### User Tx - `class UserTx: …` - `account_address: str` Account address corresponding to the transaction - `account_index: Optional[int]` Neptune market sub-account index. Will be set for the following event types: `borrow`, `return`, `deposit_collateral`, `withdraw_collateral`, `liquidate`, `bond`, `unbond`. Otherwise the value is guaranteed to be null. - `action: EventAction` Neptune event type for the given market/token contract execute call - `"borrow_flash_loan"` - `"return_flash_loan"` - `"create_token_unlock"` - `"reclaim_token_unlock"` - `"liquidate"` - `"borrow"` - `"return"` - `"lend"` - `"redeem"` - `"deposit_collateral"` - `"withdraw_collateral"` - `"claim_war_chest"` - `"bond"` - `"unbond"` - `"claim_unbonded"` - `"claim_token_unlock"` - `"claim_rewards"` - `"cascade"` - `"send"` - `amount: Optional[str]` The relevant amount for the given tx/event. This value will be set for all currently implemented action types. It is set as nullable for forwards compatibility for future action types which may not have an associated amount. - `asset: AssetInfo` Asset identifiers with associated metadata - `asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `id: str` - `group: Literal["native", "token"]` - `"native"` - `"token"` - `group_key: str` - `classification: AssetClassification` The asset's classification metadata. Assets are classfied to provide context on their usage throughout the Neptune API (e.g. regular assets, neptune receipt tokens, LSTs, etc.) Each asset belongs to only a single classification type. This object contains metadata pertaining to the given classification. While some fields may be common among the distinct classifcations, each classification is distinct and subject to independent change. - `class Regular: …` - `kind: Literal["regular"]` - `"regular"` - `neptune_receipt_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class NeptuneReceiptToken: …` - `kind: Literal["neptune_receipt_token"]` - `"neptune_receipt_token"` - `origin_asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class LiquidStakingToken: …` - `kind: Literal["liquid_staking_token"]` - `"liquid_staking_token"` - `origin_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: int` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: int` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: str` Full name of the asset - `symbol: str` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: str` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `contract_address: str` Address for the event's corresponding contract - `destination_address: Optional[str]` Destination account address. Non-null for `send`/`transfer` transactions. This field will be null for all other action types. - `event_time: datetime` Event/transaction block time - `event_uuid: str` Internal UUID created when the transaction was first indexed by Neptune. Primary usage for API clients is tx history pagination offsets. NOTE: event UUIDs should not be used as a guaranteed method of uniquely identifying a transaction event over extended periods of time. Future updates to our indexer may infrequently require a full re-index of transactions, resulting in newly generated UUIDs. - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `action: str` - `amount: str` - `event_time: str` - `historic_price: str` - `historic_value: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount: Optional[str]` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: Optional[str]` - `price: Optional[str]` Text representation of price - `price: str` Price used in value calculations - `historic_price: Union[str, float, null]` The price of the associated asset at the time of the transaction. This value will be set for all currently implemented action types. It is set as nullable for forwards compatibility for future action types which may not have an associated amount. - `str` The price of the associated asset at the time of the transaction. This value will be set for all currently implemented action types. It is set as nullable for forwards compatibility for future action types which may not have an associated amount. - `float` The price of the associated asset at the time of the transaction. This value will be set for all currently implemented action types. It is set as nullable for forwards compatibility for future action types which may not have an associated amount. - `historic_value: Union[str, float, null]` The USD value at the time of the transaction. Derived using the amount and historical price of the associated asset. This value will be set for all currently implemented action types. It is set as nullable for forwards compatibility for future action types which may not have an associated amount. - `str` The USD value at the time of the transaction. Derived using the amount and historical price of the associated asset. This value will be set for all currently implemented action types. It is set as nullable for forwards compatibility for future action types which may not have an associated amount. - `float` The USD value at the time of the transaction. Derived using the amount and historical price of the associated asset. This value will be set for all currently implemented action types. It is set as nullable for forwards compatibility for future action types which may not have an associated amount. - `tx_hash: str` Transaction hash # Market ## Get user market portfolio `user.market.get_portfolio(straddress, MarketGetPortfolioParams**kwargs) -> MarketGetPortfolioResponse` **get** `/api/v1/users/{address}/markets` Get user market portfolio ### Parameters - `address: str` The user account address - `with_text: Optional[bool]` Include text variation fields - `with_value: Optional[bool]` Calculate and include USD values for amounts, where applicable ### Returns - `class MarketGetPortfolioResponse: …` - `data: UserMarket` - `borrow: UserBorrowMarket` Overview of user borrowing portfolio - `accounts: List[UserBorrowMarketAccount]` Market sub-accounts for the user - `collaterals: List[UserCollateralAssetPool]` Account collateral allocations - `amount: str` Amount of this asset which is actively collateralized - `asset_info: AssetInfo` Asset identifiers with associated metadata - `asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `id: str` - `group: Literal["native", "token"]` - `"native"` - `"token"` - `group_key: str` - `classification: AssetClassification` The asset's classification metadata. Assets are classfied to provide context on their usage throughout the Neptune API (e.g. regular assets, neptune receipt tokens, LSTs, etc.) Each asset belongs to only a single classification type. This object contains metadata pertaining to the given classification. While some fields may be common among the distinct classifcations, each classification is distinct and subject to independent change. - `class Regular: …` - `kind: Literal["regular"]` - `"regular"` - `neptune_receipt_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class NeptuneReceiptToken: …` - `kind: Literal["neptune_receipt_token"]` - `"neptune_receipt_token"` - `origin_asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class LiquidStakingToken: …` - `kind: Literal["liquid_staking_token"]` - `"liquid_staking_token"` - `origin_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: int` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: int` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: str` Full name of the asset - `symbol: str` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: str` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `debts: List[UserDebtAssetPool]` Account debt allocations - `asset_info: AssetInfo` Asset identifiers with associated metadata - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `principal: str` - `shares: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: str` Text representation of price - `principal: str` - `shares: str` - `price: str` Price used in value calculations - `principal: str` - `shares: str` - `market_rate: MarketRate` Current market borrowing rate - `apr: str` Market rate in APR standard as a decimal percentage - `apy: str` Market rate in APY standard as a decimal percentage - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `apr: str` - `apy: str` - `principal: str` Initial amount borrowed (of debts which have not yet been repaid) - `shares: str` - `debts_net_rate: MarketRate` Account debt net rate - `health: Optional[UserAccountHealth]` Health data for this account - `base: str` Account health value, before any added health boosts - `boost: str` Account health boost to be applied - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `base: str` - `boost: str` - `result: str` - `result: str` Account health, with boost - `index: int` Account index - `totals: UserBorrowMarketPools` Collateral/debt totals of all sub-accounts by asset - `collaterals: List[UserCollateralAssetPool]` Account collateral allocations - `amount: str` Amount of this asset which is actively collateralized - `asset_info: AssetInfo` Asset identifiers with associated metadata - `extra: Extra` - `debts: List[UserDebtAssetPool]` Account debt allocations - `asset_info: AssetInfo` Asset identifiers with associated metadata - `extra: Extra` - `market_rate: MarketRate` Current market borrowing rate - `principal: str` Initial amount borrowed (of debts which have not yet been repaid) - `shares: str` - `debts_net_rate: MarketRate` Account debt net rate - `lend: UserLendMarket` Overview of user lending portfolio - `asset_pools: List[UserLendAssetPool]` User lending allocations - `asset_info: AssetInfo` Asset identifiers with associated metadata - `market_rate: MarketRate` Current market lending rate - `origin_equivalent: UserLendOriginAmounts` The lending amounts converted into the equivalent for the receipt token's origin/source asset - `collateralized: str` Total equivalent amount of origin token collateralized across this user's borrowing portfolio **NOTE:** This is **not** the amount of the origin asset that the user holds, but the amount held in the receipt token rendered as the equivalent amount in the origin asset. Or, more formally: `origin_equivalent_collateralized = receipt_collateralized / receipt_redemption_ratio` - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `collateralized: str` - `held: str` - `total: str` - `held: str` Total equivalent amount of origin token held in address balance **NOTE:** This is **not** the amount of the origin asset that the user holds, but the amount held in the receipt token rendered as the equivalent amount in the origin asset. Or, more formally: `origin_equivalent_held = receipt_held / receipt_redemption_ratio` - `total: str` Total of held and collateralized equivalent for origin asset Or, more formally: `origin_equivalent_total = receipt_lent_total / receipt_redemption_ratio` - `receipt_amounts: UserLendReceiptAmounts` The lending amounts in the original receipt token amounts - `collateralized: str` Total amount of receipt token collateralized across this user's borrowing portfolio - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `collateralized: str` - `held: str` - `total: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `collateralized: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `collateralized: str` - `held: str` - `price: str` Text representation of price - `total: str` - `held: str` - `price: str` Price used in value calculations - `total: str` - `held: str` Total amount of receipt token held in address balance - `total: str` Sum of receipt amount held and receipt amount collateralized - `net_rate: MarketRate` Account debt net rate - `error: None` Error data. Guaranteed `null` for successful response. - `status: int` HTTP status. Successful responses are guaranteed to be < `400`. Conversely, error responses are guaranteed to be >= `400`. - `status_text: str` HTTP status text ### Example ```python from neptune_api_v2 import NeptuneAPIV2 client = NeptuneAPIV2() response = client.user.market.get_portfolio( address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) print(response.data) ``` #### Response ```json { "data": { "borrow": { "accounts": [ { "index": 0, "collaterals": [ { "asset_info": { "asset": { "id": "native;inj", "group": "native", "group_key": "inj" }, "metadata": { "name": "Injective", "symbol": "INJ", "symbol_denom": "inj", "decimals_denom": 18, "decimals_display": 4 }, "classification": { "kind": "regular", "neptune_receipt_asset": { "id": "token;inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f", "group": "token", "group_key": "inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f" } } }, "amount": "920380558505833997007", "extra": { "text": { "amount": "920.3805 INJ" }, "value": { "price": "2.99835", "amount": "2759.623047595967364925", "extra": { "text": { "amount": "$2,759.62", "price": "$2.99" } } } } } ], "debts": [ { "asset_info": { "asset": { "id": "native;inj", "group": "native", "group_key": "inj" }, "metadata": { "name": "Injective", "symbol": "INJ", "symbol_denom": "inj", "decimals_denom": 18, "decimals_display": 4 }, "classification": { "kind": "regular", "neptune_receipt_asset": { "id": "token;inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f", "group": "token", "group_key": "inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f" } } }, "market_rate": { "apr": "0.10742845", "apy": "0.11341119", "extra": { "text": { "apy": "11.34%", "apr": "10.74%" } } }, "principal": "444725506597269050309", "shares": "444725506597269050309", "extra": { "text": { "principal": "444.7255 INJ", "shares": "444.7255 INJ" }, "value": { "shares": "1333.442722705921656993", "price": "2.99835", "principal": "1333.442722705921656993", "extra": { "text": { "shares": "$1,333.44", "price": "$2.99", "principal": "$1,333.44" } } } } } ], "debts_net_rate": { "apr": "0.107428449999999999", "apy": "0.113411189999999999", "extra": { "text": { "apy": "11.34%", "apr": "10.74%" } } }, "health": { "base": "3.56", "boost": "1", "result": "3.56", "extra": { "text": { "base": "3.56", "boost": "0.00%", "result": "3.56" } } } } ], "totals": { "collaterals": [ { "asset_info": { "asset": { "id": "native;inj", "group": "native", "group_key": "inj" }, "metadata": { "name": "Injective", "symbol": "INJ", "symbol_denom": "inj", "decimals_denom": 18, "decimals_display": 4 }, "classification": { "kind": "regular", "neptune_receipt_asset": { "id": "token;inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f", "group": "token", "group_key": "inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f" } } }, "amount": "920380558505833997007", "extra": { "text": { "amount": "920.3805 INJ" }, "value": { "price": "2.99835", "amount": "2759.623047595967364925", "extra": { "text": { "amount": "$2,759.62", "price": "$2.99" } } } } } ], "debts": [ { "asset_info": { "asset": { "id": "native;inj", "group": "native", "group_key": "inj" }, "metadata": { "name": "Injective", "symbol": "INJ", "symbol_denom": "inj", "decimals_denom": 18, "decimals_display": 4 }, "classification": { "kind": "regular", "neptune_receipt_asset": { "id": "token;inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f", "group": "token", "group_key": "inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f" } } }, "market_rate": { "apr": "0.10742845", "apy": "0.11341119", "extra": { "text": { "apy": "11.34%", "apr": "10.74%" } } }, "principal": "444725506597269050309", "shares": "444725506597269050309", "extra": { "text": { "principal": "444.7255 INJ", "shares": "444.7255 INJ" }, "value": { "shares": "1333.442722705921656993", "price": "2.99835", "principal": "1333.442722705921656993", "extra": { "text": { "shares": "$1,333.44", "price": "$2.99", "principal": "$1,333.44" } } } } } ], "debts_net_rate": { "apr": "0.107428449999999999", "apy": "0.113411189999999999", "extra": { "text": { "apy": "11.34%", "apr": "10.74%" } } } } }, "lend": { "asset_pools": [ { "asset_info": { "asset": { "id": "native;inj", "group": "native", "group_key": "inj" }, "metadata": { "name": "Injective", "symbol": "INJ", "symbol_denom": "inj", "decimals_denom": 18, "decimals_display": 4 }, "classification": { "kind": "regular", "neptune_receipt_asset": { "id": "token;inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f", "group": "token", "group_key": "inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f" } } }, "market_rate": { "apr": "0.28352819", "apy": "0.32780631", "extra": { "text": { "apy": "32.78%", "apr": "28.35%" } } }, "receipt_amounts": { "held": "503392454790765643939", "collateralized": "63652103341334203700", "total": "567044558132099847639", "extra": { "text": { "total": "567.0445 nINJ", "held": "503.3924 nINJ", "collateralized": "63.6521 nINJ" }, "value": { "held": "1623.155947024350227118", "collateralized": "205.242031531916407303", "price": "3.224434398205298254", "total": "1828.397978556266634422", "extra": { "text": { "price": "$3.22", "collateralized": "$205.24", "held": "$1,623.15", "total": "$1,828.39" } } } } }, "origin_equivalent": { "held": "539899466414371690487", "collateralized": "68268279158897706162", "total": "608167745573269396650", "extra": { "text": { "total": "608.1677 INJ", "collateralized": "68.2682 INJ", "held": "539.8994 INJ" } } } } ], "net_rate": { "apr": "0.283528189999999999", "apy": "0.327806309999999999", "extra": { "text": { "apy": "32.78%", "apr": "28.35%" } } } } }, "error": null, "status": 200, "status_text": "200 OK" } ``` ## Get user markets for all kinds (lend + borrow debt/collateral), grouped together by asset `user.market.get_merged(straddress, MarketGetMergedParams**kwargs) -> MarketGetMergedResponse` **get** `/api/v1/users/{address}/markets/merged` Get user markets for all kinds (lend + borrow debt/collateral), grouped together by asset ### Parameters - `address: str` The user account address - `with_text: Optional[bool]` Include text variation fields - `with_value: Optional[bool]` Calculate and include USD values for amounts, where applicable ### Returns - `class MarketGetMergedResponse: …` - `count: int` Total number of objects irrespective of any pagination parameters. - `data: List[UserMergedMarket]` - `asset_info: AssetInfo` Asset identifiers with associated metadata - `asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `id: str` - `group: Literal["native", "token"]` - `"native"` - `"token"` - `group_key: str` - `classification: AssetClassification` The asset's classification metadata. Assets are classfied to provide context on their usage throughout the Neptune API (e.g. regular assets, neptune receipt tokens, LSTs, etc.) Each asset belongs to only a single classification type. This object contains metadata pertaining to the given classification. While some fields may be common among the distinct classifcations, each classification is distinct and subject to independent change. - `class Regular: …` - `kind: Literal["regular"]` - `"regular"` - `neptune_receipt_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class NeptuneReceiptToken: …` - `kind: Literal["neptune_receipt_token"]` - `"neptune_receipt_token"` - `origin_asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class LiquidStakingToken: …` - `kind: Literal["liquid_staking_token"]` - `"liquid_staking_token"` - `origin_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: int` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: int` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: str` Full name of the asset - `symbol: str` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: str` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `borrow_collateral: List[UserCollateralAccountPool]` User collateral contribution for asset in borrow market, listed by subaccount - `amount: str` Amount of this asset which is actively collateralized - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `index: int` Account index - `borrow_debt: List[UserDebtAccountPool]` User debt contribution for asset in borrow market, listed by subaccount - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `principal: str` - `shares: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: str` Text representation of price - `principal: str` - `shares: str` - `price: str` Price used in value calculations - `principal: str` - `shares: str` - `index: int` Account index - `principal: str` Initial amount borrowed (of debts which have not yet been repaid) - `shares: str` - `lend: Optional[Lend]` User contribution for asset's lending market, if one exists - `origin_equivalent: UserLendOriginAmounts` The lending amounts converted into the equivalent for the receipt token's origin/source asset - `collateralized: str` Total equivalent amount of origin token collateralized across this user's borrowing portfolio **NOTE:** This is **not** the amount of the origin asset that the user holds, but the amount held in the receipt token rendered as the equivalent amount in the origin asset. Or, more formally: `origin_equivalent_collateralized = receipt_collateralized / receipt_redemption_ratio` - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `collateralized: str` - `held: str` - `total: str` - `held: str` Total equivalent amount of origin token held in address balance **NOTE:** This is **not** the amount of the origin asset that the user holds, but the amount held in the receipt token rendered as the equivalent amount in the origin asset. Or, more formally: `origin_equivalent_held = receipt_held / receipt_redemption_ratio` - `total: str` Total of held and collateralized equivalent for origin asset Or, more formally: `origin_equivalent_total = receipt_lent_total / receipt_redemption_ratio` - `receipt_amounts: UserLendReceiptAmounts` The lending amounts in the original receipt token amounts - `collateralized: str` Total amount of receipt token collateralized across this user's borrowing portfolio - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `collateralized: str` - `held: str` - `total: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `collateralized: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `collateralized: str` - `held: str` - `price: str` Text representation of price - `total: str` - `held: str` - `price: str` Price used in value calculations - `total: str` - `held: str` Total amount of receipt token held in address balance - `total: str` Sum of receipt amount held and receipt amount collateralized - `error: None` Error data. Guaranteed `null` for successful response. - `status: int` HTTP status. Successful responses are guaranteed to be < `400`. Conversely, error responses are guaranteed to be >= `400`. - `status_text: str` HTTP status text ### Example ```python from neptune_api_v2 import NeptuneAPIV2 client = NeptuneAPIV2() response = client.user.market.get_merged( address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) print(response.count) ``` #### Response ```json { "data": [ { "asset_info": { "asset": { "id": "native;inj", "group": "native", "group_key": "inj" }, "metadata": { "name": "Injective", "symbol": "INJ", "symbol_denom": "inj", "decimals_denom": 18, "decimals_display": 4 }, "classification": { "kind": "regular", "neptune_receipt_asset": { "id": "token;inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f", "group": "token", "group_key": "inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f" } } }, "lend": { "receipt_amounts": { "held": "118147367218417456837", "collateralized": "140264620447028478901", "total": "258411987665445935738", "extra": { "text": { "total": "258.4119 nINJ", "held": "118.1473 nINJ", "collateralized": "140.2646 nINJ" }, "value": { "held": "380.958434916458275153", "collateralized": "452.274067020608845929", "price": "3.224434398205298254", "total": "833.232501937067121083", "extra": { "text": { "price": "$3.22", "collateralized": "$452.27", "held": "$380.95", "total": "$833.23" } } } } }, "origin_equivalent": { "held": "126715646832648060567", "collateralized": "150436886797680767926", "total": "277152533630328828494", "extra": { "text": { "total": "277.1525 INJ", "collateralized": "150.4368 INJ", "held": "126.7156 INJ" } } } }, "borrow_collateral": [ { "index": 0, "amount": "149436500580266304744", "extra": { "text": { "amount": "149.4365 INJ" }, "value": { "price": "2.99835", "amount": "448.062931514841474829", "extra": { "text": { "amount": "$448.06", "price": "$2.99" } } } } } ], "borrow_debt": [ { "index": 0, "principal": "911081148730079455959", "shares": "911081148730079455959", "extra": { "text": { "principal": "911.0811 INJ", "shares": "911.0811 INJ" }, "value": { "shares": "2731.740162294833736774", "price": "2.99835", "principal": "2731.740162294833736774", "extra": { "text": { "shares": "$2,731.74", "price": "$2.99", "principal": "$2,731.74" } } } } } ] } ], "count": 1, "error": null, "status": 200, "status_text": "200 OK" } ``` ## Get user's markets (lend + borrow debt/collateral) for a specific asset `user.market.get_merged_by_asset(straddress, MarketGetMergedByAssetParams**kwargs) -> MarketGetMergedByAssetResponse` **get** `/api/v1/users/{address}/markets/merged/lookup` Get user's markets (lend + borrow debt/collateral) for a specific asset ### Parameters - `address: str` The user account address - `asset_id: str` Asset ID for lookup - `with_text: Optional[bool]` Include text variation fields - `with_value: Optional[bool]` Calculate and include USD values for amounts, where applicable ### Returns - `class MarketGetMergedByAssetResponse: …` - `data: UserMergedMarket` User market allocations grouped by asset. **Note**: because of the inverted structure of merged market accounts, account health cannot be represented and is excluded in the merged structures. - `asset_info: AssetInfo` Asset identifiers with associated metadata - `asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `id: str` - `group: Literal["native", "token"]` - `"native"` - `"token"` - `group_key: str` - `classification: AssetClassification` The asset's classification metadata. Assets are classfied to provide context on their usage throughout the Neptune API (e.g. regular assets, neptune receipt tokens, LSTs, etc.) Each asset belongs to only a single classification type. This object contains metadata pertaining to the given classification. While some fields may be common among the distinct classifcations, each classification is distinct and subject to independent change. - `class Regular: …` - `kind: Literal["regular"]` - `"regular"` - `neptune_receipt_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class NeptuneReceiptToken: …` - `kind: Literal["neptune_receipt_token"]` - `"neptune_receipt_token"` - `origin_asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class LiquidStakingToken: …` - `kind: Literal["liquid_staking_token"]` - `"liquid_staking_token"` - `origin_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: int` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: int` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: str` Full name of the asset - `symbol: str` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: str` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `borrow_collateral: List[UserCollateralAccountPool]` User collateral contribution for asset in borrow market, listed by subaccount - `amount: str` Amount of this asset which is actively collateralized - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `index: int` Account index - `borrow_debt: List[UserDebtAccountPool]` User debt contribution for asset in borrow market, listed by subaccount - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `principal: str` - `shares: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: str` Text representation of price - `principal: str` - `shares: str` - `price: str` Price used in value calculations - `principal: str` - `shares: str` - `index: int` Account index - `principal: str` Initial amount borrowed (of debts which have not yet been repaid) - `shares: str` - `lend: Optional[Lend]` User contribution for asset's lending market, if one exists - `origin_equivalent: UserLendOriginAmounts` The lending amounts converted into the equivalent for the receipt token's origin/source asset - `collateralized: str` Total equivalent amount of origin token collateralized across this user's borrowing portfolio **NOTE:** This is **not** the amount of the origin asset that the user holds, but the amount held in the receipt token rendered as the equivalent amount in the origin asset. Or, more formally: `origin_equivalent_collateralized = receipt_collateralized / receipt_redemption_ratio` - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `collateralized: str` - `held: str` - `total: str` - `held: str` Total equivalent amount of origin token held in address balance **NOTE:** This is **not** the amount of the origin asset that the user holds, but the amount held in the receipt token rendered as the equivalent amount in the origin asset. Or, more formally: `origin_equivalent_held = receipt_held / receipt_redemption_ratio` - `total: str` Total of held and collateralized equivalent for origin asset Or, more formally: `origin_equivalent_total = receipt_lent_total / receipt_redemption_ratio` - `receipt_amounts: UserLendReceiptAmounts` The lending amounts in the original receipt token amounts - `collateralized: str` Total amount of receipt token collateralized across this user's borrowing portfolio - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `collateralized: str` - `held: str` - `total: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `collateralized: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `collateralized: str` - `held: str` - `price: str` Text representation of price - `total: str` - `held: str` - `price: str` Price used in value calculations - `total: str` - `held: str` Total amount of receipt token held in address balance - `total: str` Sum of receipt amount held and receipt amount collateralized - `error: None` Error data. Guaranteed `null` for successful response. - `status: int` HTTP status. Successful responses are guaranteed to be < `400`. Conversely, error responses are guaranteed to be >= `400`. - `status_text: str` HTTP status text ### Example ```python from neptune_api_v2 import NeptuneAPIV2 client = NeptuneAPIV2() response = client.user.market.get_merged_by_asset( address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", asset_id="token;-K-//-//3-", ) print(response.data) ``` #### Response ```json { "data": { "asset_info": { "asset": { "id": "native;inj", "group": "native", "group_key": "inj" }, "metadata": { "name": "Injective", "symbol": "INJ", "symbol_denom": "inj", "decimals_denom": 18, "decimals_display": 4 }, "classification": { "kind": "regular", "neptune_receipt_asset": { "id": "token;inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f", "group": "token", "group_key": "inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f" } } }, "lend": { "receipt_amounts": { "held": "643195861442194223248", "collateralized": "730834802009981512361", "total": "1374030663452175735609", "extra": { "text": { "total": "1,374.0306 nINJ", "held": "643.1958 nINJ", "collateralized": "730.8348 nINJ" }, "value": { "held": "2073.942860417499929371", "collateralized": "2356.528875006543036615", "price": "3.224434398205298254", "total": "4430.471735424042965987", "extra": { "text": { "price": "$3.22", "collateralized": "$2,356.52", "held": "$2,073.94", "total": "$4,430.47" } } } } }, "origin_equivalent": { "held": "689841691284211618706", "collateralized": "783836380317316233638", "total": "1473678071601527852345", "extra": { "text": { "total": "1,473.6780 INJ", "collateralized": "783.8363 INJ", "held": "689.8416 INJ" } } } }, "borrow_collateral": [ { "index": 0, "amount": "745856805244361991671", "extra": { "text": { "amount": "745.8568 INJ" }, "value": { "price": "2.99835", "amount": "2236.339752004432777726", "extra": { "text": { "amount": "$2,236.33", "price": "$2.99" } } } } } ], "borrow_debt": [ { "index": 0, "principal": "64722195311136316616", "shares": "64722195311136316616", "extra": { "text": { "principal": "64.7221 INJ", "shares": "64.7221 INJ" }, "value": { "shares": "194.059794311145574925", "price": "2.99835", "principal": "194.059794311145574925", "extra": { "text": { "shares": "$194.05", "price": "$2.99", "principal": "$194.05" } } } } } ] }, "error": null, "status": 200, "status_text": "200 OK" } ``` ## Domain Types ### User Market - `class UserMarket: …` - `borrow: UserBorrowMarket` Overview of user borrowing portfolio - `accounts: List[UserBorrowMarketAccount]` Market sub-accounts for the user - `collaterals: List[UserCollateralAssetPool]` Account collateral allocations - `amount: str` Amount of this asset which is actively collateralized - `asset_info: AssetInfo` Asset identifiers with associated metadata - `asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `id: str` - `group: Literal["native", "token"]` - `"native"` - `"token"` - `group_key: str` - `classification: AssetClassification` The asset's classification metadata. Assets are classfied to provide context on their usage throughout the Neptune API (e.g. regular assets, neptune receipt tokens, LSTs, etc.) Each asset belongs to only a single classification type. This object contains metadata pertaining to the given classification. While some fields may be common among the distinct classifcations, each classification is distinct and subject to independent change. - `class Regular: …` - `kind: Literal["regular"]` - `"regular"` - `neptune_receipt_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class NeptuneReceiptToken: …` - `kind: Literal["neptune_receipt_token"]` - `"neptune_receipt_token"` - `origin_asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class LiquidStakingToken: …` - `kind: Literal["liquid_staking_token"]` - `"liquid_staking_token"` - `origin_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: int` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: int` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: str` Full name of the asset - `symbol: str` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: str` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `debts: List[UserDebtAssetPool]` Account debt allocations - `asset_info: AssetInfo` Asset identifiers with associated metadata - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `principal: str` - `shares: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: str` Text representation of price - `principal: str` - `shares: str` - `price: str` Price used in value calculations - `principal: str` - `shares: str` - `market_rate: MarketRate` Current market borrowing rate - `apr: str` Market rate in APR standard as a decimal percentage - `apy: str` Market rate in APY standard as a decimal percentage - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `apr: str` - `apy: str` - `principal: str` Initial amount borrowed (of debts which have not yet been repaid) - `shares: str` - `debts_net_rate: MarketRate` Account debt net rate - `health: Optional[UserAccountHealth]` Health data for this account - `base: str` Account health value, before any added health boosts - `boost: str` Account health boost to be applied - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `base: str` - `boost: str` - `result: str` - `result: str` Account health, with boost - `index: int` Account index - `totals: UserBorrowMarketPools` Collateral/debt totals of all sub-accounts by asset - `collaterals: List[UserCollateralAssetPool]` Account collateral allocations - `amount: str` Amount of this asset which is actively collateralized - `asset_info: AssetInfo` Asset identifiers with associated metadata - `extra: Extra` - `debts: List[UserDebtAssetPool]` Account debt allocations - `asset_info: AssetInfo` Asset identifiers with associated metadata - `extra: Extra` - `market_rate: MarketRate` Current market borrowing rate - `principal: str` Initial amount borrowed (of debts which have not yet been repaid) - `shares: str` - `debts_net_rate: MarketRate` Account debt net rate - `lend: UserLendMarket` Overview of user lending portfolio - `asset_pools: List[UserLendAssetPool]` User lending allocations - `asset_info: AssetInfo` Asset identifiers with associated metadata - `market_rate: MarketRate` Current market lending rate - `origin_equivalent: UserLendOriginAmounts` The lending amounts converted into the equivalent for the receipt token's origin/source asset - `collateralized: str` Total equivalent amount of origin token collateralized across this user's borrowing portfolio **NOTE:** This is **not** the amount of the origin asset that the user holds, but the amount held in the receipt token rendered as the equivalent amount in the origin asset. Or, more formally: `origin_equivalent_collateralized = receipt_collateralized / receipt_redemption_ratio` - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `collateralized: str` - `held: str` - `total: str` - `held: str` Total equivalent amount of origin token held in address balance **NOTE:** This is **not** the amount of the origin asset that the user holds, but the amount held in the receipt token rendered as the equivalent amount in the origin asset. Or, more formally: `origin_equivalent_held = receipt_held / receipt_redemption_ratio` - `total: str` Total of held and collateralized equivalent for origin asset Or, more formally: `origin_equivalent_total = receipt_lent_total / receipt_redemption_ratio` - `receipt_amounts: UserLendReceiptAmounts` The lending amounts in the original receipt token amounts - `collateralized: str` Total amount of receipt token collateralized across this user's borrowing portfolio - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `collateralized: str` - `held: str` - `total: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `collateralized: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `collateralized: str` - `held: str` - `price: str` Text representation of price - `total: str` - `held: str` - `price: str` Price used in value calculations - `total: str` - `held: str` Total amount of receipt token held in address balance - `total: str` Sum of receipt amount held and receipt amount collateralized - `net_rate: MarketRate` Account debt net rate ### User Merged Market - `class UserMergedMarket: …` User market allocations grouped by asset. **Note**: because of the inverted structure of merged market accounts, account health cannot be represented and is excluded in the merged structures. - `asset_info: AssetInfo` Asset identifiers with associated metadata - `asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `id: str` - `group: Literal["native", "token"]` - `"native"` - `"token"` - `group_key: str` - `classification: AssetClassification` The asset's classification metadata. Assets are classfied to provide context on their usage throughout the Neptune API (e.g. regular assets, neptune receipt tokens, LSTs, etc.) Each asset belongs to only a single classification type. This object contains metadata pertaining to the given classification. While some fields may be common among the distinct classifcations, each classification is distinct and subject to independent change. - `class Regular: …` - `kind: Literal["regular"]` - `"regular"` - `neptune_receipt_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class NeptuneReceiptToken: …` - `kind: Literal["neptune_receipt_token"]` - `"neptune_receipt_token"` - `origin_asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class LiquidStakingToken: …` - `kind: Literal["liquid_staking_token"]` - `"liquid_staking_token"` - `origin_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: int` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: int` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: str` Full name of the asset - `symbol: str` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: str` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `borrow_collateral: List[UserCollateralAccountPool]` User collateral contribution for asset in borrow market, listed by subaccount - `amount: str` Amount of this asset which is actively collateralized - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `index: int` Account index - `borrow_debt: List[UserDebtAccountPool]` User debt contribution for asset in borrow market, listed by subaccount - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `principal: str` - `shares: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: str` Text representation of price - `principal: str` - `shares: str` - `price: str` Price used in value calculations - `principal: str` - `shares: str` - `index: int` Account index - `principal: str` Initial amount borrowed (of debts which have not yet been repaid) - `shares: str` - `lend: Optional[Lend]` User contribution for asset's lending market, if one exists - `origin_equivalent: UserLendOriginAmounts` The lending amounts converted into the equivalent for the receipt token's origin/source asset - `collateralized: str` Total equivalent amount of origin token collateralized across this user's borrowing portfolio **NOTE:** This is **not** the amount of the origin asset that the user holds, but the amount held in the receipt token rendered as the equivalent amount in the origin asset. Or, more formally: `origin_equivalent_collateralized = receipt_collateralized / receipt_redemption_ratio` - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `collateralized: str` - `held: str` - `total: str` - `held: str` Total equivalent amount of origin token held in address balance **NOTE:** This is **not** the amount of the origin asset that the user holds, but the amount held in the receipt token rendered as the equivalent amount in the origin asset. Or, more formally: `origin_equivalent_held = receipt_held / receipt_redemption_ratio` - `total: str` Total of held and collateralized equivalent for origin asset Or, more formally: `origin_equivalent_total = receipt_lent_total / receipt_redemption_ratio` - `receipt_amounts: UserLendReceiptAmounts` The lending amounts in the original receipt token amounts - `collateralized: str` Total amount of receipt token collateralized across this user's borrowing portfolio - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `collateralized: str` - `held: str` - `total: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `collateralized: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `collateralized: str` - `held: str` - `price: str` Text representation of price - `total: str` - `held: str` - `price: str` Price used in value calculations - `total: str` - `held: str` Total amount of receipt token held in address balance - `total: str` Sum of receipt amount held and receipt amount collateralized # Lend ## Get user lending portfolio `user.market.lend.list(straddress, LendListParams**kwargs) -> LendListResponse` **get** `/api/v1/users/{address}/markets/lend` Get user lending portfolio ### Parameters - `address: str` The user account address - `with_text: Optional[bool]` Include text variation fields - `with_value: Optional[bool]` Calculate and include USD values for amounts, where applicable ### Returns - `class LendListResponse: …` - `data: UserLendMarket` - `asset_pools: List[UserLendAssetPool]` User lending allocations - `asset_info: AssetInfo` Asset identifiers with associated metadata - `asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `id: str` - `group: Literal["native", "token"]` - `"native"` - `"token"` - `group_key: str` - `classification: AssetClassification` The asset's classification metadata. Assets are classfied to provide context on their usage throughout the Neptune API (e.g. regular assets, neptune receipt tokens, LSTs, etc.) Each asset belongs to only a single classification type. This object contains metadata pertaining to the given classification. While some fields may be common among the distinct classifcations, each classification is distinct and subject to independent change. - `class Regular: …` - `kind: Literal["regular"]` - `"regular"` - `neptune_receipt_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class NeptuneReceiptToken: …` - `kind: Literal["neptune_receipt_token"]` - `"neptune_receipt_token"` - `origin_asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class LiquidStakingToken: …` - `kind: Literal["liquid_staking_token"]` - `"liquid_staking_token"` - `origin_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: int` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: int` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: str` Full name of the asset - `symbol: str` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: str` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `market_rate: MarketRate` Current market lending rate - `apr: str` Market rate in APR standard as a decimal percentage - `apy: str` Market rate in APY standard as a decimal percentage - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `apr: str` - `apy: str` - `origin_equivalent: UserLendOriginAmounts` The lending amounts converted into the equivalent for the receipt token's origin/source asset - `collateralized: str` Total equivalent amount of origin token collateralized across this user's borrowing portfolio **NOTE:** This is **not** the amount of the origin asset that the user holds, but the amount held in the receipt token rendered as the equivalent amount in the origin asset. Or, more formally: `origin_equivalent_collateralized = receipt_collateralized / receipt_redemption_ratio` - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `collateralized: str` - `held: str` - `total: str` - `held: str` Total equivalent amount of origin token held in address balance **NOTE:** This is **not** the amount of the origin asset that the user holds, but the amount held in the receipt token rendered as the equivalent amount in the origin asset. Or, more formally: `origin_equivalent_held = receipt_held / receipt_redemption_ratio` - `total: str` Total of held and collateralized equivalent for origin asset Or, more formally: `origin_equivalent_total = receipt_lent_total / receipt_redemption_ratio` - `receipt_amounts: UserLendReceiptAmounts` The lending amounts in the original receipt token amounts - `collateralized: str` Total amount of receipt token collateralized across this user's borrowing portfolio - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `collateralized: str` - `held: str` - `total: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `collateralized: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `collateralized: str` - `held: str` - `price: str` Text representation of price - `total: str` - `held: str` - `price: str` Price used in value calculations - `total: str` - `held: str` Total amount of receipt token held in address balance - `total: str` Sum of receipt amount held and receipt amount collateralized - `net_rate: MarketRate` Account debt net rate - `error: None` Error data. Guaranteed `null` for successful response. - `status: int` HTTP status. Successful responses are guaranteed to be < `400`. Conversely, error responses are guaranteed to be >= `400`. - `status_text: str` HTTP status text ### Example ```python from neptune_api_v2 import NeptuneAPIV2 client = NeptuneAPIV2() lends = client.user.market.lend.list( address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) print(lends.data) ``` #### Response ```json { "data": { "asset_pools": [ { "asset_info": { "asset": { "id": "native;inj", "group": "native", "group_key": "inj" }, "metadata": { "name": "Injective", "symbol": "INJ", "symbol_denom": "inj", "decimals_denom": 18, "decimals_display": 4 }, "classification": { "kind": "regular", "neptune_receipt_asset": { "id": "token;inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f", "group": "token", "group_key": "inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f" } } }, "market_rate": { "apr": "0.1039153", "apy": "0.1095065", "extra": { "text": { "apy": "10.95%", "apr": "10.39%" } } }, "receipt_amounts": { "held": "513780364745337161485", "collateralized": "803480027354503729108", "total": "1317260392099840890593", "extra": { "text": { "total": "1,317.2603 nINJ", "held": "513.7803 nINJ", "collateralized": "803.4800 nINJ" }, "value": { "held": "1656.651081207329865421", "collateralized": "2590.768638472795811094", "price": "3.224434398205298254", "total": "4247.419719680125676516", "extra": { "text": { "price": "$3.22", "collateralized": "$2,590.76", "held": "$1,656.65", "total": "$4,247.41" } } } } }, "origin_equivalent": { "held": "551040728044852101826", "collateralized": "861749980387785183392", "total": "1412790708432637285219", "extra": { "text": { "total": "1,412.7907 INJ", "collateralized": "861.7499 INJ", "held": "551.0407 INJ" } } } } ], "net_rate": { "apr": "0.103915299999999999", "apy": "0.109506499999999999", "extra": { "text": { "apy": "10.95%", "apr": "10.39%" } } } }, "error": null, "status": 200, "status_text": "200 OK" } ``` ## Lookup user lending distribution by asset `user.market.lend.get_by_asset(straddress, LendGetByAssetParams**kwargs) -> LendGetByAssetResponse` **get** `/api/v1/users/{address}/markets/lend/lookup` Lookup user lending distribution by asset ### Parameters - `address: str` The user account address - `asset_id: str` Asset ID for lookup - `with_text: Optional[bool]` Include text variation fields - `with_value: Optional[bool]` Calculate and include USD values for amounts, where applicable ### Returns - `class LendGetByAssetResponse: …` - `data: UserLendAssetPool` - `asset_info: AssetInfo` Asset identifiers with associated metadata - `asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `id: str` - `group: Literal["native", "token"]` - `"native"` - `"token"` - `group_key: str` - `classification: AssetClassification` The asset's classification metadata. Assets are classfied to provide context on their usage throughout the Neptune API (e.g. regular assets, neptune receipt tokens, LSTs, etc.) Each asset belongs to only a single classification type. This object contains metadata pertaining to the given classification. While some fields may be common among the distinct classifcations, each classification is distinct and subject to independent change. - `class Regular: …` - `kind: Literal["regular"]` - `"regular"` - `neptune_receipt_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class NeptuneReceiptToken: …` - `kind: Literal["neptune_receipt_token"]` - `"neptune_receipt_token"` - `origin_asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class LiquidStakingToken: …` - `kind: Literal["liquid_staking_token"]` - `"liquid_staking_token"` - `origin_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: int` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: int` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: str` Full name of the asset - `symbol: str` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: str` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `market_rate: MarketRate` Current market lending rate - `apr: str` Market rate in APR standard as a decimal percentage - `apy: str` Market rate in APY standard as a decimal percentage - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `apr: str` - `apy: str` - `origin_equivalent: UserLendOriginAmounts` The lending amounts converted into the equivalent for the receipt token's origin/source asset - `collateralized: str` Total equivalent amount of origin token collateralized across this user's borrowing portfolio **NOTE:** This is **not** the amount of the origin asset that the user holds, but the amount held in the receipt token rendered as the equivalent amount in the origin asset. Or, more formally: `origin_equivalent_collateralized = receipt_collateralized / receipt_redemption_ratio` - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `collateralized: str` - `held: str` - `total: str` - `held: str` Total equivalent amount of origin token held in address balance **NOTE:** This is **not** the amount of the origin asset that the user holds, but the amount held in the receipt token rendered as the equivalent amount in the origin asset. Or, more formally: `origin_equivalent_held = receipt_held / receipt_redemption_ratio` - `total: str` Total of held and collateralized equivalent for origin asset Or, more formally: `origin_equivalent_total = receipt_lent_total / receipt_redemption_ratio` - `receipt_amounts: UserLendReceiptAmounts` The lending amounts in the original receipt token amounts - `collateralized: str` Total amount of receipt token collateralized across this user's borrowing portfolio - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `collateralized: str` - `held: str` - `total: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `collateralized: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `collateralized: str` - `held: str` - `price: str` Text representation of price - `total: str` - `held: str` - `price: str` Price used in value calculations - `total: str` - `held: str` Total amount of receipt token held in address balance - `total: str` Sum of receipt amount held and receipt amount collateralized - `error: None` Error data. Guaranteed `null` for successful response. - `status: int` HTTP status. Successful responses are guaranteed to be < `400`. Conversely, error responses are guaranteed to be >= `400`. - `status_text: str` HTTP status text ### Example ```python from neptune_api_v2 import NeptuneAPIV2 client = NeptuneAPIV2() response = client.user.market.lend.get_by_asset( address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", asset_id="token;-K-//-//3-", ) print(response.data) ``` #### Response ```json { "data": { "asset_info": { "asset": { "id": "native;inj", "group": "native", "group_key": "inj" }, "metadata": { "name": "Injective", "symbol": "INJ", "symbol_denom": "inj", "decimals_denom": 18, "decimals_display": 4 }, "classification": { "kind": "regular", "neptune_receipt_asset": { "id": "token;inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f", "group": "token", "group_key": "inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f" } } }, "market_rate": { "apr": "0.25122284", "apy": "0.28559653", "extra": { "text": { "apy": "28.55%", "apr": "25.12%" } } }, "receipt_amounts": { "held": "34390327811707579753", "collateralized": "905248963117284075569", "total": "939639290928991655322", "extra": { "text": { "total": "939.6392 nINJ", "held": "34.3903 nINJ", "collateralized": "905.2489 nINJ" }, "value": { "held": "110.889355961626261527", "collateralized": "2918.915895615050113165", "price": "3.224434398205298254", "total": "3029.805251576676374692", "extra": { "text": { "price": "$3.22", "collateralized": "$2,918.91", "held": "$110.88", "total": "$3,029.80" } } } } }, "origin_equivalent": { "held": "36884382073374002120", "collateralized": "970899399678786249629", "total": "1007783781752160251749", "extra": { "text": { "total": "1,007.7837 INJ", "collateralized": "970.8993 INJ", "held": "36.8843 INJ" } } } }, "error": null, "status": 200, "status_text": "200 OK" } ``` ## Domain Types ### User Lend Asset Pool - `class UserLendAssetPool: …` - `asset_info: AssetInfo` Asset identifiers with associated metadata - `asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `id: str` - `group: Literal["native", "token"]` - `"native"` - `"token"` - `group_key: str` - `classification: AssetClassification` The asset's classification metadata. Assets are classfied to provide context on their usage throughout the Neptune API (e.g. regular assets, neptune receipt tokens, LSTs, etc.) Each asset belongs to only a single classification type. This object contains metadata pertaining to the given classification. While some fields may be common among the distinct classifcations, each classification is distinct and subject to independent change. - `class Regular: …` - `kind: Literal["regular"]` - `"regular"` - `neptune_receipt_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class NeptuneReceiptToken: …` - `kind: Literal["neptune_receipt_token"]` - `"neptune_receipt_token"` - `origin_asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class LiquidStakingToken: …` - `kind: Literal["liquid_staking_token"]` - `"liquid_staking_token"` - `origin_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: int` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: int` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: str` Full name of the asset - `symbol: str` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: str` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `market_rate: MarketRate` Current market lending rate - `apr: str` Market rate in APR standard as a decimal percentage - `apy: str` Market rate in APY standard as a decimal percentage - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `apr: str` - `apy: str` - `origin_equivalent: UserLendOriginAmounts` The lending amounts converted into the equivalent for the receipt token's origin/source asset - `collateralized: str` Total equivalent amount of origin token collateralized across this user's borrowing portfolio **NOTE:** This is **not** the amount of the origin asset that the user holds, but the amount held in the receipt token rendered as the equivalent amount in the origin asset. Or, more formally: `origin_equivalent_collateralized = receipt_collateralized / receipt_redemption_ratio` - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `collateralized: str` - `held: str` - `total: str` - `held: str` Total equivalent amount of origin token held in address balance **NOTE:** This is **not** the amount of the origin asset that the user holds, but the amount held in the receipt token rendered as the equivalent amount in the origin asset. Or, more formally: `origin_equivalent_held = receipt_held / receipt_redemption_ratio` - `total: str` Total of held and collateralized equivalent for origin asset Or, more formally: `origin_equivalent_total = receipt_lent_total / receipt_redemption_ratio` - `receipt_amounts: UserLendReceiptAmounts` The lending amounts in the original receipt token amounts - `collateralized: str` Total amount of receipt token collateralized across this user's borrowing portfolio - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `collateralized: str` - `held: str` - `total: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `collateralized: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `collateralized: str` - `held: str` - `price: str` Text representation of price - `total: str` - `held: str` - `price: str` Price used in value calculations - `total: str` - `held: str` Total amount of receipt token held in address balance - `total: str` Sum of receipt amount held and receipt amount collateralized ### User Lend Market - `class UserLendMarket: …` - `asset_pools: List[UserLendAssetPool]` User lending allocations - `asset_info: AssetInfo` Asset identifiers with associated metadata - `asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `id: str` - `group: Literal["native", "token"]` - `"native"` - `"token"` - `group_key: str` - `classification: AssetClassification` The asset's classification metadata. Assets are classfied to provide context on their usage throughout the Neptune API (e.g. regular assets, neptune receipt tokens, LSTs, etc.) Each asset belongs to only a single classification type. This object contains metadata pertaining to the given classification. While some fields may be common among the distinct classifcations, each classification is distinct and subject to independent change. - `class Regular: …` - `kind: Literal["regular"]` - `"regular"` - `neptune_receipt_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class NeptuneReceiptToken: …` - `kind: Literal["neptune_receipt_token"]` - `"neptune_receipt_token"` - `origin_asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class LiquidStakingToken: …` - `kind: Literal["liquid_staking_token"]` - `"liquid_staking_token"` - `origin_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: int` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: int` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: str` Full name of the asset - `symbol: str` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: str` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `market_rate: MarketRate` Current market lending rate - `apr: str` Market rate in APR standard as a decimal percentage - `apy: str` Market rate in APY standard as a decimal percentage - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `apr: str` - `apy: str` - `origin_equivalent: UserLendOriginAmounts` The lending amounts converted into the equivalent for the receipt token's origin/source asset - `collateralized: str` Total equivalent amount of origin token collateralized across this user's borrowing portfolio **NOTE:** This is **not** the amount of the origin asset that the user holds, but the amount held in the receipt token rendered as the equivalent amount in the origin asset. Or, more formally: `origin_equivalent_collateralized = receipt_collateralized / receipt_redemption_ratio` - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `collateralized: str` - `held: str` - `total: str` - `held: str` Total equivalent amount of origin token held in address balance **NOTE:** This is **not** the amount of the origin asset that the user holds, but the amount held in the receipt token rendered as the equivalent amount in the origin asset. Or, more formally: `origin_equivalent_held = receipt_held / receipt_redemption_ratio` - `total: str` Total of held and collateralized equivalent for origin asset Or, more formally: `origin_equivalent_total = receipt_lent_total / receipt_redemption_ratio` - `receipt_amounts: UserLendReceiptAmounts` The lending amounts in the original receipt token amounts - `collateralized: str` Total amount of receipt token collateralized across this user's borrowing portfolio - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `collateralized: str` - `held: str` - `total: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `collateralized: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `collateralized: str` - `held: str` - `price: str` Text representation of price - `total: str` - `held: str` - `price: str` Price used in value calculations - `total: str` - `held: str` Total amount of receipt token held in address balance - `total: str` Sum of receipt amount held and receipt amount collateralized - `net_rate: MarketRate` Account debt net rate ### User Lend Origin Amounts - `class UserLendOriginAmounts: …` - `collateralized: str` Total equivalent amount of origin token collateralized across this user's borrowing portfolio **NOTE:** This is **not** the amount of the origin asset that the user holds, but the amount held in the receipt token rendered as the equivalent amount in the origin asset. Or, more formally: `origin_equivalent_collateralized = receipt_collateralized / receipt_redemption_ratio` - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `collateralized: str` - `held: str` - `total: str` - `held: str` Total equivalent amount of origin token held in address balance **NOTE:** This is **not** the amount of the origin asset that the user holds, but the amount held in the receipt token rendered as the equivalent amount in the origin asset. Or, more formally: `origin_equivalent_held = receipt_held / receipt_redemption_ratio` - `total: str` Total of held and collateralized equivalent for origin asset Or, more formally: `origin_equivalent_total = receipt_lent_total / receipt_redemption_ratio` ### User Lend Receipt Amounts - `class UserLendReceiptAmounts: …` - `collateralized: str` Total amount of receipt token collateralized across this user's borrowing portfolio - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `collateralized: str` - `held: str` - `total: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `collateralized: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `collateralized: str` - `held: str` - `price: str` Text representation of price - `total: str` - `held: str` - `price: str` Price used in value calculations - `total: str` - `held: str` Total amount of receipt token held in address balance - `total: str` Sum of receipt amount held and receipt amount collateralized # Borrow ## Get user borrow portfolio `user.market.borrow.get_portfolio(straddress, BorrowGetPortfolioParams**kwargs) -> BorrowGetPortfolioResponse` **get** `/api/v1/users/{address}/markets/borrow` Get user borrow portfolio ### Parameters - `address: str` The user account address - `with_text: Optional[bool]` Include text variation fields - `with_value: Optional[bool]` Calculate and include USD values for amounts, where applicable ### Returns - `class BorrowGetPortfolioResponse: …` - `data: UserBorrowMarket` - `accounts: List[UserBorrowMarketAccount]` Market sub-accounts for the user - `collaterals: List[UserCollateralAssetPool]` Account collateral allocations - `amount: str` Amount of this asset which is actively collateralized - `asset_info: AssetInfo` Asset identifiers with associated metadata - `asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `id: str` - `group: Literal["native", "token"]` - `"native"` - `"token"` - `group_key: str` - `classification: AssetClassification` The asset's classification metadata. Assets are classfied to provide context on their usage throughout the Neptune API (e.g. regular assets, neptune receipt tokens, LSTs, etc.) Each asset belongs to only a single classification type. This object contains metadata pertaining to the given classification. While some fields may be common among the distinct classifcations, each classification is distinct and subject to independent change. - `class Regular: …` - `kind: Literal["regular"]` - `"regular"` - `neptune_receipt_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class NeptuneReceiptToken: …` - `kind: Literal["neptune_receipt_token"]` - `"neptune_receipt_token"` - `origin_asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class LiquidStakingToken: …` - `kind: Literal["liquid_staking_token"]` - `"liquid_staking_token"` - `origin_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: int` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: int` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: str` Full name of the asset - `symbol: str` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: str` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `debts: List[UserDebtAssetPool]` Account debt allocations - `asset_info: AssetInfo` Asset identifiers with associated metadata - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `principal: str` - `shares: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: str` Text representation of price - `principal: str` - `shares: str` - `price: str` Price used in value calculations - `principal: str` - `shares: str` - `market_rate: MarketRate` Current market borrowing rate - `apr: str` Market rate in APR standard as a decimal percentage - `apy: str` Market rate in APY standard as a decimal percentage - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `apr: str` - `apy: str` - `principal: str` Initial amount borrowed (of debts which have not yet been repaid) - `shares: str` - `debts_net_rate: MarketRate` Account debt net rate - `health: Optional[UserAccountHealth]` Health data for this account - `base: str` Account health value, before any added health boosts - `boost: str` Account health boost to be applied - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `base: str` - `boost: str` - `result: str` - `result: str` Account health, with boost - `index: int` Account index - `totals: UserBorrowMarketPools` Collateral/debt totals of all sub-accounts by asset - `collaterals: List[UserCollateralAssetPool]` Account collateral allocations - `amount: str` Amount of this asset which is actively collateralized - `asset_info: AssetInfo` Asset identifiers with associated metadata - `extra: Extra` - `debts: List[UserDebtAssetPool]` Account debt allocations - `asset_info: AssetInfo` Asset identifiers with associated metadata - `extra: Extra` - `market_rate: MarketRate` Current market borrowing rate - `principal: str` Initial amount borrowed (of debts which have not yet been repaid) - `shares: str` - `debts_net_rate: MarketRate` Account debt net rate - `error: None` Error data. Guaranteed `null` for successful response. - `status: int` HTTP status. Successful responses are guaranteed to be < `400`. Conversely, error responses are guaranteed to be >= `400`. - `status_text: str` HTTP status text ### Example ```python from neptune_api_v2 import NeptuneAPIV2 client = NeptuneAPIV2() response = client.user.market.borrow.get_portfolio( address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) print(response.data) ``` #### Response ```json { "data": { "accounts": [ { "index": 0, "collaterals": [ { "asset_info": { "asset": { "id": "native;inj", "group": "native", "group_key": "inj" }, "metadata": { "name": "Injective", "symbol": "INJ", "symbol_denom": "inj", "decimals_denom": 18, "decimals_display": 4 }, "classification": { "kind": "regular", "neptune_receipt_asset": { "id": "token;inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f", "group": "token", "group_key": "inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f" } } }, "amount": "627910952933646356261", "extra": { "text": { "amount": "627.9109 INJ" }, "value": { "price": "2.99835", "amount": "1882.696805728598552295", "extra": { "text": { "amount": "$1,882.69", "price": "$2.99" } } } } } ], "debts": [ { "asset_info": { "asset": { "id": "native;inj", "group": "native", "group_key": "inj" }, "metadata": { "name": "Injective", "symbol": "INJ", "symbol_denom": "inj", "decimals_denom": 18, "decimals_display": 4 }, "classification": { "kind": "regular", "neptune_receipt_asset": { "id": "token;inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f", "group": "token", "group_key": "inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f" } } }, "market_rate": { "apr": "0.1213749", "apy": "0.1290481", "extra": { "text": { "apy": "12.90%", "apr": "12.13%" } } }, "principal": "604443791936941909862", "shares": "604443791936941909862", "extra": { "text": { "principal": "604.4437 INJ", "shares": "604.4437 INJ" }, "value": { "shares": "1812.334043554129775434", "price": "2.99835", "principal": "1812.334043554129775434", "extra": { "text": { "shares": "$1,812.33", "price": "$2.99", "principal": "$1,812.33" } } } } } ], "debts_net_rate": { "apr": "0.121374899999999999", "apy": "0.129048099999999999", "extra": { "text": { "apy": "12.90%", "apr": "12.13%" } } }, "health": { "base": "6.31", "boost": "1.02", "result": "6.4362", "extra": { "text": { "base": "6.31", "boost": "2.00%", "result": "6.43" } } } } ], "totals": { "collaterals": [ { "asset_info": { "asset": { "id": "native;inj", "group": "native", "group_key": "inj" }, "metadata": { "name": "Injective", "symbol": "INJ", "symbol_denom": "inj", "decimals_denom": 18, "decimals_display": 4 }, "classification": { "kind": "regular", "neptune_receipt_asset": { "id": "token;inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f", "group": "token", "group_key": "inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f" } } }, "amount": "627910952933646356261", "extra": { "text": { "amount": "627.9109 INJ" }, "value": { "price": "2.99835", "amount": "1882.696805728598552295", "extra": { "text": { "amount": "$1,882.69", "price": "$2.99" } } } } } ], "debts": [ { "asset_info": { "asset": { "id": "native;inj", "group": "native", "group_key": "inj" }, "metadata": { "name": "Injective", "symbol": "INJ", "symbol_denom": "inj", "decimals_denom": 18, "decimals_display": 4 }, "classification": { "kind": "regular", "neptune_receipt_asset": { "id": "token;inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f", "group": "token", "group_key": "inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f" } } }, "market_rate": { "apr": "0.1213749", "apy": "0.1290481", "extra": { "text": { "apy": "12.90%", "apr": "12.13%" } } }, "principal": "604443791936941909862", "shares": "604443791936941909862", "extra": { "text": { "principal": "604.4437 INJ", "shares": "604.4437 INJ" }, "value": { "shares": "1812.334043554129775434", "price": "2.99835", "principal": "1812.334043554129775434", "extra": { "text": { "shares": "$1,812.33", "price": "$2.99", "principal": "$1,812.33" } } } } } ], "debts_net_rate": { "apr": "0.121374899999999999", "apy": "0.129048099999999999", "extra": { "text": { "apy": "12.90%", "apr": "12.13%" } } } } }, "error": null, "status": 200, "status_text": "200 OK" } ``` ## Lookup user borrow market collateral accounts by asset `user.market.borrow.get_collateral_accounts_by_asset(straddress, BorrowGetCollateralAccountsByAssetParams**kwargs) -> BorrowGetCollateralAccountsByAssetResponse` **get** `/api/v1/users/{address}/markets/borrow/lookup/collateral` Lookup user borrow market collateral accounts by asset ### Parameters - `address: str` The user account address - `asset_id: str` Asset ID for lookup - `with_text: Optional[bool]` Include text variation fields - `with_value: Optional[bool]` Calculate and include USD values for amounts, where applicable ### Returns - `class BorrowGetCollateralAccountsByAssetResponse: …` - `data: Data` - `accounts: List[UserCollateralAccountPool]` All collateral subaccounts for the associated asset type - `amount: str` Amount of this asset which is actively collateralized - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `index: int` Account index - `asset_info: AssetInfo` Asset identifiers with associated metadata - `asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `id: str` - `group: Literal["native", "token"]` - `"native"` - `"token"` - `group_key: str` - `classification: AssetClassification` The asset's classification metadata. Assets are classfied to provide context on their usage throughout the Neptune API (e.g. regular assets, neptune receipt tokens, LSTs, etc.) Each asset belongs to only a single classification type. This object contains metadata pertaining to the given classification. While some fields may be common among the distinct classifcations, each classification is distinct and subject to independent change. - `class Regular: …` - `kind: Literal["regular"]` - `"regular"` - `neptune_receipt_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class NeptuneReceiptToken: …` - `kind: Literal["neptune_receipt_token"]` - `"neptune_receipt_token"` - `origin_asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class LiquidStakingToken: …` - `kind: Literal["liquid_staking_token"]` - `"liquid_staking_token"` - `origin_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: int` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: int` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: str` Full name of the asset - `symbol: str` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: str` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `error: None` Error data. Guaranteed `null` for successful response. - `status: int` HTTP status. Successful responses are guaranteed to be < `400`. Conversely, error responses are guaranteed to be >= `400`. - `status_text: str` HTTP status text ### Example ```python from neptune_api_v2 import NeptuneAPIV2 client = NeptuneAPIV2() response = client.user.market.borrow.get_collateral_accounts_by_asset( address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", asset_id="token;-K-//-//3-", ) print(response.data) ``` #### Response ```json { "data": { "asset_info": { "asset": { "id": "native;inj", "group": "native", "group_key": "inj" }, "metadata": { "name": "Injective", "symbol": "INJ", "symbol_denom": "inj", "decimals_denom": 18, "decimals_display": 4 }, "classification": { "kind": "regular", "neptune_receipt_asset": { "id": "token;inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f", "group": "token", "group_key": "inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f" } } }, "accounts": [ { "index": 0, "amount": "74584754449782768185", "extra": { "text": { "amount": "74.5847 INJ" }, "value": { "price": "2.99835", "amount": "223.631198504506162987", "extra": { "text": { "amount": "$223.63", "price": "$2.99" } } } } } ] }, "error": null, "status": 200, "status_text": "200 OK" } ``` ## Lookup user borrow market debt accounts by asset `user.market.borrow.get_debt_accounts_by_asset(straddress, BorrowGetDebtAccountsByAssetParams**kwargs) -> BorrowGetDebtAccountsByAssetResponse` **get** `/api/v1/users/{address}/markets/borrow/lookup/debt` Lookup user borrow market debt accounts by asset ### Parameters - `address: str` The user account address - `asset_id: str` Asset ID for lookup - `with_text: Optional[bool]` Include text variation fields - `with_value: Optional[bool]` Calculate and include USD values for amounts, where applicable ### Returns - `class BorrowGetDebtAccountsByAssetResponse: …` - `data: Data` - `accounts: List[UserDebtAccountPool]` All debt subaccounts for the associated asset type - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `principal: str` - `shares: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: str` Text representation of price - `principal: str` - `shares: str` - `price: str` Price used in value calculations - `principal: str` - `shares: str` - `index: int` Account index - `principal: str` Initial amount borrowed (of debts which have not yet been repaid) - `shares: str` - `asset_info: AssetInfo` Asset identifiers with associated metadata - `asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `id: str` - `group: Literal["native", "token"]` - `"native"` - `"token"` - `group_key: str` - `classification: AssetClassification` The asset's classification metadata. Assets are classfied to provide context on their usage throughout the Neptune API (e.g. regular assets, neptune receipt tokens, LSTs, etc.) Each asset belongs to only a single classification type. This object contains metadata pertaining to the given classification. While some fields may be common among the distinct classifcations, each classification is distinct and subject to independent change. - `class Regular: …` - `kind: Literal["regular"]` - `"regular"` - `neptune_receipt_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class NeptuneReceiptToken: …` - `kind: Literal["neptune_receipt_token"]` - `"neptune_receipt_token"` - `origin_asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class LiquidStakingToken: …` - `kind: Literal["liquid_staking_token"]` - `"liquid_staking_token"` - `origin_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: int` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: int` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: str` Full name of the asset - `symbol: str` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: str` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `market_rate: MarketRate` Current market borrowing rate - `apr: str` Market rate in APR standard as a decimal percentage - `apy: str` Market rate in APY standard as a decimal percentage - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `apr: str` - `apy: str` - `error: None` Error data. Guaranteed `null` for successful response. - `status: int` HTTP status. Successful responses are guaranteed to be < `400`. Conversely, error responses are guaranteed to be >= `400`. - `status_text: str` HTTP status text ### Example ```python from neptune_api_v2 import NeptuneAPIV2 client = NeptuneAPIV2() response = client.user.market.borrow.get_debt_accounts_by_asset( address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", asset_id="token;-K-//-//3-", ) print(response.data) ``` #### Response ```json { "data": { "asset_info": { "asset": { "id": "native;inj", "group": "native", "group_key": "inj" }, "metadata": { "name": "Injective", "symbol": "INJ", "symbol_denom": "inj", "decimals_denom": 18, "decimals_display": 4 }, "classification": { "kind": "regular", "neptune_receipt_asset": { "id": "token;inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f", "group": "token", "group_key": "inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f" } } }, "market_rate": { "apr": "0.16015918", "apy": "0.17369769", "extra": { "text": { "apy": "17.36%", "apr": "16.01%" } } }, "accounts": [ { "index": 0, "principal": "388102166736239526944", "shares": "388102166736239526944", "extra": { "text": { "principal": "388.1021 INJ", "shares": "388.1021 INJ" }, "value": { "shares": "1163.666131633603785612", "price": "2.99835", "principal": "1163.666131633603785612", "extra": { "text": { "shares": "$1,163.66", "price": "$2.99", "principal": "$1,163.66" } } } } } ] }, "error": null, "status": 200, "status_text": "200 OK" } ``` ## Get user combined collaterals for all subaccounts `user.market.borrow.get_collateral_totals(straddress, BorrowGetCollateralTotalsParams**kwargs) -> BorrowGetCollateralTotalsResponse` **get** `/api/v1/users/{address}/markets/borrow/sum/collaterals` Get user combined collaterals for all subaccounts ### Parameters - `address: str` The user account address - `with_text: Optional[bool]` Include text variation fields - `with_value: Optional[bool]` Calculate and include USD values for amounts, where applicable ### Returns - `class BorrowGetCollateralTotalsResponse: …` - `count: int` Total number of objects irrespective of any pagination parameters. - `data: List[UserCollateralAssetPool]` - `amount: str` Amount of this asset which is actively collateralized - `asset_info: AssetInfo` Asset identifiers with associated metadata - `asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `id: str` - `group: Literal["native", "token"]` - `"native"` - `"token"` - `group_key: str` - `classification: AssetClassification` The asset's classification metadata. Assets are classfied to provide context on their usage throughout the Neptune API (e.g. regular assets, neptune receipt tokens, LSTs, etc.) Each asset belongs to only a single classification type. This object contains metadata pertaining to the given classification. While some fields may be common among the distinct classifcations, each classification is distinct and subject to independent change. - `class Regular: …` - `kind: Literal["regular"]` - `"regular"` - `neptune_receipt_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class NeptuneReceiptToken: …` - `kind: Literal["neptune_receipt_token"]` - `"neptune_receipt_token"` - `origin_asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class LiquidStakingToken: …` - `kind: Literal["liquid_staking_token"]` - `"liquid_staking_token"` - `origin_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: int` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: int` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: str` Full name of the asset - `symbol: str` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: str` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `error: None` Error data. Guaranteed `null` for successful response. - `status: int` HTTP status. Successful responses are guaranteed to be < `400`. Conversely, error responses are guaranteed to be >= `400`. - `status_text: str` HTTP status text ### Example ```python from neptune_api_v2 import NeptuneAPIV2 client = NeptuneAPIV2() response = client.user.market.borrow.get_collateral_totals( address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) print(response.count) ``` #### Response ```json { "data": [ { "asset_info": { "asset": { "id": "native;inj", "group": "native", "group_key": "inj" }, "metadata": { "name": "Injective", "symbol": "INJ", "symbol_denom": "inj", "decimals_denom": 18, "decimals_display": 4 }, "classification": { "kind": "regular", "neptune_receipt_asset": { "id": "token;inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f", "group": "token", "group_key": "inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f" } } }, "amount": "418777679229608382152", "extra": { "text": { "amount": "418.7776 INJ" }, "value": { "price": "2.99835", "amount": "1255.642054518096292625", "extra": { "text": { "amount": "$1,255.64", "price": "$2.99" } } } } } ], "count": 1, "error": null, "status": 200, "status_text": "200 OK" } ``` ## Get user combined debts for all subaccounts `user.market.borrow.get_debts_totals(straddress, BorrowGetDebtsTotalsParams**kwargs) -> BorrowGetDebtsTotalsResponse` **get** `/api/v1/users/{address}/markets/borrow/sum/debts` Get user combined debts for all subaccounts ### Parameters - `address: str` The user account address - `with_text: Optional[bool]` Include text variation fields - `with_value: Optional[bool]` Calculate and include USD values for amounts, where applicable ### Returns - `class BorrowGetDebtsTotalsResponse: …` - `count: int` Total number of objects irrespective of any pagination parameters. - `data: List[UserDebtAssetPool]` - `asset_info: AssetInfo` Asset identifiers with associated metadata - `asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `id: str` - `group: Literal["native", "token"]` - `"native"` - `"token"` - `group_key: str` - `classification: AssetClassification` The asset's classification metadata. Assets are classfied to provide context on their usage throughout the Neptune API (e.g. regular assets, neptune receipt tokens, LSTs, etc.) Each asset belongs to only a single classification type. This object contains metadata pertaining to the given classification. While some fields may be common among the distinct classifcations, each classification is distinct and subject to independent change. - `class Regular: …` - `kind: Literal["regular"]` - `"regular"` - `neptune_receipt_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class NeptuneReceiptToken: …` - `kind: Literal["neptune_receipt_token"]` - `"neptune_receipt_token"` - `origin_asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class LiquidStakingToken: …` - `kind: Literal["liquid_staking_token"]` - `"liquid_staking_token"` - `origin_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: int` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: int` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: str` Full name of the asset - `symbol: str` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: str` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `principal: str` - `shares: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: str` Text representation of price - `principal: str` - `shares: str` - `price: str` Price used in value calculations - `principal: str` - `shares: str` - `market_rate: MarketRate` Current market borrowing rate - `apr: str` Market rate in APR standard as a decimal percentage - `apy: str` Market rate in APY standard as a decimal percentage - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `apr: str` - `apy: str` - `principal: str` Initial amount borrowed (of debts which have not yet been repaid) - `shares: str` - `error: None` Error data. Guaranteed `null` for successful response. - `status: int` HTTP status. Successful responses are guaranteed to be < `400`. Conversely, error responses are guaranteed to be >= `400`. - `status_text: str` HTTP status text ### Example ```python from neptune_api_v2 import NeptuneAPIV2 client = NeptuneAPIV2() response = client.user.market.borrow.get_debts_totals( address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) print(response.count) ``` #### Response ```json { "data": [ { "asset_info": { "asset": { "id": "native;inj", "group": "native", "group_key": "inj" }, "metadata": { "name": "Injective", "symbol": "INJ", "symbol_denom": "inj", "decimals_denom": 18, "decimals_display": 4 }, "classification": { "kind": "regular", "neptune_receipt_asset": { "id": "token;inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f", "group": "token", "group_key": "inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f" } } }, "market_rate": { "apr": "0.27322188", "apy": "0.31419181", "extra": { "text": { "apy": "31.41%", "apr": "27.32%" } } }, "principal": "592069750990957913867", "shares": "592069750990957913867", "extra": { "text": { "principal": "592.0697 INJ", "shares": "592.0697 INJ" }, "value": { "shares": "1775.232337883738661043", "price": "2.99835", "principal": "1775.232337883738661043", "extra": { "text": { "shares": "$1,775.23", "price": "$2.99", "principal": "$1,775.23" } } } } } ], "count": 1, "error": null, "status": 200, "status_text": "200 OK" } ``` ## Domain Types ### User Borrow Market - `class UserBorrowMarket: …` - `accounts: List[UserBorrowMarketAccount]` Market sub-accounts for the user - `collaterals: List[UserCollateralAssetPool]` Account collateral allocations - `amount: str` Amount of this asset which is actively collateralized - `asset_info: AssetInfo` Asset identifiers with associated metadata - `asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `id: str` - `group: Literal["native", "token"]` - `"native"` - `"token"` - `group_key: str` - `classification: AssetClassification` The asset's classification metadata. Assets are classfied to provide context on their usage throughout the Neptune API (e.g. regular assets, neptune receipt tokens, LSTs, etc.) Each asset belongs to only a single classification type. This object contains metadata pertaining to the given classification. While some fields may be common among the distinct classifcations, each classification is distinct and subject to independent change. - `class Regular: …` - `kind: Literal["regular"]` - `"regular"` - `neptune_receipt_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class NeptuneReceiptToken: …` - `kind: Literal["neptune_receipt_token"]` - `"neptune_receipt_token"` - `origin_asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class LiquidStakingToken: …` - `kind: Literal["liquid_staking_token"]` - `"liquid_staking_token"` - `origin_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: int` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: int` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: str` Full name of the asset - `symbol: str` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: str` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `debts: List[UserDebtAssetPool]` Account debt allocations - `asset_info: AssetInfo` Asset identifiers with associated metadata - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `principal: str` - `shares: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: str` Text representation of price - `principal: str` - `shares: str` - `price: str` Price used in value calculations - `principal: str` - `shares: str` - `market_rate: MarketRate` Current market borrowing rate - `apr: str` Market rate in APR standard as a decimal percentage - `apy: str` Market rate in APY standard as a decimal percentage - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `apr: str` - `apy: str` - `principal: str` Initial amount borrowed (of debts which have not yet been repaid) - `shares: str` - `debts_net_rate: MarketRate` Account debt net rate - `health: Optional[UserAccountHealth]` Health data for this account - `base: str` Account health value, before any added health boosts - `boost: str` Account health boost to be applied - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `base: str` - `boost: str` - `result: str` - `result: str` Account health, with boost - `index: int` Account index - `totals: UserBorrowMarketPools` Collateral/debt totals of all sub-accounts by asset - `collaterals: List[UserCollateralAssetPool]` Account collateral allocations - `amount: str` Amount of this asset which is actively collateralized - `asset_info: AssetInfo` Asset identifiers with associated metadata - `extra: Extra` - `debts: List[UserDebtAssetPool]` Account debt allocations - `asset_info: AssetInfo` Asset identifiers with associated metadata - `extra: Extra` - `market_rate: MarketRate` Current market borrowing rate - `principal: str` Initial amount borrowed (of debts which have not yet been repaid) - `shares: str` - `debts_net_rate: MarketRate` Account debt net rate ### User Borrow Market Pools - `class UserBorrowMarketPools: …` - `collaterals: List[UserCollateralAssetPool]` Account collateral allocations - `amount: str` Amount of this asset which is actively collateralized - `asset_info: AssetInfo` Asset identifiers with associated metadata - `asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `id: str` - `group: Literal["native", "token"]` - `"native"` - `"token"` - `group_key: str` - `classification: AssetClassification` The asset's classification metadata. Assets are classfied to provide context on their usage throughout the Neptune API (e.g. regular assets, neptune receipt tokens, LSTs, etc.) Each asset belongs to only a single classification type. This object contains metadata pertaining to the given classification. While some fields may be common among the distinct classifcations, each classification is distinct and subject to independent change. - `class Regular: …` - `kind: Literal["regular"]` - `"regular"` - `neptune_receipt_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class NeptuneReceiptToken: …` - `kind: Literal["neptune_receipt_token"]` - `"neptune_receipt_token"` - `origin_asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class LiquidStakingToken: …` - `kind: Literal["liquid_staking_token"]` - `"liquid_staking_token"` - `origin_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: int` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: int` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: str` Full name of the asset - `symbol: str` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: str` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `debts: List[UserDebtAssetPool]` Account debt allocations - `asset_info: AssetInfo` Asset identifiers with associated metadata - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `principal: str` - `shares: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: str` Text representation of price - `principal: str` - `shares: str` - `price: str` Price used in value calculations - `principal: str` - `shares: str` - `market_rate: MarketRate` Current market borrowing rate - `apr: str` Market rate in APR standard as a decimal percentage - `apy: str` Market rate in APY standard as a decimal percentage - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `apr: str` - `apy: str` - `principal: str` Initial amount borrowed (of debts which have not yet been repaid) - `shares: str` - `debts_net_rate: MarketRate` Account debt net rate # Subaccount ## Get user borrow subaccount `user.market.borrow.subaccount.get_subaccount(intindex, SubaccountGetSubaccountParams**kwargs) -> SubaccountGetSubaccountResponse` **get** `/api/v1/users/{address}/markets/borrow/accounts/{index}` Get user borrow subaccount ### Parameters - `address: str` The user account address - `index: int` The user account index - `with_text: Optional[bool]` Include text variation fields - `with_value: Optional[bool]` Calculate and include USD values for amounts, where applicable ### Returns - `class SubaccountGetSubaccountResponse: …` - `data: UserBorrowMarketAccount` User borrowing subaccount - `collaterals: List[UserCollateralAssetPool]` Account collateral allocations - `amount: str` Amount of this asset which is actively collateralized - `asset_info: AssetInfo` Asset identifiers with associated metadata - `asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `id: str` - `group: Literal["native", "token"]` - `"native"` - `"token"` - `group_key: str` - `classification: AssetClassification` The asset's classification metadata. Assets are classfied to provide context on their usage throughout the Neptune API (e.g. regular assets, neptune receipt tokens, LSTs, etc.) Each asset belongs to only a single classification type. This object contains metadata pertaining to the given classification. While some fields may be common among the distinct classifcations, each classification is distinct and subject to independent change. - `class Regular: …` - `kind: Literal["regular"]` - `"regular"` - `neptune_receipt_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class NeptuneReceiptToken: …` - `kind: Literal["neptune_receipt_token"]` - `"neptune_receipt_token"` - `origin_asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class LiquidStakingToken: …` - `kind: Literal["liquid_staking_token"]` - `"liquid_staking_token"` - `origin_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: int` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: int` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: str` Full name of the asset - `symbol: str` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: str` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `debts: List[UserDebtAssetPool]` Account debt allocations - `asset_info: AssetInfo` Asset identifiers with associated metadata - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `principal: str` - `shares: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: str` Text representation of price - `principal: str` - `shares: str` - `price: str` Price used in value calculations - `principal: str` - `shares: str` - `market_rate: MarketRate` Current market borrowing rate - `apr: str` Market rate in APR standard as a decimal percentage - `apy: str` Market rate in APY standard as a decimal percentage - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `apr: str` - `apy: str` - `principal: str` Initial amount borrowed (of debts which have not yet been repaid) - `shares: str` - `debts_net_rate: MarketRate` Account debt net rate - `health: Optional[UserAccountHealth]` Health data for this account - `base: str` Account health value, before any added health boosts - `boost: str` Account health boost to be applied - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `base: str` - `boost: str` - `result: str` - `result: str` Account health, with boost - `index: int` Account index - `error: None` Error data. Guaranteed `null` for successful response. - `status: int` HTTP status. Successful responses are guaranteed to be < `400`. Conversely, error responses are guaranteed to be >= `400`. - `status_text: str` HTTP status text ### Example ```python from neptune_api_v2 import NeptuneAPIV2 client = NeptuneAPIV2() response = client.user.market.borrow.subaccount.get_subaccount( index=0, address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) print(response.data) ``` #### Response ```json { "data": { "index": 0, "collaterals": [ { "asset_info": { "asset": { "id": "native;inj", "group": "native", "group_key": "inj" }, "metadata": { "name": "Injective", "symbol": "INJ", "symbol_denom": "inj", "decimals_denom": 18, "decimals_display": 4 }, "classification": { "kind": "regular", "neptune_receipt_asset": { "id": "token;inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f", "group": "token", "group_key": "inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f" } } }, "amount": "437536487934389798965", "extra": { "text": { "amount": "437.5364 INJ" }, "value": { "price": "2.99835", "amount": "1311.887528598077653726", "extra": { "text": { "amount": "$1,311.88", "price": "$2.99" } } } } } ], "debts": [ { "asset_info": { "asset": { "id": "native;inj", "group": "native", "group_key": "inj" }, "metadata": { "name": "Injective", "symbol": "INJ", "symbol_denom": "inj", "decimals_denom": 18, "decimals_display": 4 }, "classification": { "kind": "regular", "neptune_receipt_asset": { "id": "token;inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f", "group": "token", "group_key": "inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f" } } }, "market_rate": { "apr": "0.10396566", "apy": "0.10956235", "extra": { "text": { "apy": "10.95%", "apr": "10.39%" } } }, "principal": "174187990348009513138", "shares": "174187990348009513138", "extra": { "text": { "principal": "174.1879 INJ", "shares": "174.1879 INJ" }, "value": { "shares": "522.276560859954323717", "price": "2.99835", "principal": "522.276560859954323717", "extra": { "text": { "shares": "$522.27", "price": "$2.99", "principal": "$522.27" } } } } } ], "debts_net_rate": { "apr": "0.103965659999999999", "apy": "0.109562349999999999", "extra": { "text": { "apy": "10.95%", "apr": "10.39%" } } }, "health": { "base": "2.54", "boost": "1", "result": "2.54", "extra": { "text": { "base": "2.54", "boost": "0.00%", "result": "2.54" } } } }, "error": null, "status": 200, "status_text": "200 OK" } ``` ## Get user borrow subaccount health `user.market.borrow.subaccount.get_subaccount_health(intindex, SubaccountGetSubaccountHealthParams**kwargs) -> SubaccountGetSubaccountHealthResponse` **get** `/api/v1/users/{address}/markets/borrow/accounts/{index}/health` Get user borrow subaccount health ### Parameters - `address: str` The user account address - `index: int` The user account index - `with_text: Optional[bool]` Include text variation fields ### Returns - `class SubaccountGetSubaccountHealthResponse: …` - `data: UserAccountHealth` - `base: str` Account health value, before any added health boosts - `boost: str` Account health boost to be applied - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `base: str` - `boost: str` - `result: str` - `result: str` Account health, with boost - `error: None` Error data. Guaranteed `null` for successful response. - `status: int` HTTP status. Successful responses are guaranteed to be < `400`. Conversely, error responses are guaranteed to be >= `400`. - `status_text: str` HTTP status text ### Example ```python from neptune_api_v2 import NeptuneAPIV2 client = NeptuneAPIV2() response = client.user.market.borrow.subaccount.get_subaccount_health( index=0, address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) print(response.data) ``` #### Response ```json { "data": { "base": "2.35", "boost": "1.01", "result": "2.3735", "extra": { "text": { "base": "2.35", "boost": "1.00%", "result": "2.37" } } }, "error": null, "status": 200, "status_text": "200 OK" } ``` ## Get user borrow subaccount collaterals `user.market.borrow.subaccount.get_subaccount_collaterals(intindex, SubaccountGetSubaccountCollateralsParams**kwargs) -> SubaccountGetSubaccountCollateralsResponse` **get** `/api/v1/users/{address}/markets/borrow/accounts/{index}/collaterals` Get user borrow subaccount collaterals ### Parameters - `address: str` The user account address - `index: int` The user account index - `with_text: Optional[bool]` Include text variation fields - `with_value: Optional[bool]` Calculate and include USD values for amounts, where applicable ### Returns - `class SubaccountGetSubaccountCollateralsResponse: …` - `count: int` Total number of objects irrespective of any pagination parameters. - `data: List[UserCollateralAssetPool]` - `amount: str` Amount of this asset which is actively collateralized - `asset_info: AssetInfo` Asset identifiers with associated metadata - `asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `id: str` - `group: Literal["native", "token"]` - `"native"` - `"token"` - `group_key: str` - `classification: AssetClassification` The asset's classification metadata. Assets are classfied to provide context on their usage throughout the Neptune API (e.g. regular assets, neptune receipt tokens, LSTs, etc.) Each asset belongs to only a single classification type. This object contains metadata pertaining to the given classification. While some fields may be common among the distinct classifcations, each classification is distinct and subject to independent change. - `class Regular: …` - `kind: Literal["regular"]` - `"regular"` - `neptune_receipt_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class NeptuneReceiptToken: …` - `kind: Literal["neptune_receipt_token"]` - `"neptune_receipt_token"` - `origin_asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class LiquidStakingToken: …` - `kind: Literal["liquid_staking_token"]` - `"liquid_staking_token"` - `origin_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: int` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: int` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: str` Full name of the asset - `symbol: str` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: str` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `error: None` Error data. Guaranteed `null` for successful response. - `status: int` HTTP status. Successful responses are guaranteed to be < `400`. Conversely, error responses are guaranteed to be >= `400`. - `status_text: str` HTTP status text ### Example ```python from neptune_api_v2 import NeptuneAPIV2 client = NeptuneAPIV2() response = client.user.market.borrow.subaccount.get_subaccount_collaterals( index=0, address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) print(response.count) ``` #### Response ```json { "data": [ { "asset_info": { "asset": { "id": "native;inj", "group": "native", "group_key": "inj" }, "metadata": { "name": "Injective", "symbol": "INJ", "symbol_denom": "inj", "decimals_denom": 18, "decimals_display": 4 }, "classification": { "kind": "regular", "neptune_receipt_asset": { "id": "token;inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f", "group": "token", "group_key": "inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f" } } }, "amount": "858801430232426819550", "extra": { "text": { "amount": "858.8014 INJ" }, "value": { "price": "2.99835", "amount": "2574.987268337396954397", "extra": { "text": { "amount": "$2,574.98", "price": "$2.99" } } } } } ], "count": 1, "error": null, "status": 200, "status_text": "200 OK" } ``` ## Get user borrow subaccount debts `user.market.borrow.subaccount.get_subaccount_debts(intindex, SubaccountGetSubaccountDebtsParams**kwargs) -> SubaccountGetSubaccountDebtsResponse` **get** `/api/v1/users/{address}/markets/borrow/accounts/{index}/debts` Get user borrow subaccount debts ### Parameters - `address: str` The user account address - `index: int` The user account index - `with_text: Optional[bool]` Include text variation fields - `with_value: Optional[bool]` Calculate and include USD values for amounts, where applicable ### Returns - `class SubaccountGetSubaccountDebtsResponse: …` - `count: int` Total number of objects irrespective of any pagination parameters. - `data: List[UserDebtAssetPool]` - `asset_info: AssetInfo` Asset identifiers with associated metadata - `asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `id: str` - `group: Literal["native", "token"]` - `"native"` - `"token"` - `group_key: str` - `classification: AssetClassification` The asset's classification metadata. Assets are classfied to provide context on their usage throughout the Neptune API (e.g. regular assets, neptune receipt tokens, LSTs, etc.) Each asset belongs to only a single classification type. This object contains metadata pertaining to the given classification. While some fields may be common among the distinct classifcations, each classification is distinct and subject to independent change. - `class Regular: …` - `kind: Literal["regular"]` - `"regular"` - `neptune_receipt_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class NeptuneReceiptToken: …` - `kind: Literal["neptune_receipt_token"]` - `"neptune_receipt_token"` - `origin_asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class LiquidStakingToken: …` - `kind: Literal["liquid_staking_token"]` - `"liquid_staking_token"` - `origin_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: int` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: int` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: str` Full name of the asset - `symbol: str` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: str` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `principal: str` - `shares: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: str` Text representation of price - `principal: str` - `shares: str` - `price: str` Price used in value calculations - `principal: str` - `shares: str` - `market_rate: MarketRate` Current market borrowing rate - `apr: str` Market rate in APR standard as a decimal percentage - `apy: str` Market rate in APY standard as a decimal percentage - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `apr: str` - `apy: str` - `principal: str` Initial amount borrowed (of debts which have not yet been repaid) - `shares: str` - `error: None` Error data. Guaranteed `null` for successful response. - `status: int` HTTP status. Successful responses are guaranteed to be < `400`. Conversely, error responses are guaranteed to be >= `400`. - `status_text: str` HTTP status text ### Example ```python from neptune_api_v2 import NeptuneAPIV2 client = NeptuneAPIV2() response = client.user.market.borrow.subaccount.get_subaccount_debts( index=0, address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) print(response.count) ``` #### Response ```json { "data": [ { "asset_info": { "asset": { "id": "native;inj", "group": "native", "group_key": "inj" }, "metadata": { "name": "Injective", "symbol": "INJ", "symbol_denom": "inj", "decimals_denom": 18, "decimals_display": 4 }, "classification": { "kind": "regular", "neptune_receipt_asset": { "id": "token;inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f", "group": "token", "group_key": "inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f" } } }, "market_rate": { "apr": "0.25736944", "apy": "0.29352292", "extra": { "text": { "apy": "29.35%", "apr": "25.73%" } } }, "principal": "304756114444346810003", "shares": "304756114444346810003", "extra": { "text": { "principal": "304.7561 INJ", "shares": "304.7561 INJ" }, "value": { "shares": "913.765495744207257772", "price": "2.99835", "principal": "913.765495744207257772", "extra": { "text": { "shares": "$913.76", "price": "$2.99", "principal": "$913.76" } } } } } ], "count": 1, "error": null, "status": 200, "status_text": "200 OK" } ``` ## Domain Types ### User Account Health - `class UserAccountHealth: …` - `base: str` Account health value, before any added health boosts - `boost: str` Account health boost to be applied - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `base: str` - `boost: str` - `result: str` - `result: str` Account health, with boost ### User Borrow Market Account - `class UserBorrowMarketAccount: …` User borrowing subaccount - `collaterals: List[UserCollateralAssetPool]` Account collateral allocations - `amount: str` Amount of this asset which is actively collateralized - `asset_info: AssetInfo` Asset identifiers with associated metadata - `asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `id: str` - `group: Literal["native", "token"]` - `"native"` - `"token"` - `group_key: str` - `classification: AssetClassification` The asset's classification metadata. Assets are classfied to provide context on their usage throughout the Neptune API (e.g. regular assets, neptune receipt tokens, LSTs, etc.) Each asset belongs to only a single classification type. This object contains metadata pertaining to the given classification. While some fields may be common among the distinct classifcations, each classification is distinct and subject to independent change. - `class Regular: …` - `kind: Literal["regular"]` - `"regular"` - `neptune_receipt_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class NeptuneReceiptToken: …` - `kind: Literal["neptune_receipt_token"]` - `"neptune_receipt_token"` - `origin_asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class LiquidStakingToken: …` - `kind: Literal["liquid_staking_token"]` - `"liquid_staking_token"` - `origin_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: int` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: int` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: str` Full name of the asset - `symbol: str` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: str` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `debts: List[UserDebtAssetPool]` Account debt allocations - `asset_info: AssetInfo` Asset identifiers with associated metadata - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `principal: str` - `shares: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: str` Text representation of price - `principal: str` - `shares: str` - `price: str` Price used in value calculations - `principal: str` - `shares: str` - `market_rate: MarketRate` Current market borrowing rate - `apr: str` Market rate in APR standard as a decimal percentage - `apy: str` Market rate in APY standard as a decimal percentage - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `apr: str` - `apy: str` - `principal: str` Initial amount borrowed (of debts which have not yet been repaid) - `shares: str` - `debts_net_rate: MarketRate` Account debt net rate - `health: Optional[UserAccountHealth]` Health data for this account - `base: str` Account health value, before any added health boosts - `boost: str` Account health boost to be applied - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `base: str` - `boost: str` - `result: str` - `result: str` Account health, with boost - `index: int` Account index ### User Collateral Account Pool - `class UserCollateralAccountPool: …` Associates a subaccount's index with it's inner allocations for a given asset. This type is identical to `UserCollateralAssetPool`, except the asset association is interchanged for an account index. Typically used in contexts where multiple subaccounts with a shared underlying asset are batched together. - `amount: str` Amount of this asset which is actively collateralized - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `index: int` Account index ### User Collateral Asset Pool - `class UserCollateralAssetPool: …` - `amount: str` Amount of this asset which is actively collateralized - `asset_info: AssetInfo` Asset identifiers with associated metadata - `asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `id: str` - `group: Literal["native", "token"]` - `"native"` - `"token"` - `group_key: str` - `classification: AssetClassification` The asset's classification metadata. Assets are classfied to provide context on their usage throughout the Neptune API (e.g. regular assets, neptune receipt tokens, LSTs, etc.) Each asset belongs to only a single classification type. This object contains metadata pertaining to the given classification. While some fields may be common among the distinct classifcations, each classification is distinct and subject to independent change. - `class Regular: …` - `kind: Literal["regular"]` - `"regular"` - `neptune_receipt_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class NeptuneReceiptToken: …` - `kind: Literal["neptune_receipt_token"]` - `"neptune_receipt_token"` - `origin_asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class LiquidStakingToken: …` - `kind: Literal["liquid_staking_token"]` - `"liquid_staking_token"` - `origin_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: int` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: int` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: str` Full name of the asset - `symbol: str` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: str` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: str` - `price: str` Text representation of price - `price: str` Price used in value calculations ### User Debt Account Pool - `class UserDebtAccountPool: …` Associates a subaccount's index with it's inner allocations for a given asset. This type is identical to `UserDebtAssetPool`, except the asset association is interchanged for an account index. Typically used in contexts where multiple subaccounts with a shared underlying asset are batched together. - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `principal: str` - `shares: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: str` Text representation of price - `principal: str` - `shares: str` - `price: str` Price used in value calculations - `principal: str` - `shares: str` - `index: int` Account index - `principal: str` Initial amount borrowed (of debts which have not yet been repaid) - `shares: str` ### User Debt Asset Pool - `class UserDebtAssetPool: …` - `asset_info: AssetInfo` Asset identifiers with associated metadata - `asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `id: str` - `group: Literal["native", "token"]` - `"native"` - `"token"` - `group_key: str` - `classification: AssetClassification` The asset's classification metadata. Assets are classfied to provide context on their usage throughout the Neptune API (e.g. regular assets, neptune receipt tokens, LSTs, etc.) Each asset belongs to only a single classification type. This object contains metadata pertaining to the given classification. While some fields may be common among the distinct classifcations, each classification is distinct and subject to independent change. - `class Regular: …` - `kind: Literal["regular"]` - `"regular"` - `neptune_receipt_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class NeptuneReceiptToken: …` - `kind: Literal["neptune_receipt_token"]` - `"neptune_receipt_token"` - `origin_asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class LiquidStakingToken: …` - `kind: Literal["liquid_staking_token"]` - `"liquid_staking_token"` - `origin_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: int` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: int` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: str` Full name of the asset - `symbol: str` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: str` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `principal: str` - `shares: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: str` Text representation of price - `principal: str` - `shares: str` - `price: str` Price used in value calculations - `principal: str` - `shares: str` - `market_rate: MarketRate` Current market borrowing rate - `apr: str` Market rate in APR standard as a decimal percentage - `apy: str` Market rate in APY standard as a decimal percentage - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `apr: str` - `apy: str` - `principal: str` Initial amount borrowed (of debts which have not yet been repaid) - `shares: str` # Nept ## Get user NEPT unlocks `user.nept.get_unlocks(straddress, NeptGetUnlocksParams**kwargs) -> NeptGetUnlocksResponse` **get** `/api/v1/users/{address}/nept/unlocks` Get user NEPT unlocks ### Parameters - `address: str` The user account address - `with_percent: Optional[bool]` Calculate and include proportional percentages, where applicable - `with_text: Optional[bool]` Include text variation fields - `with_value: Optional[bool]` Calculate and include USD values for amounts, where applicable ### Returns - `class NeptGetUnlocksResponse: …` - `data: UserUnlockOverview` - `arrangements: List[Arrangement]` A list of the user's active unlock arrangements - `admin: Optional[ArrangementAdmin]` The admin of the unlock, if any - `address: str` The address of the unlock arrangement's admin - `issued_reclaim: bool` True if the admin his issued a reclaim on the unlock arrangement - `amounts: UserUnlockAmounts` Primary unlock amount and other pre-calculated/derived amounts - `amount: str` The full unlock amount This value is immutable and does not change with regards to expiry/reclamation/lock states. - `claimable: str` The amount currently claimable This takes into account: reclamation, lock state, expiry, and previously claimed. In other words, this is an accurate representation of what the user can currently claim. - `claimed: str` The amount that has already been successfully claimed by the user. - `expired: str` The amount that was claimable but has now expired due to the presence and subsequent passing of `expires_at` - `extra: Extra` - `percent: Optional[ExtraPercent]` Percentages for unlock amounts. These do not factor in the `amount_staked` or `amount_held` values. Will not be null when query param `with_percent` is `true`. - `claimable: str` - `claimed: str` - `expired: str` - `extra: ExtraPercentExtra` - `text: Optional[ExtraPercentExtraText]` Human-readable variants of percentages for unlock amounts. Will not be null when query params `with_text` and `with_percent` are `true`. - `claimable: str` - `claimed: str` - `expired: str` - `locked: str` - `reclaimed: str` - `locked: str` - `reclaimed: str` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: str` - `claimable: str` - `claimed: str` - `expired: str` - `locked: str` - `reclaimed: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount: str` - `claimable: str` - `claimed: str` - `expired: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: str` - `claimable: str` - `claimed: str` - `expired: str` - `locked: str` - `price: str` Text representation of price - `reclaimed: str` - `locked: str` - `price: str` Price used in value calculations - `reclaimed: str` - `locked: str` The total amount of NEPT currently awaiting unlock **NOTE:** any reclaimed unlocks are excluded from the total, regardless of how much the user had claimed prior to reclamation. - `reclaimed: str` The amount that has been reclaimed from the unlock arrangement admin - `begins_at: datetime` The time at which the unlock begins - `expires_at: Optional[datetime]` The time at which the unlock expires, if any - `extra: ArrangementExtra` - `text: Optional[ArrangementExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `begins_at: str` - `expires_at: str` - `last_claimed_at: str` - `last_claimed_at: Optional[datetime]` The time at which the unlock was last claimed, if any - `schedule: UserUnlockSchedule` The schedule of the unlock - `class UserUnlockScheduleLinear: …` - `duration: int` The duration of the unlock in seconds - `ends_at: datetime` The time at which the unlock has/was/would've completed. This is identical to `begins_at + duration`. This timestamp will remain valid even if the unlock has been reclaimed. Therefore, it should not be used as a validity check. - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `duration: str` - `ends_at: str` - `kind: Literal["linear"]` - `"linear"` - `class UserUnlockScheduleLumpSum: …` - `kind: Literal["lump_sum"]` - `"lump_sum"` - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `last_claimed_at: str` - `last_claimed_at: Optional[datetime]` The time at which the most recent unlock claim occurred, if any - `totals: UserUnlockAmounts` Contains pre-calculated total amounts for all unlock agreements - `error: None` Error data. Guaranteed `null` for successful response. - `status: int` HTTP status. Successful responses are guaranteed to be < `400`. Conversely, error responses are guaranteed to be >= `400`. - `status_text: str` HTTP status text ### Example ```python from neptune_api_v2 import NeptuneAPIV2 client = NeptuneAPIV2() response = client.user.nept.get_unlocks( address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) print(response.data) ``` #### Response ```json { "data": { "arrangements": [ { "begins_at": "2026-07-22T08:40:54Z", "schedule": { "kind": "linear", "duration": 1692380, "ends_at": "2026-08-10T22:47:14Z", "extra": { "text": { "ends_at": "2026-08-10 10:47:14 PM +00:00", "duration": "19 days" } } }, "last_claimed_at": null, "expires_at": "2027-07-20T13:44:39Z", "admin": { "address": "inj1loremipsumdolorsitametconsecteturadipi", "issued_reclaim": false }, "extra": { "text": { "begins_at": "2026-07-22 08:40:54 AM +00:00", "last_claimed_at": "N/A", "expires_at": "2027-07-20 01:44:39 PM +00:00" } }, "amounts": { "amount": "539033513", "claimed": "0", "claimable": "0", "locked": "539033513", "expired": "0", "reclaimed": "0", "extra": { "text": { "claimable": "0.0000 NEPT", "amount": "539.0335 NEPT", "reclaimed": "0.0000 NEPT", "locked": "539.0335 NEPT", "claimed": "0.0000 NEPT", "expired": "0.0000 NEPT" }, "percent": { "reclaimed": "0", "claimable": "0", "claimed": "0", "expired": "0", "locked": "1", "extra": { "text": { "locked": "100.00%", "reclaimed": "0.00%", "claimable": "0.00%", "expired": "0.00%", "claimed": "0.00%" } } }, "value": { "reclaimed": "0", "amount": "17.564815853184007856", "claimed": "0", "expired": "0", "price": "0.032585758453916404", "claimable": "0", "locked": "17.564815853184007856", "extra": { "text": { "expired": "$0.00", "claimed": "$0.00", "price": "$0.03", "locked": "$17.56", "reclaimed": "$0.00", "amount": "$17.56", "claimable": "$0.00" } } } } } }, { "begins_at": "2026-05-13T03:54:17Z", "schedule": { "kind": "linear", "duration": 26581850, "ends_at": "2027-03-16T19:45:07Z", "extra": { "text": { "ends_at": "2027-03-16 07:45:07 PM +00:00", "duration": "307 days" } } }, "last_claimed_at": null, "expires_at": "2028-01-16T01:05:19Z", "admin": { "address": "inj1loremipsumdolorsitametconsecteturadipi", "issued_reclaim": false }, "extra": { "text": { "begins_at": "2026-05-13 03:54:17 AM +00:00", "last_claimed_at": "N/A", "expires_at": "2028-01-16 01:05:19 AM +00:00" } }, "amounts": { "amount": "47623136", "claimed": "0", "claimable": "0", "locked": "47623136", "expired": "0", "reclaimed": "0", "extra": { "text": { "claimable": "0.0000 NEPT", "amount": "47.6231 NEPT", "reclaimed": "0.0000 NEPT", "locked": "47.6231 NEPT", "claimed": "0.0000 NEPT", "expired": "0.0000 NEPT" }, "percent": { "reclaimed": "0", "claimable": "0", "claimed": "0", "expired": "0", "locked": "1", "extra": { "text": { "locked": "100.00%", "reclaimed": "0.00%", "claimable": "0.00%", "expired": "0.00%", "claimed": "0.00%" } } }, "value": { "reclaimed": "0", "amount": "1.55183600651401064", "claimed": "0", "expired": "0", "price": "0.032585758453916404", "claimable": "0", "locked": "1.55183600651401064", "extra": { "text": { "expired": "$0.00", "claimed": "$0.00", "price": "$0.03", "locked": "$1.55", "reclaimed": "$0.00", "amount": "$1.55", "claimable": "$0.00" } } } } } } ], "totals": { "amount": "586656649", "claimed": "0", "claimable": "0", "locked": "586656649", "expired": "0", "reclaimed": "0", "extra": { "text": { "claimable": "0.0000 NEPT", "amount": "586.6566 NEPT", "reclaimed": "0.0000 NEPT", "locked": "586.6566 NEPT", "claimed": "0.0000 NEPT", "expired": "0.0000 NEPT" }, "percent": { "reclaimed": "0", "claimable": "0", "claimed": "0", "expired": "0", "locked": "1", "extra": { "text": { "locked": "100.00%", "reclaimed": "0.00%", "claimable": "0.00%", "expired": "0.00%", "claimed": "0.00%" } } }, "value": { "reclaimed": "0", "amount": "19.116651859698018496", "claimed": "0", "expired": "0", "price": "0.032585758453916404", "claimable": "0", "locked": "19.116651859698018496", "extra": { "text": { "expired": "$0.00", "claimed": "$0.00", "price": "$0.03", "locked": "$19.11", "reclaimed": "$0.00", "amount": "$19.11", "claimable": "$0.00" } } } } }, "last_claimed_at": "2025-03-01T14:29:00Z", "extra": { "text": { "last_claimed_at": "2025-03-01 02:29:00 PM +00:00" } } }, "error": null, "status": 200, "status_text": "200 OK" } ``` ## Domain Types ### User Unlock Amounts - `class UserUnlockAmounts: …` - `amount: str` The full unlock amount This value is immutable and does not change with regards to expiry/reclamation/lock states. - `claimable: str` The amount currently claimable This takes into account: reclamation, lock state, expiry, and previously claimed. In other words, this is an accurate representation of what the user can currently claim. - `claimed: str` The amount that has already been successfully claimed by the user. - `expired: str` The amount that was claimable but has now expired due to the presence and subsequent passing of `expires_at` - `extra: Extra` - `percent: Optional[ExtraPercent]` Percentages for unlock amounts. These do not factor in the `amount_staked` or `amount_held` values. Will not be null when query param `with_percent` is `true`. - `claimable: str` - `claimed: str` - `expired: str` - `extra: ExtraPercentExtra` - `text: Optional[ExtraPercentExtraText]` Human-readable variants of percentages for unlock amounts. Will not be null when query params `with_text` and `with_percent` are `true`. - `claimable: str` - `claimed: str` - `expired: str` - `locked: str` - `reclaimed: str` - `locked: str` - `reclaimed: str` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: str` - `claimable: str` - `claimed: str` - `expired: str` - `locked: str` - `reclaimed: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount: str` - `claimable: str` - `claimed: str` - `expired: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: str` - `claimable: str` - `claimed: str` - `expired: str` - `locked: str` - `price: str` Text representation of price - `reclaimed: str` - `locked: str` - `price: str` Price used in value calculations - `reclaimed: str` - `locked: str` The total amount of NEPT currently awaiting unlock **NOTE:** any reclaimed unlocks are excluded from the total, regardless of how much the user had claimed prior to reclamation. - `reclaimed: str` The amount that has been reclaimed from the unlock arrangement admin ### User Unlock Overview - `class UserUnlockOverview: …` - `arrangements: List[Arrangement]` A list of the user's active unlock arrangements - `admin: Optional[ArrangementAdmin]` The admin of the unlock, if any - `address: str` The address of the unlock arrangement's admin - `issued_reclaim: bool` True if the admin his issued a reclaim on the unlock arrangement - `amounts: UserUnlockAmounts` Primary unlock amount and other pre-calculated/derived amounts - `amount: str` The full unlock amount This value is immutable and does not change with regards to expiry/reclamation/lock states. - `claimable: str` The amount currently claimable This takes into account: reclamation, lock state, expiry, and previously claimed. In other words, this is an accurate representation of what the user can currently claim. - `claimed: str` The amount that has already been successfully claimed by the user. - `expired: str` The amount that was claimable but has now expired due to the presence and subsequent passing of `expires_at` - `extra: Extra` - `percent: Optional[ExtraPercent]` Percentages for unlock amounts. These do not factor in the `amount_staked` or `amount_held` values. Will not be null when query param `with_percent` is `true`. - `claimable: str` - `claimed: str` - `expired: str` - `extra: ExtraPercentExtra` - `text: Optional[ExtraPercentExtraText]` Human-readable variants of percentages for unlock amounts. Will not be null when query params `with_text` and `with_percent` are `true`. - `claimable: str` - `claimed: str` - `expired: str` - `locked: str` - `reclaimed: str` - `locked: str` - `reclaimed: str` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: str` - `claimable: str` - `claimed: str` - `expired: str` - `locked: str` - `reclaimed: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount: str` - `claimable: str` - `claimed: str` - `expired: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: str` - `claimable: str` - `claimed: str` - `expired: str` - `locked: str` - `price: str` Text representation of price - `reclaimed: str` - `locked: str` - `price: str` Price used in value calculations - `reclaimed: str` - `locked: str` The total amount of NEPT currently awaiting unlock **NOTE:** any reclaimed unlocks are excluded from the total, regardless of how much the user had claimed prior to reclamation. - `reclaimed: str` The amount that has been reclaimed from the unlock arrangement admin - `begins_at: datetime` The time at which the unlock begins - `expires_at: Optional[datetime]` The time at which the unlock expires, if any - `extra: ArrangementExtra` - `text: Optional[ArrangementExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `begins_at: str` - `expires_at: str` - `last_claimed_at: str` - `last_claimed_at: Optional[datetime]` The time at which the unlock was last claimed, if any - `schedule: UserUnlockSchedule` The schedule of the unlock - `class UserUnlockScheduleLinear: …` - `duration: int` The duration of the unlock in seconds - `ends_at: datetime` The time at which the unlock has/was/would've completed. This is identical to `begins_at + duration`. This timestamp will remain valid even if the unlock has been reclaimed. Therefore, it should not be used as a validity check. - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `duration: str` - `ends_at: str` - `kind: Literal["linear"]` - `"linear"` - `class UserUnlockScheduleLumpSum: …` - `kind: Literal["lump_sum"]` - `"lump_sum"` - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `last_claimed_at: str` - `last_claimed_at: Optional[datetime]` The time at which the most recent unlock claim occurred, if any - `totals: UserUnlockAmounts` Contains pre-calculated total amounts for all unlock agreements ### User Unlock Schedule - `UserUnlockSchedule` - `class UserUnlockScheduleLinear: …` - `duration: int` The duration of the unlock in seconds - `ends_at: datetime` The time at which the unlock has/was/would've completed. This is identical to `begins_at + duration`. This timestamp will remain valid even if the unlock has been reclaimed. Therefore, it should not be used as a validity check. - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `duration: str` - `ends_at: str` - `kind: Literal["linear"]` - `"linear"` - `class UserUnlockScheduleLumpSum: …` - `kind: Literal["lump_sum"]` - `"lump_sum"` ### User Unlock Schedule Linear - `class UserUnlockScheduleLinear: …` - `duration: int` The duration of the unlock in seconds - `ends_at: datetime` The time at which the unlock has/was/would've completed. This is identical to `begins_at + duration`. This timestamp will remain valid even if the unlock has been reclaimed. Therefore, it should not be used as a validity check. - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `duration: str` - `ends_at: str` - `kind: Literal["linear"]` - `"linear"` ### User Unlock Schedule Lump Sum - `class UserUnlockScheduleLumpSum: …` - `kind: Literal["lump_sum"]` - `"lump_sum"` # Staking ## Get user staking overview `user.nept.staking.get_overview(straddress, StakingGetOverviewParams**kwargs) -> StakingGetOverviewResponse` **get** `/api/v1/users/{address}/nept/staking` Get user staking overview ### Parameters - `address: str` The user account address - `with_text: Optional[bool]` Include text variation fields - `with_value: Optional[bool]` Calculate and include USD values for amounts, where applicable ### Returns - `class StakingGetOverviewResponse: …` - `data: UserStake` - `asset_info: AssetInfo` Asset identifiers with associated metadata - `asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `id: str` - `group: Literal["native", "token"]` - `"native"` - `"token"` - `group_key: str` - `classification: AssetClassification` The asset's classification metadata. Assets are classfied to provide context on their usage throughout the Neptune API (e.g. regular assets, neptune receipt tokens, LSTs, etc.) Each asset belongs to only a single classification type. This object contains metadata pertaining to the given classification. While some fields may be common among the distinct classifcations, each classification is distinct and subject to independent change. - `class Regular: …` - `kind: Literal["regular"]` - `"regular"` - `neptune_receipt_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class NeptuneReceiptToken: …` - `kind: Literal["neptune_receipt_token"]` - `"neptune_receipt_token"` - `origin_asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class LiquidStakingToken: …` - `kind: Literal["liquid_staking_token"]` - `"liquid_staking_token"` - `origin_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: int` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: int` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: str` Full name of the asset - `symbol: str` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: str` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `bonding_sum: str` Total staked of all entries across all listed pools **NOTE:** this value is affected by active filters, if any (e.g. filtering over account index) - `claimable_rewards: str` NEPT rewarded from staking that is available yet not claimed by the user - `claimable_unbonding: str` Sum of all unbond/unstake amounts that have completed their lockup period and are ready to be claimed. - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `bonding_sum: str` - `claimable_rewards: str` - `claimable_unbonding: str` - `unclaimed: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `bonding_sum: str` - `claimable_rewards: str` - `claimable_unbonding: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `bonding_sum: str` - `claimable_rewards: str` - `claimable_unbonding: str` - `price: str` Text representation of price - `unclaimed: str` - `price: str` Price used in value calculations - `unclaimed: str` - `pools: List[UserStakePool]` User allocations for each staking pool - `amount_sum: str` Total staked of all entries **NOTE:** this value is affected by active filters, if any (e.g. filtering over account index) - `common: StakingPoolFull` Staking pool contents along with associated pool state and pool params - `duration: int` The lockup duration for this pool in seconds - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `duration: str` - `index: str` - `index: int` The ordered index (position) of this pool - `params: StakingPoolParams` Staking pool contract parameters - `flash_loan_weight: str` The pool's weight (multiplier) for flash loans volume - `gov_weight: str` The pool's weight (multiplier) on governance for an associated stake - `health_weight: str` The pool's weight (multiplier) on account health for an associated stake - `reward_weight: str` The pool's weight (multiplier) on rewards for an associated stake - `state: StakingPoolState` Current contract state of staking pool - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `total_bonded: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: str` Text representation of price - `total_bonded: str` - `price: str` Price used in value calculations - `total_bonded: str` - `total_bonded: str` The total amount staked to this pool - `contents: List[UserStakeBondingEntry]` Bonding/stake entries **NOTE:** entries that differ only in amount are merged upon creation - `account_index: int` User account index - `amount: str` Bonding amount - `cascade: bool` - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: str` - `transition_at: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `last_stake_acc: str` - `transition_at: Optional[datetime]` - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount_sum: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount_sum: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount_sum: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `unbonding: UserStakeUnbonding` User unstake/unbonding data - `amount_sum: str` Total amount of all unbond entries **NOTE:** this value is affected by active filters, if any (e.g. filtering over account index) - `contents: List[UserStakeUnbondingEntry]` Unbonding/unstake entries **NOTE:** cascade unbondings from pool >= 2 are contained in the bondings list of the lower adjacent pool from which the unbond occurred. - `amount: str` Unbonding amount - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: str` - `unlock_at: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `unlock_at: datetime` Timestamp for when the unstake can be redeemed - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount_sum: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount_sum: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount_sum: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `unclaimed: str` - `error: None` Error data. Guaranteed `null` for successful response. - `status: int` HTTP status. Successful responses are guaranteed to be < `400`. Conversely, error responses are guaranteed to be >= `400`. - `status_text: str` HTTP status text ### Example ```python from neptune_api_v2 import NeptuneAPIV2 client = NeptuneAPIV2() response = client.user.nept.staking.get_overview( address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) print(response.data) ``` #### Response ```json { "data": { "asset_info": { "asset": { "id": "native;factory/inj1v3a4zznudwpukpr8y987pu5gnh4xuf7v36jhva/nept", "group": "native", "group_key": "factory/inj1v3a4zznudwpukpr8y987pu5gnh4xuf7v36jhva/nept" }, "metadata": { "name": "Neptune Token", "symbol": "NEPT", "symbol_denom": "nept", "decimals_denom": 6, "decimals_display": 5 }, "classification": { "kind": "regular", "neptune_receipt_asset": null } }, "bonding_sum": "261303252", "pools": [ { "common": { "index": 0, "duration": 604800, "extra": { "text": { "duration": "7 days", "index": "1" } }, "params": { "reward_weight": "2", "gov_weight": "2", "health_weight": "1", "flash_loan_weight": "0" }, "state": { "total_bonded": "0", "extra": { "text": { "total_bonded": "0.00000 NEPT" }, "value": { "total_bonded": "0", "price": "0.032585758453916404", "extra": { "text": { "price": "$0.03", "total_bonded": "$0.00" } } } } } }, "amount_sum": "109444445", "contents": [ { "account_index": 0, "amount": "109444445", "cascade": true, "transition_at": "2026-04-21T00:22:41.146085865Z", "last_stake_acc": "2.815383", "extra": { "text": { "amount": "109.44444 NEPT", "transition_at": "2026-04-21 12:22:41 AM +00:00" }, "value": { "amount": "3.566330248892938912", "price": "0.032585758453916404", "extra": { "text": { "price": "$0.03", "amount": "$3.56" } } } } } ], "extra": { "text": { "amount_sum": "109.44444 NEPT" }, "value": { "price": "0.032585758453916404", "amount_sum": "3.566330248892938912", "extra": { "text": { "price": "$0.03", "amount_sum": "$3.56" } } } } }, { "common": { "index": 1, "duration": 2592000, "extra": { "text": { "duration": "30 days", "index": "2" } }, "params": { "reward_weight": "2", "gov_weight": "2", "health_weight": "1", "flash_loan_weight": "0" }, "state": { "total_bonded": "0", "extra": { "text": { "total_bonded": "0.00000 NEPT" }, "value": { "total_bonded": "0", "price": "0.032585758453916404", "extra": { "text": { "price": "$0.03", "total_bonded": "$0.00" } } } } } }, "amount_sum": "63111066", "contents": [ { "account_index": 0, "amount": "63111066", "cascade": false, "transition_at": null, "last_stake_acc": "4.699306", "extra": { "text": { "amount": "63.11106 NEPT", "transition_at": "N/A" }, "value": { "amount": "2.056521952445176131", "price": "0.032585758453916404", "extra": { "text": { "price": "$0.03", "amount": "$2.05" } } } } } ], "extra": { "text": { "amount_sum": "63.11106 NEPT" }, "value": { "price": "0.032585758453916404", "amount_sum": "2.056521952445176131", "extra": { "text": { "price": "$0.03", "amount_sum": "$2.05" } } } } }, { "common": { "index": 2, "duration": 7776000, "extra": { "text": { "duration": "90 days", "index": "3" } }, "params": { "reward_weight": "2", "gov_weight": "2", "health_weight": "1", "flash_loan_weight": "0" }, "state": { "total_bonded": "0", "extra": { "text": { "total_bonded": "0.00000 NEPT" }, "value": { "total_bonded": "0", "price": "0.032585758453916404", "extra": { "text": { "price": "$0.03", "total_bonded": "$0.00" } } } } } }, "amount_sum": "88747741", "contents": [ { "account_index": 0, "amount": "88747741", "cascade": true, "transition_at": "2026-04-30T04:17:56.146113607Z", "last_stake_acc": "9.377375", "extra": { "text": { "amount": "88.74774 NEPT", "transition_at": "2026-04-30 04:17:56 AM +00:00" }, "value": { "amount": "2.891912451556733457", "price": "0.032585758453916404", "extra": { "text": { "price": "$0.03", "amount": "$2.89" } } } } } ], "extra": { "text": { "amount_sum": "88.74774 NEPT" }, "value": { "price": "0.032585758453916404", "amount_sum": "2.891912451556733457", "extra": { "text": { "price": "$0.03", "amount_sum": "$2.89" } } } } } ], "unbonding": { "amount_sum": "189563302", "contents": [ { "amount": "189563302", "unlock_at": "2026-05-03T06:38:00.146126420Z", "extra": { "text": { "unlock_at": "2026-05-03 06:38:00 AM +00:00", "amount": "189.56330 NEPT" }, "value": { "price": "0.032585758453916404", "amount": "6.177063970698808374", "extra": { "text": { "amount": "$6.17", "price": "$0.03" } } } } } ], "extra": { "text": { "amount_sum": "189.56330 NEPT" }, "value": { "amount_sum": "6.177063970698808374", "price": "0.032585758453916404", "extra": { "text": { "amount_sum": "$6.17", "price": "$0.03" } } } } }, "unclaimed": "184925198", "claimable_rewards": "122236531", "claimable_unbonding": "38301584", "extra": { "text": { "claimable_rewards": "122.23653 NEPT", "bonding_sum": "261.30325 NEPT", "claimable_unbonding": "38.30158 NEPT", "unclaimed": "184.92519 NEPT" }, "value": { "bonding_sum": "8.514764652894848501", "unclaimed": "6.025927834070664885", "claimable_unbonding": "1.248086164626389276", "claimable_rewards": "3.983170073410664588", "price": "0.032585758453916404", "extra": { "text": { "unclaimed": "$6.02", "price": "$0.03", "bonding_sum": "$8.51", "claimable_rewards": "$3.98", "claimable_unbonding": "$1.24" } } } } }, "error": null, "status": 200, "status_text": "200 OK" } ``` ## Get user staking pools `user.nept.staking.get_staking_pools(straddress, StakingGetStakingPoolsParams**kwargs) -> StakingGetStakingPoolsResponse` **get** `/api/v1/users/{address}/nept/staking/pools` Get user staking pools ### Parameters - `address: str` The user account address - `with_text: Optional[bool]` Include text variation fields - `with_value: Optional[bool]` Calculate and include USD values for amounts, where applicable ### Returns - `class StakingGetStakingPoolsResponse: …` - `count: int` Total number of objects irrespective of any pagination parameters. - `data: List[UserStakePool]` - `amount_sum: str` Total staked of all entries **NOTE:** this value is affected by active filters, if any (e.g. filtering over account index) - `common: StakingPoolFull` Staking pool contents along with associated pool state and pool params - `duration: int` The lockup duration for this pool in seconds - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `duration: str` - `index: str` - `index: int` The ordered index (position) of this pool - `params: StakingPoolParams` Staking pool contract parameters - `flash_loan_weight: str` The pool's weight (multiplier) for flash loans volume - `gov_weight: str` The pool's weight (multiplier) on governance for an associated stake - `health_weight: str` The pool's weight (multiplier) on account health for an associated stake - `reward_weight: str` The pool's weight (multiplier) on rewards for an associated stake - `state: StakingPoolState` Current contract state of staking pool - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `total_bonded: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: str` Text representation of price - `total_bonded: str` - `price: str` Price used in value calculations - `total_bonded: str` - `total_bonded: str` The total amount staked to this pool - `contents: List[UserStakeBondingEntry]` Bonding/stake entries **NOTE:** entries that differ only in amount are merged upon creation - `account_index: int` User account index - `amount: str` Bonding amount - `cascade: bool` - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: str` - `transition_at: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `last_stake_acc: str` - `transition_at: Optional[datetime]` - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount_sum: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount_sum: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount_sum: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `error: None` Error data. Guaranteed `null` for successful response. - `status: int` HTTP status. Successful responses are guaranteed to be < `400`. Conversely, error responses are guaranteed to be >= `400`. - `status_text: str` HTTP status text ### Example ```python from neptune_api_v2 import NeptuneAPIV2 client = NeptuneAPIV2() response = client.user.nept.staking.get_staking_pools( address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) print(response.count) ``` #### Response ```json { "data": [ { "common": { "index": 0, "duration": 604800, "extra": { "text": { "duration": "7 days", "index": "1" } }, "params": { "reward_weight": "2", "gov_weight": "2", "health_weight": "1", "flash_loan_weight": "0" }, "state": { "total_bonded": "0", "extra": { "text": { "total_bonded": "0.00000 NEPT" }, "value": { "total_bonded": "0", "price": "0.032585758453916404", "extra": { "text": { "price": "$0.03", "total_bonded": "$0.00" } } } } } }, "amount_sum": "14652088", "contents": [ { "account_index": 0, "amount": "14652088", "cascade": false, "transition_at": null, "last_stake_acc": "1.771489", "extra": { "text": { "amount": "14.65208 NEPT", "transition_at": "N/A" }, "value": { "amount": "0.477449400413527096", "price": "0.032585758453916404", "extra": { "text": { "price": "$0.03", "amount": "$0.47" } } } } } ], "extra": { "text": { "amount_sum": "14.65208 NEPT" }, "value": { "price": "0.032585758453916404", "amount_sum": "0.477449400413527096", "extra": { "text": { "price": "$0.03", "amount_sum": "$0.47" } } } } }, { "common": { "index": 1, "duration": 2592000, "extra": { "text": { "duration": "30 days", "index": "2" } }, "params": { "reward_weight": "2", "gov_weight": "2", "health_weight": "1", "flash_loan_weight": "0" }, "state": { "total_bonded": "0", "extra": { "text": { "total_bonded": "0.00000 NEPT" }, "value": { "total_bonded": "0", "price": "0.032585758453916404", "extra": { "text": { "price": "$0.03", "total_bonded": "$0.00" } } } } } }, "amount_sum": "185802473", "contents": [ { "account_index": 0, "amount": "185802473", "cascade": true, "transition_at": "2026-04-10T03:03:30.146395597Z", "last_stake_acc": "6.034249", "extra": { "text": { "amount": "185.80247 NEPT", "transition_at": "2026-04-10 03:03:30 AM +00:00" }, "value": { "amount": "6.054514505318324398", "price": "0.032585758453916404", "extra": { "text": { "price": "$0.03", "amount": "$6.05" } } } } } ], "extra": { "text": { "amount_sum": "185.80247 NEPT" }, "value": { "price": "0.032585758453916404", "amount_sum": "6.054514505318324398", "extra": { "text": { "price": "$0.03", "amount_sum": "$6.05" } } } } }, { "common": { "index": 2, "duration": 7776000, "extra": { "text": { "duration": "90 days", "index": "3" } }, "params": { "reward_weight": "2", "gov_weight": "2", "health_weight": "1", "flash_loan_weight": "0" }, "state": { "total_bonded": "0", "extra": { "text": { "total_bonded": "0.00000 NEPT" }, "value": { "total_bonded": "0", "price": "0.032585758453916404", "extra": { "text": { "price": "$0.03", "total_bonded": "$0.00" } } } } } }, "amount_sum": "26604454", "contents": [ { "account_index": 0, "amount": "26604454", "cascade": true, "transition_at": "2026-04-22T11:37:54.146410405Z", "last_stake_acc": "7.290343", "extra": { "text": { "amount": "26.60445 NEPT", "transition_at": "2026-04-22 11:37:54 AM +00:00" }, "value": { "amount": "0.86692631184233009", "price": "0.032585758453916404", "extra": { "text": { "price": "$0.03", "amount": "$0.86" } } } } } ], "extra": { "text": { "amount_sum": "26.60445 NEPT" }, "value": { "price": "0.032585758453916404", "amount_sum": "0.86692631184233009", "extra": { "text": { "price": "$0.03", "amount_sum": "$0.86" } } } } } ], "count": 3, "error": null, "status": 200, "status_text": "200 OK" } ``` ## Get user staking pool by duration/index `user.nept.staking.get_staking_pool(straddress, StakingGetStakingPoolParams**kwargs) -> StakingGetStakingPoolResponse` **get** `/api/v1/users/{address}/nept/staking/pools/lookup` Get user staking pool by duration/index ### Parameters - `address: str` The user account address - `duration: Optional[int]` Duration of pool to lookup (**in nanoseconds**) **NOTE:** Either index or duration must be provided. Cannot specify both. - `index: Optional[int]` Index of pool to lookup **NOTE:** Either index or duration must be provided. Cannot specify both. - `with_text: Optional[bool]` Include text variation fields - `with_value: Optional[bool]` Calculate and include USD values for amounts, where applicable ### Returns - `class StakingGetStakingPoolResponse: …` - `data: UserStakePool` - `amount_sum: str` Total staked of all entries **NOTE:** this value is affected by active filters, if any (e.g. filtering over account index) - `common: StakingPoolFull` Staking pool contents along with associated pool state and pool params - `duration: int` The lockup duration for this pool in seconds - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `duration: str` - `index: str` - `index: int` The ordered index (position) of this pool - `params: StakingPoolParams` Staking pool contract parameters - `flash_loan_weight: str` The pool's weight (multiplier) for flash loans volume - `gov_weight: str` The pool's weight (multiplier) on governance for an associated stake - `health_weight: str` The pool's weight (multiplier) on account health for an associated stake - `reward_weight: str` The pool's weight (multiplier) on rewards for an associated stake - `state: StakingPoolState` Current contract state of staking pool - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `total_bonded: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: str` Text representation of price - `total_bonded: str` - `price: str` Price used in value calculations - `total_bonded: str` - `total_bonded: str` The total amount staked to this pool - `contents: List[UserStakeBondingEntry]` Bonding/stake entries **NOTE:** entries that differ only in amount are merged upon creation - `account_index: int` User account index - `amount: str` Bonding amount - `cascade: bool` - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: str` - `transition_at: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `last_stake_acc: str` - `transition_at: Optional[datetime]` - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount_sum: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount_sum: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount_sum: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `error: None` Error data. Guaranteed `null` for successful response. - `status: int` HTTP status. Successful responses are guaranteed to be < `400`. Conversely, error responses are guaranteed to be >= `400`. - `status_text: str` HTTP status text ### Example ```python from neptune_api_v2 import NeptuneAPIV2 client = NeptuneAPIV2() response = client.user.nept.staking.get_staking_pool( address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) print(response.data) ``` #### Response ```json { "data": { "common": { "index": 0, "duration": 604800, "extra": { "text": { "duration": "7 days", "index": "1" } }, "params": { "reward_weight": "2", "gov_weight": "2", "health_weight": "1", "flash_loan_weight": "0" }, "state": { "total_bonded": "0", "extra": { "text": { "total_bonded": "0.00000 NEPT" }, "value": { "total_bonded": "0", "price": "0.032585758453916404", "extra": { "text": { "price": "$0.03", "total_bonded": "$0.00" } } } } } }, "amount_sum": "103086089", "contents": [ { "account_index": 0, "amount": "103086089", "cascade": false, "transition_at": null, "last_stake_acc": "0.281368", "extra": { "text": { "amount": "103.08608 NEPT", "transition_at": "N/A" }, "value": { "amount": "3.359138396112928821", "price": "0.032585758453916404", "extra": { "text": { "price": "$0.03", "amount": "$3.35" } } } } } ], "extra": { "text": { "amount_sum": "103.08608 NEPT" }, "value": { "price": "0.032585758453916404", "amount_sum": "3.359138396112928821", "extra": { "text": { "price": "$0.03", "amount_sum": "$3.35" } } } } }, "error": null, "status": 200, "status_text": "200 OK" } ``` ## Get user unstaking pool `user.nept.staking.get_unstaking(straddress, StakingGetUnstakingParams**kwargs) -> StakingGetUnstakingResponse` **get** `/api/v1/users/{address}/nept/staking/unstaking` Get user unstaking pool ### Parameters - `address: str` The user account address - `with_text: Optional[bool]` Include text variation fields - `with_value: Optional[bool]` Calculate and include USD values for amounts, where applicable ### Returns - `class StakingGetUnstakingResponse: …` - `data: UserStakeUnbonding` - `amount_sum: str` Total amount of all unbond entries **NOTE:** this value is affected by active filters, if any (e.g. filtering over account index) - `contents: List[UserStakeUnbondingEntry]` Unbonding/unstake entries **NOTE:** cascade unbondings from pool >= 2 are contained in the bondings list of the lower adjacent pool from which the unbond occurred. - `amount: str` Unbonding amount - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: str` - `unlock_at: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `unlock_at: datetime` Timestamp for when the unstake can be redeemed - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount_sum: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount_sum: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount_sum: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `error: None` Error data. Guaranteed `null` for successful response. - `status: int` HTTP status. Successful responses are guaranteed to be < `400`. Conversely, error responses are guaranteed to be >= `400`. - `status_text: str` HTTP status text ### Example ```python from neptune_api_v2 import NeptuneAPIV2 client = NeptuneAPIV2() response = client.user.nept.staking.get_unstaking( address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) print(response.data) ``` #### Response ```json { "data": { "amount_sum": "87588537", "contents": [ { "amount": "87588537", "unlock_at": "2026-04-12T06:47:37.146770220Z", "extra": { "text": { "unlock_at": "2026-04-12 06:47:37 AM +00:00", "amount": "87.58853 NEPT" }, "value": { "price": "0.032585758453916404", "amount": "2.854138910013919746", "extra": { "text": { "amount": "$2.85", "price": "$0.03" } } } } } ], "extra": { "text": { "amount_sum": "87.58853 NEPT" }, "value": { "amount_sum": "2.854138910013919746", "price": "0.032585758453916404", "extra": { "text": { "amount_sum": "$2.85", "price": "$0.03" } } } } }, "error": null, "status": 200, "status_text": "200 OK" } ``` ## Domain Types ### User Stake - `class UserStake: …` - `asset_info: AssetInfo` Asset identifiers with associated metadata - `asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `id: str` - `group: Literal["native", "token"]` - `"native"` - `"token"` - `group_key: str` - `classification: AssetClassification` The asset's classification metadata. Assets are classfied to provide context on their usage throughout the Neptune API (e.g. regular assets, neptune receipt tokens, LSTs, etc.) Each asset belongs to only a single classification type. This object contains metadata pertaining to the given classification. While some fields may be common among the distinct classifcations, each classification is distinct and subject to independent change. - `class Regular: …` - `kind: Literal["regular"]` - `"regular"` - `neptune_receipt_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class NeptuneReceiptToken: …` - `kind: Literal["neptune_receipt_token"]` - `"neptune_receipt_token"` - `origin_asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class LiquidStakingToken: …` - `kind: Literal["liquid_staking_token"]` - `"liquid_staking_token"` - `origin_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: int` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: int` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: str` Full name of the asset - `symbol: str` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: str` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `bonding_sum: str` Total staked of all entries across all listed pools **NOTE:** this value is affected by active filters, if any (e.g. filtering over account index) - `claimable_rewards: str` NEPT rewarded from staking that is available yet not claimed by the user - `claimable_unbonding: str` Sum of all unbond/unstake amounts that have completed their lockup period and are ready to be claimed. - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `bonding_sum: str` - `claimable_rewards: str` - `claimable_unbonding: str` - `unclaimed: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `bonding_sum: str` - `claimable_rewards: str` - `claimable_unbonding: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `bonding_sum: str` - `claimable_rewards: str` - `claimable_unbonding: str` - `price: str` Text representation of price - `unclaimed: str` - `price: str` Price used in value calculations - `unclaimed: str` - `pools: List[UserStakePool]` User allocations for each staking pool - `amount_sum: str` Total staked of all entries **NOTE:** this value is affected by active filters, if any (e.g. filtering over account index) - `common: StakingPoolFull` Staking pool contents along with associated pool state and pool params - `duration: int` The lockup duration for this pool in seconds - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `duration: str` - `index: str` - `index: int` The ordered index (position) of this pool - `params: StakingPoolParams` Staking pool contract parameters - `flash_loan_weight: str` The pool's weight (multiplier) for flash loans volume - `gov_weight: str` The pool's weight (multiplier) on governance for an associated stake - `health_weight: str` The pool's weight (multiplier) on account health for an associated stake - `reward_weight: str` The pool's weight (multiplier) on rewards for an associated stake - `state: StakingPoolState` Current contract state of staking pool - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `total_bonded: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: str` Text representation of price - `total_bonded: str` - `price: str` Price used in value calculations - `total_bonded: str` - `total_bonded: str` The total amount staked to this pool - `contents: List[UserStakeBondingEntry]` Bonding/stake entries **NOTE:** entries that differ only in amount are merged upon creation - `account_index: int` User account index - `amount: str` Bonding amount - `cascade: bool` - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: str` - `transition_at: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `last_stake_acc: str` - `transition_at: Optional[datetime]` - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount_sum: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount_sum: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount_sum: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `unbonding: UserStakeUnbonding` User unstake/unbonding data - `amount_sum: str` Total amount of all unbond entries **NOTE:** this value is affected by active filters, if any (e.g. filtering over account index) - `contents: List[UserStakeUnbondingEntry]` Unbonding/unstake entries **NOTE:** cascade unbondings from pool >= 2 are contained in the bondings list of the lower adjacent pool from which the unbond occurred. - `amount: str` Unbonding amount - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: str` - `unlock_at: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `unlock_at: datetime` Timestamp for when the unstake can be redeemed - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount_sum: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount_sum: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount_sum: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `unclaimed: str` ### User Stake Bonding Entry - `class UserStakeBondingEntry: …` - `account_index: int` User account index - `amount: str` Bonding amount - `cascade: bool` - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: str` - `transition_at: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `last_stake_acc: str` - `transition_at: Optional[datetime]` ### User Stake Pool - `class UserStakePool: …` - `amount_sum: str` Total staked of all entries **NOTE:** this value is affected by active filters, if any (e.g. filtering over account index) - `common: StakingPoolFull` Staking pool contents along with associated pool state and pool params - `duration: int` The lockup duration for this pool in seconds - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `duration: str` - `index: str` - `index: int` The ordered index (position) of this pool - `params: StakingPoolParams` Staking pool contract parameters - `flash_loan_weight: str` The pool's weight (multiplier) for flash loans volume - `gov_weight: str` The pool's weight (multiplier) on governance for an associated stake - `health_weight: str` The pool's weight (multiplier) on account health for an associated stake - `reward_weight: str` The pool's weight (multiplier) on rewards for an associated stake - `state: StakingPoolState` Current contract state of staking pool - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `total_bonded: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: str` Text representation of price - `total_bonded: str` - `price: str` Price used in value calculations - `total_bonded: str` - `total_bonded: str` The total amount staked to this pool - `contents: List[UserStakeBondingEntry]` Bonding/stake entries **NOTE:** entries that differ only in amount are merged upon creation - `account_index: int` User account index - `amount: str` Bonding amount - `cascade: bool` - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: str` - `transition_at: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `last_stake_acc: str` - `transition_at: Optional[datetime]` - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount_sum: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount_sum: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount_sum: str` - `price: str` Text representation of price - `price: str` Price used in value calculations ### User Stake Unbonding - `class UserStakeUnbonding: …` - `amount_sum: str` Total amount of all unbond entries **NOTE:** this value is affected by active filters, if any (e.g. filtering over account index) - `contents: List[UserStakeUnbondingEntry]` Unbonding/unstake entries **NOTE:** cascade unbondings from pool >= 2 are contained in the bondings list of the lower adjacent pool from which the unbond occurred. - `amount: str` Unbonding amount - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: str` - `unlock_at: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `unlock_at: datetime` Timestamp for when the unstake can be redeemed - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount_sum: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount_sum: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount_sum: str` - `price: str` Text representation of price - `price: str` Price used in value calculations ### User Stake Unbonding Entry - `class UserStakeUnbondingEntry: …` - `amount: str` Unbonding amount - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: str` - `unlock_at: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `unlock_at: datetime` Timestamp for when the unstake can be redeemed # Wallet ## Get user portfolio `user.wallet.get_balances(straddress, WalletGetBalancesParams**kwargs) -> WalletGetBalancesResponse` **get** `/api/v1/users/{address}/wallet/balances` Get user portfolio ### Parameters - `address: str` The user account address - `with_text: Optional[bool]` Include text variation fields - `with_value: Optional[bool]` Calculate and include USD values for amounts, where applicable ### Returns - `class WalletGetBalancesResponse: …` - `data: UserWalletPortfolio` - `balances: List[WalletBalance]` Array of each wallet balance - `asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `id: str` - `group: Literal["native", "token"]` - `"native"` - `"token"` - `group_key: str` - `values: WalletAsset` Derived values and amounts. - `class WalletAssetKnown: …` - `amount: str` Wallet balance in native denom. - `amount_scaled: str` Amount scaled to the asset's standard unit / decimal places. - `asset_info: AssetInfo` Asset identifiers with associated metadata - `asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `classification: AssetClassification` The asset's classification metadata. Assets are classfied to provide context on their usage throughout the Neptune API (e.g. regular assets, neptune receipt tokens, LSTs, etc.) Each asset belongs to only a single classification type. This object contains metadata pertaining to the given classification. While some fields may be common among the distinct classifcations, each classification is distinct and subject to independent change. - `class Regular: …` - `kind: Literal["regular"]` - `"regular"` - `neptune_receipt_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class NeptuneReceiptToken: …` - `kind: Literal["neptune_receipt_token"]` - `"neptune_receipt_token"` - `origin_asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class LiquidStakingToken: …` - `kind: Literal["liquid_staking_token"]` - `"liquid_staking_token"` - `origin_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: int` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: int` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: str` Full name of the asset - `symbol: str` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: str` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `kind: Literal["known"]` - `"known"` - `class WalletAssetUnknown: …` - `amount: str` Wallet balance in native denom. - `kind: Literal["unknown"]` - `"unknown"` - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `total_value: str` - `total_value: Optional[str]` Sum value in USD. Guaranteed null if value calculation is disabled / guaranteed non-null if calculation is enabled. **NOTE:** this only accounts for assets which are internally known & tracked. See the `/assets` endpoint for a list of supported assets. - `error: None` Error data. Guaranteed `null` for successful response. - `status: int` HTTP status. Successful responses are guaranteed to be < `400`. Conversely, error responses are guaranteed to be >= `400`. - `status_text: str` HTTP status text ### Example ```python from neptune_api_v2 import NeptuneAPIV2 client = NeptuneAPIV2() response = client.user.wallet.get_balances( address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) print(response.data) ``` #### Response ```json { "data": { "balances": [ { "asset": { "id": "native;inj", "group": "native", "group_key": "inj" }, "values": { "kind": "known", "asset_info": { "asset": { "id": "native;inj", "group": "native", "group_key": "inj" }, "metadata": { "name": "Injective", "symbol": "INJ", "symbol_denom": "inj", "decimals_denom": 18, "decimals_display": 4 }, "classification": { "kind": "regular", "neptune_receipt_asset": { "id": "token;inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f", "group": "token", "group_key": "inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f" } } }, "amount": "375425343522854919091", "amount_scaled": "375.425343522854919091", "extra": { "text": { "amount": "375.4253 INJ" }, "value": { "amount": "1125.656578751752046656", "price": "2.99835", "extra": { "text": { "price": "$2.99", "amount": "$1,125.65" } } } } } } ], "total_value": "626.552120573717882332", "extra": { "text": { "total_value": "$626.55" } } }, "error": null, "status": 200, "status_text": "200 OK" } ``` ## Get user balance by asset `user.wallet.get_balance_by_asset(straddress, WalletGetBalanceByAssetParams**kwargs) -> WalletGetBalanceByAssetResponse` **get** `/api/v1/users/{address}/wallet/balance` Get user balance by asset ### Parameters - `address: str` The user account address - `asset_id: str` Asset ID for lookup - `with_text: Optional[bool]` Include text variation fields - `with_value: Optional[bool]` Calculate and include USD values for amounts, where applicable ### Returns - `class WalletGetBalanceByAssetResponse: …` - `data: WalletBalance` Asset and balance contents for a given wallet - `asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `id: str` - `group: Literal["native", "token"]` - `"native"` - `"token"` - `group_key: str` - `values: WalletAsset` Derived values and amounts. - `class WalletAssetKnown: …` - `amount: str` Wallet balance in native denom. - `amount_scaled: str` Amount scaled to the asset's standard unit / decimal places. - `asset_info: AssetInfo` Asset identifiers with associated metadata - `asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `classification: AssetClassification` The asset's classification metadata. Assets are classfied to provide context on their usage throughout the Neptune API (e.g. regular assets, neptune receipt tokens, LSTs, etc.) Each asset belongs to only a single classification type. This object contains metadata pertaining to the given classification. While some fields may be common among the distinct classifcations, each classification is distinct and subject to independent change. - `class Regular: …` - `kind: Literal["regular"]` - `"regular"` - `neptune_receipt_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class NeptuneReceiptToken: …` - `kind: Literal["neptune_receipt_token"]` - `"neptune_receipt_token"` - `origin_asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class LiquidStakingToken: …` - `kind: Literal["liquid_staking_token"]` - `"liquid_staking_token"` - `origin_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: int` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: int` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: str` Full name of the asset - `symbol: str` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: str` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `kind: Literal["known"]` - `"known"` - `class WalletAssetUnknown: …` - `amount: str` Wallet balance in native denom. - `kind: Literal["unknown"]` - `"unknown"` - `error: None` Error data. Guaranteed `null` for successful response. - `status: int` HTTP status. Successful responses are guaranteed to be < `400`. Conversely, error responses are guaranteed to be >= `400`. - `status_text: str` HTTP status text ### Example ```python from neptune_api_v2 import NeptuneAPIV2 client = NeptuneAPIV2() response = client.user.wallet.get_balance_by_asset( address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", asset_id="token;-K-//-//3-", ) print(response.data) ``` #### Response ```json { "data": { "asset": { "id": "native;inj", "group": "native", "group_key": "inj" }, "values": { "kind": "known", "asset_info": { "asset": { "id": "native;inj", "group": "native", "group_key": "inj" }, "metadata": { "name": "Injective", "symbol": "INJ", "symbol_denom": "inj", "decimals_denom": 18, "decimals_display": 4 }, "classification": { "kind": "regular", "neptune_receipt_asset": { "id": "token;inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f", "group": "token", "group_key": "inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f" } } }, "amount": "121433424019244729044", "amount_scaled": "121.433424019244729044", "extra": { "text": { "amount": "121.4334 INJ" }, "value": { "amount": "364.099906908102433329", "price": "2.99835", "extra": { "text": { "price": "$2.99", "amount": "$364.09" } } } } } }, "error": null, "status": 200, "status_text": "200 OK" } ``` ## Domain Types ### User Wallet Portfolio - `class UserWalletPortfolio: …` - `balances: List[WalletBalance]` Array of each wallet balance - `asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `id: str` - `group: Literal["native", "token"]` - `"native"` - `"token"` - `group_key: str` - `values: WalletAsset` Derived values and amounts. - `class WalletAssetKnown: …` - `amount: str` Wallet balance in native denom. - `amount_scaled: str` Amount scaled to the asset's standard unit / decimal places. - `asset_info: AssetInfo` Asset identifiers with associated metadata - `asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `classification: AssetClassification` The asset's classification metadata. Assets are classfied to provide context on their usage throughout the Neptune API (e.g. regular assets, neptune receipt tokens, LSTs, etc.) Each asset belongs to only a single classification type. This object contains metadata pertaining to the given classification. While some fields may be common among the distinct classifcations, each classification is distinct and subject to independent change. - `class Regular: …` - `kind: Literal["regular"]` - `"regular"` - `neptune_receipt_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class NeptuneReceiptToken: …` - `kind: Literal["neptune_receipt_token"]` - `"neptune_receipt_token"` - `origin_asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class LiquidStakingToken: …` - `kind: Literal["liquid_staking_token"]` - `"liquid_staking_token"` - `origin_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: int` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: int` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: str` Full name of the asset - `symbol: str` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: str` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `kind: Literal["known"]` - `"known"` - `class WalletAssetUnknown: …` - `amount: str` Wallet balance in native denom. - `kind: Literal["unknown"]` - `"unknown"` - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `total_value: str` - `total_value: Optional[str]` Sum value in USD. Guaranteed null if value calculation is disabled / guaranteed non-null if calculation is enabled. **NOTE:** this only accounts for assets which are internally known & tracked. See the `/assets` endpoint for a list of supported assets. ### Wallet Asset - `WalletAsset` - `class WalletAssetKnown: …` - `amount: str` Wallet balance in native denom. - `amount_scaled: str` Amount scaled to the asset's standard unit / decimal places. - `asset_info: AssetInfo` Asset identifiers with associated metadata - `asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `id: str` - `group: Literal["native", "token"]` - `"native"` - `"token"` - `group_key: str` - `classification: AssetClassification` The asset's classification metadata. Assets are classfied to provide context on their usage throughout the Neptune API (e.g. regular assets, neptune receipt tokens, LSTs, etc.) Each asset belongs to only a single classification type. This object contains metadata pertaining to the given classification. While some fields may be common among the distinct classifcations, each classification is distinct and subject to independent change. - `class Regular: …` - `kind: Literal["regular"]` - `"regular"` - `neptune_receipt_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class NeptuneReceiptToken: …` - `kind: Literal["neptune_receipt_token"]` - `"neptune_receipt_token"` - `origin_asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class LiquidStakingToken: …` - `kind: Literal["liquid_staking_token"]` - `"liquid_staking_token"` - `origin_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: int` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: int` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: str` Full name of the asset - `symbol: str` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: str` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `kind: Literal["known"]` - `"known"` - `class WalletAssetUnknown: …` - `amount: str` Wallet balance in native denom. - `kind: Literal["unknown"]` - `"unknown"` ### Wallet Asset Known - `class WalletAssetKnown: …` - `amount: str` Wallet balance in native denom. - `amount_scaled: str` Amount scaled to the asset's standard unit / decimal places. - `asset_info: AssetInfo` Asset identifiers with associated metadata - `asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `id: str` - `group: Literal["native", "token"]` - `"native"` - `"token"` - `group_key: str` - `classification: AssetClassification` The asset's classification metadata. Assets are classfied to provide context on their usage throughout the Neptune API (e.g. regular assets, neptune receipt tokens, LSTs, etc.) Each asset belongs to only a single classification type. This object contains metadata pertaining to the given classification. While some fields may be common among the distinct classifcations, each classification is distinct and subject to independent change. - `class Regular: …` - `kind: Literal["regular"]` - `"regular"` - `neptune_receipt_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class NeptuneReceiptToken: …` - `kind: Literal["neptune_receipt_token"]` - `"neptune_receipt_token"` - `origin_asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class LiquidStakingToken: …` - `kind: Literal["liquid_staking_token"]` - `"liquid_staking_token"` - `origin_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: int` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: int` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: str` Full name of the asset - `symbol: str` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: str` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `kind: Literal["known"]` - `"known"` ### Wallet Asset Unknown - `class WalletAssetUnknown: …` - `amount: str` Wallet balance in native denom. - `kind: Literal["unknown"]` - `"unknown"` ### Wallet Balance - `class WalletBalance: …` Asset and balance contents for a given wallet - `asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `id: str` - `group: Literal["native", "token"]` - `"native"` - `"token"` - `group_key: str` - `values: WalletAsset` Derived values and amounts. - `class WalletAssetKnown: …` - `amount: str` Wallet balance in native denom. - `amount_scaled: str` Amount scaled to the asset's standard unit / decimal places. - `asset_info: AssetInfo` Asset identifiers with associated metadata - `asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `classification: AssetClassification` The asset's classification metadata. Assets are classfied to provide context on their usage throughout the Neptune API (e.g. regular assets, neptune receipt tokens, LSTs, etc.) Each asset belongs to only a single classification type. This object contains metadata pertaining to the given classification. While some fields may be common among the distinct classifcations, each classification is distinct and subject to independent change. - `class Regular: …` - `kind: Literal["regular"]` - `"regular"` - `neptune_receipt_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class NeptuneReceiptToken: …` - `kind: Literal["neptune_receipt_token"]` - `"neptune_receipt_token"` - `origin_asset: AssetSpec` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `class LiquidStakingToken: …` - `kind: Literal["liquid_staking_token"]` - `"liquid_staking_token"` - `origin_asset: Optional[AssetSpec]` Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: int` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: int` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: str` Full name of the asset - `symbol: str` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: str` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `extra: Extra` - `text: Optional[ExtraText]` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: str` - `value: Optional[ExtraValue]` USD values for the corresponding amounts above. Will not be null when query param `with_value` is `true`. ### Note This variant group contains an additional `price` field (set to the number used in value calculation). The embedded text group will contain the text variant if `with_text` was specified as well. - `amount: str` - `extra: ExtraValueExtra` - `text: Optional[ExtraValueExtraText]` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: str` - `price: str` Text representation of price - `price: str` Price used in value calculations - `kind: Literal["known"]` - `"known"` - `class WalletAssetUnknown: …` - `amount: str` Wallet balance in native denom. - `kind: Literal["unknown"]` - `"unknown"`