Files
bybit-api/examples/apidoc/V5/P2P/update-relist-my-ad.js

34 lines
673 B
JavaScript

const { RestClientV5 } = require('bybit-api');
// Create a client
const client = new RestClientV5({
testnet: true,
key: 'XXXXX',
secret: 'XXXXX',
});
// Update P2P advertisement
client
.updateP2PAd({
id: '1898988222063644672',
priceType: '0',
premium: '',
price: '0.914',
minAmount: '25',
maxAmount: '5000',
remark: '',
paymentIds: ['-1'],
tradingPreferenceSet: {},
actionType: 'ACTIVE',
quantity: '1000',
paymentPeriod: '15',
itemType: 'ORIGIN',
subsidyAd: false,
securityRiskToken: '',
})
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});