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[AmmTransactionDataV3] 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
        }
    ]
}

状态码

状态码 描述
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 "0xf7c932351186c3a905
3f313eefa16209c018f7
f1dba8aa8ca7100400f7
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 "0xbbbbca6a901c926f24
0b89eacb641d8aec7aea
fd"
ammLayerType string AMM transaction layer, 1 or 2
取值范围 : ['layer_1', 'layer_2']
"layer_2"
poolTokens List[AmmTransferDataV3] The in pool tokens transfers records of the AMM transaction /
lpToken AmmTransferDataV3 The lp tokens transfers records of the AMM transaction /
createdAt integer Transaction creation time 1608189538074
updatedAt integer Transaction update time 1608209538074

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"

results matching ""

    No results matching ""