Skip to content

Commit 243a071

Browse files
committed
feat(v3.0.10): bump version to 3.0.10, add new broker and futures endpoints, and update request/response types
1 parent dfde48b commit 243a071

18 files changed

+831
-352
lines changed

docs/endpointFunctionList.md

Lines changed: 356 additions & 349 deletions
Large diffs are not rendered by default.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import { RestClientV2 } from 'bitget-api';
2+
// or if you want to use the require syntax
3+
// const { RestClientV2 } = require('bitget-api');
4+
5+
6+
// 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
7+
// This Bitget API SDK is available on npm via "npm install bitget-api"
8+
// ENDPOINT: /api/v2/broker/order-commission
9+
// METHOD: GET
10+
// PUBLIC: NO
11+
12+
const client = new RestClientV2({
13+
apiKey: 'insert_api_key_here',
14+
apiSecret: 'insert_api_secret_here',
15+
apiPass: 'insert_api_pass_here',
16+
});
17+
18+
client.getBrokerOrderCommission(params)
19+
.then((response) => {
20+
console.log(response);
21+
})
22+
.catch((error) => {
23+
console.error(error);
24+
});
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import { RestClientV2 } from 'bitget-api';
2+
// or if you want to use the require syntax
3+
// const { RestClientV2 } = require('bitget-api');
4+
5+
6+
// 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
7+
// This Bitget API SDK is available on npm via "npm install bitget-api"
8+
// ENDPOINT: /api/v2/broker/rebate-info
9+
// METHOD: GET
10+
// PUBLIC: NO
11+
12+
const client = new RestClientV2({
13+
apiKey: 'insert_api_key_here',
14+
apiSecret: 'insert_api_secret_here',
15+
apiPass: 'insert_api_pass_here',
16+
});
17+
18+
client.getBrokerRebateInfo(params)
19+
.then((response) => {
20+
console.log(response);
21+
})
22+
.catch((error) => {
23+
console.error(error);
24+
});
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import { RestClientV2 } from 'bitget-api';
2+
// or if you want to use the require syntax
3+
// const { RestClientV2 } = require('bitget-api');
4+
5+
6+
// 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
7+
// This Bitget API SDK is available on npm via "npm install bitget-api"
8+
// ENDPOINT: /api/v2/broker/total-commission
9+
// METHOD: GET
10+
// PUBLIC: NO
11+
12+
const client = new RestClientV2({
13+
apiKey: 'insert_api_key_here',
14+
apiSecret: 'insert_api_secret_here',
15+
apiPass: 'insert_api_pass_here',
16+
});
17+
18+
client.getBrokerTotalCommission(params)
19+
.then((response) => {
20+
console.log(response);
21+
})
22+
.catch((error) => {
23+
console.error(error);
24+
});
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import { RestClientV2 } from 'bitget-api';
2+
// or if you want to use the require syntax
3+
// const { RestClientV2 } = require('bitget-api');
4+
5+
6+
// 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
7+
// This Bitget API SDK is available on npm via "npm install bitget-api"
8+
// ENDPOINT: /api/v2/mix/account/isolated-symbols
9+
// METHOD: GET
10+
// PUBLIC: NO
11+
12+
const client = new RestClientV2({
13+
apiKey: 'insert_api_key_here',
14+
apiSecret: 'insert_api_secret_here',
15+
apiPass: 'insert_api_pass_here',
16+
});
17+
18+
client.getFuturesIsolatedSymbols(params)
19+
.then((response) => {
20+
console.log(response);
21+
})
22+
.catch((error) => {
23+
console.error(error);
24+
});
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import { RestClientV2 } from 'bitget-api';
2+
// or if you want to use the require syntax
3+
// const { RestClientV2 } = require('bitget-api');
4+
5+
6+
// 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
7+
// This Bitget API SDK is available on npm via "npm install bitget-api"
8+
// ENDPOINT: /api/v2/mix/account/liq-price
9+
// METHOD: GET
10+
// PUBLIC: NO
11+
12+
const client = new RestClientV2({
13+
apiKey: 'insert_api_key_here',
14+
apiSecret: 'insert_api_secret_here',
15+
apiPass: 'insert_api_pass_here',
16+
});
17+
18+
client.getFuturesLiquidationPrice(params)
19+
.then((response) => {
20+
console.log(response);
21+
})
22+
.catch((error) => {
23+
console.error(error);
24+
});
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import { RestClientV2 } from 'bitget-api';
2+
// or if you want to use the require syntax
3+
// const { RestClientV2 } = require('bitget-api');
4+
5+
6+
// 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
7+
// This Bitget API SDK is available on npm via "npm install bitget-api"
8+
// ENDPOINT: /api/v2/mix/account/max-open
9+
// METHOD: GET
10+
// PUBLIC: NO
11+
12+
const client = new RestClientV2({
13+
apiKey: 'insert_api_key_here',
14+
apiSecret: 'insert_api_secret_here',
15+
apiPass: 'insert_api_pass_here',
16+
});
17+
18+
client.getFuturesMaxOpenableQuantity(params)
19+
.then((response) => {
20+
console.log(response);
21+
})
22+
.catch((error) => {
23+
console.error(error);
24+
});
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import { RestClientV3 } from 'bitget-api';
2+
// or if you want to use the require syntax
3+
// const { RestClientV3 } = require('bitget-api');
4+
5+
6+
// 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
7+
// This Bitget API SDK is available on npm via "npm install bitget-api"
8+
// ENDPOINT: /api/v3/account/max-transferable
9+
// METHOD: GET
10+
// PUBLIC: NO
11+
12+
const client = new RestClientV3({
13+
apiKey: 'insert_api_key_here',
14+
apiSecret: 'insert_api_secret_here',
15+
apiPass: 'insert_api_pass_here',
16+
});
17+
18+
client.getMaxTransferable(params)
19+
.then((response) => {
20+
console.log(response);
21+
})
22+
.catch((error) => {
23+
console.error(error);
24+
});

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "bitget-api",
3-
"version": "3.0.9",
3+
"version": "3.0.10",
44
"description": "Complete Node.js & JavaScript SDK for Bitget V1-V3 REST APIs & WebSockets, with TypeScript & end-to-end tests.",
55
"scripts": {
66
"test": "jest",

0 commit comments

Comments
 (0)