feat(#261): add tpsl params missing from position endpoints. add new endpoint for add/reduce margin. add doc examples

This commit is contained in:
tiagosiebler
2023-06-07 16:56:36 +01:00
parent 4f563a65a5
commit 05d63839da
15 changed files with 289 additions and 1 deletions

View File

@@ -0,0 +1,22 @@
const { RestClientV5 } = require('bybit-api');
const client = new RestClientV5({
testnet: true,
key: 'apikey',
secret: 'apisecret',
});
client
.switchIsolatedMargin({
category: 'linear',
symbol: 'ETHUSDT',
tradeMode: 1,
buyLeverage: '10',
sellLeverage: '10',
})
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});