Get AMM pool balance snapshot
Rate limit: 5 every second
API Overview
HTTP method
GET
Path
/api/v3/amm/balance
Summary
Returns the snapshot of specific AMM pool
API description
HTTP Header
Field | Type | Required | Description | Example |
---|---|---|---|---|
X-API-KEY | string | Y | ApiKey | "HlkcGxbqBeaF76j4rvPaOasyfPwnkQ 6B6DQ6THZWbvrAGxzEdulXQvOKLrRW ZLnN" |
Request parameters
Field | Type | Required | Description | Example |
---|---|---|---|---|
poolAddress | string | Y | input AMM pool address | "0xbbbbca6a90 1c926f240b89 eacb641d8aec 7aeafd" |
Request example
HTTP
CURL
GET https://api3.loopring.io/api/v3/amm/balance?poolAddress=0xbbbbca6a901c926f240b89eacb641d8aec7aeafd 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/amm/balance\?poolAddress\=0xbbbbca6a901c926f240b89eacb641d8aec7aeafd
Response fields
Field | Type | Required | Description | Example |
---|---|---|---|---|
poolName | string | Y | field.AmmSnapshot.poolName | "AMM-LRC-ETH" |
poolAddress | string | Y | field.AmmSnapshot.poolAddress | "0xbbbbca6a90 1c926f240b89 eacb641d8aec 7aeafd" |
pooled | List[Token VolumeV3] |
Y | AMM in pool tokens balances | "[{tokenId: 0, volume:10000 00000}, {tokenId: 1, volume:10000 00000}]" |
lp | Token VolumeV3 |
Y | AMM pool mint token balance | "{tokenId: 0, volume:10000 00000}" |
risky | boolean | Y | AMM pool risky flag, true if AMM pool TVL is low which means big slippage. | "false" |
Response example
{
"poolName" : "AMM-LRC-ETH",
"poolAddress" : "0xbbbbca6a901c926f240b89eacb641d8aec7aeafd",
"pooled" : [{tokenId: 0, volume:1000000000}, {tokenId: 1, volume:1000000000}],
"lp" : {
"tokenId" : 0,
"volume" : "1000000000000"
},
"risky" : false
}
Status code
Value | Description |
---|---|
100000 | Unknown error |
Model
TokenVolumeV3
Wrapper object used to describe a token associated with a certain quantity.
Field | Type | Required | Description | Example |
---|---|---|---|---|
tokenId | integer | Y | The Loopring's token identifier. | 0 |
volume | string | Y | The volume of the token | "100000000000 0" |