Skip to content

Commit bb2f4b4

Browse files
committed
feat(v1.2.10): add new futures endpoints and update request/response types
1 parent 76ee1ef commit bb2f4b4

File tree

15 files changed

+4540
-4309
lines changed

15 files changed

+4540
-4309
lines changed

docs/endpointFunctionList.md

Lines changed: 293 additions & 290 deletions
Large diffs are not rendered by default.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
const { RestClient } = require('gateio-api');
2+
3+
// This example shows how to call this Gate.io API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "gateio-api" for Gate.io exchange
4+
// This Gate.io API SDK is available on npm via "npm install gateio-api"
5+
// ENDPOINT: /futures/{settle}/insurance
6+
// METHOD: GET
7+
// PUBLIC: NO
8+
9+
const client = new RestClient({
10+
apiKey: 'insert_api_key_here',
11+
apiSecret: 'insert_api_secret_here',
12+
});
13+
14+
client.getFuturesInsuranceHistory(params)
15+
.then((response) => {
16+
console.log(response);
17+
})
18+
.catch((error) => {
19+
console.error(error);
20+
});
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
const { RestClient } = require('gateio-api');
2+
3+
// This example shows how to call this Gate.io API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "gateio-api" for Gate.io exchange
4+
// This Gate.io API SDK is available on npm via "npm install gateio-api"
5+
// ENDPOINT: /futures/{settle}/position_close_history
6+
// METHOD: GET
7+
// PUBLIC: NO
8+
9+
const client = new RestClient({
10+
apiKey: 'insert_api_key_here',
11+
apiSecret: 'insert_api_secret_here',
12+
});
13+
14+
client.getFuturesPositionCloseHistory(params)
15+
.then((response) => {
16+
console.log(response);
17+
})
18+
.catch((error) => {
19+
console.error(error);
20+
});
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
const { RestClient } = require('gateio-api');
2+
3+
// This example shows how to call this Gate.io API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "gateio-api" for Gate.io exchange
4+
// This Gate.io API SDK is available on npm via "npm install gateio-api"
5+
// ENDPOINT: /unified/loans/repay
6+
// METHOD: POST
7+
// PUBLIC: NO
8+
9+
const client = new RestClient({
10+
apiKey: 'insert_api_key_here',
11+
apiSecret: 'insert_api_secret_here',
12+
});
13+
14+
client.submitUnifiedLoanRepay(params)
15+
.then((response) => {
16+
console.log(response);
17+
})
18+
.catch((error) => {
19+
console.error(error);
20+
});

0 commit comments

Comments
 (0)