-
-
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 #34 from JJ-Cro/Update151024
feat(): added new endpoints, added examples, updated types
- Loading branch information
Showing
274 changed files
with
5,402 additions
and
272 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -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); | ||
}); |
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 |
---|---|---|
@@ -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); | ||
}); |
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 |
---|---|---|
@@ -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); | ||
}); |
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 |
---|---|---|
@@ -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); | ||
}); |
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 |
---|---|---|
@@ -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); | ||
}); |
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 |
---|---|---|
@@ -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); | ||
}); |
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 |
---|---|---|
@@ -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); | ||
}); |
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 |
---|---|---|
@@ -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); | ||
}); |
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 |
---|---|---|
@@ -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); | ||
}); |
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 |
---|---|---|
@@ -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); | ||
}); |
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 |
---|---|---|
@@ -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); | ||
}); |
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 |
---|---|---|
@@ -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); | ||
}); |
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 |
---|---|---|
@@ -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
19
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 |
---|---|---|
@@ -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); | ||
}); |
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 |
---|---|---|
@@ -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); | ||
}); |
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 |
---|---|---|
@@ -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); | ||
}); |
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 |
---|---|---|
@@ -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); | ||
}); |
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 |
---|---|---|
@@ -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
19
examples/apidoc/RestClient/cancelTriggeredDeliveryOrder.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 |
---|---|---|
@@ -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); | ||
}); |
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 |
---|---|---|
@@ -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); | ||
}); |
Oops, something went wrong.