getGateways

getGateways is a method on the ARIO class that retrieves all gateways with optional pagination and filtering support.

getGateways does not require authentication.

Examples

getGateways

const gateways = await ario.getGateways({
    limit: 10,
    sortBy: 'operatorStake',
    sortOrder: 'desc'
});

Parameters

ParameterTypeDescriptionOptionalDefault
cursorstring

The gateway address to use as the starting point for pagination

trueNone
limitnumber

The maximum number of gateways to return (max: 1000)

true100
sortBystringThe property to sort gateways bytruestartTimestamp
sortOrderstringThe sort direction ('desc' or 'asc')truedesc
filtersRecord<string, string | string[]>

Filters to apply to the results. Keys must match object properties. Arrays act as OR conditions, multiple keys act as AND conditions.

trueNone

Output

{
  "items": [
    {
      "gatewayAddress": "t4Xr0_J4Iurt7caNST02cMotaz2FIbWQ4Kbj616RHl3",
      "observerWallet": "t4Xr0_J4Iurt7caNST02cMotaz2FIbWQ4Kbj616RHl3",
      "operatorStake": 500000000000,
      "totalDelegatedStake": 250000000000,
      "settings": {
        "label": "AR.IO Test Gateway",
        "fqdn": "testgateway.ar.io",
        "port": 443,
        "protocol": "https",
        "allowDelegatedStaking": true,
        "minDelegatedStake": 100000000,
        "delegateRewardShareRatio": 10
      },
      "status": "joined",
      "startTimestamp": 1706227200000,
      "stats": {
        "prescribedEpochCount": 150,
        "observedEpochCount": 148,
        "passedEpochCount": 148,
        "failedEpochCount": 2
      }
    }
  ],
  "hasMore": true,
  "nextCursor": "anotherGatewayAddress",
  "totalItems": 567,
  "sortBy": "operatorStake",
  "sortOrder": "desc"
}

Was this page helpful?