Get AMM pool balance snapshot
流量控制: 5 每 秒
摘要
HTTP 方法
GET
访问路径
/api/v3/amm/balance
功能
Returns the snapshot of specific AMM pool
API 描述
HTTP头
字段 | 类型 | 必须 | 说明 | 举例 |
---|---|---|---|---|
X-API-KEY | string | 是 | ApiKey | "HlkcGxbqBeaF76j4rvPaOasyfPwnkQ 6B6DQ6THZWbvrAGxzEdulXQvOKLrRW ZLnN" |
请求参数
字段 | 类型 | 必须 | 说明 | 举例 |
---|---|---|---|---|
poolAddress | string | 是 | input AMM pool address | "0xbbbbca6a90 1c926f240b89 eacb641d8aec 7aeafd" |
请求示例
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
响应字段
字段 | 类型 | 必须 | 说明 | 举例 |
---|---|---|---|---|
poolName | string | 是 | field.AmmSnapshot.poolName | "AMM-LRC-ETH" |
poolAddress | string | 是 | field.AmmSnapshot.poolAddress | "0xbbbbca6a90 1c926f240b89 eacb641d8aec 7aeafd" |
pooled | List[Token VolumeV3] |
是 | AMM in pool tokens balances | "[{tokenId: 0, volume:10000 00000}, {tokenId: 1, volume:10000 00000}]" |
lp | Token VolumeV3 |
是 | AMM pool mint token balance | "{tokenId: 0, volume:10000 00000}" |
risky | boolean | 是 | AMM pool risky flag, true if AMM pool TVL is low which means big slippage. | "false" |
响应示例
{
"poolName" : "AMM-LRC-ETH",
"poolAddress" : "0xbbbbca6a901c926f240b89eacb641d8aec7aeafd",
"pooled" : [{tokenId: 0, volume:1000000000}, {tokenId: 1, volume:1000000000}],
"lp" : {
"tokenId" : 0,
"volume" : "1000000000000"
},
"risky" : false
}
状态码
状态码 | 描述 |
---|---|
100000 | Unknown error |
模型
TokenVolumeV3
Wrapper object used to describe a token associated with a certain quantity.
字段 | 类型 | 必须 | 说明 | 举例 |
---|---|---|---|---|
tokenId | integer | 是 | The Loopring's token identifier. | 0 |
volume | string | 是 | The volume of the token | "100000000000 0" |