This repository contains Node.js scripts to interact with the BullX API NEO, allowing you to retrieve portfolio data, NeoVision Pro data, and trade history. The scripts are flexible, enabling you to input custom wallet addresses and manage API credentials securely via environment variables.
HOW TO GET YOUR API CREDENTIALS? Guide
- Portfolio Data Retrieval: Get detailed portfolio statistics, including PnL, gas spent, and wallet balances.
- NeoVision Pro Data: Fetch token-related data like market cap, liquidity, volume, and pump.fun integration.
- Trade History: Retrieve the latest trades for specified wallet addresses.
- JSON Export: All fetched data is saved into structured JSON files for easy analysis.
- Node.js (v14 or higher)
- npm (comes with Node.js)
-
Clone the repository:
git clone https://github.com/Malakia-sol/bullx-neo-api-scripts.git cd bullx-neo-api-scripts -
Install dependencies:
npm install
-
Create a
.envfile in the root directory:touch .env
Add the following environment variables:
BULLX_BEARER_TOKEN=Bearer YOUR_BEARER_TOKEN BULLX_CS_TOKEN=YOUR_X_CS_TOKEN BULLX_COOKIES=YOUR_COOKIES
Note: Replace
YOUR_BEARER_TOKEN,YOUR_X_CS_TOKEN, andYOUR_COOKIESwith the actual values from your BullX API credentials.
Retrieve portfolio statistics:
node bullx_getPortfolioV3.js- You'll be prompted to enter wallet addresses (comma-separated).
- Data will be saved to
portfolio.json.
Sample Output:
✅ Data saved to 'portfolio.json'
📌 Portfolio Statistics:
🔥 Realized PnL: $120.00
📉 Unrealized PnL: -$45.67
⛽ Gas Spent: $3.45
Fetch NeoVision Pro token data:
node bullx_neovisionpro.js- Enter Chain IDs (comma-separated) and a Pool Creation Block Timestamp.
- Data will be saved to
bullx_neovisionpro.json.
Sample Output:
✅ Data saved to 'bullx_neovisionpro.json'
📌 Top 10 Tokens:
1. 🏷️ Name: ExampleToken (EXT)
🔹 Address: 0x123abc...
💰 Market Cap: $1,200,000
💎 Liquidity: $50,000
📊 Volume (24h): $5,000
🔗 Pump.fun: https://pump.fun/coin/0x123abc
Retrieve the latest trades:
node bullx_tradehistoryv5.js- You'll be prompted to enter wallet addresses.
- Data will be saved to
bullx_tradehistoryv5.json.
Sample Output:
✅ Data saved to 'bullx_tradehistoryv5.json'
📌 Latest 5 Trades:
1. 🏷️ Token: ExampleToken (EXT)
🔹 Address: 0x456def...
💰 Price: 0.0012 USD
💎 Quantity: 1000
🔄 Type: Buy
🕒 Timestamp: 2025-02-01 12:00:00
All sensitive credentials are managed via the .env file. Make sure to never expose this file in public repositories.
BULLX_BEARER_TOKEN: Bearer token for API access.BULLX_CS_TOKEN: Cross-site token for secure requests.BULLX_COOKIES: Session cookies from BullX.
Contributions are welcome! Feel free to open issues or pull requests to enhance the project.
Developed with ❤️ by Malakia - Telegram: @KingMalakia - @SolDevsGang