Skip to content

Latest commit

 

History

History
192 lines (141 loc) · 5.87 KB

HoldingsApi.md

File metadata and controls

192 lines (141 loc) · 5.87 KB

\HoldingsApi

Method HTTP request Description
ListHoldings Get /users/{user_guid}/holdings List holdings
ListHoldingsByAccount Get /users/{user_guid}/accounts/{account_guid}/holdings List holdings by account
ListHoldingsByMember Get /users/{user_guid}/members/{member_guid}/holdings List holdings by member
ReadHolding Get /users/{user_guid}/holdings/{holding_guid} Read holding

ListHoldings

HoldingsResponseBody ListHoldings(ctx, userGUID) List holdings

Use this endpoint to read all holdings associated with a specific user.

Example

package main

import (
  "context"
  "fmt"
  "github.com/mxenabled/atrium-go"
)

func main() {
  client := atrium.AtriumClient("YOUR_API_KEY", "YOUR_CLIENT_ID")
  ctx := context.Background()
  
  userGUID := "USR-123" // string | The unique identifier for a `user`.

  response, _, err := client.Holdings.ListHoldings(ctx, userGUID, )
  if err != nil {
    fmt.Printf("Error: %v\n", err)
  } else {
    fmt.Printf("Response: %s\n", response)
  }
}

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
userGUID string The unique identifier for a `user`.

Return type

HoldingsResponseBody

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ListHoldingsByAccount

HoldingsResponseBody ListHoldingsByAccount(ctx, accountGUID, userGUID) List holdings by account

Use this endpoint to read all holdings associated with a specific account.

Example

package main

import (
  "context"
  "fmt"
  "github.com/mxenabled/atrium-go"
)

func main() {
  client := atrium.AtriumClient("YOUR_API_KEY", "YOUR_CLIENT_ID")
  ctx := context.Background()
  
  accountGUID := "ACT-123" // string | The unique identifier for an `account`.
  userGUID := "USR-123" // string | The unique identifier for a `user`.

  response, _, err := client.Holdings.ListHoldingsByAccount(ctx, accountGUID, userGUID, )
  if err != nil {
    fmt.Printf("Error: %v\n", err)
  } else {
    fmt.Printf("Response: %s\n", response)
  }
}

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
accountGUID string The unique identifier for an `account`.
userGUID string The unique identifier for a `user`.

Return type

HoldingsResponseBody

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ListHoldingsByMember

HoldingsResponseBody ListHoldingsByMember(ctx, memberGUID, userGUID) List holdings by member

Use this endpoint to read all holdings associated with a specific member.

Example

package main

import (
  "context"
  "fmt"
  "github.com/mxenabled/atrium-go"
)

func main() {
  client := atrium.AtriumClient("YOUR_API_KEY", "YOUR_CLIENT_ID")
  ctx := context.Background()
  
  memberGUID := "MBR-123" // string | The unique identifier for a `member`.
  userGUID := "USR-123" // string | The unique identifier for a `user`.

  response, _, err := client.Holdings.ListHoldingsByMember(ctx, memberGUID, userGUID, )
  if err != nil {
    fmt.Printf("Error: %v\n", err)
  } else {
    fmt.Printf("Response: %s\n", response)
  }
}

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
memberGUID string The unique identifier for a `member`.
userGUID string The unique identifier for a `user`.

Return type

HoldingsResponseBody

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ReadHolding

HoldingResponseBody ReadHolding(ctx, holdingGUID, userGUID) Read holding

Use this endpoint to read the attributes of a specific holding.

Example

package main

import (
  "context"
  "fmt"
  "github.com/mxenabled/atrium-go"
)

func main() {
  client := atrium.AtriumClient("YOUR_API_KEY", "YOUR_CLIENT_ID")
  ctx := context.Background()
  
  holdingGUID := "HOL-123" // string | The unique identifier for a `holding`.
  userGUID := "USR-123" // string | The unique identifier for a `user`.

  response, _, err := client.Holdings.ReadHolding(ctx, holdingGUID, userGUID, )
  if err != nil {
    fmt.Printf("Error: %v\n", err)
  } else {
    fmt.Printf("Response: %s\n", response)
  }
}

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
holdingGUID string The unique identifier for a `holding`.
userGUID string The unique identifier for a `user`.

Return type

HoldingResponseBody

[Back to top] [Back to API list] [Back to Model list] [Back to README]