Portfolio
Portfolio management - view balances, positions, and performance metrics
curl -X GET "https://loading/api/v1/portfolio/health"{}Get Portfolio Balances
Authorization
HTTPBearer In: header
Query Parameters
Exchange to query balances from
"binanceus"Response Body
application/json
application/json
curl -X GET "https://loading/api/v1/portfolio/balances"{}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}Get Portfolio Aggregate
Authorization
HTTPBearer In: header
Response Body
application/json
curl -X GET "https://loading/api/v1/portfolio/aggregate"{}Get Portfolio Cost Basis
Authorization
HTTPBearer In: header
Response Body
application/json
curl -X GET "https://loading/api/v1/portfolio/cost-basis"{}Get Account Cost Basis Lots
Authorization
HTTPBearer In: header
Response Body
application/json
curl -X GET "https://loading/api/v1/portfolio/cost-basis/lots"{}Rebuild Account Cost Basis Lots
Authorization
HTTPBearer In: header
Response Body
application/json
curl -X POST "https://loading/api/v1/portfolio/cost-basis/lots/rebuild"{}Backfill Ingest
Authorization
HTTPBearer In: header
Query Parameters
"trade_history_sync"falseMax Coinbase-ledger pages to fetch per currency
31 <= value <= 25Response Body
application/json
application/json
curl -X POST "https://loading/api/v1/portfolio/ingest/backfill"{}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}Ingest Coinbase Csv
Authorization
HTTPBearer In: header
Query Parameters
falseRequest Body
multipart/form-data
Coinbase Statements 'Transaction history' CSV
Response Body
application/json
application/json
curl -X POST "https://loading/api/v1/portfolio/ingest/csv" \ -F file="string"{}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}Refresh Portfolio
Authorization
HTTPBearer In: header
Response Body
application/json
curl -X POST "https://loading/api/v1/portfolio/refresh"{}Get Holdings Value History
Authorization
HTTPBearer In: header
Query Parameters
How many days of history to return
301 <= value <= 365Response Body
application/json
application/json
curl -X GET "https://loading/api/v1/portfolio/value-history"{}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}List Portfolios
Query Parameters
User ID for portfolio ownership
Filter for active portfolios only
trueMaximum number of portfolios
501 <= value <= 100Number of portfolios to skip
00 <= valueResponse Body
application/json
application/json
curl -X GET "https://loading/api/v1/portfolio/?user_id=string"[
{
"portfolio_id": "5555717d-15c7-408a-aad2-f3155d61ff77",
"user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
"name": "string",
"description": "string",
"total_value_usd": "string",
"target_allocations": {
"property1": 0,
"property2": 0
},
"current_allocations": {
"property1": 0,
"property2": 0
},
"last_rebalanced_at": "2019-08-24T14:15:22Z",
"is_active": true,
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"risk_tolerance": "conservative",
"status": "created",
"is_default": true,
"total_return": "string",
"total_return_percentage": "string",
"tags": [
"string"
]
}
]{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}Create Portfolio
Authorization
HTTPBearer In: header
Query Parameters
User ID for portfolio ownership
Request Body
application/json
Portfolio name (must be unique per user)
length <= 100Portfolio description
Target asset allocations as decimal percentages (must sum to 1.0)
Risk tolerance level
"moderate""conservative" | "moderate" | "aggressive"Portfolio actively managed
trueSet as default portfolio
falseInitial portfolio value in USD
"0"Portfolio tags
Response Body
application/json
application/json
curl -X POST "https://loading/api/v1/portfolio/?user_id=string" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "target_allocations": { "property1": 0, "property2": 0 } }'{
"portfolio_id": "5555717d-15c7-408a-aad2-f3155d61ff77",
"user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
"name": "string",
"description": "string",
"total_value_usd": "string",
"target_allocations": {
"property1": 0,
"property2": 0
},
"current_allocations": {
"property1": 0,
"property2": 0
},
"last_rebalanced_at": "2019-08-24T14:15:22Z",
"is_active": true,
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"risk_tolerance": "conservative",
"status": "created",
"is_default": true,
"total_return": "string",
"total_return_percentage": "string",
"tags": [
"string"
]
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}Get Portfolio
Path Parameters
Query Parameters
User ID for ownership verification
Response Body
application/json
application/json
curl -X GET "https://loading/api/v1/portfolio/string"{
"portfolio_id": "5555717d-15c7-408a-aad2-f3155d61ff77",
"user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
"name": "string",
"description": "string",
"total_value_usd": "string",
"target_allocations": {
"property1": 0,
"property2": 0
},
"current_allocations": {
"property1": 0,
"property2": 0
},
"last_rebalanced_at": "2019-08-24T14:15:22Z",
"is_active": true,
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"risk_tolerance": "conservative",
"status": "created",
"is_default": true,
"total_return": "string",
"total_return_percentage": "string",
"tags": [
"string"
]
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}Delete Portfolio
Authorization
HTTPBearer In: header
Path Parameters
Query Parameters
User ID for ownership verification
Force deletion even if portfolio has assets
falseResponse Body
application/json
curl -X DELETE "https://loading/api/v1/portfolio/string?user_id=string"{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}Update Portfolio
Authorization
HTTPBearer In: header
Path Parameters
Query Parameters
User ID for ownership verification
Request Body
application/json
Portfolio name
Portfolio description
Updated target asset allocations (must sum to 1.0 if provided)
Risk tolerance level
Portfolio actively managed
Portfolio tags
Response Body
application/json
application/json
curl -X PUT "https://loading/api/v1/portfolio/string?user_id=string" \ -H "Content-Type: application/json" \ -d '{}'{
"portfolio_id": "5555717d-15c7-408a-aad2-f3155d61ff77",
"user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
"name": "string",
"description": "string",
"total_value_usd": "string",
"target_allocations": {
"property1": 0,
"property2": 0
},
"current_allocations": {
"property1": 0,
"property2": 0
},
"last_rebalanced_at": "2019-08-24T14:15:22Z",
"is_active": true,
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"risk_tolerance": "conservative",
"status": "created",
"is_default": true,
"total_return": "string",
"total_return_percentage": "string",
"tags": [
"string"
]
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}Get Portfolio Analytics
Path Parameters
Query Parameters
User ID for ownership verification
Response Body
application/json
application/json
curl -X GET "https://loading/api/v1/portfolio/string/analytics?user_id=string"{}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}Get Portfolio History
Authorization
HTTPBearer In: header
Query Parameters
Timeframe for historical data
"1M""1D" | "1W" | "1M" | "3M" | "1Y" | "ALL"Optional specific portfolio ID
Currency denomination
"USD"Response Body
application/json
application/json
curl -X GET "https://loading/api/v1/portfolio/history"[
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
"portfolio_id": "5555717d-15c7-408a-aad2-f3155d61ff77",
"total_value": "string",
"currency": "string",
"recorded_at": "2019-08-24T14:15:22Z",
"created_at": "2019-08-24T14:15:22Z",
"metadata": {}
}
]{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}Get Portfolio Performance
Authorization
HTTPBearer In: header
Query Parameters
Timeframe for performance metrics
"1M""1D" | "1W" | "1M" | "3M" | "1Y" | "ALL"Optional specific portfolio ID
Currency denomination
"USD"Response Body
application/json
application/json
curl -X GET "https://loading/api/v1/portfolio/history/performance"{
"period_start": "2019-08-24T14:15:22Z",
"period_end": "2019-08-24T14:15:22Z",
"timeframe": "1D",
"starting_value": "string",
"ending_value": "string",
"current_value": "string",
"highest_value": "string",
"lowest_value": "string",
"absolute_change": "string",
"absolute_gain": "string",
"percentage_change": "string",
"percentage_gain": "string",
"is_profitable": true,
"return_rate": "string",
"max_drawdown": "string",
"volatility": "string",
"total_data_points": 0,
"currency": "USD"
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}Export Portfolio History
Authorization
HTTPBearer In: header
Query Parameters
Timeframe for export
"1M""1D" | "1W" | "1M" | "3M" | "1Y" | "ALL"Optional specific portfolio ID
Currency denomination
"USD"Response Body
application/json
application/json
curl -X GET "https://loading/api/v1/portfolio/history/export"null{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}