Skip to content

Malakia-sol/bullx-neo-api-scripts

Repository files navigation

BullX NEO API Scripts

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

📦 Features

  • 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.

🚀 Getting Started

Prerequisites

  • Node.js (v14 or higher)
  • npm (comes with Node.js)

Installation

  1. Clone the repository:

    git clone https://github.com/Malakia-sol/bullx-neo-api-scripts.git
    cd bullx-neo-api-scripts
  2. Install dependencies:

    npm install
  3. Create a .env file 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, and YOUR_COOKIES with the actual values from your BullX API credentials.

📄 Usage

1️⃣ Portfolio Data

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

2️⃣ NeoVision Pro Data

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

3️⃣ Trade History

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

⚙️ Configuration

All sensitive credentials are managed via the .env file. Make sure to never expose this file in public repositories.

Environment Variables:

  • BULLX_BEARER_TOKEN: Bearer token for API access.
  • BULLX_CS_TOKEN: Cross-site token for secure requests.
  • BULLX_COOKIES: Session cookies from BullX.

📝 Contributing

Contributions are welcome! Feel free to open issues or pull requests to enhance the project.


Developed with ❤️ by Malakia - Telegram: @KingMalakia - @SolDevsGang

About

This repository contains Node.js scripts to interact with the BullX NEO API, allowing you to retrieve portfolio data, NeoVision Pro data, and trade history

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors