Clear NFT DB
This method will clear the NFT database data stored in the local database for selected (or all) networks.
Request Parameters
| Parameter | Type | Description |
|---|---|---|
| clear_all | boolean | Defaults to false. If true all NFT data for all networks will be purged. |
| chains | array | Optional. List of networks to remove NFT data for. Options are: POLYGON, FANTOM, ETH, BSC, or AVALANCHE. |
📌 Example to clear Binance Smart chain and Polygon NFT data
POST Clear NFT Database
clear_nft_db {
"userpass": "RPC_UserP@SSW0RD",
"method": "clear_nft_db",
"mmrpc": "2.0",
"params": {
"chains": [
"POLYGON",
"BSC"
]
}
} curl --url "http://127.0.0.1:7783" --data '{
"userpass": "RPC_UserP@SSW0RD",
"method": "clear_nft_db",
"mmrpc": "2.0",
"params": {
"chains": [
"POLYGON",
"BSC"
]
}
}' import requests
import json
url = "http://127.0.0.1:7783"
payload = {
"userpass": "RPC_UserP@SSW0RD",
"method": "clear_nft_db",
"mmrpc": "2.0",
"params": {
"chains": [
"POLYGON",
"BSC"
]
}
}
response = requests.post(url, json=payload)
print(json.dumps(response.json(), indent=2)) const payload = {
"userpass": "RPC_UserP@SSW0RD",
"method": "clear_nft_db",
"mmrpc": "2.0",
"params": {
"chains": [
"POLYGON",
"BSC"
]
}
};
const response = await fetch("http://127.0.0.1:7783", {
method: "POST",
body: JSON.stringify(payload),
});
console.log(await response.json()); <?php
$payload = <<<'JSON'
{
"userpass": "RPC_UserP@SSW0RD",
"method": "clear_nft_db",
"mmrpc": "2.0",
"params": {
"chains": [
"POLYGON",
"BSC"
]
}
}
JSON;
$ch = curl_init("http://127.0.0.1:7783");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
$response = curl_exec($ch);
curl_close($ch);
echo $response; package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
payload := []byte(`{"userpass":"RPC_UserP@SSW0RD","method":"clear_nft_db","mmrpc":"2.0","params":{"chains":["POLYGON","BSC"]}}`)
resp, err := http.Post("http://127.0.0.1:7783", "application/json", bytes.NewBuffer(payload))
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
} require 'net/http'
require 'json'
require 'uri'
uri = URI("http://127.0.0.1:7783")
payload = {
"userpass": "RPC_UserP@SSW0RD",
"method": "clear_nft_db",
"mmrpc": "2.0",
"params": {
"chains": [
"POLYGON",
"BSC"
]
}
}
response = Net::HTTP.post(uri, payload.to_json, 'Content-Type' => 'application/json')
puts JSON.pretty_generate(JSON.parse(response.body)) Show Response
{
"mmrpc": "2.0",
"result": null,
"id": null
} 📌 Example to clear all NFT data
POST Clear NFT Database
clear_nft_db {
"userpass": "RPC_UserP@SSW0RD",
"method": "clear_nft_db",
"mmrpc": "2.0",
"params": {
"clear_all": true
}
} curl --url "http://127.0.0.1:7783" --data '{
"userpass": "RPC_UserP@SSW0RD",
"method": "clear_nft_db",
"mmrpc": "2.0",
"params": {
"clear_all": true
}
}' import requests
import json
url = "http://127.0.0.1:7783"
payload = {
"userpass": "RPC_UserP@SSW0RD",
"method": "clear_nft_db",
"mmrpc": "2.0",
"params": {
"clear_all": true
}
}
response = requests.post(url, json=payload)
print(json.dumps(response.json(), indent=2)) const payload = {
"userpass": "RPC_UserP@SSW0RD",
"method": "clear_nft_db",
"mmrpc": "2.0",
"params": {
"clear_all": true
}
};
const response = await fetch("http://127.0.0.1:7783", {
method: "POST",
body: JSON.stringify(payload),
});
console.log(await response.json()); <?php
$payload = <<<'JSON'
{
"userpass": "RPC_UserP@SSW0RD",
"method": "clear_nft_db",
"mmrpc": "2.0",
"params": {
"clear_all": true
}
}
JSON;
$ch = curl_init("http://127.0.0.1:7783");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
$response = curl_exec($ch);
curl_close($ch);
echo $response; package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
payload := []byte(`{"userpass":"RPC_UserP@SSW0RD","method":"clear_nft_db","mmrpc":"2.0","params":{"clear_all":true}}`)
resp, err := http.Post("http://127.0.0.1:7783", "application/json", bytes.NewBuffer(payload))
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
} require 'net/http'
require 'json'
require 'uri'
uri = URI("http://127.0.0.1:7783")
payload = {
"userpass": "RPC_UserP@SSW0RD",
"method": "clear_nft_db",
"mmrpc": "2.0",
"params": {
"clear_all": true
}
}
response = Net::HTTP.post(uri, payload.to_json, 'Content-Type' => 'application/json')
puts JSON.pretty_generate(JSON.parse(response.body)) Show Response
{
"mmrpc": "2.0",
"result": null,
"id": null
} Error responses
UnsupportedChainType
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
}
InvalidRequest
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
}