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

30 lines
664 B
JavaScript

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