Skip to content

Commit 15931f6

Browse files
authored
Merge pull request #65 from JJ-Cro/update280225
feat(v2.3.5): added missing affiliate endpoints to broker client
2 parents 292c8af + b9e33d7 commit 15931f6

13 files changed

+531
-255
lines changed

docs/endpointFunctionList.md

Lines changed: 258 additions & 250 deletions
Large diffs are not rendered by default.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
const { RestClientV2 } = require('bitget-api');
2+
3+
4+
// 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
5+
// This Bitget API SDK is available on npm via "npm install bitget-api"
6+
// ENDPOINT: /api/v2/earn/savings/redeem
7+
// METHOD: POST
8+
// PUBLIC: NO
9+
10+
const client = new RestClientV2({
11+
apiKey: 'insert_api_key_here',
12+
apiSecret: 'insert_api_secret_here',
13+
apiPass: 'insert_api_pass_here',
14+
});
15+
16+
client.earnRedeemSavings(params)
17+
.then((response) => {
18+
console.log(response);
19+
})
20+
.catch((error) => {
21+
console.error(error);
22+
});
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
const { RestClientV2 } = require('bitget-api');
2+
3+
4+
// 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
5+
// This Bitget API SDK is available on npm via "npm install bitget-api"
6+
// ENDPOINT: /api/v2/mix/market/discount-rate
7+
// METHOD: GET
8+
// PUBLIC: YES
9+
10+
const client = new RestClientV2({
11+
apiKey: 'insert_api_key_here',
12+
apiSecret: 'insert_api_secret_here',
13+
apiPass: 'insert_api_pass_here',
14+
});
15+
16+
client.getFuturesDiscountRate(params)
17+
.then((response) => {
18+
console.log(response);
19+
})
20+
.catch((error) => {
21+
console.error(error);
22+
});
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
const { RestClientV2 } = require('bitget-api');
2+
3+
4+
// 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
5+
// This Bitget API SDK is available on npm via "npm install bitget-api"
6+
// ENDPOINT: /api/v2/mix/market/exchange-rate
7+
// METHOD: GET
8+
// PUBLIC: YES
9+
10+
const client = new RestClientV2({
11+
apiKey: 'insert_api_key_here',
12+
apiSecret: 'insert_api_secret_here',
13+
apiPass: 'insert_api_pass_here',
14+
});
15+
16+
client.getFuturesInterestExchangeRate(params)
17+
.then((response) => {
18+
console.log(response);
19+
})
20+
.catch((error) => {
21+
console.error(error);
22+
});
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
const { RestClientV2 } = require('bitget-api');
2+
3+
4+
// 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
5+
// This Bitget API SDK is available on npm via "npm install bitget-api"
6+
// ENDPOINT: /api/v2/mix/account/interest-history
7+
// METHOD: GET
8+
// PUBLIC: NO
9+
10+
const client = new RestClientV2({
11+
apiKey: 'insert_api_key_here',
12+
apiSecret: 'insert_api_secret_here',
13+
apiPass: 'insert_api_pass_here',
14+
});
15+
16+
client.getFuturesInterestHistory(params)
17+
.then((response) => {
18+
console.log(response);
19+
})
20+
.catch((error) => {
21+
console.error(error);
22+
});
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
const { RestClientV2 } = require('bitget-api');
2+
3+
4+
// 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
5+
// This Bitget API SDK is available on npm via "npm install bitget-api"
6+
// ENDPOINT: /api/v2/mix/market/union-interest-rate-history
7+
// METHOD: GET
8+
// PUBLIC: YES
9+
10+
const client = new RestClientV2({
11+
apiKey: 'insert_api_key_here',
12+
apiSecret: 'insert_api_secret_here',
13+
apiPass: 'insert_api_pass_here',
14+
});
15+
16+
client.getFuturesInterestRateHistory(params)
17+
.then((response) => {
18+
console.log(response);
19+
})
20+
.catch((error) => {
21+
console.error(error);
22+
});

examples/apidoc/RestClientV2/futuresSubmitPlanSubOrder.js renamed to examples/apidoc/RestClientV2/getFuturesTriggerSubOrder.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const { RestClientV2 } = require('bitget-api');
44
// 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
55
// This Bitget API SDK is available on npm via "npm install bitget-api"
66
// ENDPOINT: /api/v2/mix/order/plan-sub-order
7-
// METHOD: POST
7+
// METHOD: GET
88
// PUBLIC: NO
99

1010
const client = new RestClientV2({
@@ -13,7 +13,7 @@ const client = new RestClientV2({
1313
apiPass: 'insert_api_pass_here',
1414
});
1515

16-
client.futuresSubmitPlanSubOrder(params)
16+
client.getFuturesTriggerSubOrder(params)
1717
.then((response) => {
1818
console.log(response);
1919
})
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
const { RestClientV2 } = require('bitget-api');
2+
3+
4+
// 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
5+
// This Bitget API SDK is available on npm via "npm install bitget-api"
6+
// ENDPOINT: /api/v2/mix/account/set-asset-mode
7+
// METHOD: POST
8+
// PUBLIC: NO
9+
10+
const client = new RestClientV2({
11+
apiKey: 'insert_api_key_here',
12+
apiSecret: 'insert_api_secret_here',
13+
apiPass: 'insert_api_pass_here',
14+
});
15+
16+
client.setFuturesAssetMode(params)
17+
.then((response) => {
18+
console.log(response);
19+
})
20+
.catch((error) => {
21+
console.error(error);
22+
});
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
const { RestClientV2 } = require('bitget-api');
2+
3+
4+
// 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
5+
// This Bitget API SDK is available on npm via "npm install bitget-api"
6+
// ENDPOINT: /api/v2/spot/trade/batch-cancel-replace-order
7+
// METHOD: POST
8+
// PUBLIC: NO
9+
10+
const client = new RestClientV2({
11+
apiKey: 'insert_api_key_here',
12+
apiSecret: 'insert_api_secret_here',
13+
apiPass: 'insert_api_pass_here',
14+
});
15+
16+
client.spotBatchCancelandSubmitOrder(params)
17+
.then((response) => {
18+
console.log(response);
19+
})
20+
.catch((error) => {
21+
console.error(error);
22+
});
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
const { RestClientV2 } = require('bitget-api');
2+
3+
4+
// 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
5+
// This Bitget API SDK is available on npm via "npm install bitget-api"
6+
// ENDPOINT: /api/v2/spot/trade/cancel-replace-order
7+
// METHOD: POST
8+
// PUBLIC: NO
9+
10+
const client = new RestClientV2({
11+
apiKey: 'insert_api_key_here',
12+
apiSecret: 'insert_api_secret_here',
13+
apiPass: 'insert_api_pass_here',
14+
});
15+
16+
client.spotCancelandSubmitOrder(params)
17+
.then((response) => {
18+
console.log(response);
19+
})
20+
.catch((error) => {
21+
console.error(error);
22+
});

0 commit comments

Comments
 (0)