Files

4.0 KiB

NLP Locked Balances

Rate limits

  • 120 requests/min or 20 requests every 10 seconds per IP address. (weight = 20)

{% hint style="info" %} See more details in API Rate limits {% endhint %}

Request

{% tabs %} {% tab title="Websocket" %} Connect

WEBSOCKET [GATEWAY_WEBSOCKET_ENDPOINT]

Message

{
  "type": "nlp_locked_balances",
  "subaccount": "0x7a5ec2748e9065794491a8d29dcf3f9edb8d7c43000000000000000000000000"
}

{% endtab %}

{% tab title="REST (GET)" %} GET [GATEWAY_REST_ENDPOINT]/query?type=nlp_locked_balances&subaccount={subaccount} {% endtab %}

{% tab title="REST (POST)" %} POST [GATEWAY_REST_ENDPOINT]/query

Body

{
  "type": "nlp_locked_balances",
  "subaccount": "0x7a5ec2748e9065794491a8d29dcf3f9edb8d7c43000000000000000000000000"
}

{% endtab %} {% endtabs %}

Request Parameters

ParameterTypeRequiredDescription
subaccountstringYesA bytes32 sent as a hex string; includes the address and the subaccount identifier.

Response

{
  "status": "success",
  "data": {
    "balance_locked": {
      "product_id": 0,
      "balance": {
        "amount": "1000000000000000000000",
        "last_cumulative_funding_x18": "0"
      }
    },
    "balance_unlocked": {
      "product_id": 0,
      "balance": {
        "amount": "500000000000000000000",
        "last_cumulative_funding_x18": "0"
      }
    },
    "locked_balances": [
      {
        "balance": {
          "product_id": 0,
          "balance": {
            "amount": "250000000000000000000",
            "last_cumulative_funding_x18": "0"
          }
        },
        "unlocked_at": "1735689600"
      },
      {
        "balance": {
          "product_id": 0,
          "balance": {
            "amount": "750000000000000000000",
            "last_cumulative_funding_x18": "0"
          }
        },
        "unlocked_at": "1736035200"
      }
    ]
  },
  "request_type": "query_nlp_locked_balances"
}

Response Fields

NLP Locked Balances Response

Field nameDescription
balance_lockedTotal balance that is currently locked (SpotBalance object)
balance_unlockedTotal balance that is currently unlocked and available (SpotBalance object)
locked_balancesArray of individual locked balance entries with their unlock times

Locked Balance Entry

Field nameDescription
balanceSpotBalance object containing the locked amount
unlocked_atUnix epoch timestamp (in seconds) when this balance will unlock

SpotBalance Object

Field nameDescription
product_idThe product ID (typically 0 for USDT0/quote asset)
balanceBalance details object
balance.amountThe balance amount in x18 format (string)
balance.last_cumulative_funding_x18Last cumulative funding value in x18 format (string)

Notes

  • NLP positions have a 4-day lock period after minting before they can be burned (withdrawn)
  • The locked_balances array shows individual lock entries, each with their own unlock timestamp
  • balance_locked is the sum of all locked balances
  • balance_unlocked represents balances that have passed their lock period and can be withdrawn