User's AMM join/exit transactions

Rate limit: 5 every second

API Overview


HTTP method

GET

Path

/api/v3/amm/user/transactions

Summary

Return the user's AMM join/exit transactions

API description


HTTP Header

None

Request parameters

Field Type Required Description Example
accountId integer N Looprings account identifier. 1578558098000
start integer N Date from which to start fetching AMM transactions. 1578558098000
end integer N End Date of the query 1578558098000
limit integer N Used to limit the number of returned records. Useful in implementing pagination. 50
offset integer N Used to apply an offset when looking for valid records. Useful in implementing 0
txTypes string N Transaction type: join or exit "0"
txStatus string N The AMM transaction status. "0"
ammPoolAddress string N The address of the pool on which the swap was submitted. "0"

Request example

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

Response fields

Field Type Required Description Example
totalNum integer Y Number of AMM pool transactions 10
transactions List[Amm
Transaction
DataV3
]
Y List of AMM pool transactions /

Response example

{
  "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
        }
      ]
    }
  ]
}

Status code

Value Description
100000 Unknown error
107001 User ID cannot be empty
104001 Empty ApiKey
104002 Invalid ApiKey
104003 Invalid Account ID

Model


AmmTransactionDataV3

AMM transaction info data

Field Type Required Description Example
hash string Y AMM transaction hash "0xf7c9323511
86c3a9053f31
3eefa16209c0
18f7f1dba8aa
8ca7100400f7
c31085"
txType string Y AMM transaction type, i.e., join, exit, etc
Allowable : ['join', 'exit']
"join"
txStatus string Y AMM transaction processing status, i.e., processing, processed, failed, etc
Allowable : ['processing', 'cancelled', 'processed']
"processing"
ammPoolAddress string Y AMM pool address of query "0xbbbbca6a90
1c926f240b89
eacb641d8aec
7aeafd"
ammLayerType string Y AMM transaction layer, 1 or 2
Allowable : ['layer_1', 'layer_2']
"layer_2"
poolTokens List[Amm
Transfer
DataV3
]
Y The in pool tokens transfers records of the AMM transaction /
lpToken Amm
Transfer
DataV3
Y The lp tokens transfers records of the AMM transaction /
createdAt integer Y Transaction creation time 1608189538074
updatedAt integer Y Transaction update time 1608209538074
blockId integer Y /
indexInBlock integer Y /
storageInfo List[Storage
Info
]
N /

AmmTransferDataV3

AMM transfer info data

Field Type Required Description Example
tokenId integer Y AMM transfer token id 0
amount string Y AMM transfer token amount "1000000"
actualAmount string Y Actual AMM transfer token amount due to precision processing "100000"
feeAmount string Y Actual AMM transfer fee amount "500000"

StorageInfo

Field Type Required Description Example
accountId integer Y /
tokenId integer Y /
storageId integer Y /

results matching ""

    No results matching ""