# Accounts ## Get Accounts `client.V1.Accounts.GetAccounts(ctx, query) (*V1AccountGetAccountsResponse, error)` **get** `/v1/accounts` List accounts the authenticated user has permission to access ### Parameters - `query V1AccountGetAccountsParams` - `PageSize param.Field[int64]` The number of items to return per page. Only used when page_token is not provided. - `PageToken param.Field[string]` Token for retrieving the next or previous page of results. Contains encoded pagination state; when provided, page_size is ignored. ### Returns - `type V1AccountGetAccountsResponse struct{…}` - `Data AccountList` - `ID int64` The unique identifier for the account - `AccountHolderEntityID int64` The account holder entity identifier - `FullName string` The full legal name of the account - `OpenDate Time` The date the account was opened - `OptionsLevel int64` The options level of the account - `ShortName string` The short name of the account - `Status AccountStatus` The current status of the account - `const AccountStatusActive AccountStatus = "ACTIVE"` - `const AccountStatusInactive AccountStatus = "INACTIVE"` - `const AccountStatusClosed AccountStatus = "CLOSED"` - `Subtype AccountSubtype` The sub-type of account - `const AccountSubtypeCash AccountSubtype = "CASH"` - `const AccountSubtypeMargin AccountSubtype = "MARGIN"` - `const AccountSubtypeOther AccountSubtype = "OTHER"` - `Type AccountType` The type of account - `const AccountTypeCustomer AccountType = "CUSTOMER"` - `const AccountTypeOther AccountType = "OTHER"` - `CloseDate Time` The date the account was closed, if applicable ### Example ```go package main import ( "context" "fmt" "github.com/clear-street/clear-street-go" "github.com/clear-street/clear-street-go/option" ) func main() { client := clearstreet.NewClient( option.WithAPIKey("My API Key"), ) response, err := client.V1.Accounts.GetAccounts(context.TODO(), clearstreet.V1AccountGetAccountsParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response) } ``` #### Response ```json { "data": [ { "account_holder_entity_id": 987654321, "close_date": null, "full_name": "Test Trading Account", "id": 19816, "open_date": "2023-01-15", "short_name": "TST-ACCOUNT-01", "status": "ACTIVE", "subtype": "MARGIN", "type": "CUSTOMER" }, { "account_holder_entity_id": 987654322, "close_date": "2024-08-01", "full_name": "Old Test Account", "id": 19817, "open_date": "2021-05-20", "short_name": "TST-ACCOUNT-02-CLOSED", "status": "CLOSED", "subtype": "CASH", "type": "CUSTOMER" } ], "error": null, "metadata": { "next_page_token": "cGFnZT0yJmxhc3RfaWQ9MTk4MTc=", "page_number": 1, "request_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "total_items": 25, "total_pages": 3 } } ``` ## Get Account By ID `client.V1.Accounts.GetAccountByID(ctx, accountID) (*V1AccountGetAccountByIDResponse, error)` **get** `/v1/accounts/{account_id}` Fetch account details by ID ### Parameters - `accountID int64` ### Returns - `type V1AccountGetAccountByIDResponse struct{…}` - `Data Account` Represents a trading account - `ID int64` The unique identifier for the account - `AccountHolderEntityID int64` The account holder entity identifier - `FullName string` The full legal name of the account - `OpenDate Time` The date the account was opened - `OptionsLevel int64` The options level of the account - `ShortName string` The short name of the account - `Status AccountStatus` The current status of the account - `const AccountStatusActive AccountStatus = "ACTIVE"` - `const AccountStatusInactive AccountStatus = "INACTIVE"` - `const AccountStatusClosed AccountStatus = "CLOSED"` - `Subtype AccountSubtype` The sub-type of account - `const AccountSubtypeCash AccountSubtype = "CASH"` - `const AccountSubtypeMargin AccountSubtype = "MARGIN"` - `const AccountSubtypeOther AccountSubtype = "OTHER"` - `Type AccountType` The type of account - `const AccountTypeCustomer AccountType = "CUSTOMER"` - `const AccountTypeOther AccountType = "OTHER"` - `CloseDate Time` The date the account was closed, if applicable ### Example ```go package main import ( "context" "fmt" "github.com/clear-street/clear-street-go" "github.com/clear-street/clear-street-go/option" ) func main() { client := clearstreet.NewClient( option.WithAPIKey("My API Key"), ) response, err := client.V1.Accounts.GetAccountByID(context.TODO(), 0) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response) } ``` #### Response ```json { "data": { "account_holder_entity_id": 987654321, "close_date": null, "full_name": "Test Trading Account", "id": 19816, "open_date": "2023-01-15", "short_name": "TST-ACCOUNT-01", "status": "ACTIVE", "subtype": "MARGIN", "type": "CUSTOMER" }, "error": null, "metadata": { "request_id": "b7e2d3f4-a1b2-4c3d-8e4f-5a6b7c8d9e0f" } } ``` ## Patch Account By ID `client.V1.Accounts.PatchAccountByID(ctx, accountID, body) (*V1AccountPatchAccountByIDResponse, error)` **patch** `/v1/accounts/{account_id}` Update account risk settings ### Parameters - `accountID int64` - `body V1AccountPatchAccountByIDParams` - `Risk param.Field[RiskSettings]` Risk settings for the account ### Returns - `type V1AccountPatchAccountByIDResponse struct{…}` - `Data AccountSettings` - `Risk RiskSettings` Risk settings for the account - `MaxNotional string` The maximum notional value available to the account ### Example ```go package main import ( "context" "fmt" "github.com/clear-street/clear-street-go" "github.com/clear-street/clear-street-go/option" ) func main() { client := clearstreet.NewClient( option.WithAPIKey("My API Key"), ) response, err := client.V1.Accounts.PatchAccountByID( context.TODO(), 0, clearstreet.V1AccountPatchAccountByIDParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response) } ``` #### Response ```json { "data": { "risk": { "max_notional": "5000000.00" } }, "error": null, "metadata": { "request_id": "c8f3e4a5-b2c3-5d4e-9f0a-6b7c8d9e0f1a" } } ``` ## Get Account Balances `client.V1.Accounts.GetAccountBalances(ctx, accountID, query) (*V1AccountGetAccountBalancesResponse, error)` **get** `/v1/accounts/{account_id}/balances` Fetch account balance information ### Parameters - `accountID int64` - `query V1AccountGetAccountBalancesParams` - `TopMarginContributorsLimit param.Field[int64]` Limit the number of top margin contributors returned by the engine. ### Returns - `type V1AccountGetAccountBalancesResponse struct{…}` - `Data AccountBalances` Represents the balance details for a trading account - `AccountID int64` The unique identifier for the account - `BuyingPower string` The total buying power available in the account. - `Currency string` Currency identifier for all monetary values. - `DailyRealizedPnl string` Realized profit or loss since start of day. - `DailyTotalPnl string` Total profit or loss since start of day. - `DailyUnrealizedPnl string` Total unrealized profit or loss across all positions relative to prior close. - `Equity string` The total equity in the account. - `LongMarketValue string` The total market value of all long positions. - `MarginType MarginType` The applicable margin model for the account - `const MarginTypeOther MarginType = "OTHER"` - `const MarginTypeNone MarginType = "NONE"` - `const MarginTypePortfolioMargin MarginType = "PORTFOLIO_MARGIN"` - `const MarginTypeRiskBasedHaircutBrokerDealer MarginType = "RISK_BASED_HAIRCUT_BROKER_DEALER"` - `const MarginTypeRegT MarginType = "REG_T"` - `const MarginTypeRiskBasedHaircutMarketMaker MarginType = "RISK_BASED_HAIRCUT_MARKET_MAKER"` - `const MarginTypeCiro MarginType = "CIRO"` - `const MarginTypeFuturesNlv MarginType = "FUTURES_NLV"` - `const MarginTypeFuturesTotEq MarginType = "FUTURES_TOT_EQ"` - `OpenOrderAdjustment string` Signed buying-power correction from open orders. - `SettledCash string` The amount of cash that is settled and available for withdrawal or trading. - `Sod AccountBalancesSod` Start-of-day snapshot balances. - `BuyingPower string` Start-of-day buying power. - `Equity string` Start-of-day equity. - `LongMarketValue string` Start-of-day long market value. - `ShortMarketValue string` Start-of-day short market value. - `Asof Time` Timestamp for the start-of-day values. - `DayTradeBuyingPower string` Start-of-day day-trade buying power. - `MaintenanceMarginExcess string` Start-of-day maintenance margin excess. - `MaintenanceMarginRequirement string` Start-of-day maintenance margin requirement. - `TradeCash string` Start-of-day trade cash. - `TradeCash string` Trade-date effective cash. - `UnsettledCredits string` Trade-date unsettled cash credits. - `UnsettledDebits string` Trade-date unsettled cash debits. - `WithdrawableCash string` The amount of cash currently available to withdraw. - `MarginDetails MarginDetails` Margin-account-only details. - `DayTradeCount int64` The number of day trades executed over the 5 most recent trading days. - `InitialMarginExcess string` Initial margin excess for trade-date balances. - `InitialMarginRequirement string` Initial margin requirement for trade-date balances. - `MaintenanceMarginExcess string` Maintenance margin excess for trade-date balances. - `MaintenanceMarginRequirement string` Maintenance margin requirement for trade-date balances. - `PatternDayTrader bool` `true` if the account is currently flagged as a PDT, otherwise `false`. - `DayTradeBuyingPowerUsage string` The amount of day-trade buying power used during the current trading day. - `TopContributors []MarginTopContributor` Optional top margin contributors, returned only when explicitly requested. - `DayTradeBuyingPowerUsage string` Day-trade buying power consumed by fills against this underlying on the current trade date. Populated only for pattern day trader accounts. - `InitialMarginRequirement string` Initial margin requirement attributable to this underlying. - `MaintenanceMarginRequirement string` Maintenance margin requirement attributable to this underlying. - `MarketValue string` Net market value attributable to this underlying. - `UnderlyingInstrumentID string` UUID of the underlying security contributing to margin requirement. - `Usage MarginDetailsUsage` Current usage totals. - `Total string` The total margin available in the current model. - `Used string` The amount of margin that is currently being utilized. - `Multiplier string` Applied multiplier for margin calculations. - `ShortMarketValue string` The total market value of all short positions. ### Example ```go package main import ( "context" "fmt" "github.com/clear-street/clear-street-go" "github.com/clear-street/clear-street-go/option" ) func main() { client := clearstreet.NewClient( option.WithAPIKey("My API Key"), ) response, err := client.V1.Accounts.GetAccountBalances( context.TODO(), 0, clearstreet.V1AccountGetAccountBalancesParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response) } ``` #### Response ```json { "data": { "account_id": 19816, "buying_power": "45000.00", "currency": "USD", "daily_realized_pnl": "700.00", "daily_total_pnl": "1250.00", "daily_unrealized_pnl": "550.00", "equity": "100000.00", "long_market_value": "30000.00", "margin_type": "NONE", "open_order_adjustment": "-5000.00", "settled_cash": "60000.00", "sod": { "asof": "2023-09-27", "buying_power": "45000.00", "equity": "100000.00", "long_market_value": "30000.00" }, "trade_cash": "60000.00", "unsettled_credits": "20000.00", "unsettled_debits": "10000.00", "withdrawable_cash": "55000.00" }, "error": null, "metadata": { "request_id": "b7e2d3f4-a1b2-4c3d-8e4f-5a6b7c8d9e0f" } } ``` ## Get Portfolio History `client.V1.Accounts.GetPortfolioHistory(ctx, accountID, query) (*V1AccountGetPortfolioHistoryResponse, error)` **get** `/v1/accounts/{account_id}/portfolio-history` Retrieves daily portfolio history for the specified account. ### Parameters - `accountID int64` - `query V1AccountGetPortfolioHistoryParams` - `StartDate param.Field[Time]` Start date for the portfolio history range, in YYYY-MM-DD format. - `EndDate param.Field[Time]` Defaults to today in America/New_York when omitted. ### Returns - `type V1AccountGetPortfolioHistoryResponse struct{…}` - `Data PortfolioHistoryResponse` - `Segments []PortfolioHistorySegment` - `Date Time` The date for this segment - `EodEquity string` The equity at the end of the trading day. - `RealizedPnl string` Sum of the profit and loss realized from position closing trading activity. - `SodEquity string` The equity at the start of the trading day. - `UnrealizedPnl string` Sum of the profit and loss from market changes. - `BoughtNotional string` Amount bought MTM - `DayPnl string` Sum of the profit and loss from intraday trading activities for the trading day. - `NetPnl string` P&L after netting all realized and unrealized P&L, adjustments, dividends, change in accruals, income and expenses - `PositionPnl string` P&L attributable to start-of-day (carried) positions from market movement during this trading day. - `SoldNotional string` Amount sold MTM ### Example ```go package main import ( "context" "fmt" "time" "github.com/clear-street/clear-street-go" "github.com/clear-street/clear-street-go/option" ) func main() { client := clearstreet.NewClient( option.WithAPIKey("My API Key"), ) response, err := client.V1.Accounts.GetPortfolioHistory( context.TODO(), 0, clearstreet.V1AccountGetPortfolioHistoryParams{ StartDate: time.Now(), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response) } ``` #### Response ```json { "data": { "segments": [ { "bought_notional": "39800.00", "date": "2026-04-15", "day_pnl": "850.25", "eod_equity": "100850.25", "net_pnl": "850.25", "position_pnl": "-350.25", "realized_pnl": "1200.50", "sod_equity": "100000.00", "sold_notional": "42500.00", "unrealized_pnl": "-350.25" } ] }, "error": null, "metadata": { "request_id": "f076d6f6-10c9-42a0-98c5-18cebc427e80" } } ``` ## Domain Types ### Account - `type Account struct{…}` Represents a trading account - `ID int64` The unique identifier for the account - `AccountHolderEntityID int64` The account holder entity identifier - `FullName string` The full legal name of the account - `OpenDate Time` The date the account was opened - `OptionsLevel int64` The options level of the account - `ShortName string` The short name of the account - `Status AccountStatus` The current status of the account - `const AccountStatusActive AccountStatus = "ACTIVE"` - `const AccountStatusInactive AccountStatus = "INACTIVE"` - `const AccountStatusClosed AccountStatus = "CLOSED"` - `Subtype AccountSubtype` The sub-type of account - `const AccountSubtypeCash AccountSubtype = "CASH"` - `const AccountSubtypeMargin AccountSubtype = "MARGIN"` - `const AccountSubtypeOther AccountSubtype = "OTHER"` - `Type AccountType` The type of account - `const AccountTypeCustomer AccountType = "CUSTOMER"` - `const AccountTypeOther AccountType = "OTHER"` - `CloseDate Time` The date the account was closed, if applicable ### Account Balances - `type AccountBalances struct{…}` Represents the balance details for a trading account - `AccountID int64` The unique identifier for the account - `BuyingPower string` The total buying power available in the account. - `Currency string` Currency identifier for all monetary values. - `DailyRealizedPnl string` Realized profit or loss since start of day. - `DailyTotalPnl string` Total profit or loss since start of day. - `DailyUnrealizedPnl string` Total unrealized profit or loss across all positions relative to prior close. - `Equity string` The total equity in the account. - `LongMarketValue string` The total market value of all long positions. - `MarginType MarginType` The applicable margin model for the account - `const MarginTypeOther MarginType = "OTHER"` - `const MarginTypeNone MarginType = "NONE"` - `const MarginTypePortfolioMargin MarginType = "PORTFOLIO_MARGIN"` - `const MarginTypeRiskBasedHaircutBrokerDealer MarginType = "RISK_BASED_HAIRCUT_BROKER_DEALER"` - `const MarginTypeRegT MarginType = "REG_T"` - `const MarginTypeRiskBasedHaircutMarketMaker MarginType = "RISK_BASED_HAIRCUT_MARKET_MAKER"` - `const MarginTypeCiro MarginType = "CIRO"` - `const MarginTypeFuturesNlv MarginType = "FUTURES_NLV"` - `const MarginTypeFuturesTotEq MarginType = "FUTURES_TOT_EQ"` - `OpenOrderAdjustment string` Signed buying-power correction from open orders. - `SettledCash string` The amount of cash that is settled and available for withdrawal or trading. - `Sod AccountBalancesSod` Start-of-day snapshot balances. - `BuyingPower string` Start-of-day buying power. - `Equity string` Start-of-day equity. - `LongMarketValue string` Start-of-day long market value. - `ShortMarketValue string` Start-of-day short market value. - `Asof Time` Timestamp for the start-of-day values. - `DayTradeBuyingPower string` Start-of-day day-trade buying power. - `MaintenanceMarginExcess string` Start-of-day maintenance margin excess. - `MaintenanceMarginRequirement string` Start-of-day maintenance margin requirement. - `TradeCash string` Start-of-day trade cash. - `TradeCash string` Trade-date effective cash. - `UnsettledCredits string` Trade-date unsettled cash credits. - `UnsettledDebits string` Trade-date unsettled cash debits. - `WithdrawableCash string` The amount of cash currently available to withdraw. - `MarginDetails MarginDetails` Margin-account-only details. - `DayTradeCount int64` The number of day trades executed over the 5 most recent trading days. - `InitialMarginExcess string` Initial margin excess for trade-date balances. - `InitialMarginRequirement string` Initial margin requirement for trade-date balances. - `MaintenanceMarginExcess string` Maintenance margin excess for trade-date balances. - `MaintenanceMarginRequirement string` Maintenance margin requirement for trade-date balances. - `PatternDayTrader bool` `true` if the account is currently flagged as a PDT, otherwise `false`. - `DayTradeBuyingPowerUsage string` The amount of day-trade buying power used during the current trading day. - `TopContributors []MarginTopContributor` Optional top margin contributors, returned only when explicitly requested. - `DayTradeBuyingPowerUsage string` Day-trade buying power consumed by fills against this underlying on the current trade date. Populated only for pattern day trader accounts. - `InitialMarginRequirement string` Initial margin requirement attributable to this underlying. - `MaintenanceMarginRequirement string` Maintenance margin requirement attributable to this underlying. - `MarketValue string` Net market value attributable to this underlying. - `UnderlyingInstrumentID string` UUID of the underlying security contributing to margin requirement. - `Usage MarginDetailsUsage` Current usage totals. - `Total string` The total margin available in the current model. - `Used string` The amount of margin that is currently being utilized. - `Multiplier string` Applied multiplier for margin calculations. - `ShortMarketValue string` The total market value of all short positions. ### Account Balances Sod - `type AccountBalancesSod struct{…}` - `BuyingPower string` Start-of-day buying power. - `Equity string` Start-of-day equity. - `LongMarketValue string` Start-of-day long market value. - `ShortMarketValue string` Start-of-day short market value. - `Asof Time` Timestamp for the start-of-day values. - `DayTradeBuyingPower string` Start-of-day day-trade buying power. - `MaintenanceMarginExcess string` Start-of-day maintenance margin excess. - `MaintenanceMarginRequirement string` Start-of-day maintenance margin requirement. - `TradeCash string` Start-of-day trade cash. ### Account List - `type AccountList []Account` - `ID int64` The unique identifier for the account - `AccountHolderEntityID int64` The account holder entity identifier - `FullName string` The full legal name of the account - `OpenDate Time` The date the account was opened - `OptionsLevel int64` The options level of the account - `ShortName string` The short name of the account - `Status AccountStatus` The current status of the account - `const AccountStatusActive AccountStatus = "ACTIVE"` - `const AccountStatusInactive AccountStatus = "INACTIVE"` - `const AccountStatusClosed AccountStatus = "CLOSED"` - `Subtype AccountSubtype` The sub-type of account - `const AccountSubtypeCash AccountSubtype = "CASH"` - `const AccountSubtypeMargin AccountSubtype = "MARGIN"` - `const AccountSubtypeOther AccountSubtype = "OTHER"` - `Type AccountType` The type of account - `const AccountTypeCustomer AccountType = "CUSTOMER"` - `const AccountTypeOther AccountType = "OTHER"` - `CloseDate Time` The date the account was closed, if applicable ### Account Settings - `type AccountSettings struct{…}` - `Risk RiskSettings` Risk settings for the account - `MaxNotional string` The maximum notional value available to the account ### Account Status - `type AccountStatus string` Account status - `const AccountStatusActive AccountStatus = "ACTIVE"` - `const AccountStatusInactive AccountStatus = "INACTIVE"` - `const AccountStatusClosed AccountStatus = "CLOSED"` ### Account Subtype - `type AccountSubtype string` Account subtype classification providing more granular categorization - `const AccountSubtypeCash AccountSubtype = "CASH"` - `const AccountSubtypeMargin AccountSubtype = "MARGIN"` - `const AccountSubtypeOther AccountSubtype = "OTHER"` ### Account Type - `type AccountType string` Account type classification - `const AccountTypeCustomer AccountType = "CUSTOMER"` - `const AccountTypeOther AccountType = "OTHER"` ### Margin Details - `type MarginDetails struct{…}` - `DayTradeCount int64` The number of day trades executed over the 5 most recent trading days. - `InitialMarginExcess string` Initial margin excess for trade-date balances. - `InitialMarginRequirement string` Initial margin requirement for trade-date balances. - `MaintenanceMarginExcess string` Maintenance margin excess for trade-date balances. - `MaintenanceMarginRequirement string` Maintenance margin requirement for trade-date balances. - `PatternDayTrader bool` `true` if the account is currently flagged as a PDT, otherwise `false`. - `DayTradeBuyingPowerUsage string` The amount of day-trade buying power used during the current trading day. - `TopContributors []MarginTopContributor` Optional top margin contributors, returned only when explicitly requested. - `DayTradeBuyingPowerUsage string` Day-trade buying power consumed by fills against this underlying on the current trade date. Populated only for pattern day trader accounts. - `InitialMarginRequirement string` Initial margin requirement attributable to this underlying. - `MaintenanceMarginRequirement string` Maintenance margin requirement attributable to this underlying. - `MarketValue string` Net market value attributable to this underlying. - `UnderlyingInstrumentID string` UUID of the underlying security contributing to margin requirement. - `Usage MarginDetailsUsage` Current usage totals. - `Total string` The total margin available in the current model. - `Used string` The amount of margin that is currently being utilized. ### Margin Details Usage - `type MarginDetailsUsage struct{…}` - `Total string` The total margin available in the current model. - `Used string` The amount of margin that is currently being utilized. ### Margin Top Contributor - `type MarginTopContributor struct{…}` - `DayTradeBuyingPowerUsage string` Day-trade buying power consumed by fills against this underlying on the current trade date. Populated only for pattern day trader accounts. - `InitialMarginRequirement string` Initial margin requirement attributable to this underlying. - `MaintenanceMarginRequirement string` Maintenance margin requirement attributable to this underlying. - `MarketValue string` Net market value attributable to this underlying. - `UnderlyingInstrumentID string` UUID of the underlying security contributing to margin requirement. ### Margin Type - `type MarginType string` An account's margin type - `const MarginTypeOther MarginType = "OTHER"` - `const MarginTypeNone MarginType = "NONE"` - `const MarginTypePortfolioMargin MarginType = "PORTFOLIO_MARGIN"` - `const MarginTypeRiskBasedHaircutBrokerDealer MarginType = "RISK_BASED_HAIRCUT_BROKER_DEALER"` - `const MarginTypeRegT MarginType = "REG_T"` - `const MarginTypeRiskBasedHaircutMarketMaker MarginType = "RISK_BASED_HAIRCUT_MARKET_MAKER"` - `const MarginTypeCiro MarginType = "CIRO"` - `const MarginTypeFuturesNlv MarginType = "FUTURES_NLV"` - `const MarginTypeFuturesTotEq MarginType = "FUTURES_TOT_EQ"` ### Portfolio History Response - `type PortfolioHistoryResponse struct{…}` - `Segments []PortfolioHistorySegment` - `Date Time` The date for this segment - `EodEquity string` The equity at the end of the trading day. - `RealizedPnl string` Sum of the profit and loss realized from position closing trading activity. - `SodEquity string` The equity at the start of the trading day. - `UnrealizedPnl string` Sum of the profit and loss from market changes. - `BoughtNotional string` Amount bought MTM - `DayPnl string` Sum of the profit and loss from intraday trading activities for the trading day. - `NetPnl string` P&L after netting all realized and unrealized P&L, adjustments, dividends, change in accruals, income and expenses - `PositionPnl string` P&L attributable to start-of-day (carried) positions from market movement during this trading day. - `SoldNotional string` Amount sold MTM ### Portfolio History Segment - `type PortfolioHistorySegment struct{…}` - `Date Time` The date for this segment - `EodEquity string` The equity at the end of the trading day. - `RealizedPnl string` Sum of the profit and loss realized from position closing trading activity. - `SodEquity string` The equity at the start of the trading day. - `UnrealizedPnl string` Sum of the profit and loss from market changes. - `BoughtNotional string` Amount bought MTM - `DayPnl string` Sum of the profit and loss from intraday trading activities for the trading day. - `NetPnl string` P&L after netting all realized and unrealized P&L, adjustments, dividends, change in accruals, income and expenses - `PositionPnl string` P&L attributable to start-of-day (carried) positions from market movement during this trading day. - `SoldNotional string` Amount sold MTM ### Risk Settings - `type RiskSettings struct{…}` Risk settings for an account - `MaxNotional string` The maximum notional value available to the account