auth
-
registro
-
validacion
-
login
crear portfolio - crear api keys
- set_api_keys
crear portfolio - crear portfolio para carga datos manual
- get_api_keys
{
"id": 154,
"source": "Manual",
"nombre": "ManualFastapi"
}
- (con
iddel ultimo lugar de la respuesta de get_api_keys)
create portfolio
{
"id": 59,
"description": "Manual 2342",
"user_id": 9,
"name": "Manual Fast Api",
"apis_and_carts": [
154
]
}
portfolio manual
cargar transacciones
- cargar deposito exchanges/add-transactions-manally
ej
[deposits - deposito]
{
"api_key_id": 154,
"trades": [],
"deposits": [
{
"asset": "USDT",
"amount": 1,
"time": "2024-12-28",
"status": "SUCCESS",
"txid": "USDT deposit - 2024-12-28 - 41acb507-0b7f-4ee5-bfee-22b1bd6b5e47",
"method": "blockchain",
"aclass": "currency",
"info": "USDT deposit",
"fee": 0
}
],
"withdrawals": [],
"stakings": []
}
[withdrawals - retiro]
{
"api_key_id": 154,
"trades": [],
"deposits": [],
"withdrawals": [
{
"asset": "USDT",
"amount": 0.5,
"time": "2024-12-28",
"status": "SUCCESS",
"txid": "withdrawal-878f6392-4973-4ff1-ba7d-b8e5254a441f",
"method": "blockchain",
"aclass": "currency",
"info": "USDT withdrawal",
"fee": 0,
"key": "withdrawal-878f6392-4973-4ff1-ba7d-b8e5254a441f",
"network": "USDT"
}
],
"stakings": []
}
[trade - compra ]
{
"api_key_id": 154,
"trades": [
{
"order_id": "USDT_1735411081533",
"symbol": "USDT-USDT",
"price": 0.998518,
"qty": 1,
"commission": 0,
"commission_asset": "USDT",
"time": "2024-12-28",
"trade_type": "buy",
"order_type": "limit",
"is_best_match": true
}
],
"deposits": [],
"withdrawals": [],
"stakings": []
}
[trade - venta]
{
"api_key_id": 154,
"trades": [
{
"order_id": "USDT_1735411115823",
"symbol": "USDT-USDT",
"price": 0.998518,
"qty": 1,
"commission": 0,
"commission_asset": "USDT",
"time": "2024-12-28",
"trade_type": "sell",
"order_type": "limit",
"is_best_match": true
}
],
"deposits": [],
"withdrawals": [],
"stakings": []
}
[staking - stake]
{
"api_key_id": 154,
"trades": [],
"deposits": [],
"withdrawals": [],
"stakings": [
{
"asset": "USDT",
"amount": "1",
"time": "2024-12-28",
"fee": 0,
"balance": "1",
"refid": "stake-01d35191-6df6-4e4a-97d7-b43c76cf3310",
"subtype": "stake"
}
]
}
[staking - unstake]
{
"api_key_id": 154,
"trades": [],
"deposits": [],
"withdrawals": [],
"stakings": [
{
"asset": "USDT",
"amount": "1",
"time": "2024-12-28",
"fee": 0,
"balance": "1",
"refid": "unstake-4f45b866-570d-4dcc-9c64-70b9639f0a3e",
"subtype": "unstake"
}
]
}
calcular portfolio - asset location
- (con portfolio id) /portfolios/calculate-portfolio
{
"message": "Portfolio calculation started",
"task_id": 25
}
- (con id de la tarea)
{
"task_id": 25,
"user_id": 9,
"status": "Completed",
"started_at": "2024-12-28T18:48:07",
"finished_at": "2024-12-28T18:48:09",
"result": "Portfolio calculated and information stored successfully"
}
- calcular asset-allocation (tabla) /analytics/calculate-portfolio/asset-allocation
{
"asset_allocation": [
{
"asset": "USDT",
"asset_name": "Tether USDT",
"asset_sector": "Stablecoin",
"asset_industry": "Fiat Respalded",
"price": 0.998518,
"holding": 1,
"avg_buy_price": null,
"avg_sell_price": null,
"profit_loss": null,
"profit_loss_7d": null,
"profit_loss_30d": null
}
]
}
- calcular asset-allocation (charts) /analytics/calculate-portfolio/allocation-by-token
{
"allocation_by_token": [
{
"asset": "USDT",
"asset_name": "Tether USDT",
"total_price_usd": 0.998518,
"sector": "Stablecoin",
"industry": "Fiat Respalded"
}
]
}
-
subo nueva operacion
-
calcula portfolio obtiene tarea
-
consulta estado de la tarea obtiene tarea success
-
frontend actualiza estado de informacion y rerenderiza elementos con data actualizada
[asset allocation calculos]
#calculos que se actualizan de manera diaria
-[ ] calculo precio actual
-[x] calculo holdings
-[ ] avg buy (promedio compra)
(trade tipo buy)
-[ ] avg sell (promedio venta)
-[ ] profit/loss