3commas-api-node 中文文档教程

发布于 3年前 浏览 25 项目主页 更新于 3年前

3commas API NodeJs wrapper

官方 3commas API 的 NodeJS 包装器

3commas.io 是加密货币交易者和投资者的智能工具集合,可帮助他们最大程度地降低风险、限制损失、增加利润以及管理跨多个交易所的交易和投资组合。


How to use

Set up

使用 npm 或 yarn 添加节点模块

npm i 3commas-api-node

yarn add 3commas-api-node

Using in your project

将模块添加到您的脚本并提供 API 凭据,

const threeCommasAPI = require('3commas-api-node')

const api = new threeCommasAPI({
  apiKey: '',
  apiSecret: '',
  // url: 'https://api.3commas.io' // this is optional in case of defining other endpoint
  // forcedMode: 'real' // this is optional in case of defining account mode, 'real' or 'paper'

})

请参阅 example.js 了解更多详细信息

Current methods

for deals

 getDeals (params)

 dealUpdateMaxSafetyOrders (deal_id, max_safety_orders)

 dealPanicSell (deal_id)

 dealCancel (deal_id)

 dealUpdateTp (deal_id, new_take_profit_percentage)

 getDeal (deal_id)

 getDealSafetyOrders (deal_id)

for bots

  getBotsBlackList ()

  botsUpdateBlackList (params)

  botCreate (params)

  getBots (params)

  getBotsStats (params)

  botUpdate (params)

  botDisable (bot_id)

  botEnable (bot_id)

  botStartNewDeal (params)

  botDelete (bot_id)

  botPaniceSellAllDeals (bot_id)

  botCancelAllDeals (bot_id)

  botShow (bot_id)

for smart trades

  smartTradesCreateSimpleSell (params)

  smartTradesCreateSimpleBuy (params)

  smartTradesCreateSmartSell (params)

  smartTradesCreateSmartCover (params)

  smartTradesCreateSmartTrade (params)

  smartTrades ()

  smartTradesStepPanicSell (params)

  smartTradesUpdate (params)

  smartTradesCancel (smart_trade_id)

  smartTradesPanicSell (smart_trade_id)

  smartTradesForceProcess (smart_trade_id)

for accounts

  accountsNew (params)

  accounts ()

  accountsMarketList ()

  accountsCurrencyRates ()

  accountSellAllToUsd (account_id)

  accountSellAllToBtc (account_id)

  accountLoadBalances (account_id)

  accountRename (params)

  accountPieChartData (account_id)

  accountTableData (account_id)

  accountRemove (account_id)

给我买杯啤酒????

BTC:37N2MSShWExJGsKuAvBs9GEteUTrhZyvCi

ETH:0x9F5e35e7DCa77A6Ec7a307213C5F65bc6d010088

3commas API NodeJs wrapper

NodeJS wrapper for Official 3commas API

3commas.io is collection of smart tools for cryptocurrency traders and investors to minimize risks, limit losses, grow profits, and manage their trades and portfolios across multiple exchanges.


How to use

Set up

Add node module using npm or yarn

npm i 3commas-api-node

or

yarn add 3commas-api-node

Using in your project

add module to your script and provide API credentials

const threeCommasAPI = require('3commas-api-node')

const api = new threeCommasAPI({
  apiKey: '',
  apiSecret: '',
  // url: 'https://api.3commas.io' // this is optional in case of defining other endpoint
  // forcedMode: 'real' // this is optional in case of defining account mode, 'real' or 'paper'

})

see example.js for more details

Current methods

for deals

 getDeals (params)

 dealUpdateMaxSafetyOrders (deal_id, max_safety_orders)

 dealPanicSell (deal_id)

 dealCancel (deal_id)

 dealUpdateTp (deal_id, new_take_profit_percentage)

 getDeal (deal_id)

 getDealSafetyOrders (deal_id)

for bots

  getBotsBlackList ()

  botsUpdateBlackList (params)

  botCreate (params)

  getBots (params)

  getBotsStats (params)

  botUpdate (params)

  botDisable (bot_id)

  botEnable (bot_id)

  botStartNewDeal (params)

  botDelete (bot_id)

  botPaniceSellAllDeals (bot_id)

  botCancelAllDeals (bot_id)

  botShow (bot_id)

for smart trades

  smartTradesCreateSimpleSell (params)

  smartTradesCreateSimpleBuy (params)

  smartTradesCreateSmartSell (params)

  smartTradesCreateSmartCover (params)

  smartTradesCreateSmartTrade (params)

  smartTrades ()

  smartTradesStepPanicSell (params)

  smartTradesUpdate (params)

  smartTradesCancel (smart_trade_id)

  smartTradesPanicSell (smart_trade_id)

  smartTradesForceProcess (smart_trade_id)

for accounts

  accountsNew (params)

  accounts ()

  accountsMarketList ()

  accountsCurrencyRates ()

  accountSellAllToUsd (account_id)

  accountSellAllToBtc (account_id)

  accountLoadBalances (account_id)

  accountRename (params)

  accountPieChartData (account_id)

  accountTableData (account_id)

  accountRemove (account_id)

buy me a beer ????

BTC: 37N2MSShWExJGsKuAvBs9GEteUTrhZyvCi

ETH: 0x9F5e35e7DCa77A6Ec7a307213C5F65bc6d010088

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文