Documentation Index
Fetch the complete documentation index at: https://finance.dev/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The Users API allows you to create users, retrieve and update profiles, manage email addresses, and configure trading passwords.
Package Reference
import (
"fmt"
"log"
aries "github.com/aries-exchange/go-sdk"
)
Methods
CreateUser()
Create a new user account.
user, err := client.Users.CreateUser(&aries.UserCreateRequest{
Email: "user@example.com",
Password: "SecurePass123!",
FirstName: "John",
LastName: "Doe",
})
Returns: *User, error
UpdateCurrentUser()
Update user profile information.
updated, err := client.Users.UpdateCurrentUser(&aries.UserUpdate{
FirstName: "Jane",
Phone: "+1234567890",
})
Returns: *User, error
GetUserAccounts()
Get all trading accounts.
accounts, err := client.Users.GetUserAccounts()
if err != nil {
log.Fatal(err)
}
for _, account := range accounts {
fmt.Printf("Account: %s\n", account.ID)
}
Returns: []Account, error
GetUserProfile()
Get complete user profile.
profile, err := client.Users.GetUserProfile()
Returns: *Profile, error
ChangeEmail()
Update account email.
err := client.Users.ChangeEmail("newemail@example.com")
Returns: error
SetTradingPassword()
Configure trading password.
err := client.Users.SetTradingPassword("TradingPass456!")
Returns: error
Examples
profile, err := client.Users.GetUserProfile()
if err != nil {
log.Fatal(err)
}
accounts, err := client.Users.GetUserAccounts()
if err != nil {
log.Fatal(err)
}
fmt.Printf("User: %s has %d accounts\n", profile.Email, len(accounts))