Skip to content

Commit

Permalink
Merge pull request #464 from JJ-Cro/TestRegex
Browse files Browse the repository at this point in the history
feat(): added all examples from API docs
  • Loading branch information
tiagosiebler authored Oct 15, 2024
2 parents 9fb2a3d + 2c8d23f commit b7a7725
Show file tree
Hide file tree
Showing 580 changed files with 11,544 additions and 581 deletions.
1,154 changes: 577 additions & 577 deletions docs/endpointFunctionList.md

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions examples/apidoc/CoinMClient/cancelAllOpenOrders.js
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);
});
19 changes: 19 additions & 0 deletions examples/apidoc/CoinMClient/cancelMultipleOrders.js
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);
});
19 changes: 19 additions & 0 deletions examples/apidoc/CoinMClient/cancelOrder.js
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 examples/apidoc/CoinMClient/closeFuturesUserDataListenKey.js
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);
});
19 changes: 19 additions & 0 deletions examples/apidoc/CoinMClient/get24hrChangeStatistics.js
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);
});
19 changes: 19 additions & 0 deletions examples/apidoc/CoinMClient/get24hrChangeStatististics.js
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);
});
19 changes: 19 additions & 0 deletions examples/apidoc/CoinMClient/getADLQuantileEstimation.js
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);
});
19 changes: 19 additions & 0 deletions examples/apidoc/CoinMClient/getAccountComissionRate.js
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);
});
19 changes: 19 additions & 0 deletions examples/apidoc/CoinMClient/getAccountInformation.js
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);
});
19 changes: 19 additions & 0 deletions examples/apidoc/CoinMClient/getAccountTrades.js
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);
});
19 changes: 19 additions & 0 deletions examples/apidoc/CoinMClient/getAggregateTrades.js
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);
});
19 changes: 19 additions & 0 deletions examples/apidoc/CoinMClient/getAllOpenOrders.js
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);
});
19 changes: 19 additions & 0 deletions examples/apidoc/CoinMClient/getAllOrders.js
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);
});
19 changes: 19 additions & 0 deletions examples/apidoc/CoinMClient/getBalance.js
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);
});
19 changes: 19 additions & 0 deletions examples/apidoc/CoinMClient/getBrokerClientCustomIds.js
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);
});
19 changes: 19 additions & 0 deletions examples/apidoc/CoinMClient/getBrokerIfNewFuturesUser.js
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 examples/apidoc/CoinMClient/getBrokerRebateDataOverview.js
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);
});
19 changes: 19 additions & 0 deletions examples/apidoc/CoinMClient/getBrokerRebateVolume.js
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);
});
19 changes: 19 additions & 0 deletions examples/apidoc/CoinMClient/getBrokerTradeDetail.js
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);
});
19 changes: 19 additions & 0 deletions examples/apidoc/CoinMClient/getBrokerUserCustomId.js
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);
});
Loading

0 comments on commit b7a7725

Please sign in to comment.