feat(v2.3.5): added missing affiliate endpoints in broker client, updated examples and endpoint map
This commit is contained in:
22
examples/apidoc/RestClientV2/earnRedeemSavings.js
Normal file
22
examples/apidoc/RestClientV2/earnRedeemSavings.js
Normal file
@@ -0,0 +1,22 @@
|
||||
const { RestClientV2 } = 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/v2/earn/savings/redeem
|
||||
// METHOD: POST
|
||||
// PUBLIC: NO
|
||||
|
||||
const client = new RestClientV2({
|
||||
apiKey: 'insert_api_key_here',
|
||||
apiSecret: 'insert_api_secret_here',
|
||||
apiPass: 'insert_api_pass_here',
|
||||
});
|
||||
|
||||
client.earnRedeemSavings(params)
|
||||
.then((response) => {
|
||||
console.log(response);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
22
examples/apidoc/RestClientV2/getFuturesDiscountRate.js
Normal file
22
examples/apidoc/RestClientV2/getFuturesDiscountRate.js
Normal file
@@ -0,0 +1,22 @@
|
||||
const { RestClientV2 } = 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/v2/mix/market/discount-rate
|
||||
// METHOD: GET
|
||||
// PUBLIC: YES
|
||||
|
||||
const client = new RestClientV2({
|
||||
apiKey: 'insert_api_key_here',
|
||||
apiSecret: 'insert_api_secret_here',
|
||||
apiPass: 'insert_api_pass_here',
|
||||
});
|
||||
|
||||
client.getFuturesDiscountRate(params)
|
||||
.then((response) => {
|
||||
console.log(response);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
@@ -0,0 +1,22 @@
|
||||
const { RestClientV2 } = 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/v2/mix/market/exchange-rate
|
||||
// METHOD: GET
|
||||
// PUBLIC: YES
|
||||
|
||||
const client = new RestClientV2({
|
||||
apiKey: 'insert_api_key_here',
|
||||
apiSecret: 'insert_api_secret_here',
|
||||
apiPass: 'insert_api_pass_here',
|
||||
});
|
||||
|
||||
client.getFuturesInterestExchangeRate(params)
|
||||
.then((response) => {
|
||||
console.log(response);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
22
examples/apidoc/RestClientV2/getFuturesInterestHistory.js
Normal file
22
examples/apidoc/RestClientV2/getFuturesInterestHistory.js
Normal file
@@ -0,0 +1,22 @@
|
||||
const { RestClientV2 } = 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/v2/mix/account/interest-history
|
||||
// METHOD: GET
|
||||
// PUBLIC: NO
|
||||
|
||||
const client = new RestClientV2({
|
||||
apiKey: 'insert_api_key_here',
|
||||
apiSecret: 'insert_api_secret_here',
|
||||
apiPass: 'insert_api_pass_here',
|
||||
});
|
||||
|
||||
client.getFuturesInterestHistory(params)
|
||||
.then((response) => {
|
||||
console.log(response);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
@@ -0,0 +1,22 @@
|
||||
const { RestClientV2 } = 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/v2/mix/market/union-interest-rate-history
|
||||
// METHOD: GET
|
||||
// PUBLIC: YES
|
||||
|
||||
const client = new RestClientV2({
|
||||
apiKey: 'insert_api_key_here',
|
||||
apiSecret: 'insert_api_secret_here',
|
||||
apiPass: 'insert_api_pass_here',
|
||||
});
|
||||
|
||||
client.getFuturesInterestRateHistory(params)
|
||||
.then((response) => {
|
||||
console.log(response);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
@@ -4,7 +4,7 @@ const { RestClientV2 } = 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/v2/mix/order/plan-sub-order
|
||||
// METHOD: POST
|
||||
// METHOD: GET
|
||||
// PUBLIC: NO
|
||||
|
||||
const client = new RestClientV2({
|
||||
@@ -13,7 +13,7 @@ const client = new RestClientV2({
|
||||
apiPass: 'insert_api_pass_here',
|
||||
});
|
||||
|
||||
client.futuresSubmitPlanSubOrder(params)
|
||||
client.getFuturesTriggerSubOrder(params)
|
||||
.then((response) => {
|
||||
console.log(response);
|
||||
})
|
||||
22
examples/apidoc/RestClientV2/setFuturesAssetMode.js
Normal file
22
examples/apidoc/RestClientV2/setFuturesAssetMode.js
Normal file
@@ -0,0 +1,22 @@
|
||||
const { RestClientV2 } = 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/v2/mix/account/set-asset-mode
|
||||
// METHOD: POST
|
||||
// PUBLIC: NO
|
||||
|
||||
const client = new RestClientV2({
|
||||
apiKey: 'insert_api_key_here',
|
||||
apiSecret: 'insert_api_secret_here',
|
||||
apiPass: 'insert_api_pass_here',
|
||||
});
|
||||
|
||||
client.setFuturesAssetMode(params)
|
||||
.then((response) => {
|
||||
console.log(response);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
@@ -0,0 +1,22 @@
|
||||
const { RestClientV2 } = 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/v2/spot/trade/batch-cancel-replace-order
|
||||
// METHOD: POST
|
||||
// PUBLIC: NO
|
||||
|
||||
const client = new RestClientV2({
|
||||
apiKey: 'insert_api_key_here',
|
||||
apiSecret: 'insert_api_secret_here',
|
||||
apiPass: 'insert_api_pass_here',
|
||||
});
|
||||
|
||||
client.spotBatchCancelandSubmitOrder(params)
|
||||
.then((response) => {
|
||||
console.log(response);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
22
examples/apidoc/RestClientV2/spotCancelandSubmitOrder.js
Normal file
22
examples/apidoc/RestClientV2/spotCancelandSubmitOrder.js
Normal file
@@ -0,0 +1,22 @@
|
||||
const { RestClientV2 } = 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/v2/spot/trade/cancel-replace-order
|
||||
// METHOD: POST
|
||||
// PUBLIC: NO
|
||||
|
||||
const client = new RestClientV2({
|
||||
apiKey: 'insert_api_key_here',
|
||||
apiSecret: 'insert_api_secret_here',
|
||||
apiPass: 'insert_api_pass_here',
|
||||
});
|
||||
|
||||
client.spotCancelandSubmitOrder(params)
|
||||
.then((response) => {
|
||||
console.log(response);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
Reference in New Issue
Block a user