Send a raw Ethereum transaction

Rate limit: 3 every second

API Overview


HTTP method

POST

Path

/api/v2/sendEthTx

Summary

Relay a raw Ethereum transaction to Ethereum mainnet.

API description


HTTP Header

Field Type Required Description Example
X-API-KEY string Y ApiKey "HlkcGxbqBeaF76j4rvPaOasyfPwnkQ
6B6DQ6THZWbvrAGxzEdulXQvOKLrRW
ZLnN"

Request parameters

Field Type Required Description Example
data string Y Serialized Ethereum signature transaction as hexadecimal string "0xf8aa0a8502540be400
830186a0949032dbf566
9341c3d95bc02b4bde90
e4e051db3580b844095e
a7b30000000000000000
000000001d307532a978
79b866a6fe33bf4a517b
d28de854ffffffffffff
ffffffffffffffffffff
ffffffffffffffffffff
ffffffffffff25a071af
95d2a3eb01bb11f84d9c
66d09924d97a2b3ce38e
0079a2d56dfb13035df0
a07404b3a48c40cc3e7b
9893d88512ef526a67bf
3c274548ec09f94386e0
062fc2"

Request example

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"
}'

Response fields

Field Type Required Description Example
resultInfo ResultInfo Y Information returned by the API /
data string N Transaction hash "0x28251d0415096a5496
04350e5ad1ff53f88b83
4bd195aa05b50610da41
eff886"

Response example

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

Status code

Value Description
100000 Unknown error
104202 The current node service is not available
104205 Error in internal request
104208 Unknown error in Ethereum node

results matching ""

    No results matching ""