On this page

latest contributor to this doc

Last Edit:

@gcharang

Clear NFT Database

This method will clear the NFT database data stored in the local database for selected (or all) networks.

ParameterTypeDescription
clear_allbooleanDefaults to false. If true all NFT data for all networks will be purged.
chainsarrayOptional. List of networks to remove NFT data for. Options are: POLYGON, FANTOM, ETH, BSC, or AVALANCHE.

You can confirm the NFT database has been cleared by querying the KOMODEFI.db database file. For more information, refer to the Query NFT Database Tables documentation.

Clear NFT Database

POST
clear_nft_db
{
  "userpass": "RPC_UserP@SSW0RD",
  "method": "clear_nft_db",
  "mmrpc": "2.0",
  "params": {
    "chains": [
      "POLYGON",
      "BSC"
    ]
  }
}

Clear NFT Database

POST
clear_nft_db
{
  "userpass": "RPC_UserP@SSW0RD",
  "method": "clear_nft_db",
  "mmrpc": "2.0",
  "params": {
    "clear_all": true
  }
}

Returned when the chains parameter contains an unsupported network.

{
    "mmrpc": "2.0",
    "error": "Error parsing request: UnsupportedChainType",
    "error_path": "dispatcher",
    "error_trace": "dispatcher:110]",
    "error_type": "InvalidRequest",
    "error_data": "UnsupportedChainType",
    "id": null
}

Returned when neither the chains or clear_all parameters are present.

{
    "mmrpc":"2.0",
    "error":"Invalid request: Nothing to clear was specified","error_path":"nft","error_trace":"nft:1512]",
    "error_type":"InvalidRequest",
    "error_data":"Nothing to clear was specified",
    "id":null
}