> For the complete documentation index, see [llms.txt](https://balance-1.gitbook.io/balance-custody-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://balance-1.gitbook.io/balance-custody-api/v2/assets.md).

# Assets

This document details the Balance Custody API v2 Assets endpoint, which provides information on Filecoin sector termination fees.

* [API URL](#api-url)
* [Authentication](#authentication)
* [API Endpoints](#api-endpoints)
  * [`GET /api/v2/assets/fil/sector_termination_fees`](#get-api-v2-assets-fil-sector_termination_fees)
    * [Accepted parameters](#accepted-parameters)
    * [Response Format](#response-format)
    * [Examples](#examples)

## API URL

You will receive your API integration URL from your point of contact at Balance, and will look like:

```
YOUR_CUSTOM_SUBDOMAIN.balancecustody.ca
```

***

## Authentication

Due to the nature of the information exposed, every endpoint in this API requires authentication.

For more information on authentication go to [Authentication ](/balance-custody-api/authentication.md)doc.

***

## API Endpoints

For brevity, the `curl` examples below do not include headers. See the [Authentication ](/balance-custody-api/authentication.md)doc for required headers.

Response data is for example purposes only and does not represent real accounts.

### `GET /api/v2/assets/fil/sector_termination_fees`

Retrieves Filecoin storage provider termination fees.

This API call is rate limited to 1 call every 15 seconds. Additionally, the data returned is cached for 48 hours.

#### Accepted parameters:

Accepts the following parameters as a GET query string. Must specify the `Content-Type: application/json` header with the request.

**`storage_provider_address`**

Required. String. Address of the storage provider for which fees are to be retrieved.

#### Response Format:

The response format is a JSON-encoded struct with the following fields:

**`live_sectors_penalty_fil`**

An estimate of the FIL amount required to terminate all currently live sectors for the given storage provider.

**`faulty_sectors_penalty_fil`**

An estimate of the FIL amount required to terminate all currently faulty sectors for the given storage provider.

**`last_updated_at`**

Timestamp of the last time this data was updated in our cache, in ISO 8601 format.

#### Examples:

Example `curl` request:

```bash
curl -XGET \
     https://your_custom_subdomain.balancecustody.ca/api/v2/assets/fil/sector_termination_fees?storage_provider_address=t01024
```

Example response body:

```json
{
    "live_sectors_penalty_fil": 123.456,
    "faulty_sectors_penalty_fil": 7.89,
    "last_updated_at": "2023-09-01T01:23:45.00Z"
}
```
