# Withdraw PLI from Plugin Node

Whenever you set up a plugin node, a dedicated wallet will be generated and it is unique to that plugin node address. It is necessary to sufficiently fund your Plugin node with XDC for the transaction fee & PLI for the oracle fee.

So what if you want to withdraw a portion of this to your wallet?

Step 1) Every plugin node generates the unique wallet and generates the private key in the database.

Step 2) You can find the “private key’” for your wallet in the “Keys” table in Postgres

Step 3) With a sudo user, you can view the json value in the table

Step 4) Copy down the json into a json file(let’s say — Test.json)

Step 5) Import this json into metamask to view your XDC / PLI balance

#### Step 1) Login into Postgres

```
sudo -u postgres -i
```

#### Point to right database

```
/c plugin_mainnet
```

#### Step 2) Apply following Query

```
select json from keys LIMIT 1;
```

#### Step 3) Copy the json values into a test file

```
copy the complete json values into a test file.. say test.json
```

For ex — below data(mock) for your reference..

{“id”: “afa354f-8a9a-4cb2-ba22–8bc19d842b7d”, “crypto”: {“kdf”: “scrypt”, “mac”: “04d3dd0f3f2b44444f9350560bfa828b3658703676636c2751993c983d9b40c6”, “cipher”: “aes-128-ctr”, “kdfparams”: {“n”: 262144, “p”: 1, “r”: 8, “salt”: “6d99ff17d887763d3774aa5bc00631e2a79763be68884af1e4f262cd8cd0828”, “dklen”: 32}, “ciphertext”: “3bfee9e6ed917f1b335e95df5554ebc72c80e63979027e74634f2aebf08f02f1”, “cipherparams”: {“iv”: “eb3bcbabf6d871c829e5948da9a690c0”}}, “address”: “bb4d8683f2924473c579c539436810d5ac28aab3”, “version”: 3}

#### Step 4)  Add Xinfin mainnet in Metamask using “Add a network” option

![](https://1713380242-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl1AVRR4cLSYjVp62RmtY%2Fuploads%2FCu86Mgne0oCrdPKNYLKg%2Fimage.png?alt=media\&token=00ff28ba-f32b-4eca-99bf-5cf455de4686)

#### Step 5 - Now choose “Import account” and select JSON file as type. (Password should be the same as your Keystore password which you entered while you setup Plugin Node)

![](https://1713380242-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl1AVRR4cLSYjVp62RmtY%2Fuploads%2FB5W9lhEFpP0VfxSa0MIh%2Fimage.png?alt=media\&token=419e37ee-1829-482e-aa40-1e0960ceb3aa)

{% hint style="info" %}
Note: This step will take some time so please be patient also ensure, your node is running and the Plugin UI is logged in (localhost:6688)
{% endhint %}

You can see the address loaded and it shows the right balance of XDC & PLI

![](https://1713380242-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl1AVRR4cLSYjVp62RmtY%2Fuploads%2F25rCVxCgNjzV3A5onOtS%2Fimage.png?alt=media\&token=0288f58f-aecd-4cf7-b1fd-5599152caa46)

To view the PLI balance, click “Import token”.

Step 6 - Copy-paste the PLI mainnet smart contract address (prefix to be changed from XDC to 0x) and click “Add custom token”

![](https://1713380242-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl1AVRR4cLSYjVp62RmtY%2Fuploads%2FuDUyNPSA24livYBldzzl%2Fimage.png?alt=media\&token=8dc8e573-adee-4ef6-b30a-b9ee6153682f)

![](https://1713380242-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl1AVRR4cLSYjVp62RmtY%2Fuploads%2FW1yzrW2xZDn9BgSuFQBW%2Fimage.png?alt=media\&token=2c1dc8cf-d748-497a-8b99-72b3b02fefd3)


---

# 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.goplugin.co/node-operators/withdraw-pli-from-plugin-node.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.
