Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.15.3 feat(): added new endpoints, updated examples #499

Merged
merged 3 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading