The portfolios this principal may act on.
GET
/portfolios
curl --request GET \ --url http://localhost:3001/portfolios \ --header 'Authorization: Bearer <token>'import requests
url = "http://localhost:3001/portfolios"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.json())use reqwest;
#[tokio::main]pub async fn main() { let url = "http://localhost:3001/portfolios";
let mut headers = reqwest::header::HeaderMap::new(); headers.insert("Authorization", "Bearer <token>".parse().unwrap());
let client = reqwest::Client::new(); let response = client.get(url) .headers(headers) .send() .await;
let results = response.unwrap() .json::<serde_json::Value>() .await .unwrap();
dbg!(results);}Exists so a trading token is self-sufficient: every other trading route needs a portfolio UUID, and without this the caller has to be handed one out of band (or read the admin surface, which is exactly the authority a trading token must not have). Scope is the principal’s own grants — there is no filter to widen it.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”OK
Media typeapplication/json
Array<object>
One portfolio the caller is entitled to, with the entitlement itself.
The flags are returned rather than filtered on, so a client can grey out what it cannot do instead of discovering it from a 403 mid-order.
object
base_currency
string
can_allocate
required
boolean
can_trade
required
boolean
can_view
required
boolean
code
required
string
name
required
string
portfolio_id
required
string
status
required
string
Example generated
[ { "base_currency": "example", "can_allocate": true, "can_trade": true, "can_view": true, "code": "example", "name": "example", "portfolio_id": "example", "status": "example" }]