Skip to content

Commit

Permalink
Merge pull request #34 from JJ-Cro/Update151024
Browse files Browse the repository at this point in the history
feat(): added new endpoints, added examples, updated types
  • Loading branch information
tiagosiebler authored Oct 15, 2024
2 parents e2f9521 + 2e194e9 commit 0a548f4
Show file tree
Hide file tree
Showing 274 changed files with 5,402 additions and 272 deletions.
538 changes: 269 additions & 269 deletions docs/endpointFunctionList.md

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions examples/apidoc/RestClient/addUsersToStpGroup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const { RestClient } = require('gateio-api');

// ENDPOINT: /account/stp_groups/{stp_id}/users
// METHOD: POST
// PUBLIC: NO
// Link to function: https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3844

const client = new RestClient({
apiKey: 'insert_api_key_here',
apiSecret: 'insert_api_secret_here',
});

client.addUsersToStpGroup(params)
.then(response => {
console.log(response);
})
.catch(error => {
console.error(error);
});
19 changes: 19 additions & 0 deletions examples/apidoc/RestClient/batchCancelFuturesOrders.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const { RestClient } = require('gateio-api');

// ENDPOINT: /futures/{settle}/batch_cancel_orders
// METHOD: POST
// PUBLIC: NO
// Link to function: https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2480

const client = new RestClient({
apiKey: 'insert_api_key_here',
apiSecret: 'insert_api_secret_here',
});

client.batchCancelFuturesOrders(params)
.then(response => {
console.log(response);
})
.catch(error => {
console.error(error);
});
19 changes: 19 additions & 0 deletions examples/apidoc/RestClient/batchCancelSpotOrders.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const { RestClient } = require('gateio-api');

// ENDPOINT: /spot/cancel_batch_orders
// METHOD: POST
// PUBLIC: NO
// Link to function: https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1225

const client = new RestClient({
apiKey: 'insert_api_key_here',
apiSecret: 'insert_api_secret_here',
});

client.batchCancelSpotOrders(params)
.then(response => {
console.log(response);
})
.catch(error => {
console.error(error);
});
19 changes: 19 additions & 0 deletions examples/apidoc/RestClient/batchUpdateFuturesOrders.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const { RestClient } = require('gateio-api');

// ENDPOINT: /futures/{settle}/batch_amend_orders
// METHOD: POST
// PUBLIC: NO
// Link to function: https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2499

const client = new RestClient({
apiKey: 'insert_api_key_here',
apiSecret: 'insert_api_secret_here',
});

client.batchUpdateFuturesOrders(params)
.then(response => {
console.log(response);
})
.catch(error => {
console.error(error);
});
19 changes: 19 additions & 0 deletions examples/apidoc/RestClient/batchUpdateSpotOrders.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const { RestClient } = require('gateio-api');

// ENDPOINT: /spot/amend_batch_orders
// METHOD: POST
// PUBLIC: NO
// Link to function: https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1339

const client = new RestClient({
apiKey: 'insert_api_key_here',
apiSecret: 'insert_api_secret_here',
});

client.batchUpdateSpotOrders(params)
.then(response => {
console.log(response);
})
.catch(error => {
console.error(error);
});
19 changes: 19 additions & 0 deletions examples/apidoc/RestClient/cancelAllDeliveryOrders.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const { RestClient } = require('gateio-api');

// ENDPOINT: /delivery/{settle}/orders
// METHOD: DELETE
// PUBLIC: NO
// Link to function: https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2822

const client = new RestClient({
apiKey: 'insert_api_key_here',
apiSecret: 'insert_api_secret_here',
});

client.cancelAllDeliveryOrders(params)
.then(response => {
console.log(response);
})
.catch(error => {
console.error(error);
});
19 changes: 19 additions & 0 deletions examples/apidoc/RestClient/cancelAllFuturesOrders.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const { RestClient } = require('gateio-api');

// ENDPOINT: /futures/{settle}/orders
// METHOD: DELETE
// PUBLIC: NO
// Link to function: https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2276

const client = new RestClient({
apiKey: 'insert_api_key_here',
apiSecret: 'insert_api_secret_here',
});

client.cancelAllFuturesOrders(params)
.then(response => {
console.log(response);
})
.catch(error => {
console.error(error);
});
19 changes: 19 additions & 0 deletions examples/apidoc/RestClient/cancelAllOpenDeliveryOrders.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const { RestClient } = require('gateio-api');

// ENDPOINT: /delivery/{settle}/price_orders
// METHOD: DELETE
// PUBLIC: NO
// Link to function: https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2951

const client = new RestClient({
apiKey: 'insert_api_key_here',
apiSecret: 'insert_api_secret_here',
});

client.cancelAllOpenDeliveryOrders(params)
.then(response => {
console.log(response);
})
.catch(error => {
console.error(error);
});
19 changes: 19 additions & 0 deletions examples/apidoc/RestClient/cancelAllOpenFuturesOrders.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const { RestClient } = require('gateio-api');

// ENDPOINT: /futures/{settle}/price_orders
// METHOD: DELETE
// PUBLIC: NO
// Link to function: https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2540

const client = new RestClient({
apiKey: 'insert_api_key_here',
apiSecret: 'insert_api_secret_here',
});

client.cancelAllOpenFuturesOrders(params)
.then(response => {
console.log(response);
})
.catch(error => {
console.error(error);
});
19 changes: 19 additions & 0 deletions examples/apidoc/RestClient/cancelAllOpenOptionsOrders.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const { RestClient } = require('gateio-api');

// ENDPOINT: /options/orders
// METHOD: DELETE
// PUBLIC: NO
// Link to function: https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3239

const client = new RestClient({
apiKey: 'insert_api_key_here',
apiSecret: 'insert_api_secret_here',
});

