forked from tiagosiebler/gateio-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- added 4 new endpoints(Unified leverage, loan) - updated request and response parameters
- Loading branch information
Showing
12 changed files
with
449 additions
and
279 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
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,20 @@ | ||
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: /loan/multi_collateral/current_rate | ||
// METHOD: GET | ||
// PUBLIC: YES | ||
|
||
const client = new RestClient({ | ||
apiKey: 'insert_api_key_here', | ||
apiSecret: 'insert_api_secret_here', | ||
}); | ||
|
||
client.getMultiLoanCurrentRates(params) | ||
.then((response) => { | ||
console.log(response); | ||
}) | ||
.catch((error) => { | ||
console.error(error); | ||
}); |
20 changes: 20 additions & 0 deletions
20
examples/apidoc/RestClient/getUserCurrencyLeverageConfig.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,20 @@ | ||
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: /unified/leverage/user_currency_config | ||
// METHOD: GET | ||
// PUBLIC: NO | ||
|
||
const client = new RestClient({ | ||
apiKey: 'insert_api_key_here', | ||
apiSecret: 'insert_api_secret_here', | ||
}); | ||
|
||
client.getUserCurrencyLeverageConfig(params) | ||
.then((response) => { | ||
console.log(response); | ||
}) | ||
.catch((error) => { | ||
console.error(error); | ||
}); |
20 changes: 20 additions & 0 deletions
20
examples/apidoc/RestClient/getUserCurrencyLeverageSettings.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,20 @@ | ||
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: /unified/leverage/user_currency_setting | ||
// METHOD: GET | ||
// PUBLIC: NO | ||
|
||
const client = new RestClient({ | ||
apiKey: 'insert_api_key_here', | ||
apiSecret: 'insert_api_secret_here', | ||
}); | ||
|
||
client.getUserCurrencyLeverageSettings(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,20 @@ | ||
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: /unified/leverage/user_currency_setting | ||
// METHOD: POST | ||
// PUBLIC: NO | ||
|
||
const client = new RestClient({ | ||
apiKey: 'insert_api_key_here', | ||
apiSecret: 'insert_api_secret_here', | ||
}); | ||
|
||
client.updateUserCurrencyLeverage(params) | ||
.then((response) => { | ||
console.log(response); | ||
}) | ||
.catch((error) => { | ||
console.error(error); | ||
}); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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
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
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
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