feat(): add preCheckOrder method with corresponding types and example usage, add txId and Id to deposit records

This commit is contained in:
JJ-Cro
2025-06-12 18:04:15 +02:00
parent fb41a3bb44
commit e302c9b94f
9 changed files with 60 additions and 3 deletions

View File

@@ -0,0 +1,24 @@
const { RestClientV5 } = require('bybit-api');
const client = new RestClientV5({
testnet: true,
key: 'apikey',
secret: 'apisecret',
});
// Submit a market order
client
.preCheckOrder({
category: 'spot',
symbol: 'BTCUSDT',
side: 'Buy',
orderType: 'Limit',
qty: '0.01',
price: '28000',
})
.then((response) => {
console.log('Market order result', response);
})
.catch((error) => {
console.error('Market order error', error);
});