Flutter插件three_commas的使用介绍
Flutter插件three_commas的使用介绍
描述
Dart wrapper for Official 3commas API。
3commas.io 是一个智能工具集合,专为加密货币交易者和投资者设计,旨在降低风险、限制损失、增加收益,并管理跨多个交易所的交易和投资组合。
买杯啤酒支持我吧 🍺
BTC: 1JtJMVQLeaLn3wQwQL8VjqSijJ1i4ugjoo
ETH: 0xa83141ee143be0b814f7a92c865a4e79de9ea781
功能
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)
开始使用
在使用之前,您需要根据 3commas 文档 创建 API 密钥和密钥。
使用示例
以下代码展示了如何列出最近的 20 个活跃交易。
示例代码
// example/three_commas_example.dart
import 'package:three_commas/three_commas.dart';
void main() async {
// 初始化 ThreeCommasApi 对象,传入您的 API Key 和 Secret
final api = ThreeCommasApi(key: '', secret: '');
// 获取最近的 20 个活跃交易
final activeDeals = await api.getDeals({'limit': 20, 'scope': 'active'});
// 打印结果
print(activeDeals);
}
依赖安装
要使用此插件,请确保在 pubspec.yaml 文件中添加以下依赖:
dependencies:
three_commas: ^版本号
然后运行以下命令以获取依赖项:
flutter pub get更多关于Flutter插件three_commas的使用介绍的实战教程也可以访问 https://www.itying.com/category-92-b0.html
1 回复


