Menu

🔔 Signals about users

After verification of specific user, they still can set up or have filters on the premium page, so after confirmation of verification from our side we will send information about user preferences in specific format by different triggers. Below we will use the socket.io approach to reach these goals.

WATCH OUT! WE RECOMNED TO USE LATEST VERSION OF CLIENT PART OF SOCKET.IO LIBRARY, BUT IF IT'S NOT POSSIBLE PLEASE SEE THE CLIENT COMPABILITY

To start receiving info about users need to connect by specific route, bellow we provide example on most popular Node.js librarysocket.io-client , how to do that:

CODE copy
Copied!
const io = require('socket.io-client');

// API-KEYS
const LOTUSMARKET_API_KEY = 'YOUR_LOTUS_MARKET_API_KEY';

(() => {
  const socket = io('wss://lotusmarket.io/api/v1/sniper-bots/users', {
    extraHeaders: {
      'Api-Key': LOTUSMARKET_API_KEY,
    },
  });

  socket.on('connect', () => {
    socket.on('TIER-1', (data) => {
      // HERE PROCESS RECEIVING DATA
    });

    socket.on('TIER-2', (data) => {
      // HERE PROCESS RECEIVING DATA
    });
  });

  socket.on("reconnection_attempt", () => {
    // HANDLE THIS EVENT
  });

  socket.on("reconnect", () => {
    // HANDLE THIS EVENT
  });

  socket.on("disconnect", (reason) => {
    // HANDLE THIS ONE
  });

  socket.on('error', () => {
    // HERE PROCESS THE ERRORS WITH NETWORK
  });

  socket.on('reconnect_error', () => {
    // HERE PROCESS THE ERRORS WITH NETWORK
  });
})();

Here, as you can see, there is different events that sniper-bot need to handle, below is the detailed instruction how to use route that is shown in the example above. The {botName} it’s data replaced by you that was given from us (see 🔥 Premium -> 📢 Introduction )

SOCKET wss://lotusmarket.io/api/v1/sniper-bots/users/{botName}
copy
Copied!

BE CAREFUL! YOUR ACCESS MAY BE RESTRICTED FOR THE FOLLOWING REASONS:

  • YOUR IP-ADDRESS WAS CHANGED, AND NOW API FOR YOU IT'S NOT AVAILABLE, PLEASE NOTIFY US
  • YOU USED TO MANY ATTEMPTS OF REQUESTS, OUR LIMITATION IS 60 REQUEST PER MINUTE
  • SOMETIMES WE NEED TO REFRESH OUR WHITE LISTS AND IN THIS MOMENT SERVER CAN BE NOT AVAILABLE/li>
  • MAKE SURE THAT YOU HANDLE "reconnect" AND "disconnect" EVENTS, BECAUSE IN THE PROCESS CAN BE SOME INTERAPTION
HEADERS
Api-Key: <YOUR_API_KEY>

This route has the next events:

new-token

In this event data emitting only for users that bought 'Tier 1' and ‘Tier 2’ tariffs, in the specific format, for example for ‘Tier 1’ user it’s:

RESPONSE copy
Copied!
{
  "chatId": 0,
  "networkId": 56,
  "tokenAddress": "0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82"
}                                  

chatId

NUMBER

Telegram chat id of user that was verificated

networkId

NUMBER

Standard identifier of EVM-based networks, where:

  • 1 - it's Ethereum blockchain
  • 56 - it's Binance blockchai

tokenAddress

STRING

Address of token that exists in specific blockchain

For 'Tier 2' tariff, in the specific format:

RESPONSE copy
Copied!
{
  "chatId": 0,
  "networkId": 56,
  "tokenAddress": "0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82",
  "transactionLimitation": "5000000",
  "walletLimitation": "50000000000000000"
}
                                        

chatId

NUMBER

Telegram chat id of user that was verificated

networkId

NUMBER

Standard identifier of EVM-based networks, where:

  • 1 - it's Ethereum blockchain
  • 56 - it's Binance blockchai

tokenAddress

STRING

Address of token that exists in specific blockchain

transactionLimitation

STRING, NULLABLE

Max amount of tokens that allow to buy per transaction

walletLimitation

STRING, NULLABLE

Max amount of tokens that allow to buy per wallet

Connect to a wallet

Metamask