User's AMM join/exit transactions
流量控制: 5 每 秒
摘要
HTTP 方法
GET
访问路径
/api/v3/amm/user/transactions
功能
Return the user's AMM join/exit transactions
API 描述
HTTP头
无
请求参数
字段 | 类型 | 必须 | 说明 | 举例 |
---|---|---|---|---|
accountId | integer | 否 | Looprings account identifier. | 1578558098000 |
start | integer | 否 | Date from which to start fetching AMM transactions. | 1578558098000 |
end | integer | 否 | End Date of the query | 1578558098000 |
limit | integer | 否 | Used to limit the number of returned records. Useful in implementing pagination. | 50 |
offset | integer | 否 | Used to apply an offset when looking for valid records. Useful in implementing | 0 |
txTypes | string | 否 | Transaction type: join or exit | "0" |
txStatus | string | 否 | The AMM transaction status. | "0" |
ammPoolAddress | string | 否 | The address of the pool on which the swap was submitted. | "0" |
请求示例
HTTP
CURL
GET https://api3.loopring.io/api/v3/amm/user/transactions?accountId=1578558098000&start=1578558098000&end=1578558098000&limit=50&offset=0&txTypes=0&txStatus=0&ammPoolAddress=0 HTTP/1.1
Host: api3.loopring.io
Connection: keep-alive
Accept: */*
Accept-Encoding: gzip, deflate, br
Accept-Language: zh,en;q=0.9
curl https://api3.loopring.io/api/v3/amm/user/transactions\?accountId\=1578558098000\&start\=1578558098000\&end\=1578558098000\&limit\=50\&offset\=0\&txTypes\=0\&txStatus\=0\&ammPoolAddress\=0
响应字段
字段 | 类型 | 必须 | 说明 | 举例 |
---|---|---|---|---|
totalNum | integer | 是 | Number of AMM pool transactions | 10 |
transactions | List[Amm Transaction DataV3] |
是 | List of AMM pool transactions | / |
响应示例
{
"totalNum" : 10,
"transactions" : [
{
"hash" : "0xf7c932351186c3a9053f313eefa16209c018f7f1dba8aa8ca7100400f7c31085",
"txType" : "join",
"txStatus" : "processing",
"ammPoolAddress" : "0xbbbbca6a901c926f240b89eacb641d8aec7aeafd",
"ammLayerType" : "layer_2",
"poolTokens" : [
{
"tokenId" : 0,
"amount" : "1000000",
"actualAmount" : "100000",
"feeAmount" : "500000"
}
],
"lpToken" : {
"tokenId" : 0,
"amount" : "1000000",
"actualAmount" : "100000",
"feeAmount" : "500000"
},
"createdAt" : 1608189538074,
"updatedAt" : 1608209538074,
"blockId" : integer,
"indexInBlock" : integer,
"storageInfo" : [
{
"accountId" : integer,
"tokenId" : integer,
"storageId" : integer
}
]
}
]
}
状态码
状态码 | 描述 |
---|---|
100000 | Unknown error |
107001 | User ID cannot be empty |
104001 | Empty ApiKey |
104002 | Invalid ApiKey |
104003 | Invalid Account ID |
模型
AmmTransactionDataV3
AMM transaction info data
字段 | 类型 | 必须 | 说明 | 举例 |
---|---|---|---|---|
hash | string | 是 | AMM transaction hash | "0xf7c9323511 86c3a9053f31 3eefa16209c0 18f7f1dba8aa 8ca7100400f7 c31085" |
txType | string | 是 | AMM transaction type, i.e., join, exit, etc 取值范围 : ['join', 'exit'] |
"join" |
txStatus | string | 是 | AMM transaction processing status, i.e., processing, processed, failed, etc 取值范围 : ['processing', 'cancelled', 'processed'] |
"processing" |
ammPoolAddress | string | 是 | AMM pool address of query | "0xbbbbca6a90 1c926f240b89 eacb641d8aec 7aeafd" |
ammLayerType | string | 是 | AMM transaction layer, 1 or 2 取值范围 : ['layer_1', 'layer_2'] |
"layer_2" |
poolTokens | List[Amm Transfer DataV3] |
是 | The in pool tokens transfers records of the AMM transaction | / |
lpToken | Amm Transfer DataV3 |
是 | The lp tokens transfers records of the AMM transaction | / |
createdAt | integer | 是 | Transaction creation time | 1608189538074 |
updatedAt | integer | 是 | Transaction update time | 1608209538074 |
blockId | integer | 是 | / | |
indexInBlock | integer | 是 | / | |
storageInfo | List[Storage Info] |
否 | / |
AmmTransferDataV3
AMM transfer info data
字段 | 类型 | 必须 | 说明 | 举例 |
---|---|---|---|---|
tokenId | integer | 是 | AMM transfer token id | 0 |
amount | string | 是 | AMM transfer token amount | "1000000" |
actualAmount | string | 是 | Actual AMM transfer token amount due to precision processing | "100000" |
feeAmount | string | 是 | Actual AMM transfer fee amount | "500000" |
StorageInfo
字段 | 类型 | 必须 | 说明 | 举例 |
---|---|---|---|---|
accountId | integer | 是 | / | |
tokenId | integer | 是 | / | |
storageId | integer | 是 | / |