Files
bybit-api/examples/apidoc/V5/P2P/get-ad-detail.js

24 lines
489 B
JavaScript

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);
});