Skip to content

BaerChain cancelPendingOrder transaction

woodbaer edited this page Aug 23, 2019 · 4 revisions

撤单交易(cancelPendingOrder)

请求json文件

{
	"from":"e523e7c59a0725afd08bc9751c89eed6f8e16dec",
	"to":"0x00000000000000000000000000000000766f7465",
	"value":"0x0",
	"data":[
		{
	 	"type":4,
		"cancelType":3
	         "m_hash":"0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
		}
	],
	"chainId":"0x1",
	"nonce":"0x0",
	"gas":"0x13880",
	"gasPrice":"0x5"
}
from     :类型string,撤单地址
to       :类型string,固定地址,不能更改
data     : 撤单数据 
           > type       : 类型为int,固定为4,表示撤单交易
		   > cancelType : 类型为int,固定为3, 默认值 
           > m_hash     : 类型string,被撤销单的hash值,通过hash值找到所挂的单,然后撤销挂单
value    : 类型string,默认为"0x0"
chainId  : 类型string,链ID,16进制 必须和链创世chainId相同
nonce    : 类型string,16进制,nonce值,每次执行后+1
gas      : 类型string,16进制,为交易执行提供的 gas 整数
gasPrice : 类型string,16进制,用于每一个支付 gas 的 gasPrice 整数

备注:当to填其他地址,且data不为空时,默认to为调用的合约地址,且将from中转出value(value如果也有值)的值到to中,一般禁止此种操作

Clone this wiki locally