💰❓ Estimate Tokens in Wallet Endpoint
Overview
The /estimate-tokens-in-wallet/:mint
endpoint estimates the number of tokens in a specified wallet and provides the estimated SOL value for those tokens. This endpoint helps developers understand the token holdings and their equivalent SOL value. Use this endpoint to figure out if you're winning or loosing sols!
Endpoint
POST /estimate-tokens-in-wallet/:mint
Request Parameters
[ The request parameters should be included in the URL path and request body:
URL Parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
mint | string | Yes | The mint public key of the token in base58 format. | "ACN...C8rhpump" |
Request Body
Property | Type | Required | Description | Example |
---|---|---|---|---|
privateKey | string | Yes | The private key of the wallet in base58 format. | "5KQwdi...Knk" |
Response
A successful response will be a JSON object containing the estimated token details and the SOL value in the specified wallet. The response structure is as follows:
Property | Type | Description |
---|---|---|
status | number | Status code of the response. |
wallet | object | Object containing wallet token details. |
wallet.tokensInWallet | number | Number of tokens in the wallet. |
wallet.estimatedSolsValue | number | Estimated SOL value for the tokens in the wallet. |
token | object | Object containing token details. |
token.mint | string | The mint public key of the token. |
token.name | string | The name of the token. |
token.symbol | string | The symbol of the token. |
token.description | string | Description of the token. |
token.image_uri | string | URI to the image of the token. |
token.twitter | string | Twitter link associated with the token. |
token.telegram | string | Telegram link associated with the token. |
token.creator | string | Public key of the token creator. |
token.created_timestamp | number | Timestamp of when the token was created. |
token.raydium_pool | string | Raydium pool associated with the token, if any. |
token.complete | boolean | Indicates if the token information is complete. |
token.virtual_sol_reserves | number | Virtual SOL reserves associated with the token. |
token.virtual_token_reserves | number | Virtual token reserves associated with the token. |
token.website | string | Website link associated with the token. |
token.king_of_the_hill_timestamp | number | Timestamp for the king of the hill event. |
token.total_supply | number | Total supply of the token. |
token.reply_count | number | Number of replies associated with the token. |
token.last_reply | number | Timestamp of the last reply. |
token.nsfw | boolean | Indicates if the token is not safe for work. |
token.market_cap | number | Market capitalization of the token. |
token.usd_market_cap | number | USD market capitalization of the token. |
token.signature | string | Signature associated with the token data. |
token.timestamp | number | Timestamp of the token data retrieval. |
Code Examples
- JavaScript
- Python
- Curl
const fetch = require('node-fetch');
const url = "https://pumptrader.fun/estimate-tokens-in-wallet/13RtH68krMP1hJyuF5RaGKcFn575hrWxpoD2zL4cJ1r9";
const payload = {
privateKey: "D17iK3qHPHFuNXLoGQyB1ymhUGWRBU8YGHQnq9hahBcD"
};
fetch(url, {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(payload)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
import requests
url = "https://pumptrader.fun/estimate-tokens-in-wallet/13RtH68krMP1hJyuF5RaGKcFn575hrWxpoD2zL4cJ1r9"
payload = {
"privateKey": "D17iK3qHPHFuNXLoGQyB1ymhUGWRBU8YGHQnq9hahBcD"
}
headers = {
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
curl -X POST https://pumptrader.fun/estimate-tokens-in-wallet/13RtH68krMP1hJyuF5RaGKcFn575hrWxpoD2zL4cJ1r9\
-H "Content-Type: application/json" \
-d '{
"privateKey": "D17iK3qHPHFuNXLoGQyB1ymhUGWRBU8YGHQnq9hahBcD"
}'
Response Example
"status": 200,
"wallet": {
"tokensInWallet": 2617946.41841,
"estimatedSolsValue": 1.4617884187
},
"token": {
"mint": "ACN...C8rhpump",
"name": "Token Name",
"symbol": "SYMB",
"description": "Some Description",
"image_uri": "https://cf-ipfs.com/ipfs/imageuri",
"twitter": null,
"telegram": null,
"creator": "ZIu..Ax4",
"created_timestamp": 1717702972753,
"raydium_pool": null,
"complete": false,
"virtual_sol_reserves": 35994846574,
"virtual_token_reserves": 894294688349769,
"website": null,
"king_of_the_hill_timestamp": 1717705374642,
"total_supply": 1000000000000000,
"reply_count": 48,
"last_reply": 1717710645270,
"nsfw": false,
"market_cap": 40.249424538,
"usd_market_cap": 6862.526883729,
"signature": "4T1AxQFXgypfwuwCZbZ3j3fGpo1hNcPqo9CxN94ZDxa2BGyY6yqbU19Vnm5Ns95g5TiB75nkGswyYo6rKXpyhdFj",
"timestamp": 1716577319165
}
}