-
-
Notifications
You must be signed in to change notification settings - Fork 265
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 #464 from JJ-Cro/TestRegex
feat(): added all examples from API docs
- Loading branch information
Showing
580 changed files
with
11,544 additions
and
581 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 { CoinMClient } = require('binance'); | ||
|
||
// ENDPOINT: dapi/v1/allOpenOrders | ||
// METHOD: DELETE | ||
// PUBLIC: NO | ||
// Link to function: https://github.com/tiagosiebler/binance/blob/master/src/coinm-client.ts#L364 | ||
|
||
const client = new CoinMClient({ | ||
apiKey: 'insert_api_key_here', | ||
apiSecret: 'insert_api_secret_here', | ||
}); | ||
|
||
client.cancelAllOpenOrders(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 { CoinMClient } = require('binance'); | ||
|
||
// ENDPOINT: dapi/v1/batchOrders | ||
// METHOD: DELETE | ||
// PUBLIC: NO | ||
// Link to function: https://github.com/tiagosiebler/binance/blob/master/src/coinm-client.ts#L344 | ||
|
||
const client = new CoinMClient({ | ||
apiKey: 'insert_api_key_here', | ||
apiSecret: 'insert_api_secret_here', | ||
}); | ||
|
||
client.cancelMultipleOrders(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 { CoinMClient } = require('binance'); | ||
|
||
// ENDPOINT: dapi/v1/order | ||
// METHOD: DELETE | ||
// PUBLIC: NO | ||
// Link to function: https://github.com/tiagosiebler/binance/blob/master/src/coinm-client.ts#L340 | ||
|
||
const client = new CoinMClient({ | ||
apiKey: 'insert_api_key_here', | ||
apiSecret: 'insert_api_secret_here', | ||
}); | ||
|
||
client.cancelOrder(params) | ||
.then(response => { | ||
console.log(response); | ||
}) | ||
.catch(error => { | ||
console.error(error); | ||
}); |
19 changes: 19 additions & 0 deletions
19
examples/apidoc/CoinMClient/closeFuturesUserDataListenKey.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 { CoinMClient } = require('binance'); | ||
|
||
// ENDPOINT: dapi/v1/listenKey | ||
// METHOD: DELETE | ||
// PUBLIC: YES | ||
// Link to function: https://github.com/tiagosiebler/binance/blob/master/src/coinm-client.ts#L631 | ||
|
||
const client = new CoinMClient({ | ||
apiKey: 'insert_api_key_here', | ||
apiSecret: 'insert_api_secret_here', | ||
}); | ||
|
||
client.closeFuturesUserDataListenKey(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 { CoinMClient } = require('binance'); | ||
|
||
// ENDPOINT: dapi/v1/ticker/24hr | ||
// METHOD: GET | ||
// PUBLIC: YES | ||
// Link to function: https://github.com/tiagosiebler/binance/blob/master/src/coinm-client.ts#L203 | ||
|
||
const client = new CoinMClient({ | ||
apiKey: 'insert_api_key_here', | ||
apiSecret: 'insert_api_secret_here', | ||
}); | ||
|
||
client.get24hrChangeStatistics(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 { CoinMClient } = require('binance'); | ||
|
||
// ENDPOINT: dapi/v1/ticker/24hr | ||
// METHOD: GET | ||
// PUBLIC: YES | ||
// Link to function: https://github.com/tiagosiebler/binance/blob/master/src/coinm-client.ts#L197 | ||
|
||
const client = new CoinMClient({ | ||
apiKey: 'insert_api_key_here', | ||
apiSecret: 'insert_api_secret_here', | ||
}); | ||
|
||
client.get24hrChangeStatististics(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 { CoinMClient } = require('binance'); | ||
|
||
// ENDPOINT: dapi/v1/adlQuantile | ||
// METHOD: GET | ||
// PUBLIC: NO | ||
// Link to function: https://github.com/tiagosiebler/binance/blob/master/src/coinm-client.ts#L419 | ||
|
||
const client = new CoinMClient({ | ||
apiKey: 'insert_api_key_here', | ||
apiSecret: 'insert_api_secret_here', | ||
}); | ||
|
||
client.getADLQuantileEstimation(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 { CoinMClient } = require('binance'); | ||
|
||
// ENDPOINT: dapi/v1/commissionRate | ||
// METHOD: GET | ||
// PUBLIC: NO | ||
// Link to function: https://github.com/tiagosiebler/binance/blob/master/src/coinm-client.ts#L444 | ||
|
||
const client = new CoinMClient({ | ||
apiKey: 'insert_api_key_here', | ||
apiSecret: 'insert_api_secret_here', | ||
}); | ||
|
||
client.getAccountComissionRate(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 { CoinMClient } = require('binance'); | ||
|
||
// ENDPOINT: dapi/v1/account | ||
// METHOD: GET | ||
// PUBLIC: NO | ||
// Link to function: https://github.com/tiagosiebler/binance/blob/master/src/coinm-client.ts#L450 | ||
|
||
const client = new CoinMClient({ | ||
apiKey: 'insert_api_key_here', | ||
apiSecret: 'insert_api_secret_here', | ||
}); | ||
|
||
client.getAccountInformation(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 { CoinMClient } = require('binance'); | ||
|
||
// ENDPOINT: dapi/v1/userTrades | ||
// METHOD: GET | ||
// PUBLIC: NO | ||
// Link to function: https://github.com/tiagosiebler/binance/blob/master/src/coinm-client.ts#L397 | ||
|
||
const client = new CoinMClient({ | ||
apiKey: 'insert_api_key_here', | ||
apiSecret: 'insert_api_secret_here', | ||
}); | ||
|
||
client.getAccountTrades(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 { CoinMClient } = require('binance'); | ||
|
||
// ENDPOINT: dapi/v1/aggTrades | ||
// METHOD: GET | ||
// PUBLIC: YES | ||
// Link to function: https://github.com/tiagosiebler/binance/blob/master/src/coinm-client.ts#L147 | ||
|
||
const client = new CoinMClient({ | ||
apiKey: 'insert_api_key_here', | ||
apiSecret: 'insert_api_secret_here', | ||
}); | ||
|
||
client.getAggregateTrades(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 { CoinMClient } = require('binance'); | ||
|
||
// ENDPOINT: dapi/v1/openOrders | ||
// METHOD: GET | ||
// PUBLIC: NO | ||
// Link to function: https://github.com/tiagosiebler/binance/blob/master/src/coinm-client.ts#L385 | ||
|
||
const client = new CoinMClient({ | ||
apiKey: 'insert_api_key_here', | ||
apiSecret: 'insert_api_secret_here', | ||
}); | ||
|
||
client.getAllOpenOrders(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 { CoinMClient } = require('binance'); | ||
|
||
// ENDPOINT: dapi/v1/allOrders | ||
// METHOD: GET | ||
// PUBLIC: NO | ||
// Link to function: https://github.com/tiagosiebler/binance/blob/master/src/coinm-client.ts#L381 | ||
|
||
const client = new CoinMClient({ | ||
apiKey: 'insert_api_key_here', | ||
apiSecret: 'insert_api_secret_here', | ||
}); | ||
|
||
client.getAllOrders(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 { CoinMClient } = require('binance'); | ||
|
||
// ENDPOINT: dapi/v1/balance | ||
// METHOD: GET | ||
// PUBLIC: NO | ||
// Link to function: https://github.com/tiagosiebler/binance/blob/master/src/coinm-client.ts#L440 | ||
|
||
const client = new CoinMClient({ | ||
apiKey: 'insert_api_key_here', | ||
apiSecret: 'insert_api_secret_here', | ||
}); | ||
|
||
client.getBalance(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 { CoinMClient } = require('binance'); | ||
|
||
// ENDPOINT: dapi/v1/apiReferral/customization | ||
// METHOD: GET | ||
// PUBLIC: NO | ||
// Link to function: https://github.com/tiagosiebler/binance/blob/master/src/coinm-client.ts#L534 | ||
|
||
const client = new CoinMClient({ | ||
apiKey: 'insert_api_key_here', | ||
apiSecret: 'insert_api_secret_here', | ||
}); | ||
|
||
client.getBrokerClientCustomIds(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 { CoinMClient } = require('binance'); | ||
|
||
// ENDPOINT: dapi/v1/apiReferral/ifNewUser | ||
// METHOD: GET | ||
// PUBLIC: NO | ||
// Link to function: https://github.com/tiagosiebler/binance/blob/master/src/coinm-client.ts#L508 | ||
|
||
const client = new CoinMClient({ | ||
apiKey: 'insert_api_key_here', | ||
apiSecret: 'insert_api_secret_here', | ||
}); | ||
|
||
client.getBrokerIfNewFuturesUser(params) | ||
.then(response => { | ||
console.log(response); | ||
}) | ||
.catch(error => { | ||
console.error(error); | ||
}); |
19 changes: 19 additions & 0 deletions
19
examples/apidoc/CoinMClient/getBrokerRebateDataOverview.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 { CoinMClient } = require('binance'); | ||
|
||
// ENDPOINT: dapi/v1/apiReferral/overview | ||
// METHOD: GET | ||
// PUBLIC: NO | ||
// Link to function: https://github.com/tiagosiebler/binance/blob/master/src/coinm-client.ts#L560 | ||
|
||
const client = new CoinMClient({ | ||
apiKey: 'insert_api_key_here', | ||
apiSecret: 'insert_api_secret_here', | ||
}); | ||
|
||
client.getBrokerRebateDataOverview(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 { CoinMClient } = require('binance'); | ||
|
||
// ENDPOINT: dapi/v1/apiReferral/rebateVol | ||
// METHOD: GET | ||
// PUBLIC: NO | ||
// Link to function: https://github.com/tiagosiebler/binance/blob/master/src/coinm-client.ts#L586 | ||
|
||
const client = new CoinMClient({ | ||
apiKey: 'insert_api_key_here', | ||
apiSecret: 'insert_api_secret_here', | ||
}); | ||
|
||
client.getBrokerRebateVolume(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 { CoinMClient } = require('binance'); | ||
|
||
// ENDPOINT: dapi/v1/apiReferral/traderSummary | ||
// METHOD: GET | ||
// PUBLIC: NO | ||
// Link to function: https://github.com/tiagosiebler/binance/blob/master/src/coinm-client.ts#L603 | ||
|
||
const client = new CoinMClient({ | ||
apiKey: 'insert_api_key_here', | ||
apiSecret: 'insert_api_secret_here', | ||
}); | ||
|
||
client.getBrokerTradeDetail(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 { CoinMClient } = require('binance'); | ||
|
||
// ENDPOINT: dapi/v1/apiReferral/userCustomization | ||
// METHOD: GET | ||
// PUBLIC: NO | ||
// Link to function: https://github.com/tiagosiebler/binance/blob/master/src/coinm-client.ts#L551 | ||
|
||
const client = new CoinMClient({ | ||
apiKey: 'insert_api_key_here', | ||
apiSecret: 'insert_api_secret_here', | ||
}); | ||
|
||
client.getBrokerUserCustomId(params) | ||
.then(response => { | ||
console.log(response); | ||
}) | ||
.catch(error => { | ||
console.error(error); | ||
}); |
Oops, something went wrong.