-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from JJ-Cro/Update151024
feat(): updaed readme, examples
- Loading branch information
Showing
274 changed files
with
1,640 additions
and
1,079 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
}); |
8 changes: 5 additions & 3 deletions
8
examples/apidoc/RestClient/cancelFuturesPriceTriggeredOrder.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
}); |
Oops, something went wrong.