feat(): add preCheckOrder method with corresponding types and example usage, add txId and Id to deposit records
This commit is contained in:
24
examples/apidoc/V5/Trade/pre-check-order.js
Normal file
24
examples/apidoc/V5/Trade/pre-check-order.js
Normal 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);
|
||||
});
|
||||
Reference in New Issue
Block a user