# Assets

* [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 ](https://balance-1.gitbook.io/balance-custody-api/authentication)doc.

***

## API Endpoints

For brevity, the `curl` examples below do not include headers. See the [Authentication ](https://balance-1.gitbook.io/balance-custody-api/authentication)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"
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://balance-1.gitbook.io/balance-custody-api/v2/assets.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
