feat(#261): add tpsl params missing from position endpoints. add new endpoint for add/reduce margin. add doc examples
This commit is contained in:
21
examples/apidoc/V5/Position/set-leverage.js
Normal file
21
examples/apidoc/V5/Position/set-leverage.js
Normal file
@@ -0,0 +1,21 @@
|
||||
const { RestClientV5 } = require('bybit-api');
|
||||
|
||||
const client = new RestClientV5({
|
||||
testnet: true,
|
||||
key: 'apikey',
|
||||
secret: 'apisecret',
|
||||
});
|
||||
|
||||
client
|
||||
.setLeverage({
|
||||
category: 'linear',
|
||||
symbol: 'BTCUSDT',
|
||||
buyLeverage: '6',
|
||||
sellLeverage: '6',
|
||||
})
|
||||
.then((response) => {
|
||||
console.log(response);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
Reference in New Issue
Block a user