# Get all Fungible Token details created by user

Details of all the created Fungible Tokens (ERC-20 token) by a user can be found using this method. The weightage for this API is 5

## API Specification

## Get all FT details

<mark style="color:green;">`POST`</mark> `https://api.krypcore.com/api/v0/ft-manager/erc20-tokens`

## Get all FT details

<mark style="color:green;">`POST`</mark> `https://api.krypcore.com/api/v0/ft-manager/erc20-tokens`

All the created FT details can be found  under the given instance.&#x20;

#### Headers

| Name                                            | Type   | Description                      |
| ----------------------------------------------- | ------ | -------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | User Auth Key obtained from Dash |
| DappId                                          | String | DappId                           |

#### Request Body

| Name                                         | Type   | Description                                                 |
| -------------------------------------------- | ------ | ----------------------------------------------------------- |
| page                                         | Number | Details of created FT to be retrieved for the given page No |
| instanceId<mark style="color:red;">\*</mark> | String | Instance Id obtained from FT Manager Dashboard              |
| pageSize                                     | Number | No of created FT details to be displayed per page           |

{% tabs %}
{% tab title="200: OK All the created FT details are fetched successfully." %}

```javascript
{
    "Data": {
        "pageCount": 10,
        "result": [
            {
                "_id": "65098759a42a151ae936d72f",
                "apiKey": "xxxxx-xxxx-xxxx-xxxx-xxxxxx",
                "chainId": "80001",
                "contractAddress": "0xa9BCB7E413FfE96575390c6F44F54607b44F030a",
                "createdAt": "2023-09-19T11:34:49.482Z",
                "createdBy": "DEV_KRYP_11_20230919",
                "custodialWalletAccessToken": "xxxxx-xxxx-xxxx-xxxx-xxxxxxxx",
                "decimal": 18,
                "ercStandard": "ERC20",
                "instanceRef": "xxx_xx_xx_xxxxxxx",
                "isDefault": false,
                "premintAddress": "0x466e1862CFC80F216dc4126cc883D731520f36DE",
                "projectID": "xxx_xxxx_xxxx_xx_xxxxxxxx",
                "quantity": "100000000",
                "referenceId": "b6c67768-e33a-406a-be2a-fe73d03acfcf",
                "status": "SUCCESS",
                "subscriptionId": "9690608060",
                "tokenName": "KrypC Token",
                "tokenSymbol": "KC01",
                "txnHash": "0xce04f081d71e1fbf4b8680410f253248e9a175c8852c69d4a398e09d9279a2ab",
                "uniqueId": "FT-COL-qLJzsmueFIEDPFwSFOSmJiUD",
                "updatedAt": "2023-09-19T11:43:03.27Z",
                "walletAddress": "",
                "walletType": "non-custodial"
            }
        ],
        "totalCount": 1
    },
    "Message": "Ok",
    "Status": "SUCCESS"
}
```

{% endtab %}

{% tab title="400: Bad Request Instance Id is missing" %}

```javascript
{
    "Data": null,
    "Message": "InstanceId missing",
    "Status": "FAILURE"
}
```

{% endtab %}

{% tab title="401: Unauthorized Authorization Key is missing" %}

```javascript
{
    "message": "Missing API key found in request"
}
```

{% endtab %}
{% endtabs %}

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| Authorization<mark style="color:red;">\*</mark> | String | SvdiU5bu1hKW |
| DappId                                          | String | ik10qsOurCqX |

#### Request Body

| Name                                         | Type   | Description  |
| -------------------------------------------- | ------ | ------------ |
| page                                         | Number | jo9MXozMFqER |
| instanceId<mark style="color:red;">\*</mark> | String | Hc10H4gW8yEP |
| pageSize                                     | Number | YRqYz7OJnW2c |

Take a look at how you might call this method using our official libraries, or via `curl`:

{% tabs %}
{% tab title="curl" %}

```bash
curl --location --request POST 'https://api.krypcore.com/api/v0/ft-manager/erc20-tokens' \
--header 'Authorization: xxxxxxxxxxxxxxxxx' \
--header 'DappId: xxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data-raw '{
  "instanceId": "xxxxxxxxxxxxxxxxx",
  "page": 0,
  "pageSize": 10
}'
```

{% endtab %}

{% tab title="Node.js (Fetch)" %}

```javascript
var axios = require('axios');
var data = JSON.stringify({
  "instanceId": "xxxxxxxxxxxxxxxxx",
  "page": 0,
  "pageSize": 10
});

 

var config = {
  method: 'post',
  url: 'https://api.krypcore.com/api/v0/ft-manager/erc20-tokens',
  headers: { 
    'Authorization': 'xxxxxxxxxxxxxxx', 
    'DappId': 'xxxxxxxxxxxxxx', 
    'Content-Type': 'application/json'
  },
  data : data
};

 

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
```

{% endtab %}

{% tab title="Python " %}

```python
import requests
import json

url = "https://api.krypcore.com/api/v0/ft-manager/erc20-tokens"

payload = json.dumps({
  "instanceId": "xxxxxxxxxxxxxxxxx",
  "page": 0,
  "pageSize": 10
})
headers = {
  'Authorization': 'xxxxxxxxxxxxxxxx',
  'DappId': 'xxxxxxxxxxxxxxxx',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)
 
print(response.text)
```

{% endtab %}

{% tab title="Golang" %}

```go
package main

 

import (
  "fmt"
  "strings"
  "net/http"
  "io/ioutil"
)

 

func main() {

 

  url := "https://api.krypcore.com/api/v0/ft-manager/erc20-tokens"
  method := "POST"

 

  payload := strings.NewReader(`{
  "instanceId": "xxxxxxxxxxxxxxxxx",
  "page": 0,
  "pageSize": 10
}`)

 

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, payload)

 

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Authorization", "xxxxxxxxxxxxxxxxx")
  req.Header.Add("DappId", "xxxxxxxxxxxxxxxxx")
  req.Header.Add("Content-Type", "application/json")

 

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

 

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
```

{% endtab %}
{% endtabs %}
