Skip to content

Commit

Permalink
chore(): updated examples with new functions
Browse files Browse the repository at this point in the history
  • Loading branch information
JJ-Cro committed Jan 6, 2025
1 parent 0930200 commit 43c8b05
Show file tree
Hide file tree
Showing 109 changed files with 2,801 additions and 526 deletions.
1,167 changes: 641 additions & 526 deletions docs/endpointFunctionList.md

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions examples/apidoc/MainClient/claimSolBoostRewards.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const { MainClient } = require('binance');

// This example shows how to call this Binance API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "binance" for Binance exchange
// This Binance API SDK is available on npm via "npm install binance"
// ENDPOINT: sapi/v1/sol-staking/sol/claim
// METHOD: POST
// PUBLIC: NO

const client = new MainClient({
api_key: 'insert_api_key_here',
api_secret: 'insert_api_secret_here',
});

client.claimSolBoostRewards(params)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
20 changes: 20 additions & 0 deletions examples/apidoc/MainClient/getFlexibleLoanCollateralRepayRate.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const { MainClient } = require('binance');

// This example shows how to call this Binance API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "binance" for Binance exchange
// This Binance API SDK is available on npm via "npm install binance"
// ENDPOINT: sapi/v2/loan/flexible/repay/rate
// METHOD: GET
// PUBLIC: NO

const client = new MainClient({
api_key: 'insert_api_key_here',
api_secret: 'insert_api_secret_here',
});

client.getFlexibleLoanCollateralRepayRate(params)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
20 changes: 20 additions & 0 deletions examples/apidoc/MainClient/getFlexibleLoanLiquidationHistory.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const { MainClient } = require('binance');

// This example shows how to call this Binance API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "binance" for Binance exchange
// This Binance API SDK is available on npm via "npm install binance"
// ENDPOINT: sapi/v2/loan/flexible/liquidation/history
// METHOD: GET
// PUBLIC: NO

const client = new MainClient({
api_key: 'insert_api_key_here',
api_secret: 'insert_api_secret_here',
});

client.getFlexibleLoanLiquidationHistory(params)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
20 changes: 20 additions & 0 deletions examples/apidoc/MainClient/getSolBoostRewardsHistory.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const { MainClient } = require('binance');

// This example shows how to call this Binance API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "binance" for Binance exchange
// This Binance API SDK is available on npm via "npm install binance"
// ENDPOINT: sapi/v1/sol-staking/sol/history/boostRewardsHistory
// METHOD: GET
// PUBLIC: NO

const client = new MainClient({
api_key: 'insert_api_key_here',
api_secret: 'insert_api_secret_here',
});

client.getSolBoostRewardsHistory(params)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
20 changes: 20 additions & 0 deletions examples/apidoc/MainClient/getSolUnclaimedRewards.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const { MainClient } = require('binance');

// This example shows how to call this Binance API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "binance" for Binance exchange
// This Binance API SDK is available on npm via "npm install binance"
// ENDPOINT: sapi/v1/sol-staking/sol/history/unclaimedRewards
// METHOD: GET
// PUBLIC: NO

const client = new MainClient({
api_key: 'insert_api_key_here',
api_secret: 'insert_api_secret_here',
});

client.getSolUnclaimedRewards(params)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
20 changes: 20 additions & 0 deletions examples/apidoc/MainClient/mintPortfolioMarginBFUSD.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const { MainClient } = require('binance');

// This example shows how to call this Binance API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "binance" for Binance exchange
// This Binance API SDK is available on npm via "npm install binance"
// ENDPOINT: sapi/v1/portfolio/mint
// METHOD: POST
// PUBLIC: NO

const client = new MainClient({
api_key: 'insert_api_key_here',
api_secret: 'insert_api_secret_here',
});

client.mintPortfolioMarginBFUSD(params)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
20 changes: 20 additions & 0 deletions examples/apidoc/MainClient/redeemPortfolioMarginBFUSD.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const { MainClient } = require('binance');

// This example shows how to call this Binance API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "binance" for Binance exchange
// This Binance API SDK is available on npm via "npm install binance"
// ENDPOINT: sapi/v1/portfolio/redeem
// METHOD: POST
// PUBLIC: NO

const client = new MainClient({
api_key: 'insert_api_key_here',
api_secret: 'insert_api_secret_here',
});

client.redeemPortfolioMarginBFUSD(params)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const { MainClient } = require('binance');

// This example shows how to call this Binance API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "binance" for Binance exchange
// This Binance API SDK is available on npm via "npm install binance"
// ENDPOINT: sapi/v2/loan/flexible/repay/collateral
// METHOD: POST
// PUBLIC: NO

const client = new MainClient({
api_key: 'insert_api_key_here',
api_secret: 'insert_api_secret_here',
});

client.repayCryptoLoanFlexibleWithCollateral(params)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
20 changes: 20 additions & 0 deletions examples/apidoc/PortfolioClient/autoCollectFunds.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const { PortfolioClient } = require('binance');

// This example shows how to call this Binance API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "binance" for Binance exchange
// This Binance API SDK is available on npm via "npm install binance"
// ENDPOINT: papi/v1/auto-collection
// METHOD: POST
// PUBLIC: NO

const client = new PortfolioClient({
api_key: 'insert_api_key_here',
api_secret: 'insert_api_secret_here',
});

client.autoCollectFunds(params)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
20 changes: 20 additions & 0 deletions examples/apidoc/PortfolioClient/cancelAllCMConditionalOrders.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const { PortfolioClient } = require('binance');

