发送以太坊交易

流量控制: 5 每 秒

摘要


HTTP 方法

POST

访问路径

/api/v2/sendEthTx

功能

deposit,onchainWithdrawal,createAccount,updatePassword,enableToken 均使用该接口

API 描述


HTTP头

字段 类型 必须 说明 举例
X-API-KEY string ApiKey "HlkcGxbqBeaF76j4rvPaOasyfPwnkQ
6B6DQ6THZWbvrAGxzEdulXQvOKLrRW
ZLnN"

请求参数

字段 类型 必须 说明 举例
data string 序列化的以太坊签名交易,16进制形式字符串 "0xf8aa0a8502540be400
830186a0949032dbf566
9341c3d95bc02b4bde90
e4e051db3580b844095e
a7b30000000000000000
000000001d307532a978
79b866a6fe33bf4a517b
d28de854ffffffffffff
ffffffffffffffffffff
ffffffffffffffffffff
ffffffffffff25a071af
95d2a3eb01bb11f84d9c
66d09924d97a2b3ce38e
0079a2d56dfb13035df0
a07404b3a48c40cc3e7b
9893d88512ef526a67bf
3c274548ec09f94386e0
062fc2"

请求示例

HTTP
CURL
POST https://api.loopring.io/api/v2/sendEthTx HTTP/1.1
Host: api.loopring.io
Connection: keep-alive
Accept: */*
Accept-Encoding: gzip, deflate, br
Accept-Language: zh,en;q=0.9
X-API-KEY: sra1aavfa
Content-Type: application/json

{
    "data" : "0xf8aa0a8502540be400830186a0949032dbf5669341c3d95bc02b4bde90e4e051db3580b844095ea7b30000000000000000000000001d307532a97879b866a6fe33bf4a517bd28de854ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff25a071af95d2a3eb01bb11f84d9c66d09924d97a2b3ce38e0079a2d56dfb13035df0a07404b3a48c40cc3e7b9893d88512ef526a67bf3c274548ec09f94386e0062fc2"
}
curl -X POST -H "X-API-KEY:sra1aavfa" -H "Content-Type:application/json" https://api.loopring.io/api/v2/sendEthTx -d \
'{
    "data" : "0xf8aa0a8502540be400830186a0949032dbf5669341c3d95bc02b4bde90e4e051db3580b844095ea7b30000000000000000000000001d307532a97879b866a6fe33bf4a517bd28de854ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff25a071af95d2a3eb01bb11f84d9c66d09924d97a2b3ce38e0079a2d56dfb13035df0a07404b3a48c40cc3e7b9893d88512ef526a67bf3c274548ec09f94386e0062fc2"
}'

响应字段

字段 类型 必须 说明 举例
resultInfo ResultInfo API返回信息 /
data string 发送的交易的哈希 "0x28251d0415096a5496
04350e5ad1ff53f88b83
4bd195aa05b50610da41
eff886"

响应示例

{
    "resultInfo" : {
        "code" : 0,
        "message" : "SUCCESS"
    },
    "data" : "0x28251d0415096a549604350e5ad1ff53f88b834bd195aa05b50610da41eff886"
}

状态码

状态码 描述
100000 未知错误
104202 当前节点服务不可用
104205 内部请求出错
104208 节点服务返回错误信息

results matching ""

    No results matching ""