CLI 交易(贝塔)
导言
该命令行界面(CLI)提供了一套与交易系统交互的命令。这些命令涵盖各种操作,如下达市价订单和限价订单、取消订单以及管理自定义命令的别名。
目录
订单行动
- 买入: 启动买入指令。
- 卖出: 发出卖出指令。
- 长: 相当于 "买入"。
- 短: 相当于 "卖出"。
订单类型
- 市场: 下达市价订单。
- 限制: 下达限价订单。
- stop: 下达止损订单。
订购参数
- 数字: 代表数值(浮点数或整数)。
- symbol: 代表一种交易工具(至少 5 个字符)。
- post: 指定 "仅限过账 "订单。
- reduce: 指定 "仅限减仓 "订单。
- word: 代表一个单词。
- usd_currency: 代表美元货币符号(如"$"、"d dollars"、"usd")。
命令
市场订单
Grammar:
[order_type 'market'] <action: buy | sell | long | short> [usd_currency] <amount: number> [usd_currency] [usd_currency] [of] <symbol: symbol> [with [exec_params: post | reduce | <trigger type> | <margin mode> | <position mode> | bind stops]]
Example:
market buy 10 BTC with post
限价订单
Grammar:
[order_type 'limit'] <action: buy | sell | long | short> [usd_currency] <amount: number> [usd_currency] [usd_currency] [of] <symbol: symbol> at [$] <price: number> [with [exec_params: post | reduce | <trigger type> | <margin mode> | <position mode> | bind stops]]
Example:
limit sell 5 ETH at $200 with reduce
停止令
Grammar:
[order_type 'stop'] <action: buy | sell | long | short> [usd_currency] <amount: number> [usd_currency] [usd_currency] [of] <symbol: symbol> at [$] <price: number> [with [exec_params: post | reduce | <trigger type> | <margin mode> | <position mode> | bind stops]]
Example:
stop sell 2 BTC at $35000 with post, reduce, mark
取消所有订单
Grammar:
cancel [all] orders
Example:
cancel all orders