HTTP API reference › GalaSwap DEX › user
GalaSwap DEX — user
3 operations in this group.
- GET /user/token-list — Fetch user token balances
- GET /user/fetch-gala-balance — Fetch user GALA balance
- GET /user/assets — Fetch user assets
GET /user/token-list
UserController_fetchTokens
Fetch user token balances
Returns all supported tokens + the user's balance for each (even if 0). When `address` is given and its balance lookup fails, the list is still returned with `data.balancesAvailable: false`: every `quantity` is then UNKNOWN (sent as '0' only so older clients keep working) and must be ignored. `balancesAvailable` is absent when the balances are known or no address was given.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| search | query | optional | string | Search term for filtering tokens |
| tokenName | query | optional | string | Filter by specific token name |
| page | query | optional | number | Page number for pagination (starts at 1) |
| limit | query | optional | number | Maximum number of items per page; omit to return all |
| address | query | optional | string | User wallet address |
| compositeKeys | query | optional | string | Comma-separated composite token keys (collection$category$type$additionalKey) to fetch exactly. When present, this REPLACES search/tokenName filtering entirely — an exact-match lookup, not an additional narrowing of it. |
Responses
200 —
Content type: application/json
Schema: UserTokenListResponseDto
| Field | Type | Required | Description |
|---|---|---|---|
| status | number | yes | |
| error | boolean enum: false | yes | |
| message | string | yes | |
| data | UserTokenListDataResponseDto | yes |
400 —
Content type: application/json
Schema: oneOf: UserErrorResponseDto | UserValidationErrorResponseDto
| Field | Type | Required | Description |
|---|---|---|---|
| status | number | yes | |
| error | boolean enum: true | yes | |
| message | string | yes | |
| statusCode | number | yes | |
| message | oneOf: string | array<string> | yes | |
| error | string | no |
500 —
Content type: application/json
Schema: UserErrorResponseDto
| Field | Type | Required | Description |
|---|---|---|---|
| status | number | yes | |
| error | boolean enum: true | yes | |
| message | string | yes |
default — An error response using the shared backend error envelope.
Content type: application/json
Schema: ApiErrorEnvelope
| Field | Type | Required | Description |
|---|---|---|---|
| status | integer | yes | |
| error | boolean | yes | |
| message | string | yes | |
| errorKey | string | no |
Example response
[]
GET /user/fetch-gala-balance
UserController_fetchGalaBalance
Fetch user GALA balance
Fetches the GALA token balance for a user.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| userAddress | query | optional | string | User wallet address |
Responses
200 —
Content type: application/json
Schema: UserGalaBalanceResponseDto
| Field | Type | Required | Description |
|---|---|---|---|
| status | number | yes | |
| error | boolean enum: false | yes | |
| message | string | yes | |
| data | UserGalaBalanceDataResponseDto | no |
400 —
Content type: application/json
Schema: oneOf: UserErrorResponseDto | UserValidationErrorResponseDto
| Field | Type | Required | Description |
|---|---|---|---|
| status | number | yes | |
| error | boolean enum: true | yes | |
| message | string | yes | |
| statusCode | number | yes | |
| message | oneOf: string | array<string> | yes | |
| error | string | no |
default — An error response using the shared backend error envelope.
Content type: application/json
Schema: ApiErrorEnvelope
| Field | Type | Required | Description |
|---|---|---|---|
| status | integer | yes | |
| error | boolean | yes | |
| message | string | yes | |
| errorKey | string | no |
Example response
[]
GET /user/assets
UserController_fetchAssets
Fetch user assets
Returns ONLY the tokens where the user has a positive balance (quantity > 0). When the balance lookup fails the answer is 503 (balances UNKNOWN, retry), never an empty list.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| search | query | optional | string | Search term for filtering tokens |
| tokenName | query | optional | string | Filter by specific token name |
| page | query | optional | number | Page number for pagination (starts at 1) |
| limit | query | optional | number | Maximum number of items per page; omit to return all |
| address | query | required | string | User wallet address |
Responses
200 —
Content type: application/json
Schema: UserAssetsResponseDto
| Field | Type | Required | Description |
|---|---|---|---|
| status | number | yes | |
| error | boolean | yes | |
| message | string | yes | |
| data | UserAssetsDataResponseDto | no |
default — An error response using the shared backend error envelope.
Content type: application/json
Schema: ApiErrorEnvelope
| Field | Type | Required | Description |
|---|---|---|---|
| status | integer | yes | |
| error | boolean | yes | |
| message | string | yes | |
| errorKey | string | no |
Example response
[]
Previous group: onboarding · Next group: trade