Skip to content

Commit

Permalink
Merge pull request #23 from JJ-Cro/Update151024
Browse files Browse the repository at this point in the history
feat(): updated readme, examples
  • Loading branch information
tiagosiebler authored Oct 16, 2024
2 parents f916c8c + 5a2dcd6 commit 16c46ee
Show file tree
Hide file tree
Showing 124 changed files with 488 additions and 245 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Complete JavaScript & Node.js SDK for BitMart REST APIs & WebSockets:

- Issues? Check the [issues tab](https://github.com/tiagosiebler/bitmart-api/issues).
- Discuss & collaborate with other node devs? Join our [Node.js Algo Traders](https://t.me/nodetraders) engineering community on telegram.
- Follow our announcement channel for real-time updates on [X/Twitter](https://x.com/QuantSDKs)

## Usage

Expand Down
6 changes: 4 additions & 2 deletions examples/apidoc/FuturesClientV2/cancelAllFuturesOrders.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const { FuturesClientV2 } = require('bitmart-api');

// This example shows how to call this bitmart API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitmart-api" for bitmart exchange
// This bitmart API SDK is available on npm via "npm install bitmart-api"
// ENDPOINT: contract/private/cancel-orders
// METHOD: POST
// PUBLIC: NO
Expand All @@ -11,9 +13,9 @@ const client = new FuturesClientV2({
});

client.cancelAllFuturesOrders(params)
.then(response => {
.then((response) => {
console.log(response);
})
.catch(error => {
.catch((error) => {
console.error(error);
});
6 changes: 4 additions & 2 deletions examples/apidoc/FuturesClientV2/cancelFuturesOrder.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const { FuturesClientV2 } = require('bitmart-api');

// This example shows how to call this bitmart API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitmart-api" for bitmart exchange
// This bitmart API SDK is available on npm via "npm install bitmart-api"
// ENDPOINT: contract/private/cancel-order
// METHOD: POST
// PUBLIC: NO
Expand All @@ -11,9 +13,9 @@ const client = new FuturesClientV2({
});

client.cancelFuturesOrder(params)
.then(response => {
.then((response) => {
console.log(response);
})
.catch(error => {
.catch((error) => {
console.error(error);
});
6 changes: 4 additions & 2 deletions examples/apidoc/FuturesClientV2/cancelFuturesPlanOrder.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const { FuturesClientV2 } = require('bitmart-api');

// This example shows how to call this bitmart API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitmart-api" for bitmart exchange
// This bitmart API SDK is available on npm via "npm install bitmart-api"
// ENDPOINT: contract/private/cancel-plan-order
// METHOD: POST
// PUBLIC: NO
Expand All @@ -11,9 +13,9 @@ const client = new FuturesClientV2({
});

client.cancelFuturesPlanOrder(params)
.then(response => {
.then((response) => {
console.log(response);
})
.catch(error => {
.catch((error) => {
console.error(error);
});
6 changes: 4 additions & 2 deletions examples/apidoc/FuturesClientV2/getFuturesAccountAssets.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const { FuturesClientV2 } = require('bitmart-api');

// This example shows how to call this bitmart API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitmart-api" for bitmart exchange
// This bitmart API SDK is available on npm via "npm install bitmart-api"
// ENDPOINT: contract/private/assets-detail
// METHOD: GET
// PUBLIC: NO
Expand All @@ -11,9 +13,9 @@ const client = new FuturesClientV2({
});

client.getFuturesAccountAssets(params)
.then(response => {
.then((response) => {
console.log(response);
})
.catch(error => {
.catch((error) => {
console.error(error);
});
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const { FuturesClientV2 } = require('bitmart-api');

// This example shows how to call this bitmart API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitmart-api" for bitmart exchange
// This bitmart API SDK is available on npm via "npm install bitmart-api"
// ENDPOINT: contract/private/get-open-orders
// METHOD: GET
// PUBLIC: NO
Expand All @@ -11,9 +13,9 @@ const client = new FuturesClientV2({
});

client.getFuturesAccountOpenOrders(params)
.then(response => {
.then((response) => {
console.log(response);
})
.catch(error => {
.catch((error) => {
console.error(error);
});
6 changes: 4 additions & 2 deletions examples/apidoc/FuturesClientV2/getFuturesAccountOrder.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const { FuturesClientV2 } = require('bitmart-api');

// This example shows how to call this bitmart API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitmart-api" for bitmart exchange
// This bitmart API SDK is available on npm via "npm install bitmart-api"
// ENDPOINT: contract/private/order
// METHOD: GET
// PUBLIC: NO
Expand All @@ -11,9 +13,9 @@ const client = new FuturesClientV2({
});

client.getFuturesAccountOrder(params)
.then(response => {
.then((response) => {
console.log(response);
})
.catch(error => {
.catch((error) => {
console.error(error);
});
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const { FuturesClientV2 } = require('bitmart-api');

// This example shows how to call this bitmart API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitmart-api" for bitmart exchange
// This bitmart API SDK is available on npm via "npm install bitmart-api"
// ENDPOINT: contract/private/order-history
// METHOD: GET
// PUBLIC: NO
Expand All @@ -11,9 +13,9 @@ const client = new FuturesClientV2({
});

client.getFuturesAccountOrderHistory(params)
.then(response => {
.then((response) => {
console.log(response);
})
.catch(error => {
.catch((error) => {
console.error(error);
});
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const { FuturesClientV2 } = require('bitmart-api');

// This example shows how to call this bitmart API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitmart-api" for bitmart exchange
// This bitmart API SDK is available on npm via "npm install bitmart-api"
// ENDPOINT: contract/private/current-plan-order
// METHOD: GET
// PUBLIC: NO
Expand All @@ -11,9 +13,9 @@ const client = new FuturesClientV2({
});

client.getFuturesAccountPlanOrders(params)
.then(response => {
.then((response) => {
console.log(response);
})
.catch(error => {
.catch((error) => {
console.error(error);
});
6 changes: 4 additions & 2 deletions examples/apidoc/FuturesClientV2/getFuturesAccountPositions.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const { FuturesClientV2 } = require('bitmart-api');

// This example shows how to call this bitmart API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitmart-api" for bitmart exchange
// This bitmart API SDK is available on npm via "npm install bitmart-api"
// ENDPOINT: contract/private/position
// METHOD: GET
// PUBLIC: NO
Expand All @@ -11,9 +13,9 @@ const client = new FuturesClientV2({
});

client.getFuturesAccountPositions(params)
.then(response => {
.then((response) => {
console.log(response);
})
.catch(error => {
.catch((error) => {
console.error(error);
});
6 changes: 4 additions & 2 deletions examples/apidoc/FuturesClientV2/getFuturesAccountTrades.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const { FuturesClientV2 } = require('bitmart-api');

// This example shows how to call this bitmart API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitmart-api" for bitmart exchange
// This bitmart API SDK is available on npm via "npm install bitmart-api"
// ENDPOINT: contract/private/trades
// METHOD: GET
// PUBLIC: NO
Expand All @@ -11,9 +13,9 @@ const client = new FuturesClientV2({
});

client.getFuturesAccountTrades(params)
.then(response => {
.then((response) => {
console.log(response);
})
.catch(error => {
.catch((error) => {
console.error(error);
});
6 changes: 4 additions & 2 deletions examples/apidoc/FuturesClientV2/getFuturesAffiliateRebates.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const { FuturesClientV2 } = require('bitmart-api');

// This example shows how to call this bitmart API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitmart-api" for bitmart exchange
// This bitmart API SDK is available on npm via "npm install bitmart-api"
// ENDPOINT: contract/private/affiliate/rebate-list
// METHOD: GET
// PUBLIC: NO
Expand All @@ -11,9 +13,9 @@ const client = new FuturesClientV2({
});

client.getFuturesAffiliateRebates(params)
.then(response => {
.then((response) => {
console.log(response);
})
.catch(error => {
.catch((error) => {
console.error(error);
});
6 changes: 4 additions & 2 deletions examples/apidoc/FuturesClientV2/getFuturesAffiliateTrades.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const { FuturesClientV2 } = require('bitmart-api');

// This example shows how to call this bitmart API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitmart-api" for bitmart exchange
// This bitmart API SDK is available on npm via "npm install bitmart-api"
// ENDPOINT: contract/private/affiliate/trade-list
// METHOD: GET
// PUBLIC: NO
Expand All @@ -11,9 +13,9 @@ const client = new FuturesClientV2({
});

client.getFuturesAffiliateTrades(params)
.then(response => {
.then((response) => {
console.log(response);
})
.catch(error => {
.catch((error) => {
console.error(error);
});
6 changes: 4 additions & 2 deletions examples/apidoc/FuturesClientV2/getFuturesContractDepth.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const { FuturesClientV2 } = require('bitmart-api');

// This example shows how to call this bitmart API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitmart-api" for bitmart exchange
// This bitmart API SDK is available on npm via "npm install bitmart-api"
// ENDPOINT: contract/public/depth
// METHOD: GET
// PUBLIC: YES
Expand All @@ -11,9 +13,9 @@ const client = new FuturesClientV2({
});

client.getFuturesContractDepth(params)
.then(response => {
.then((response) => {
console.log(response);
})
.catch(error => {
.catch((error) => {
console.error(error);
});
6 changes: 4 additions & 2 deletions examples/apidoc/FuturesClientV2/getFuturesContractDetails.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const { FuturesClientV2 } = require('bitmart-api');

// This example shows how to call this bitmart API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitmart-api" for bitmart exchange
// This bitmart API SDK is available on npm via "npm install bitmart-api"
// ENDPOINT: contract/public/details
// METHOD: GET
// PUBLIC: YES
Expand All @@ -11,9 +13,9 @@ const client = new FuturesClientV2({
});

client.getFuturesContractDetails(params)
.then(response => {
.then((response) => {
console.log(response);
})
.catch(error => {
.catch((error) => {
console.error(error);
});
6 changes: 4 additions & 2 deletions examples/apidoc/FuturesClientV2/getFuturesFundingRate.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const { FuturesClientV2 } = require('bitmart-api');

// This example shows how to call this bitmart API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitmart-api" for bitmart exchange
// This bitmart API SDK is available on npm via "npm install bitmart-api"
// ENDPOINT: contract/public/funding-rate
// METHOD: GET
// PUBLIC: YES
Expand All @@ -11,9 +13,9 @@ const client = new FuturesClientV2({
});

client.getFuturesFundingRate(params)
.then(response => {
.then((response) => {
console.log(response);
})
.catch(error => {
.catch((error) => {
console.error(error);
});
6 changes: 4 additions & 2 deletions examples/apidoc/FuturesClientV2/getFuturesKlines.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const { FuturesClientV2 } = require('bitmart-api');

// This example shows how to call this bitmart API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitmart-api" for bitmart exchange
// This bitmart API SDK is available on npm via "npm install bitmart-api"
// ENDPOINT: contract/public/kline
// METHOD: GET
// PUBLIC: YES
Expand All @@ -11,9 +13,9 @@ const client = new FuturesClientV2({
});

client.getFuturesKlines(params)
.then(response => {
.then((response) => {
console.log(response);
})
.catch(error => {
.catch((error) => {
console.error(error);
});
6 changes: 4 additions & 2 deletions examples/apidoc/FuturesClientV2/getFuturesOpenInterest.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const { FuturesClientV2 } = require('bitmart-api');

// This example shows how to call this bitmart API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitmart-api" for bitmart exchange
// This bitmart API SDK is available on npm via "npm install bitmart-api"
// ENDPOINT: contract/public/open-interest
// METHOD: GET
// PUBLIC: YES
Expand All @@ -11,9 +13,9 @@ const client = new FuturesClientV2({
});

client.getFuturesOpenInterest(params)
.then(response => {
.then((response) => {
console.log(response);
})
.catch(error => {
.catch((error) => {
console.error(error);
});
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const { FuturesClientV2 } = require('bitmart-api');

// This example shows how to call this bitmart API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitmart-api" for bitmart exchange
// This bitmart API SDK is available on npm via "npm install bitmart-api"
// ENDPOINT: account/contract/sub-account/v1/transfer-history
// METHOD: GET
// PUBLIC: NO
Expand All @@ -11,9 +13,9 @@ const client = new FuturesClientV2({
});

client.getFuturesSubTransferHistory(params)
.then(response => {
.then((response) => {
console.log(response);
})
.catch(error => {
.catch((error) => {
console.error(error);
});
6 changes: 4 additions & 2 deletions examples/apidoc/FuturesClientV2/getFuturesSubTransfers.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const { FuturesClientV2 } = require('bitmart-api');

// This example shows how to call this bitmart API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitmart-api" for bitmart exchange
// This bitmart API SDK is available on npm via "npm install bitmart-api"
// ENDPOINT: account/contract/sub-account/main/v1/transfer-list
// METHOD: GET
// PUBLIC: NO
Expand All @@ -11,9 +13,9 @@ const client = new FuturesClientV2({
});

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

0 comments on commit 16c46ee

Please sign in to comment.