Get user onchain withdrawal history
流量控制: 5 每 秒
摘要
HTTP 方法
GET
访问路径
/api/v3/user/withdrawals
功能
Get user onchain withdrawal history.
API 描述
HTTP头
字段 | 类型 | 必须 | 说明 | 举例 |
---|---|---|---|---|
X-API-KEY | string | 是 | ApiKey | "HlkcGxbqBeaF76j4rvPaOasyfPwnkQ 6B6DQ6THZWbvrAGxzEdulXQvOKLrRW ZLnN" |
请求参数
字段 | 类型 | 必须 | 说明 | 举例 |
---|---|---|---|---|
accountId | integer | 是 | Account ID, some hash query APIs doesnt need it if in hash query mode, check require flag of each API to see if its a must. | 1 |
start | integer | 否 | Start time in milliseconds 默认值 : 0L |
1578558098000 |
end | integer | 否 | End time in milliseconds 默认值 : 0L |
1578558098000 |
status | string | 否 | Comma separated status values 取值范围 : ['processing', 'processed', 'received', 'failed'] |
"processing,p rocessed" |
limit | integer | 否 | Number of records to return | 50 |
tokenSymbol | string | 否 | Token to filter. If you want to return deposit records for all tokens, omit this parameter | "LRC" |
offset | integer | 否 | Number of records to skip 默认值 : 0L |
1 |
withdrawalTypes | string | 否 | request.getUserTxs.withdrawalTypes 取值范围 : ['force_withdrawal', 'offchain_withdrawal'] |
"force_withdr awal" |
hashes | string | 否 | The hashes (split by ,) of the transactions, normally its L2 tx hash, except the deposit which uses L1 tx hash. | "0xf7c9323511 86c3a9053f31 3eefa16209c0 18f7f1dba8aa 8ca7100400f7 c31085" |
请求示例
HTTP
CURL
GET https://api3.loopring.io/api/v3/user/withdrawals?accountId=1&start=1578558098000&end=1578558098000&status=processing,processed&limit=50&tokenSymbol=LRC&offset=1&withdrawalTypes=force_withdrawal&hashes=0xf7c932351186c3a9053f313eefa16209c018f7f1dba8aa8ca7100400f7c31085 HTTP/1.1
Host: api3.loopring.io
Connection: keep-alive
Accept: */*
Accept-Encoding: gzip, deflate, br
Accept-Language: zh,en;q=0.9
X-API-KEY: sra1aavfa
curl -H "X-API-KEY:sra1aavfa" https://api3.loopring.io/api/v3/user/withdrawals\?accountId\=1\&start\=1578558098000\&end\=1578558098000\&status\=processing,processed\&limit\=50\&tokenSymbol\=LRC\&offset\=1\&withdrawalTypes\=force_withdrawal\&hashes\=0xf7c932351186c3a9053f313eefa16209c018f7f1dba8aa8ca7100400f7c31085
响应字段
字段 | 类型 | 必须 | 说明 | 举例 |
---|---|---|---|---|
totalNum | integer | 是 | Total number of records found | 1 |
transactions | List[Withdrawal Data] |
是 | List of OnchainWithdrawalRecord | / |
响应示例
{
"totalNum" : 1,
"transactions" : [
{
"id" : 1,
"txType" : "FORCE_WITHDRAWAL",
"hash" : "0x9d114267e8b261457d567093c13cf3deea5f14c9235be26c6fa833dba12a9632",
"symbol" : "LRC",
"amount" : "1000000000000000000",
"txHash" : "0x9d114267e8b261457d567093c13cf3deea5f14c9235be26c6fa833dba12a9632",
"feeTokenSymbol" : "ETH",
"feeAmount" : "1000000000000000",
"status" : "processing",
"progress" : "100%",
"timestamp" : 1578572292000,
"blockNum" : 100,
"updatedAt" : 1578572292000,
"distributeHash" : "0x9d114267e8b261457d567093c13cf3deea5f14c9235be26c6fa833dba12a9632",
"requestId" : 1,
"fastStatus" : "EMPTY",
"blockId" : integer,
"indexInBlock" : integer
}
]
}
状态码
状态码 | 描述 |
---|---|
100000 | Unknown error |
107001 | User ID cannot be empty |
104001 | Empty ApiKey |
104002 | Invalid ApiKey |
104003 | Invalid Account ID |
模型
WithdrawalData
Response data
字段 | 类型 | 必须 | 说明 | 举例 |
---|---|---|---|---|
id | integer | 是 | Unique ID | 1 |
txType | string | 是 | User transaction type | "FORCE_WITHDR AWAL" |
hash | string | 是 | hash | "0x9d114267e8 b261457d5670 93c13cf3deea 5f14c9235be2 6c6fa833dba1 2a9632" |
symbol | string | 是 | Token symbol | "LRC" |
amount | string | 是 | Amount requested by the user | "100000000000 0000000" |
txHash | string | 是 | Transaction hash | "0x9d114267e8 b261457d5670 93c13cf3deea 5f14c9235be2 6c6fa833dba1 2a9632" |
feeTokenSymbol | string | 是 | Fee token symbol | "ETH" |
feeAmount | string | 是 | Fee amount in wei | "100000000000 0000" |
status | string | 是 | Current status 取值范围 : ['processing', 'processed', 'received', 'failed'] |
"processing" |
progress | string | 是 | Progress | "100%" |
timestamp | integer | 是 | Create time | 1578572292000 |
blockNum | integer | 是 | Block height | 100 |
updatedAt | integer | 是 | Update time | 1578572292000 |
distributeHash | string | 是 | Distribute Hash | "0x9d114267e8 b261457d5670 93c13cf3deea 5f14c9235be2 6c6fa833dba1 2a9632" |
requestId | integer | 否 | Request Id | 1 |
fastStatus | string | 否 | Fast withdrawal status 取值范围 : ['EMPTY', 'PROCEEING', 'SUCCESSED', 'FAILED'] |
"EMPTY" |
blockId | integer | 是 | / | |
indexInBlock | integer | 是 | / |