diff --git a/examples/apidoc/RestClientV3/loanRepay.js b/examples/apidoc/RestClientV3/Account/adjust-account-mode.js similarity index 53% rename from examples/apidoc/RestClientV3/loanRepay.js rename to examples/apidoc/RestClientV3/Account/adjust-account-mode.js index 3598732..8ef5965 100644 --- a/examples/apidoc/RestClientV3/loanRepay.js +++ b/examples/apidoc/RestClientV3/Account/adjust-account-mode.js @@ -2,19 +2,16 @@ import { RestClientV3 } from 'bitget-api'; // or, if require is preferred: // const { RestClientV3 } = require('bitget-api'); -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/loan/repay -// METHOD: POST -// PUBLIC: NO - const client = new RestClientV3({ apiKey: 'insert_api_key_here', apiSecret: 'insert_api_secret_here', apiPass: 'insert_api_pass_here', }); -client.loanRepay(params) +client + .adjustAccountMode({ + mode: 'basic', + }) .then((response) => { console.log(response); }) diff --git a/examples/apidoc/RestClientV3/getP2pMyAds.js b/examples/apidoc/RestClientV3/Account/get-account-assets.js similarity index 53% rename from examples/apidoc/RestClientV3/getP2pMyAds.js rename to examples/apidoc/RestClientV3/Account/get-account-assets.js index 7ce08fe..c256416 100644 --- a/examples/apidoc/RestClientV3/getP2pMyAds.js +++ b/examples/apidoc/RestClientV3/Account/get-account-assets.js @@ -2,19 +2,14 @@ import { RestClientV3 } from 'bitget-api'; // or, if require is preferred: // const { RestClientV3 } = require('bitget-api'); -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/p2p/my-ads -// METHOD: GET -// PUBLIC: NO - const client = new RestClientV3({ apiKey: 'insert_api_key_here', apiSecret: 'insert_api_secret_here', apiPass: 'insert_api_pass_here', }); -client.getP2pMyAds(params) +client + .getBalances() .then((response) => { console.log(response); }) diff --git a/examples/apidoc/RestClientV3/getFills.js b/examples/apidoc/RestClientV3/Account/get-account-fee-rate.js similarity index 53% rename from examples/apidoc/RestClientV3/getFills.js rename to examples/apidoc/RestClientV3/Account/get-account-fee-rate.js index e0bcabc..b95a3f4 100644 --- a/examples/apidoc/RestClientV3/getFills.js +++ b/examples/apidoc/RestClientV3/Account/get-account-fee-rate.js @@ -2,19 +2,17 @@ import { RestClientV3 } from 'bitget-api'; // or, if require is preferred: // const { RestClientV3 } = require('bitget-api'); -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/market/fills -// METHOD: GET -// PUBLIC: YES - const client = new RestClientV3({ apiKey: 'insert_api_key_here', apiSecret: 'insert_api_secret_here', apiPass: 'insert_api_pass_here', }); -client.getFills(params) +client + .getFeeRate({ + category: 'SPOT', + symbol: 'BTCUSDT', + }) .then((response) => { console.log(response); }) diff --git a/examples/apidoc/RestClientV3/getLoanDebts.js b/examples/apidoc/RestClientV3/Account/get-account-funding-assets.js similarity index 53% rename from examples/apidoc/RestClientV3/getLoanDebts.js rename to examples/apidoc/RestClientV3/Account/get-account-funding-assets.js index 5798013..4ed58d9 100644 --- a/examples/apidoc/RestClientV3/getLoanDebts.js +++ b/examples/apidoc/RestClientV3/Account/get-account-funding-assets.js @@ -2,19 +2,16 @@ import { RestClientV3 } from 'bitget-api'; // or, if require is preferred: // const { RestClientV3 } = require('bitget-api'); -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/loan/debts -// METHOD: GET -// PUBLIC: NO - const client = new RestClientV3({ apiKey: 'insert_api_key_here', apiSecret: 'insert_api_secret_here', apiPass: 'insert_api_pass_here', }); -client.getLoanDebts(params) +client + .getFundingAssets({ + coin: 'USDT', + }) .then((response) => { console.log(response); }) diff --git a/examples/apidoc/RestClientV3/Account/get-account-info.js b/examples/apidoc/RestClientV3/Account/get-account-info.js new file mode 100644 index 0000000..b33fff1 --- /dev/null +++ b/examples/apidoc/RestClientV3/Account/get-account-info.js @@ -0,0 +1,18 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getAccountInfo() + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Account/get-account-setting.js b/examples/apidoc/RestClientV3/Account/get-account-setting.js new file mode 100644 index 0000000..0a2a92d --- /dev/null +++ b/examples/apidoc/RestClientV3/Account/get-account-setting.js @@ -0,0 +1,18 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getAccountSettings() + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Account/get-all-symbol-fee-rates.js b/examples/apidoc/RestClientV3/Account/get-all-symbol-fee-rates.js new file mode 100644 index 0000000..12b881a --- /dev/null +++ b/examples/apidoc/RestClientV3/Account/get-all-symbol-fee-rates.js @@ -0,0 +1,20 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getAllFeeRates({ + category: 'SPOT', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Account/get-collateral-type.js b/examples/apidoc/RestClientV3/Account/get-collateral-type.js new file mode 100644 index 0000000..c96848b --- /dev/null +++ b/examples/apidoc/RestClientV3/Account/get-collateral-type.js @@ -0,0 +1,18 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getCollateralType() + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Account/get-convert-records.js b/examples/apidoc/RestClientV3/Account/get-convert-records.js new file mode 100644 index 0000000..56d73eb --- /dev/null +++ b/examples/apidoc/RestClientV3/Account/get-convert-records.js @@ -0,0 +1,21 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getConvertRecords({ + fromCoin: 'BTC', + toCoin: 'USDT', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Account/get-custom-collateral-coins.js b/examples/apidoc/RestClientV3/Account/get-custom-collateral-coins.js new file mode 100644 index 0000000..ca20913 --- /dev/null +++ b/examples/apidoc/RestClientV3/Account/get-custom-collateral-coins.js @@ -0,0 +1,14 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3(); + +client + .getCustomCollateralCoins() + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Account/get-deduct-info.js b/examples/apidoc/RestClientV3/Account/get-deduct-info.js new file mode 100644 index 0000000..169d607 --- /dev/null +++ b/examples/apidoc/RestClientV3/Account/get-deduct-info.js @@ -0,0 +1,18 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getDeductInfo() + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Account/get-delta-info.js b/examples/apidoc/RestClientV3/Account/get-delta-info.js new file mode 100644 index 0000000..5a4fe1c --- /dev/null +++ b/examples/apidoc/RestClientV3/Account/get-delta-info.js @@ -0,0 +1,18 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getDeltaInfo() + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Account/get-financial-records.js b/examples/apidoc/RestClientV3/Account/get-financial-records.js new file mode 100644 index 0000000..51058a4 --- /dev/null +++ b/examples/apidoc/RestClientV3/Account/get-financial-records.js @@ -0,0 +1,21 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getFinancialRecords({ + category: 'USDT-FUTURES', + coin: 'BGB', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Account/get-max-open-available.js b/examples/apidoc/RestClientV3/Account/get-max-open-available.js new file mode 100644 index 0000000..8a2354f --- /dev/null +++ b/examples/apidoc/RestClientV3/Account/get-max-open-available.js @@ -0,0 +1,23 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getMaxOpenAvailable({ + category: 'SPOT', + symbol: 'BTCUSDT', + orderType: 'market', + side: 'sell', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Account/get-max-transferable.js b/examples/apidoc/RestClientV3/Account/get-max-transferable.js new file mode 100644 index 0000000..1322528 --- /dev/null +++ b/examples/apidoc/RestClientV3/Account/get-max-transferable.js @@ -0,0 +1,20 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getMaxTransferable({ + coin: 'USDT', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Account/get-max-withdrawal.js b/examples/apidoc/RestClientV3/Account/get-max-withdrawal.js new file mode 100644 index 0000000..a219b1c --- /dev/null +++ b/examples/apidoc/RestClientV3/Account/get-max-withdrawal.js @@ -0,0 +1,20 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getMaxWithdrawal({ + coin: 'USDT', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Account/get-move-position-history.js b/examples/apidoc/RestClientV3/Account/get-move-position-history.js new file mode 100644 index 0000000..59e1527 --- /dev/null +++ b/examples/apidoc/RestClientV3/Account/get-move-position-history.js @@ -0,0 +1,20 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getMovePositionHistory({ + category: 'USDT-FUTURES', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Account/get-oi-limit.js b/examples/apidoc/RestClientV3/Account/get-oi-limit.js new file mode 100644 index 0000000..a56c5de --- /dev/null +++ b/examples/apidoc/RestClientV3/Account/get-oi-limit.js @@ -0,0 +1,21 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getOpenInterestLimit({ + category: 'USDT-FUTURES', + symbol: 'BTCUSDT', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Account/get-payment-coins.js b/examples/apidoc/RestClientV3/Account/get-payment-coins.js new file mode 100644 index 0000000..179f910 --- /dev/null +++ b/examples/apidoc/RestClientV3/Account/get-payment-coins.js @@ -0,0 +1,18 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getPaymentCoins() + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Account/get-reality-fills.js b/examples/apidoc/RestClientV3/Account/get-reality-fills.js new file mode 100644 index 0000000..736e8bb --- /dev/null +++ b/examples/apidoc/RestClientV3/Account/get-reality-fills.js @@ -0,0 +1,21 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getRealityFills({ + symbol: 'RAAPLUSDT', + limit: '100', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Account/get-reality-orderbook.js b/examples/apidoc/RestClientV3/Account/get-reality-orderbook.js new file mode 100644 index 0000000..3ebab4f --- /dev/null +++ b/examples/apidoc/RestClientV3/Account/get-reality-orderbook.js @@ -0,0 +1,20 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getRealityOrderBook({ + symbol: 'RAAPLUSDT', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Account/get-repayable-coins.js b/examples/apidoc/RestClientV3/Account/get-repayable-coins.js new file mode 100644 index 0000000..965065b --- /dev/null +++ b/examples/apidoc/RestClientV3/Account/get-repayable-coins.js @@ -0,0 +1,18 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getRepayableCoins() + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Account/get-switch-status.js b/examples/apidoc/RestClientV3/Account/get-switch-status.js new file mode 100644 index 0000000..1df06f5 --- /dev/null +++ b/examples/apidoc/RestClientV3/Account/get-switch-status.js @@ -0,0 +1,18 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getUnifiedAccountSwitchStatus() + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Account/move-positions.js b/examples/apidoc/RestClientV3/Account/move-positions.js new file mode 100644 index 0000000..b25bef2 --- /dev/null +++ b/examples/apidoc/RestClientV3/Account/move-positions.js @@ -0,0 +1,29 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .movePositions({ + fromUid: '111111111', + toUid: '222222222', + category: 'USDT-FUTURES', + positionList: [ + { + symbol: 'BTCUSDT', + side: 'sell', + qty: '0.5', + }, + ], + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Account/pre-set-leverage.js b/examples/apidoc/RestClientV3/Account/pre-set-leverage.js new file mode 100644 index 0000000..cbb71ea --- /dev/null +++ b/examples/apidoc/RestClientV3/Account/pre-set-leverage.js @@ -0,0 +1,23 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .preSetLeverage({ + category: 'USDT-FUTURES', + symbol: 'BTCUSDT', + marginMode: 'cross', + leverage: '10', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Account/repay.js b/examples/apidoc/RestClientV3/Account/repay.js new file mode 100644 index 0000000..c464c0f --- /dev/null +++ b/examples/apidoc/RestClientV3/Account/repay.js @@ -0,0 +1,21 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .submitRepay({ + repayableCoinList: ['USDT'], + paymentCoinList: ['ETH'], + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Account/set-collateral-type.js b/examples/apidoc/RestClientV3/Account/set-collateral-type.js new file mode 100644 index 0000000..00aa193 --- /dev/null +++ b/examples/apidoc/RestClientV3/Account/set-collateral-type.js @@ -0,0 +1,20 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .setCollateralType({ + collateralType: 'mainstream', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Account/set-holding-mode.js b/examples/apidoc/RestClientV3/Account/set-holding-mode.js new file mode 100644 index 0000000..49d7913 --- /dev/null +++ b/examples/apidoc/RestClientV3/Account/set-holding-mode.js @@ -0,0 +1,20 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .setHoldMode({ + holdMode: 'one_way_mode', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Account/set-leverage.js b/examples/apidoc/RestClientV3/Account/set-leverage.js new file mode 100644 index 0000000..bc803ab --- /dev/null +++ b/examples/apidoc/RestClientV3/Account/set-leverage.js @@ -0,0 +1,22 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .setLeverage({ + category: 'USDT-FUTURES', + symbol: 'BTCUSDT', + leverage: '10', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Account/set-margin.js b/examples/apidoc/RestClientV3/Account/set-margin.js new file mode 100644 index 0000000..b160d1f --- /dev/null +++ b/examples/apidoc/RestClientV3/Account/set-margin.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .setMargin({ + category: 'USDT-FUTURES', + symbol: 'BTCUSDT', + posSide: 'long', + operation: 'add', + amount: '10', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Account/set-up-deposit-account.js b/examples/apidoc/RestClientV3/Account/set-up-deposit-account.js new file mode 100644 index 0000000..d1bc24f --- /dev/null +++ b/examples/apidoc/RestClientV3/Account/set-up-deposit-account.js @@ -0,0 +1,21 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .setDepositAccount({ + coin: 'USDT', + accountType: 'unified', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Account/switch-account.js b/examples/apidoc/RestClientV3/Account/switch-account.js new file mode 100644 index 0000000..ebae23b --- /dev/null +++ b/examples/apidoc/RestClientV3/Account/switch-account.js @@ -0,0 +1,18 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .downgradeAccountToClassic() + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Account/switch-deduct.js b/examples/apidoc/RestClientV3/Account/switch-deduct.js new file mode 100644 index 0000000..fe78f0e --- /dev/null +++ b/examples/apidoc/RestClientV3/Account/switch-deduct.js @@ -0,0 +1,20 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .switchDeduct({ + deduct: 'on', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Broker/broker-subaccount-withdrawal.js b/examples/apidoc/RestClientV3/Broker/broker-subaccount-withdrawal.js new file mode 100644 index 0000000..32e36f4 --- /dev/null +++ b/examples/apidoc/RestClientV3/Broker/broker-subaccount-withdrawal.js @@ -0,0 +1,25 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .brokerSubWithdrawal({ + subUid: '12345678910', + dest: 'internal_transfer', + coin: 'USDT', + address: '123456789', + amount: '10', + clientOid: '91500512549_1765977438100', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Broker/create-broker-sub-account-api-key.js b/examples/apidoc/RestClientV3/Broker/create-broker-sub-account-api-key.js new file mode 100644 index 0000000..0e62f1c --- /dev/null +++ b/examples/apidoc/RestClientV3/Broker/create-broker-sub-account-api-key.js @@ -0,0 +1,25 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .createBrokerSubApiKey({ + subUid: '12345678910', + passphrase: '12345678', + label: '338040211757111_test01', + ipList: ['1.2.3.4'], + permType: 'read_write', + permList: ['uta_trade', 'uta_mgt', 'withdraw'], + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Broker/create-broker-sub-account.js b/examples/apidoc/RestClientV3/Broker/create-broker-sub-account.js new file mode 100644 index 0000000..75be70d --- /dev/null +++ b/examples/apidoc/RestClientV3/Broker/create-broker-sub-account.js @@ -0,0 +1,21 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .createBrokerSubAccount({ + subaccountName: 'hunterusers182114141', + label: 'hunterusersub21523121', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Broker/delete-broker-subaccount-apikey.js b/examples/apidoc/RestClientV3/Broker/delete-broker-subaccount-apikey.js new file mode 100644 index 0000000..e051f1b --- /dev/null +++ b/examples/apidoc/RestClientV3/Broker/delete-broker-subaccount-apikey.js @@ -0,0 +1,21 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .deleteBrokerSubApiKey({ + subUid: '12345678910', + apiKey: 'bg_123456789109', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Broker/get-all-broker-subaccount-deposit-withdrawal.js b/examples/apidoc/RestClientV3/Broker/get-all-broker-subaccount-deposit-withdrawal.js new file mode 100644 index 0000000..21b235d --- /dev/null +++ b/examples/apidoc/RestClientV3/Broker/get-all-broker-subaccount-deposit-withdrawal.js @@ -0,0 +1,18 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getBrokerAllSubDepositWithdrawal() + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Broker/get-broker-commission.js b/examples/apidoc/RestClientV3/Broker/get-broker-commission.js new file mode 100644 index 0000000..509cd1c --- /dev/null +++ b/examples/apidoc/RestClientV3/Broker/get-broker-commission.js @@ -0,0 +1,18 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getBrokerCommission() + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Broker/get-broker-sub-account-api-key.js b/examples/apidoc/RestClientV3/Broker/get-broker-sub-account-api-key.js new file mode 100644 index 0000000..6bb34cc --- /dev/null +++ b/examples/apidoc/RestClientV3/Broker/get-broker-sub-account-api-key.js @@ -0,0 +1,20 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getBrokerSubApiKey({ + subUid: '7648212277', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Broker/get-broker-sub-account-list.js b/examples/apidoc/RestClientV3/Broker/get-broker-sub-account-list.js new file mode 100644 index 0000000..97b08bc --- /dev/null +++ b/examples/apidoc/RestClientV3/Broker/get-broker-sub-account-list.js @@ -0,0 +1,18 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getBrokerSubAccountList() + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Broker/get-broker-subaccount-deposit-address.js b/examples/apidoc/RestClientV3/Broker/get-broker-subaccount-deposit-address.js new file mode 100644 index 0000000..ee6b1ff --- /dev/null +++ b/examples/apidoc/RestClientV3/Broker/get-broker-subaccount-deposit-address.js @@ -0,0 +1,22 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getBrokerSubDepositAddress({ + subUid: '12345678910', + chain: 'ERC20', + coin: 'USDT', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Broker/modify-broker-sub-account-api-key.js b/examples/apidoc/RestClientV3/Broker/modify-broker-sub-account-api-key.js new file mode 100644 index 0000000..ec200ee --- /dev/null +++ b/examples/apidoc/RestClientV3/Broker/modify-broker-sub-account-api-key.js @@ -0,0 +1,25 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .modifyBrokerSubApiKey({ + subUid: '12345678910', + passphrase: '12345678', + apiKey: 'bg_12345678910', + label: '338040211757111_test01', + permType: 'read_write', + permList: ['uta_trade', 'uta_mgt', 'withdraw'], + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Broker/modify-broker-sub-account.js b/examples/apidoc/RestClientV3/Broker/modify-broker-sub-account.js new file mode 100644 index 0000000..16fedaa --- /dev/null +++ b/examples/apidoc/RestClientV3/Broker/modify-broker-sub-account.js @@ -0,0 +1,21 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .modifyBrokerSubAccount({ + subUid: '1234567891', + status: 'freeze', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Copy-Trading/copy-trading-transfer.js b/examples/apidoc/RestClientV3/Copy-Trading/copy-trading-transfer.js new file mode 100644 index 0000000..a6c8b31 --- /dev/null +++ b/examples/apidoc/RestClientV3/Copy-Trading/copy-trading-transfer.js @@ -0,0 +1,22 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .copyFuturesTransfer({ + type: 'in', + coin: 'USDT', + amount: '100', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Copy-Trading/get-copy-trading-max-transferable.js b/examples/apidoc/RestClientV3/Copy-Trading/get-copy-trading-max-transferable.js new file mode 100644 index 0000000..d0565bf --- /dev/null +++ b/examples/apidoc/RestClientV3/Copy-Trading/get-copy-trading-max-transferable.js @@ -0,0 +1,20 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getCopyFuturesMaxTransferable({ + coin: 'USDT', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Copy-Trading/get-position-summary.js b/examples/apidoc/RestClientV3/Copy-Trading/get-position-summary.js new file mode 100644 index 0000000..cf4fd1c --- /dev/null +++ b/examples/apidoc/RestClientV3/Copy-Trading/get-position-summary.js @@ -0,0 +1,18 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getCopyFuturesPositionSummary() + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Copy-Trading/get-trading-pairs.js b/examples/apidoc/RestClientV3/Copy-Trading/get-trading-pairs.js new file mode 100644 index 0000000..c45a341 --- /dev/null +++ b/examples/apidoc/RestClientV3/Copy-Trading/get-trading-pairs.js @@ -0,0 +1,18 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getCopyFuturesTradingPairs() + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Copy-Trading/get-transfer-record.js b/examples/apidoc/RestClientV3/Copy-Trading/get-transfer-record.js new file mode 100644 index 0000000..85974b3 --- /dev/null +++ b/examples/apidoc/RestClientV3/Copy-Trading/get-transfer-record.js @@ -0,0 +1,18 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getCopyFuturesTransferRecords() + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Crypto-Loans/borrow-coins.js b/examples/apidoc/RestClientV3/Crypto-Loans/borrow-coins.js new file mode 100644 index 0000000..cb710b3 --- /dev/null +++ b/examples/apidoc/RestClientV3/Crypto-Loans/borrow-coins.js @@ -0,0 +1,23 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .loanBorrow({ + loanCoin: 'BTC', + pledgeCoin: 'ETH', + daily: 'SEVEN', + pledgeAmount: '1', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Crypto-Loans/get-borrow-history.js b/examples/apidoc/RestClientV3/Crypto-Loans/get-borrow-history.js new file mode 100644 index 0000000..ff5b5d6 --- /dev/null +++ b/examples/apidoc/RestClientV3/Crypto-Loans/get-borrow-history.js @@ -0,0 +1,21 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getLoanBorrowHistory({ + startTime: '1770185278083', + endTime: '1770185989134', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Crypto-Loans/get-borrow-ongoing.js b/examples/apidoc/RestClientV3/Crypto-Loans/get-borrow-ongoing.js new file mode 100644 index 0000000..a680945 --- /dev/null +++ b/examples/apidoc/RestClientV3/Crypto-Loans/get-borrow-ongoing.js @@ -0,0 +1,18 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getLoanBorrowOngoing() + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Crypto-Loans/get-loan-coins.js b/examples/apidoc/RestClientV3/Crypto-Loans/get-loan-coins.js new file mode 100644 index 0000000..aba6459 --- /dev/null +++ b/examples/apidoc/RestClientV3/Crypto-Loans/get-loan-coins.js @@ -0,0 +1,18 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getLoanCoins() + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Crypto-Loans/get-loan-debts.js b/examples/apidoc/RestClientV3/Crypto-Loans/get-loan-debts.js new file mode 100644 index 0000000..8c9222c --- /dev/null +++ b/examples/apidoc/RestClientV3/Crypto-Loans/get-loan-debts.js @@ -0,0 +1,18 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getLoanDebts() + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Crypto-Loans/get-loan-interest.js b/examples/apidoc/RestClientV3/Crypto-Loans/get-loan-interest.js new file mode 100644 index 0000000..46cbf7a --- /dev/null +++ b/examples/apidoc/RestClientV3/Crypto-Loans/get-loan-interest.js @@ -0,0 +1,23 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getLoanInterest({ + loanCoin: 'BTC', + pledgeCoin: 'USDT', + daily: 'SEVEN', + pledgeAmount: '100', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Crypto-Loans/get-loan-reduces.js b/examples/apidoc/RestClientV3/Crypto-Loans/get-loan-reduces.js new file mode 100644 index 0000000..f3fa5ae --- /dev/null +++ b/examples/apidoc/RestClientV3/Crypto-Loans/get-loan-reduces.js @@ -0,0 +1,21 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getLoanReduces({ + startTime: '1765274978412', + endTime: '1765274978412', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Crypto-Loans/get-pledge-rate-history.js b/examples/apidoc/RestClientV3/Crypto-Loans/get-pledge-rate-history.js new file mode 100644 index 0000000..1ba7b75 --- /dev/null +++ b/examples/apidoc/RestClientV3/Crypto-Loans/get-pledge-rate-history.js @@ -0,0 +1,21 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getLoanPledgeRateHistory({ + startTime: '1770258582042', + endTime: '1770258592042', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Crypto-Loans/get-repay-history.js b/examples/apidoc/RestClientV3/Crypto-Loans/get-repay-history.js new file mode 100644 index 0000000..732588f --- /dev/null +++ b/examples/apidoc/RestClientV3/Crypto-Loans/get-repay-history.js @@ -0,0 +1,21 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getLoanRepayHistory({ + startTime: '1713645576789', + endTime: '1713645576798', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Crypto-Loans/repay-coins.js b/examples/apidoc/RestClientV3/Crypto-Loans/repay-coins.js new file mode 100644 index 0000000..38b327d --- /dev/null +++ b/examples/apidoc/RestClientV3/Crypto-Loans/repay-coins.js @@ -0,0 +1,22 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .loanRepay({ + orderId: '1402828485131935745', + method: 'borrowed_coin', + repayAll: 'yes', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Crypto-Loans/revise-pledge.js b/examples/apidoc/RestClientV3/Crypto-Loans/revise-pledge.js new file mode 100644 index 0000000..8a2069f --- /dev/null +++ b/examples/apidoc/RestClientV3/Crypto-Loans/revise-pledge.js @@ -0,0 +1,23 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .loanRevisePledge({ + orderId: '123456788661', + amount: '1', + pledgeCoin: 'USDT', + reviseType: 'IN', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Deposit/get-deposit-address.js b/examples/apidoc/RestClientV3/Deposit/get-deposit-address.js new file mode 100644 index 0000000..f61ffa5 --- /dev/null +++ b/examples/apidoc/RestClientV3/Deposit/get-deposit-address.js @@ -0,0 +1,20 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getDepositAddress({ + coin: 'usdt', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Deposit/get-deposit-records.js b/examples/apidoc/RestClientV3/Deposit/get-deposit-records.js new file mode 100644 index 0000000..083eac5 --- /dev/null +++ b/examples/apidoc/RestClientV3/Deposit/get-deposit-records.js @@ -0,0 +1,21 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getDepositRecords({ + startTime: '1597026383085', + endTime: '1597026383185', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Deposit/get-sub-deposit-address.js b/examples/apidoc/RestClientV3/Deposit/get-sub-deposit-address.js new file mode 100644 index 0000000..0fae370 --- /dev/null +++ b/examples/apidoc/RestClientV3/Deposit/get-sub-deposit-address.js @@ -0,0 +1,21 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getSubDepositAddress({ + subUid: '1234567890', + coin: 'usdt', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Deposit/get-sub-deposit-records.js b/examples/apidoc/RestClientV3/Deposit/get-sub-deposit-records.js new file mode 100644 index 0000000..0522887 --- /dev/null +++ b/examples/apidoc/RestClientV3/Deposit/get-sub-deposit-records.js @@ -0,0 +1,22 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getSubDepositRecords({ + subUid: '1234567890', + startTime: '1597026383085', + endTime: '1597026383185', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Earn/elite-redeem.js b/examples/apidoc/RestClientV3/Earn/elite-redeem.js new file mode 100644 index 0000000..8757774 --- /dev/null +++ b/examples/apidoc/RestClientV3/Earn/elite-redeem.js @@ -0,0 +1,25 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .redeemEarnElite({ + productSubId: '12169111111111111', + productId: '121691111111111111', + redeemType: 'fast', + amount: '1', + coin: 'BGUSD', + receiveAccount: 'spot', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Earn/elite-subscribe.js b/examples/apidoc/RestClientV3/Earn/elite-subscribe.js new file mode 100644 index 0000000..8755191 --- /dev/null +++ b/examples/apidoc/RestClientV3/Earn/elite-subscribe.js @@ -0,0 +1,23 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .subscribeEarnElite({ + productSubId: '1216935633814290435', + amount: '1', + coin: 'USDT', + paymentAccount: 'unified', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Earn/get-elite-assets.js b/examples/apidoc/RestClientV3/Earn/get-elite-assets.js new file mode 100644 index 0000000..c149e7c --- /dev/null +++ b/examples/apidoc/RestClientV3/Earn/get-elite-assets.js @@ -0,0 +1,18 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getEarnEliteAssets() + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Earn/get-elite-product.js b/examples/apidoc/RestClientV3/Earn/get-elite-product.js new file mode 100644 index 0000000..5925013 --- /dev/null +++ b/examples/apidoc/RestClientV3/Earn/get-elite-product.js @@ -0,0 +1,18 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getEarnEliteProducts() + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Earn/get-elite-records.js b/examples/apidoc/RestClientV3/Earn/get-elite-records.js new file mode 100644 index 0000000..ab791db --- /dev/null +++ b/examples/apidoc/RestClientV3/Earn/get-elite-records.js @@ -0,0 +1,20 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getEarnEliteRecords({ + type: 'subscribe', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Earn/get-elite-redeem-info.js b/examples/apidoc/RestClientV3/Earn/get-elite-redeem-info.js new file mode 100644 index 0000000..8fcf215 --- /dev/null +++ b/examples/apidoc/RestClientV3/Earn/get-elite-redeem-info.js @@ -0,0 +1,20 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getEarnEliteRedeemInfo({ + productId: '1216935633797513220', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Earn/get-elite-subscribe-info.js b/examples/apidoc/RestClientV3/Earn/get-elite-subscribe-info.js new file mode 100644 index 0000000..a068dfe --- /dev/null +++ b/examples/apidoc/RestClientV3/Earn/get-elite-subscribe-info.js @@ -0,0 +1,20 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getEarnEliteSubscribeInfo({ + productId: '1216935633797513220', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Earn/get-elite-subscribe-result.js b/examples/apidoc/RestClientV3/Earn/get-elite-subscribe-result.js new file mode 100644 index 0000000..9c1bdb8 --- /dev/null +++ b/examples/apidoc/RestClientV3/Earn/get-elite-subscribe-result.js @@ -0,0 +1,20 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getEarnEliteSubscribeResult({ + orderId: '1421061111111111110', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Inst-Loan/bind-unbind-uid-to-risk-unit.js b/examples/apidoc/RestClientV3/Inst-Loan/bind-unbind-uid-to-risk-unit.js new file mode 100644 index 0000000..3994788 --- /dev/null +++ b/examples/apidoc/RestClientV3/Inst-Loan/bind-unbind-uid-to-risk-unit.js @@ -0,0 +1,21 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .bindLoanUid({ + uid: '12345678', + operate: 'bind', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Inst-Loan/get-loan-orders.js b/examples/apidoc/RestClientV3/Inst-Loan/get-loan-orders.js new file mode 100644 index 0000000..261b645 --- /dev/null +++ b/examples/apidoc/RestClientV3/Inst-Loan/get-loan-orders.js @@ -0,0 +1,18 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getLoanOrder() + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Inst-Loan/get-ltv.js b/examples/apidoc/RestClientV3/Inst-Loan/get-ltv.js new file mode 100644 index 0000000..2bb9b9b --- /dev/null +++ b/examples/apidoc/RestClientV3/Inst-Loan/get-ltv.js @@ -0,0 +1,20 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getLoanLTVConvert({ + riskUnitId: '123456789', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Inst-Loan/get-margin-coin-info.js b/examples/apidoc/RestClientV3/Inst-Loan/get-margin-coin-info.js new file mode 100644 index 0000000..26bbdac --- /dev/null +++ b/examples/apidoc/RestClientV3/Inst-Loan/get-margin-coin-info.js @@ -0,0 +1,20 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getLoanMarginCoinInfo({ + productId: 'xxxxxxxx', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Inst-Loan/get-product-info.js b/examples/apidoc/RestClientV3/Inst-Loan/get-product-info.js new file mode 100644 index 0000000..c3e64cc --- /dev/null +++ b/examples/apidoc/RestClientV3/Inst-Loan/get-product-info.js @@ -0,0 +1,20 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getLoanProductInfo({ + productId: 'xxxxxxxx', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Inst-Loan/get-repayment-orders.js b/examples/apidoc/RestClientV3/Inst-Loan/get-repayment-orders.js new file mode 100644 index 0000000..c325045 --- /dev/null +++ b/examples/apidoc/RestClientV3/Inst-Loan/get-repayment-orders.js @@ -0,0 +1,18 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getLoanRepaidHistory() + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Inst-Loan/get-risk-unit.js b/examples/apidoc/RestClientV3/Inst-Loan/get-risk-unit.js new file mode 100644 index 0000000..a224e31 --- /dev/null +++ b/examples/apidoc/RestClientV3/Inst-Loan/get-risk-unit.js @@ -0,0 +1,18 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getLoanRiskUnit() + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Inst-Loan/get-trade-symbols.js b/examples/apidoc/RestClientV3/Inst-Loan/get-trade-symbols.js new file mode 100644 index 0000000..ab8ca79 --- /dev/null +++ b/examples/apidoc/RestClientV3/Inst-Loan/get-trade-symbols.js @@ -0,0 +1,20 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getLoanSymbols({ + productId: 'xxxxxxxx', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Inst-Loan/get-transferred-quantity.js b/examples/apidoc/RestClientV3/Inst-Loan/get-transferred-quantity.js new file mode 100644 index 0000000..e139372 --- /dev/null +++ b/examples/apidoc/RestClientV3/Inst-Loan/get-transferred-quantity.js @@ -0,0 +1,20 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getLoanTransfered({ + coin: 'USDT', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/P2P/confirm-payment.js b/examples/apidoc/RestClientV3/P2P/confirm-payment.js new file mode 100644 index 0000000..08aab21 --- /dev/null +++ b/examples/apidoc/RestClientV3/P2P/confirm-payment.js @@ -0,0 +1,20 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .confirmP2pOrderPayment({ + orderId: 'ORD123456', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/P2P/create-ad.js b/examples/apidoc/RestClientV3/P2P/create-ad.js new file mode 100644 index 0000000..456cf0b --- /dev/null +++ b/examples/apidoc/RestClientV3/P2P/create-ad.js @@ -0,0 +1,29 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .createP2pAd({ + token: 'USDT', + fiat: 'CNY', + side: 'sell', + priceType: 'fixed', + price: '7.28', + minAmount: '100', + maxAmount: '10000', + quantity: '500', + payMethodIds: [{ payMethodId: '1', userPayMethodId: '101' }], + payTimeLimit: '15', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/P2P/fee-simulate.js b/examples/apidoc/RestClientV3/P2P/fee-simulate.js new file mode 100644 index 0000000..07a6eb6 --- /dev/null +++ b/examples/apidoc/RestClientV3/P2P/fee-simulate.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .simulateP2pFee({ + token: 'USDT', + fiat: 'CNY', + side: 'sell', + marketType: 'public', + amount: '100', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/P2P/get-ad-info.js b/examples/apidoc/RestClientV3/P2P/get-ad-info.js new file mode 100644 index 0000000..97682ec --- /dev/null +++ b/examples/apidoc/RestClientV3/P2P/get-ad-info.js @@ -0,0 +1,20 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getP2pAdInfo({ + advId: '1234567890', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/P2P/get-ad-limit.js b/examples/apidoc/RestClientV3/P2P/get-ad-limit.js new file mode 100644 index 0000000..4ddc98f --- /dev/null +++ b/examples/apidoc/RestClientV3/P2P/get-ad-limit.js @@ -0,0 +1,22 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getP2pAdLimit({ + token: 'USDT', + fiat: 'CNY', + side: 'sell', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/P2P/get-ad-list.js b/examples/apidoc/RestClientV3/P2P/get-ad-list.js new file mode 100644 index 0000000..6774698 --- /dev/null +++ b/examples/apidoc/RestClientV3/P2P/get-ad-list.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getP2pAdList({ + token: 'USDT', + fiat: 'USD', + side: 'buy', + pageNum: '1', + limit: '10', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/P2P/get-all-orders.js b/examples/apidoc/RestClientV3/P2P/get-all-orders.js new file mode 100644 index 0000000..a7761a4 --- /dev/null +++ b/examples/apidoc/RestClientV3/P2P/get-all-orders.js @@ -0,0 +1,20 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getP2pAllOrders({ + limit: '10', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/P2P/get-balance.js b/examples/apidoc/RestClientV3/P2P/get-balance.js new file mode 100644 index 0000000..4b165c3 --- /dev/null +++ b/examples/apidoc/RestClientV3/P2P/get-balance.js @@ -0,0 +1,20 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getP2pBalance({ + token: 'USDT', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/P2P/get-currencies.js b/examples/apidoc/RestClientV3/P2P/get-currencies.js new file mode 100644 index 0000000..6fab869 --- /dev/null +++ b/examples/apidoc/RestClientV3/P2P/get-currencies.js @@ -0,0 +1,18 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getP2pCurrencies() + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/P2P/get-exchange-rate.js b/examples/apidoc/RestClientV3/P2P/get-exchange-rate.js new file mode 100644 index 0000000..da6b828 --- /dev/null +++ b/examples/apidoc/RestClientV3/P2P/get-exchange-rate.js @@ -0,0 +1,21 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getP2pExchangeRate({ + token: 'USDT', + fiat: 'CNY', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/P2P/get-my-ads.js b/examples/apidoc/RestClientV3/P2P/get-my-ads.js new file mode 100644 index 0000000..4d24de5 --- /dev/null +++ b/examples/apidoc/RestClientV3/P2P/get-my-ads.js @@ -0,0 +1,20 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getP2pMyAds({ + limit: '10', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/P2P/get-order-info.js b/examples/apidoc/RestClientV3/P2P/get-order-info.js new file mode 100644 index 0000000..709e3d4 --- /dev/null +++ b/examples/apidoc/RestClientV3/P2P/get-order-info.js @@ -0,0 +1,20 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getP2pOrderInfo({ + orderId: 'ORD123456', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/P2P/get-pay-methods.js b/examples/apidoc/RestClientV3/P2P/get-pay-methods.js new file mode 100644 index 0000000..b4db9b9 --- /dev/null +++ b/examples/apidoc/RestClientV3/P2P/get-pay-methods.js @@ -0,0 +1,18 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getP2pPayMethods() + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/P2P/get-pending-orders.js b/examples/apidoc/RestClientV3/P2P/get-pending-orders.js new file mode 100644 index 0000000..a76493f --- /dev/null +++ b/examples/apidoc/RestClientV3/P2P/get-pending-orders.js @@ -0,0 +1,20 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getP2pPendingOrders({ + limit: '10', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/P2P/get-user-info.js b/examples/apidoc/RestClientV3/P2P/get-user-info.js new file mode 100644 index 0000000..13eeef1 --- /dev/null +++ b/examples/apidoc/RestClientV3/P2P/get-user-info.js @@ -0,0 +1,18 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getP2pUserInfo() + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/P2P/operate-ad.js b/examples/apidoc/RestClientV3/P2P/operate-ad.js new file mode 100644 index 0000000..a32c454 --- /dev/null +++ b/examples/apidoc/RestClientV3/P2P/operate-ad.js @@ -0,0 +1,21 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .operateP2pAd({ + advId: '1234567890', + operation: 'delist', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/P2P/release-asset.js b/examples/apidoc/RestClientV3/P2P/release-asset.js new file mode 100644 index 0000000..d933b0b --- /dev/null +++ b/examples/apidoc/RestClientV3/P2P/release-asset.js @@ -0,0 +1,20 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .releaseP2pOrderAsset({ + orderId: 'ORD123456', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/P2P/update-ad.js b/examples/apidoc/RestClientV3/P2P/update-ad.js new file mode 100644 index 0000000..e4b6f52 --- /dev/null +++ b/examples/apidoc/RestClientV3/P2P/update-ad.js @@ -0,0 +1,22 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .updateP2pAd({ + advId: '1234567890', + price: '7.30', + payTimeLimit: '15', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Position/get-position-adl-rank.js b/examples/apidoc/RestClientV3/Position/get-position-adl-rank.js new file mode 100644 index 0000000..0cf726b --- /dev/null +++ b/examples/apidoc/RestClientV3/Position/get-position-adl-rank.js @@ -0,0 +1,18 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getPositionAdlRank() + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Position/get-position-info.js b/examples/apidoc/RestClientV3/Position/get-position-info.js new file mode 100644 index 0000000..4d2de02 --- /dev/null +++ b/examples/apidoc/RestClientV3/Position/get-position-info.js @@ -0,0 +1,21 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getCurrentPosition({ + category: 'USDT-FUTURES', + symbol: 'BTCUSDT', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Position/get-positions-history.js b/examples/apidoc/RestClientV3/Position/get-positions-history.js new file mode 100644 index 0000000..b9b8f38 --- /dev/null +++ b/examples/apidoc/RestClientV3/Position/get-positions-history.js @@ -0,0 +1,20 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getPositionHistory({ + category: 'USDT-FUTURES', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Public/get-cash-dividend-records.js b/examples/apidoc/RestClientV3/Public/get-cash-dividend-records.js new file mode 100644 index 0000000..9b743d9 --- /dev/null +++ b/examples/apidoc/RestClientV3/Public/get-cash-dividend-records.js @@ -0,0 +1,17 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3(); + +client + .getCashDividendRecords({ + symbol: 'AAPLXRPUSDT', + type: 'pending', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Public/get-current-funding-rate.js b/examples/apidoc/RestClientV3/Public/get-current-funding-rate.js new file mode 100644 index 0000000..86cf2b1 --- /dev/null +++ b/examples/apidoc/RestClientV3/Public/get-current-funding-rate.js @@ -0,0 +1,16 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3(); + +client + .getCurrentFundingRate({ + symbol: 'BTCUSDT', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Public/get-discount-rate.js b/examples/apidoc/RestClientV3/Public/get-discount-rate.js new file mode 100644 index 0000000..e1bdeff --- /dev/null +++ b/examples/apidoc/RestClientV3/Public/get-discount-rate.js @@ -0,0 +1,14 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3(); + +client + .getDiscountRate() + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Public/get-funding-rate-history.js b/examples/apidoc/RestClientV3/Public/get-funding-rate-history.js new file mode 100644 index 0000000..c462bcf --- /dev/null +++ b/examples/apidoc/RestClientV3/Public/get-funding-rate-history.js @@ -0,0 +1,19 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3(); + +client + .getHistoryFundingRate({ + category: 'USDT-FUTURES', + symbol: 'BTCUSDT', + limit: '10', + cursor: '1', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Public/get-futures-active-buy-sell-volume-data.js b/examples/apidoc/RestClientV3/Public/get-futures-active-buy-sell-volume-data.js new file mode 100644 index 0000000..c4349df --- /dev/null +++ b/examples/apidoc/RestClientV3/Public/get-futures-active-buy-sell-volume-data.js @@ -0,0 +1,16 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3(); + +client + .getFuturesActiveBuySell({ + symbol: 'BTCUSDT', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Public/get-futures-active-long-short-account-data.js b/examples/apidoc/RestClientV3/Public/get-futures-active-long-short-account-data.js new file mode 100644 index 0000000..116b162 --- /dev/null +++ b/examples/apidoc/RestClientV3/Public/get-futures-active-long-short-account-data.js @@ -0,0 +1,16 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3(); + +client + .getFuturesAccountLongShort({ + symbol: 'BTCUSDT', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Public/get-futures-active-long-short-position-data.js b/examples/apidoc/RestClientV3/Public/get-futures-active-long-short-position-data.js new file mode 100644 index 0000000..6af25f3 --- /dev/null +++ b/examples/apidoc/RestClientV3/Public/get-futures-active-long-short-position-data.js @@ -0,0 +1,16 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3(); + +client + .getFuturesPositionLongShort({ + symbol: 'BTCUSDT', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Public/get-futures-long-short-ratio-data.js b/examples/apidoc/RestClientV3/Public/get-futures-long-short-ratio-data.js new file mode 100644 index 0000000..0d7606b --- /dev/null +++ b/examples/apidoc/RestClientV3/Public/get-futures-long-short-ratio-data.js @@ -0,0 +1,16 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3(); + +client + .getFuturesLongShort({ + symbol: 'BTCUSDT', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Public/get-index-price-components.js b/examples/apidoc/RestClientV3/Public/get-index-price-components.js new file mode 100644 index 0000000..9c84e49 --- /dev/null +++ b/examples/apidoc/RestClientV3/Public/get-index-price-components.js @@ -0,0 +1,16 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3(); + +client + .getIndexComponents({ + symbol: 'BTCUSDT', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Public/get-instruments.js b/examples/apidoc/RestClientV3/Public/get-instruments.js new file mode 100644 index 0000000..faaf19b --- /dev/null +++ b/examples/apidoc/RestClientV3/Public/get-instruments.js @@ -0,0 +1,16 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3(); + +client + .getInstruments({ + category: 'SPOT', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Public/get-isolated-margin-borrowing-ratio-data.js b/examples/apidoc/RestClientV3/Public/get-isolated-margin-borrowing-ratio-data.js new file mode 100644 index 0000000..c13bd0c --- /dev/null +++ b/examples/apidoc/RestClientV3/Public/get-isolated-margin-borrowing-ratio-data.js @@ -0,0 +1,16 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3(); + +client + .getMarginIsolatedBorrow({ + symbol: 'BTCUSDT', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Public/get-kline-candlestick-history.js b/examples/apidoc/RestClientV3/Public/get-kline-candlestick-history.js new file mode 100644 index 0000000..b297bc4 --- /dev/null +++ b/examples/apidoc/RestClientV3/Public/get-kline-candlestick-history.js @@ -0,0 +1,19 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3(); + +client + .getHistoryCandles({ + category: 'USDT-FUTURES', + symbol: 'BTCUSDT', + interval: '1D', + limit: '10', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Public/get-kline-candlestick.js b/examples/apidoc/RestClientV3/Public/get-kline-candlestick.js new file mode 100644 index 0000000..b4c3638 --- /dev/null +++ b/examples/apidoc/RestClientV3/Public/get-kline-candlestick.js @@ -0,0 +1,20 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3(); + +client + .getCandles({ + category: 'USDT-FUTURES', + symbol: 'BTCUSDT', + interval: '1m', + type: 'MARKET', + limit: '10', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Public/get-liquidations-history.js b/examples/apidoc/RestClientV3/Public/get-liquidations-history.js new file mode 100644 index 0000000..16efa96 --- /dev/null +++ b/examples/apidoc/RestClientV3/Public/get-liquidations-history.js @@ -0,0 +1,18 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3(); + +client + .getLiquidations({ + category: 'USDT-FUTURES', + symbol: 'BTCUSDT', + limit: '100', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Public/get-margin-loan-growth-rate-data.js b/examples/apidoc/RestClientV3/Public/get-margin-loan-growth-rate-data.js new file mode 100644 index 0000000..5040913 --- /dev/null +++ b/examples/apidoc/RestClientV3/Public/get-margin-loan-growth-rate-data.js @@ -0,0 +1,16 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3(); + +client + .getMarginLoanGrowth({ + symbol: 'BTCUSDT', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Public/get-margin-loan.js b/examples/apidoc/RestClientV3/Public/get-margin-loan.js new file mode 100644 index 0000000..08eb7ed --- /dev/null +++ b/examples/apidoc/RestClientV3/Public/get-margin-loan.js @@ -0,0 +1,16 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3(); + +client + .getMarginLoans({ + coin: 'BTC', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Public/get-margin-long-short-ratio-data.js b/examples/apidoc/RestClientV3/Public/get-margin-long-short-ratio-data.js new file mode 100644 index 0000000..7d91fed --- /dev/null +++ b/examples/apidoc/RestClientV3/Public/get-margin-long-short-ratio-data.js @@ -0,0 +1,16 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3(); + +client + .getMarginLongShort({ + symbol: 'BTCUSDT', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Public/get-market-maker-fee-group.js b/examples/apidoc/RestClientV3/Public/get-market-maker-fee-group.js new file mode 100644 index 0000000..63f818f --- /dev/null +++ b/examples/apidoc/RestClientV3/Public/get-market-maker-fee-group.js @@ -0,0 +1,16 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3(); + +client + .getMarketFeeGroup({ + category: 'SPOT', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Public/get-market-maker-score-weight.js b/examples/apidoc/RestClientV3/Public/get-market-maker-score-weight.js new file mode 100644 index 0000000..0574229 --- /dev/null +++ b/examples/apidoc/RestClientV3/Public/get-market-maker-score-weight.js @@ -0,0 +1,16 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3(); + +client + .getMarketScoreWeights({ + category: 'SPOT', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Public/get-open-interest-limit.js b/examples/apidoc/RestClientV3/Public/get-open-interest-limit.js new file mode 100644 index 0000000..3ec1fa0 --- /dev/null +++ b/examples/apidoc/RestClientV3/Public/get-open-interest-limit.js @@ -0,0 +1,16 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3(); + +client + .getContractsOi({ + category: 'USDT-FUTURES', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Public/get-open-interest.js b/examples/apidoc/RestClientV3/Public/get-open-interest.js new file mode 100644 index 0000000..fd769dc --- /dev/null +++ b/examples/apidoc/RestClientV3/Public/get-open-interest.js @@ -0,0 +1,17 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3(); + +client + .getOpenInterest({ + category: 'USDT-FUTURES', + symbol: 'BTCUSDT', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Public/get-orderbook.js b/examples/apidoc/RestClientV3/Public/get-orderbook.js new file mode 100644 index 0000000..4825186 --- /dev/null +++ b/examples/apidoc/RestClientV3/Public/get-orderbook.js @@ -0,0 +1,18 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3(); + +client + .getOrderBook({ + category: 'USDT-FUTURES', + symbol: 'BTCUSDT', + limit: '5', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Public/get-position-tier.js b/examples/apidoc/RestClientV3/Public/get-position-tier.js new file mode 100644 index 0000000..32e6030 --- /dev/null +++ b/examples/apidoc/RestClientV3/Public/get-position-tier.js @@ -0,0 +1,17 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3(); + +client + .getPositionTier({ + category: 'USDT-FUTURES', + symbol: 'BTCUSDT', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Public/get-proof-of-reserves.js b/examples/apidoc/RestClientV3/Public/get-proof-of-reserves.js new file mode 100644 index 0000000..ba615f1 --- /dev/null +++ b/examples/apidoc/RestClientV3/Public/get-proof-of-reserves.js @@ -0,0 +1,14 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3(); + +client + .getProofOfReserves() + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Public/get-recent-public-fills.js b/examples/apidoc/RestClientV3/Public/get-recent-public-fills.js new file mode 100644 index 0000000..11e3399 --- /dev/null +++ b/examples/apidoc/RestClientV3/Public/get-recent-public-fills.js @@ -0,0 +1,18 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3(); + +client + .getFills({ + category: 'USDT-FUTURES', + symbol: 'BTCUSDT', + limit: '100', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Public/get-risk-reserve-all.js b/examples/apidoc/RestClientV3/Public/get-risk-reserve-all.js new file mode 100644 index 0000000..a11b201 --- /dev/null +++ b/examples/apidoc/RestClientV3/Public/get-risk-reserve-all.js @@ -0,0 +1,16 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3(); + +client + .getRiskReserveAll({ + category: 'USDT-FUTURES', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Public/get-risk-reserve-daily.js b/examples/apidoc/RestClientV3/Public/get-risk-reserve-daily.js new file mode 100644 index 0000000..27c8900 --- /dev/null +++ b/examples/apidoc/RestClientV3/Public/get-risk-reserve-daily.js @@ -0,0 +1,17 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3(); + +client + .getRiskReserve({ + category: 'USDT-FUTURES', + symbol: 'BTCUSDT', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Public/get-risk-reserve-hourly.js b/examples/apidoc/RestClientV3/Public/get-risk-reserve-hourly.js new file mode 100644 index 0000000..24abcfb --- /dev/null +++ b/examples/apidoc/RestClientV3/Public/get-risk-reserve-hourly.js @@ -0,0 +1,17 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3(); + +client + .getRiskReserveHour({ + category: 'USDT-FUTURES', + symbol: 'BTCUSDT', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Public/get-rpi-orderbook.js b/examples/apidoc/RestClientV3/Public/get-rpi-orderbook.js new file mode 100644 index 0000000..3922a7f --- /dev/null +++ b/examples/apidoc/RestClientV3/Public/get-rpi-orderbook.js @@ -0,0 +1,18 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3(); + +client + .getRpiOrderBook({ + category: 'SPOT', + symbol: 'BTCUSDT', + limit: '5', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Public/get-rpi-symbols.js b/examples/apidoc/RestClientV3/Public/get-rpi-symbols.js new file mode 100644 index 0000000..32a1031 --- /dev/null +++ b/examples/apidoc/RestClientV3/Public/get-rpi-symbols.js @@ -0,0 +1,14 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3(); + +client + .getRpiSymbols() + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Public/get-server-time.js b/examples/apidoc/RestClientV3/Public/get-server-time.js new file mode 100644 index 0000000..fe03586 --- /dev/null +++ b/examples/apidoc/RestClientV3/Public/get-server-time.js @@ -0,0 +1,14 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3(); + +client + .getServerTime() + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Public/get-spot-24h-net-capital-inflow-data.js b/examples/apidoc/RestClientV3/Public/get-spot-24h-net-capital-inflow-data.js new file mode 100644 index 0000000..a006aa1 --- /dev/null +++ b/examples/apidoc/RestClientV3/Public/get-spot-24h-net-capital-inflow-data.js @@ -0,0 +1,16 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3(); + +client + .getSpotNetFlow({ + symbol: 'BTCUSDT', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Public/get-spot-fund-flow-data.js b/examples/apidoc/RestClientV3/Public/get-spot-fund-flow-data.js new file mode 100644 index 0000000..9050968 --- /dev/null +++ b/examples/apidoc/RestClientV3/Public/get-spot-fund-flow-data.js @@ -0,0 +1,17 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3(); + +client + .getSpotFundFlow({ + symbol: 'BTCUSDT', + period: '1d', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Public/get-spot-whale-net-flow-data.js b/examples/apidoc/RestClientV3/Public/get-spot-whale-net-flow-data.js new file mode 100644 index 0000000..51115fc --- /dev/null +++ b/examples/apidoc/RestClientV3/Public/get-spot-whale-net-flow-data.js @@ -0,0 +1,16 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3(); + +client + .getSpotWhaleFlow({ + symbol: 'BTCUSDT', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Public/get-tickers.js b/examples/apidoc/RestClientV3/Public/get-tickers.js new file mode 100644 index 0000000..25bb011 --- /dev/null +++ b/examples/apidoc/RestClientV3/Public/get-tickers.js @@ -0,0 +1,17 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3(); + +client + .getTickers({ + category: 'SPOT', + symbol: 'BTCUSDT', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Strategy/cancel-strategy-order.js b/examples/apidoc/RestClientV3/Strategy/cancel-strategy-order.js new file mode 100644 index 0000000..ecc4f2f --- /dev/null +++ b/examples/apidoc/RestClientV3/Strategy/cancel-strategy-order.js @@ -0,0 +1,20 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .cancelStrategyOrder({ + orderId: '111111111111111111', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Strategy/get-history-strategy-orders.js b/examples/apidoc/RestClientV3/Strategy/get-history-strategy-orders.js new file mode 100644 index 0000000..9748514 --- /dev/null +++ b/examples/apidoc/RestClientV3/Strategy/get-history-strategy-orders.js @@ -0,0 +1,21 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getHistoryStrategyOrders({ + category: 'USDT-FUTURES', + type: 'tpsl', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Strategy/get-unfilled-strategy-orders.js b/examples/apidoc/RestClientV3/Strategy/get-unfilled-strategy-orders.js new file mode 100644 index 0000000..118e07c --- /dev/null +++ b/examples/apidoc/RestClientV3/Strategy/get-unfilled-strategy-orders.js @@ -0,0 +1,21 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getUnfilledStrategyOrders({ + category: 'USDT-FUTURES', + type: 'tpsl', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Strategy/modify-strategy-order.js b/examples/apidoc/RestClientV3/Strategy/modify-strategy-order.js new file mode 100644 index 0000000..a19f957 --- /dev/null +++ b/examples/apidoc/RestClientV3/Strategy/modify-strategy-order.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .modifyStrategyOrder({ + orderId: '121211212122', + qty: '1', + tpTriggerBy: 'market', + takeProfit: '106000', + tpOrderType: 'market', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Strategy/place-strategy-order.js b/examples/apidoc/RestClientV3/Strategy/place-strategy-order.js new file mode 100644 index 0000000..39d77cc --- /dev/null +++ b/examples/apidoc/RestClientV3/Strategy/place-strategy-order.js @@ -0,0 +1,25 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .submitStrategyOrder({ + category: 'USDT-FUTURES', + symbol: 'BTCUSDT', + posSide: 'long', + stopLoss: '99000', + takeProfit: '100800', + clientOid: '121211212122', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Sub-Account/create-agent-sub-account.js b/examples/apidoc/RestClientV3/Sub-Account/create-agent-sub-account.js new file mode 100644 index 0000000..ca8a784 --- /dev/null +++ b/examples/apidoc/RestClientV3/Sub-Account/create-agent-sub-account.js @@ -0,0 +1,22 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .createAgentSubAccount({ + username: 'xxxx', + passphrase: '1234567Aa', + note: 'xxxx', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Sub-Account/create-sub-account-api-key.js b/examples/apidoc/RestClientV3/Sub-Account/create-sub-account-api-key.js new file mode 100644 index 0000000..fbbbf57 --- /dev/null +++ b/examples/apidoc/RestClientV3/Sub-Account/create-sub-account-api-key.js @@ -0,0 +1,25 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .createSubAccountApiKey({ + subUid: 'xxx', + note: 'xxx', + type: 'read_only', + permissions: ['uta_trade'], + passphrase: '1234567Aa', + ips: ['127.0.0.1'], + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Sub-Account/create-sub-account.js b/examples/apidoc/RestClientV3/Sub-Account/create-sub-account.js new file mode 100644 index 0000000..6df6ba1 --- /dev/null +++ b/examples/apidoc/RestClientV3/Sub-Account/create-sub-account.js @@ -0,0 +1,22 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .createSubAccount({ + username: 'xxxx', + accountMode: 'unified', + note: 'xxx', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Sub-Account/delete-sub-account-api-key.js b/examples/apidoc/RestClientV3/Sub-Account/delete-sub-account-api-key.js new file mode 100644 index 0000000..c77c47a --- /dev/null +++ b/examples/apidoc/RestClientV3/Sub-Account/delete-sub-account-api-key.js @@ -0,0 +1,20 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .deleteSubAccountApiKey({ + apiKey: 'xxx', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Sub-Account/freeze-unfreeze-sub-account.js b/examples/apidoc/RestClientV3/Sub-Account/freeze-unfreeze-sub-account.js new file mode 100644 index 0000000..a76db52 --- /dev/null +++ b/examples/apidoc/RestClientV3/Sub-Account/freeze-unfreeze-sub-account.js @@ -0,0 +1,21 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .freezeSubAccount({ + subUid: '1234567890', + operation: 'freeze', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Sub-Account/get-sub-account-api-keys.js b/examples/apidoc/RestClientV3/Sub-Account/get-sub-account-api-keys.js new file mode 100644 index 0000000..4d43012 --- /dev/null +++ b/examples/apidoc/RestClientV3/Sub-Account/get-sub-account-api-keys.js @@ -0,0 +1,20 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getSubAccountApiKeys({ + subUid: '1234567890', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Sub-Account/get-sub-account-list.js b/examples/apidoc/RestClientV3/Sub-Account/get-sub-account-list.js new file mode 100644 index 0000000..a2bc2a4 --- /dev/null +++ b/examples/apidoc/RestClientV3/Sub-Account/get-sub-account-list.js @@ -0,0 +1,20 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getSubAccountList({ + limit: '10', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Sub-Account/get-subaccount-unified-assets.js b/examples/apidoc/RestClientV3/Sub-Account/get-subaccount-unified-assets.js new file mode 100644 index 0000000..c877e78 --- /dev/null +++ b/examples/apidoc/RestClientV3/Sub-Account/get-subaccount-unified-assets.js @@ -0,0 +1,20 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getSubUnifiedAssets({ + subUid: '1234567890', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Sub-Account/modify-sub-account-api-key.js b/examples/apidoc/RestClientV3/Sub-Account/modify-sub-account-api-key.js new file mode 100644 index 0000000..9727320 --- /dev/null +++ b/examples/apidoc/RestClientV3/Sub-Account/modify-sub-account-api-key.js @@ -0,0 +1,22 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .updateSubAccountApiKey({ + apiKey: 'xxx', + passphrase: '1234567Aa', + type: 'read_only', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Tax/get-tax-records.js b/examples/apidoc/RestClientV3/Tax/get-tax-records.js new file mode 100644 index 0000000..968a904 --- /dev/null +++ b/examples/apidoc/RestClientV3/Tax/get-tax-records.js @@ -0,0 +1,22 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getTaxRecords({ + bizType: 'SPOT', + startTime: '1763402983000', + endTime: '1763662183573', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Trade/batch-modify-orders.js b/examples/apidoc/RestClientV3/Trade/batch-modify-orders.js new file mode 100644 index 0000000..9aa0c4c --- /dev/null +++ b/examples/apidoc/RestClientV3/Trade/batch-modify-orders.js @@ -0,0 +1,31 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .batchModifyOrders([ + { + orderId: '1', + qty: '123', + price: '123', + autoCancel: 'no', + }, + { + orderId: '2', + qty: '123', + price: '123', + autoCancel: 'no', + }, + ]) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Trade/batch-order.js b/examples/apidoc/RestClientV3/Trade/batch-order.js new file mode 100644 index 0000000..6e26967 --- /dev/null +++ b/examples/apidoc/RestClientV3/Trade/batch-order.js @@ -0,0 +1,29 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .placeBatchOrders([ + { + category: 'SPOT', + symbol: 'BGBUSDT', + orderType: 'limit', + qty: '123', + price: '1.11', + side: 'buy', + timeInForce: 'gtc', + clientOid: 'my-oid-1', + }, + ]) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Trade/cancel-all-orders.js b/examples/apidoc/RestClientV3/Trade/cancel-all-orders.js new file mode 100644 index 0000000..ebb4ef0 --- /dev/null +++ b/examples/apidoc/RestClientV3/Trade/cancel-all-orders.js @@ -0,0 +1,20 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .cancelAllOrders({ + category: 'SPOT', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Trade/cancel-batch.js b/examples/apidoc/RestClientV3/Trade/cancel-batch.js new file mode 100644 index 0000000..0c324f8 --- /dev/null +++ b/examples/apidoc/RestClientV3/Trade/cancel-batch.js @@ -0,0 +1,29 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .cancelBatchOrders([ + { + orderId: '112233', + category: 'SPOT', + symbol: 'BTCUSDT', + }, + { + clientOid: '123456', + category: 'SPOT', + symbol: 'BTCUSDT', + }, + ]) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Trade/cancel-order.js b/examples/apidoc/RestClientV3/Trade/cancel-order.js new file mode 100644 index 0000000..a5b5673 --- /dev/null +++ b/examples/apidoc/RestClientV3/Trade/cancel-order.js @@ -0,0 +1,20 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .cancelOrder({ + orderId: '111111111111111111', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Trade/cancel-reality-order.js b/examples/apidoc/RestClientV3/Trade/cancel-reality-order.js new file mode 100644 index 0000000..b2d1d2e --- /dev/null +++ b/examples/apidoc/RestClientV3/Trade/cancel-reality-order.js @@ -0,0 +1,21 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .cancelRealityOrder({ + symbol: 'rAAPLUSDT', + orderId: '121211212122', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Trade/close-all-positions.js b/examples/apidoc/RestClientV3/Trade/close-all-positions.js new file mode 100644 index 0000000..da08378 --- /dev/null +++ b/examples/apidoc/RestClientV3/Trade/close-all-positions.js @@ -0,0 +1,20 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .closeAllPositions({ + category: 'USDT-FUTURES', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Trade/countdown-cancel-all.js b/examples/apidoc/RestClientV3/Trade/countdown-cancel-all.js new file mode 100644 index 0000000..801b085 --- /dev/null +++ b/examples/apidoc/RestClientV3/Trade/countdown-cancel-all.js @@ -0,0 +1,20 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .countdownCancelAll({ + countdown: '40', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Trade/get-fill-history.js b/examples/apidoc/RestClientV3/Trade/get-fill-history.js new file mode 100644 index 0000000..8b6cc47 --- /dev/null +++ b/examples/apidoc/RestClientV3/Trade/get-fill-history.js @@ -0,0 +1,20 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getTradeFills({ + orderId: '111111111111111111', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Trade/get-loan-data.js b/examples/apidoc/RestClientV3/Trade/get-loan-data.js new file mode 100644 index 0000000..218279b --- /dev/null +++ b/examples/apidoc/RestClientV3/Trade/get-loan-data.js @@ -0,0 +1,18 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getLoanData() + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Trade/get-open-orders.js b/examples/apidoc/RestClientV3/Trade/get-open-orders.js new file mode 100644 index 0000000..629863b --- /dev/null +++ b/examples/apidoc/RestClientV3/Trade/get-open-orders.js @@ -0,0 +1,21 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getUnfilledOrders({ + category: 'USDT-FUTURES', + symbol: 'BTCUSDT', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Trade/get-order-details.js b/examples/apidoc/RestClientV3/Trade/get-order-details.js new file mode 100644 index 0000000..9333be6 --- /dev/null +++ b/examples/apidoc/RestClientV3/Trade/get-order-details.js @@ -0,0 +1,20 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getOrderInfo({ + orderId: '1233965375251996672', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Trade/get-order-history.js b/examples/apidoc/RestClientV3/Trade/get-order-history.js new file mode 100644 index 0000000..2336884 --- /dev/null +++ b/examples/apidoc/RestClientV3/Trade/get-order-history.js @@ -0,0 +1,20 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getHistoryOrders({ + category: 'USDT-FUTURES', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Trade/modify-order.js b/examples/apidoc/RestClientV3/Trade/modify-order.js new file mode 100644 index 0000000..bd31b23 --- /dev/null +++ b/examples/apidoc/RestClientV3/Trade/modify-order.js @@ -0,0 +1,23 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .modifyOrder({ + orderId: '1', + qty: '123', + price: '123', + autoCancel: 'no', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Trade/place-order.js b/examples/apidoc/RestClientV3/Trade/place-order.js new file mode 100644 index 0000000..17fadc8 --- /dev/null +++ b/examples/apidoc/RestClientV3/Trade/place-order.js @@ -0,0 +1,28 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .submitNewOrder({ + category: 'SPOT', + symbol: 'BGBUSDT', + orderType: 'limit', + qty: '123', + price: '1.11', + side: 'buy', + posSide: 'long', + timeInForce: 'gtc', + reduceOnly: 'no', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Trade/place-reality-order.js b/examples/apidoc/RestClientV3/Trade/place-reality-order.js new file mode 100644 index 0000000..8fd6c37 --- /dev/null +++ b/examples/apidoc/RestClientV3/Trade/place-reality-order.js @@ -0,0 +1,25 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .placeRealityOrder({ + symbol: 'rAAPLUSDT', + side: 'buy', + orderType: 'limit', + qty: '10', + price: '200.5', + clientOid: 'myOrder001', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Transfer/get-the-transfer-records-of-main-sub-account.js b/examples/apidoc/RestClientV3/Transfer/get-the-transfer-records-of-main-sub-account.js new file mode 100644 index 0000000..25351d3 --- /dev/null +++ b/examples/apidoc/RestClientV3/Transfer/get-the-transfer-records-of-main-sub-account.js @@ -0,0 +1,21 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getSubTransferRecords({ + subUid: '1234567890', + limit: '10', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Transfer/get-transferable-coins.js b/examples/apidoc/RestClientV3/Transfer/get-transferable-coins.js new file mode 100644 index 0000000..af4aefd --- /dev/null +++ b/examples/apidoc/RestClientV3/Transfer/get-transferable-coins.js @@ -0,0 +1,21 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getTransferableCoins({ + fromType: 'spot', + toType: 'p2p', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Transfer/main-sub-account-transfer.js b/examples/apidoc/RestClientV3/Transfer/main-sub-account-transfer.js new file mode 100644 index 0000000..a3ec37d --- /dev/null +++ b/examples/apidoc/RestClientV3/Transfer/main-sub-account-transfer.js @@ -0,0 +1,26 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .subAccountTransfer({ + fromType: 'spot', + toType: 'uta', + amount: '1000', + coin: 'USDT', + fromUserId: '1991021336', + toUserId: '4746345901', + clientOid: 'xxxxx', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Transfer/sub-main-account-transfer.js b/examples/apidoc/RestClientV3/Transfer/sub-main-account-transfer.js new file mode 100644 index 0000000..640a6e6 --- /dev/null +++ b/examples/apidoc/RestClientV3/Transfer/sub-main-account-transfer.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .subMasterTransfer({ + fromType: 'spot', + toType: 'uta', + amount: '1000', + coin: 'USDT', + clientOid: 'xxxxx', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Transfer/transfer.js b/examples/apidoc/RestClientV3/Transfer/transfer.js new file mode 100644 index 0000000..ec17581 --- /dev/null +++ b/examples/apidoc/RestClientV3/Transfer/transfer.js @@ -0,0 +1,23 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .submitTransfer({ + fromType: 'spot', + toType: 'p2p', + amount: '0.1', + coin: 'BTC', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Withdraw/cancel-withdrawal.js b/examples/apidoc/RestClientV3/Withdraw/cancel-withdrawal.js new file mode 100644 index 0000000..1694a2a --- /dev/null +++ b/examples/apidoc/RestClientV3/Withdraw/cancel-withdrawal.js @@ -0,0 +1,20 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .cancelWithdrawal({ + orderId: '111111111111', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Withdraw/get-withdraw-address-book.js b/examples/apidoc/RestClientV3/Withdraw/get-withdraw-address-book.js new file mode 100644 index 0000000..cbebe5c --- /dev/null +++ b/examples/apidoc/RestClientV3/Withdraw/get-withdraw-address-book.js @@ -0,0 +1,21 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getWithdrawAddressBook({ + coin: 'USDT', + limit: '10', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Withdraw/get-withdrawal-records.js b/examples/apidoc/RestClientV3/Withdraw/get-withdrawal-records.js new file mode 100644 index 0000000..56d28dc --- /dev/null +++ b/examples/apidoc/RestClientV3/Withdraw/get-withdrawal-records.js @@ -0,0 +1,21 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .getWithdrawRecords({ + startTime: '1597026383085', + endTime: '1597026383185', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/Withdraw/withdrawal.js b/examples/apidoc/RestClientV3/Withdraw/withdrawal.js new file mode 100644 index 0000000..cf9bd19 --- /dev/null +++ b/examples/apidoc/RestClientV3/Withdraw/withdrawal.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or, if require is preferred: +// const { RestClientV3 } = require('bitget-api'); + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client + .submitWithdraw({ + coin: 'usdt', + transferType: 'internal_transfer', + address: '234234242', + innerToType: 'uid', + size: '100', + }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/adjustAccountMode.js b/examples/apidoc/RestClientV3/adjustAccountMode.js deleted file mode 100644 index 80e32ee..0000000 --- a/examples/apidoc/RestClientV3/adjustAccountMode.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/account/adjust-account-mode -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.adjustAccountMode(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/batchModifyOrders.js b/examples/apidoc/RestClientV3/batchModifyOrders.js deleted file mode 100644 index 6b51ac8..0000000 --- a/examples/apidoc/RestClientV3/batchModifyOrders.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/trade/batch-modify-order -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.batchModifyOrders(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/bindLoanUid.js b/examples/apidoc/RestClientV3/bindLoanUid.js deleted file mode 100644 index 3537d16..0000000 --- a/examples/apidoc/RestClientV3/bindLoanUid.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/ins-loan/bind-uid -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.bindLoanUid(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/brokerSubWithdrawal.js b/examples/apidoc/RestClientV3/brokerSubWithdrawal.js deleted file mode 100644 index 51fd40c..0000000 --- a/examples/apidoc/RestClientV3/brokerSubWithdrawal.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/broker/sub-withdrawal -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.brokerSubWithdrawal(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/cancelAllOrders.js b/examples/apidoc/RestClientV3/cancelAllOrders.js deleted file mode 100644 index b5c2009..0000000 --- a/examples/apidoc/RestClientV3/cancelAllOrders.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/trade/cancel-symbol-order -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.cancelAllOrders(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/cancelBatchOrders.js b/examples/apidoc/RestClientV3/cancelBatchOrders.js deleted file mode 100644 index 75ebd7d..0000000 --- a/examples/apidoc/RestClientV3/cancelBatchOrders.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/trade/cancel-batch -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.cancelBatchOrders(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/cancelOrder.js b/examples/apidoc/RestClientV3/cancelOrder.js deleted file mode 100644 index 61dc6c2..0000000 --- a/examples/apidoc/RestClientV3/cancelOrder.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/trade/cancel-order -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.cancelOrder(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/cancelRealityOrder.js b/examples/apidoc/RestClientV3/cancelRealityOrder.js deleted file mode 100644 index a81f44c..0000000 --- a/examples/apidoc/RestClientV3/cancelRealityOrder.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/trade/cancel-reality-order -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.cancelRealityOrder(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/cancelStrategyOrder.js b/examples/apidoc/RestClientV3/cancelStrategyOrder.js deleted file mode 100644 index 8feb0b9..0000000 --- a/examples/apidoc/RestClientV3/cancelStrategyOrder.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/trade/cancel-strategy-order -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.cancelStrategyOrder(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/cancelWithdrawal.js b/examples/apidoc/RestClientV3/cancelWithdrawal.js deleted file mode 100644 index c2d97dd..0000000 --- a/examples/apidoc/RestClientV3/cancelWithdrawal.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/account/cancel-withdrawal -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.cancelWithdrawal(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/closeAllPositions.js b/examples/apidoc/RestClientV3/closeAllPositions.js deleted file mode 100644 index 3ea7f77..0000000 --- a/examples/apidoc/RestClientV3/closeAllPositions.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/trade/close-positions -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.closeAllPositions(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/confirmP2pOrderPayment.js b/examples/apidoc/RestClientV3/confirmP2pOrderPayment.js deleted file mode 100644 index 756e045..0000000 --- a/examples/apidoc/RestClientV3/confirmP2pOrderPayment.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/p2p/order-pay -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.confirmP2pOrderPayment(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/copyFuturesTransfer.js b/examples/apidoc/RestClientV3/copyFuturesTransfer.js deleted file mode 100644 index 101061c..0000000 --- a/examples/apidoc/RestClientV3/copyFuturesTransfer.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/copy/futures/transfer -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.copyFuturesTransfer(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/countdownCancelAll.js b/examples/apidoc/RestClientV3/countdownCancelAll.js deleted file mode 100644 index 8eb591b..0000000 --- a/examples/apidoc/RestClientV3/countdownCancelAll.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/trade/countdown-cancel-all -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.countdownCancelAll(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/createBrokerSubAccount.js b/examples/apidoc/RestClientV3/createBrokerSubAccount.js deleted file mode 100644 index 3cb5a90..0000000 --- a/examples/apidoc/RestClientV3/createBrokerSubAccount.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/broker/create-sub -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.createBrokerSubAccount(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/createBrokerSubApiKey.js b/examples/apidoc/RestClientV3/createBrokerSubApiKey.js deleted file mode 100644 index 176d881..0000000 --- a/examples/apidoc/RestClientV3/createBrokerSubApiKey.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/broker/create-sub-apikey -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.createBrokerSubApiKey(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/createP2pAd.js b/examples/apidoc/RestClientV3/createP2pAd.js deleted file mode 100644 index 6515be6..0000000 --- a/examples/apidoc/RestClientV3/createP2pAd.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/p2p/ad-create -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.createP2pAd(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/createSubAccount.js b/examples/apidoc/RestClientV3/createSubAccount.js deleted file mode 100644 index fd4ba85..0000000 --- a/examples/apidoc/RestClientV3/createSubAccount.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/user/create-sub -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.createSubAccount(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/createSubAccountApiKey.js b/examples/apidoc/RestClientV3/createSubAccountApiKey.js deleted file mode 100644 index 3989dc3..0000000 --- a/examples/apidoc/RestClientV3/createSubAccountApiKey.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/user/create-sub-api -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.createSubAccountApiKey(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/deleteBrokerSubApiKey.js b/examples/apidoc/RestClientV3/deleteBrokerSubApiKey.js deleted file mode 100644 index bab6ab9..0000000 --- a/examples/apidoc/RestClientV3/deleteBrokerSubApiKey.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/broker/delete-sub-apikey -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.deleteBrokerSubApiKey(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/deleteSubAccountApiKey.js b/examples/apidoc/RestClientV3/deleteSubAccountApiKey.js deleted file mode 100644 index 69eb658..0000000 --- a/examples/apidoc/RestClientV3/deleteSubAccountApiKey.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/user/delete-sub-api -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.deleteSubAccountApiKey(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/downgradeAccountToClassic.js b/examples/apidoc/RestClientV3/downgradeAccountToClassic.js deleted file mode 100644 index 637cd3f..0000000 --- a/examples/apidoc/RestClientV3/downgradeAccountToClassic.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/account/switch -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.downgradeAccountToClassic(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/freezeSubAccount.js b/examples/apidoc/RestClientV3/freezeSubAccount.js deleted file mode 100644 index ae033ae..0000000 --- a/examples/apidoc/RestClientV3/freezeSubAccount.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/user/freeze-sub -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.freezeSubAccount(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getAccountInfo.js b/examples/apidoc/RestClientV3/getAccountInfo.js deleted file mode 100644 index 6a3c55f..0000000 --- a/examples/apidoc/RestClientV3/getAccountInfo.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/account/info -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getAccountInfo(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getAccountSettings.js b/examples/apidoc/RestClientV3/getAccountSettings.js deleted file mode 100644 index 29d1f4e..0000000 --- a/examples/apidoc/RestClientV3/getAccountSettings.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/account/settings -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getAccountSettings(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getAllFeeRates.js b/examples/apidoc/RestClientV3/getAllFeeRates.js deleted file mode 100644 index ccf6196..0000000 --- a/examples/apidoc/RestClientV3/getAllFeeRates.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/account/all-fee-rate -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getAllFeeRates(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getBalances.js b/examples/apidoc/RestClientV3/getBalances.js deleted file mode 100644 index 6e3589d..0000000 --- a/examples/apidoc/RestClientV3/getBalances.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/account/assets -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getBalances(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getBrokerAllSubDepositWithdrawal.js b/examples/apidoc/RestClientV3/getBrokerAllSubDepositWithdrawal.js deleted file mode 100644 index 606076c..0000000 --- a/examples/apidoc/RestClientV3/getBrokerAllSubDepositWithdrawal.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/broker/all-sub-deposit-withdrawal -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getBrokerAllSubDepositWithdrawal(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getBrokerCommission.js b/examples/apidoc/RestClientV3/getBrokerCommission.js deleted file mode 100644 index 7359138..0000000 --- a/examples/apidoc/RestClientV3/getBrokerCommission.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/broker/commission -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getBrokerCommission(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getBrokerSubAccountList.js b/examples/apidoc/RestClientV3/getBrokerSubAccountList.js deleted file mode 100644 index 9716fe4..0000000 --- a/examples/apidoc/RestClientV3/getBrokerSubAccountList.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/broker/sub-list -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getBrokerSubAccountList(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getBrokerSubApiKey.js b/examples/apidoc/RestClientV3/getBrokerSubApiKey.js deleted file mode 100644 index e67066e..0000000 --- a/examples/apidoc/RestClientV3/getBrokerSubApiKey.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/broker/query-sub-apikey -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getBrokerSubApiKey(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getBrokerSubDepositAddress.js b/examples/apidoc/RestClientV3/getBrokerSubDepositAddress.js deleted file mode 100644 index 101cd74..0000000 --- a/examples/apidoc/RestClientV3/getBrokerSubDepositAddress.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/broker/sub-deposit-address -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getBrokerSubDepositAddress(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getCandles.js b/examples/apidoc/RestClientV3/getCandles.js deleted file mode 100644 index 40384fb..0000000 --- a/examples/apidoc/RestClientV3/getCandles.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/market/candles -// METHOD: GET -// PUBLIC: YES - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getCandles(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getCashDividendRecords.js b/examples/apidoc/RestClientV3/getCashDividendRecords.js deleted file mode 100644 index c7594a5..0000000 --- a/examples/apidoc/RestClientV3/getCashDividendRecords.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/market/cash-dividend-records -// METHOD: GET -// PUBLIC: YES - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getCashDividendRecords(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getCollateralType.js b/examples/apidoc/RestClientV3/getCollateralType.js deleted file mode 100644 index fc4ef2d..0000000 --- a/examples/apidoc/RestClientV3/getCollateralType.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/account/collateral-type -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getCollateralType(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getContractsOi.js b/examples/apidoc/RestClientV3/getContractsOi.js deleted file mode 100644 index 8a3f02f..0000000 --- a/examples/apidoc/RestClientV3/getContractsOi.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/market/oi-limit -// METHOD: GET -// PUBLIC: YES - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getContractsOi(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getConvertRecords.js b/examples/apidoc/RestClientV3/getConvertRecords.js deleted file mode 100644 index f17c716..0000000 --- a/examples/apidoc/RestClientV3/getConvertRecords.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/account/convert-records -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getConvertRecords(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getCopyFuturesMaxTransferable.js b/examples/apidoc/RestClientV3/getCopyFuturesMaxTransferable.js deleted file mode 100644 index 3aa5ae5..0000000 --- a/examples/apidoc/RestClientV3/getCopyFuturesMaxTransferable.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/copy/futures/max-transferable -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getCopyFuturesMaxTransferable(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getCopyFuturesPositionSummary.js b/examples/apidoc/RestClientV3/getCopyFuturesPositionSummary.js deleted file mode 100644 index 39ed732..0000000 --- a/examples/apidoc/RestClientV3/getCopyFuturesPositionSummary.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/copy/futures/position-summary -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getCopyFuturesPositionSummary(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getCopyFuturesTradingPairs.js b/examples/apidoc/RestClientV3/getCopyFuturesTradingPairs.js deleted file mode 100644 index 1adb579..0000000 --- a/examples/apidoc/RestClientV3/getCopyFuturesTradingPairs.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/copy/futures/trading-pairs -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getCopyFuturesTradingPairs(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getCopyFuturesTransferRecords.js b/examples/apidoc/RestClientV3/getCopyFuturesTransferRecords.js deleted file mode 100644 index 31e4a59..0000000 --- a/examples/apidoc/RestClientV3/getCopyFuturesTransferRecords.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/copy/futures/transfer-record -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getCopyFuturesTransferRecords(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getCurrentFundingRate.js b/examples/apidoc/RestClientV3/getCurrentFundingRate.js deleted file mode 100644 index 2e84dbc..0000000 --- a/examples/apidoc/RestClientV3/getCurrentFundingRate.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/market/current-fund-rate -// METHOD: GET -// PUBLIC: YES - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getCurrentFundingRate(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getCurrentPosition.js b/examples/apidoc/RestClientV3/getCurrentPosition.js deleted file mode 100644 index ece0542..0000000 --- a/examples/apidoc/RestClientV3/getCurrentPosition.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/position/current-position -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getCurrentPosition(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getCustomCollateralCoins.js b/examples/apidoc/RestClientV3/getCustomCollateralCoins.js deleted file mode 100644 index 1eb4771..0000000 --- a/examples/apidoc/RestClientV3/getCustomCollateralCoins.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/account/custom-collateral-coins -// METHOD: GET -// PUBLIC: YES - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getCustomCollateralCoins(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getDeductInfo.js b/examples/apidoc/RestClientV3/getDeductInfo.js deleted file mode 100644 index 61a1368..0000000 --- a/examples/apidoc/RestClientV3/getDeductInfo.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/account/deduct-info -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getDeductInfo(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getDeltaInfo.js b/examples/apidoc/RestClientV3/getDeltaInfo.js deleted file mode 100644 index 62d6df6..0000000 --- a/examples/apidoc/RestClientV3/getDeltaInfo.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/account/delta-info -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getDeltaInfo(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getDepositAddress.js b/examples/apidoc/RestClientV3/getDepositAddress.js deleted file mode 100644 index e81db6b..0000000 --- a/examples/apidoc/RestClientV3/getDepositAddress.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/account/deposit-address -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getDepositAddress(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getDepositRecords.js b/examples/apidoc/RestClientV3/getDepositRecords.js deleted file mode 100644 index 973c904..0000000 --- a/examples/apidoc/RestClientV3/getDepositRecords.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/account/deposit-records -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getDepositRecords(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getDiscountRate.js b/examples/apidoc/RestClientV3/getDiscountRate.js deleted file mode 100644 index c0f9dd5..0000000 --- a/examples/apidoc/RestClientV3/getDiscountRate.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/market/discount-rate -// METHOD: GET -// PUBLIC: YES - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getDiscountRate(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getEarnEliteAssets.js b/examples/apidoc/RestClientV3/getEarnEliteAssets.js deleted file mode 100644 index 3402542..0000000 --- a/examples/apidoc/RestClientV3/getEarnEliteAssets.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/earn/elite-assets -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getEarnEliteAssets(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getEarnEliteProducts.js b/examples/apidoc/RestClientV3/getEarnEliteProducts.js deleted file mode 100644 index 0d9391d..0000000 --- a/examples/apidoc/RestClientV3/getEarnEliteProducts.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/earn/elite-product -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getEarnEliteProducts(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getEarnEliteRecords.js b/examples/apidoc/RestClientV3/getEarnEliteRecords.js deleted file mode 100644 index 7ffe123..0000000 --- a/examples/apidoc/RestClientV3/getEarnEliteRecords.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/earn/elite-records -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getEarnEliteRecords(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getEarnEliteRedeemInfo.js b/examples/apidoc/RestClientV3/getEarnEliteRedeemInfo.js deleted file mode 100644 index f3d68f1..0000000 --- a/examples/apidoc/RestClientV3/getEarnEliteRedeemInfo.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/earn/elite-redeem-info -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getEarnEliteRedeemInfo(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getEarnEliteSubscribeInfo.js b/examples/apidoc/RestClientV3/getEarnEliteSubscribeInfo.js deleted file mode 100644 index edd86d8..0000000 --- a/examples/apidoc/RestClientV3/getEarnEliteSubscribeInfo.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/earn/elite-subscribe-info -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getEarnEliteSubscribeInfo(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getEarnEliteSubscribeResult.js b/examples/apidoc/RestClientV3/getEarnEliteSubscribeResult.js deleted file mode 100644 index ffd39f5..0000000 --- a/examples/apidoc/RestClientV3/getEarnEliteSubscribeResult.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/earn/elite-subscribe-result -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getEarnEliteSubscribeResult(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getFeeRate.js b/examples/apidoc/RestClientV3/getFeeRate.js deleted file mode 100644 index 7eb8588..0000000 --- a/examples/apidoc/RestClientV3/getFeeRate.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/account/fee-rate -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getFeeRate(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getFinancialRecords.js b/examples/apidoc/RestClientV3/getFinancialRecords.js deleted file mode 100644 index edf3ee0..0000000 --- a/examples/apidoc/RestClientV3/getFinancialRecords.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/account/financial-records -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getFinancialRecords(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getFundingAssets.js b/examples/apidoc/RestClientV3/getFundingAssets.js deleted file mode 100644 index 3c89dd2..0000000 --- a/examples/apidoc/RestClientV3/getFundingAssets.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/account/funding-assets -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getFundingAssets(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getFuturesAccountLongShort.js b/examples/apidoc/RestClientV3/getFuturesAccountLongShort.js deleted file mode 100644 index 48769ba..0000000 --- a/examples/apidoc/RestClientV3/getFuturesAccountLongShort.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/market/futures-account-long-short -// METHOD: GET -// PUBLIC: YES - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getFuturesAccountLongShort(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getFuturesActiveBuySell.js b/examples/apidoc/RestClientV3/getFuturesActiveBuySell.js deleted file mode 100644 index 39d88e9..0000000 --- a/examples/apidoc/RestClientV3/getFuturesActiveBuySell.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/market/futures-active-buy-sell -// METHOD: GET -// PUBLIC: YES - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getFuturesActiveBuySell(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getFuturesLongShort.js b/examples/apidoc/RestClientV3/getFuturesLongShort.js deleted file mode 100644 index 49680ff..0000000 --- a/examples/apidoc/RestClientV3/getFuturesLongShort.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/market/futures-long-short -// METHOD: GET -// PUBLIC: YES - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getFuturesLongShort(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getFuturesPositionLongShort.js b/examples/apidoc/RestClientV3/getFuturesPositionLongShort.js deleted file mode 100644 index 886d9a6..0000000 --- a/examples/apidoc/RestClientV3/getFuturesPositionLongShort.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/market/futures-position-long-short -// METHOD: GET -// PUBLIC: YES - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getFuturesPositionLongShort(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getHistoryCandles.js b/examples/apidoc/RestClientV3/getHistoryCandles.js deleted file mode 100644 index e8becbb..0000000 --- a/examples/apidoc/RestClientV3/getHistoryCandles.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/market/history-candles -// METHOD: GET -// PUBLIC: YES - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getHistoryCandles(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getHistoryFundingRate.js b/examples/apidoc/RestClientV3/getHistoryFundingRate.js deleted file mode 100644 index aa18ddc..0000000 --- a/examples/apidoc/RestClientV3/getHistoryFundingRate.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/market/history-fund-rate -// METHOD: GET -// PUBLIC: YES - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getHistoryFundingRate(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getHistoryOrders.js b/examples/apidoc/RestClientV3/getHistoryOrders.js deleted file mode 100644 index 39276ff..0000000 --- a/examples/apidoc/RestClientV3/getHistoryOrders.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/trade/history-orders -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getHistoryOrders(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getHistoryStrategyOrders.js b/examples/apidoc/RestClientV3/getHistoryStrategyOrders.js deleted file mode 100644 index 4307ca4..0000000 --- a/examples/apidoc/RestClientV3/getHistoryStrategyOrders.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/trade/history-strategy-orders -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getHistoryStrategyOrders(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getIndexComponents.js b/examples/apidoc/RestClientV3/getIndexComponents.js deleted file mode 100644 index c87b18d..0000000 --- a/examples/apidoc/RestClientV3/getIndexComponents.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/market/index-components -// METHOD: GET -// PUBLIC: YES - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getIndexComponents(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getInstruments.js b/examples/apidoc/RestClientV3/getInstruments.js deleted file mode 100644 index 09fc2c4..0000000 --- a/examples/apidoc/RestClientV3/getInstruments.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/market/instruments -// METHOD: GET -// PUBLIC: YES - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getInstruments(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getLiquidations.js b/examples/apidoc/RestClientV3/getLiquidations.js deleted file mode 100644 index 05ddbd7..0000000 --- a/examples/apidoc/RestClientV3/getLiquidations.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/market/liquidations -// METHOD: GET -// PUBLIC: YES - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getLiquidations(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getLoanBorrowHistory.js b/examples/apidoc/RestClientV3/getLoanBorrowHistory.js deleted file mode 100644 index 5735e07..0000000 --- a/examples/apidoc/RestClientV3/getLoanBorrowHistory.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/loan/borrow-history -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getLoanBorrowHistory(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getLoanBorrowOngoing.js b/examples/apidoc/RestClientV3/getLoanBorrowOngoing.js deleted file mode 100644 index 21436ef..0000000 --- a/examples/apidoc/RestClientV3/getLoanBorrowOngoing.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/loan/borrow-ongoing -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getLoanBorrowOngoing(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getLoanCoins.js b/examples/apidoc/RestClientV3/getLoanCoins.js deleted file mode 100644 index d5f2ead..0000000 --- a/examples/apidoc/RestClientV3/getLoanCoins.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/loan/coins -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getLoanCoins(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getLoanData.js b/examples/apidoc/RestClientV3/getLoanData.js deleted file mode 100644 index a8c59df..0000000 --- a/examples/apidoc/RestClientV3/getLoanData.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/trade/loan-data -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getLoanData(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getLoanInterest.js b/examples/apidoc/RestClientV3/getLoanInterest.js deleted file mode 100644 index 4203bd7..0000000 --- a/examples/apidoc/RestClientV3/getLoanInterest.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/loan/interest -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getLoanInterest(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getLoanLTVConvert.js b/examples/apidoc/RestClientV3/getLoanLTVConvert.js deleted file mode 100644 index 8d5f6e9..0000000 --- a/examples/apidoc/RestClientV3/getLoanLTVConvert.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/ins-loan/ltv-convert -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getLoanLTVConvert(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getLoanMarginCoinInfo.js b/examples/apidoc/RestClientV3/getLoanMarginCoinInfo.js deleted file mode 100644 index aa2fb79..0000000 --- a/examples/apidoc/RestClientV3/getLoanMarginCoinInfo.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/ins-loan/ensure-coins-convert -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getLoanMarginCoinInfo(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getLoanOrder.js b/examples/apidoc/RestClientV3/getLoanOrder.js deleted file mode 100644 index c74792a..0000000 --- a/examples/apidoc/RestClientV3/getLoanOrder.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/ins-loan/loan-order -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getLoanOrder(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getLoanPledgeRateHistory.js b/examples/apidoc/RestClientV3/getLoanPledgeRateHistory.js deleted file mode 100644 index 3f30289..0000000 --- a/examples/apidoc/RestClientV3/getLoanPledgeRateHistory.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/loan/pledge-rate-history -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getLoanPledgeRateHistory(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getLoanProductInfo.js b/examples/apidoc/RestClientV3/getLoanProductInfo.js deleted file mode 100644 index f36c5ee..0000000 --- a/examples/apidoc/RestClientV3/getLoanProductInfo.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/ins-loan/product-infos -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getLoanProductInfo(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getLoanReduces.js b/examples/apidoc/RestClientV3/getLoanReduces.js deleted file mode 100644 index 6d77ed8..0000000 --- a/examples/apidoc/RestClientV3/getLoanReduces.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/loan/reduces -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getLoanReduces(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getLoanRepaidHistory.js b/examples/apidoc/RestClientV3/getLoanRepaidHistory.js deleted file mode 100644 index 460077f..0000000 --- a/examples/apidoc/RestClientV3/getLoanRepaidHistory.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/ins-loan/repaid-history -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getLoanRepaidHistory(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getLoanRepayHistory.js b/examples/apidoc/RestClientV3/getLoanRepayHistory.js deleted file mode 100644 index 55ac24b..0000000 --- a/examples/apidoc/RestClientV3/getLoanRepayHistory.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/loan/repay-history -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getLoanRepayHistory(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getLoanRiskUnit.js b/examples/apidoc/RestClientV3/getLoanRiskUnit.js deleted file mode 100644 index 19e9d93..0000000 --- a/examples/apidoc/RestClientV3/getLoanRiskUnit.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/ins-loan/risk-unit -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getLoanRiskUnit(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getLoanSymbols.js b/examples/apidoc/RestClientV3/getLoanSymbols.js deleted file mode 100644 index 03bc27d..0000000 --- a/examples/apidoc/RestClientV3/getLoanSymbols.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/ins-loan/symbols -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getLoanSymbols(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getLoanTransfered.js b/examples/apidoc/RestClientV3/getLoanTransfered.js deleted file mode 100644 index 490b06d..0000000 --- a/examples/apidoc/RestClientV3/getLoanTransfered.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/ins-loan/transfered -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getLoanTransfered(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getMarginIsolatedBorrow.js b/examples/apidoc/RestClientV3/getMarginIsolatedBorrow.js deleted file mode 100644 index 7867231..0000000 --- a/examples/apidoc/RestClientV3/getMarginIsolatedBorrow.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/market/margin-isolated-borrow -// METHOD: GET -// PUBLIC: YES - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getMarginIsolatedBorrow(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getMarginLoanGrowth.js b/examples/apidoc/RestClientV3/getMarginLoanGrowth.js deleted file mode 100644 index cd1e789..0000000 --- a/examples/apidoc/RestClientV3/getMarginLoanGrowth.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/market/margin-loan-growth -// METHOD: GET -// PUBLIC: YES - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getMarginLoanGrowth(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getMarginLoans.js b/examples/apidoc/RestClientV3/getMarginLoans.js deleted file mode 100644 index df17c4a..0000000 --- a/examples/apidoc/RestClientV3/getMarginLoans.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/market/margin-loans -// METHOD: GET -// PUBLIC: YES - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getMarginLoans(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getMarginLongShort.js b/examples/apidoc/RestClientV3/getMarginLongShort.js deleted file mode 100644 index b67d12d..0000000 --- a/examples/apidoc/RestClientV3/getMarginLongShort.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/market/margin-long-short -// METHOD: GET -// PUBLIC: YES - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getMarginLongShort(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getMarketFeeGroup.js b/examples/apidoc/RestClientV3/getMarketFeeGroup.js deleted file mode 100644 index 0af82e9..0000000 --- a/examples/apidoc/RestClientV3/getMarketFeeGroup.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/market/fee-group -// METHOD: GET -// PUBLIC: YES - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getMarketFeeGroup(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getMarketScoreWeights.js b/examples/apidoc/RestClientV3/getMarketScoreWeights.js deleted file mode 100644 index ae32685..0000000 --- a/examples/apidoc/RestClientV3/getMarketScoreWeights.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/market/score-weights -// METHOD: GET -// PUBLIC: YES - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getMarketScoreWeights(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getMaxOpenAvailable.js b/examples/apidoc/RestClientV3/getMaxOpenAvailable.js deleted file mode 100644 index 1845d87..0000000 --- a/examples/apidoc/RestClientV3/getMaxOpenAvailable.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/account/max-open-available -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getMaxOpenAvailable(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getMaxTransferable.js b/examples/apidoc/RestClientV3/getMaxTransferable.js deleted file mode 100644 index 6b63a11..0000000 --- a/examples/apidoc/RestClientV3/getMaxTransferable.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/account/max-transferable -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getMaxTransferable(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getMaxWithdrawal.js b/examples/apidoc/RestClientV3/getMaxWithdrawal.js deleted file mode 100644 index 4e5de93..0000000 --- a/examples/apidoc/RestClientV3/getMaxWithdrawal.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/account/max-withdrawal -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getMaxWithdrawal(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getOpenInterest.js b/examples/apidoc/RestClientV3/getOpenInterest.js deleted file mode 100644 index 1ce21dd..0000000 --- a/examples/apidoc/RestClientV3/getOpenInterest.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/market/open-interest -// METHOD: GET -// PUBLIC: YES - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getOpenInterest(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getOpenInterestLimit.js b/examples/apidoc/RestClientV3/getOpenInterestLimit.js deleted file mode 100644 index b9abc9b..0000000 --- a/examples/apidoc/RestClientV3/getOpenInterestLimit.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/account/open-interest-limit -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getOpenInterestLimit(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getOrderBook.js b/examples/apidoc/RestClientV3/getOrderBook.js deleted file mode 100644 index 3c6e0c3..0000000 --- a/examples/apidoc/RestClientV3/getOrderBook.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/market/orderbook -// METHOD: GET -// PUBLIC: YES - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getOrderBook(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getOrderInfo.js b/examples/apidoc/RestClientV3/getOrderInfo.js deleted file mode 100644 index 87a0601..0000000 --- a/examples/apidoc/RestClientV3/getOrderInfo.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/trade/order-info -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getOrderInfo(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getP2pAdInfo.js b/examples/apidoc/RestClientV3/getP2pAdInfo.js deleted file mode 100644 index 653f57d..0000000 --- a/examples/apidoc/RestClientV3/getP2pAdInfo.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/p2p/ad-info -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getP2pAdInfo(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getP2pAdLimit.js b/examples/apidoc/RestClientV3/getP2pAdLimit.js deleted file mode 100644 index 6bca0d3..0000000 --- a/examples/apidoc/RestClientV3/getP2pAdLimit.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/p2p/ad-limit -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getP2pAdLimit(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getP2pAdList.js b/examples/apidoc/RestClientV3/getP2pAdList.js deleted file mode 100644 index 2f2a102..0000000 --- a/examples/apidoc/RestClientV3/getP2pAdList.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/p2p/ad-list -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getP2pAdList(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getP2pAllOrders.js b/examples/apidoc/RestClientV3/getP2pAllOrders.js deleted file mode 100644 index d80e4ae..0000000 --- a/examples/apidoc/RestClientV3/getP2pAllOrders.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/p2p/all-orders -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getP2pAllOrders(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getP2pBalance.js b/examples/apidoc/RestClientV3/getP2pBalance.js deleted file mode 100644 index 7ef418f..0000000 --- a/examples/apidoc/RestClientV3/getP2pBalance.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/p2p/balance -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getP2pBalance(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getP2pCurrencies.js b/examples/apidoc/RestClientV3/getP2pCurrencies.js deleted file mode 100644 index e970d06..0000000 --- a/examples/apidoc/RestClientV3/getP2pCurrencies.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/p2p/currencies -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getP2pCurrencies(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getP2pExchangeRate.js b/examples/apidoc/RestClientV3/getP2pExchangeRate.js deleted file mode 100644 index 84ab39b..0000000 --- a/examples/apidoc/RestClientV3/getP2pExchangeRate.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/p2p/exchange-rate -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getP2pExchangeRate(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getP2pOrderInfo.js b/examples/apidoc/RestClientV3/getP2pOrderInfo.js deleted file mode 100644 index 6803c37..0000000 --- a/examples/apidoc/RestClientV3/getP2pOrderInfo.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/p2p/order-info -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getP2pOrderInfo(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getP2pPayMethods.js b/examples/apidoc/RestClientV3/getP2pPayMethods.js deleted file mode 100644 index 6cbf2a4..0000000 --- a/examples/apidoc/RestClientV3/getP2pPayMethods.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/p2p/pay-method -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getP2pPayMethods(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getP2pPendingOrders.js b/examples/apidoc/RestClientV3/getP2pPendingOrders.js deleted file mode 100644 index 673677a..0000000 --- a/examples/apidoc/RestClientV3/getP2pPendingOrders.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/p2p/pending-orders -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getP2pPendingOrders(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getP2pUserInfo.js b/examples/apidoc/RestClientV3/getP2pUserInfo.js deleted file mode 100644 index ea1bb46..0000000 --- a/examples/apidoc/RestClientV3/getP2pUserInfo.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/p2p/user-info -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getP2pUserInfo(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getPaymentCoins.js b/examples/apidoc/RestClientV3/getPaymentCoins.js deleted file mode 100644 index c4c0875..0000000 --- a/examples/apidoc/RestClientV3/getPaymentCoins.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/account/payment-coins -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getPaymentCoins(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getPositionAdlRank.js b/examples/apidoc/RestClientV3/getPositionAdlRank.js deleted file mode 100644 index 5f35f4b..0000000 --- a/examples/apidoc/RestClientV3/getPositionAdlRank.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/position/adlRank -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getPositionAdlRank(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getPositionHistory.js b/examples/apidoc/RestClientV3/getPositionHistory.js deleted file mode 100644 index d20f4e0..0000000 --- a/examples/apidoc/RestClientV3/getPositionHistory.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/position/history-position -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getPositionHistory(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getPositionTier.js b/examples/apidoc/RestClientV3/getPositionTier.js deleted file mode 100644 index dcd6fbb..0000000 --- a/examples/apidoc/RestClientV3/getPositionTier.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/market/position-tier -// METHOD: GET -// PUBLIC: YES - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getPositionTier(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getProofOfReserves.js b/examples/apidoc/RestClientV3/getProofOfReserves.js deleted file mode 100644 index 903b58e..0000000 --- a/examples/apidoc/RestClientV3/getProofOfReserves.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/market/proof-of-reserves -// METHOD: GET -// PUBLIC: YES - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getProofOfReserves(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getRepayableCoins.js b/examples/apidoc/RestClientV3/getRepayableCoins.js deleted file mode 100644 index 1bef386..0000000 --- a/examples/apidoc/RestClientV3/getRepayableCoins.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/account/repayable-coins -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getRepayableCoins(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getRiskReserve.js b/examples/apidoc/RestClientV3/getRiskReserve.js deleted file mode 100644 index 66e6395..0000000 --- a/examples/apidoc/RestClientV3/getRiskReserve.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/market/risk-reserve -// METHOD: GET -// PUBLIC: YES - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getRiskReserve(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getRiskReserveAll.js b/examples/apidoc/RestClientV3/getRiskReserveAll.js deleted file mode 100644 index 98de9b7..0000000 --- a/examples/apidoc/RestClientV3/getRiskReserveAll.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/market/risk-reserve-all -// METHOD: GET -// PUBLIC: YES - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getRiskReserveAll(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getRiskReserveHour.js b/examples/apidoc/RestClientV3/getRiskReserveHour.js deleted file mode 100644 index 801bf14..0000000 --- a/examples/apidoc/RestClientV3/getRiskReserveHour.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/market/risk-reserve-hour -// METHOD: GET -// PUBLIC: YES - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getRiskReserveHour(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getRpiOrderBook.js b/examples/apidoc/RestClientV3/getRpiOrderBook.js deleted file mode 100644 index 2c06d35..0000000 --- a/examples/apidoc/RestClientV3/getRpiOrderBook.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/market/rpi-orderbook -// METHOD: GET -// PUBLIC: YES - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getRpiOrderBook(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getRpiSymbols.js b/examples/apidoc/RestClientV3/getRpiSymbols.js deleted file mode 100644 index 4862585..0000000 --- a/examples/apidoc/RestClientV3/getRpiSymbols.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/market/rpi-symbols -// METHOD: GET -// PUBLIC: YES - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getRpiSymbols(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getServerTime.js b/examples/apidoc/RestClientV3/getServerTime.js deleted file mode 100644 index 43a76c4..0000000 --- a/examples/apidoc/RestClientV3/getServerTime.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/public/time -// METHOD: GET -// PUBLIC: YES - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getServerTime(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getSpotFundFlow.js b/examples/apidoc/RestClientV3/getSpotFundFlow.js deleted file mode 100644 index 36fd4a4..0000000 --- a/examples/apidoc/RestClientV3/getSpotFundFlow.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/market/spot-fund-flow -// METHOD: GET -// PUBLIC: YES - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getSpotFundFlow(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getSpotNetFlow.js b/examples/apidoc/RestClientV3/getSpotNetFlow.js deleted file mode 100644 index c01c311..0000000 --- a/examples/apidoc/RestClientV3/getSpotNetFlow.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/market/spot-net-flow -// METHOD: GET -// PUBLIC: YES - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getSpotNetFlow(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getSpotWhaleFlow.js b/examples/apidoc/RestClientV3/getSpotWhaleFlow.js deleted file mode 100644 index 25262c5..0000000 --- a/examples/apidoc/RestClientV3/getSpotWhaleFlow.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/market/spot-whale-flow -// METHOD: GET -// PUBLIC: YES - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getSpotWhaleFlow(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getSubAccountApiKeys.js b/examples/apidoc/RestClientV3/getSubAccountApiKeys.js deleted file mode 100644 index 6d2bdef..0000000 --- a/examples/apidoc/RestClientV3/getSubAccountApiKeys.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/user/sub-api-list -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getSubAccountApiKeys(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getSubAccountList.js b/examples/apidoc/RestClientV3/getSubAccountList.js deleted file mode 100644 index aac99cc..0000000 --- a/examples/apidoc/RestClientV3/getSubAccountList.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/user/sub-list -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getSubAccountList(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getSubDepositAddress.js b/examples/apidoc/RestClientV3/getSubDepositAddress.js deleted file mode 100644 index 2dd4d1b..0000000 --- a/examples/apidoc/RestClientV3/getSubDepositAddress.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/account/sub-deposit-address -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getSubDepositAddress(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getSubDepositRecords.js b/examples/apidoc/RestClientV3/getSubDepositRecords.js deleted file mode 100644 index d0b4f6d..0000000 --- a/examples/apidoc/RestClientV3/getSubDepositRecords.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/account/sub-deposit-records -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getSubDepositRecords(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getSubTransferRecords.js b/examples/apidoc/RestClientV3/getSubTransferRecords.js deleted file mode 100644 index 8d25c4f..0000000 --- a/examples/apidoc/RestClientV3/getSubTransferRecords.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/account/sub-transfer-record -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getSubTransferRecords(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getSubUnifiedAssets.js b/examples/apidoc/RestClientV3/getSubUnifiedAssets.js deleted file mode 100644 index 8b43d27..0000000 --- a/examples/apidoc/RestClientV3/getSubUnifiedAssets.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/account/sub-unified-assets -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getSubUnifiedAssets(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getTaxRecords.js b/examples/apidoc/RestClientV3/getTaxRecords.js deleted file mode 100644 index b5da169..0000000 --- a/examples/apidoc/RestClientV3/getTaxRecords.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/tax/records -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getTaxRecords(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getTickers.js b/examples/apidoc/RestClientV3/getTickers.js deleted file mode 100644 index a61a4b7..0000000 --- a/examples/apidoc/RestClientV3/getTickers.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/market/tickers -// METHOD: GET -// PUBLIC: YES - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getTickers(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getTradeFills.js b/examples/apidoc/RestClientV3/getTradeFills.js deleted file mode 100644 index 9ea9659..0000000 --- a/examples/apidoc/RestClientV3/getTradeFills.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/trade/fills -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getTradeFills(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getTransferableCoins.js b/examples/apidoc/RestClientV3/getTransferableCoins.js deleted file mode 100644 index 4ba5c46..0000000 --- a/examples/apidoc/RestClientV3/getTransferableCoins.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/account/transferable-coins -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getTransferableCoins(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getUnfilledOrders.js b/examples/apidoc/RestClientV3/getUnfilledOrders.js deleted file mode 100644 index 6f1edc8..0000000 --- a/examples/apidoc/RestClientV3/getUnfilledOrders.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/trade/unfilled-orders -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getUnfilledOrders(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getUnfilledStrategyOrders.js b/examples/apidoc/RestClientV3/getUnfilledStrategyOrders.js deleted file mode 100644 index 20406b5..0000000 --- a/examples/apidoc/RestClientV3/getUnfilledStrategyOrders.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/trade/unfilled-strategy-orders -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getUnfilledStrategyOrders(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getUnifiedAccountSwitchStatus.js b/examples/apidoc/RestClientV3/getUnifiedAccountSwitchStatus.js deleted file mode 100644 index 1e34a7e..0000000 --- a/examples/apidoc/RestClientV3/getUnifiedAccountSwitchStatus.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/account/switch-status -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getUnifiedAccountSwitchStatus(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getWithdrawAddressBook.js b/examples/apidoc/RestClientV3/getWithdrawAddressBook.js deleted file mode 100644 index 2fe18ca..0000000 --- a/examples/apidoc/RestClientV3/getWithdrawAddressBook.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/account/withdraw-address -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getWithdrawAddressBook(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/getWithdrawRecords.js b/examples/apidoc/RestClientV3/getWithdrawRecords.js deleted file mode 100644 index bd1959c..0000000 --- a/examples/apidoc/RestClientV3/getWithdrawRecords.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/account/withdrawal-records -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.getWithdrawRecords(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/loanBorrow.js b/examples/apidoc/RestClientV3/loanBorrow.js deleted file mode 100644 index 52c76c4..0000000 --- a/examples/apidoc/RestClientV3/loanBorrow.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/loan/borrow -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.loanBorrow(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/loanRevisePledge.js b/examples/apidoc/RestClientV3/loanRevisePledge.js deleted file mode 100644 index 410145a..0000000 --- a/examples/apidoc/RestClientV3/loanRevisePledge.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/loan/revise-pledge -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.loanRevisePledge(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/modifyBrokerSubAccount.js b/examples/apidoc/RestClientV3/modifyBrokerSubAccount.js deleted file mode 100644 index a13a47d..0000000 --- a/examples/apidoc/RestClientV3/modifyBrokerSubAccount.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/broker/modify-sub -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.modifyBrokerSubAccount(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/modifyBrokerSubApiKey.js b/examples/apidoc/RestClientV3/modifyBrokerSubApiKey.js deleted file mode 100644 index 09d8cb2..0000000 --- a/examples/apidoc/RestClientV3/modifyBrokerSubApiKey.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/broker/modify-sub-apikey -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.modifyBrokerSubApiKey(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/modifyOrder.js b/examples/apidoc/RestClientV3/modifyOrder.js deleted file mode 100644 index 00509dd..0000000 --- a/examples/apidoc/RestClientV3/modifyOrder.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/trade/modify-order -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.modifyOrder(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/modifyStrategyOrder.js b/examples/apidoc/RestClientV3/modifyStrategyOrder.js deleted file mode 100644 index 52c5669..0000000 --- a/examples/apidoc/RestClientV3/modifyStrategyOrder.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/trade/modify-strategy-order -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.modifyStrategyOrder(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/operateP2pAd.js b/examples/apidoc/RestClientV3/operateP2pAd.js deleted file mode 100644 index 9874c87..0000000 --- a/examples/apidoc/RestClientV3/operateP2pAd.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/p2p/ad-operate -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.operateP2pAd(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/placeBatchOrders.js b/examples/apidoc/RestClientV3/placeBatchOrders.js deleted file mode 100644 index 78adad0..0000000 --- a/examples/apidoc/RestClientV3/placeBatchOrders.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/trade/place-batch -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.placeBatchOrders(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/placeRealityOrder.js b/examples/apidoc/RestClientV3/placeRealityOrder.js deleted file mode 100644 index 7004a28..0000000 --- a/examples/apidoc/RestClientV3/placeRealityOrder.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/trade/place-reality-order -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.placeRealityOrder(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/preSetLeverage.js b/examples/apidoc/RestClientV3/preSetLeverage.js deleted file mode 100644 index aae4c3d..0000000 --- a/examples/apidoc/RestClientV3/preSetLeverage.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/account/pre-set-leverage -// METHOD: GET -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.preSetLeverage(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/redeemEarnElite.js b/examples/apidoc/RestClientV3/redeemEarnElite.js deleted file mode 100644 index dcdeb58..0000000 --- a/examples/apidoc/RestClientV3/redeemEarnElite.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/earn/elite-redeem -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.redeemEarnElite(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/releaseP2pOrderAsset.js b/examples/apidoc/RestClientV3/releaseP2pOrderAsset.js deleted file mode 100644 index 05c2519..0000000 --- a/examples/apidoc/RestClientV3/releaseP2pOrderAsset.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/p2p/order-release -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.releaseP2pOrderAsset(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/setCollateralType.js b/examples/apidoc/RestClientV3/setCollateralType.js deleted file mode 100644 index 86a2411..0000000 --- a/examples/apidoc/RestClientV3/setCollateralType.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/account/set-collateral-type -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.setCollateralType(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/setDepositAccount.js b/examples/apidoc/RestClientV3/setDepositAccount.js deleted file mode 100644 index 3e89963..0000000 --- a/examples/apidoc/RestClientV3/setDepositAccount.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/account/deposit-account -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.setDepositAccount(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/setHoldMode.js b/examples/apidoc/RestClientV3/setHoldMode.js deleted file mode 100644 index cbf4eca..0000000 --- a/examples/apidoc/RestClientV3/setHoldMode.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/account/set-hold-mode -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.setHoldMode(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/setLeverage.js b/examples/apidoc/RestClientV3/setLeverage.js deleted file mode 100644 index e9ecc9d..0000000 --- a/examples/apidoc/RestClientV3/setLeverage.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/account/set-leverage -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.setLeverage(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/setMargin.js b/examples/apidoc/RestClientV3/setMargin.js deleted file mode 100644 index ffc098d..0000000 --- a/examples/apidoc/RestClientV3/setMargin.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/account/set-margin -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.setMargin(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/simulateP2pFee.js b/examples/apidoc/RestClientV3/simulateP2pFee.js deleted file mode 100644 index d854de8..0000000 --- a/examples/apidoc/RestClientV3/simulateP2pFee.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/p2p/fee-simulate -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.simulateP2pFee(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/subAccountTransfer.js b/examples/apidoc/RestClientV3/subAccountTransfer.js deleted file mode 100644 index c04a423..0000000 --- a/examples/apidoc/RestClientV3/subAccountTransfer.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/account/sub-transfer -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.subAccountTransfer(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/submitNewOrder.js b/examples/apidoc/RestClientV3/submitNewOrder.js deleted file mode 100644 index 9901513..0000000 --- a/examples/apidoc/RestClientV3/submitNewOrder.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/trade/place-order -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.submitNewOrder(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/submitRepay.js b/examples/apidoc/RestClientV3/submitRepay.js deleted file mode 100644 index 90b0f68..0000000 --- a/examples/apidoc/RestClientV3/submitRepay.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/account/repay -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.submitRepay(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/submitStrategyOrder.js b/examples/apidoc/RestClientV3/submitStrategyOrder.js deleted file mode 100644 index 6373740..0000000 --- a/examples/apidoc/RestClientV3/submitStrategyOrder.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/trade/place-strategy-order -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.submitStrategyOrder(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/submitTransfer.js b/examples/apidoc/RestClientV3/submitTransfer.js deleted file mode 100644 index eff0e20..0000000 --- a/examples/apidoc/RestClientV3/submitTransfer.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/account/transfer -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.submitTransfer(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/submitWithdraw.js b/examples/apidoc/RestClientV3/submitWithdraw.js deleted file mode 100644 index 35c5582..0000000 --- a/examples/apidoc/RestClientV3/submitWithdraw.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/account/withdraw -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.submitWithdraw(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/subscribeEarnElite.js b/examples/apidoc/RestClientV3/subscribeEarnElite.js deleted file mode 100644 index 8cc6520..0000000 --- a/examples/apidoc/RestClientV3/subscribeEarnElite.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/earn/elite-subscribe -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.subscribeEarnElite(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/switchDeduct.js b/examples/apidoc/RestClientV3/switchDeduct.js deleted file mode 100644 index 36a394f..0000000 --- a/examples/apidoc/RestClientV3/switchDeduct.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/account/switch-deduct -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.switchDeduct(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/updateP2pAd.js b/examples/apidoc/RestClientV3/updateP2pAd.js deleted file mode 100644 index 0077158..0000000 --- a/examples/apidoc/RestClientV3/updateP2pAd.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/p2p/ad-update -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.updateP2pAd(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/examples/apidoc/RestClientV3/updateSubAccountApiKey.js b/examples/apidoc/RestClientV3/updateSubAccountApiKey.js deleted file mode 100644 index 528713c..0000000 --- a/examples/apidoc/RestClientV3/updateSubAccountApiKey.js +++ /dev/null @@ -1,23 +0,0 @@ -import { RestClientV3 } from 'bitget-api'; -// or, if require is preferred: -// const { RestClientV3 } = require('bitget-api'); - -// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange -// This Bitget API SDK is available on npm via "npm install bitget-api" -// ENDPOINT: /api/v3/user/update-sub-api -// METHOD: POST -// PUBLIC: NO - -const client = new RestClientV3({ - apiKey: 'insert_api_key_here', - apiSecret: 'insert_api_secret_here', - apiPass: 'insert_api_pass_here', -}); - -client.updateSubAccountApiKey(params) - .then((response) => { - console.log(response); - }) - .catch((error) => { - console.error(error); - }); diff --git a/package-lock.json b/package-lock.json index f7a6863..4d89ace 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "bitget-api", - "version": "3.1.10", + "version": "3.1.11", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "bitget-api", - "version": "3.1.10", + "version": "3.1.11", "license": "MIT", "dependencies": { "axios": "^1.13.2", diff --git a/package.json b/package.json index bc66c7a..8bf59b2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bitget-api", - "version": "3.1.10", + "version": "3.1.11", "description": "Complete Node.js & JavaScript SDK for Bitget V1-V3 REST APIs & WebSockets, with TypeScript & end-to-end tests.", "scripts": { "test": "jest", diff --git a/src/rest-client-v3.ts b/src/rest-client-v3.ts index 6c81c4d..7277d5b 100644 --- a/src/rest-client-v3.ts +++ b/src/rest-client-v3.ts @@ -1,6 +1,7 @@ import { AdjustAccountModeRequestV3, CancelWithdrawalRequestV3, + CreateAgentSubAccountRequestV3, CreateSubAccountApiKeyRequestV3, CreateSubAccountRequestV3, DeleteSubAccountApiKeyRequestV3, @@ -14,7 +15,10 @@ import { GetFundingAssetsRequestV3, GetMaxTransferableRequestV3, GetMaxWithdrawalRequestV3, + GetMovePositionHistoryRequestV3, GetOpenInterestLimitRequestV3, + GetRealityFillsRequestV3, + GetRealityOrderBookRequestV3, GetSubAccountApiKeysRequestV3, GetSubAccountListRequestV3, GetSubDepositAddressRequestV3, @@ -25,6 +29,7 @@ import { GetTransferableCoinsRequestV3, GetWithdrawAddressBookRequestV3, GetWithdrawRecordsRequestV3, + MovePositionsRequestV3, PreSetLeverageRequestV3, RepayRequestV3, SetCollateralTypeRequestV3, @@ -32,6 +37,7 @@ import { SetLeverageRequestV3, SetMarginRequestV3, SubAccountTransferRequestV3, + SubMasterTransferRequestV3, SwitchDeductRequestV3, TransferRequestV3, UpdateSubAccountApiKeyRequestV3, @@ -163,6 +169,7 @@ import { AllSymbolFeeRateV3, CollateralTypeConfigV3, ConvertRecordV3, + CreateAgentSubAccountResponseV3, CreateSubAccountApiKeyResponseV3, CreateSubAccountResponseV3, CustomCollateralCoinV3, @@ -172,6 +179,8 @@ import { FundingAssetV3, MaxTransferableV3, MaxWithdrawalV3, + MovePositionHistoryV3, + MovePositionsResponseV3, OpenInterestLimitV3, PaymentCoinV3, PreSetLeverageV3, @@ -279,6 +288,8 @@ import { PositionTierV3, ProofOfReservesV3, PublicFillV3, + RealityFillV3, + RealityOrderBookV3, RiskReserveAllV3, RiskReserveHourV3, RiskReserveV3, @@ -712,6 +723,24 @@ export class RestClientV3 extends BaseRestClient { return this.get('/api/v3/market/index-components', params); } + /** + * Get Reality OrderBook + */ + getRealityOrderBook( + params: GetRealityOrderBookRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/account/reality-orderbook', params); + } + + /** + * Get Reality Fills + */ + getRealityFills( + params: GetRealityFillsRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/account/reality-fills', params); + } + /** * * =====Copy Trading | Futures===== @@ -1074,6 +1103,15 @@ export class RestClientV3 extends BaseRestClient { return this.postPrivate('/api/v3/user/create-sub', params); } + /** + * Create Agent Sub-account + */ + createAgentSubAccount( + params: CreateAgentSubAccountRequestV3, + ): Promise> { + return this.postPrivate('/api/v3/user/sub-account/agent-create', params); + } + /** * Freeze/Unfreeze Sub-account */ @@ -1193,6 +1231,18 @@ export class RestClientV3 extends BaseRestClient { return this.getPrivate('/api/v3/account/sub-transfer-record', params); } + /** + * Sub-Main Account Transfer + */ + subMasterTransfer(params: SubMasterTransferRequestV3): Promise< + APIResponse<{ + transferId: string; + clientOid: string; + }> + > { + return this.postPrivate('/api/v3/account/sub-master-transfer', params); + } + /** * * =====Deposit======= endpoints @@ -1413,6 +1463,27 @@ export class RestClientV3 extends BaseRestClient { return this.getPrivate('/api/v3/trade/history-orders', params); } + /** + * Move Positions - Transfer positions between master and sub-accounts + */ + movePositions( + params: MovePositionsRequestV3, + ): Promise> { + return this.postPrivate('/api/v3/account/move-positions', params); + } + + /** + * Get Move Position History + */ + getMovePositionHistory(params: GetMovePositionHistoryRequestV3): Promise< + APIResponse<{ + list: MovePositionHistoryV3[]; + cursor: string; + }> + > { + return this.getPrivate('/api/v3/account/move-position-history', params); + } + /** * Get Fill History */ diff --git a/src/types/request/v3/account.ts b/src/types/request/v3/account.ts index 1d94c45..924d186 100644 --- a/src/types/request/v3/account.ts +++ b/src/types/request/v3/account.ts @@ -113,20 +113,20 @@ export interface TransferRequestV3 { fromType: | 'spot' | 'p2p' - | 'coin-futures' - | 'usdt-futures' - | 'usdc-futures' - | 'crossed-margin' - | 'isolated-margin' + | 'coin_futures' + | 'usdt_futures' + | 'usdc_futures' + | 'crossed_margin' + | 'isolated_margin' | 'uta'; toType: | 'spot' | 'p2p' - | 'coin-futures' - | 'usdt-futures' - | 'usdc-futures' - | 'crossed-margin' - | 'isolated-margin' + | 'coin_futures' + | 'usdt_futures' + | 'usdc_futures' + | 'crossed_margin' + | 'isolated_margin' | 'uta'; amount: string; coin: string; @@ -139,20 +139,20 @@ export interface GetTransferableCoinsRequestV3 { fromType: | 'spot' | 'p2p' - | 'coin-futures' - | 'usdt-futures' - | 'usdc-futures' - | 'crossed-margin' - | 'isolated-margin' + | 'coin_futures' + | 'usdt_futures' + | 'usdc_futures' + | 'crossed_margin' + | 'isolated_margin' | 'uta'; toType: | 'spot' | 'p2p' - | 'coin-futures' - | 'usdt-futures' - | 'usdc-futures' - | 'crossed-margin' - | 'isolated-margin' + | 'coin_futures' + | 'usdt_futures' + | 'usdc_futures' + | 'crossed_margin' + | 'isolated_margin' | 'uta'; } @@ -353,3 +353,48 @@ export interface SetMarginRequestV3 { export interface GetMaxWithdrawalRequestV3 { coin: string; } + +export interface GetRealityOrderBookRequestV3 { + symbol: string; +} + +export interface GetRealityFillsRequestV3 { + symbol: string; + limit?: string; +} + +export interface SubMasterTransferRequestV3 { + fromType: 'spot' | 'uta'; + toType: 'spot' | 'p2p' | 'uta'; + amount: string; + coin: string; + clientOid?: string; +} + +export interface CreateAgentSubAccountRequestV3 { + username: string; + passphrase: string; + note?: string; +} + +export interface MovePositionItemRequestV3 { + symbol: string; + side: 'buy' | 'sell'; + qty: string; +} + +export interface MovePositionsRequestV3 { + fromUid: string; + toUid: string; + category: 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES'; + positionList: MovePositionItemRequestV3[]; +} + +export interface GetMovePositionHistoryRequestV3 { + category: 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES'; + symbol?: string; + startTime?: string; + endTime?: string; + cursor?: string; + limit?: string; +} diff --git a/src/types/request/v3/trade.ts b/src/types/request/v3/trade.ts index fc3fc04..678633c 100644 --- a/src/types/request/v3/trade.ts +++ b/src/types/request/v3/trade.ts @@ -37,6 +37,12 @@ export interface CloseAllPositionsRequestV3 { export interface CancelOrderRequestV3 { orderId?: string; clientOid?: string; + category?: + | 'SPOT' + | 'MARGIN' + | 'USDT-FUTURES' + | 'COIN-FUTURES' + | 'USDC-FUTURES'; } export interface GetMaxOpenAvailableRequestV3 { @@ -59,6 +65,12 @@ export interface GetOrderInfoRequestV3 { } export interface GetFillsRequestV3 { + category?: + | 'SPOT' + | 'MARGIN' + | 'USDT-FUTURES' + | 'COIN-FUTURES' + | 'USDC-FUTURES'; orderId?: string; startTime?: string; endTime?: string; @@ -87,6 +99,7 @@ export interface GetHistoryOrdersRequestV3 { | 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES'; + symbol?: string; startTime?: string; endTime?: string; limit?: string; @@ -185,10 +198,14 @@ export interface PlaceOrderRequestV3 { /** Futures only. Defaults to crossed */ marginMode?: FuturesMarginModeV3; stpMode?: 'none' | 'cancel_taker' | 'cancel_maker' | 'cancel_both'; - takeProfitPrice?: string; - stopLossPrice?: string; - takeProfitTriggerType?: 'mark_price' | 'last_price'; - stopLossTriggerType?: 'mark_price' | 'last_price'; + tpTriggerBy?: 'market' | 'mark'; + slTriggerBy?: 'market' | 'mark'; + takeProfit?: string; + stopLoss?: string; + tpOrderType?: 'limit' | 'market'; + slOrderType?: 'limit' | 'market'; + tpLimitPrice?: string; + slLimitPrice?: string; } export interface CountdownCancelAllRequestV3 { diff --git a/src/types/response/v3/account.ts b/src/types/response/v3/account.ts index 19a7d12..2cd0850 100644 --- a/src/types/response/v3/account.ts +++ b/src/types/response/v3/account.ts @@ -166,6 +166,15 @@ export interface CreateSubAccountResponseV3 { updatedTime: string; } +export interface CreateAgentSubAccountResponseV3 { + username: string; + subUid: string; + apiKey: string; + secret: string; + note: string; + createdTime: string; +} + export interface SubAccountV3 { subUid: string; username: string; @@ -348,3 +357,31 @@ export interface MaxWithdrawalV3 { utaMaxWithdrawal: string; totalMaxWithdrawal: string; } + +export interface MovePositionOrderResultV3 { + orderId: string; + clientOid: string; + code: string; + msg: string; +} + +export interface MovePositionsResponseV3 { + closePosition: MovePositionOrderResultV3[]; + openPosition: MovePositionOrderResultV3[]; +} + +export interface MovePositionHistoryV3 { + category: string; + fromUid: string; + toUid: string; + orderId: string; + openExecId: string; + closeExecId: string; + symbol: string; + posSide: 'long' | 'short'; + qty: string; + price: string; + status: 'processing' | 'completed' | 'failed'; + createdTime: string; + updatedTime: string; +} diff --git a/src/types/response/v3/public.ts b/src/types/response/v3/public.ts index c0d4f2e..67d2c2b 100644 --- a/src/types/response/v3/public.ts +++ b/src/types/response/v3/public.ts @@ -141,6 +141,7 @@ export interface InstrumentV3 { maintainTime: string; areaSymbol?: string; + isRwa?: 'YES' | 'NO'; /** yes = Reality stock token, no = non-Reality stock token */ isReality?: 'yes' | 'no'; @@ -150,7 +151,8 @@ export interface InstrumentV3 { openCostUpRatio?: string; priceMultiplier?: string; quantityMultiplier?: string; - symbolType?: 'perpetual' | 'delivery'; + type?: 'perpetual' | 'delivery'; + symbolType?: 'crypto' | 'metal' | 'stock' | 'commodity'; maxPositionNum?: string; deliveryTime?: string; deliveryStartTime?: string; @@ -219,6 +221,21 @@ export interface OrderBookV3 { ts: string; } +export interface RealityOrderBookV3 { + symbol: string; + a: string[][]; + b: string[][]; + ts: string; +} + +export interface RealityFillV3 { + execId: string; + price: string; + size: string; + side: 'buy' | 'sell'; + ts: string; +} + export interface TickerV3 { category: 'SPOT' | 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES'; symbol: string;