Reading Wallet Contents
To read users' info and contents of associated wallets, you can use the following 3 endpoints:
- /wallet/info GET - Returns the user's id, e-mail and username.
- /wallet/items GET - Returns the items (NFTs) in the user's wallet.
- /wallet/coins GET - Returns the tokens in the user's wallet.
All of these endpoints require a valid token to be passed in the Authorization
header with appropriate scopes.
The token is obtained from the authentication process.
Access Users' Info
To read information about the user, execute a request to /wallet/info (opens in a new tab) GET
This endpoint requires the identify
scope and returns JSON with the following properties:
Atribute | Content |
---|---|
accountPublicKey | The user's id (Fractal ID) |
email | The user's e-mail. |
username | The user's username. |
wallets | Array of cryptocurrency wallets associated with the user. |
Example
curl --request GET \
--url 'https://api.fractal.is/sdk/v1/wallet/info' \
--header 'Authorization: Bearer <CLIENT_TOKEN>' \
--header 'accept: application/json'
Access Users' Items
To access a user's items (NFTs), execute a request to /wallet/items (opens in a new tab) GET
This endpoint requires the items:read
scope and returns JSON with array of items
, each item has the following properties:
Atribute | Content |
---|---|
id | The item's id. (On-chain unique identifier). |
name | The item's name. |
isForSale | Flag if the item is currently listed on Fractal's marketplace. |
files | URLs of files associated with the item (e.g. Source image). |
chain | Enumerator of target chain. |
Example
curl --request GET \
--url 'https://api.fractal.is/sdk/v1/wallet/items' \
--header 'Authorization: Bearer <CLIENT_TOKEN>' \
--header 'accept: application/json'
Access Users' Tokens
To access a user's tokens (coins), execute a GET request to /wallet/coins (opens in a new tab) GET
This endpoint requires the coins:read
scope and returns JSON with array of coins
, each coin has the following properties:
Atribute | Content |
---|---|
symbol | The coin's symbol. |
amount | The coin's amount. |
uiAmount | The coin's amount in a human readable format (e.g. 0.0001). |
chain | Enumerator of target chain. |
decimals | The coin's decimals. |
logoUri | The coin's logo. |
name | The coin's name. |
Example
curl --request GET \
--url 'https://api.fractal.is/sdk/v1/wallet/coins' \
--header 'Authorization: Bearer <CLIENT_TOKEN>' \
--header 'accept: application/json'