received amount query
權限限制: Token Authencation. Token 可以經由
/api/auth/token取得
description
使用 product_id 查詢收到的代幣數量,價格以美元和代幣計算。
或者使用 me 來查詢所有屬於 user token 的所有已成功收款資料。
Method
GET
Endpoint
/api/transactions/{product_id}/received_amount
or
/api/transactions/me/received_amount
Request Header
{
"Authorization": "Bearer {token}"
}
Response
query success
- HTTP Status Code: 200
{
"estimate_usd_price": 4.009576614388829,
"details": [
{
"product_id": "82767cb6-93b7-4966-8ac3-9b210f4987ea",
"total_received_token_amount": 2.0,
"token_info": {
"token_address": "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
"network": "Avalanche",
"usd_price": 1.0,
"token_name": "usdc"
}
},
{
"product_id": "8091382b-d52b-4964-9d45-485c97a5106d",
"total_received_token_amount": 0.0,
"token_info": {
"token_address": "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
"network": "Avalanche",
"usd_price": 1.0,
"token_name": "usdc"
}
},
{
"product_id": "5ea2d599-a540-49a6-ad5f-7deda1e55783",
"total_received_token_amount": 2.0,
"token_info": {
"token_address": "0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7",
"network": "Avalanche",
"usd_price": 1.0047883071944141,
"token_name": "usdt"
}
}
]
}
User verification failed
- HTTP Status Code: 401
{
"detail": "Invalid token.",
}