Skip to main content
GET
/
stocks
/
api
/
fetch
/
{tokenAddress}
/
role
/
{account}
# Check all roles
curl "https://api.trusset.org/stocks/api/fetch/0x1234.../role/0xAbC1..." \
  -H "X-API-Key: trusset_abc123xy_secret..."

# Check specific role
curl "https://api.trusset.org/stocks/api/fetch/0x1234.../role/0xAbC1...?role=ISSUER" \
  -H "X-API-Key: trusset_abc123xy_secret..."
{
  "success": true,
  "data": {
    "account": "0xAbC123dEf456789012345678901234567890AbCd",
    "roles": {
      "ISSUER": true,
      "SUB_ISSUER": false,
      "CONTROLLER": false,
      "LEGAL_OPERATOR": false
    }
  },
  "metadata": {
    "requestId": "550e8400-e29b-41d4-a716-446655440000",
    "timestamp": "2025-06-15T12:00:00.000Z",
    "instanceId": "inst_abc123"
  }
}
Queries the on-chain role assignments for a specific account. When the role query parameter is provided, checks a single role. When omitted, returns all roles for the account. Valid roles: ISSUER, SUB_ISSUER, CONTROLLER, LEGAL_OPERATOR.

Path Parameters

tokenAddress
string
required
Address of the stock token contract.
account
string
required
Ethereum address to check.

Query Parameters

role
string
Specific role to check. When omitted, all roles are returned. Must be one of: ISSUER, SUB_ISSUER, CONTROLLER, LEGAL_OPERATOR.

Response Fields

success
boolean
Request status.
data
object
Role check result. Contains either a single hasRole boolean or a roles map depending on whether a specific role was queried.
# Check all roles
curl "https://api.trusset.org/stocks/api/fetch/0x1234.../role/0xAbC1..." \
  -H "X-API-Key: trusset_abc123xy_secret..."

# Check specific role
curl "https://api.trusset.org/stocks/api/fetch/0x1234.../role/0xAbC1...?role=ISSUER" \
  -H "X-API-Key: trusset_abc123xy_secret..."
{
  "success": true,
  "data": {
    "account": "0xAbC123dEf456789012345678901234567890AbCd",
    "roles": {
      "ISSUER": true,
      "SUB_ISSUER": false,
      "CONTROLLER": false,
      "LEGAL_OPERATOR": false
    }
  },
  "metadata": {
    "requestId": "550e8400-e29b-41d4-a716-446655440000",
    "timestamp": "2025-06-15T12:00:00.000Z",
    "instanceId": "inst_abc123"
  }
}