Skip to content

Commit 4d7d850

Browse files
authored
Merge pull request #670 from JJ-Cro/update01062026
refactor: update examples to use ES6 import syntax for CoinMClient an…
2 parents 2d1a555 + c75a8d9 commit 4d7d850

868 files changed

Lines changed: 6727 additions & 4825 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

examples/apidoc/CoinMClient/cancelAllOpenOrders.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
const { CoinMClient } = require('binance');
1+
import { CoinMClient } from 'binance';
2+
// or, if require is preferred:
3+
// const { CoinMClient } = require('binance');
24

3-
// 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
4-
// This Binance API SDK is available on npm via "npm install binance"
5-
// ENDPOINT: dapi/v1/allOpenOrders
6-
// METHOD: DELETE
7-
// PUBLIC: NO
5+
// 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
6+
// This Binance API SDK is available on npm via "npm install binance"
7+
// ENDPOINT: dapi/v1/allOpenOrders
8+
// METHOD: DELETE
9+
// PUBLIC: NO
810

911
const client = new CoinMClient({
1012
api_key: 'insert_api_key_here',

examples/apidoc/CoinMClient/cancelMultipleOrders.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
const { CoinMClient } = require('binance');
1+
import { CoinMClient } from 'binance';
2+
// or, if require is preferred:
3+
// const { CoinMClient } = require('binance');
24

3-
// 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
4-
// This Binance API SDK is available on npm via "npm install binance"
5-
// ENDPOINT: dapi/v1/batchOrders
6-
// METHOD: DELETE
7-
// PUBLIC: NO
5+
// 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
6+
// This Binance API SDK is available on npm via "npm install binance"
7+
// ENDPOINT: dapi/v1/batchOrders
8+
// METHOD: DELETE
9+
// PUBLIC: NO
810

911
const client = new CoinMClient({
1012
api_key: 'insert_api_key_here',

examples/apidoc/CoinMClient/cancelOrder.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
const { CoinMClient } = require('binance');
1+
import { CoinMClient } from 'binance';
2+
// or, if require is preferred:
3+
// const { CoinMClient } = require('binance');
24

3-
// 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
4-
// This Binance API SDK is available on npm via "npm install binance"
5-
// ENDPOINT: dapi/v1/order
6-
// METHOD: DELETE
7-
// PUBLIC: NO
5+
// 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
6+
// This Binance API SDK is available on npm via "npm install binance"
7+
// ENDPOINT: dapi/v1/order
8+
// METHOD: DELETE
9+
// PUBLIC: NO
810

911
const client = new CoinMClient({
1012
api_key: 'insert_api_key_here',

examples/apidoc/CoinMClient/closeFuturesUserDataListenKey.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
const { CoinMClient } = require('binance');
1+
import { CoinMClient } from 'binance';
2+
// or, if require is preferred:
3+
// const { CoinMClient } = require('binance');
24

3-
// 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
4-
// This Binance API SDK is available on npm via "npm install binance"
5-
// ENDPOINT: dapi/v1/listenKey
6-
// METHOD: DELETE
7-
// PUBLIC: YES
5+
// 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
6+
// This Binance API SDK is available on npm via "npm install binance"
7+
// ENDPOINT: dapi/v1/listenKey
8+
// METHOD: DELETE
9+
// PUBLIC: YES
810

911
const client = new CoinMClient({
1012
api_key: 'insert_api_key_here',

examples/apidoc/CoinMClient/get24hrChangeStatistics.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
const { CoinMClient } = require('binance');
1+
import { CoinMClient } from 'binance';
2+
// or, if require is preferred:
3+
// const { CoinMClient } = require('binance');
24

3-
// 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
4-
// This Binance API SDK is available on npm via "npm install binance"
5-
// ENDPOINT: dapi/v1/ticker/24hr
6-
// METHOD: GET
7-
// PUBLIC: YES
5+
// 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
6+
// This Binance API SDK is available on npm via "npm install binance"
7+
// ENDPOINT: dapi/v1/ticker/24hr
8+
// METHOD: GET
9+
// PUBLIC: YES
810

911
const client = new CoinMClient({
1012
api_key: 'insert_api_key_here',

examples/apidoc/CoinMClient/getADLQuantileEstimation.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
const { CoinMClient } = require('binance');
1+
import { CoinMClient } from 'binance';
2+
// or, if require is preferred:
3+
// const { CoinMClient } = require('binance');
24

3-
// 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
4-
// This Binance API SDK is available on npm via "npm install binance"
5-
// ENDPOINT: dapi/v1/adlQuantile
6-
// METHOD: GET
7-
// PUBLIC: NO
5+
// 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
6+
// This Binance API SDK is available on npm via "npm install binance"
7+
// ENDPOINT: dapi/v1/adlQuantile
8+
// METHOD: GET
9+
// PUBLIC: NO
810

911
const client = new CoinMClient({
1012
api_key: 'insert_api_key_here',

examples/apidoc/CoinMClient/getAccountCommissionRate.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
const { CoinMClient } = require('binance');
1+
import { CoinMClient } from 'binance';
2+
// or, if require is preferred:
3+
// const { CoinMClient } = require('binance');
24

3-
// 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
4-
// This Binance API SDK is available on npm via "npm install binance"
5-
// ENDPOINT: dapi/v1/commissionRate
6-
// METHOD: GET
7-
// PUBLIC: NO
5+
// 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
6+
// This Binance API SDK is available on npm via "npm install binance"
7+
// ENDPOINT: dapi/v1/commissionRate
8+
// METHOD: GET
9+
// PUBLIC: NO
810

911
const client = new CoinMClient({
1012
api_key: 'insert_api_key_here',

examples/apidoc/CoinMClient/getAccountInformation.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
const { CoinMClient } = require('binance');
1+
import { CoinMClient } from 'binance';
2+
// or, if require is preferred:
3+
// const { CoinMClient } = require('binance');
24

3-
// 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
4-
// This Binance API SDK is available on npm via "npm install binance"
5-
// ENDPOINT: dapi/v1/account
6-
// METHOD: GET
7-
// PUBLIC: NO
5+
// 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
6+
// This Binance API SDK is available on npm via "npm install binance"
7+
// ENDPOINT: dapi/v1/account
8+
// METHOD: GET
9+
// PUBLIC: NO
810

911
const client = new CoinMClient({
1012
api_key: 'insert_api_key_here',

examples/apidoc/CoinMClient/getAccountTrades.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
const { CoinMClient } = require('binance');
1+
import { CoinMClient } from 'binance';
2+
// or, if require is preferred:
3+
// const { CoinMClient } = require('binance');
24

3-
// 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
4-
// This Binance API SDK is available on npm via "npm install binance"
5-
// ENDPOINT: dapi/v1/userTrades
6-
// METHOD: GET
7-
// PUBLIC: NO
5+
// 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
6+
// This Binance API SDK is available on npm via "npm install binance"
7+
// ENDPOINT: dapi/v1/userTrades
8+
// METHOD: GET
9+
// PUBLIC: NO
810

911
const client = new CoinMClient({
1012
api_key: 'insert_api_key_here',

examples/apidoc/CoinMClient/getAggregateTrades.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
const { CoinMClient } = require('binance');
1+
import { CoinMClient } from 'binance';
2+
// or, if require is preferred:
3+
// const { CoinMClient } = require('binance');
24

3-
// 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
4-
// This Binance API SDK is available on npm via "npm install binance"
5-
// ENDPOINT: dapi/v1/aggTrades
6-
// METHOD: GET
7-
// PUBLIC: YES
5+
// 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
6+
// This Binance API SDK is available on npm via "npm install binance"
7+
// ENDPOINT: dapi/v1/aggTrades
8+
// METHOD: GET
9+
// PUBLIC: YES
810

911
const client = new CoinMClient({
1012
api_key: 'insert_api_key_here',

0 commit comments

Comments
 (0)