> ## Documentation Index
> Fetch the complete documentation index at: https://etherspot.fyi/llms.txt
> Use this file to discover all available pages before exploring further.

# Data Service

Along with using the Prime SDK, developers can make use of
the data service to retreive information such as Account Balances.

For making these api-calls, you'll need to get a data service api key.

Without passing one in, there is a default key which is very heavily rate limited.

## Code example

Start by importing DataUtils from the Prime SDK like so:

```javascript theme={null}
import { DataUtils } from '@etherspot/prime-sdk';
```

Then initialise the Data Service with your api key:

```javascript theme={null}
// initializating Data service...
const dataService = new DataUtils(data-api-key);
```

Finally, call one of the functions listed below:

```javascript theme={null}
const hash = '0x7f8633f21d0c0c71d248333a0a2b976495015109a270a6f8a51befe3baf6fb6e';
const transaction = await dataService.getTransaction({ hash, chainId: 11155111 });
console.log('\x1b[33m%s\x1b[0m', `EtherspotWallet transaction:`, transaction);
```

## Function List

| Function Name                | Description                                           |
| ---------------------------- | ----------------------------------------------------- |
| getAccountBalances()         | Returns the Account Balance.                          |
| getTransaction()             | Returns details about a transaction.                  |
| getNftList()                 | Returns a list of NFTs that the account owns.         |
| getExchangeSupportedAssets() | Returns exchange supported tokens on the account.     |
| getExchangeOffers()          | Returns a list of exchange offers between two assets. |
| getAdvanceRoutesLiFi()       | Returns bridging routes between two assets via LiFi.  |
| getStepTransaction()         |                                                       |
| getCrossChainQuotes()        | Returns bridging routes between two assets            |
| getTokenLists()              | Returns a token list.                                 |
| getTokenListTokens()         | Returns a specific token from the list.               |
| fetchExchangeRates()         | Returns exchange rates between two tokens.            |
