# User ## Get user **get** `/api/v1/users/{address}/user` Get user ### Path Parameters - `address: string` The user account address ### Query Parameters - `with_percent: optional boolean` Calculate and include proportional percentages, where applicable - `with_text: optional boolean` Include text variation fields - `with_value: optional boolean` Calculate and include USD values for amounts, where applicable ### Returns - `data: User` - `markets: UserMarket` User's market contribution overview - `borrow: UserBorrowMarket` Overview of user borrowing portfolio - `accounts: array of UserBorrowMarketAccount` Market sub-accounts for the user - `collaterals: array of UserCollateralAssetPool` Account collateral allocations - `amount: string` 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: string` - `group: "native" or "token"` - `"native"` - `"token"` - `group_key: string` - `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. - `Regular = object { kind, neptune_receipt_asset }` - `kind: "regular"` - `"regular"` - `neptune_receipt_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) - `NeptuneReceiptToken = object { kind, origin_asset }` - `kind: "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) - `LiquidStakingToken = object { kind, origin_asset }` - `kind: "liquid_staking_token"` - `"liquid_staking_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) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: number` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: number` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: string` Full name of the asset - `symbol: string` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: string` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `extra: object { text, value }` - `text: object { amount }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: string` - `value: object { amount, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `debts: array of UserDebtAssetPool` Account debt allocations - `asset_info: AssetInfo` Asset identifiers with associated metadata - `extra: object { text, value }` - `text: object { principal, shares }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `principal: string` - `shares: string` - `value: object { extra, price, principal, shares }` 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: object { text }` - `text: object { price, principal, shares }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: string` Text representation of price - `principal: string` - `shares: string` - `price: string` Price used in value calculations - `principal: string` - `shares: string` - `market_rate: MarketRate` Current market borrowing rate - `apr: string` Market rate in APR standard as a decimal percentage - `apy: string` Market rate in APY standard as a decimal percentage - `extra: object { text }` - `text: object { apr, apy }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `apr: string` - `apy: string` - `principal: string` Initial amount borrowed (of debts which have not yet been repaid) - `shares: string` - `debts_net_rate: MarketRate` Account debt net rate - `health: UserAccountHealth` Health data for this account - `base: string` Account health value, before any added health boosts - `boost: string` Account health boost to be applied - `extra: object { text }` - `text: object { base, boost, result }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `base: string` - `boost: string` - `result: string` - `result: string` Account health, with boost - `index: number` Account index - `totals: UserBorrowMarketPools` Collateral/debt totals of all sub-accounts by asset - `collaterals: array of UserCollateralAssetPool` Account collateral allocations - `amount: string` Amount of this asset which is actively collateralized - `asset_info: AssetInfo` Asset identifiers with associated metadata - `extra: object { text, value }` - `debts: array of UserDebtAssetPool` Account debt allocations - `asset_info: AssetInfo` Asset identifiers with associated metadata - `extra: object { text, value }` - `market_rate: MarketRate` Current market borrowing rate - `principal: string` Initial amount borrowed (of debts which have not yet been repaid) - `shares: string` - `debts_net_rate: MarketRate` Account debt net rate - `lend: UserLendMarket` Overview of user lending portfolio - `asset_pools: array of 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: string` 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: object { text }` - `text: object { collateralized, held, total }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `collateralized: string` - `held: string` - `total: string` - `held: string` 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: string` 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: string` Total amount of receipt token collateralized across this user's borrowing portfolio - `extra: object { text, value }` - `text: object { collateralized, held, total }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `collateralized: string` - `held: string` - `total: string` - `value: object { collateralized, extra, held, 2 more }` 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: string` - `extra: object { text }` - `text: object { collateralized, held, price, total }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `collateralized: string` - `held: string` - `price: string` Text representation of price - `total: string` - `held: string` - `price: string` Price used in value calculations - `total: string` - `held: string` Total amount of receipt token held in address balance - `total: string` Sum of receipt amount held and receipt amount collateralized - `net_rate: MarketRate` Account debt net rate - `nept: object { staking, unlocks }` 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: string` 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: string` NEPT rewarded from staking that is available yet not claimed by the user - `claimable_unbonding: string` Sum of all unbond/unstake amounts that have completed their lockup period and are ready to be claimed. - `extra: object { text, value }` - `text: object { bonding_sum, claimable_rewards, claimable_unbonding, unclaimed }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `bonding_sum: string` - `claimable_rewards: string` - `claimable_unbonding: string` - `unclaimed: string` - `value: object { bonding_sum, claimable_rewards, claimable_unbonding, 3 more }` 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: string` - `claimable_rewards: string` - `claimable_unbonding: string` - `extra: object { text }` - `text: object { bonding_sum, claimable_rewards, claimable_unbonding, 2 more }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `bonding_sum: string` - `claimable_rewards: string` - `claimable_unbonding: string` - `price: string` Text representation of price - `unclaimed: string` - `price: string` Price used in value calculations - `unclaimed: string` - `pools: array of UserStakePool` User allocations for each staking pool - `amount_sum: string` 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: number` The lockup duration for this pool in seconds - `extra: object { text }` - `text: object { duration, index }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `duration: string` - `index: string` - `index: number` The ordered index (position) of this pool - `params: StakingPoolParams` Staking pool contract parameters - `flash_loan_weight: string` The pool's weight (multiplier) for flash loans volume - `gov_weight: string` The pool's weight (multiplier) on governance for an associated stake - `health_weight: string` The pool's weight (multiplier) on account health for an associated stake - `reward_weight: string` The pool's weight (multiplier) on rewards for an associated stake - `state: StakingPoolState` Current contract state of staking pool - `extra: object { text, value }` - `text: object { total_bonded }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `total_bonded: string` - `value: object { extra, price, total_bonded }` 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: object { text }` - `text: object { price, total_bonded }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: string` Text representation of price - `total_bonded: string` - `price: string` Price used in value calculations - `total_bonded: string` - `total_bonded: string` The total amount staked to this pool - `contents: array of UserStakeBondingEntry` Bonding/stake entries **NOTE:** entries that differ only in amount are merged upon creation - `account_index: number` User account index - `amount: string` Bonding amount - `cascade: boolean` - `extra: object { text, value }` - `text: object { amount, transition_at }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: string` - `transition_at: string` - `value: object { amount, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `last_stake_acc: string` - `transition_at: string` - `extra: object { text, value }` - `text: object { amount_sum }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount_sum: string` - `value: object { amount_sum, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount_sum, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount_sum: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `unbonding: UserStakeUnbonding` User unstake/unbonding data - `amount_sum: string` Total amount of all unbond entries **NOTE:** this value is affected by active filters, if any (e.g. filtering over account index) - `contents: array of 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: string` Unbonding amount - `extra: object { text, value }` - `text: object { amount, unlock_at }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: string` - `unlock_at: string` - `value: object { amount, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `unlock_at: string` Timestamp for when the unstake can be redeemed - `extra: object { text, value }` - `text: object { amount_sum }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount_sum: string` - `value: object { amount_sum, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount_sum, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount_sum: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `unclaimed: string` - `unlocks: UserUnlockOverview` Overview of the user's unlock arrangements and claim statistics - `arrangements: array of object { admin, amounts, begins_at, 4 more }` A list of the user's active unlock arrangements - `admin: object { address, issued_reclaim }` The admin of the unlock, if any - `address: string` The address of the unlock arrangement's admin - `issued_reclaim: boolean` True if the admin his issued a reclaim on the unlock arrangement - `amounts: UserUnlockAmounts` Primary unlock amount and other pre-calculated/derived amounts - `amount: string` The full unlock amount This value is immutable and does not change with regards to expiry/reclamation/lock states. - `claimable: string` 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: string` The amount that has already been successfully claimed by the user. - `expired: string` The amount that was claimable but has now expired due to the presence and subsequent passing of `expires_at` - `extra: object { percent, text, value }` - `percent: object { claimable, claimed, expired, 3 more }` 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: string` - `claimed: string` - `expired: string` - `extra: object { text }` - `text: object { claimable, claimed, expired, 2 more }` Human-readable variants of percentages for unlock amounts. Will not be null when query params `with_text` and `with_percent` are `true`. - `claimable: string` - `claimed: string` - `expired: string` - `locked: string` - `reclaimed: string` - `locked: string` - `reclaimed: string` - `text: object { amount, claimable, claimed, 3 more }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: string` - `claimable: string` - `claimed: string` - `expired: string` - `locked: string` - `reclaimed: string` - `value: object { amount, claimable, claimed, 5 more }` 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: string` - `claimable: string` - `claimed: string` - `expired: string` - `extra: object { text }` - `text: object { amount, claimable, claimed, 4 more }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: string` - `claimable: string` - `claimed: string` - `expired: string` - `locked: string` - `price: string` Text representation of price - `reclaimed: string` - `locked: string` - `price: string` Price used in value calculations - `reclaimed: string` - `locked: string` 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: string` The amount that has been reclaimed from the unlock arrangement admin - `begins_at: string` The time at which the unlock begins - `expires_at: string` The time at which the unlock expires, if any - `extra: object { text }` - `text: object { begins_at, expires_at, last_claimed_at }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `begins_at: string` - `expires_at: string` - `last_claimed_at: string` - `last_claimed_at: string` The time at which the unlock was last claimed, if any - `schedule: UserUnlockSchedule` The schedule of the unlock - `UserUnlockScheduleLinear = object { duration, ends_at, extra, kind }` - `duration: number` The duration of the unlock in seconds - `ends_at: string` 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: object { text }` - `text: object { duration, ends_at }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `duration: string` - `ends_at: string` - `kind: "linear"` - `"linear"` - `UserUnlockScheduleLumpSum = object { kind }` - `kind: "lump_sum"` - `"lump_sum"` - `extra: object { text }` - `text: object { last_claimed_at }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `last_claimed_at: string` - `last_claimed_at: string` 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: array of 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. - `WalletAssetKnown = object { amount, amount_scaled, asset_info, 2 more }` - `amount: string` Wallet balance in native denom. - `amount_scaled: string` Amount scaled to the asset's standard unit / decimal places. - `asset_info: AssetInfo` Asset identifiers with associated metadata - `extra: object { text, value }` - `text: object { amount }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: string` - `value: object { amount, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `kind: "known"` - `"known"` - `WalletAssetUnknown = object { amount, kind }` - `amount: string` Wallet balance in native denom. - `kind: "unknown"` - `"unknown"` - `extra: object { text }` - `text: object { total_value }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `total_value: string` - `total_value: string` 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: unknown` Error data. Guaranteed `null` for successful response. - `status: number` HTTP status. Successful responses are guaranteed to be < `400`. Conversely, error responses are guaranteed to be >= `400`. - `status_text: string` HTTP status text ### Example ```http curl https://api-v2.nept.finance/api/v1/users/$ADDRESS/user ``` #### 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 **get** `/api/v1/users/{address}/tx-history` Get user tx history ### Path Parameters - `address: string` The user account address ### Query Parameters - `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 number` Maximum number of transactions to return. Optional and defaults to `20` if missing. - `prev_event_uuid: optional string` 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 "asc" or "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 boolean` Include text variation fields - `with_value: optional boolean` Calculate and include USD values for amounts, where applicable ### Returns - `count: number` Total number of objects irrespective of any pagination parameters. - `data: array of UserTx` - `account_address: string` Account address corresponding to the transaction - `account_index: number` 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: string` 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: string` - `group: "native" or "token"` - `"native"` - `"token"` - `group_key: string` - `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. - `Regular = object { kind, neptune_receipt_asset }` - `kind: "regular"` - `"regular"` - `neptune_receipt_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) - `NeptuneReceiptToken = object { kind, origin_asset }` - `kind: "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) - `LiquidStakingToken = object { kind, origin_asset }` - `kind: "liquid_staking_token"` - `"liquid_staking_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) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: number` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: number` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: string` Full name of the asset - `symbol: string` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: string` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `contract_address: string` Address for the event's corresponding contract - `destination_address: string` Destination account address. Non-null for `send`/`transfer` transactions. This field will be null for all other action types. - `event_time: string` Event/transaction block time - `event_uuid: string` 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: object { text, value }` - `text: object { action, amount, event_time, 2 more }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `action: string` - `amount: string` - `event_time: string` - `historic_price: string` - `historic_value: string` - `value: object { amount, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: optional string` - `price: optional string` Text representation of price - `price: string` Price used in value calculations - `historic_price: string or number` 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. - `string` 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. - `number` 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: string or number` 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. - `string` 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. - `number` 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: string` Transaction hash - `error: unknown` Error data. Guaranteed `null` for successful response. - `status: number` HTTP status. Successful responses are guaranteed to be < `400`. Conversely, error responses are guaranteed to be >= `400`. - `status_text: string` HTTP status text ### Example ```http curl https://api-v2.nept.finance/api/v1/users/$ADDRESS/tx-history ``` #### 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 - `EventAction = "borrow_flash_loan" or "return_flash_loan" or "create_token_unlock" or 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 - `User = object { markets, nept, wallets }` - `markets: UserMarket` User's market contribution overview - `borrow: UserBorrowMarket` Overview of user borrowing portfolio - `accounts: array of UserBorrowMarketAccount` Market sub-accounts for the user - `collaterals: array of UserCollateralAssetPool` Account collateral allocations - `amount: string` 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: string` - `group: "native" or "token"` - `"native"` - `"token"` - `group_key: string` - `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. - `Regular = object { kind, neptune_receipt_asset }` - `kind: "regular"` - `"regular"` - `neptune_receipt_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) - `NeptuneReceiptToken = object { kind, origin_asset }` - `kind: "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) - `LiquidStakingToken = object { kind, origin_asset }` - `kind: "liquid_staking_token"` - `"liquid_staking_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) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: number` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: number` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: string` Full name of the asset - `symbol: string` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: string` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `extra: object { text, value }` - `text: object { amount }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: string` - `value: object { amount, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `debts: array of UserDebtAssetPool` Account debt allocations - `asset_info: AssetInfo` Asset identifiers with associated metadata - `extra: object { text, value }` - `text: object { principal, shares }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `principal: string` - `shares: string` - `value: object { extra, price, principal, shares }` 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: object { text }` - `text: object { price, principal, shares }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: string` Text representation of price - `principal: string` - `shares: string` - `price: string` Price used in value calculations - `principal: string` - `shares: string` - `market_rate: MarketRate` Current market borrowing rate - `apr: string` Market rate in APR standard as a decimal percentage - `apy: string` Market rate in APY standard as a decimal percentage - `extra: object { text }` - `text: object { apr, apy }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `apr: string` - `apy: string` - `principal: string` Initial amount borrowed (of debts which have not yet been repaid) - `shares: string` - `debts_net_rate: MarketRate` Account debt net rate - `health: UserAccountHealth` Health data for this account - `base: string` Account health value, before any added health boosts - `boost: string` Account health boost to be applied - `extra: object { text }` - `text: object { base, boost, result }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `base: string` - `boost: string` - `result: string` - `result: string` Account health, with boost - `index: number` Account index - `totals: UserBorrowMarketPools` Collateral/debt totals of all sub-accounts by asset - `collaterals: array of UserCollateralAssetPool` Account collateral allocations - `amount: string` Amount of this asset which is actively collateralized - `asset_info: AssetInfo` Asset identifiers with associated metadata - `extra: object { text, value }` - `debts: array of UserDebtAssetPool` Account debt allocations - `asset_info: AssetInfo` Asset identifiers with associated metadata - `extra: object { text, value }` - `market_rate: MarketRate` Current market borrowing rate - `principal: string` Initial amount borrowed (of debts which have not yet been repaid) - `shares: string` - `debts_net_rate: MarketRate` Account debt net rate - `lend: UserLendMarket` Overview of user lending portfolio - `asset_pools: array of 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: string` 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: object { text }` - `text: object { collateralized, held, total }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `collateralized: string` - `held: string` - `total: string` - `held: string` 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: string` 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: string` Total amount of receipt token collateralized across this user's borrowing portfolio - `extra: object { text, value }` - `text: object { collateralized, held, total }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `collateralized: string` - `held: string` - `total: string` - `value: object { collateralized, extra, held, 2 more }` 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: string` - `extra: object { text }` - `text: object { collateralized, held, price, total }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `collateralized: string` - `held: string` - `price: string` Text representation of price - `total: string` - `held: string` - `price: string` Price used in value calculations - `total: string` - `held: string` Total amount of receipt token held in address balance - `total: string` Sum of receipt amount held and receipt amount collateralized - `net_rate: MarketRate` Account debt net rate - `nept: object { staking, unlocks }` 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: string` 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: string` NEPT rewarded from staking that is available yet not claimed by the user - `claimable_unbonding: string` Sum of all unbond/unstake amounts that have completed their lockup period and are ready to be claimed. - `extra: object { text, value }` - `text: object { bonding_sum, claimable_rewards, claimable_unbonding, unclaimed }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `bonding_sum: string` - `claimable_rewards: string` - `claimable_unbonding: string` - `unclaimed: string` - `value: object { bonding_sum, claimable_rewards, claimable_unbonding, 3 more }` 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: string` - `claimable_rewards: string` - `claimable_unbonding: string` - `extra: object { text }` - `text: object { bonding_sum, claimable_rewards, claimable_unbonding, 2 more }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `bonding_sum: string` - `claimable_rewards: string` - `claimable_unbonding: string` - `price: string` Text representation of price - `unclaimed: string` - `price: string` Price used in value calculations - `unclaimed: string` - `pools: array of UserStakePool` User allocations for each staking pool - `amount_sum: string` 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: number` The lockup duration for this pool in seconds - `extra: object { text }` - `text: object { duration, index }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `duration: string` - `index: string` - `index: number` The ordered index (position) of this pool - `params: StakingPoolParams` Staking pool contract parameters - `flash_loan_weight: string` The pool's weight (multiplier) for flash loans volume - `gov_weight: string` The pool's weight (multiplier) on governance for an associated stake - `health_weight: string` The pool's weight (multiplier) on account health for an associated stake - `reward_weight: string` The pool's weight (multiplier) on rewards for an associated stake - `state: StakingPoolState` Current contract state of staking pool - `extra: object { text, value }` - `text: object { total_bonded }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `total_bonded: string` - `value: object { extra, price, total_bonded }` 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: object { text }` - `text: object { price, total_bonded }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: string` Text representation of price - `total_bonded: string` - `price: string` Price used in value calculations - `total_bonded: string` - `total_bonded: string` The total amount staked to this pool - `contents: array of UserStakeBondingEntry` Bonding/stake entries **NOTE:** entries that differ only in amount are merged upon creation - `account_index: number` User account index - `amount: string` Bonding amount - `cascade: boolean` - `extra: object { text, value }` - `text: object { amount, transition_at }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: string` - `transition_at: string` - `value: object { amount, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `last_stake_acc: string` - `transition_at: string` - `extra: object { text, value }` - `text: object { amount_sum }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount_sum: string` - `value: object { amount_sum, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount_sum, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount_sum: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `unbonding: UserStakeUnbonding` User unstake/unbonding data - `amount_sum: string` Total amount of all unbond entries **NOTE:** this value is affected by active filters, if any (e.g. filtering over account index) - `contents: array of 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: string` Unbonding amount - `extra: object { text, value }` - `text: object { amount, unlock_at }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: string` - `unlock_at: string` - `value: object { amount, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `unlock_at: string` Timestamp for when the unstake can be redeemed - `extra: object { text, value }` - `text: object { amount_sum }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount_sum: string` - `value: object { amount_sum, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount_sum, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount_sum: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `unclaimed: string` - `unlocks: UserUnlockOverview` Overview of the user's unlock arrangements and claim statistics - `arrangements: array of object { admin, amounts, begins_at, 4 more }` A list of the user's active unlock arrangements - `admin: object { address, issued_reclaim }` The admin of the unlock, if any - `address: string` The address of the unlock arrangement's admin - `issued_reclaim: boolean` True if the admin his issued a reclaim on the unlock arrangement - `amounts: UserUnlockAmounts` Primary unlock amount and other pre-calculated/derived amounts - `amount: string` The full unlock amount This value is immutable and does not change with regards to expiry/reclamation/lock states. - `claimable: string` 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: string` The amount that has already been successfully claimed by the user. - `expired: string` The amount that was claimable but has now expired due to the presence and subsequent passing of `expires_at` - `extra: object { percent, text, value }` - `percent: object { claimable, claimed, expired, 3 more }` 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: string` - `claimed: string` - `expired: string` - `extra: object { text }` - `text: object { claimable, claimed, expired, 2 more }` Human-readable variants of percentages for unlock amounts. Will not be null when query params `with_text` and `with_percent` are `true`. - `claimable: string` - `claimed: string` - `expired: string` - `locked: string` - `reclaimed: string` - `locked: string` - `reclaimed: string` - `text: object { amount, claimable, claimed, 3 more }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: string` - `claimable: string` - `claimed: string` - `expired: string` - `locked: string` - `reclaimed: string` - `value: object { amount, claimable, claimed, 5 more }` 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: string` - `claimable: string` - `claimed: string` - `expired: string` - `extra: object { text }` - `text: object { amount, claimable, claimed, 4 more }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: string` - `claimable: string` - `claimed: string` - `expired: string` - `locked: string` - `price: string` Text representation of price - `reclaimed: string` - `locked: string` - `price: string` Price used in value calculations - `reclaimed: string` - `locked: string` 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: string` The amount that has been reclaimed from the unlock arrangement admin - `begins_at: string` The time at which the unlock begins - `expires_at: string` The time at which the unlock expires, if any - `extra: object { text }` - `text: object { begins_at, expires_at, last_claimed_at }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `begins_at: string` - `expires_at: string` - `last_claimed_at: string` - `last_claimed_at: string` The time at which the unlock was last claimed, if any - `schedule: UserUnlockSchedule` The schedule of the unlock - `UserUnlockScheduleLinear = object { duration, ends_at, extra, kind }` - `duration: number` The duration of the unlock in seconds - `ends_at: string` 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: object { text }` - `text: object { duration, ends_at }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `duration: string` - `ends_at: string` - `kind: "linear"` - `"linear"` - `UserUnlockScheduleLumpSum = object { kind }` - `kind: "lump_sum"` - `"lump_sum"` - `extra: object { text }` - `text: object { last_claimed_at }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `last_claimed_at: string` - `last_claimed_at: string` 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: array of 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. - `WalletAssetKnown = object { amount, amount_scaled, asset_info, 2 more }` - `amount: string` Wallet balance in native denom. - `amount_scaled: string` Amount scaled to the asset's standard unit / decimal places. - `asset_info: AssetInfo` Asset identifiers with associated metadata - `extra: object { text, value }` - `text: object { amount }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: string` - `value: object { amount, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `kind: "known"` - `"known"` - `WalletAssetUnknown = object { amount, kind }` - `amount: string` Wallet balance in native denom. - `kind: "unknown"` - `"unknown"` - `extra: object { text }` - `text: object { total_value }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `total_value: string` - `total_value: string` 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 - `UserTx = object { account_address, account_index, action, 10 more }` - `account_address: string` Account address corresponding to the transaction - `account_index: number` 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: string` 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: string` - `group: "native" or "token"` - `"native"` - `"token"` - `group_key: string` - `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. - `Regular = object { kind, neptune_receipt_asset }` - `kind: "regular"` - `"regular"` - `neptune_receipt_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) - `NeptuneReceiptToken = object { kind, origin_asset }` - `kind: "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) - `LiquidStakingToken = object { kind, origin_asset }` - `kind: "liquid_staking_token"` - `"liquid_staking_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) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: number` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: number` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: string` Full name of the asset - `symbol: string` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: string` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `contract_address: string` Address for the event's corresponding contract - `destination_address: string` Destination account address. Non-null for `send`/`transfer` transactions. This field will be null for all other action types. - `event_time: string` Event/transaction block time - `event_uuid: string` 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: object { text, value }` - `text: object { action, amount, event_time, 2 more }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `action: string` - `amount: string` - `event_time: string` - `historic_price: string` - `historic_value: string` - `value: object { amount, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: optional string` - `price: optional string` Text representation of price - `price: string` Price used in value calculations - `historic_price: string or number` 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. - `string` 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. - `number` 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: string or number` 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. - `string` 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. - `number` 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: string` Transaction hash # Market ## Get user market portfolio **get** `/api/v1/users/{address}/markets` Get user market portfolio ### Path Parameters - `address: string` The user account address ### Query Parameters - `with_text: optional boolean` Include text variation fields - `with_value: optional boolean` Calculate and include USD values for amounts, where applicable ### Returns - `data: UserMarket` - `borrow: UserBorrowMarket` Overview of user borrowing portfolio - `accounts: array of UserBorrowMarketAccount` Market sub-accounts for the user - `collaterals: array of UserCollateralAssetPool` Account collateral allocations - `amount: string` 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: string` - `group: "native" or "token"` - `"native"` - `"token"` - `group_key: string` - `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. - `Regular = object { kind, neptune_receipt_asset }` - `kind: "regular"` - `"regular"` - `neptune_receipt_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) - `NeptuneReceiptToken = object { kind, origin_asset }` - `kind: "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) - `LiquidStakingToken = object { kind, origin_asset }` - `kind: "liquid_staking_token"` - `"liquid_staking_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) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: number` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: number` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: string` Full name of the asset - `symbol: string` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: string` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `extra: object { text, value }` - `text: object { amount }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: string` - `value: object { amount, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `debts: array of UserDebtAssetPool` Account debt allocations - `asset_info: AssetInfo` Asset identifiers with associated metadata - `extra: object { text, value }` - `text: object { principal, shares }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `principal: string` - `shares: string` - `value: object { extra, price, principal, shares }` 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: object { text }` - `text: object { price, principal, shares }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: string` Text representation of price - `principal: string` - `shares: string` - `price: string` Price used in value calculations - `principal: string` - `shares: string` - `market_rate: MarketRate` Current market borrowing rate - `apr: string` Market rate in APR standard as a decimal percentage - `apy: string` Market rate in APY standard as a decimal percentage - `extra: object { text }` - `text: object { apr, apy }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `apr: string` - `apy: string` - `principal: string` Initial amount borrowed (of debts which have not yet been repaid) - `shares: string` - `debts_net_rate: MarketRate` Account debt net rate - `health: UserAccountHealth` Health data for this account - `base: string` Account health value, before any added health boosts - `boost: string` Account health boost to be applied - `extra: object { text }` - `text: object { base, boost, result }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `base: string` - `boost: string` - `result: string` - `result: string` Account health, with boost - `index: number` Account index - `totals: UserBorrowMarketPools` Collateral/debt totals of all sub-accounts by asset - `collaterals: array of UserCollateralAssetPool` Account collateral allocations - `amount: string` Amount of this asset which is actively collateralized - `asset_info: AssetInfo` Asset identifiers with associated metadata - `extra: object { text, value }` - `debts: array of UserDebtAssetPool` Account debt allocations - `asset_info: AssetInfo` Asset identifiers with associated metadata - `extra: object { text, value }` - `market_rate: MarketRate` Current market borrowing rate - `principal: string` Initial amount borrowed (of debts which have not yet been repaid) - `shares: string` - `debts_net_rate: MarketRate` Account debt net rate - `lend: UserLendMarket` Overview of user lending portfolio - `asset_pools: array of 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: string` 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: object { text }` - `text: object { collateralized, held, total }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `collateralized: string` - `held: string` - `total: string` - `held: string` 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: string` 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: string` Total amount of receipt token collateralized across this user's borrowing portfolio - `extra: object { text, value }` - `text: object { collateralized, held, total }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `collateralized: string` - `held: string` - `total: string` - `value: object { collateralized, extra, held, 2 more }` 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: string` - `extra: object { text }` - `text: object { collateralized, held, price, total }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `collateralized: string` - `held: string` - `price: string` Text representation of price - `total: string` - `held: string` - `price: string` Price used in value calculations - `total: string` - `held: string` Total amount of receipt token held in address balance - `total: string` Sum of receipt amount held and receipt amount collateralized - `net_rate: MarketRate` Account debt net rate - `error: unknown` Error data. Guaranteed `null` for successful response. - `status: number` HTTP status. Successful responses are guaranteed to be < `400`. Conversely, error responses are guaranteed to be >= `400`. - `status_text: string` HTTP status text ### Example ```http curl https://api-v2.nept.finance/api/v1/users/$ADDRESS/markets ``` #### 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 **get** `/api/v1/users/{address}/markets/merged` Get user markets for all kinds (lend + borrow debt/collateral), grouped together by asset ### Path Parameters - `address: string` The user account address ### Query Parameters - `with_text: optional boolean` Include text variation fields - `with_value: optional boolean` Calculate and include USD values for amounts, where applicable ### Returns - `count: number` Total number of objects irrespective of any pagination parameters. - `data: array of 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: string` - `group: "native" or "token"` - `"native"` - `"token"` - `group_key: string` - `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. - `Regular = object { kind, neptune_receipt_asset }` - `kind: "regular"` - `"regular"` - `neptune_receipt_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) - `NeptuneReceiptToken = object { kind, origin_asset }` - `kind: "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) - `LiquidStakingToken = object { kind, origin_asset }` - `kind: "liquid_staking_token"` - `"liquid_staking_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) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: number` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: number` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: string` Full name of the asset - `symbol: string` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: string` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `borrow_collateral: array of UserCollateralAccountPool` User collateral contribution for asset in borrow market, listed by subaccount - `amount: string` Amount of this asset which is actively collateralized - `extra: object { text, value }` - `text: object { amount }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: string` - `value: object { amount, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `index: number` Account index - `borrow_debt: array of UserDebtAccountPool` User debt contribution for asset in borrow market, listed by subaccount - `extra: object { text, value }` - `text: object { principal, shares }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `principal: string` - `shares: string` - `value: object { extra, price, principal, shares }` 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: object { text }` - `text: object { price, principal, shares }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: string` Text representation of price - `principal: string` - `shares: string` - `price: string` Price used in value calculations - `principal: string` - `shares: string` - `index: number` Account index - `principal: string` Initial amount borrowed (of debts which have not yet been repaid) - `shares: string` - `lend: optional object { origin_equivalent, receipt_amounts }` 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: string` 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: object { text }` - `text: object { collateralized, held, total }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `collateralized: string` - `held: string` - `total: string` - `held: string` 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: string` 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: string` Total amount of receipt token collateralized across this user's borrowing portfolio - `extra: object { text, value }` - `text: object { collateralized, held, total }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `collateralized: string` - `held: string` - `total: string` - `value: object { collateralized, extra, held, 2 more }` 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: string` - `extra: object { text }` - `text: object { collateralized, held, price, total }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `collateralized: string` - `held: string` - `price: string` Text representation of price - `total: string` - `held: string` - `price: string` Price used in value calculations - `total: string` - `held: string` Total amount of receipt token held in address balance - `total: string` Sum of receipt amount held and receipt amount collateralized - `error: unknown` Error data. Guaranteed `null` for successful response. - `status: number` HTTP status. Successful responses are guaranteed to be < `400`. Conversely, error responses are guaranteed to be >= `400`. - `status_text: string` HTTP status text ### Example ```http curl https://api-v2.nept.finance/api/v1/users/$ADDRESS/markets/merged ``` #### 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 **get** `/api/v1/users/{address}/markets/merged/lookup` Get user's markets (lend + borrow debt/collateral) for a specific asset ### Path Parameters - `address: string` The user account address ### Query Parameters - `asset_id: string` Asset ID for lookup - `with_text: optional boolean` Include text variation fields - `with_value: optional boolean` Calculate and include USD values for amounts, where applicable ### Returns - `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: string` - `group: "native" or "token"` - `"native"` - `"token"` - `group_key: string` - `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. - `Regular = object { kind, neptune_receipt_asset }` - `kind: "regular"` - `"regular"` - `neptune_receipt_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) - `NeptuneReceiptToken = object { kind, origin_asset }` - `kind: "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) - `LiquidStakingToken = object { kind, origin_asset }` - `kind: "liquid_staking_token"` - `"liquid_staking_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) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: number` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: number` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: string` Full name of the asset - `symbol: string` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: string` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `borrow_collateral: array of UserCollateralAccountPool` User collateral contribution for asset in borrow market, listed by subaccount - `amount: string` Amount of this asset which is actively collateralized - `extra: object { text, value }` - `text: object { amount }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: string` - `value: object { amount, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `index: number` Account index - `borrow_debt: array of UserDebtAccountPool` User debt contribution for asset in borrow market, listed by subaccount - `extra: object { text, value }` - `text: object { principal, shares }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `principal: string` - `shares: string` - `value: object { extra, price, principal, shares }` 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: object { text }` - `text: object { price, principal, shares }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: string` Text representation of price - `principal: string` - `shares: string` - `price: string` Price used in value calculations - `principal: string` - `shares: string` - `index: number` Account index - `principal: string` Initial amount borrowed (of debts which have not yet been repaid) - `shares: string` - `lend: optional object { origin_equivalent, receipt_amounts }` 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: string` 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: object { text }` - `text: object { collateralized, held, total }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `collateralized: string` - `held: string` - `total: string` - `held: string` 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: string` 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: string` Total amount of receipt token collateralized across this user's borrowing portfolio - `extra: object { text, value }` - `text: object { collateralized, held, total }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `collateralized: string` - `held: string` - `total: string` - `value: object { collateralized, extra, held, 2 more }` 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: string` - `extra: object { text }` - `text: object { collateralized, held, price, total }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `collateralized: string` - `held: string` - `price: string` Text representation of price - `total: string` - `held: string` - `price: string` Price used in value calculations - `total: string` - `held: string` Total amount of receipt token held in address balance - `total: string` Sum of receipt amount held and receipt amount collateralized - `error: unknown` Error data. Guaranteed `null` for successful response. - `status: number` HTTP status. Successful responses are guaranteed to be < `400`. Conversely, error responses are guaranteed to be >= `400`. - `status_text: string` HTTP status text ### Example ```http curl https://api-v2.nept.finance/api/v1/users/$ADDRESS/markets/merged/lookup ``` #### 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 - `UserMarket = object { borrow, lend }` - `borrow: UserBorrowMarket` Overview of user borrowing portfolio - `accounts: array of UserBorrowMarketAccount` Market sub-accounts for the user - `collaterals: array of UserCollateralAssetPool` Account collateral allocations - `amount: string` 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: string` - `group: "native" or "token"` - `"native"` - `"token"` - `group_key: string` - `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. - `Regular = object { kind, neptune_receipt_asset }` - `kind: "regular"` - `"regular"` - `neptune_receipt_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) - `NeptuneReceiptToken = object { kind, origin_asset }` - `kind: "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) - `LiquidStakingToken = object { kind, origin_asset }` - `kind: "liquid_staking_token"` - `"liquid_staking_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) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: number` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: number` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: string` Full name of the asset - `symbol: string` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: string` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `extra: object { text, value }` - `text: object { amount }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: string` - `value: object { amount, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `debts: array of UserDebtAssetPool` Account debt allocations - `asset_info: AssetInfo` Asset identifiers with associated metadata - `extra: object { text, value }` - `text: object { principal, shares }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `principal: string` - `shares: string` - `value: object { extra, price, principal, shares }` 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: object { text }` - `text: object { price, principal, shares }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: string` Text representation of price - `principal: string` - `shares: string` - `price: string` Price used in value calculations - `principal: string` - `shares: string` - `market_rate: MarketRate` Current market borrowing rate - `apr: string` Market rate in APR standard as a decimal percentage - `apy: string` Market rate in APY standard as a decimal percentage - `extra: object { text }` - `text: object { apr, apy }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `apr: string` - `apy: string` - `principal: string` Initial amount borrowed (of debts which have not yet been repaid) - `shares: string` - `debts_net_rate: MarketRate` Account debt net rate - `health: UserAccountHealth` Health data for this account - `base: string` Account health value, before any added health boosts - `boost: string` Account health boost to be applied - `extra: object { text }` - `text: object { base, boost, result }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `base: string` - `boost: string` - `result: string` - `result: string` Account health, with boost - `index: number` Account index - `totals: UserBorrowMarketPools` Collateral/debt totals of all sub-accounts by asset - `collaterals: array of UserCollateralAssetPool` Account collateral allocations - `amount: string` Amount of this asset which is actively collateralized - `asset_info: AssetInfo` Asset identifiers with associated metadata - `extra: object { text, value }` - `debts: array of UserDebtAssetPool` Account debt allocations - `asset_info: AssetInfo` Asset identifiers with associated metadata - `extra: object { text, value }` - `market_rate: MarketRate` Current market borrowing rate - `principal: string` Initial amount borrowed (of debts which have not yet been repaid) - `shares: string` - `debts_net_rate: MarketRate` Account debt net rate - `lend: UserLendMarket` Overview of user lending portfolio - `asset_pools: array of 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: string` 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: object { text }` - `text: object { collateralized, held, total }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `collateralized: string` - `held: string` - `total: string` - `held: string` 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: string` 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: string` Total amount of receipt token collateralized across this user's borrowing portfolio - `extra: object { text, value }` - `text: object { collateralized, held, total }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `collateralized: string` - `held: string` - `total: string` - `value: object { collateralized, extra, held, 2 more }` 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: string` - `extra: object { text }` - `text: object { collateralized, held, price, total }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `collateralized: string` - `held: string` - `price: string` Text representation of price - `total: string` - `held: string` - `price: string` Price used in value calculations - `total: string` - `held: string` Total amount of receipt token held in address balance - `total: string` Sum of receipt amount held and receipt amount collateralized - `net_rate: MarketRate` Account debt net rate ### User Merged Market - `UserMergedMarket = object { asset_info, borrow_collateral, borrow_debt, lend }` 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: string` - `group: "native" or "token"` - `"native"` - `"token"` - `group_key: string` - `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. - `Regular = object { kind, neptune_receipt_asset }` - `kind: "regular"` - `"regular"` - `neptune_receipt_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) - `NeptuneReceiptToken = object { kind, origin_asset }` - `kind: "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) - `LiquidStakingToken = object { kind, origin_asset }` - `kind: "liquid_staking_token"` - `"liquid_staking_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) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: number` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: number` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: string` Full name of the asset - `symbol: string` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: string` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `borrow_collateral: array of UserCollateralAccountPool` User collateral contribution for asset in borrow market, listed by subaccount - `amount: string` Amount of this asset which is actively collateralized - `extra: object { text, value }` - `text: object { amount }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: string` - `value: object { amount, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `index: number` Account index - `borrow_debt: array of UserDebtAccountPool` User debt contribution for asset in borrow market, listed by subaccount - `extra: object { text, value }` - `text: object { principal, shares }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `principal: string` - `shares: string` - `value: object { extra, price, principal, shares }` 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: object { text }` - `text: object { price, principal, shares }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: string` Text representation of price - `principal: string` - `shares: string` - `price: string` Price used in value calculations - `principal: string` - `shares: string` - `index: number` Account index - `principal: string` Initial amount borrowed (of debts which have not yet been repaid) - `shares: string` - `lend: optional object { origin_equivalent, receipt_amounts }` 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: string` 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: object { text }` - `text: object { collateralized, held, total }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `collateralized: string` - `held: string` - `total: string` - `held: string` 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: string` 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: string` Total amount of receipt token collateralized across this user's borrowing portfolio - `extra: object { text, value }` - `text: object { collateralized, held, total }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `collateralized: string` - `held: string` - `total: string` - `value: object { collateralized, extra, held, 2 more }` 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: string` - `extra: object { text }` - `text: object { collateralized, held, price, total }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `collateralized: string` - `held: string` - `price: string` Text representation of price - `total: string` - `held: string` - `price: string` Price used in value calculations - `total: string` - `held: string` Total amount of receipt token held in address balance - `total: string` Sum of receipt amount held and receipt amount collateralized # Lend ## Get user lending portfolio **get** `/api/v1/users/{address}/markets/lend` Get user lending portfolio ### Path Parameters - `address: string` The user account address ### Query Parameters - `with_text: optional boolean` Include text variation fields - `with_value: optional boolean` Calculate and include USD values for amounts, where applicable ### Returns - `data: UserLendMarket` - `asset_pools: array of 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: string` - `group: "native" or "token"` - `"native"` - `"token"` - `group_key: string` - `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. - `Regular = object { kind, neptune_receipt_asset }` - `kind: "regular"` - `"regular"` - `neptune_receipt_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) - `NeptuneReceiptToken = object { kind, origin_asset }` - `kind: "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) - `LiquidStakingToken = object { kind, origin_asset }` - `kind: "liquid_staking_token"` - `"liquid_staking_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) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: number` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: number` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: string` Full name of the asset - `symbol: string` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: string` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `market_rate: MarketRate` Current market lending rate - `apr: string` Market rate in APR standard as a decimal percentage - `apy: string` Market rate in APY standard as a decimal percentage - `extra: object { text }` - `text: object { apr, apy }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `apr: string` - `apy: string` - `origin_equivalent: UserLendOriginAmounts` The lending amounts converted into the equivalent for the receipt token's origin/source asset - `collateralized: string` 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: object { text }` - `text: object { collateralized, held, total }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `collateralized: string` - `held: string` - `total: string` - `held: string` 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: string` 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: string` Total amount of receipt token collateralized across this user's borrowing portfolio - `extra: object { text, value }` - `text: object { collateralized, held, total }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `collateralized: string` - `held: string` - `total: string` - `value: object { collateralized, extra, held, 2 more }` 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: string` - `extra: object { text }` - `text: object { collateralized, held, price, total }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `collateralized: string` - `held: string` - `price: string` Text representation of price - `total: string` - `held: string` - `price: string` Price used in value calculations - `total: string` - `held: string` Total amount of receipt token held in address balance - `total: string` Sum of receipt amount held and receipt amount collateralized - `net_rate: MarketRate` Account debt net rate - `error: unknown` Error data. Guaranteed `null` for successful response. - `status: number` HTTP status. Successful responses are guaranteed to be < `400`. Conversely, error responses are guaranteed to be >= `400`. - `status_text: string` HTTP status text ### Example ```http curl https://api-v2.nept.finance/api/v1/users/$ADDRESS/markets/lend ``` #### 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 **get** `/api/v1/users/{address}/markets/lend/lookup` Lookup user lending distribution by asset ### Path Parameters - `address: string` The user account address ### Query Parameters - `asset_id: string` Asset ID for lookup - `with_text: optional boolean` Include text variation fields - `with_value: optional boolean` Calculate and include USD values for amounts, where applicable ### Returns - `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: string` - `group: "native" or "token"` - `"native"` - `"token"` - `group_key: string` - `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. - `Regular = object { kind, neptune_receipt_asset }` - `kind: "regular"` - `"regular"` - `neptune_receipt_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) - `NeptuneReceiptToken = object { kind, origin_asset }` - `kind: "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) - `LiquidStakingToken = object { kind, origin_asset }` - `kind: "liquid_staking_token"` - `"liquid_staking_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) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: number` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: number` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: string` Full name of the asset - `symbol: string` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: string` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `market_rate: MarketRate` Current market lending rate - `apr: string` Market rate in APR standard as a decimal percentage - `apy: string` Market rate in APY standard as a decimal percentage - `extra: object { text }` - `text: object { apr, apy }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `apr: string` - `apy: string` - `origin_equivalent: UserLendOriginAmounts` The lending amounts converted into the equivalent for the receipt token's origin/source asset - `collateralized: string` 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: object { text }` - `text: object { collateralized, held, total }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `collateralized: string` - `held: string` - `total: string` - `held: string` 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: string` 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: string` Total amount of receipt token collateralized across this user's borrowing portfolio - `extra: object { text, value }` - `text: object { collateralized, held, total }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `collateralized: string` - `held: string` - `total: string` - `value: object { collateralized, extra, held, 2 more }` 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: string` - `extra: object { text }` - `text: object { collateralized, held, price, total }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `collateralized: string` - `held: string` - `price: string` Text representation of price - `total: string` - `held: string` - `price: string` Price used in value calculations - `total: string` - `held: string` Total amount of receipt token held in address balance - `total: string` Sum of receipt amount held and receipt amount collateralized - `error: unknown` Error data. Guaranteed `null` for successful response. - `status: number` HTTP status. Successful responses are guaranteed to be < `400`. Conversely, error responses are guaranteed to be >= `400`. - `status_text: string` HTTP status text ### Example ```http curl https://api-v2.nept.finance/api/v1/users/$ADDRESS/markets/lend/lookup ``` #### 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 - `UserLendAssetPool = object { asset_info, market_rate, origin_equivalent, receipt_amounts }` - `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: string` - `group: "native" or "token"` - `"native"` - `"token"` - `group_key: string` - `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. - `Regular = object { kind, neptune_receipt_asset }` - `kind: "regular"` - `"regular"` - `neptune_receipt_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) - `NeptuneReceiptToken = object { kind, origin_asset }` - `kind: "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) - `LiquidStakingToken = object { kind, origin_asset }` - `kind: "liquid_staking_token"` - `"liquid_staking_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) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: number` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: number` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: string` Full name of the asset - `symbol: string` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: string` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `market_rate: MarketRate` Current market lending rate - `apr: string` Market rate in APR standard as a decimal percentage - `apy: string` Market rate in APY standard as a decimal percentage - `extra: object { text }` - `text: object { apr, apy }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `apr: string` - `apy: string` - `origin_equivalent: UserLendOriginAmounts` The lending amounts converted into the equivalent for the receipt token's origin/source asset - `collateralized: string` 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: object { text }` - `text: object { collateralized, held, total }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `collateralized: string` - `held: string` - `total: string` - `held: string` 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: string` 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: string` Total amount of receipt token collateralized across this user's borrowing portfolio - `extra: object { text, value }` - `text: object { collateralized, held, total }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `collateralized: string` - `held: string` - `total: string` - `value: object { collateralized, extra, held, 2 more }` 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: string` - `extra: object { text }` - `text: object { collateralized, held, price, total }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `collateralized: string` - `held: string` - `price: string` Text representation of price - `total: string` - `held: string` - `price: string` Price used in value calculations - `total: string` - `held: string` Total amount of receipt token held in address balance - `total: string` Sum of receipt amount held and receipt amount collateralized ### User Lend Market - `UserLendMarket = object { asset_pools, net_rate }` - `asset_pools: array of 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: string` - `group: "native" or "token"` - `"native"` - `"token"` - `group_key: string` - `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. - `Regular = object { kind, neptune_receipt_asset }` - `kind: "regular"` - `"regular"` - `neptune_receipt_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) - `NeptuneReceiptToken = object { kind, origin_asset }` - `kind: "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) - `LiquidStakingToken = object { kind, origin_asset }` - `kind: "liquid_staking_token"` - `"liquid_staking_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) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: number` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: number` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: string` Full name of the asset - `symbol: string` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: string` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `market_rate: MarketRate` Current market lending rate - `apr: string` Market rate in APR standard as a decimal percentage - `apy: string` Market rate in APY standard as a decimal percentage - `extra: object { text }` - `text: object { apr, apy }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `apr: string` - `apy: string` - `origin_equivalent: UserLendOriginAmounts` The lending amounts converted into the equivalent for the receipt token's origin/source asset - `collateralized: string` 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: object { text }` - `text: object { collateralized, held, total }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `collateralized: string` - `held: string` - `total: string` - `held: string` 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: string` 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: string` Total amount of receipt token collateralized across this user's borrowing portfolio - `extra: object { text, value }` - `text: object { collateralized, held, total }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `collateralized: string` - `held: string` - `total: string` - `value: object { collateralized, extra, held, 2 more }` 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: string` - `extra: object { text }` - `text: object { collateralized, held, price, total }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `collateralized: string` - `held: string` - `price: string` Text representation of price - `total: string` - `held: string` - `price: string` Price used in value calculations - `total: string` - `held: string` Total amount of receipt token held in address balance - `total: string` Sum of receipt amount held and receipt amount collateralized - `net_rate: MarketRate` Account debt net rate ### User Lend Origin Amounts - `UserLendOriginAmounts = object { collateralized, extra, held, total }` - `collateralized: string` 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: object { text }` - `text: object { collateralized, held, total }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `collateralized: string` - `held: string` - `total: string` - `held: string` 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: string` 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 - `UserLendReceiptAmounts = object { collateralized, extra, held, total }` - `collateralized: string` Total amount of receipt token collateralized across this user's borrowing portfolio - `extra: object { text, value }` - `text: object { collateralized, held, total }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `collateralized: string` - `held: string` - `total: string` - `value: object { collateralized, extra, held, 2 more }` 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: string` - `extra: object { text }` - `text: object { collateralized, held, price, total }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `collateralized: string` - `held: string` - `price: string` Text representation of price - `total: string` - `held: string` - `price: string` Price used in value calculations - `total: string` - `held: string` Total amount of receipt token held in address balance - `total: string` Sum of receipt amount held and receipt amount collateralized # Borrow ## Get user borrow portfolio **get** `/api/v1/users/{address}/markets/borrow` Get user borrow portfolio ### Path Parameters - `address: string` The user account address ### Query Parameters - `with_text: optional boolean` Include text variation fields - `with_value: optional boolean` Calculate and include USD values for amounts, where applicable ### Returns - `data: UserBorrowMarket` - `accounts: array of UserBorrowMarketAccount` Market sub-accounts for the user - `collaterals: array of UserCollateralAssetPool` Account collateral allocations - `amount: string` 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: string` - `group: "native" or "token"` - `"native"` - `"token"` - `group_key: string` - `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. - `Regular = object { kind, neptune_receipt_asset }` - `kind: "regular"` - `"regular"` - `neptune_receipt_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) - `NeptuneReceiptToken = object { kind, origin_asset }` - `kind: "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) - `LiquidStakingToken = object { kind, origin_asset }` - `kind: "liquid_staking_token"` - `"liquid_staking_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) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: number` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: number` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: string` Full name of the asset - `symbol: string` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: string` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `extra: object { text, value }` - `text: object { amount }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: string` - `value: object { amount, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `debts: array of UserDebtAssetPool` Account debt allocations - `asset_info: AssetInfo` Asset identifiers with associated metadata - `extra: object { text, value }` - `text: object { principal, shares }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `principal: string` - `shares: string` - `value: object { extra, price, principal, shares }` 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: object { text }` - `text: object { price, principal, shares }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: string` Text representation of price - `principal: string` - `shares: string` - `price: string` Price used in value calculations - `principal: string` - `shares: string` - `market_rate: MarketRate` Current market borrowing rate - `apr: string` Market rate in APR standard as a decimal percentage - `apy: string` Market rate in APY standard as a decimal percentage - `extra: object { text }` - `text: object { apr, apy }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `apr: string` - `apy: string` - `principal: string` Initial amount borrowed (of debts which have not yet been repaid) - `shares: string` - `debts_net_rate: MarketRate` Account debt net rate - `health: UserAccountHealth` Health data for this account - `base: string` Account health value, before any added health boosts - `boost: string` Account health boost to be applied - `extra: object { text }` - `text: object { base, boost, result }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `base: string` - `boost: string` - `result: string` - `result: string` Account health, with boost - `index: number` Account index - `totals: UserBorrowMarketPools` Collateral/debt totals of all sub-accounts by asset - `collaterals: array of UserCollateralAssetPool` Account collateral allocations - `amount: string` Amount of this asset which is actively collateralized - `asset_info: AssetInfo` Asset identifiers with associated metadata - `extra: object { text, value }` - `debts: array of UserDebtAssetPool` Account debt allocations - `asset_info: AssetInfo` Asset identifiers with associated metadata - `extra: object { text, value }` - `market_rate: MarketRate` Current market borrowing rate - `principal: string` Initial amount borrowed (of debts which have not yet been repaid) - `shares: string` - `debts_net_rate: MarketRate` Account debt net rate - `error: unknown` Error data. Guaranteed `null` for successful response. - `status: number` HTTP status. Successful responses are guaranteed to be < `400`. Conversely, error responses are guaranteed to be >= `400`. - `status_text: string` HTTP status text ### Example ```http curl https://api-v2.nept.finance/api/v1/users/$ADDRESS/markets/borrow ``` #### 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 **get** `/api/v1/users/{address}/markets/borrow/lookup/collateral` Lookup user borrow market collateral accounts by asset ### Path Parameters - `address: string` The user account address ### Query Parameters - `asset_id: string` Asset ID for lookup - `with_text: optional boolean` Include text variation fields - `with_value: optional boolean` Calculate and include USD values for amounts, where applicable ### Returns - `data: object { accounts, asset_info }` - `accounts: array of UserCollateralAccountPool` All collateral subaccounts for the associated asset type - `amount: string` Amount of this asset which is actively collateralized - `extra: object { text, value }` - `text: object { amount }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: string` - `value: object { amount, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `index: number` 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: string` - `group: "native" or "token"` - `"native"` - `"token"` - `group_key: string` - `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. - `Regular = object { kind, neptune_receipt_asset }` - `kind: "regular"` - `"regular"` - `neptune_receipt_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) - `NeptuneReceiptToken = object { kind, origin_asset }` - `kind: "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) - `LiquidStakingToken = object { kind, origin_asset }` - `kind: "liquid_staking_token"` - `"liquid_staking_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) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: number` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: number` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: string` Full name of the asset - `symbol: string` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: string` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `error: unknown` Error data. Guaranteed `null` for successful response. - `status: number` HTTP status. Successful responses are guaranteed to be < `400`. Conversely, error responses are guaranteed to be >= `400`. - `status_text: string` HTTP status text ### Example ```http curl https://api-v2.nept.finance/api/v1/users/$ADDRESS/markets/borrow/lookup/collateral ``` #### 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 **get** `/api/v1/users/{address}/markets/borrow/lookup/debt` Lookup user borrow market debt accounts by asset ### Path Parameters - `address: string` The user account address ### Query Parameters - `asset_id: string` Asset ID for lookup - `with_text: optional boolean` Include text variation fields - `with_value: optional boolean` Calculate and include USD values for amounts, where applicable ### Returns - `data: object { accounts, asset_info, market_rate }` - `accounts: array of UserDebtAccountPool` All debt subaccounts for the associated asset type - `extra: object { text, value }` - `text: object { principal, shares }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `principal: string` - `shares: string` - `value: object { extra, price, principal, shares }` 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: object { text }` - `text: object { price, principal, shares }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: string` Text representation of price - `principal: string` - `shares: string` - `price: string` Price used in value calculations - `principal: string` - `shares: string` - `index: number` Account index - `principal: string` Initial amount borrowed (of debts which have not yet been repaid) - `shares: string` - `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: string` - `group: "native" or "token"` - `"native"` - `"token"` - `group_key: string` - `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. - `Regular = object { kind, neptune_receipt_asset }` - `kind: "regular"` - `"regular"` - `neptune_receipt_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) - `NeptuneReceiptToken = object { kind, origin_asset }` - `kind: "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) - `LiquidStakingToken = object { kind, origin_asset }` - `kind: "liquid_staking_token"` - `"liquid_staking_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) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: number` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: number` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: string` Full name of the asset - `symbol: string` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: string` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `market_rate: MarketRate` Current market borrowing rate - `apr: string` Market rate in APR standard as a decimal percentage - `apy: string` Market rate in APY standard as a decimal percentage - `extra: object { text }` - `text: object { apr, apy }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `apr: string` - `apy: string` - `error: unknown` Error data. Guaranteed `null` for successful response. - `status: number` HTTP status. Successful responses are guaranteed to be < `400`. Conversely, error responses are guaranteed to be >= `400`. - `status_text: string` HTTP status text ### Example ```http curl https://api-v2.nept.finance/api/v1/users/$ADDRESS/markets/borrow/lookup/debt ``` #### 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 **get** `/api/v1/users/{address}/markets/borrow/sum/collaterals` Get user combined collaterals for all subaccounts ### Path Parameters - `address: string` The user account address ### Query Parameters - `with_text: optional boolean` Include text variation fields - `with_value: optional boolean` Calculate and include USD values for amounts, where applicable ### Returns - `count: number` Total number of objects irrespective of any pagination parameters. - `data: array of UserCollateralAssetPool` - `amount: string` 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: string` - `group: "native" or "token"` - `"native"` - `"token"` - `group_key: string` - `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. - `Regular = object { kind, neptune_receipt_asset }` - `kind: "regular"` - `"regular"` - `neptune_receipt_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) - `NeptuneReceiptToken = object { kind, origin_asset }` - `kind: "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) - `LiquidStakingToken = object { kind, origin_asset }` - `kind: "liquid_staking_token"` - `"liquid_staking_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) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: number` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: number` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: string` Full name of the asset - `symbol: string` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: string` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `extra: object { text, value }` - `text: object { amount }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: string` - `value: object { amount, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `error: unknown` Error data. Guaranteed `null` for successful response. - `status: number` HTTP status. Successful responses are guaranteed to be < `400`. Conversely, error responses are guaranteed to be >= `400`. - `status_text: string` HTTP status text ### Example ```http curl https://api-v2.nept.finance/api/v1/users/$ADDRESS/markets/borrow/sum/collaterals ``` #### 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 **get** `/api/v1/users/{address}/markets/borrow/sum/debts` Get user combined debts for all subaccounts ### Path Parameters - `address: string` The user account address ### Query Parameters - `with_text: optional boolean` Include text variation fields - `with_value: optional boolean` Calculate and include USD values for amounts, where applicable ### Returns - `count: number` Total number of objects irrespective of any pagination parameters. - `data: array of 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: string` - `group: "native" or "token"` - `"native"` - `"token"` - `group_key: string` - `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. - `Regular = object { kind, neptune_receipt_asset }` - `kind: "regular"` - `"regular"` - `neptune_receipt_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) - `NeptuneReceiptToken = object { kind, origin_asset }` - `kind: "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) - `LiquidStakingToken = object { kind, origin_asset }` - `kind: "liquid_staking_token"` - `"liquid_staking_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) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: number` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: number` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: string` Full name of the asset - `symbol: string` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: string` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `extra: object { text, value }` - `text: object { principal, shares }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `principal: string` - `shares: string` - `value: object { extra, price, principal, shares }` 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: object { text }` - `text: object { price, principal, shares }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: string` Text representation of price - `principal: string` - `shares: string` - `price: string` Price used in value calculations - `principal: string` - `shares: string` - `market_rate: MarketRate` Current market borrowing rate - `apr: string` Market rate in APR standard as a decimal percentage - `apy: string` Market rate in APY standard as a decimal percentage - `extra: object { text }` - `text: object { apr, apy }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `apr: string` - `apy: string` - `principal: string` Initial amount borrowed (of debts which have not yet been repaid) - `shares: string` - `error: unknown` Error data. Guaranteed `null` for successful response. - `status: number` HTTP status. Successful responses are guaranteed to be < `400`. Conversely, error responses are guaranteed to be >= `400`. - `status_text: string` HTTP status text ### Example ```http curl https://api-v2.nept.finance/api/v1/users/$ADDRESS/markets/borrow/sum/debts ``` #### 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 - `UserBorrowMarket = object { accounts, totals }` - `accounts: array of UserBorrowMarketAccount` Market sub-accounts for the user - `collaterals: array of UserCollateralAssetPool` Account collateral allocations - `amount: string` 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: string` - `group: "native" or "token"` - `"native"` - `"token"` - `group_key: string` - `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. - `Regular = object { kind, neptune_receipt_asset }` - `kind: "regular"` - `"regular"` - `neptune_receipt_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) - `NeptuneReceiptToken = object { kind, origin_asset }` - `kind: "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) - `LiquidStakingToken = object { kind, origin_asset }` - `kind: "liquid_staking_token"` - `"liquid_staking_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) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: number` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: number` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: string` Full name of the asset - `symbol: string` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: string` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `extra: object { text, value }` - `text: object { amount }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: string` - `value: object { amount, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `debts: array of UserDebtAssetPool` Account debt allocations - `asset_info: AssetInfo` Asset identifiers with associated metadata - `extra: object { text, value }` - `text: object { principal, shares }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `principal: string` - `shares: string` - `value: object { extra, price, principal, shares }` 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: object { text }` - `text: object { price, principal, shares }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: string` Text representation of price - `principal: string` - `shares: string` - `price: string` Price used in value calculations - `principal: string` - `shares: string` - `market_rate: MarketRate` Current market borrowing rate - `apr: string` Market rate in APR standard as a decimal percentage - `apy: string` Market rate in APY standard as a decimal percentage - `extra: object { text }` - `text: object { apr, apy }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `apr: string` - `apy: string` - `principal: string` Initial amount borrowed (of debts which have not yet been repaid) - `shares: string` - `debts_net_rate: MarketRate` Account debt net rate - `health: UserAccountHealth` Health data for this account - `base: string` Account health value, before any added health boosts - `boost: string` Account health boost to be applied - `extra: object { text }` - `text: object { base, boost, result }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `base: string` - `boost: string` - `result: string` - `result: string` Account health, with boost - `index: number` Account index - `totals: UserBorrowMarketPools` Collateral/debt totals of all sub-accounts by asset - `collaterals: array of UserCollateralAssetPool` Account collateral allocations - `amount: string` Amount of this asset which is actively collateralized - `asset_info: AssetInfo` Asset identifiers with associated metadata - `extra: object { text, value }` - `debts: array of UserDebtAssetPool` Account debt allocations - `asset_info: AssetInfo` Asset identifiers with associated metadata - `extra: object { text, value }` - `market_rate: MarketRate` Current market borrowing rate - `principal: string` Initial amount borrowed (of debts which have not yet been repaid) - `shares: string` - `debts_net_rate: MarketRate` Account debt net rate ### User Borrow Market Pools - `UserBorrowMarketPools = object { collaterals, debts, debts_net_rate }` - `collaterals: array of UserCollateralAssetPool` Account collateral allocations - `amount: string` 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: string` - `group: "native" or "token"` - `"native"` - `"token"` - `group_key: string` - `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. - `Regular = object { kind, neptune_receipt_asset }` - `kind: "regular"` - `"regular"` - `neptune_receipt_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) - `NeptuneReceiptToken = object { kind, origin_asset }` - `kind: "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) - `LiquidStakingToken = object { kind, origin_asset }` - `kind: "liquid_staking_token"` - `"liquid_staking_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) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: number` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: number` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: string` Full name of the asset - `symbol: string` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: string` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `extra: object { text, value }` - `text: object { amount }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: string` - `value: object { amount, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `debts: array of UserDebtAssetPool` Account debt allocations - `asset_info: AssetInfo` Asset identifiers with associated metadata - `extra: object { text, value }` - `text: object { principal, shares }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `principal: string` - `shares: string` - `value: object { extra, price, principal, shares }` 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: object { text }` - `text: object { price, principal, shares }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: string` Text representation of price - `principal: string` - `shares: string` - `price: string` Price used in value calculations - `principal: string` - `shares: string` - `market_rate: MarketRate` Current market borrowing rate - `apr: string` Market rate in APR standard as a decimal percentage - `apy: string` Market rate in APY standard as a decimal percentage - `extra: object { text }` - `text: object { apr, apy }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `apr: string` - `apy: string` - `principal: string` Initial amount borrowed (of debts which have not yet been repaid) - `shares: string` - `debts_net_rate: MarketRate` Account debt net rate # Subaccount ## Get user borrow subaccount **get** `/api/v1/users/{address}/markets/borrow/accounts/{index}` Get user borrow subaccount ### Path Parameters - `address: string` The user account address - `index: number` The user account index ### Query Parameters - `with_text: optional boolean` Include text variation fields - `with_value: optional boolean` Calculate and include USD values for amounts, where applicable ### Returns - `data: UserBorrowMarketAccount` User borrowing subaccount - `collaterals: array of UserCollateralAssetPool` Account collateral allocations - `amount: string` 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: string` - `group: "native" or "token"` - `"native"` - `"token"` - `group_key: string` - `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. - `Regular = object { kind, neptune_receipt_asset }` - `kind: "regular"` - `"regular"` - `neptune_receipt_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) - `NeptuneReceiptToken = object { kind, origin_asset }` - `kind: "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) - `LiquidStakingToken = object { kind, origin_asset }` - `kind: "liquid_staking_token"` - `"liquid_staking_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) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: number` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: number` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: string` Full name of the asset - `symbol: string` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: string` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `extra: object { text, value }` - `text: object { amount }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: string` - `value: object { amount, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `debts: array of UserDebtAssetPool` Account debt allocations - `asset_info: AssetInfo` Asset identifiers with associated metadata - `extra: object { text, value }` - `text: object { principal, shares }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `principal: string` - `shares: string` - `value: object { extra, price, principal, shares }` 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: object { text }` - `text: object { price, principal, shares }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: string` Text representation of price - `principal: string` - `shares: string` - `price: string` Price used in value calculations - `principal: string` - `shares: string` - `market_rate: MarketRate` Current market borrowing rate - `apr: string` Market rate in APR standard as a decimal percentage - `apy: string` Market rate in APY standard as a decimal percentage - `extra: object { text }` - `text: object { apr, apy }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `apr: string` - `apy: string` - `principal: string` Initial amount borrowed (of debts which have not yet been repaid) - `shares: string` - `debts_net_rate: MarketRate` Account debt net rate - `health: UserAccountHealth` Health data for this account - `base: string` Account health value, before any added health boosts - `boost: string` Account health boost to be applied - `extra: object { text }` - `text: object { base, boost, result }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `base: string` - `boost: string` - `result: string` - `result: string` Account health, with boost - `index: number` Account index - `error: unknown` Error data. Guaranteed `null` for successful response. - `status: number` HTTP status. Successful responses are guaranteed to be < `400`. Conversely, error responses are guaranteed to be >= `400`. - `status_text: string` HTTP status text ### Example ```http curl https://api-v2.nept.finance/api/v1/users/$ADDRESS/markets/borrow/accounts/$INDEX ``` #### 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 **get** `/api/v1/users/{address}/markets/borrow/accounts/{index}/health` Get user borrow subaccount health ### Path Parameters - `address: string` The user account address - `index: number` The user account index ### Query Parameters - `with_text: optional boolean` Include text variation fields ### Returns - `data: UserAccountHealth` - `base: string` Account health value, before any added health boosts - `boost: string` Account health boost to be applied - `extra: object { text }` - `text: object { base, boost, result }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `base: string` - `boost: string` - `result: string` - `result: string` Account health, with boost - `error: unknown` Error data. Guaranteed `null` for successful response. - `status: number` HTTP status. Successful responses are guaranteed to be < `400`. Conversely, error responses are guaranteed to be >= `400`. - `status_text: string` HTTP status text ### Example ```http curl https://api-v2.nept.finance/api/v1/users/$ADDRESS/markets/borrow/accounts/$INDEX/health ``` #### 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 **get** `/api/v1/users/{address}/markets/borrow/accounts/{index}/collaterals` Get user borrow subaccount collaterals ### Path Parameters - `address: string` The user account address - `index: number` The user account index ### Query Parameters - `with_text: optional boolean` Include text variation fields - `with_value: optional boolean` Calculate and include USD values for amounts, where applicable ### Returns - `count: number` Total number of objects irrespective of any pagination parameters. - `data: array of UserCollateralAssetPool` - `amount: string` 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: string` - `group: "native" or "token"` - `"native"` - `"token"` - `group_key: string` - `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. - `Regular = object { kind, neptune_receipt_asset }` - `kind: "regular"` - `"regular"` - `neptune_receipt_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) - `NeptuneReceiptToken = object { kind, origin_asset }` - `kind: "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) - `LiquidStakingToken = object { kind, origin_asset }` - `kind: "liquid_staking_token"` - `"liquid_staking_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) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: number` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: number` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: string` Full name of the asset - `symbol: string` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: string` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `extra: object { text, value }` - `text: object { amount }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: string` - `value: object { amount, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `error: unknown` Error data. Guaranteed `null` for successful response. - `status: number` HTTP status. Successful responses are guaranteed to be < `400`. Conversely, error responses are guaranteed to be >= `400`. - `status_text: string` HTTP status text ### Example ```http curl https://api-v2.nept.finance/api/v1/users/$ADDRESS/markets/borrow/accounts/$INDEX/collaterals ``` #### 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 **get** `/api/v1/users/{address}/markets/borrow/accounts/{index}/debts` Get user borrow subaccount debts ### Path Parameters - `address: string` The user account address - `index: number` The user account index ### Query Parameters - `with_text: optional boolean` Include text variation fields - `with_value: optional boolean` Calculate and include USD values for amounts, where applicable ### Returns - `count: number` Total number of objects irrespective of any pagination parameters. - `data: array of 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: string` - `group: "native" or "token"` - `"native"` - `"token"` - `group_key: string` - `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. - `Regular = object { kind, neptune_receipt_asset }` - `kind: "regular"` - `"regular"` - `neptune_receipt_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) - `NeptuneReceiptToken = object { kind, origin_asset }` - `kind: "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) - `LiquidStakingToken = object { kind, origin_asset }` - `kind: "liquid_staking_token"` - `"liquid_staking_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) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: number` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: number` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: string` Full name of the asset - `symbol: string` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: string` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `extra: object { text, value }` - `text: object { principal, shares }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `principal: string` - `shares: string` - `value: object { extra, price, principal, shares }` 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: object { text }` - `text: object { price, principal, shares }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: string` Text representation of price - `principal: string` - `shares: string` - `price: string` Price used in value calculations - `principal: string` - `shares: string` - `market_rate: MarketRate` Current market borrowing rate - `apr: string` Market rate in APR standard as a decimal percentage - `apy: string` Market rate in APY standard as a decimal percentage - `extra: object { text }` - `text: object { apr, apy }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `apr: string` - `apy: string` - `principal: string` Initial amount borrowed (of debts which have not yet been repaid) - `shares: string` - `error: unknown` Error data. Guaranteed `null` for successful response. - `status: number` HTTP status. Successful responses are guaranteed to be < `400`. Conversely, error responses are guaranteed to be >= `400`. - `status_text: string` HTTP status text ### Example ```http curl https://api-v2.nept.finance/api/v1/users/$ADDRESS/markets/borrow/accounts/$INDEX/debts ``` #### 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 - `UserAccountHealth = object { base, boost, extra, result }` - `base: string` Account health value, before any added health boosts - `boost: string` Account health boost to be applied - `extra: object { text }` - `text: object { base, boost, result }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `base: string` - `boost: string` - `result: string` - `result: string` Account health, with boost ### User Borrow Market Account - `UserBorrowMarketAccount = object { collaterals, debts, debts_net_rate, 2 more }` User borrowing subaccount - `collaterals: array of UserCollateralAssetPool` Account collateral allocations - `amount: string` 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: string` - `group: "native" or "token"` - `"native"` - `"token"` - `group_key: string` - `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. - `Regular = object { kind, neptune_receipt_asset }` - `kind: "regular"` - `"regular"` - `neptune_receipt_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) - `NeptuneReceiptToken = object { kind, origin_asset }` - `kind: "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) - `LiquidStakingToken = object { kind, origin_asset }` - `kind: "liquid_staking_token"` - `"liquid_staking_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) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: number` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: number` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: string` Full name of the asset - `symbol: string` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: string` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `extra: object { text, value }` - `text: object { amount }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: string` - `value: object { amount, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `debts: array of UserDebtAssetPool` Account debt allocations - `asset_info: AssetInfo` Asset identifiers with associated metadata - `extra: object { text, value }` - `text: object { principal, shares }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `principal: string` - `shares: string` - `value: object { extra, price, principal, shares }` 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: object { text }` - `text: object { price, principal, shares }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: string` Text representation of price - `principal: string` - `shares: string` - `price: string` Price used in value calculations - `principal: string` - `shares: string` - `market_rate: MarketRate` Current market borrowing rate - `apr: string` Market rate in APR standard as a decimal percentage - `apy: string` Market rate in APY standard as a decimal percentage - `extra: object { text }` - `text: object { apr, apy }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `apr: string` - `apy: string` - `principal: string` Initial amount borrowed (of debts which have not yet been repaid) - `shares: string` - `debts_net_rate: MarketRate` Account debt net rate - `health: UserAccountHealth` Health data for this account - `base: string` Account health value, before any added health boosts - `boost: string` Account health boost to be applied - `extra: object { text }` - `text: object { base, boost, result }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `base: string` - `boost: string` - `result: string` - `result: string` Account health, with boost - `index: number` Account index ### User Collateral Account Pool - `UserCollateralAccountPool = object { amount, extra, index }` 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: string` Amount of this asset which is actively collateralized - `extra: object { text, value }` - `text: object { amount }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: string` - `value: object { amount, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `index: number` Account index ### User Collateral Asset Pool - `UserCollateralAssetPool = object { amount, asset_info, extra }` - `amount: string` 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: string` - `group: "native" or "token"` - `"native"` - `"token"` - `group_key: string` - `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. - `Regular = object { kind, neptune_receipt_asset }` - `kind: "regular"` - `"regular"` - `neptune_receipt_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) - `NeptuneReceiptToken = object { kind, origin_asset }` - `kind: "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) - `LiquidStakingToken = object { kind, origin_asset }` - `kind: "liquid_staking_token"` - `"liquid_staking_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) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: number` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: number` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: string` Full name of the asset - `symbol: string` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: string` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `extra: object { text, value }` - `text: object { amount }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: string` - `value: object { amount, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: string` - `price: string` Text representation of price - `price: string` Price used in value calculations ### User Debt Account Pool - `UserDebtAccountPool = object { extra, index, principal, shares }` 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: object { text, value }` - `text: object { principal, shares }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `principal: string` - `shares: string` - `value: object { extra, price, principal, shares }` 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: object { text }` - `text: object { price, principal, shares }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: string` Text representation of price - `principal: string` - `shares: string` - `price: string` Price used in value calculations - `principal: string` - `shares: string` - `index: number` Account index - `principal: string` Initial amount borrowed (of debts which have not yet been repaid) - `shares: string` ### User Debt Asset Pool - `UserDebtAssetPool = object { asset_info, extra, market_rate, 2 more }` - `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: string` - `group: "native" or "token"` - `"native"` - `"token"` - `group_key: string` - `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. - `Regular = object { kind, neptune_receipt_asset }` - `kind: "regular"` - `"regular"` - `neptune_receipt_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) - `NeptuneReceiptToken = object { kind, origin_asset }` - `kind: "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) - `LiquidStakingToken = object { kind, origin_asset }` - `kind: "liquid_staking_token"` - `"liquid_staking_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) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: number` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: number` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: string` Full name of the asset - `symbol: string` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: string` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `extra: object { text, value }` - `text: object { principal, shares }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `principal: string` - `shares: string` - `value: object { extra, price, principal, shares }` 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: object { text }` - `text: object { price, principal, shares }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: string` Text representation of price - `principal: string` - `shares: string` - `price: string` Price used in value calculations - `principal: string` - `shares: string` - `market_rate: MarketRate` Current market borrowing rate - `apr: string` Market rate in APR standard as a decimal percentage - `apy: string` Market rate in APY standard as a decimal percentage - `extra: object { text }` - `text: object { apr, apy }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `apr: string` - `apy: string` - `principal: string` Initial amount borrowed (of debts which have not yet been repaid) - `shares: string` # Nept ## Get user NEPT unlocks **get** `/api/v1/users/{address}/nept/unlocks` Get user NEPT unlocks ### Path Parameters - `address: string` The user account address ### Query Parameters - `with_percent: optional boolean` Calculate and include proportional percentages, where applicable - `with_text: optional boolean` Include text variation fields - `with_value: optional boolean` Calculate and include USD values for amounts, where applicable ### Returns - `data: UserUnlockOverview` - `arrangements: array of object { admin, amounts, begins_at, 4 more }` A list of the user's active unlock arrangements - `admin: object { address, issued_reclaim }` The admin of the unlock, if any - `address: string` The address of the unlock arrangement's admin - `issued_reclaim: boolean` True if the admin his issued a reclaim on the unlock arrangement - `amounts: UserUnlockAmounts` Primary unlock amount and other pre-calculated/derived amounts - `amount: string` The full unlock amount This value is immutable and does not change with regards to expiry/reclamation/lock states. - `claimable: string` 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: string` The amount that has already been successfully claimed by the user. - `expired: string` The amount that was claimable but has now expired due to the presence and subsequent passing of `expires_at` - `extra: object { percent, text, value }` - `percent: object { claimable, claimed, expired, 3 more }` 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: string` - `claimed: string` - `expired: string` - `extra: object { text }` - `text: object { claimable, claimed, expired, 2 more }` Human-readable variants of percentages for unlock amounts. Will not be null when query params `with_text` and `with_percent` are `true`. - `claimable: string` - `claimed: string` - `expired: string` - `locked: string` - `reclaimed: string` - `locked: string` - `reclaimed: string` - `text: object { amount, claimable, claimed, 3 more }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: string` - `claimable: string` - `claimed: string` - `expired: string` - `locked: string` - `reclaimed: string` - `value: object { amount, claimable, claimed, 5 more }` 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: string` - `claimable: string` - `claimed: string` - `expired: string` - `extra: object { text }` - `text: object { amount, claimable, claimed, 4 more }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: string` - `claimable: string` - `claimed: string` - `expired: string` - `locked: string` - `price: string` Text representation of price - `reclaimed: string` - `locked: string` - `price: string` Price used in value calculations - `reclaimed: string` - `locked: string` 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: string` The amount that has been reclaimed from the unlock arrangement admin - `begins_at: string` The time at which the unlock begins - `expires_at: string` The time at which the unlock expires, if any - `extra: object { text }` - `text: object { begins_at, expires_at, last_claimed_at }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `begins_at: string` - `expires_at: string` - `last_claimed_at: string` - `last_claimed_at: string` The time at which the unlock was last claimed, if any - `schedule: UserUnlockSchedule` The schedule of the unlock - `UserUnlockScheduleLinear = object { duration, ends_at, extra, kind }` - `duration: number` The duration of the unlock in seconds - `ends_at: string` 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: object { text }` - `text: object { duration, ends_at }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `duration: string` - `ends_at: string` - `kind: "linear"` - `"linear"` - `UserUnlockScheduleLumpSum = object { kind }` - `kind: "lump_sum"` - `"lump_sum"` - `extra: object { text }` - `text: object { last_claimed_at }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `last_claimed_at: string` - `last_claimed_at: string` The time at which the most recent unlock claim occurred, if any - `totals: UserUnlockAmounts` Contains pre-calculated total amounts for all unlock agreements - `error: unknown` Error data. Guaranteed `null` for successful response. - `status: number` HTTP status. Successful responses are guaranteed to be < `400`. Conversely, error responses are guaranteed to be >= `400`. - `status_text: string` HTTP status text ### Example ```http curl https://api-v2.nept.finance/api/v1/users/$ADDRESS/nept/unlocks ``` #### 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 - `UserUnlockAmounts = object { amount, claimable, claimed, 4 more }` - `amount: string` The full unlock amount This value is immutable and does not change with regards to expiry/reclamation/lock states. - `claimable: string` 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: string` The amount that has already been successfully claimed by the user. - `expired: string` The amount that was claimable but has now expired due to the presence and subsequent passing of `expires_at` - `extra: object { percent, text, value }` - `percent: object { claimable, claimed, expired, 3 more }` 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: string` - `claimed: string` - `expired: string` - `extra: object { text }` - `text: object { claimable, claimed, expired, 2 more }` Human-readable variants of percentages for unlock amounts. Will not be null when query params `with_text` and `with_percent` are `true`. - `claimable: string` - `claimed: string` - `expired: string` - `locked: string` - `reclaimed: string` - `locked: string` - `reclaimed: string` - `text: object { amount, claimable, claimed, 3 more }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: string` - `claimable: string` - `claimed: string` - `expired: string` - `locked: string` - `reclaimed: string` - `value: object { amount, claimable, claimed, 5 more }` 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: string` - `claimable: string` - `claimed: string` - `expired: string` - `extra: object { text }` - `text: object { amount, claimable, claimed, 4 more }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: string` - `claimable: string` - `claimed: string` - `expired: string` - `locked: string` - `price: string` Text representation of price - `reclaimed: string` - `locked: string` - `price: string` Price used in value calculations - `reclaimed: string` - `locked: string` 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: string` The amount that has been reclaimed from the unlock arrangement admin ### User Unlock Overview - `UserUnlockOverview = object { arrangements, extra, last_claimed_at, totals }` - `arrangements: array of object { admin, amounts, begins_at, 4 more }` A list of the user's active unlock arrangements - `admin: object { address, issued_reclaim }` The admin of the unlock, if any - `address: string` The address of the unlock arrangement's admin - `issued_reclaim: boolean` True if the admin his issued a reclaim on the unlock arrangement - `amounts: UserUnlockAmounts` Primary unlock amount and other pre-calculated/derived amounts - `amount: string` The full unlock amount This value is immutable and does not change with regards to expiry/reclamation/lock states. - `claimable: string` 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: string` The amount that has already been successfully claimed by the user. - `expired: string` The amount that was claimable but has now expired due to the presence and subsequent passing of `expires_at` - `extra: object { percent, text, value }` - `percent: object { claimable, claimed, expired, 3 more }` 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: string` - `claimed: string` - `expired: string` - `extra: object { text }` - `text: object { claimable, claimed, expired, 2 more }` Human-readable variants of percentages for unlock amounts. Will not be null when query params `with_text` and `with_percent` are `true`. - `claimable: string` - `claimed: string` - `expired: string` - `locked: string` - `reclaimed: string` - `locked: string` - `reclaimed: string` - `text: object { amount, claimable, claimed, 3 more }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: string` - `claimable: string` - `claimed: string` - `expired: string` - `locked: string` - `reclaimed: string` - `value: object { amount, claimable, claimed, 5 more }` 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: string` - `claimable: string` - `claimed: string` - `expired: string` - `extra: object { text }` - `text: object { amount, claimable, claimed, 4 more }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: string` - `claimable: string` - `claimed: string` - `expired: string` - `locked: string` - `price: string` Text representation of price - `reclaimed: string` - `locked: string` - `price: string` Price used in value calculations - `reclaimed: string` - `locked: string` 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: string` The amount that has been reclaimed from the unlock arrangement admin - `begins_at: string` The time at which the unlock begins - `expires_at: string` The time at which the unlock expires, if any - `extra: object { text }` - `text: object { begins_at, expires_at, last_claimed_at }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `begins_at: string` - `expires_at: string` - `last_claimed_at: string` - `last_claimed_at: string` The time at which the unlock was last claimed, if any - `schedule: UserUnlockSchedule` The schedule of the unlock - `UserUnlockScheduleLinear = object { duration, ends_at, extra, kind }` - `duration: number` The duration of the unlock in seconds - `ends_at: string` 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: object { text }` - `text: object { duration, ends_at }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `duration: string` - `ends_at: string` - `kind: "linear"` - `"linear"` - `UserUnlockScheduleLumpSum = object { kind }` - `kind: "lump_sum"` - `"lump_sum"` - `extra: object { text }` - `text: object { last_claimed_at }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `last_claimed_at: string` - `last_claimed_at: string` 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 = UserUnlockScheduleLinear or UserUnlockScheduleLumpSum` - `UserUnlockScheduleLinear = object { duration, ends_at, extra, kind }` - `duration: number` The duration of the unlock in seconds - `ends_at: string` 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: object { text }` - `text: object { duration, ends_at }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `duration: string` - `ends_at: string` - `kind: "linear"` - `"linear"` - `UserUnlockScheduleLumpSum = object { kind }` - `kind: "lump_sum"` - `"lump_sum"` ### User Unlock Schedule Linear - `UserUnlockScheduleLinear = object { duration, ends_at, extra, kind }` - `duration: number` The duration of the unlock in seconds - `ends_at: string` 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: object { text }` - `text: object { duration, ends_at }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `duration: string` - `ends_at: string` - `kind: "linear"` - `"linear"` ### User Unlock Schedule Lump Sum - `UserUnlockScheduleLumpSum = object { kind }` - `kind: "lump_sum"` - `"lump_sum"` # Staking ## Get user staking overview **get** `/api/v1/users/{address}/nept/staking` Get user staking overview ### Path Parameters - `address: string` The user account address ### Query Parameters - `with_text: optional boolean` Include text variation fields - `with_value: optional boolean` Calculate and include USD values for amounts, where applicable ### Returns - `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: string` - `group: "native" or "token"` - `"native"` - `"token"` - `group_key: string` - `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. - `Regular = object { kind, neptune_receipt_asset }` - `kind: "regular"` - `"regular"` - `neptune_receipt_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) - `NeptuneReceiptToken = object { kind, origin_asset }` - `kind: "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) - `LiquidStakingToken = object { kind, origin_asset }` - `kind: "liquid_staking_token"` - `"liquid_staking_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) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: number` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: number` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: string` Full name of the asset - `symbol: string` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: string` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `bonding_sum: string` 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: string` NEPT rewarded from staking that is available yet not claimed by the user - `claimable_unbonding: string` Sum of all unbond/unstake amounts that have completed their lockup period and are ready to be claimed. - `extra: object { text, value }` - `text: object { bonding_sum, claimable_rewards, claimable_unbonding, unclaimed }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `bonding_sum: string` - `claimable_rewards: string` - `claimable_unbonding: string` - `unclaimed: string` - `value: object { bonding_sum, claimable_rewards, claimable_unbonding, 3 more }` 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: string` - `claimable_rewards: string` - `claimable_unbonding: string` - `extra: object { text }` - `text: object { bonding_sum, claimable_rewards, claimable_unbonding, 2 more }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `bonding_sum: string` - `claimable_rewards: string` - `claimable_unbonding: string` - `price: string` Text representation of price - `unclaimed: string` - `price: string` Price used in value calculations - `unclaimed: string` - `pools: array of UserStakePool` User allocations for each staking pool - `amount_sum: string` 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: number` The lockup duration for this pool in seconds - `extra: object { text }` - `text: object { duration, index }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `duration: string` - `index: string` - `index: number` The ordered index (position) of this pool - `params: StakingPoolParams` Staking pool contract parameters - `flash_loan_weight: string` The pool's weight (multiplier) for flash loans volume - `gov_weight: string` The pool's weight (multiplier) on governance for an associated stake - `health_weight: string` The pool's weight (multiplier) on account health for an associated stake - `reward_weight: string` The pool's weight (multiplier) on rewards for an associated stake - `state: StakingPoolState` Current contract state of staking pool - `extra: object { text, value }` - `text: object { total_bonded }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `total_bonded: string` - `value: object { extra, price, total_bonded }` 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: object { text }` - `text: object { price, total_bonded }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: string` Text representation of price - `total_bonded: string` - `price: string` Price used in value calculations - `total_bonded: string` - `total_bonded: string` The total amount staked to this pool - `contents: array of UserStakeBondingEntry` Bonding/stake entries **NOTE:** entries that differ only in amount are merged upon creation - `account_index: number` User account index - `amount: string` Bonding amount - `cascade: boolean` - `extra: object { text, value }` - `text: object { amount, transition_at }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: string` - `transition_at: string` - `value: object { amount, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `last_stake_acc: string` - `transition_at: string` - `extra: object { text, value }` - `text: object { amount_sum }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount_sum: string` - `value: object { amount_sum, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount_sum, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount_sum: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `unbonding: UserStakeUnbonding` User unstake/unbonding data - `amount_sum: string` Total amount of all unbond entries **NOTE:** this value is affected by active filters, if any (e.g. filtering over account index) - `contents: array of 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: string` Unbonding amount - `extra: object { text, value }` - `text: object { amount, unlock_at }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: string` - `unlock_at: string` - `value: object { amount, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `unlock_at: string` Timestamp for when the unstake can be redeemed - `extra: object { text, value }` - `text: object { amount_sum }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount_sum: string` - `value: object { amount_sum, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount_sum, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount_sum: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `unclaimed: string` - `error: unknown` Error data. Guaranteed `null` for successful response. - `status: number` HTTP status. Successful responses are guaranteed to be < `400`. Conversely, error responses are guaranteed to be >= `400`. - `status_text: string` HTTP status text ### Example ```http curl https://api-v2.nept.finance/api/v1/users/$ADDRESS/nept/staking ``` #### 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 **get** `/api/v1/users/{address}/nept/staking/pools` Get user staking pools ### Path Parameters - `address: string` The user account address ### Query Parameters - `with_text: optional boolean` Include text variation fields - `with_value: optional boolean` Calculate and include USD values for amounts, where applicable ### Returns - `count: number` Total number of objects irrespective of any pagination parameters. - `data: array of UserStakePool` - `amount_sum: string` 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: number` The lockup duration for this pool in seconds - `extra: object { text }` - `text: object { duration, index }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `duration: string` - `index: string` - `index: number` The ordered index (position) of this pool - `params: StakingPoolParams` Staking pool contract parameters - `flash_loan_weight: string` The pool's weight (multiplier) for flash loans volume - `gov_weight: string` The pool's weight (multiplier) on governance for an associated stake - `health_weight: string` The pool's weight (multiplier) on account health for an associated stake - `reward_weight: string` The pool's weight (multiplier) on rewards for an associated stake - `state: StakingPoolState` Current contract state of staking pool - `extra: object { text, value }` - `text: object { total_bonded }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `total_bonded: string` - `value: object { extra, price, total_bonded }` 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: object { text }` - `text: object { price, total_bonded }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: string` Text representation of price - `total_bonded: string` - `price: string` Price used in value calculations - `total_bonded: string` - `total_bonded: string` The total amount staked to this pool - `contents: array of UserStakeBondingEntry` Bonding/stake entries **NOTE:** entries that differ only in amount are merged upon creation - `account_index: number` User account index - `amount: string` Bonding amount - `cascade: boolean` - `extra: object { text, value }` - `text: object { amount, transition_at }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: string` - `transition_at: string` - `value: object { amount, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `last_stake_acc: string` - `transition_at: string` - `extra: object { text, value }` - `text: object { amount_sum }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount_sum: string` - `value: object { amount_sum, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount_sum, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount_sum: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `error: unknown` Error data. Guaranteed `null` for successful response. - `status: number` HTTP status. Successful responses are guaranteed to be < `400`. Conversely, error responses are guaranteed to be >= `400`. - `status_text: string` HTTP status text ### Example ```http curl https://api-v2.nept.finance/api/v1/users/$ADDRESS/nept/staking/pools ``` #### 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 **get** `/api/v1/users/{address}/nept/staking/pools/lookup` Get user staking pool by duration/index ### Path Parameters - `address: string` The user account address ### Query Parameters - `duration: optional number` Duration of pool to lookup (**in nanoseconds**) **NOTE:** Either index or duration must be provided. Cannot specify both. - `index: optional number` Index of pool to lookup **NOTE:** Either index or duration must be provided. Cannot specify both. - `with_text: optional boolean` Include text variation fields - `with_value: optional boolean` Calculate and include USD values for amounts, where applicable ### Returns - `data: UserStakePool` - `amount_sum: string` 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: number` The lockup duration for this pool in seconds - `extra: object { text }` - `text: object { duration, index }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `duration: string` - `index: string` - `index: number` The ordered index (position) of this pool - `params: StakingPoolParams` Staking pool contract parameters - `flash_loan_weight: string` The pool's weight (multiplier) for flash loans volume - `gov_weight: string` The pool's weight (multiplier) on governance for an associated stake - `health_weight: string` The pool's weight (multiplier) on account health for an associated stake - `reward_weight: string` The pool's weight (multiplier) on rewards for an associated stake - `state: StakingPoolState` Current contract state of staking pool - `extra: object { text, value }` - `text: object { total_bonded }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `total_bonded: string` - `value: object { extra, price, total_bonded }` 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: object { text }` - `text: object { price, total_bonded }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: string` Text representation of price - `total_bonded: string` - `price: string` Price used in value calculations - `total_bonded: string` - `total_bonded: string` The total amount staked to this pool - `contents: array of UserStakeBondingEntry` Bonding/stake entries **NOTE:** entries that differ only in amount are merged upon creation - `account_index: number` User account index - `amount: string` Bonding amount - `cascade: boolean` - `extra: object { text, value }` - `text: object { amount, transition_at }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: string` - `transition_at: string` - `value: object { amount, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `last_stake_acc: string` - `transition_at: string` - `extra: object { text, value }` - `text: object { amount_sum }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount_sum: string` - `value: object { amount_sum, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount_sum, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount_sum: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `error: unknown` Error data. Guaranteed `null` for successful response. - `status: number` HTTP status. Successful responses are guaranteed to be < `400`. Conversely, error responses are guaranteed to be >= `400`. - `status_text: string` HTTP status text ### Example ```http curl https://api-v2.nept.finance/api/v1/users/$ADDRESS/nept/staking/pools/lookup ``` #### 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 **get** `/api/v1/users/{address}/nept/staking/unstaking` Get user unstaking pool ### Path Parameters - `address: string` The user account address ### Query Parameters - `with_text: optional boolean` Include text variation fields - `with_value: optional boolean` Calculate and include USD values for amounts, where applicable ### Returns - `data: UserStakeUnbonding` - `amount_sum: string` Total amount of all unbond entries **NOTE:** this value is affected by active filters, if any (e.g. filtering over account index) - `contents: array of 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: string` Unbonding amount - `extra: object { text, value }` - `text: object { amount, unlock_at }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: string` - `unlock_at: string` - `value: object { amount, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `unlock_at: string` Timestamp for when the unstake can be redeemed - `extra: object { text, value }` - `text: object { amount_sum }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount_sum: string` - `value: object { amount_sum, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount_sum, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount_sum: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `error: unknown` Error data. Guaranteed `null` for successful response. - `status: number` HTTP status. Successful responses are guaranteed to be < `400`. Conversely, error responses are guaranteed to be >= `400`. - `status_text: string` HTTP status text ### Example ```http curl https://api-v2.nept.finance/api/v1/users/$ADDRESS/nept/staking/unstaking ``` #### 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 - `UserStake = object { asset_info, bonding_sum, claimable_rewards, 5 more }` - `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: string` - `group: "native" or "token"` - `"native"` - `"token"` - `group_key: string` - `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. - `Regular = object { kind, neptune_receipt_asset }` - `kind: "regular"` - `"regular"` - `neptune_receipt_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) - `NeptuneReceiptToken = object { kind, origin_asset }` - `kind: "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) - `LiquidStakingToken = object { kind, origin_asset }` - `kind: "liquid_staking_token"` - `"liquid_staking_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) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: number` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: number` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: string` Full name of the asset - `symbol: string` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: string` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `bonding_sum: string` 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: string` NEPT rewarded from staking that is available yet not claimed by the user - `claimable_unbonding: string` Sum of all unbond/unstake amounts that have completed their lockup period and are ready to be claimed. - `extra: object { text, value }` - `text: object { bonding_sum, claimable_rewards, claimable_unbonding, unclaimed }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `bonding_sum: string` - `claimable_rewards: string` - `claimable_unbonding: string` - `unclaimed: string` - `value: object { bonding_sum, claimable_rewards, claimable_unbonding, 3 more }` 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: string` - `claimable_rewards: string` - `claimable_unbonding: string` - `extra: object { text }` - `text: object { bonding_sum, claimable_rewards, claimable_unbonding, 2 more }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `bonding_sum: string` - `claimable_rewards: string` - `claimable_unbonding: string` - `price: string` Text representation of price - `unclaimed: string` - `price: string` Price used in value calculations - `unclaimed: string` - `pools: array of UserStakePool` User allocations for each staking pool - `amount_sum: string` 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: number` The lockup duration for this pool in seconds - `extra: object { text }` - `text: object { duration, index }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `duration: string` - `index: string` - `index: number` The ordered index (position) of this pool - `params: StakingPoolParams` Staking pool contract parameters - `flash_loan_weight: string` The pool's weight (multiplier) for flash loans volume - `gov_weight: string` The pool's weight (multiplier) on governance for an associated stake - `health_weight: string` The pool's weight (multiplier) on account health for an associated stake - `reward_weight: string` The pool's weight (multiplier) on rewards for an associated stake - `state: StakingPoolState` Current contract state of staking pool - `extra: object { text, value }` - `text: object { total_bonded }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `total_bonded: string` - `value: object { extra, price, total_bonded }` 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: object { text }` - `text: object { price, total_bonded }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: string` Text representation of price - `total_bonded: string` - `price: string` Price used in value calculations - `total_bonded: string` - `total_bonded: string` The total amount staked to this pool - `contents: array of UserStakeBondingEntry` Bonding/stake entries **NOTE:** entries that differ only in amount are merged upon creation - `account_index: number` User account index - `amount: string` Bonding amount - `cascade: boolean` - `extra: object { text, value }` - `text: object { amount, transition_at }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: string` - `transition_at: string` - `value: object { amount, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `last_stake_acc: string` - `transition_at: string` - `extra: object { text, value }` - `text: object { amount_sum }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount_sum: string` - `value: object { amount_sum, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount_sum, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount_sum: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `unbonding: UserStakeUnbonding` User unstake/unbonding data - `amount_sum: string` Total amount of all unbond entries **NOTE:** this value is affected by active filters, if any (e.g. filtering over account index) - `contents: array of 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: string` Unbonding amount - `extra: object { text, value }` - `text: object { amount, unlock_at }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: string` - `unlock_at: string` - `value: object { amount, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `unlock_at: string` Timestamp for when the unstake can be redeemed - `extra: object { text, value }` - `text: object { amount_sum }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount_sum: string` - `value: object { amount_sum, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount_sum, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount_sum: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `unclaimed: string` ### User Stake Bonding Entry - `UserStakeBondingEntry = object { account_index, amount, cascade, 3 more }` - `account_index: number` User account index - `amount: string` Bonding amount - `cascade: boolean` - `extra: object { text, value }` - `text: object { amount, transition_at }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: string` - `transition_at: string` - `value: object { amount, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `last_stake_acc: string` - `transition_at: string` ### User Stake Pool - `UserStakePool = object { amount_sum, common, contents, extra }` - `amount_sum: string` 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: number` The lockup duration for this pool in seconds - `extra: object { text }` - `text: object { duration, index }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `duration: string` - `index: string` - `index: number` The ordered index (position) of this pool - `params: StakingPoolParams` Staking pool contract parameters - `flash_loan_weight: string` The pool's weight (multiplier) for flash loans volume - `gov_weight: string` The pool's weight (multiplier) on governance for an associated stake - `health_weight: string` The pool's weight (multiplier) on account health for an associated stake - `reward_weight: string` The pool's weight (multiplier) on rewards for an associated stake - `state: StakingPoolState` Current contract state of staking pool - `extra: object { text, value }` - `text: object { total_bonded }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `total_bonded: string` - `value: object { extra, price, total_bonded }` 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: object { text }` - `text: object { price, total_bonded }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: string` Text representation of price - `total_bonded: string` - `price: string` Price used in value calculations - `total_bonded: string` - `total_bonded: string` The total amount staked to this pool - `contents: array of UserStakeBondingEntry` Bonding/stake entries **NOTE:** entries that differ only in amount are merged upon creation - `account_index: number` User account index - `amount: string` Bonding amount - `cascade: boolean` - `extra: object { text, value }` - `text: object { amount, transition_at }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: string` - `transition_at: string` - `value: object { amount, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `last_stake_acc: string` - `transition_at: string` - `extra: object { text, value }` - `text: object { amount_sum }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount_sum: string` - `value: object { amount_sum, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount_sum, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount_sum: string` - `price: string` Text representation of price - `price: string` Price used in value calculations ### User Stake Unbonding - `UserStakeUnbonding = object { amount_sum, contents, extra }` - `amount_sum: string` Total amount of all unbond entries **NOTE:** this value is affected by active filters, if any (e.g. filtering over account index) - `contents: array of 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: string` Unbonding amount - `extra: object { text, value }` - `text: object { amount, unlock_at }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: string` - `unlock_at: string` - `value: object { amount, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `unlock_at: string` Timestamp for when the unstake can be redeemed - `extra: object { text, value }` - `text: object { amount_sum }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount_sum: string` - `value: object { amount_sum, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount_sum, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount_sum: string` - `price: string` Text representation of price - `price: string` Price used in value calculations ### User Stake Unbonding Entry - `UserStakeUnbondingEntry = object { amount, extra, unlock_at }` - `amount: string` Unbonding amount - `extra: object { text, value }` - `text: object { amount, unlock_at }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: string` - `unlock_at: string` - `value: object { amount, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `unlock_at: string` Timestamp for when the unstake can be redeemed # Wallet ## Get user portfolio **get** `/api/v1/users/{address}/wallet/balances` Get user portfolio ### Path Parameters - `address: string` The user account address ### Query Parameters - `with_text: optional boolean` Include text variation fields - `with_value: optional boolean` Calculate and include USD values for amounts, where applicable ### Returns - `data: UserWalletPortfolio` - `balances: array of 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: string` - `group: "native" or "token"` - `"native"` - `"token"` - `group_key: string` - `values: WalletAsset` Derived values and amounts. - `WalletAssetKnown = object { amount, amount_scaled, asset_info, 2 more }` - `amount: string` Wallet balance in native denom. - `amount_scaled: string` 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. - `Regular = object { kind, neptune_receipt_asset }` - `kind: "regular"` - `"regular"` - `neptune_receipt_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) - `NeptuneReceiptToken = object { kind, origin_asset }` - `kind: "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) - `LiquidStakingToken = object { kind, origin_asset }` - `kind: "liquid_staking_token"` - `"liquid_staking_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) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: number` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: number` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: string` Full name of the asset - `symbol: string` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: string` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `extra: object { text, value }` - `text: object { amount }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: string` - `value: object { amount, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `kind: "known"` - `"known"` - `WalletAssetUnknown = object { amount, kind }` - `amount: string` Wallet balance in native denom. - `kind: "unknown"` - `"unknown"` - `extra: object { text }` - `text: object { total_value }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `total_value: string` - `total_value: string` 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: unknown` Error data. Guaranteed `null` for successful response. - `status: number` HTTP status. Successful responses are guaranteed to be < `400`. Conversely, error responses are guaranteed to be >= `400`. - `status_text: string` HTTP status text ### Example ```http curl https://api-v2.nept.finance/api/v1/users/$ADDRESS/wallet/balances ``` #### 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 **get** `/api/v1/users/{address}/wallet/balance` Get user balance by asset ### Path Parameters - `address: string` The user account address ### Query Parameters - `asset_id: string` Asset ID for lookup - `with_text: optional boolean` Include text variation fields - `with_value: optional boolean` Calculate and include USD values for amounts, where applicable ### Returns - `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: string` - `group: "native" or "token"` - `"native"` - `"token"` - `group_key: string` - `values: WalletAsset` Derived values and amounts. - `WalletAssetKnown = object { amount, amount_scaled, asset_info, 2 more }` - `amount: string` Wallet balance in native denom. - `amount_scaled: string` 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. - `Regular = object { kind, neptune_receipt_asset }` - `kind: "regular"` - `"regular"` - `neptune_receipt_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) - `NeptuneReceiptToken = object { kind, origin_asset }` - `kind: "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) - `LiquidStakingToken = object { kind, origin_asset }` - `kind: "liquid_staking_token"` - `"liquid_staking_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) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: number` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: number` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: string` Full name of the asset - `symbol: string` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: string` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `extra: object { text, value }` - `text: object { amount }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: string` - `value: object { amount, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `kind: "known"` - `"known"` - `WalletAssetUnknown = object { amount, kind }` - `amount: string` Wallet balance in native denom. - `kind: "unknown"` - `"unknown"` - `error: unknown` Error data. Guaranteed `null` for successful response. - `status: number` HTTP status. Successful responses are guaranteed to be < `400`. Conversely, error responses are guaranteed to be >= `400`. - `status_text: string` HTTP status text ### Example ```http curl https://api-v2.nept.finance/api/v1/users/$ADDRESS/wallet/balance ``` #### 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 - `UserWalletPortfolio = object { balances, extra, total_value }` - `balances: array of 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: string` - `group: "native" or "token"` - `"native"` - `"token"` - `group_key: string` - `values: WalletAsset` Derived values and amounts. - `WalletAssetKnown = object { amount, amount_scaled, asset_info, 2 more }` - `amount: string` Wallet balance in native denom. - `amount_scaled: string` 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. - `Regular = object { kind, neptune_receipt_asset }` - `kind: "regular"` - `"regular"` - `neptune_receipt_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) - `NeptuneReceiptToken = object { kind, origin_asset }` - `kind: "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) - `LiquidStakingToken = object { kind, origin_asset }` - `kind: "liquid_staking_token"` - `"liquid_staking_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) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: number` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: number` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: string` Full name of the asset - `symbol: string` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: string` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `extra: object { text, value }` - `text: object { amount }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: string` - `value: object { amount, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `kind: "known"` - `"known"` - `WalletAssetUnknown = object { amount, kind }` - `amount: string` Wallet balance in native denom. - `kind: "unknown"` - `"unknown"` - `extra: object { text }` - `text: object { total_value }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `total_value: string` - `total_value: string` 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 = WalletAssetKnown or WalletAssetUnknown` - `WalletAssetKnown = object { amount, amount_scaled, asset_info, 2 more }` - `amount: string` Wallet balance in native denom. - `amount_scaled: string` 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: string` - `group: "native" or "token"` - `"native"` - `"token"` - `group_key: string` - `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. - `Regular = object { kind, neptune_receipt_asset }` - `kind: "regular"` - `"regular"` - `neptune_receipt_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) - `NeptuneReceiptToken = object { kind, origin_asset }` - `kind: "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) - `LiquidStakingToken = object { kind, origin_asset }` - `kind: "liquid_staking_token"` - `"liquid_staking_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) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: number` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: number` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: string` Full name of the asset - `symbol: string` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: string` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `extra: object { text, value }` - `text: object { amount }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: string` - `value: object { amount, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `kind: "known"` - `"known"` - `WalletAssetUnknown = object { amount, kind }` - `amount: string` Wallet balance in native denom. - `kind: "unknown"` - `"unknown"` ### Wallet Asset Known - `WalletAssetKnown = object { amount, amount_scaled, asset_info, 2 more }` - `amount: string` Wallet balance in native denom. - `amount_scaled: string` 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: string` - `group: "native" or "token"` - `"native"` - `"token"` - `group_key: string` - `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. - `Regular = object { kind, neptune_receipt_asset }` - `kind: "regular"` - `"regular"` - `neptune_receipt_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) - `NeptuneReceiptToken = object { kind, origin_asset }` - `kind: "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) - `LiquidStakingToken = object { kind, origin_asset }` - `kind: "liquid_staking_token"` - `"liquid_staking_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) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: number` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: number` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: string` Full name of the asset - `symbol: string` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: string` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `extra: object { text, value }` - `text: object { amount }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: string` - `value: object { amount, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `kind: "known"` - `"known"` ### Wallet Asset Unknown - `WalletAssetUnknown = object { amount, kind }` - `amount: string` Wallet balance in native denom. - `kind: "unknown"` - `"unknown"` ### Wallet Balance - `WalletBalance = object { asset, values }` 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: string` - `group: "native" or "token"` - `"native"` - `"token"` - `group_key: string` - `values: WalletAsset` Derived values and amounts. - `WalletAssetKnown = object { amount, amount_scaled, asset_info, 2 more }` - `amount: string` Wallet balance in native denom. - `amount_scaled: string` 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. - `Regular = object { kind, neptune_receipt_asset }` - `kind: "regular"` - `"regular"` - `neptune_receipt_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) - `NeptuneReceiptToken = object { kind, origin_asset }` - `kind: "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) - `LiquidStakingToken = object { kind, origin_asset }` - `kind: "liquid_staking_token"` - `"liquid_staking_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) - `metadata: AssetMetadata` Additional metadata for assets - `decimals_denom: number` Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. `18` for `INJ`) - `decimals_display: number` Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations) - `name: string` Full name of the asset - `symbol: string` Symbol of the asset, e.g.: `NEPT` `INJ` - `symbol_denom: string` Denom symbol for the asset (e.g. `inj` for `INJ`, `sat` for `BTC`) - `extra: object { text, value }` - `text: object { amount }` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `amount: string` - `value: object { amount, extra, price }` 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: string` - `extra: object { text }` - `text: object { amount, price }` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `amount: string` - `price: string` Text representation of price - `price: string` Price used in value calculations - `kind: "known"` - `"known"` - `WalletAssetUnknown = object { amount, kind }` - `amount: string` Wallet balance in native denom. - `kind: "unknown"` - `"unknown"`