Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.nexfi.robert.dpdns.org/llms.txt

Use this file to discover all available pages before exploring further.

Staking Catalog and Transactions

This page mirrors the detailed design style for Staking user-side APIs, including endpoint purpose, request parameters, response fields, examples, and product notes.

GET /api/v1/staking/products

Purpose

Returns staking product catalog items for list pages and filtered discovery.

Query Parameters

ParameterTypeRequiredDescriptionExample
chainIdIntegerNoChain ID filter.8453
productTypeStringNoProduct type filter such as aggregated or vault.vault
riskLevelStringNoRisk level filter.medium
assetSymbolStringNoSubscription asset symbol.USDC
statusStringNoProduct status filter.active

Response Fields

FieldTypeDescriptionExample
data.itemsArrayProduct list.[]
data.items[].idStringProduct ID.base_usdc_nexfi_vault
data.items[].nameStringProduct name.NexFi USDC Yield Vault
data.items[].productTypeStringProduct type.vault
data.items[].chainIdIntegerChain ID.8453
data.items[].assetSymbolStringSubscription asset symbol.USDC
data.items[].apyStringCurrent APY.7.25
data.items[].tvlUsdStringTVL in USD.1200000
data.items[].riskLevelStringRisk level.medium
data.items[].statusStringProduct status.active
data.items[].tagsString[]Product display tags.["Stable","Featured"]

Example Response

{
  "code": 0,
  "msg": "ok",
  "data": {
    "items": [
      {
        "id": "base_usdc_nexfi_vault",
        "name": "NexFi USDC Yield Vault",
        "productType": "vault",
        "chainId": 8453,
        "assetSymbol": "USDC",
        "apy": "7.25",
        "tvlUsd": "1200000",
        "riskLevel": "medium",
        "status": "active",
        "tags": ["Stable", "Featured"]
      }
    ]
  }
}

GET /api/v1/staking/products/{id}

Purpose

Returns one staking product detail for detail pages and transaction confirmation flows.

Path Parameters

ParameterTypeRequiredDescriptionExample
idStringYesProduct ID.base_usdc_nexfi_vault

Response Fields

FieldTypeDescriptionExample
data.idStringProduct ID.base_usdc_nexfi_vault
data.nameStringProduct name.NexFi USDC Yield Vault
data.productTypeStringProduct type.vault
data.chainIdIntegerChain ID.8453
data.apyStringAPY.7.25
data.tvlUsdStringTVL in USD.1200000
data.riskLevelStringRisk level.medium
data.rewardSourceStringYield source summary.Vault strategy yield
data.lockRuleStringLock rule summary.No hard lock
data.exitRuleStringExit rule summary.ERC-4626 redeem
data.statusStringProduct status.active

Example Response

{
  "code": 0,
  "msg": "ok",
  "data": {
    "id": "base_usdc_nexfi_vault",
    "name": "NexFi USDC Yield Vault",
    "productType": "vault",
    "chainId": 8453,
    "apy": "7.25",
    "tvlUsd": "1200000",
    "riskLevel": "medium",
    "rewardSource": "Vault strategy yield",
    "lockRule": "No hard lock",
    "exitRule": "ERC-4626 redeem",
    "status": "active"
  }
}

GET /api/v1/staking/positions

Purpose

Returns user staking positions for portfolio views, earnings summaries, and product detail overlays.

Query Parameters

ParameterTypeRequiredDescriptionExample
walletAddressStringYesWallet address.0xabc...
chainIdIntegerNoChain ID filter.8453
statusStringNoPosition status filter.active

Response Fields

FieldTypeDescriptionExample
data.itemsArrayPosition list.[]
data.items[].productIdStringProduct ID.base_usdc_nexfi_vault
data.items[].walletAddressStringWallet address.0xabc...
data.items[].sharesStringShare amount.998.12
data.items[].assetAmountStringUnderlying asset amount.1000
data.items[].statusStringPosition status.active
data.items[].updatedAtStringLast update time.2026-05-11T10:00:00.000Z

Example Response

{
  "code": 0,
  "msg": "ok",
  "data": {
    "items": [
      {
        "productId": "base_usdc_nexfi_vault",
        "walletAddress": "0xabc...",
        "shares": "998.12",
        "assetAmount": "1000",
        "status": "active",
        "updatedAt": "2026-05-11T10:00:00.000Z"
      }
    ]
  }
}

POST /api/v1/staking/transactions/build

Purpose

Builds subscribe or redeem transaction payloads for local wallet signing.

Request Body

ParameterTypeRequiredDescriptionExample
productIdStringYesProduct ID.base_usdc_nexfi_vault
orderTypeStringYessubscribe or redeem.subscribe
walletAddressStringYesWallet address.0xabc...
amountStringYesOrder amount.1000

