Files
bybit-api/examples/apidoc/V5/User/modify-sub-api-key.js
2023-06-09 14:21:36 +01:00

31 lines
555 B
JavaScript

const { RestClientV5 } = require('bybit-api');
const client = new RestClientV5({
testnet: true,
key: 'apikey',
secret: 'apisecret',
});
client
.updateSubApiKey({
readOnly: 0,
ips: ['*'],
permissions: {
ContractTrade: [],
Spot: ['SpotTrade'],
Wallet: ['AccountTransfer'],
Options: [],
Derivatives: [],
CopyTrading: [],
BlockTrade: [],
Exchange: [],
NFT: [],
},
})
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});