# Fetch Financial Asset

## Get Financial Asset Details

In order to call mutations such as money transfers and swaps, you will need to fetch the financial asset ID of a specific asset. The way to get a specific asset/multiple asset IDs, use the following query:

In the query variables (body), you insert the code of the asset you wish to fetch.\
See the example body below for reference.

```graphql
query FinancialAssets($where: FinancialAssetWhereInput) {
  financialAssets(where: $where) {
    code
    id
  }
}
```

### **Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `Bearer <token>`   |

### Body (<mark style="color:orange;">FinancialAssetWhereInput</mark> object)

| Name | Type   | Description                                            |
| ---- | ------ | ------------------------------------------------------ |
| code | String | <p>Asset Code<br>(i.e. - USDT / ETH / BTC / MATIC)</p> |

Example body:

```json
{
  "where": {
    "code": {
      "equals": "USDT"
    }
  }
}
```

### Response

Return values:

| Name | Type   | Description |
| ---- | ------ | ----------- |
| code | String | Asset Code  |
| id   | String | Asset ID    |

{% tabs %}
{% tab title="🟢 Success" %}

```javascript
{
  "data": {
    "financialAssets": [
      {
        "code": "USDT",
        "id": "clefn78gv011olc6rcwtt0wel"
      }
    ]
  }
}
```

{% endtab %}

{% tab title="🔴 Failure" %}

{% endtab %}
{% endtabs %}

### Try it out!

{% embed url="<https://studio.apollographql.com/sandbox/explorer?endpoint=https://api.inabit.dev/graphql&explorerURLState=N4IgJg9gxgrgtgUwHYBcQC4QEcYIE4CeABAGICWSAhklGZQDYCCAzswiswBQAkA7gBb4E6UhWq0GLNigDqgvAgCSSAA4wUASiLAAOkiJEAZmJp0mrdlwFCRfeQi279BolAhgEel0TJgvRAF89AJAAGhAAN0o8OgAjegRmDBAnAx0QawV0kVSXdLcPbO1-b3SEHAZmIvSAVQBlABEAFXSSwP8gpBDwlQhmFEN6MgBzfhQAeRV8ShQyCCQ6qBiVNEwQAKA>" %}