Example Request

{
  "productId": "base_usdc_nexfi_vault",
  "orderType": "subscribe",
  "walletAddress": "0xabc...",
  "amount": "1000"
}

Response Fields

FieldTypeDescriptionExample
data.buildIdStringBuild result ID.build_20260511_0001
data.chainIdIntegerTarget chain ID.8453
data.toStringTarget contract address.0xvault...
data.valueStringNative token value.0
data.dataStringTransaction calldata.0xb6b55f25
data.gasLimitStringSuggested gas limit.280000
data.warningsString[]UX warnings shown before signing.[]
data.sharesPreviewStringPreviewed shares for vault products.998.12
data.feePreviewStringPreviewed fee amount.1.50
data.vaultAddressStringVault address for vault products.0xvault...

Example Response

{
  "code": 0,
  "msg": "ok",
  "data": {
    "buildId": "build_20260511_0001",
    "chainId": 8453,
    "to": "0xvault000000000000000000000000000000000001",
    "value": "0",
    "data": "0xb6b55f25",
    "gasLimit": "280000",
    "warnings": ["APY is estimated and not guaranteed"],
    "sharesPreview": "998.12",
    "feePreview": "1.50",
    "vaultAddress": "0xvault000000000000000000000000000000000001"
  }
}

POST /api/v1/staking/orders

Purpose

Creates a platform staking order for lifecycle tracking after the client has prepared or submitted the chain transaction.

Request Body

ParameterTypeRequiredDescriptionExample
buildIdStringYesTransaction build ID.build_20260511_0001
productIdStringYesProduct ID.base_usdc_nexfi_vault
orderTypeStringYessubscribe or redeem.subscribe
walletAddressStringYesWallet address.0xabc...
amountStringYesOrder amount.1000
txHashStringYesSubmitted chain transaction hash.0x123...

Example Request

{
  "buildId": "build_20260511_0001",
  "productId": "base_usdc_nexfi_vault",
  "orderType": "subscribe",
  "walletAddress": "0xabc...",
  "amount": "1000",
  "txHash": "0x123..."
}

Response Fields

FieldTypeDescriptionExample
data.orderIdStringPlatform order ID.stk_20260511_0001
data.statusStringInitial order status.pending_chain

Example Response

{
  "code": 0,
  "msg": "ok",
  "data": {
    "orderId": "stk_20260511_0001",
    "status": "pending_chain"
  }
}

GET /api/v1/staking/orders/{id}

Purpose

Returns detail of one staking order.

Path Parameters

ParameterTypeRequiredDescriptionExample
idStringYesPlatform order ID.stk_20260511_0001

Response Fields

FieldTypeDescriptionExample
data.orderIdStringPlatform order ID.stk_20260511_0001
data.productIdStringProduct ID.base_usdc_nexfi_vault
data.walletAddressStringWallet address.0xabc...
data.orderTypeStringOrder type.subscribe
data.statusStringOrder status.confirmed
data.txHashStringChain transaction hash.0x123...
data.updatedAtStringLast update time.2026-05-11T10:00:00.000Z

Example Response

{
  "code": 0,
  "msg": "ok",
  "data": {
    "orderId": "stk_20260511_0001",
    "productId": "base_usdc_nexfi_vault",
    "walletAddress": "0xabc...",
    "orderType": "subscribe",
    "status": "confirmed",
    "txHash": "0x123...",
    "updatedAt": "2026-05-11T10:00:00.000Z"
  }
}

GET /api/v1/staking/vaults/{id}/preview

Purpose

Returns preview data for vault deposit or redeem actions.

Path / Query Parameters

ParameterTypeRequiredDescriptionExample
idStringYesVault product ID.base_usdc_nexfi_vault
assetsStringNoAsset amount input. Mutually exclusive with shares.1000
sharesStringNoShare amount input. Mutually exclusive with assets.998.12

Response Fields

FieldTypeDescriptionExample
data.assetsStringAsset input amount.1000
data.sharesPreviewStringPreviewed shares minted.998.12
data.withdrawAssetsPreviewStringPreviewed assets returned on redeem.999.50
data.feePreviewStringPreviewed fee amount.1.50
data.pricePerShareStringCurrent price per share.1.0019

Example Response

{
  "code": 0,
  "msg": "ok",
  "data": {
    "assets": "1000",
    "sharesPreview": "998.12",
    "withdrawAssetsPreview": "999.50",
    "feePreview": "1.50",
    "pricePerShare": "1.0019"
  }
}

Notes

  • assets and shares should not be sent together.
  • Preview values are advisory and should not be treated as guaranteed settlement results.
  • APY, TVL, and earnings-related values may be eventually consistent and should expose update timestamps in UI where relevant.