get AMM pool trade transactions
Rate limit: 5 every second
API Overview
HTTP method
GET
Path
/api/v3/amm/trades
Summary
get AMM pool trade transactions
API description
HTTP Header
None
Request parameters
Field | Type | Required | Description | Example |
---|---|---|---|---|
ammPoolAddress | string | Y | The address of the pool on which the swap was submitted. | "0xbbbbca6a90 1c926f240b89 eacb641d8aec 7aeafd" |
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 |
Request example
HTTP
CURL
GET https://api3.loopring.io/api/v3/amm/trades?ammPoolAddress=0xbbbbca6a901c926f240b89eacb641d8aec7aeafd&limit=50&offset=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/trades\?ammPoolAddress\=0xbbbbca6a901c926f240b89eacb641d8aec7aeafd\&limit\=50\&offset\=0
Response fields
Field | Type | Required | Description | Example |
---|---|---|---|---|
totalNum | integer | Y | Number of trades | 12345 |
trades | List[AmmTrade DataV3] |
Y | AMM trade list | / |
Response example
{
"totalNum" : 12345,
"trades" : [
{
"accountId" : 12345,
"orderHash" : "0xf7c932351186c3a9053f313eefa16209c018f7f1dba8aa8ca7100400f7c31085",
"market" : "AMM-DAI-ETH",
"side" : "BUY",
"size" : "100000000",
"price" : 0.03,
"feeAmount" : "100000000",
"createdAt" : 1608189538074
}
]
}
Status code
Value | Description |
---|---|
100000 | Unknown error |
107001 | User ID cannot be empty |
104001 | Empty ApiKey |
104002 | Invalid ApiKey |
104003 | Invalid Account ID |
Model
AmmTradeDataV3
AMM trade info data
Field | Type | Required | Description | Example |
---|---|---|---|---|
accountId | integer | Y | trader's accountId | 12345 |
orderHash | string | Y | AMM trade's order hash | "0xf7c9323511 86c3a9053f31 3eefa16209c0 18f7f1dba8aa 8ca7100400f7 c31085" |
market | string | Y | The trade market | "AMM-DAI-ETH" |
side | string | Y | The trade direction, buy or sell Allowable : ['BUY', 'SELL'] |
"BUY" |
size | string | Y | The trade volume | "100000000" |
price | number | Y | The trade price | 0.03 |
feeAmount | string | Y | The trade fee | "100000000" |
createdAt | integer | Y | The trade's creation time | 1608189538074 |