# Burn ERC20Token

ERC20 Token can be Burned using this method. The weightage for this API is 5

## API Specification

## Burn ERC20Token

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

ERC20 Token can be Burnedunder the given instance.&#x20;

#### Headers

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

#### Request Body

| Name                                                         | Type   | Description                                           |
| ------------------------------------------------------------ | ------ | ----------------------------------------------------- |
| quantity<mark style="color:red;">\*</mark>                   | String | The quantity of ERC20 tokens to burn                  |
| burnAddress<mark style="color:red;">\*</mark>                | String | The Ethereum address from which tokens will be burned |
| contractAddress<mark style="color:red;">\*</mark>            | String | The contract address of the ERC20 token being burned  |
| chainId<mark style="color:red;">\*</mark>                    | String | The Chain ID to specify the blockchain network        |
| custodialWalletAccessToken<mark style="color:red;">\*</mark> | String | Wallet Access Token Of Custodial  Wallet              |
| walletType<mark style="color:red;">\*</mark>                 | String | The type of wallet being used                         |

{% tabs %}
{% tab title="200: OK FT burnt successfully" %}

```javascript
{
    Data: {
        "referenceId": "xxxx",
        "txnHash": ""
    },
    Message: "FT burnt successfully",
    Status: "SUCCESS"
}
```

{% endtab %}

{% tab title="500: Internal Server Error Chain Id is missing" %}

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

{% endtab %}
{% endtabs %}

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

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

```bash
curl --location 'https://api.krypcore.com/api/v0/ft-manager/burnFT' \
--header 'Authorization: xxxxxxxxxxxxxxxx' \
--header 'DappId: xxxxxxxxxxxxxxxx' \
--header 'ChainId: xxxx' \
--header 'Content-Type: application/json' \
--data '{
 "burnAddress": "0x588BeE528b93357B4d731CE817C47F4BFbc81B22",
  "chainId": "xxxx",
  "contractAddress": "0xa9BCB7E413FfE96575390c6F44F54607b44F030a",
  "custodialWalletAccessToken": "d263d546-ccc2-4676-9691-d28c3f836822",
  "quantity": "1000000000000000000",
  "walletType": "non-custodial"
}'
```

{% endtab %}

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

```javascript
const axios = require('axios');
let data = JSON.stringify({
  "burnAddress": "0x588BeE528b93357B4d731CE817C47F4BFbc81B22",
  "chainId": "xxxx",
  "contractAddress": "0xa9BCB7E413FfE96575390c6F44F54607b44F030a",
  "custodialWalletAccessToken": "d263d546-ccc2-4676-9691-d28c3f836822",
  "quantity": "1000000000000000000",
  "walletType": "non-custodial"
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://api.krypcore.com/api/v0/ft-manager/burnFT',
  headers: { 
    'Authorization': 'xxxxxxxxxxxxxxxx', 
    'DappId': 'xxxxxxxxxxxxxxxx', 
    'ChainId': 'xxxx',
    'Content-Type': 'application/json'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

```

{% endtab %}

{% tab title="Python " %}

```python
import requests
import json

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

payload = json.dumps({
  "burnAddress": "0x588BeE528b93357B4d731CE817C47F4BFbc81B22",
  "chainId": "xxxx",
  "contractAddress": "0xa9BCB7E413FfE96575390c6F44F54607b44F030a",
  "custodialWalletAccessToken": "d263d546-ccc2-4676-9691-d28c3f836822",
  "quantity": "1000000000000000000",
  "walletType": "non-custodial"
})
headers = {
  'Authorization': 'xxxxxxxxxxxxxxxx',
  'DappId': 'xxxxxxxxxxxxxxxx',
  'ChainId': 'xxxx',
  '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/burnFT"
  method := "POST"

  payload := strings.NewReader(`{
  "burnAddress": "0x588BeE528b93357B4d731CE817C47F4BFbc81B22",
  "chainId": "xxxx",
  "contractAddress": "0xa9BCB7E413FfE96575390c6F44F54607b44F030a",
  "custodialWalletAccessToken": "d263d546-ccc2-4676-9691-d28c3f836822",
  "quantity": "1000000000000000000",
  "walletType": "non-custodial"
}`)

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

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Authorization", "xxxxxxxxxxxxxxxx")
  req.Header.Add("DappId", "xxxxxxxxxxxxxxxx")
  req.Header.Add("ChainId", "xxxx")
  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 %}


---

# 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://docs.krypcore.com/dev-docs/api-reference/core-service-apis/ft-manager-apis/burn-erc20token.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.
