Files
bybit-api/examples/apidoc/V5/Position/switch-cross-isolated-margin.js

23 lines
404 B
JavaScript

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);
});