feat(): start adding per-endpoint examples
This commit is contained in:
27
examples/apidoc/V5/Trade/place-order.js
Normal file
27
examples/apidoc/V5/Trade/place-order.js
Normal file
@@ -0,0 +1,27 @@
|
||||
const { RestClientV5 } = require('bybit-api');
|
||||
|
||||
const client = new RestClientV5({
|
||||
testnet: true,
|
||||
key: 'apikey',
|
||||
secret: 'apisecret',
|
||||
});
|
||||
|
||||
client
|
||||
.submitOrder({
|
||||
category: 'spot',
|
||||
symbol: 'BTCUSDT',
|
||||
side: 'Buy',
|
||||
orderType: 'Market',
|
||||
qty: '0.1',
|
||||
price: '15600',
|
||||
timeInForce: 'PostOnly',
|
||||
orderLinkId: 'spot-test-postonly',
|
||||
isLeverage: 0,
|
||||
orderFilter: 'Order',
|
||||
})
|
||||
.then((response) => {
|
||||
console.log(response);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
Reference in New Issue
Block a user