-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from JJ-Cro/Update151024
Feat(): added examples, updated endpoint map
- Loading branch information
Showing
244 changed files
with
5,325 additions
and
242 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
21 changes: 21 additions & 0 deletions
21
examples/apidoc/CBAdvancedTradeClient/allocatePortfolio.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
const { CBAdvancedTradeClient } = require('coinbase-api'); | ||
|
||
// This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange | ||
// This coinbase API SDK is available on npm via "npm install coinbase-api" | ||
// ENDPOINT: /api/v3/brokerage/intx/allocate | ||
// METHOD: POST | ||
// PUBLIC: NO | ||
// Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L583 | ||
|
||
const client = new CBAdvancedTradeClient({ | ||
apiKey: 'insert_api_key_here', | ||
apiSecret: 'insert_api_secret_here', | ||
}); | ||
|
||
client.allocatePortfolio(params) | ||
.then((response) => { | ||
console.log(response); | ||
}) | ||
.catch((error) => { | ||
console.error(error); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
const { CBAdvancedTradeClient } = require('coinbase-api'); | ||
|
||
// This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange | ||
// This coinbase API SDK is available on npm via "npm install coinbase-api" | ||
// ENDPOINT: /api/v3/brokerage/orders/batch_cancel | ||
// METHOD: POST | ||
// PUBLIC: NO | ||
// Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L223 | ||
|
||
const client = new CBAdvancedTradeClient({ | ||
apiKey: 'insert_api_key_here', | ||
apiSecret: 'insert_api_secret_here', | ||
}); | ||
|
||
client.cancelOrders(params) | ||
.then((response) => { | ||
console.log(response); | ||
}) | ||
.catch((error) => { | ||
console.error(error); | ||
}); |
21 changes: 21 additions & 0 deletions
21
examples/apidoc/CBAdvancedTradeClient/cancelPendingFuturesSweep.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
const { CBAdvancedTradeClient } = require('coinbase-api'); | ||
|
||
// This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange | ||
// This coinbase API SDK is available on npm via "npm install coinbase-api" | ||
// ENDPOINT: /api/v3/brokerage/cfm/sweeps | ||
// METHOD: DELETE | ||
// PUBLIC: NO | ||
// Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L567 | ||
|
||
const client = new CBAdvancedTradeClient({ | ||
apiKey: 'insert_api_key_here', | ||
apiSecret: 'insert_api_secret_here', | ||
}); | ||
|
||
client.cancelPendingFuturesSweep(params) | ||
.then((response) => { | ||
console.log(response); | ||
}) | ||
.catch((error) => { | ||
console.error(error); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
const { CBAdvancedTradeClient } = require('coinbase-api'); | ||
|
||
// This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange | ||
// This coinbase API SDK is available on npm via "npm install coinbase-api" | ||
// ENDPOINT: /api/v3/brokerage/orders/close_position | ||
// METHOD: POST | ||
// PUBLIC: NO | ||
// Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L335 | ||
|
||
const client = new CBAdvancedTradeClient({ | ||
apiKey: 'insert_api_key_here', | ||
apiSecret: 'insert_api_secret_here', | ||
}); | ||
|
||
client.closePosition(params) | ||
.then((response) => { | ||
console.log(response); | ||
}) | ||
.catch((error) => { | ||
console.error(error); | ||
}); |
21 changes: 21 additions & 0 deletions
21
examples/apidoc/CBAdvancedTradeClient/commitConvertTrade.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
const { CBAdvancedTradeClient } = require('coinbase-api'); | ||
|
||
// This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange | ||
// This coinbase API SDK is available on npm via "npm install coinbase-api" | ||
// ENDPOINT: /api/v3/brokerage/convert/trade/{trade_id} | ||
// METHOD: POST | ||
// PUBLIC: NO | ||
// Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L716 | ||
|
||
const client = new CBAdvancedTradeClient({ | ||
apiKey: 'insert_api_key_here', | ||
apiSecret: 'insert_api_secret_here', | ||
}); | ||
|
||
client.commitConvertTrade(params) | ||
.then((response) => { | ||
console.log(response); | ||
}) | ||
.catch((error) => { | ||
console.error(error); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
const { CBAdvancedTradeClient } = require('coinbase-api'); | ||
|
||
// This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange | ||
// This coinbase API SDK is available on npm via "npm install coinbase-api" | ||
// ENDPOINT: /api/v3/brokerage/portfolios | ||
// METHOD: POST | ||
// PUBLIC: NO | ||
// Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L368 | ||
|
||
const client = new CBAdvancedTradeClient({ | ||
apiKey: 'insert_api_key_here', | ||
apiSecret: 'insert_api_secret_here', | ||
}); | ||
|
||
client.createPortfolio(params) | ||
.then((response) => { | ||
console.log(response); | ||
}) | ||
.catch((error) => { | ||
console.error(error); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
const { CBAdvancedTradeClient } = require('coinbase-api'); | ||
|
||
// This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange | ||
// This coinbase API SDK is available on npm via "npm install coinbase-api" | ||
// ENDPOINT: /api/v3/brokerage/portfolios/{portfolio_uuid} | ||
// METHOD: DELETE | ||
// PUBLIC: NO | ||
// Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L411 | ||
|
||
const client = new CBAdvancedTradeClient({ | ||
apiKey: 'insert_api_key_here', | ||
apiSecret: 'insert_api_secret_here', | ||
}); | ||
|
||
client.deletePortfolio(params) | ||
.then((response) => { | ||
console.log(response); | ||
}) | ||
.catch((error) => { | ||
console.error(error); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
const { CBAdvancedTradeClient } = require('coinbase-api'); | ||
|
||
// This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange | ||
// This coinbase API SDK is available on npm via "npm install coinbase-api" | ||
// ENDPOINT: /api/v3/brokerage/accounts/{account_id} | ||
// METHOD: GET | ||
// PUBLIC: NO | ||
// Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L99 | ||
|
||
const client = new CBAdvancedTradeClient({ | ||
apiKey: 'insert_api_key_here', | ||
apiSecret: 'insert_api_secret_here', | ||
}); | ||
|
||
client.getAccount(params) | ||
.then((response) => { | ||
console.log(response); | ||
}) | ||
.catch((error) => { | ||
console.error(error); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
const { CBAdvancedTradeClient } = require('coinbase-api'); | ||
|
||
// This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange | ||
// This coinbase API SDK is available on npm via "npm install coinbase-api" | ||
// ENDPOINT: /api/v3/brokerage/accounts | ||
// METHOD: GET | ||
// PUBLIC: NO | ||
// Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L85 | ||
|
||
const client = new CBAdvancedTradeClient({ | ||
apiKey: 'insert_api_key_here', | ||
apiSecret: 'insert_api_secret_here', | ||
}); | ||
|
||
client.getAccounts(params) | ||
.then((response) => { | ||
console.log(response); | ||
}) | ||
.catch((error) => { | ||
console.error(error); | ||
}); |
21 changes: 21 additions & 0 deletions
21
examples/apidoc/CBAdvancedTradeClient/getApiKeyPermissions.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
const { CBAdvancedTradeClient } = require('coinbase-api'); | ||
|
||
// This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange | ||
// This coinbase API SDK is available on npm via "npm install coinbase-api" | ||
// ENDPOINT: /api/v3/brokerage/key_permissions | ||
// METHOD: GET | ||
// PUBLIC: NO | ||
// Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L850 | ||
|
||
const client = new CBAdvancedTradeClient({ | ||
apiKey: 'insert_api_key_here', | ||
apiSecret: 'insert_api_secret_here', | ||
}); | ||
|
||
client.getApiKeyPermissions(params) | ||
.then((response) => { | ||
console.log(response); | ||
}) | ||
.catch((error) => { | ||
console.error(error); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
const { CBAdvancedTradeClient } = require('coinbase-api'); | ||
|
||
// This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange | ||
// This coinbase API SDK is available on npm via "npm install coinbase-api" | ||
// ENDPOINT: /api/v3/brokerage/best_bid_ask | ||
// METHOD: GET | ||
// PUBLIC: NO | ||
// Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L116 | ||
|
||
const client = new CBAdvancedTradeClient({ | ||
apiKey: 'insert_api_key_here', | ||
apiSecret: 'insert_api_secret_here', | ||
}); | ||
|
||
client.getBestBidAsk(params) | ||
.then((response) => { | ||
console.log(response); | ||
}) | ||
.catch((error) => { | ||
console.error(error); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
const { CBAdvancedTradeClient } = require('coinbase-api'); | ||
|
||
// This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange | ||
// This coinbase API SDK is available on npm via "npm install coinbase-api" | ||
// ENDPOINT: /api/v3/brokerage/convert/trade/{trade_id} | ||
// METHOD: GET | ||
// PUBLIC: NO | ||
// Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L699 | ||
|
||
const client = new CBAdvancedTradeClient({ | ||
apiKey: 'insert_api_key_here', | ||
apiSecret: 'insert_api_secret_here', | ||
}); | ||
|
||
client.getConvertTrade(params) | ||
.then((response) => { | ||
console.log(response); | ||
}) | ||
.catch((error) => { | ||
console.error(error); | ||
}); |
21 changes: 21 additions & 0 deletions
21
examples/apidoc/CBAdvancedTradeClient/getCurrentMarginWindow.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
const { CBAdvancedTradeClient } = require('coinbase-api'); | ||
|
||
// This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange | ||
// This coinbase API SDK is available on npm via "npm install coinbase-api" | ||
// ENDPOINT: /api/v3/brokerage/cfm/intraday/current_margin_window | ||
// METHOD: GET | ||
// PUBLIC: NO | ||
// Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L494 | ||
|
||
const client = new CBAdvancedTradeClient({ | ||
apiKey: 'insert_api_key_here', | ||
apiSecret: 'insert_api_secret_here', | ||
}); | ||
|
||
client.getCurrentMarginWindow(params) | ||
.then((response) => { | ||
console.log(response); | ||
}) | ||
.catch((error) => { | ||
console.error(error); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
const { CBAdvancedTradeClient } = require('coinbase-api'); | ||
|
||
// This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange | ||
// This coinbase API SDK is available on npm via "npm install coinbase-api" | ||
// ENDPOINT: /api/v3/brokerage/orders/historical/fills | ||
// METHOD: GET | ||
// PUBLIC: NO | ||
// Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L291 | ||
|
||
const client = new CBAdvancedTradeClient({ | ||
apiKey: 'insert_api_key_here', | ||
apiSecret: 'insert_api_secret_here', | ||
}); | ||
|
||
client.getFills(params) | ||
.then((response) => { | ||
console.log(response); | ||
}) | ||
.catch((error) => { | ||
console.error(error); | ||
}); |
21 changes: 21 additions & 0 deletions
21
examples/apidoc/CBAdvancedTradeClient/getFuturesBalanceSummary.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
const { CBAdvancedTradeClient } = require('coinbase-api'); | ||
|
||
// This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange | ||
// This coinbase API SDK is available on npm via "npm install coinbase-api" | ||
// ENDPOINT: /api/v3/brokerage/cfm/balance_summary | ||
// METHOD: GET | ||
// PUBLIC: NO | ||
// Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L453 | ||
|
||
const client = new CBAdvancedTradeClient({ | ||
apiKey: 'insert_api_key_here', | ||
apiSecret: 'insert_api_secret_here', | ||
}); | ||
|
||
client.getFuturesBalanceSummary(params) | ||
.then((response) => { | ||
console.log(response); | ||
}) | ||
.catch((error) => { | ||
console.error(error); | ||
}); |
21 changes: 21 additions & 0 deletions
21
examples/apidoc/CBAdvancedTradeClient/getFuturesPosition.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
const { CBAdvancedTradeClient } = require('coinbase-api'); | ||
|
||
// This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange | ||
// This coinbase API SDK is available on npm via "npm install coinbase-api" | ||
// ENDPOINT: /api/v3/brokerage/cfm/positions/{product_id} | ||
// METHOD: GET | ||
// PUBLIC: NO | ||
// Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L520 | ||
|
||
const client = new CBAdvancedTradeClient({ | ||
apiKey: 'insert_api_key_here', | ||
apiSecret: 'insert_api_secret_here', | ||
}); | ||
|
||
client.getFuturesPosition(params) | ||
.then((response) => { | ||
console.log(response); | ||
}) | ||
.catch((error) => { | ||
console.error(error); | ||
}); |
21 changes: 21 additions & 0 deletions
21
examples/apidoc/CBAdvancedTradeClient/getFuturesPositions.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
const { CBAdvancedTradeClient } = require('coinbase-api'); | ||
|
||
// This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange | ||
// This coinbase API SDK is available on npm via "npm install coinbase-api" | ||
// ENDPOINT: /api/v3/brokerage/cfm/positions | ||
// METHOD: GET | ||
// PUBLIC: NO | ||
// Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L511 | ||
|
||
const client = new CBAdvancedTradeClient({ | ||
apiKey: 'insert_api_key_here', | ||
apiSecret: 'insert_api_secret_here', | ||
}); | ||
|
||
client.getFuturesPositions(params) | ||
.then((response) => { | ||
console.log(response); | ||
}) | ||
.catch((error) => { | ||
console.error(error); | ||
}); |
Oops, something went wrong.