feat(v4.0.2): Add full support for P2P trading
This commit is contained in:
25
examples/apidoc/V5/P2P/get-chat-message.js
Normal file
25
examples/apidoc/V5/P2P/get-chat-message.js
Normal file
@@ -0,0 +1,25 @@
|
||||
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 = {
|
||||
orderId: '1898976123321221120', // Replace with your order ID
|
||||
size: '1', // Number of messages per page
|
||||
currentPage: '1', // Optional: current page number
|
||||
};
|
||||
|
||||
// Call the function
|
||||
client
|
||||
.getP2POrderMessages(params)
|
||||
.then((response) => {
|
||||
console.log('Response:', response);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('Error:', error);
|
||||
});
|
||||
Reference in New Issue
Block a user