Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
479 changes: 265 additions & 214 deletions docs/endpointFunctionList.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ client
.getFeeRate({
category: 'SPOT',
symbol: 'BTCUSDT',
rpiFlag: 'no',
})
.then((response) => {
console.log(response);
Expand Down
18 changes: 18 additions & 0 deletions examples/apidoc/RestClientV3/Account/get-eligible-discount-rate.js
Original file line number Diff line number Diff line change
@@ -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
.getEligibleDiscountRate()
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
Original file line number Diff line number Diff line change
@@ -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
.getFundingFinancialRecords({
coin: 'BTC',
})
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ client
symbol: 'BTCUSDT',
orderType: 'market',
side: 'sell',
autoBorrow: 'no',
})
.then((response) => {
console.log(response);
Expand Down
18 changes: 18 additions & 0 deletions examples/apidoc/RestClientV3/Account/get-small-assets-history.js
Original file line number Diff line number Diff line change
@@ -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
.getSmallAssetsHistory()
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
18 changes: 18 additions & 0 deletions examples/apidoc/RestClientV3/Account/get-small-assets.js
Original file line number Diff line number Diff line change
@@ -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
.getSmallAssets()
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
20 changes: 20 additions & 0 deletions examples/apidoc/RestClientV3/Account/small-assets-trade.js
Original file line number Diff line number Diff line change
@@ -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
.tradeSmallAssets({
fromCoinList: ['DOGE'],
})
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
18 changes: 18 additions & 0 deletions examples/apidoc/RestClientV3/CFD/Account/get-financial-records.js
Original file line number Diff line number Diff line change
@@ -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
.getCfdFinancialRecords()
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
18 changes: 18 additions & 0 deletions examples/apidoc/RestClientV3/CFD/Account/get-fund-detail.js
Original file line number Diff line number Diff line change
@@ -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
.getCfdFundDetail()
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
20 changes: 20 additions & 0 deletions examples/apidoc/RestClientV3/CFD/Account/get-instruments.js
Original file line number Diff line number Diff line change
@@ -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
.getCfdInstruments({
symbol: 'XAUUSD',
})
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
18 changes: 18 additions & 0 deletions examples/apidoc/RestClientV3/CFD/Account/get-transfer-records.js
Original file line number Diff line number Diff line change
@@ -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
.getCfdTransferRecords()
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
23 changes: 23 additions & 0 deletions examples/apidoc/RestClientV3/CFD/Account/transfer.js
Original file line number Diff line number Diff line change
@@ -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
.cfdTransfer({
coin: 'USDT',
amount: '100',
accountType: 'uta',
direction: 'in',
})
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
Original file line number Diff line number Diff line change
@@ -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
.getCfdHistoryCandlestick({
symbol: 'XAUUSD',
interval: '1m',
})
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
20 changes: 20 additions & 0 deletions examples/apidoc/RestClientV3/CFD/Market/get-tickers.js
Original file line number Diff line number Diff line change
@@ -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
.getCfdTickers({
symbol: 'XAUUSD',
})
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
20 changes: 20 additions & 0 deletions examples/apidoc/RestClientV3/CFD/Trade/cancel-all-cfd-orders.js
Original file line number Diff line number Diff line change
@@ -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
.cancelAllCfdOrders({
symbol: 'XAUUSD',
})
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
20 changes: 20 additions & 0 deletions examples/apidoc/RestClientV3/CFD/Trade/cancel-cfd-order.js
Original file line number Diff line number Diff line change
@@ -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
.cancelCfdOrder({
orderId: '111111111111111111',
})
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
20 changes: 20 additions & 0 deletions examples/apidoc/RestClientV3/CFD/Trade/close-all-cfd-positions.js
Original file line number Diff line number Diff line change
@@ -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
.closeAllCfdPositions({
symbol: 'XAUUSD',
})
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
21 changes: 21 additions & 0 deletions examples/apidoc/RestClientV3/CFD/Trade/close-cfd-positions.js
Original file line number Diff line number Diff line change
@@ -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
.closeCfdPositions({
positionId: '111111111111111111',
qty: '1',
})
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
Original file line number Diff line number Diff line change
@@ -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
.getCfdCurrentPositions()
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
20 changes: 20 additions & 0 deletions examples/apidoc/RestClientV3/CFD/Trade/get-cfd-order-history.js
Original file line number Diff line number Diff line change
@@ -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
.getCfdOrderHistory({
symbol: 'XAUUSD',
})
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
Loading
Loading