Files
ritmex-bot/docs/nado/developer-resources/api/gateway/queries/nlp-pool-info.md
T

2.6 KiB

NLP Pool Info

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_pool_info"
}

{% endtab %}

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

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

Body

{
  "type": "nlp_pool_info"
}

{% endtab %} {% endtabs %}

Request Parameters

This query does not require any parameters.

Response

{
  "status": "success",
  "data": {
    "nlp_pools": [
      {
        "pool_id": 1,
        "subaccount": "0x0000000000000000000000000000000000000000000000000000000000000002",
        "owner": "0x1234567890123456789012345678901234567890",
        "balance_weight_x18": "500000000000000000",
        "subaccount_info": {
          "subaccount": "0x0000000000000000000000000000000000000000000000000000000000000002",
          "exists": true,
          "health": {
            "assets": "1000000000000000000000",
            "liabilities": "500000000000000000000",
            "initial_health": "250000000000000000000",
            "maintenance_health": "100000000000000000000"
          },
          "spot_balances": [],
          "perp_balances": []
        },
        "open_orders": []
      }
    ]
  },
  "request_type": "query_nlp_pool_info"
}

Response Fields

NLP Pool Info

Field nameDescription
nlp_poolsArray of NLP pool objects

NLP Pool Object

Field nameDescription
pool_idUnique identifier for the pool
subaccountThe subaccount address associated with this pool (bytes32 hex string)
ownerThe owner address of the pool (bytes20 hex string)
balance_weight_x18Weight of this pool's balance in x18 format (string representation of u128)
subaccount_infoComplete subaccount information including health, balances, and positions
open_ordersArray of currently open orders for this pool