// This example shows how to call this Binance API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "binance" for Binance exchange
// This Binance API SDK is available on npm via "npm install binance"
// ENDPOINT: papi/v1/cm/conditional/allOpenOrders
// METHOD: DELETE
// PUBLIC: NO

const client = new PortfolioClient({
api_key: 'insert_api_key_here',
api_secret: 'insert_api_secret_here',
});

client.cancelAllCMConditionalOrders(params)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
20 changes: 20 additions & 0 deletions examples/apidoc/PortfolioClient/cancelAllCMOrders.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const { PortfolioClient } = require('binance');

// This example shows how to call this Binance API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "binance" for Binance exchange
// This Binance API SDK is available on npm via "npm install binance"
// ENDPOINT: papi/v1/cm/allOpenOrders
// METHOD: DELETE
// PUBLIC: NO

const client = new PortfolioClient({
api_key: 'insert_api_key_here',
api_secret: 'insert_api_secret_here',
});

client.cancelAllCMOrders(params)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
20 changes: 20 additions & 0 deletions examples/apidoc/PortfolioClient/cancelAllMarginOrders.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const { PortfolioClient } = require('binance');

// This example shows how to call this Binance API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "binance" for Binance exchange
// This Binance API SDK is available on npm via "npm install binance"
// ENDPOINT: papi/v1/margin/allOpenOrders
// METHOD: DELETE
// PUBLIC: NO

const client = new PortfolioClient({
api_key: 'insert_api_key_here',
api_secret: 'insert_api_secret_here',
});

client.cancelAllMarginOrders(params)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
20 changes: 20 additions & 0 deletions examples/apidoc/PortfolioClient/cancelAllUMConditionalOrders.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const { PortfolioClient } = require('binance');

// This example shows how to call this Binance API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "binance" for Binance exchange
// This Binance API SDK is available on npm via "npm install binance"
// ENDPOINT: papi/v1/um/conditional/allOpenOrders
// METHOD: DELETE
// PUBLIC: NO

const client = new PortfolioClient({
api_key: 'insert_api_key_here',
api_secret: 'insert_api_secret_here',
});

client.cancelAllUMConditionalOrders(params)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
20 changes: 20 additions & 0 deletions examples/apidoc/PortfolioClient/cancelAllUMOrders.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const { PortfolioClient } = require('binance');

// This example shows how to call this Binance API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "binance" for Binance exchange
// This Binance API SDK is available on npm via "npm install binance"
// ENDPOINT: papi/v1/um/allOpenOrders
// METHOD: DELETE
// PUBLIC: NO

const client = new PortfolioClient({
api_key: 'insert_api_key_here',
api_secret: 'insert_api_secret_here',
});

client.cancelAllUMOrders(params)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
20 changes: 20 additions & 0 deletions examples/apidoc/PortfolioClient/cancelCMConditionalOrder.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const { PortfolioClient } = require('binance');

// This example shows how to call this Binance API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "binance" for Binance exchange
// This Binance API SDK is available on npm via "npm install binance"
// ENDPOINT: papi/v1/cm/conditional/order
// METHOD: DELETE
// PUBLIC: NO

const client = new PortfolioClient({
api_key: 'insert_api_key_here',
api_secret: 'insert_api_secret_here',
});

client.cancelCMConditionalOrder(params)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
20 changes: 20 additions & 0 deletions examples/apidoc/PortfolioClient/cancelCMOrder.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const { PortfolioClient } = require('binance');

// This example shows how to call this Binance API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "binance" for Binance exchange
// This Binance API SDK is available on npm via "npm install binance"
// ENDPOINT: papi/v1/cm/order
// METHOD: DELETE
// PUBLIC: NO

const client = new PortfolioClient({
api_key: 'insert_api_key_here',
api_secret: 'insert_api_secret_here',
});

client.cancelCMOrder(params)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
20 changes: 20 additions & 0 deletions examples/apidoc/PortfolioClient/cancelMarginOCO.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const { PortfolioClient } = require('binance');

// This example shows how to call this Binance API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "binance" for Binance exchange
// This Binance API SDK is available on npm via "npm install binance"
// ENDPOINT: papi/v1/margin/orderList
// METHOD: DELETE
// PUBLIC: NO

const client = new PortfolioClient({
api_key: 'insert_api_key_here',
api_secret: 'insert_api_secret_here',
});

client.cancelMarginOCO(params)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
20 changes: 20 additions & 0 deletions examples/apidoc/PortfolioClient/cancelMarginOrder.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const { PortfolioClient } = require('binance');

// This example shows how to call this Binance API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "binance" for Binance exchange
// This Binance API SDK is available on npm via "npm install binance"
// ENDPOINT: papi/v1/margin/order
// METHOD: DELETE
// PUBLIC: NO

const client = new PortfolioClient({
api_key: 'insert_api_key_here',
api_secret: 'insert_api_secret_here',
});

client.cancelMarginOrder(params)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
20 changes: 20 additions & 0 deletions examples/apidoc/PortfolioClient/cancelUMConditionalOrder.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const { PortfolioClient } = require('binance');

// This example shows how to call this Binance API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "binance" for Binance exchange
// This Binance API SDK is available on npm via "npm install binance"
// ENDPOINT: papi/v1/um/conditional/order
// METHOD: DELETE
// PUBLIC: NO

const client = new PortfolioClient({
api_key: 'insert_api_key_here',
api_secret: 'insert_api_secret_here',
});

client.cancelUMConditionalOrder(params)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
Loading

0 comments on commit 43c8b05

Please sign in to comment.