Skip to content

Commit

Permalink
Merge pull request #35 from JJ-Cro/Update151024
Browse files Browse the repository at this point in the history
feat(): updaed readme, examples
  • Loading branch information
tiagosiebler authored Oct 16, 2024
2 parents 0a548f4 + 8308352 commit 0ae094a
Show file tree
Hide file tree
Showing 274 changed files with 1,640 additions and 1,079 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ Updated & performant JavaScript & Node.js SDK for the Gate.io REST APIs and WebS

- Issues? Check the [issues tab](https://github.com/tiagosiebler/gateio-api/issues).
- Discuss & collaborate with other node devs? Join our [Node.js Algo Traders](https://t.me/nodetraders) engineering community on telegram.
- Follow our announcement channel for real-time updates on [X/Twitter](https://x.com/QuantSDKs)

<!-- template_related_projects -->

Expand Down
539 changes: 270 additions & 269 deletions docs/endpointFunctionList.md

Large diffs are not rendered by default.

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

// 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
// This Gate.io API SDK is available on npm via "npm install 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
// Link to function: https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3864

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

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

// 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
// This Gate.io API SDK is available on npm via "npm install 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
// Link to function: https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2477

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

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

// 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
// This Gate.io API SDK is available on npm via "npm install 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
// Link to function: https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1226

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

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

// 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
// This Gate.io API SDK is available on npm via "npm install 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
// Link to function: https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2496

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

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

// 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
// This Gate.io API SDK is available on npm via "npm install 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
// Link to function: https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1340

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

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

// 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
// This Gate.io API SDK is available on npm via "npm install 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
// Link to function: https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2819

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

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

// 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
// This Gate.io API SDK is available on npm via "npm install 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
// Link to function: https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2273

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

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

// 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
// This Gate.io API SDK is available on npm via "npm install 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
// Link to function: https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2948

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

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

// 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
// This Gate.io API SDK is available on npm via "npm install 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
// Link to function: https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2537

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

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

// 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
// This Gate.io API SDK is available on npm via "npm install gateio-api"
// ENDPOINT: /options/orders
// METHOD: DELETE
// PUBLIC: NO
// Link to function: https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3239
// Link to function: https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3236

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

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

// 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
// This Gate.io API SDK is available on npm via "npm install 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
// Link to function: https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1378

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

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

// 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
// This Gate.io API SDK is available on npm via "npm install 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
// Link to function: https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2853

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

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

// 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
// This Gate.io API SDK is available on npm via "npm install 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
// Link to function: https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2343

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

client.cancelFuturesOrder(params)
.then(response => {
.then((response) => {
console.log(response);
})
.catch(error => {
.catch((error) => {
console.error(error);
});
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
const { RestClient } = require('gateio-api');

// 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
// This Gate.io API SDK is available on npm via "npm install 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
// Link to function: https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2568

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

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

// 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
// This Gate.io API SDK is available on npm via "npm install 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
// Link to function: https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3262

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

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

0 comments on commit 0ae094a

Please sign in to comment.