const { RestClientV5 } = require('bybit-api'); // Initialize the client with testnet mode const client = new RestClientV5({ testnet: true, key: 'YOUR_API_KEY', secret: 'YOUR_API_SECRET', }); // Example parameters const params = { itemId: '1898988222063644672', // Replace with your ad ID }; // Call the function client .getP2PAdDetail(params) .then((response) => { console.log('Response:', response); }) .catch((error) => { console.error('Error:', error); });