Skip to main content

received amount query

Token Authencation. you can get access token from /api/auth/token

description

query how much token received using product_id, price are both in usd or token.

or use me to query all data belong to user in Bearer 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.",
}