交易所授权订单-gendexoperatorordertx

生成的dex订单,支持交易所操作,在提交之前必须经过签名

作用
一是为了可以一单一个费率,二是交易所可以帮提交矿工费

Parameters
gendexoperatorordertx "sender" "order_type" "order_side" "symbol:coins:unit" "symbol:assets:unit" price dex_id "open_mode" taker_fee_ratio maker_fee_ratio "[symbol:fee:unit]" "[symbol:operator_tx_fee:unit]" "[memo]"

sender (string required) 签名发起者的地址

order_type (string required) 订单类型,必须是在这两种内限价或是市价(LIMIT_PRICE, MARKET_PRICE)

order_side (string required) 订单状态,必须在这两种内 买单或是卖单(BUY, SELL)

symbol:coins:unit (string:numeric:string, required) 订单的货币,如果不是市价买单,则订单货币为0,默认货币类型为WUSD,默认货币单位是sawi

symbol:assets:unit (string:numeric:string, required) 订单的资产,如果是市价买订单,则资产为0,默认货币类型是WICC,默认货币单位是sawi

price (numeric, required) 期望订单的价格,填的数为放大100000000倍后的数

dex_id (numeric, required) DEX交易所的id

open_mode (string, required) 指出这个订单是PUBLIC 还是 PRIVATE

taker_fee_ratio (numeric, required) 吃单费率 填放大100000000 倍后的数

maker_fee_ratio (numeric, required) 挂单费率 填放大100000000 倍后的数

symbol:fee:unit (string:numeric:string, optional) 给矿工的费用,默认是 WICC:10000:sawi

symbol:operator_tx_fee:unit (string:numeric:string, optional) 交易所给矿工的费用,必须跟费用匹配,默认为WICC:0:sawi

memo (string, optional) 备注

Result
txid (string) 提交后的哈希

Examples

// Request
root@0e7612ac5bc5:/opt/wicc# coind gendexoperatorordertx 0-1 LIMIT_PRICE SELL WUSD:0 WICC:20000000000:sawi 100000000000 0 PUBLIC 8000 4000

// Respond
{
    "rawtx" : "5b0180b65e0200010457494343858c20010204574943430457555344c9bfde8f000081f3c2dacf0000019e20bd4002080300000000"
}

// As json rpc call
> curl --user myusername -d '{"jsonrpc": "1.0", "id":"curltest", "method": "gendexoperatorordertx", "params": ["10-3", "LIMIT_PRICE", "BUY", "WUSD:0", "WICC:2000000000:sawi", 100000000, 0, "PUBLIC", 80000, 40000
] }' -H 'Content-Type: application/json;' http://127.0.0.1:8332/