v1

latestOpenAPI 3.0.3Apache-2.02026-07-1348142206.6 KB
accounts

Get fungible token allowances for an account

Returns information for fungible token allowances for an account.

Ordering

The order is governed by a combination of the spender id and the token id values, with spender id being the parent column. The token id value governs its order within the given spender id.

Note: The default order for this API is currently ASC

Filtering

When filtering there are some restrictions enforced to ensure correctness and scalability.

The table below defines the restrictions and support for the endpoint

Query ParamComparison OperatorSupportDescriptionExample
spender.ideqYSingle occurrence only.?spender.id=X
neN
lt(e)YSingle occurrence only.?spender.id=lte:X
gt(e)YSingle occurrence only.?spender.id=gte:X
token.ideqYSingle occurrence only. Requires the presence of a spender.id query?token.id=lt:Y
neN
lt(e)YSingle occurrence only. Requires the presence of an lte or eq spender.id query?spender.id=lte:X&token.id=lt:Y
gt(e)YSingle occurrence only. Requires the presence of an gte or eq spender.id query?spender.id=gte:X&token.id=gt:Y

Both filters must be a single occurrence of gt(e) or lt(e) which provide a lower and or upper boundary for search.

get/api/v1/accounts/{idOrAliasOrEvmAddress}/allowances/tokens

Path parameters

idOrAliasOrEvmAddressstring required

Account alias or account id or evm address

Query parameters

limitinteger

The maximum number of items to return

order'asc' | 'desc'

The order in which items are listed

spender.idstring

The ID of the spender to return information for

token.idstring

The ID of the token to return information for

Response

OK

Example response

{
  "allowances": [
    {
      "amount": 75,
      "amount_granted": 100,
      "owner": "0.0.2",
      "spender": "0.0.2",
      "timestamp": {
        "from": "1586567700.453054000",
        "to": "1586567700.453054000"
      },
      "token_id": "0.0.2"
    }
  ]
}