client.cancelAllOpenOptionsOrders(params)
.then(response => {
console.log(response);
})
.catch(error => {
console.error(error);
});
19 changes: 19 additions & 0 deletions examples/apidoc/RestClient/cancelAllOpenSpotOrders.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const { RestClient } = require('gateio-api');

// ENDPOINT: /spot/price_orders
// METHOD: DELETE
// PUBLIC: NO
// Link to function: https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1377

const client = new RestClient({
apiKey: 'insert_api_key_here',
apiSecret: 'insert_api_secret_here',
});

client.cancelAllOpenSpotOrders(params)
.then(response => {
console.log(response);
})
.catch(error => {
console.error(error);
});
19 changes: 19 additions & 0 deletions examples/apidoc/RestClient/cancelDeliveryOrder.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const { RestClient } = require('gateio-api');

// ENDPOINT: /delivery/{settle}/orders/{order_id}
// METHOD: DELETE
// PUBLIC: NO
// Link to function: https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2856

const client = new RestClient({
apiKey: 'insert_api_key_here',
apiSecret: 'insert_api_secret_here',
});

client.cancelDeliveryOrder(params)
.then(response => {
console.log(response);
})
.catch(error => {
console.error(error);
});
19 changes: 19 additions & 0 deletions examples/apidoc/RestClient/cancelFuturesOrder.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const { RestClient } = require('gateio-api');

// ENDPOINT: /futures/{settle}/orders/{order_id}
// METHOD: DELETE
// PUBLIC: NO
// Link to function: https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2346

const client = new RestClient({
apiKey: 'insert_api_key_here',
apiSecret: 'insert_api_secret_here',
});

client.cancelFuturesOrder(params)
.then(response => {
console.log(response);
})
.catch(error => {
console.error(error);
});
19 changes: 19 additions & 0 deletions examples/apidoc/RestClient/cancelFuturesPriceTriggeredOrder.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const { RestClient } = require('gateio-api');

// ENDPOINT: /futures/{settle}/price_orders/{order_id}
// METHOD: DELETE
// PUBLIC: NO
// Link to function: https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2571

const client = new RestClient({
apiKey: 'insert_api_key_here',
apiSecret: 'insert_api_secret_here',
});

client.cancelFuturesPriceTriggeredOrder(params)
.then(response => {
console.log(response);
})
.catch(error => {
console.error(error);
});
19 changes: 19 additions & 0 deletions examples/apidoc/RestClient/cancelOptionsOrder.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const { RestClient } = require('gateio-api');

// ENDPOINT: /options/orders/{order_id}
// METHOD: DELETE
// PUBLIC: NO
// Link to function: https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3265

const client = new RestClient({
apiKey: 'insert_api_key_here',
apiSecret: 'insert_api_secret_here',
});

client.cancelOptionsOrder(params)
.then(response => {
console.log(response);
})
.catch(error => {
console.error(error);
});
19 changes: 19 additions & 0 deletions examples/apidoc/RestClient/cancelSpotOpenOrders.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const { RestClient } = require('gateio-api');

// ENDPOINT: /spot/orders
// METHOD: DELETE
// PUBLIC: NO
// Link to function: https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1208

const client = new RestClient({
apiKey: 'insert_api_key_here',
apiSecret: 'insert_api_secret_here',
});

client.cancelSpotOpenOrders(params)
.then(response => {
console.log(response);
})
.catch(error => {
console.error(error);
});
19 changes: 19 additions & 0 deletions examples/apidoc/RestClient/cancelSpotOrder.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const { RestClient } = require('gateio-api');

// ENDPOINT: /spot/orders/{order_id}
// METHOD: DELETE
// PUBLIC: NO
// Link to function: https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1276

const client = new RestClient({
apiKey: 'insert_api_key_here',
apiSecret: 'insert_api_secret_here',
});

client.cancelSpotOrder(params)
.then(response => {
console.log(response);
})
.catch(error => {
console.error(error);
});
19 changes: 19 additions & 0 deletions examples/apidoc/RestClient/cancelSpotTriggeredOrder.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const { RestClient } = require('gateio-api');

// ENDPOINT: /spot/price_orders/{order_id}
// METHOD: DELETE
// PUBLIC: NO
// Link to function: https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1402

const client = new RestClient({
apiKey: 'insert_api_key_here',
apiSecret: 'insert_api_secret_here',
});

client.cancelSpotTriggeredOrder(params)
.then(response => {
console.log(response);
})
.catch(error => {
console.error(error);
});
19 changes: 19 additions & 0 deletions examples/apidoc/RestClient/cancelTriggeredDeliveryOrder.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const { RestClient } = require('gateio-api');

// ENDPOINT: /delivery/{settle}/price_orders/{order_id}
// METHOD: DELETE
// PUBLIC: NO
// Link to function: https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2982

const client = new RestClient({
apiKey: 'insert_api_key_here',
apiSecret: 'insert_api_secret_here',
});

client.cancelTriggeredDeliveryOrder(params)
.then(response => {
console.log(response);
})
.catch(error => {
console.error(error);
});
19 changes: 19 additions & 0 deletions examples/apidoc/RestClient/cancelWithdrawal.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const { RestClient } = require('gateio-api');

// ENDPOINT: /withdrawals/{withdrawal_id}
// METHOD: DELETE
// PUBLIC: NO
// Link to function: https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L382

const client = new RestClient({
apiKey: 'insert_api_key_here',
apiSecret: 'insert_api_secret_here',
});

client.cancelWithdrawal(params)
.then(response => {
console.log(response);
})
.catch(error => {
console.error(error);
});
Loading

0 comments on commit 0a548f4

Please sign in to comment.